diff --git a/packages/product/talkwx.vue b/packages/product/talkwx.vue new file mode 100644 index 0000000..2edddee --- /dev/null +++ b/packages/product/talkwx.vue @@ -0,0 +1,172 @@ + + + + \ No newline at end of file diff --git a/pages.json b/pages.json index 698c8fb..d9c0827 100644 --- a/pages.json +++ b/pages.json @@ -56,6 +56,11 @@ "style": { "navigationBarTitleText": "铂金商品" } + }, { + "path": "product/talkwx", + "style": { + "navigationBarTitleText": "客服" + } }, { "path": "product/offline", "style": { diff --git a/pages/home/home.vue b/pages/home/home.vue index 11a67d8..39109c9 100644 --- a/pages/home/home.vue +++ b/pages/home/home.vue @@ -254,10 +254,9 @@ url = '/packages/myorder/myorder' } else if (index == 4) { url = '/packages/myorder/myorder' - } else if (index == 5) { - uni.setStorageSync('kfType','kf2') - uni.switchTab({ - url:'/pages/talk/talk' + } else if (index == 5) { + uni.navigateTo({ + url:'/packages/product/talkwx' }) } else if (index == 6) { url = '/packages/product/fresh' diff --git a/pages/talk/talk.vue b/pages/talk/talk.vue index 6c3a9d9..77fa9c3 100644 --- a/pages/talk/talk.vue +++ b/pages/talk/talk.vue @@ -44,21 +44,19 @@ }, data() { return { - img: '' + img: '', + kfType:'gzh' } }, onShow() { - const banner4 = uni.getStorageSync('banner4') ? uni.getStorageSync('banner4') : [] - const kfType = uni.getStorageSync('kfType') ? uni.getStorageSync('kfType') : 'gzh' + const banner4 = uni.getStorageSync('banner4') ? uni.getStorageSync('banner4') : [] if (banner4.length > 0) { banner4.map(item=>{ - if(item.type===kfType){ + if(item.type===this.kfType){ this.img = item.image } }) - uni.removeStorageSync('kfType') } - }, }