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