Переглянути джерело

跳转tab改为返回~

release/210823_需求对对碰
王饶冀 3 роки тому
джерело
коміт
196ddd1ab8

+ 9
- 1
components/tabbar/tabbar.js Переглянути файл

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

+ 3
- 1
pages/index/index.js Переглянути файл

@@ -78,7 +78,9 @@ Page({
onLoad() {
},
onShow() {
// console.log(`会触发吗?`)
this.setData({
currentIndex: 0
})
this.toSearch();
const businessCommunicationCustomer = wx.getStorageSync('businessCommunicationCustomer') || null;
if (businessCommunicationCustomer) {

+ 3
- 1
pages/msgModule/index.js Переглянути файл

@@ -24,7 +24,9 @@ Page({
},
onShow() {
this.setData({
currentIndex: 2
})
const businessCommunicationCustomer = wx.getStorageSync('businessCommunicationCustomer') || null;
if (businessCommunicationCustomer) {
this.setData({

+ 5
- 0
pages/myModule/index.js Переглянути файл

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

+ 5
- 0
pages/releaseModule/index.js Переглянути файл

@@ -44,6 +44,11 @@ Page({
}
this.getTags();
},
onShow(){
this.setData({
currentIndex: 1
})
},
// 输入框输入
textareaInput(e) {
let value = e.detail.value;

+ 2
- 2
project.config.json Переглянути файл

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

Завантаження…
Відмінити
Зберегти