ts
litian
2024-09-27 d780880b7a73360c8fc9fead1b429dd8ba3758e3
ts
4个文件已修改
100 ■■■■■ 已修改文件
packageBookService/pages/bookServices/detail/index.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageBookService/pages/bookServices/detail/index.wxss 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/cart/paymentPage/index.js 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/home/home.js 76 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageBookService/pages/bookServices/detail/index.js
@@ -2809,8 +2809,8 @@
    }
    app.MG.ugc.newTopicMessage(query).then((res) => {
      wx.showToast({
        icon: "error",
        title: "请上传资源文件",
        icon: "success",
        title: "上传成功",
      });
      this.closeDialog()
    })
packageBookService/pages/bookServices/detail/index.wxss
@@ -537,8 +537,8 @@
  padding: 10rpx !important;
}
.t-input__content,
.t-textarea {
.info-center .t-input__content,
info-center .t-textarea {
  border: 2rpx solid #D9D9D9 !important;
  border-radius: 15rpx;
  padding: 10rpx !important;
pages/cart/paymentPage/index.js
@@ -342,14 +342,16 @@
      orderNum: this.data.orderGoods
    }
    app.MG.store.confirmOrder(query).then(res => {
      Toast({
        context: this,
        selector: '#t-toast',
        message: '领取成功',
        theme: 'success',
        direction: 'column',
      wx.showToast({
        title: '领取成功',
        icon: 'success',
        complete: res => {
          setTimeout(() => {
            wx.navigateBack()
          }, 1000);
        }
      });
      wx.navigateBack()
    })
  }
})
pages/home/home.js
@@ -270,6 +270,7 @@
    app.MG.store.getProductList(obj).then((res) => {
      res.datas.forEach((item) => {
        item.price = item.price ? item.price.toFixed(2) : item.price;
        item.isbuy = item.purchasedSaleMethodIdList.indexOf(item.defaultSaleMethodId) > -1
      });
      this.setData({
        courseList: res.datas
@@ -399,6 +400,7 @@
    app.MG.store.getProductList(obj).then((res) => {
      res.datas.forEach((item) => {
        item.price = item.price ? item.price.toFixed(2) : item.price;
        item.isbuy = item.purchasedSaleMethodIdList.indexOf(item.defaultSaleMethodId) > -1
      });
      this.setData({
        textbookList: res.datas
@@ -520,46 +522,54 @@
      info
    } = e.currentTarget.dataset;
    if (wx.getStorageSync(app.config.tokenKey)) {
      let query = {
        start: 0,
        size: 999,
        filterList: [],
        searchList: []
      }
      try {
        if (
          this.data.shoppingCartGetId.includes(
            info.defaultSaleMethodId
          )
        ) {
          wx.showToast({
            title: "该商品已在购物车,请勿重复添加",
            icon: 'none',
            duration: 1000
          })
        } else {
          let query = {
            requests: [{
              saleMethodId: info.defaultSaleMethodId,
              storeEventId: null,
              agentCode: '电子书'
            }]
          }
          const addRes = await app.MG.store.addShoppingCart(query)
          if (addRes) {
      if (info.isbuy) {
        wx.showToast({
          title: "该商品已购买",
          icon: 'none',
          duration: 1000
        })
      } else {
        let query = {
          start: 0,
          size: 999,
          filterList: [],
          searchList: []
        }
        try {
          if (
            this.data.shoppingCartGetId.includes(
              info.defaultSaleMethodId
            )
          ) {
            wx.showToast({
              title: "添加成功",
              icon: 'success',
              title: "该商品已在购物车,请勿重复添加",
              icon: 'none',
              duration: 1000
            })
          } else {
            let query = {
              requests: [{
                saleMethodId: info.defaultSaleMethodId,
                storeEventId: null,
                agentCode: '电子书'
              }]
            }
            const addRes = await app.MG.store.addShoppingCart(query)
            if (addRes) {
              wx.showToast({
                title: "添加成功",
                icon: 'success',
                duration: 1000
              })
            }
            this.getShoppingCartList()
          }
          this.getShoppingCartList()
        } catch (error) {
          console.error('出错了:', error)
        }
      } catch (error) {
        console.error('出错了:', error)
      }
    }
  },
  onMoreGuide(e) {
    let type = e.currentTarget.dataset.info