wangguoyu 1 month ago
parent
commit
e478dc2775
2 changed files with 9 additions and 4 deletions
  1. 1 0
      pages/bindPhone/bindPhone.vue
  2. 8 4
      pages/chanpinMy/my.vue

+ 1 - 0
pages/bindPhone/bindPhone.vue

@@ -217,6 +217,7 @@
 				// 更新用户信息
 				//	cacheManager.set('auth', res.data)
 				// 返回重新支付
+				//绑定成功后更新缓存
 				cacheManager.updateObject('auth', {
 					userName: loginData.phoneNumber
 				})

+ 8 - 4
pages/chanpinMy/my.vue

@@ -27,7 +27,8 @@
 					<icon class="list-icon dd-icon"></icon>
 					<text>订单</text>
 				</view>
-				<view v-if="appleCode=='true'&&currentPlatform=='ios' || currentPlatform=='android'" class="list-item" @click="duihuamaDuihuan">
+				<view v-if="appleCode=='true'&&currentPlatform=='ios' || currentPlatform=='android'" class="list-item"
+					@click="duihuamaDuihuan">
 					<icon class="list-icon dhm-icon"></icon>
 					<text>兑换码</text>
 				</view>
@@ -90,6 +91,7 @@
 	let pageFrom = ref(null)
 
 	onShow(() => {
+		console.log('pageFrom.value',pageFrom.value);
 		currentTabIndex.value = 3
 		if (pageFrom.value === 'myInfo') {
 			getMyInfo();
@@ -102,9 +104,10 @@
 		testRef.value.showPopup(7)
 	}
 	/***************** 测试 ******************/
-	function bangPhone(){
+	function bangPhone() {
+		pageFrom.value = 'myInfo'
 		uni.navigateTo({
-			url: '/pages/bindPhone/bindPhone?from=my'   
+			url: '/pages/bindPhone/bindPhone?from=my'
 		})
 	}
 
@@ -117,6 +120,7 @@
 	// 获取用户数据
 	function getMyInfo() {
 		myInfo({}).then(res => {
+			console.log('res',res);
 			myInfoData.userName = res.data.userName;
 			myInfoData.nickName = res.data.nickName;
 			pageFrom.value = ''
@@ -218,4 +222,4 @@
 			url: '/pages/chanpinShop/index'
 		})
 	}
-</script>
+</script>