const util = require("./components/util"); // 引入封装过的加载提示 import { loginInfo } from "../../../../../../assets/js/login"; const app = getApp(); Component({ properties: { treeList: { type: Array, value: [], }, bookInfo: { type: Object, value: {}, }, tab: { type: String, value: "", }, openIds: { type: Array, value: [], }, }, data: {}, ready() {}, onLoad() { console.log(this.properties.openIds, "1111") }, methods: { // 节点展开 handleChange(e) { console.log(e, 123) this.setData({ openIds: e.detail.value, }); }, 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}`, }); } }, }, });