diff --git a/custom-tab-bar/index.js b/custom-tab-bar/index.js index 6823f96..b3c4a44 100644 --- a/custom-tab-bar/index.js +++ b/custom-tab-bar/index.js @@ -50,13 +50,36 @@ Component({ } ] }) + } else if (ifStoreApp == 2) { + this.setData({ + list: [ + { + "pagePath": "/index/index", + "iconPath": "../assets/images/home.png", + "selectedIconPath": "../assets/images/home-a.png", + "text": "首页" + }, + { + "pagePath": "/index/searchbar", + "iconPath": "../assets/images/mendian.png", + "selectedIconPath": "../assets/images/mendian-a.png", + "text": "门店" + }, + { + "pagePath": "/index/user", + "iconPath": "../assets/images/user.png", + "selectedIconPath": "../assets/images/user-a.png", + "text": "我的" + } + ] + }) } }, methods: { switchTab(e) { - const data = e.currentTarget.dataset - const url = data.path - wx.switchTab({url}) + const data = e.currentTarget.dataset; + const url = data.path; + wx.switchTab({url}); this.setData({ selected: data.index }) diff --git a/ext.json b/ext.json index 302a6e6..843bda7 100644 --- a/ext.json +++ b/ext.json @@ -17,7 +17,7 @@ ], "configUrl": "https://c.malls.iformall.com/C/api", "etcpAppId": "wxc07f9d67923d676d", - "ifStoreApp": "0", + "ifStoreApp": "2", "etcpVersion": "release", "etcpCallbackUrl": "https://admin.malls.iformall.com/api/carCallback/etcpPaidCallback", "ifHaveWebSocket": "0", diff --git a/index/user.js b/index/user.js index 6b5b03c..5bfe8f1 100644 --- a/index/user.js +++ b/index/user.js @@ -134,6 +134,10 @@ Page({ that.getTabBar().setData({ selected: 1 }) + } else if(ifStoreApp == 2){ + that.getTabBar().setData({ + selected: 2 + }) }else{ that.getTabBar().setData({ selected: 3