闫增涛
2024-11-06 12e72812d28c95394a17ec495985d44aff1c77f7
文档资源查看优化
2个文件已修改
11 ■■■■ 已修改文件
assets/js/config.js 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageDomain/pages/resourceDetails/document/index.js 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
assets/js/config.js
@@ -5,8 +5,7 @@
// export const epubUrl = "http://182.92.203.7:3007/epubReadMobile/";
export const epubUrl = "https://jsek.bnuic.com/epubReadMobile/#/";
// export const pdfUrl = "http://182.92.203.7:3007/pdfRead/";
// const pdfUrl = "https://jsek.bnuic.com/pdfRead" // 正式
export const pdfUrl = "http://192.168.3.196:8080/pdfRead"
const pdfUrl = "https://jsek.bnuic.com/pdfRead" // 正式
export const requestTimeOut = 300000; // 请求超时时间
export const tokenKey = "jsek-token";
export const userInfoKey = "website-front-userInfo"; // 用户信息key
packageDomain/pages/resourceDetails/document/index.js
@@ -50,7 +50,6 @@
    wx.setNavigationBarTitle({
      title: '资源详情'
    });
    console.log(options);
    const systInfo = wx.getSystemInfoSync();
    const menu = wx.getMenuButtonBoundingClientRect(); // 胶囊信息
    const navBarHeight = (menu.top - systInfo.statusBarHeight) * 2 + menu.height; // 导航栏高度
@@ -105,7 +104,7 @@
    this.setData({
      pauseTime: Date.now()
    })
    if (wx.getStorageSync(app.config.tokenKey) && epubObj && epubObj.bookBuy) {
    if (wx.getStorageSync(app.config.tokenKey)) {
      let duration = this.data.pauseTime - this.data.startTime
      this.count(duration)
    }
@@ -118,7 +117,7 @@
    this.setData({
      pauseTime: Date.now()
    })
    if (wx.getStorageSync(app.config.tokenKey) && epubObj && epubObj.bookBuy) {
    if (wx.getStorageSync(app.config.tokenKey)) {
      let duration = this.data.pauseTime - this.data.startTime
      this.count(duration)
    }
@@ -195,7 +194,6 @@
      query.storeInfo = this.data.storeInfo
    }
    app.MG.store.getProductDetail(query).then((res) => {
      console.log(res);
      res.datas.cmsDatas[0].datas.forEach((item) => {
        if (this.data.productLinkPath == item.productLinkPath) {
          this.handleTeachData(item)
@@ -338,7 +336,6 @@
  handleTap: function () {
    const naturalResources = this.data.naturalResources;
    naturalResources.forEach(function (item) {
      // console.log(item);
    });
  },
@@ -375,7 +372,6 @@
    const {
      trigger
    } = e.detail;
    console.log(trigger);
    this.setData({
      visible: false,
    });