瀏覽代碼

处理发布、消息页面登录拦截。小程序tabbar光标不变,并且点击返回也会回到上一个光标。

release/210823_需求对对碰
王饶冀 3 年之前
父節點
當前提交
fa40c40f8f
共有 3 個檔案被更改,包括 10 行新增10 行删除
  1. 9
    0
      components/tabbar/tabbar.js
  2. 1
    4
      pages/msgModule/index.js
  3. 0
    6
      pages/releaseModule/index.js

+ 9
- 0
components/tabbar/tabbar.js 查看文件

*/ */
methods: { methods: {
tabChange(e) { tabChange(e) {
if (e.detail.item.text == "发布需求" || e.detail.item.text == "消息") {
if (!app.globalData.customerId) {
app.goLogin();
this.setData({
currentIndex: this.data.currentIndex
})
return
}
}
const url = e.detail.item.pagePath; const url = e.detail.item.pagePath;
wx.redirectTo({ url }); wx.redirectTo({ url });
} }

+ 1
- 4
pages/msgModule/index.js 查看文件

}, },
onShow() { onShow() {
if (!app.globalData.customerId) {
app.goLogin();
return
}
const businessCommunicationCustomer = wx.getStorageSync('businessCommunicationCustomer') || null; const businessCommunicationCustomer = wx.getStorageSync('businessCommunicationCustomer') || null;
if (businessCommunicationCustomer) { if (businessCommunicationCustomer) {
this.setData({ this.setData({

+ 0
- 6
pages/releaseModule/index.js 查看文件

} }
this.getTags(); this.getTags();
}, },
onShow(){
if (!app.globalData.customerId) {
app.goLogin();
return
}
},
// 输入框输入 // 输入框输入
textareaInput(e) { textareaInput(e) {
let value = e.detail.value; let value = e.detail.value;

Loading…
取消
儲存