Просмотр исходного кода

feat(福利go) 修改个人中心的 退出功能

xing.li лет назад: 3
Родитель
Сommit
2c972d1e96

BIN
images/welfareMall/logout.png


+ 6 - 0
pages/welfareMall/personal/personal.js

@@ -184,6 +184,12 @@ Page({
         url
     })
   },
+  logout(){
+    wx.removeStorageSync('userInfo');
+    this.setData({
+      isLogin:false
+    })
+  },
 
   /**
    * 生命周期函数--监听页面隐藏

+ 2 - 0
pages/welfareMall/personal/personal.wxml

@@ -14,7 +14,9 @@
             <open-data class="head-personal-name" type="userNickName" lang="zh_CN"></open-data>
             <view class="head-personal-login">{{phone.toHide(mobileTop)}}</view>
           </view>
+       
           <button class="personal-isLogin" wx:if="{{!isLogin}}" open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber">登录/注册</button>
+          <image wx:if="{{isLogin}}" src="/images/welfareMall/logout.png" style="height: 30px;width: 30px;margin-left: 90px;" bindtap="logout"></image>
         </view>
         <view><button class="wx-isLogin-card" wx:if="{{!isLogin}}" open-type="getPhoneNumber" bindgetphonenumber="getPathCoupon"></button>
           <view class="head-card flex-row" catchtap="{{couponPath?'getCouponPath':''}}">

+ 5 - 5
project.config.json

@@ -22,15 +22,14 @@
     "uploadWithSourceMap": true,
     "compileHotReLoad": false,
     "lazyloadPlaceholderEnable": false,
-    "useMultiFrameRuntime": true,
-    "useApiHook": true,
-    "useApiHostProcess": true,
+    "useMultiFrameRuntime": false,
+    "useApiHook": false,
+    "useApiHostProcess": false,
     "babelSetting": {
       "ignore": [],
       "disablePlugins": [],
       "outputPath": ""
     },
-    "enableEngineNative": false,
     "useIsolateContext": false,
     "userConfirmedBundleSwitch": false,
     "packNpmManually": false,
@@ -39,7 +38,8 @@
     "disableUseStrict": false,
     "minifyWXML": false,
     "showES6CompileOption": false,
-    "useCompilerPlugins": false
+    "useCompilerPlugins": false,
+    "ignoreUploadUnusedFiles": false
   },
   "compileType": "miniprogram",
   "libVersion": "2.22.0",