|
@@ -212,26 +212,27 @@
|
|
|
},
|
|
|
onShow() {
|
|
|
let self = this;
|
|
|
- //根据用户类别跳转 ()
|
|
|
- // uni.getStorage({
|
|
|
- // key : 'userInfo',
|
|
|
- // success:function(res){
|
|
|
- // // console.log('userInfo customerType',res.data.customerType);
|
|
|
- // if(res.data.customerType =='1'){
|
|
|
- // // console.log('个人用户');
|
|
|
- // uni.setTabBarItem({
|
|
|
- // index: 1,
|
|
|
- // text: '普惠商城',
|
|
|
- // iconPath: '/static/img/icon_mall.png',
|
|
|
- // selectedIconPath: '/static/img/icon_mall_active.png',
|
|
|
- // pagePath: '/pages/mall/mall'
|
|
|
- // });
|
|
|
- // self.buyNowText = '立即购碳'
|
|
|
- // }else{
|
|
|
- // self.rankTab(2);
|
|
|
- // };
|
|
|
- // }
|
|
|
- // });
|
|
|
+ //判断用户类别
|
|
|
+ uni.getStorage({
|
|
|
+ key : 'userInfo',
|
|
|
+ success:function(res){
|
|
|
+ console.log('userInfo customerType',res.data.customerType);
|
|
|
+ if(res.data.customerType =='1'){
|
|
|
+ // console.log('个人用户');
|
|
|
+ // uni.setTabBarItem({
|
|
|
+ // index: 1,
|
|
|
+ // text: '普惠商城',
|
|
|
+ // iconPath: '/static/img/icon_mall.png',
|
|
|
+ // selectedIconPath: '/static/img/icon_mall_active.png',
|
|
|
+ // pagePath: '/pages/mall/mall'
|
|
|
+ // });
|
|
|
+ self.buyNowText = '立即购碳'
|
|
|
+ }else{
|
|
|
+ self.buyNowText = '立即认购'
|
|
|
+ self.rankTab(2);
|
|
|
+ };
|
|
|
+ }
|
|
|
+ });
|
|
|
},
|
|
|
onLoad() {
|
|
|
this.thetoken = 'Bearer' + ' ' + this.$store.state.token;
|
|
@@ -297,6 +298,11 @@
|
|
|
},
|
|
|
//开启多株购碳
|
|
|
randomPop() {
|
|
|
+ //登录判断
|
|
|
+ if(!this.$store.state.hasLogin){
|
|
|
+ this.$api.msg('请先登录');
|
|
|
+ return;
|
|
|
+ };
|
|
|
this.modal.visibleModal = true;
|
|
|
this.$nextTick(res => {
|
|
|
// console.log('this.$refs',this.$refs.quickBuy)
|