反馈修改完成
							parent
							
								
									f4d80df8ca
								
							
						
					
					
						commit
						3f920deb8b
					
				|  | @ -41,7 +41,7 @@ | ||||||
| 				</view> | 				</view> | ||||||
| 			</view> | 			</view> | ||||||
| 		</view> | 		</view> | ||||||
| 		<!-- 底部导航 --> | 		<!-- 全选 --> | ||||||
| 		<view class="disjbac cart-foot-box fon24" :style="{bottom: footHeight+'px'}"> | 		<view class="disjbac cart-foot-box fon24" :style="{bottom: footHeight+'px'}"> | ||||||
| 			<label class="disac" @tap="chooseAll"><radio :checked="allChoose" color="#ff3673" style="transform: scale(.8);"/><text>全选</text></label> | 			<label class="disac" @tap="chooseAll"><radio :checked="allChoose" color="#ff3673" style="transform: scale(.8);"/><text>全选</text></label> | ||||||
| 			<view class="disac"> | 			<view class="disac"> | ||||||
|  |  | ||||||
|  | @ -13,7 +13,7 @@ | ||||||
| 			</view> | 			</view> | ||||||
| 			<!-- 下划线 --> | 			<!-- 下划线 --> | ||||||
| 			<view class="tab__line" | 			<view class="tab__line" | ||||||
| 				:style="{background: lineColor, width: lineStyle.width, transform: lineStyle.transform,transitionDuration: lineStyle.transitionDuration}"> | 				:style="{background: lineColor, width: lineStyle.width, transform: lineStyle.transform}"> | ||||||
| 			</view> | 			</view> | ||||||
| 		</scroll-view> | 		</scroll-view> | ||||||
| 	</view> | 	</view> | ||||||
|  |  | ||||||
|  | @ -7,8 +7,18 @@ const goLogin = () => { | ||||||
| } | } | ||||||
| let flag = true; | let flag = true; | ||||||
| // 刷新token并跳转到当前页面
 | // 刷新token并跳转到当前页面
 | ||||||
|  | var authTimer = null; | ||||||
| const refreshTokenPage = () => { | const refreshTokenPage = () => { | ||||||
| 	 | 	clearTimeout(authTimer); | ||||||
|  | 	uni.showToast({ | ||||||
|  | 		title: `请授权登录`, | ||||||
|  | 		icon:'none', | ||||||
|  | 		duration: 1000 | ||||||
|  | 	}); | ||||||
|  | 	authTimer = setTimeout(()=>{ | ||||||
|  | 		uni.reLaunch({url:'/pagesB/login/login'}); | ||||||
|  | 	},1000) | ||||||
|  | 	flag = true; | ||||||
| } | } | ||||||
| // 请求错误处理
 | // 请求错误处理
 | ||||||
| const checkError = (e) => { | const checkError = (e) => { | ||||||
|  |  | ||||||
|  | @ -106,13 +106,13 @@ | ||||||
| 		methods: { | 		methods: { | ||||||
| 			getUserInfo(){ | 			getUserInfo(){ | ||||||
| 				this.$requst.get('/api/user/info').then(res=>{ | 				this.$requst.get('/api/user/info').then(res=>{ | ||||||
|  | 					console.log(res,'用户信息') | ||||||
| 					if(res.code==0) { | 					if(res.code==0) { | ||||||
| 						this.userImg = res.data.headimgurl; | 						this.userImg = res.data.headimgurl; | ||||||
| 						this.userName = res.data.nickname; | 						this.userName = res.data.nickname; | ||||||
| 						this.list[0].num = res.data.order_count.order_placed; | 						this.list[0].num = res.data.order_count.order_placed; | ||||||
| 						this.list[1].num = res.data.order_count.makeing; | 						this.list[1].num = res.data.order_count.makeing; | ||||||
| 						this.list[2].num = res.data.order_count.shipped; | 						this.list[2].num = res.data.order_count.shipped; | ||||||
| 						 |  | ||||||
| 					} | 					} | ||||||
| 				}) | 				}) | ||||||
| 			}, | 			}, | ||||||
|  |  | ||||||
|  | @ -149,7 +149,7 @@ | ||||||
| 					is_active:1 | 					is_active:1 | ||||||
| 				} | 				} | ||||||
| 				this.$requst.post('/api/user/login',params).then(res => { | 				this.$requst.post('/api/user/login',params).then(res => { | ||||||
| 					if(res.data.token!=''){ | 					if(res.code == 0){ | ||||||
| 						uni.setStorageSync('userId',res.data.account_id) | 						uni.setStorageSync('userId',res.data.account_id) | ||||||
| 						uni.setStorageSync('token',res.data.token)//缓存token | 						uni.setStorageSync('token',res.data.token)//缓存token | ||||||
| 						uni.setStorageSync('openid',res.data.openid)//缓存openid | 						uni.setStorageSync('openid',res.data.openid)//缓存openid | ||||||
|  |  | ||||||
|  | @ -51,7 +51,21 @@ | ||||||
| 		onLoad() { | 		onLoad() { | ||||||
| 			console.log(uni.getStorageSync('buyList'),'缓存数组') | 			console.log(uni.getStorageSync('buyList'),'缓存数组') | ||||||
| 		}, | 		}, | ||||||
|  | 		onShow() { | ||||||
|  | 			this.getUserInfo() | ||||||
|  | 		}, | ||||||
| 		methods: { | 		methods: { | ||||||
|  | 			// 获取默认信息 | ||||||
|  | 			getUserInfo(){ | ||||||
|  | 				this.$requst.get('/api/user/info').then(res=>{ | ||||||
|  | 					console.log(res,'用户信息') | ||||||
|  | 					if(res.code==0) { | ||||||
|  | 						this.address = res.data.address; //地址 | ||||||
|  | 						this.name = res.data.contacts; //联系人 | ||||||
|  | 						this.phone = res.data.mobile; //电话 | ||||||
|  | 					} | ||||||
|  | 				}) | ||||||
|  | 			}, | ||||||
| 			// 提交 | 			// 提交 | ||||||
| 			submit(){ | 			submit(){ | ||||||
| 				if(this.checkEmpty() && this.flag){ | 				if(this.checkEmpty() && this.flag){ | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue