结构调整
parent
fd9381765f
commit
e55bed7407
Binary file not shown.
|
After Width: | Height: | Size: 1.3 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 428 B |
Binary file not shown.
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 887 B |
Binary file not shown.
|
After Width: | Height: | Size: 313 B |
@ -1,97 +1,114 @@
|
|||||||
const app = getApp();
|
const app = getApp();
|
||||||
Component({
|
Component({
|
||||||
data: {
|
data: {
|
||||||
isShow: false,
|
isShow: false,
|
||||||
toTop: false,
|
toTop: false,
|
||||||
selected: 0,
|
selected: 0,
|
||||||
color: "#444",
|
color: "#444",
|
||||||
selectedColor: "#1890ff",
|
selectedColor: "#1890ff",
|
||||||
list: [
|
list: [
|
||||||
{
|
{
|
||||||
iconPath: "https://matripe-cms.oss-cn-beijing.aliyuncs.com/1shoudan/IOS/home.png",
|
iconPath: "https://matripe-cms.oss-cn-beijing.aliyuncs.com/1shoudan/IOS/home.png",
|
||||||
selectedIconPath: "https://matripe-cms.oss-cn-beijing.aliyuncs.com/1shoudan/IOS/home1.png",
|
selectedIconPath: "https://matripe-cms.oss-cn-beijing.aliyuncs.com/1shoudan/IOS/home1.png",
|
||||||
pagePath: "/pages/firstBill/index",
|
pagePath: "/pages/firstBill/index",
|
||||||
text: "首页",
|
text: "首页",
|
||||||
index: 0,
|
index: 0,
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
iconPath: "https://matripe-cms.oss-cn-beijing.aliyuncs.com/1shoudan/IOS/ksbm.svg",
|
// iconPath: "https://matripe-cms.oss-cn-beijing.aliyuncs.com/1shoudan/IOS/ksbm.svg",
|
||||||
selectedIconPath: "https://matripe-cms.oss-cn-beijing.aliyuncs.com/1shoudan/IOS/ksbm.svg",
|
// selectedIconPath: "https://matripe-cms.oss-cn-beijing.aliyuncs.com/1shoudan/IOS/ksbm.svg",
|
||||||
pagePath: "/pages/newEnroll/enroll/index",
|
// pagePath: "/pages/newEnroll/enroll/index",
|
||||||
// text: "消息",
|
// text: "消息",
|
||||||
index: 1,
|
// index: 1,
|
||||||
},
|
// },
|
||||||
{
|
{
|
||||||
iconPath: "https://matripe-cms.oss-cn-beijing.aliyuncs.com/1shoudan/IOS/wd.png",
|
"iconPath": "../assets/images/apply.png",
|
||||||
selectedIconPath: "https://matripe-cms.oss-cn-beijing.aliyuncs.com/1shoudan/IOS/wd1.png",
|
"selectedIconPath": "../assets/images/apply1.png",
|
||||||
pagePath: "/pages/mine/index",
|
"pagePath": "/pages/myBill/index",
|
||||||
text: "我的",
|
"text": "工单",
|
||||||
index: 2,
|
index: 1,
|
||||||
},
|
},
|
||||||
],
|
{
|
||||||
},
|
"iconPath": "../assets/images/xx.png",
|
||||||
lifetimes: {
|
"selectedIconPath": "../assets/images/xx1_lao.png",
|
||||||
show: function () {
|
"pagePath": "/pages/message/index",
|
||||||
// 页面被展示
|
"text": "消息",
|
||||||
console.log("tabbar show");
|
index: 2,
|
||||||
},
|
},
|
||||||
attached: function () {
|
|
||||||
// 在组件实例进入页面节点树时执行
|
|
||||||
console.log("tabbar attached");
|
{
|
||||||
},
|
iconPath: "https://matripe-cms.oss-cn-beijing.aliyuncs.com/1shoudan/IOS/wd.png",
|
||||||
detached: function () {
|
selectedIconPath: "https://matripe-cms.oss-cn-beijing.aliyuncs.com/1shoudan/IOS/wd1.png",
|
||||||
// 在组件实例被从页面节点树移除时执行
|
pagePath: "/pages/mine/index",
|
||||||
},
|
text: "我的",
|
||||||
},
|
index: 3,
|
||||||
methods: {
|
},
|
||||||
switchTab(e) {
|
],
|
||||||
const data = e.currentTarget.dataset;
|
},
|
||||||
const url = data.path;
|
lifetimes: {
|
||||||
wx.vibrateShort({
|
show: function () {
|
||||||
type: "heavy",
|
// 页面被展示
|
||||||
success: function (e) {
|
console.log("tabbar show");
|
||||||
console.log(e);
|
},
|
||||||
},
|
attached: function () {
|
||||||
});
|
// 在组件实例进入页面节点树时执行
|
||||||
|
console.log("tabbar attached");
|
||||||
|
},
|
||||||
|
detached: function () {
|
||||||
|
// 在组件实例被从页面节点树移除时执行
|
||||||
|
},
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
switchTab (e) {
|
||||||
|
const data = e.currentTarget.dataset;
|
||||||
|
const url = data.path;
|
||||||
|
wx.vibrateShort({
|
||||||
|
type: "heavy",
|
||||||
|
success: function (e) {
|
||||||
|
console.log(e);
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
if (data.index == 0 && this.data.selected == 0) {
|
if (data.index == 0 && this.data.selected == 0) {
|
||||||
if(this.data.toTop){
|
if (this.data.toTop) {
|
||||||
app.globalData.toTop = 1;
|
app.globalData.toTop = 1;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
app.globalData.refresh = 1
|
app.globalData.refresh = 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!app.globalData.isLogin) {
|
// if (!app.globalData.isLogin) {
|
||||||
if (data.index == 1) {
|
// if (data.index == 1) {
|
||||||
wx.navigateTo({
|
// wx.navigateTo({
|
||||||
url: "/pages/login/index",
|
// url: "/pages/login/index",
|
||||||
});
|
// });
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
} else {
|
// }
|
||||||
if (data.index == 1) {
|
// else {
|
||||||
if (app.globalData.loginUserInfo.agencyStatus != 1) {
|
// if (data.index == 1) {
|
||||||
wx.navigateTo({
|
// if (app.globalData.loginUserInfo.agencyStatus != 1) {
|
||||||
url: "/pages/tobeAgency/index",
|
// wx.navigateTo({
|
||||||
});
|
// url: "/pages/tobeAgency/index",
|
||||||
} else {
|
// });
|
||||||
wx.navigateTo({
|
// } else {
|
||||||
url,
|
// wx.navigateTo({
|
||||||
});
|
// url,
|
||||||
// wx.redirectTo({});
|
// });
|
||||||
}
|
// // wx.redirectTo({});
|
||||||
return;
|
// }
|
||||||
}
|
// return;
|
||||||
}
|
// }
|
||||||
// this.setData({
|
// }
|
||||||
// selected: data.index,
|
// this.setData({
|
||||||
// });
|
// selected: data.index,
|
||||||
wx.switchTab({ url });
|
// });
|
||||||
},
|
wx.switchTab({ url });
|
||||||
touchMove(){
|
},
|
||||||
|
touchMove () {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
Reference in New Issue