Browse Source

fix:资产找回请先绑定手机号

zhanghui 2 years ago
parent
commit
8c1d6b5300
1 changed files with 22 additions and 2 deletions
  1. 22 2
      pages/my/index.vue

+ 22 - 2
pages/my/index.vue

@@ -81,8 +81,8 @@
 
       <view class="group">
         <uni-list>
-          <uni-list-item :to="item.to" :title="item.title" showArrow :thumb="item.thumb" thumb-size="sm"
-                         :rightText="item.rightText" v-for="(item,index) in group1" :key="index"/>
+          <uni-list-item  :clickable="true" :title="item.title" showArrow :thumb="item.thumb" thumb-size="sm"
+                         :rightText="item.rightText" v-for="(item,index) in group1" :key="index" @click="clickListItem(item)"/>
         </uni-list>
       </view>
 
@@ -155,6 +155,26 @@ export default {
   },
 
   methods: {
+    clickListItem(e){
+      console.log(e)
+      if (this.userInfo.phone && e.title==='资产找回'){
+        uni.showModal({
+          title:'温馨提示',
+          content:'资产找回请先绑定手机号',
+          success:res=>{
+            if (res.confirm){
+              uni.navigateTo({
+                url: '/myPages/setting/setting-telphone',
+              })
+            }
+          }
+        })
+      }else {
+        uni.navigateTo({
+          url:e.to
+        })
+      }
+    },
     getUserInfo() {
       this.$api.getUserInfo().then(res => {
         console.log('++++++++++++获取用户信息++++++++++++++++++', res)