提交代码
This commit is contained in:
parent
96f7d6408e
commit
d0bed931e8
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
@ -399,7 +399,7 @@
|
|||
const curPages = getCurrentPages()[0]; // 获取当前页面实例
|
||||
if (typeof curPages.getTabBar === 'function' && curPages.getTabBar()) {
|
||||
this.$mp.page.getTabBar().setData({
|
||||
selected: 2
|
||||
selected: 3
|
||||
});
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -421,7 +421,7 @@
|
|||
const curPages = getCurrentPages()[0]; // 获取当前页面实例
|
||||
if (typeof curPages.getTabBar === 'function' && curPages.getTabBar()) {
|
||||
this.$mp.page.getTabBar().setData({
|
||||
selected: 3
|
||||
selected: 4
|
||||
});
|
||||
}
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user