Bladeren bron

修改首页

yuwenjun 4 jaren geleden
bovenliggende
commit
e4a311afe0
2 gewijzigde bestanden met toevoegingen van 7 en 4 verwijderingen
  1. 6 3
      pages/index/index.vue
  2. 1 1
      pages/user/address/address.vue

+ 6 - 3
pages/index/index.vue

@@ -2,7 +2,7 @@
 	<view class="container" :style="{paddingTop :CustomBar + 'px' }">
 		<cm-custom :navbar-data='nvabarData'></cm-custom>
 		<!-- 机构信息区域 -->
-		<template v-show="!isRequest">
+		<template v-if="isRequest">
 			<!-- <view class="ws-title" :style="{lineHeight :CustomBar + 'px' }">维沙采购商城</view> -->
 			<view class="ws-header">
 				<!-- 用户信息 -->
@@ -11,7 +11,7 @@
 					<view
 						class="ws-login"
 						@click="navigator('/pages/login/login')"
-						v-if="!hasLogin && !isRequest"
+						v-if="!hasLogin && isRequest"
 					>
 						请登录
 					</view>
@@ -123,6 +123,7 @@ export default {
 			if (res == 1) {
 				console.log('用户已授权')
 				this.GetWxAuthorize()
+				
 			}
 		})
 	},
@@ -141,11 +142,13 @@ export default {
 				this.organizeId = res.data.organizeId
 				this.getUserInfoPersonal(this.organizeId)
 				this.refresh = true
+				this.isRequest = true;
 			}).catch(err=>{
 				// 缓存游客openid
 				uni.setStorageSync('openid',err.data.openid)
 				this.logout()
 				this.refresh = true
+				this.isRequest = true;
 			})
 		},
 		//初始化个人中心数据
@@ -157,7 +160,7 @@ export default {
 					this.waitShipmentsCount = this.showBadge(response.data.waitShipmentsCount) //待收货
 					this.shipmentsCount = this.showBadge(response.data.shipmentsCount) //已发货
 					this.salesReturnCount = this.showBadge(response.data.salesReturnCount) //退货/款
-					this.isRequest = true //个人中心初始化成功后才显示页面
+					
 				})
 				.catch(error => {
 					this.$util.msg(error.msg, 2000)

+ 1 - 1
pages/user/address/address.vue

@@ -142,7 +142,7 @@ export default {
 				// this.userId = resolve.userId
 				// 设置默认地址 测试使用
 				// const clubInfo = uni.getStorageSync('clubInfo')
-				this.userId = clubInfo.userId
+				this.userId = resolve.userId
 				// this.userId = '13914'
 				// console.log(this.userId)
 				let params = { pageNum: this.pageNum, pageSize: this.pageSize, userId: this.userId }