litian
2024-10-15 1a5e46e6955225675d21fe04962e82b37e7890ed
assets/js/middleGround/api/store.js
@@ -306,6 +306,7 @@
            data.datas[0].subDatas = data.datas[0].cmsDatas
            const datas = handleDetailQueryRequestData({
              productId,
              item: data.datas[0],
              fields,
              itemFields: {
@@ -362,13 +363,13 @@
        Path: cmsPath + '',
        Type: cmsType || '\\',
        Name: [],
        Icon: [],
        // Icon: [],
        TypeId: [],
        RefCode: [],
        Description: [],
        // RefCode: [],
        // Description: [],
        // ChildrenCount: [],
        // ChildrenFolderCount: [],
        CreateDate: [],
        // CreateDate: [],
        SysType: [],
        SaleMethod: [],
        PageQuery: {
@@ -388,13 +389,11 @@
        Path: '*',
        Type: '\\',
        Name: [],
        Icon: [],
        TypeId: [],
        RefCode: [],
        Description: [],
        ChildrenCount: [],
        ChildrenFolderCount: [],
        CreateDate: [],
        // Description: [],
        // ChildrenCount: [],
        // ChildrenFolderCount: [],
        SysType: [],
        SaleMethod: [],
        PageQuery: {
@@ -413,10 +412,10 @@
          Path: cmsPath + '',
          Type: '\\',
          Name: [],
          Icon: [],
          // Icon: [],
          TypeId: [],
          RefCode: [],
          Description: [],
          // RefCode: [],
          // Description: [],
          LinkTypes: [linkType.linkType],
          PageQuery: {
            Start: 0,
@@ -448,18 +447,18 @@
      SortQuery: sort ? [sort] : [{
        LinkOrder: 'Desc'
      }],
      CreateDate: [],
      Description: [],
      // CreateDate: [],
      // Description: [],
      Name: [],
      Icon: [],
      // Icon: [],
      RefCode: [],
      Description: [],
      // Description: [],
      TypeId: [],
      SysType: [],
      State: [],
      Tag: [],
      BeginDate: [],
      EndDate: [],
      // BeginDate: [],
      // EndDate: [],
      ProductLinkInfo: [],
      AllowDonate: [],
      DonatePriceList: [],
@@ -480,48 +479,46 @@
        }]
      })
    }
    let token = wx.getStorageSync(tokenKey) ? wx.getStorageSync(tokenKey) : '';
    let url = token ? '/store/api/ApiQueryProductByAppUser' : '/store/api/ApiQueryProduct'
    return request({
        url: url,
        method: 'post',
        data: body,
        cancelToken: source?.token
      })
      .then((resp) => {
        if (resp.length > 0) {
          const data = resp[0]
          if (data.datas.length) {
            data.datas[0].subDatas = data.datas[0].cmsDatas
            const datas = handleDetailQueryRequestData({
              item: data.datas[0],
              fields,
              itemFields: {
                ...itemFields,
                ...linkFields
              },
              path,
              coverSize,
              handelEBooK
            })
            return {
              datas,
              total: data.totalCount
            }
          } else {
            return {
              datas: [],
              total: 0
            }
      url: url,
      method: 'post',
      data: body,
      cancelToken: source?.token
    }).then((resp) => {
      if (resp.length > 0) {
        const data = resp[0]
        if (data.datas.length) {
          data.datas[0].subDatas = data.datas[0].cmsDatas
          const datas = handleDetailQueryRequestData({
            productId,
            item: data.datas[0],
            fields,
            itemFields: {
              ...itemFields,
              ...linkFields
            },
            path,
            coverSize,
            handelEBooK
          })
          return {
            datas,
            total: data.totalCount
          }
        } else {
          return {
            datas: [],
            total: 0
          }
        }
        return {
          datas: [],
          total: 0
        }
      })
      }
      return {
        datas: [],
        total: 0
      }
    })
  },
  // 获取优惠券列表
  getChannelPromoteCodeList(data) {
@@ -849,7 +846,23 @@
      method: 'post',
      data
    })
  }
  },
  // 积分兑换
  newOrderPay(data) {
    return request({
      url: '/store/api/NewOrderPay',
      method: 'post',
      data
    })
  },
  // 删除积分订单
  delOrderPay(data) {
    return request({
      url: '/store/api/DelOrderPay',
      method: 'post',
      data
    })
  },
}
export default storeApi