From fba71ba1ae5030cb1a20f54f29fb06ad97060297 Mon Sep 17 00:00:00 2001 From: litian <C21AF165> Date: 星期五, 20 九月 2024 18:37:19 +0800 Subject: [PATCH] zs --- pages/digitalCourses/digitalCoursesDetails/index.js | 28 +++++++++++++++++----------- 1 files changed, 17 insertions(+), 11 deletions(-) diff --git a/pages/digitalCourses/digitalCoursesDetails/index.js b/pages/digitalCourses/digitalCoursesDetails/index.js index a795cee..6934b6b 100644 --- a/pages/digitalCourses/digitalCoursesDetails/index.js +++ b/pages/digitalCourses/digitalCoursesDetails/index.js @@ -103,7 +103,7 @@ rzzsImg: '', //璁よ瘉璇佷功base64 imageWidth: '', //鐢诲湪鐢诲竷涓婄殑鍥剧墖鐨勫搴� imageHeight: '', //鐢诲湪鐢诲竷涓婄殑鍥剧墖鐨勯珮搴� - website: 'https://jsek.bnuic.com', + website: 'https://jsek.bnuic.com/home/#/digitalCourses', }, formatDate(dateString) { if (!dateString) { @@ -174,9 +174,6 @@ this.digitalCoursesDetailsGet(options.id) this.getPlayerList() this.getType() - // this.setData({ - // userName: JSON.parse(wx.getStorageSync(app.config.userInfoKey)).name, - // }) }, /** @@ -190,6 +187,10 @@ * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鏄剧ず */ onShow() { + if (this.data.tabValue == 2) { + this.getPlayerList() + this.getResource() + } }, @@ -442,7 +443,8 @@ selectChange(event) { const value = event.target.dataset.value this.setData({ - selectActive: value + selectActive: value, + testCount: 0 }) this.getResource() }, @@ -481,7 +483,6 @@ res.datas.cmsDatas[0].datas.forEach((item) => { if (item.type == 'questionBankFolder' || item.type == 'questionBankItem') { test.push(item) - } else if (item.type != "resourceItem") { this.data.playerList.forEach(pItem => { if (pItem.cmsItemId == item.id) { @@ -493,9 +494,7 @@ if (item.type == 'productItem') { learnItemList.push(item) } - }) - if (this.data.selectActive === 'learn') { let list = [] // 娴嬭瘯 6浣�// 姝e紡 5浣�// 娴嬭瘯璋冪敤浼�20锛屽唴閮�7 姝e紡璋冪敤浼�17 鍐呴儴浼�6 @@ -514,6 +513,7 @@ learnList: list, openTeachids: result, }); + console.log(1, this.data.learnList, this.data.playerList) } } else { const data = test.filter( @@ -665,6 +665,7 @@ //鍦ㄧ嚎娴嬭瘯鑾峰彇鏈�鍚庝竴涓妭鐐规暟閲� countLeafNodes(tree) { + tree.forEach(node => { if (!node.children || node.children.length === 0) { this.setData({ @@ -831,7 +832,7 @@ Toast({ context: this, selector: "#t-toast", - message: "璇ヤ功宸插湪璐墿杞︼紝璇峰嬁閲嶅娣诲姞", + message: "璇ヨ绋嬪凡鍦ㄨ喘鐗╄溅锛岃鍕块噸澶嶆坊鍔�", theme: "warning", direction: "column", }); @@ -878,6 +879,7 @@ }) .then((res) => { if (res) { + this.digitalCoursesDetailsGet(this.data.digitalsData.id); wx.showToast({ title: "棰嗗彇鎴愬姛", icon: "none", @@ -934,7 +936,9 @@ }, ) .exec() - this.drawImage() + setTimeout(() => { + this.drawImage() + }, 500) query .select('#textCertificate') .fields({ @@ -953,7 +957,9 @@ }, ) .exec() - this.drawImage1() + setTimeout(() => { + this.drawImage1() + }, 500) }, drawImage() { let that = this; -- Gitblit v1.9.1