| @@ -48,6 +48,7 @@ Component({ | |||
| */ | |||
| methods: { | |||
| tabChange(e) { | |||
| console.log(e); | |||
| if (e.detail.item.text == "发布需求" || e.detail.item.text == "消息") { | |||
| if (!app.globalData.customerId) { | |||
| app.goLogin(); | |||
| @@ -58,7 +59,14 @@ Component({ | |||
| } | |||
| } | |||
| const url = e.detail.item.pagePath; | |||
| wx.redirectTo({ url }); | |||
| // wx.redirectTo({ url }); | |||
| wx.navigateTo({ | |||
| url, | |||
| // success: function (res) { | |||
| // // 通过eventChannel向被打开页面传送数据 | |||
| // res.eventChannel.emit('customerid', { customerid }) | |||
| // } | |||
| }) | |||
| } | |||
| } | |||
| }) | |||
| @@ -78,7 +78,9 @@ Page({ | |||
| onLoad() { | |||
| }, | |||
| onShow() { | |||
| // console.log(`会触发吗?`) | |||
| this.setData({ | |||
| currentIndex: 0 | |||
| }) | |||
| this.toSearch(); | |||
| const businessCommunicationCustomer = wx.getStorageSync('businessCommunicationCustomer') || null; | |||
| if (businessCommunicationCustomer) { | |||
| @@ -24,7 +24,9 @@ Page({ | |||
| }, | |||
| onShow() { | |||
| this.setData({ | |||
| currentIndex: 2 | |||
| }) | |||
| const businessCommunicationCustomer = wx.getStorageSync('businessCommunicationCustomer') || null; | |||
| if (businessCommunicationCustomer) { | |||
| this.setData({ | |||
| @@ -43,6 +43,11 @@ Page({ | |||
| console.log(`------------------当前登录用户-----------------------`) | |||
| } | |||
| }, | |||
| onShow(){ | |||
| this.setData({ | |||
| currentIndex: 3 | |||
| }) | |||
| }, | |||
| // 前往登录页 | |||
| goLogin(e) { | |||
| app.goLogin(); | |||
| @@ -44,6 +44,11 @@ Page({ | |||
| } | |||
| this.getTags(); | |||
| }, | |||
| onShow(){ | |||
| this.setData({ | |||
| currentIndex: 1 | |||
| }) | |||
| }, | |||
| // 输入框输入 | |||
| textareaInput(e) { | |||
| let value = e.detail.value; | |||
| @@ -24,7 +24,7 @@ | |||
| "lazyloadPlaceholderEnable": false, | |||
| "useMultiFrameRuntime": true, | |||
| "useApiHook": true, | |||
| "useApiHostProcess": true, | |||
| "useApiHostProcess": false, | |||
| "babelSetting": { | |||
| "ignore": [], | |||
| "disablePlugins": [], | |||
| @@ -45,7 +45,7 @@ | |||
| }, | |||
| "compileType": "miniprogram", | |||
| "libVersion": "2.18.1", | |||
| "appid": "wx4fdcd0cabdcd387b", | |||
| "appid": "wx20427d4c31790e40", | |||
| "projectname": "channel_business", | |||
| "debugOptions": { | |||
| "hidedInDevtools": [] | |||