闫增涛
2025-03-31 04c7b0163caeae4ab1c5da62e301fa993101cfad
bug修改
15个文件已修改
275 ■■■■■ 已修改文件
packageBookService/pages/bookServices/detail/components/learnResource/learnResource.js 25 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageBookService/pages/bookServices/detail/components/note/note.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageBookService/pages/bookServices/detail/components/testResource/testResource.js 19 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageBookService/pages/bookServices/detail/components/tree/index.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageBookService/pages/bookServices/detail/index.js 25 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageBookService/pages/bookServices/detail/index.wxml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageDomain/pages/publickBookForm/index.js 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageDomain/pages/resourceDetails/document/index.js 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageDomain/pages/resourceDetails/myVideo/index.js 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageDomain/pages/sampleBookList/index.js 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageDomain/pages/teacherCertification/index.js 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/bibliographyList/index.js 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/cart/index.js 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/personalCenter/index.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/study/index.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageBookService/pages/bookServices/detail/components/learnResource/learnResource.js
@@ -2,6 +2,7 @@
import {
  loginInfo
} from "../../../../../../assets/js/login";
const app = getApp()
Component({
  /**
   * 组件的属性列表
@@ -57,13 +58,6 @@
    },
    // 跳转资源购买页
    goBuyResource() {
      const token = wx.getStorageSync(app.config.tokenKey);
      if (token) {
        gotoPageFun()
      } else {
        loginInfo(app, (data) => {
        })
      }
      const gotoPageFun = () => {
        if (!this.properties.isGoBuyResource) {
          return wx.showToast({
@@ -74,6 +68,12 @@
        wx.navigateTo({
          url: `/packageBookService/pages/bookServices/detail/buyResource/index?productLinkPath=${this.properties.buyResourceData.productLinkPath}&refCode=${this.properties.buyResourceData.refCode}&bookId=${this.properties.bookId}`,
        })
      }
      const token = wx.getStorageSync(app.config.tokenKey);
      if (token) {
        gotoPageFun()
      } else {
        loginInfo(app, (data) => {})
      }
    },
@@ -88,6 +88,11 @@
      })
    },
    goLearnTask() {
      const gotoPageFun = () => {
        wx.navigateTo({
          url: `/packageBookService/pages/bookServices/detail/components/learnTask/index?bookId=${this.properties.bookId}&cmsPath=${this.properties.learnTaskData?.productLinkPath}`,
        })
      }
      const token = wx.getStorageSync(app.config.tokenKey);
      if (token) {
        gotoPageFun()
@@ -96,11 +101,7 @@
          if (data) gotoPageFun()
        })
      }
      const gotoPageFun = () => {
        wx.navigateTo({
          url: `/packageBookService/pages/bookServices/detail/components/learnTask/index?bookId=${this.properties.bookId}&cmsPath=${this.properties.learnTaskData?.productLinkPath}`,
        })
      }
    },
    buyCloudLearnClass() {
      var myEventDetail = {} // detail对象,提供给事件监听函数
packageBookService/pages/bookServices/detail/components/note/note.js
@@ -18,8 +18,7 @@
   * 组件的初始数据
   */
  data: {
    inputStyle:
      "border: 2rpx solid rgba(220,220,220,1);border-radius: 12rpx; padding:16rpx",
    inputStyle: "border: 2rpx solid rgba(220,220,220,1);border-radius: 12rpx; padding:16rpx",
    placeholderstyle: "font-size:28rpx",
    flag: false, // 输入框是否显示
    submitType: "new", //  新建 or 编辑
@@ -68,6 +67,7 @@
    },
    openDialog() {
      loginInfo(app, (data) => {})
      if (data)
      this.setData({
        submitTitle: this.properties.bookInfo.name,
        showNoteDialog: true,
packageBookService/pages/bookServices/detail/components/testResource/testResource.js
@@ -148,15 +148,6 @@
      }
    },
    goMycollect(e) {
      const answertype = e.currentTarget.dataset.answertype;
      const token = wx.getStorageSync("jsek-token");
      if (token) {
        gotoPage()
      } else {
        loginInfo(app, (data) => {
          if (data) gotoPage()
        })
      }
      const gotoPage = () => {
        wx.navigateTo({
          url: `/packageBookService/pages/bookServices/examination/examination?bookId=${
@@ -166,6 +157,16 @@
          }&answerType=${answertype}`,
        });
      }
      const answertype = e.currentTarget.dataset.answertype;
      const token = wx.getStorageSync("jsek-token");
      if (token) {
        gotoPage()
      } else {
        loginInfo(app, (data) => {
          if (data) {}
        })
      }
    },
    // 练习 组件切换
    onRadioChange(e) {
packageBookService/pages/bookServices/detail/components/tree/index.js
@@ -261,7 +261,7 @@
      const token = wx.getStorageSync(app.config.tokenKey);
      if (!token && this.data.tab != 'jsek_teachingResources') {
        loginInfo(app, (data) => {
          if (data) goPlayerFun()
          if (data) {}
        })
      } else {
        goPlayerFun()
packageBookService/pages/bookServices/detail/index.js
@@ -301,6 +301,7 @@
    }
    this.setData({
      num: Number(this.data.paperBookList.length) + Number(this.data.electronicBookList.length),
      editDialog: false
    });
    if (this.data.bookDetail.id) {
      this.getBookInfo(this.data.bookDetail.id)
@@ -771,7 +772,11 @@
      editDialog: true
    })
  },
  closeEditDialog() {
    this.setData({
      editDialog: false
    })
  },
  // 我要建议
  suggestBtn() {
    // 检查登录状态
@@ -2099,12 +2104,6 @@
  },
  // 购买组卷
  buyMock() {
    const token = wx.getStorageSync(app.config.tokenKey);
    if (token) {
      buyMockFun()
    } else {
      this.logInFun(() => {})
    }
    const buyMockFun = async () => {
      let res;
      if (!this.data.mockData.id)
@@ -2153,6 +2152,13 @@
        console.log(error);
      }
    }
    const token = wx.getStorageSync(app.config.tokenKey);
    if (token) {
      buyMockFun()
    } else {
      this.logInFun(() => {})
    }
  },
  // 记录购买组卷时间
  recordBuyMock() {
@@ -2679,9 +2685,14 @@
  //去样书申请单
  goApply() {
    const token = wx.getStorageSync(app.config.tokenKey);
    if (token) {
    wx.navigateTo({
      url: "/packageDomain/pages/sampleBookList/applicationForm/index",
    });
    } else {
      this.logInFun(() => {})
    }
  },
  handleTree() {
    // const child = this.selectComponent('#teach-tree')
packageBookService/pages/bookServices/detail/index.wxml
@@ -352,7 +352,7 @@
    </movable-view>
  </movable-area>
  <!-- 联系编辑弹窗 -->
  <t-dialog visible="{{editDialog}}" close-btn>
  <t-dialog visible="{{editDialog}}" close-btn bind:close="closeEditDialog">
    <view slot="content" class="editContent">
      <view class="editText">图书编辑:{{bookDetail.bookEditor}}</view>
      <view class="editText">联系方式:{{bookDetail.contactInformation}}</view>
packageDomain/pages/publickBookForm/index.js
@@ -43,12 +43,6 @@
   * 生命周期函数--监听页面加载
   */
  onLoad() {
    const token = wx.getStorageSync(app.config.tokenKey)
    if (!token) {
      loginInfo(app, (data) => {
        if (data) {}
      })
    } else {}
    this.getType()
  },
@@ -63,7 +57,16 @@
   * 生命周期函数--监听页面显示
   */
  onShow() {
    const token = wx.getStorageSync(app.config.tokenKey)
    if (!token) {
      loginInfo(app, (data) => {
        if (data) {} else {
          wx.switchTab({
            url: '/pages/home/home',
          })
        }
      })
    } else {}
  },
  /**
packageDomain/pages/resourceDetails/document/index.js
@@ -333,19 +333,14 @@
        isBuy: res.datas.purchasedSaleMethodIdList.includes(res.datas.defaultSaleMethodId)
      })
      res.datas.cmsDatas[0].datas.forEach((item) => {
        // if (this.data.productLinkPath == item.productLinkPath) {
        //   this.handleTeachData(item)
        //   this.setData({
        //     titleName: item.name,
        //     selectType: item.selectType,
        //     learnSelectType: item.learnSelectType
        //   })
        // } else {
        //   return wx.showToast({
        //     icon: 'none',
        //     title: '暂无资源',
        //   })
        // }
        if (this.data.productLinkPath == item.productLinkPath) {
          this.handleTeachData(item)
          this.setData({
            titleName: item.name,
            selectType: item.selectType,
            learnSelectType: item.learnSelectType
          })
        }
        if (this.data.storeInfo == 'jsek_digitalCourses') {
          if (this.data.isBuy) {
            if (this.data.productLinkPath == item.productLinkPath) {
@@ -415,13 +410,13 @@
          learnSelectType: item.learnSelectType,
        })
      } else {
        wx.showToast({
          icon: 'none',
          title: '请先返回资源所在图书详情购买视频资源',
        })
        wx.navigateTo({
          url: `/packageBookService/pages/bookServices/detail/index?id=${this.data.bookDetail.id}&name=${this.data.bookDetail.name}&tabValue=jsek_cloudLearning`,
        });
        // wx.showToast({
        //   icon: 'none',
        //   title: '请先返回资源所在图书详情购买视频资源',
        // })
        // wx.navigateTo({
        //   url: `/packageBookService/pages/bookServices/detail/index?id=${this.data.bookDetail.id}&name=${this.data.bookDetail.name}&tabValue=jsek_cloudLearning`,
        // });
      }
    })
  },
packageDomain/pages/resourceDetails/myVideo/index.js
@@ -438,7 +438,6 @@
                showData: app.config.requestCtx + '/file/api/ApiDownloadForAuthorize?md5=' + file + '&token=' + wx.getStorageSync(app.config.tokenKey),
                titleName: items.name
              })
              debugger
              this.aliVod(file, this.data.showData)
            } else {
              this.setData({
@@ -865,17 +864,21 @@
  },
  // 判断当前点击的数据是否购买
  cmsItemIsBuy(item) {
    // 1.this.data.buyIdList 上是否有 cmsItem的linkpath里的id
    const linkData = item.productLinkInfo.find(citem => citem.LinkType == 'Link' && citem.CmsItemId == item.id)
    let linkids = []
    try {
      linkids = linkData.LinkPath.split('\\')
    } catch (error) {}
    if (!this.data.buyIdList.length) return false
    const flag = linkids.some(citem => {
      return this.data.buyIdList.includes(Number(citem))
    })
    console.log(linkids, flag);
    let flag = false
    // 买了
    if (this.data.buyList.length) {
      if (this.data.buyList.some(citem => item.productLinkPath.includes(citem.productLinkPath)))
        flag = true
    } else {
      // 没买且无销售方式
      if (!item.saleMethod.length) {
        flag = true
      } else {
        // 没买且销售方式过期//没买,销售方式价格为0
        const itemSaleMethod = item.saleMethod.find(citem => citem.SaleType == 'Normal')
        if (new Date().getTime() > new Date(itemSaleMethod.EndDate).getTime() || itemSaleMethod.Price == 0) flag = true
      }
    }
    return flag
  }
})
packageDomain/pages/sampleBookList/index.js
@@ -142,21 +142,7 @@
    // 检查登录状态
    const token = wx.getStorageSync(app.config.tokenKey)
    if (!token) {
      loginInfo(app, (data) => {
        if (data) {
          that.setData({
            userInfo: JSON.parse(wx.getStorageSync(app.config.userInfoKey))
          })
          that.getAlreadyPBookList()
          that.getAlreadyEBookList()
          // 获取申请次数
          that.getSelectPaperBookCount()
          that.getSelectBookCount()
        }
      })
    } else {
    if (token) {
      that.setData({
        userInfo: JSON.parse(wx.getStorageSync(app.config.userInfoKey))
      })
@@ -181,16 +167,24 @@
   */
  onShow() {
    let that = this;
    // that.setData({
    //   page: 1,
    //   paperBookList: [],
    //   electronicBookList: []
    // })
    const token = wx.getStorageSync(app.config.tokenKey)
    if (!token) {
      loginInfo(app, (data) => {
        if (data) {
          that.setData({
            userInfo: JSON.parse(wx.getStorageSync(app.config.userInfoKey))
          })
    that.getAlreadyPBookList()
    that.getAlreadyEBookList()
    // 获取申请次数
    that.getSelectPaperBookCount()
    that.getSelectBookCount()
        } else {
          wx.switchTab({
            url: '/pages/home/home',
          })
        }
      })
    }
    if (wx.getStorageSync("paperBookList") || wx.getStorageSync("electronicBookList")) {
      if (wx.getStorageSync("paperBookList")) {
        that.setData({
packageDomain/pages/teacherCertification/index.js
@@ -57,17 +57,7 @@
    //获取职称
    this.getpositionalTitle();
    this.getAgreement();
    // 检查登录状态
    const token = wx.getStorageSync(app.config.tokenKey)
    if (!token) {
      loginInfo(app, (data) => {
        if (data) {
          this.getUserRole()
        }
      })
    } else {
      this.getUserRole()
    }
  },
  /**
@@ -81,6 +71,21 @@
   * 生命周期函数--监听页面显示
   */
  onShow() {
    // 检查登录状态
    const token = wx.getStorageSync(app.config.tokenKey)
    if (!token) {
      loginInfo(app, (data) => {
        if (data) {
          this.getUserRole()
        } else {
          wx.switchTab({
            url: '/pages/home/home',
          })
        }
      })
    } else {
      this.getUserRole()
    }
  },
pages/bibliographyList/index.js
@@ -70,6 +70,10 @@
        });
      },
    })
    const token = wx.getStorageSync(app.config.tokenKey)
    if (token) {
      this.getUserInfo()
    }
  },
  /**
@@ -84,17 +88,7 @@
   */
  onShow() {
    // console.log(this.data.value);
    // 检查登录状态
    const token = wx.getStorageSync(app.config.tokenKey)
    if (!token) {
      loginInfo(app, (data) => {
        if (data) {
          this.getUserInfo()
        }
      })
    } else {
      this.getUserInfo()
    }
  },
  /**
@@ -454,10 +448,25 @@
  mailbox(e) {
    const key = e.currentTarget.dataset.key;
    const item = e.currentTarget.dataset.item;
    // 检查登录状态
    const token = wx.getStorageSync(app.config.tokenKey)
    if (!token) {
      loginInfo(app, (data) => {
        if (data) {
          this.getUserInfo()
    this.setData({
      Md5: item.datas.freeFile.FileList[0].Md5,
      dialogBox: true
    })
        } else {}
      })
    } else {
      this.setData({
        Md5: item.datas.freeFile.FileList[0].Md5,
        dialogBox: true
      })
    }
    // wx.scanCode({
    //   success: res => {
    //     console.log(res); 
pages/cart/index.js
@@ -33,12 +33,21 @@
    wx.setNavigationBarTitle({
      title: '购物车'
    });
    this.shoppingCartGet();
    // this.shoppingCartGet();
    this.setData({
      swipeOpened: true
    })
  },
  onShow() {
    loginInfo(app, (data) => {
      if (data) {
        this.shoppingCartGet();
      } else {
        wx.switchTab({
          url: '/pages/home/home',
        })
      }
    })
    this.setData({
      swipeOpened: false
    })
@@ -47,7 +56,6 @@
        active: 3
      })
    }
    this.shoppingCartGet();
    this.setData({
      totalPrice: 0.00,
      selectedCount: 0,
@@ -216,12 +224,7 @@
    });
  },
  goPaymentPage() {
    // 首页测试登录功能,后续注释
    // 检查登录状态
    const token = wx.getStorageSync(app.config.tokenKey)
pages/personalCenter/index.js
@@ -170,6 +170,10 @@
          });
          this.getUserInfo()
          this.getIntegral()
        } else {
          wx.switchTab({
            url: '/pages/home/home',
          })
        }
      })
    } else {
pages/study/index.js
@@ -64,6 +64,10 @@
          this.getStaticsSum();
          this.getDataList(false);
          this.getListCount()
        } else {
          wx.switchTab({
            url: '/pages/home/home',
          })
        }
      })
    } else {