瀏覽代碼

✨ 个人中心:引导绑定逻辑

YunaiV 1 年之前
父節點
當前提交
d4bbe55126
共有 2 個文件被更改,包括 8 次插入11 次删除
  1. 4 5
      sheep/components/s-user-card/s-user-card.vue
  2. 4 6
      sheep/store/user.js

+ 4 - 5
sheep/components/s-user-card/s-user-card.vue

@@ -23,18 +23,17 @@
 			</view>
 		</view>
 
-    <!-- TODO @芋艿:用户接入 -->
 		<!-- 提示绑定手机号 先隐藏 yudao 需要再修改 -->
-		<!--    <view
+		<view
       class="bind-mobile-box ss-flex ss-row-between ss-col-center"
-      v-if="isLogin && !userInfo.verification?.mobile"
+      v-if="isLogin && !userInfo.mobile"
     >
       <view class="ss-flex">
-        <text class="cicon-mobile-o"></text>
+        <text class="cicon-mobile-o" />
         <view class="mobile-title ss-m-l-20"> 点击绑定手机号确保账户安全 </view>
       </view>
       <button class="ss-reset-button bind-btn" @tap="onBind">去绑定</button>
-    </view> -->
+    </view>
 	</view>
 </template>
 

+ 4 - 6
sheep/store/user.js

@@ -27,8 +27,6 @@ const defaultUserInfo = {
 	gender: 0, // 性别
 	mobile: '', // 手机号
   point: 0, // 积分
-  money: 0, // 余额
-	verification: {}, // 认证字段
 };
 
 // 默认钱包信息
@@ -103,7 +101,7 @@ const user = defineStore({
 		},
 
 		// 设置 token
-    // TODO 芋艿:整理下;
+    // TODO 芋艿:后续要支持访问令牌的刷新!!!
     setToken(token = '') {
 			if (token === '') {
 				this.isLogin = false;
@@ -159,9 +157,9 @@ const user = defineStore({
 			$share.getShareInfo();
 
 			// 提醒绑定手机号
-			// if (app().platform.bind_mobile && !this.userInfo.verification?.mobile) {
-			// 	showAuthModal('changeMobile');
-			// }
+			if (app().platform.bind_mobile && !this.userInfo.mobile) {
+				showAuthModal('changeMobile');
+			}
 
 			// 添加分享记录
       // TODO 芋艿:整理下;