|
|
|
@ -14,7 +14,7 @@
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 菜单1 -->
|
|
|
|
<!-- 菜单1 -->
|
|
|
|
<view class="s-list">
|
|
|
|
<!-- <view class="s-list">
|
|
|
|
<view class="s-header">
|
|
|
|
<view class="s-header">
|
|
|
|
<view class="tit-box">
|
|
|
|
<view class="tit-box">
|
|
|
|
<text class="tit">我的订单</text>
|
|
|
|
<text class="tit">我的订单</text>
|
|
|
|
@ -33,13 +33,13 @@
|
|
|
|
<view class="title">{{item.name}}</view>
|
|
|
|
<view class="title">{{item.name}}</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</scroll-view>
|
|
|
|
</scroll-view>
|
|
|
|
</view>
|
|
|
|
</view> -->
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 菜单2 -->
|
|
|
|
<!-- 菜单2 -->
|
|
|
|
<view class="s-list">
|
|
|
|
<view class="s-list">
|
|
|
|
<view class="s-header">
|
|
|
|
<view class="s-header">
|
|
|
|
<view class="tit-box">
|
|
|
|
<view class="tit-box">
|
|
|
|
<text class="tit">其它服务</text>
|
|
|
|
<text class="tit">我的服务</text>
|
|
|
|
<view class="tit2">
|
|
|
|
<view class="tit2">
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
@ -321,43 +321,54 @@
|
|
|
|
};
|
|
|
|
};
|
|
|
|
},
|
|
|
|
},
|
|
|
|
onLoad() {
|
|
|
|
onLoad() {
|
|
|
|
this.getmember();
|
|
|
|
// this.getmember();
|
|
|
|
},
|
|
|
|
},
|
|
|
|
onShow() {
|
|
|
|
onShow() {
|
|
|
|
//判断登录,跳转去登录
|
|
|
|
//判断登录,跳转去登录
|
|
|
|
logindo();
|
|
|
|
logindo();
|
|
|
|
|
|
|
|
|
|
|
|
if(myCache("ifuserEdit"))
|
|
|
|
|
|
|
|
{
|
|
|
|
this.openId = myCache('openId');
|
|
|
|
myCache("ifuserEdit",false)
|
|
|
|
var user = myCache('userInfo');
|
|
|
|
this.getmember();
|
|
|
|
this.userid = user.userId? user.userId:'';
|
|
|
|
}
|
|
|
|
this.avatar = user.avatar?user.avatar:'../../static/image/logo.png';
|
|
|
|
else{
|
|
|
|
this.nickName= user.nickName? user.nickName:'';
|
|
|
|
this.openId = myCache('openId');
|
|
|
|
this.phone = user.phonenumber;
|
|
|
|
var user = myCache('userInfo');
|
|
|
|
this.signature = user.signature?user.signature:this.signature;
|
|
|
|
this.userid = user.userId? user.userId:'';
|
|
|
|
this.roleId=user.roleId?user.roleId:[];
|
|
|
|
this.avatar = user.avatar?user.avatar:'../../static/image/logo.png';
|
|
|
|
this.getmember();
|
|
|
|
this.nickName= user.nickName? user.nickName:'';
|
|
|
|
|
|
|
|
this.phone = user.phonenumber;
|
|
|
|
// if(myCache("ifuserEdit"))
|
|
|
|
// this.signature = user.signature?user.signature:this.signature;
|
|
|
|
// {
|
|
|
|
this.roleId=user.roleId?user.roleId:[];
|
|
|
|
// myCache("ifuserEdit",false)
|
|
|
|
}
|
|
|
|
// this.getmember();
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// else{
|
|
|
|
|
|
|
|
// this.openId = myCache('openId');
|
|
|
|
|
|
|
|
// var user = myCache('userInfo');
|
|
|
|
|
|
|
|
// this.userid = user.userId? user.userId:'';
|
|
|
|
|
|
|
|
// this.avatar = user.avatar?user.avatar:'../../static/image/logo.png';
|
|
|
|
|
|
|
|
// this.nickName= user.nickName? user.nickName:'';
|
|
|
|
|
|
|
|
// this.phone = user.phonenumber;
|
|
|
|
|
|
|
|
// this.signature = user.signature?user.signature:this.signature;
|
|
|
|
|
|
|
|
// this.roleId=user.roleId?user.roleId:[];
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
// 购物车数量
|
|
|
|
// // 购物车数量
|
|
|
|
var cartnum=getcartNum();
|
|
|
|
// var cartnum=getcartNum();
|
|
|
|
if(cartnum>0){
|
|
|
|
// if(cartnum>0){
|
|
|
|
// 底部菜单消息角标
|
|
|
|
// // 底部菜单消息角标
|
|
|
|
uni.setTabBarBadge({
|
|
|
|
// uni.setTabBarBadge({
|
|
|
|
//显示未读消息条数
|
|
|
|
// //显示未读消息条数
|
|
|
|
index: 4,
|
|
|
|
// index: 4,
|
|
|
|
text: cartnum+''
|
|
|
|
// text: cartnum+''
|
|
|
|
});
|
|
|
|
// });
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
else{
|
|
|
|
// else{
|
|
|
|
uni.removeTabBarBadge({
|
|
|
|
// uni.removeTabBarBadge({
|
|
|
|
index: 4
|
|
|
|
// index: 4
|
|
|
|
})
|
|
|
|
// })
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
var messageNum=getmessageNum();
|
|
|
|
var messageNum=getmessageNum();
|
|
|
|
console.log("messageNum",messageNum)
|
|
|
|
console.log("messageNum",messageNum)
|
|
|
|
@ -593,21 +604,21 @@
|
|
|
|
this.menus[3].num=0;
|
|
|
|
this.menus[3].num=0;
|
|
|
|
this.favoritesnum=0;// 我的收藏
|
|
|
|
this.favoritesnum=0;// 我的收藏
|
|
|
|
|
|
|
|
|
|
|
|
// 清空购物车
|
|
|
|
// // 清空购物车
|
|
|
|
var cartnum=getcartNum();
|
|
|
|
// var cartnum=getcartNum();
|
|
|
|
if(cartnum>0){
|
|
|
|
// if(cartnum>0){
|
|
|
|
// 底部菜单消息角标
|
|
|
|
// // 底部菜单消息角标
|
|
|
|
uni.setTabBarBadge({
|
|
|
|
// uni.setTabBarBadge({
|
|
|
|
//显示未读消息条数
|
|
|
|
// //显示未读消息条数
|
|
|
|
index: 4,
|
|
|
|
// index: 4,
|
|
|
|
text: cartnum+''
|
|
|
|
// text: cartnum+''
|
|
|
|
});
|
|
|
|
// });
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
else{
|
|
|
|
// else{
|
|
|
|
uni.removeTabBarBadge({
|
|
|
|
// uni.removeTabBarBadge({
|
|
|
|
index: 4
|
|
|
|
// index: 4
|
|
|
|
})
|
|
|
|
// })
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
// app清除角标的数量
|
|
|
|
// app清除角标的数量
|
|
|
|
clearBadgeNumber();
|
|
|
|
clearBadgeNumber();
|
|
|
|
@ -686,21 +697,21 @@
|
|
|
|
this.menus[3].num=0;
|
|
|
|
this.menus[3].num=0;
|
|
|
|
this.favoritesnum=0;// 我的收藏
|
|
|
|
this.favoritesnum=0;// 我的收藏
|
|
|
|
|
|
|
|
|
|
|
|
// 清空购物车
|
|
|
|
// // 清空购物车
|
|
|
|
var cartnum=getcartNum();
|
|
|
|
// var cartnum=getcartNum();
|
|
|
|
if(cartnum>0){
|
|
|
|
// if(cartnum>0){
|
|
|
|
// 底部菜单消息角标
|
|
|
|
// // 底部菜单消息角标
|
|
|
|
uni.setTabBarBadge({
|
|
|
|
// uni.setTabBarBadge({
|
|
|
|
//显示未读消息条数
|
|
|
|
// //显示未读消息条数
|
|
|
|
index: 4,
|
|
|
|
// index: 4,
|
|
|
|
text: cartnum+''
|
|
|
|
// text: cartnum+''
|
|
|
|
});
|
|
|
|
// });
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
else{
|
|
|
|
// else{
|
|
|
|
uni.removeTabBarBadge({
|
|
|
|
// uni.removeTabBarBadge({
|
|
|
|
index: 4
|
|
|
|
// index: 4
|
|
|
|
})
|
|
|
|
// })
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
// app清除角标的数量
|
|
|
|
// app清除角标的数量
|
|
|
|
clearBadgeNumber();
|
|
|
|
clearBadgeNumber();
|
|
|
|
|