瀏覽代碼

跳转tab改为返回~

release/210823_需求对对碰
王饶冀 3 年之前
父節點
當前提交
196ddd1ab8
共有 6 個文件被更改,包括 27 次插入5 次删除
  1. 9
    1
      components/tabbar/tabbar.js
  2. 3
    1
      pages/index/index.js
  3. 3
    1
      pages/msgModule/index.js
  4. 5
    0
      pages/myModule/index.js
  5. 5
    0
      pages/releaseModule/index.js
  6. 2
    2
      project.config.json

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

*/ */
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 })
// }
})
} }
} }
}) })

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

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) {

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

}, },
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({

+ 5
- 0
pages/myModule/index.js 查看文件

console.log(`------------------当前登录用户-----------------------`) console.log(`------------------当前登录用户-----------------------`)
} }
}, },
onShow(){
this.setData({
currentIndex: 3
})
},
// 前往登录页 // 前往登录页
goLogin(e) { goLogin(e) {
app.goLogin(); app.goLogin();

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

} }
this.getTags(); this.getTags();
}, },
onShow(){
this.setData({
currentIndex: 1
})
},
// 输入框输入 // 输入框输入
textareaInput(e) { textareaInput(e) {
let value = e.detail.value; let value = e.detail.value;

+ 2
- 2
project.config.json 查看文件

"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": []

Loading…
取消
儲存