浏览代码

no message

BF-202210271038\Administrator 1 年之前
父节点
当前提交
bed11b706b
共有 2 个文件被更改,包括 18 次插入2 次删除
  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
     }
   },