提交代码

This commit is contained in:
zpc 2024-07-07 17:32:52 +08:00
parent 96f7d6408e
commit d0bed931e8
4 changed files with 28 additions and 4 deletions

View File

@ -20,7 +20,7 @@ Component({
"pagePath": "/pages/mall/index",
"iconPath": "/static/tabbar/m5.png",
"selectedIconPath": "/static/tabbar/s5.png",
"text": ""
"text": ""
},
{
"pagePath": "/pages/sangdai/sangdai",
@ -42,6 +42,7 @@ Component({
switchTab(e) {
const data = e.currentTarget.dataset
const url = data.path
console.log(e,data,url)
wx.switchTab({ url })
this.setData({
selected: data.index

View File

@ -2,4 +2,27 @@
<view>
123OL
</view>
</template>
</template>
<script>
export default {
data() {
return {
}
},
onShow() {
this.current = 0
const curPages = getCurrentPages()[0]; //
if (typeof curPages.getTabBar === 'function' && curPages.getTabBar()) {
this.$mp.page.getTabBar().setData({
selected: 2
});
}
},
methods: {
}
}
</script>

View File

@ -399,7 +399,7 @@
const curPages = getCurrentPages()[0]; //
if (typeof curPages.getTabBar === 'function' && curPages.getTabBar()) {
this.$mp.page.getTabBar().setData({
selected: 2
selected: 3
});
}
},

View File

@ -421,7 +421,7 @@
const curPages = getCurrentPages()[0]; //
if (typeof curPages.getTabBar === 'function' && curPages.getTabBar()) {
this.$mp.page.getTabBar().setData({
selected: 3
selected: 4
});
}
},