litian
2024-07-22 f4e7324c27b7c6ecb824029e22a13541c5033ade
packageBookService/pages/bookServices/detail/components/testTree/index.js
@@ -1,7 +1,3 @@
const util = require("./components/util"); // 引入封装过的加载提示
import {
  loginInfo
} from "../../../../../../assets/js/login";
const app = getApp();
Component({
  properties: {
@@ -39,32 +35,12 @@
      });
    },
    goTest(e) {
      console.log(e, 234)
      const value = e.currentTarget.dataset;
      var myEventDetail = {
        value,
      };
      this.triggerEvent("goTest", myEventDetail);
    },
    // 跳转音视频播放器
    goPlayer(e) {
      // 检查登录状态
      const token = wx.getStorageSync(app.config.tokenKey);
      if (token) {
        const item = e.currentTarget.dataset.item;
        const parent = e.currentTarget.dataset.parent;
        console.log('item', item);
        const parentProductLinkPath = parent ?
          parent.productLinkPath :
          wx.getStorageSync("teachResourcesPath");
        const parentName = parent ? parent.name : "教学资源";
        let url;
        wx.navigateTo({
          url: `${url}?productLinkPath=${item.productLinkPath}&parentProductLinkPath=${parentProductLinkPath}&parentName=${parentName}&activeId=${item.id}&bookId=${this.properties.bookInfo.id}&bookName=${this.properties.bookInfo.name}&cmsId=${this.properties.bookInfo.rootCmsItemId}&formPath=${this.properties.tab}&applyState=${this.properties.applyState}&deadline=${this.properties.deadline}`,
        });
      }
    },
  },
});