From 366de5b4636679392a1e3d2984fc23bd5eaa5ac3 Mon Sep 17 00:00:00 2001 From: litian <C21AF165> Date: 星期二, 27 八月 2024 17:48:03 +0800 Subject: [PATCH] wenti --- pages/home/home.js | 60 ++++++++++++++++++++++++++++++++++-------------------------- 1 files changed, 34 insertions(+), 26 deletions(-) diff --git a/pages/home/home.js b/pages/home/home.js index 7df68cf..b6977fe 100644 --- a/pages/home/home.js +++ b/pages/home/home.js @@ -27,6 +27,7 @@ activeItem: 0, //绮鹃�夎绋嬮粯璁ら�変腑 courseTypeList: [], //绮鹃�夎绋嬪垎绫� courseList: [], + courseTypeActive: [], bookTypeList: [], //鍥句功绫诲瀷 activeItem1: 0, bookTypeData: {}, @@ -73,7 +74,7 @@ } else { // 濡傛灉鏄涓�娆$櫥褰曪紝浼氳烦杞嚦缁戝畾鐢ㄦ埛淇℃伅椤甸潰锛屽~鍐欏畬鐢ㄦ埛淇℃伅鍚庤繘琛岀櫥褰曞苟鍌ㄥ瓨token鍜岀敤鎴蜂俊鎭紝缁撴潫鍚庤烦杞洖褰撳墠椤甸潰锛堟惡甯﹂〉闈㈠弬鏁帮級 } - + this.registe() this.init(); }, onReachBottom() {}, @@ -98,6 +99,12 @@ 'baseRefresh.value': false, }) }, 500); + }, + + registe() { + app.MG.app.creatUserBehavior({ + refCode: "sign" + }).then(res => {}); }, getBannerList() { @@ -271,7 +278,8 @@ tabChangeHandle(item) { let info = this.data.courseTypeList[item.detail.value] this.setData({ - courseList: [] + courseList: [], + courseTypeActive: item.detail.value }) this.getCourseList(info) }, @@ -438,24 +446,19 @@ }); }, goSubjectDetail(e) { - const { - book - } = e.currentTarget.dataset; - wx.showToast({ - title: "寤鸿涓�", - icon: 'none', - duration: 1000 - }) + const item = e.currentTarget.dataset.book + console.log(item); + wx.navigateTo({ + url: '/pages/specialDiscussion/webView/index?link=' + item.jsek_link + }); }, goCourseDetail(e) { const { book } = e.currentTarget.dataset; - wx.showToast({ - title: "寤鸿涓�", - icon: 'none', - duration: 1000 - }) + wx.navigateTo({ + url: '/pages/digitalCourses/digitalCoursesDetails/index?id=' + book.id, + }); }, goReadBookDetail(e) { const { @@ -469,11 +472,9 @@ const { book } = e.currentTarget.dataset; - wx.showToast({ - title: "寤鸿涓�", - icon: 'none', - duration: 1000 - }) + wx.navigateTo({ + url: '/pages/digitalTextbooks/digitalTextbooksDetails/index?id=' + book.id, + }); }, @@ -498,12 +499,6 @@ const { info } = e.currentTarget.dataset; - wx.showToast({ - title: "寤鸿涓�", - icon: 'none', - duration: 1000 - }) - return; if (wx.getStorageSync(app.config.tokenKey)) { let query = { start: 0, @@ -581,6 +576,19 @@ wx.navigateTo({ url: '/pages/home/digitalRead/index' }) + } else if (type == "zhuantitaolun") { + wx.navigateTo({ + url: '/pages/specialDiscussion/index' + }) + + } else if (type == "jingxuankecheng") { + wx.navigateTo({ + url: '/pages/digitalCourses/index?courseTypeActive=' + this.data.courseTypeActive + }) + } else if (type == "shuzijiaocai") { + wx.navigateTo({ + url: '/pages/digitalTextbooks/index' + }) } else { wx.showToast({ title: "寤鸿涓�", -- Gitblit v1.9.1