| | |
| | | ], |
| | | errState: '', |
| | | isShop: false, |
| | | boughtEquity: 0, |
| | | } |
| | | }, |
| | | onLoad() { |
| | |
| | | }, |
| | | success: function (res) { |
| | | _this.isShop = res?.data?.data?.isShop; |
| | | _this.boughtEquity = res?.data?.data?.boughtEquity; |
| | | uni.setStorageSync('ygxLogin', res.data.data) |
| | | console.log('isShop',_this.isShop) |
| | | console.log('res',res) |
| | |
| | | url:'/pages/about/about' |
| | | }) |
| | | }, |
| | | toHuishou(){ |
| | | const _this = this; |
| | | if(!_this.isShop){ |
| | | return |
| | | } |
| | | uni.request({ |
| | | url: _this.$webHost+'/api/v2/customer/ryxIsBuyEquity?phone='+_this.$util.getUserInfo().phone, |
| | | data:{ |
| | | customerId: uni.getStorageSync('ygxLogin').customerId, |
| | | appId: uni.getStorageSync('ygxLogin').appId |
| | | }, |
| | | success: function (res) { |
| | | if(res.data.code==200){ |
| | | uni.navigateTo( { |
| | | url: '/pages/quanshou/index' |
| | | }) |
| | | |
| | | } else { |
| | | _this.errState = res.data.data; |
| | | _this.$refs.comment.open() |
| | | |
| | | } |
| | | } |
| | | }) |
| | | |
| | | }, |
| | | toHuishou(){ |
| | | const _this = this; |
| | | if(!_this.isShop){ |
| | | return |
| | | } |
| | | if(_this.boughtEquity) { |
| | | uni.request({ |
| | | url: _this.$webHost+'/api/v2/customer/ryxIsBuyEquity?phone='+_this.$util.getUserInfo().phone, |
| | | data:{ |
| | | customerId: uni.getStorageSync('ygxLogin').customerId, |
| | | appId: uni.getStorageSync('ygxLogin').appId |
| | | }, |
| | | success: function (res) { |
| | | if(res.data.code==200){ |
| | | uni.navigateTo( { |
| | | url: '/pages/quanshou/index' |
| | | }) |
| | | } else { |
| | | _this.errState = res.data.data; |
| | | _this.$refs.comment.open() |
| | | } |
| | | } |
| | | }) |
| | | } else { |
| | | uni.navigateTo({ |
| | | url: '/pages/quanyi/index' |
| | | }) |
| | | } |
| | | }, |
| | | // 收藏+浏览记录 |
| | | goMenuPage(url) { |
| | | if (this.userInfo) { |