Browse Source

no message

BF-202210271038\Administrator 10 months ago
parent
commit
bed11b706b
2 changed files with 18 additions and 2 deletions
  1. 17 1
      pages/my/set.vue
  2. 1 1
      pages/perfect/cards.vue

+ 17 - 1
pages/my/set.vue

@@ -39,7 +39,7 @@
     </view>
 
     <view class="set-id sys-color-gray-9">ID:87999890</view>
-    <view class="set-quit sys-color-black">退出账号</view>
+    <view class="set-quit sys-color-black" @click="logOut">退出账号</view>
 
 
   </view>
@@ -75,6 +75,22 @@ export default {
     this.getStorageSize()
   },
   methods: {
+    logOut(){
+      uni.showModal({
+        title: '提示',
+        content: '是否退出当前账户?',
+        success: function (res) {
+          if (res.confirm) {
+            uni.clearStorageSync();
+            uni.reLaunch({
+              url:'/pages/login/index'
+            })
+          } else if (res.cancel) {
+            console.log('用户点击取消');
+          }
+        }
+      });
+    },
       goToUrl(url){
         if(url===''){
           return;

+ 1 - 1
pages/perfect/cards.vue

@@ -82,7 +82,7 @@ export default {
       nickname:'',
       password:'',
       imgList:[],
-      imgBg:'',
+      imgBg:'/static/img/perfect/img2.png',
       isCheck:false
     }
   },