wangguoyu 1 месяц назад
Родитель
Сommit
230302d3fd
1 измененных файлов с 9 добавлено и 9 удалено
  1. 9 9
      pages/chanpinMy/my.vue

+ 9 - 9
pages/chanpinMy/my.vue

@@ -32,7 +32,7 @@
 					<icon class="list-icon dhm-icon"></icon>
 					<text>兑换码</text>
 				</view>
-				<view class="list-item" @click="bangPhone">
+				<view class="list-item" v-if="isShowBindPhone" @click="bangPhone">
 					<icon class="list-icon bdsjh-icon"></icon>
 					<text>绑定手机号</text>
 				</view>
@@ -80,6 +80,7 @@
 	let authInfo = ref(null);
 	let loginRef = ref(null);
 	let currentTabIndex = ref(3)
+	let isShowBindPhone = ref(false);
 	let myInfoData = reactive({
 		userImg: '',
 		userName: '',
@@ -91,11 +92,16 @@
 	let pageFrom = ref(null)
 
 	onShow(() => {
-		console.log('pageFrom.value',pageFrom.value);
+		console.log('pageFrom.value', pageFrom.value);
 		currentTabIndex.value = 3
 		if (pageFrom.value === 'myInfo') {
 			getMyInfo();
 		}
+		if (getUserIsYouke()) {
+			isShowBindPhone.value = true
+		} else {
+			isShowBindPhone.value = false
+		}
 	})
 	/***************** 测试 ******************/
 	const testRef = ref(null)
@@ -111,16 +117,10 @@
 		})
 	}
 
-	function bingPhoneSuccess(flag, tel) {
-		toast("绑定成功")
-		cacheManager.updateObject('auth', {
-			userName: tel,
-		})
-	}
 	// 获取用户数据
 	function getMyInfo() {
 		myInfo({}).then(res => {
-			console.log('res',res);
+			console.log('res', res);
 			myInfoData.userName = res.data.userName;
 			myInfoData.nickName = res.data.nickName;
 			pageFrom.value = ''