| | |
| | | async mounted() { |
| | | await this.$onLaunched |
| | | //等待登录成功 |
| | | this.userInfor = JSON.parse(uni.getStorageSync('userInfor') || 'null') |
| | | this.userInfor = JSON.parse(uni.getStorageSync('userInfor') || null) |
| | | console.log('详情页的用户信息', this.userInfor) |
| | | if (this.option.type === 'share' && this.userInfor) { |
| | | if (this.option.type === 'share') { |
| | | if (this.userInfor) { |
| | | let params = { |
| | | allocationNum: this.basicInfor.allocationNum, |
| | | userId: this.userInfor.userId |
| | |
| | | console.log('获取失败的信息params', params) |
| | | }) |
| | | } else { |
| | | uni.showModal({ |
| | | title: '未登录', |
| | | content: '您未登录,需要登录后才能继续', |
| | | showCancel: false, |
| | | confirmText: '确定', |
| | | success: res => { |
| | | if (res.confirm) { |
| | | uni.reLaunch({ |
| | | url: '/pages/login/login', |
| | | }) |
| | | } |
| | | }, |
| | | }) |
| | | this.$isResolve() |
| | | } |
| | | } else { |
| | | this.isShow = true |
| | | this.getData() |
| | | } |