From c192e381734b9caf173c90bb9141dff0326785ee Mon Sep 17 00:00:00 2001 From: QYF-GitLab1 <1940665526@qq.com> Date: 星期四, 17 七月 2025 14:20:11 +0800 Subject: [PATCH] 京师智教小程序的专题活动模块 不做点击进入页面提示复制链接 点击时直接提示“请移步PC端查看” --- custom-tab-bar/index.js | 11 ++++------- 1 files changed, 4 insertions(+), 7 deletions(-) diff --git a/custom-tab-bar/index.js b/custom-tab-bar/index.js index aa4b9cd..edef97d 100644 --- a/custom-tab-bar/index.js +++ b/custom-tab-bar/index.js @@ -1,18 +1,15 @@ import TabMenu from './data'; Component({ data: { - selected: 0, + active: 0, list: TabMenu, }, methods: { changeTab(item) { - this.setData({ - selected: item.currentTarget.dataset.num - }) wx.switchTab({ - url: this.data.list[this.data.selected].url.startsWith('/') ? - this.data.list[this.data.selected].url : `/${this.data.list[this.data.selected].url}`, + url: this.data.list[item.currentTarget.dataset.num].url.startsWith('/') ? + this.data.list[item.currentTarget.dataset.num].url : `/${this.data.list[item.currentTarget.dataset.num].url}`, }); } }, -}); +}); \ No newline at end of file -- Gitblit v1.9.1