zjh
2025-05-22 a05d27a8148b8f2fe3061c4fb3908d7333ac45d3
pages/BasePages/user.vue
@@ -15,6 +15,7 @@
      <view class="btn-row" style="margin-top: 10px;">
        <button v-if="!loginInfo.hasLogin" type="primary" class="primary" @tap="bindLogin">登录</button>
        <button v-if="loginInfo.hasLogin" type="default" @tap="bindLogout">退出登录</button>
      <p class="version" style="text-align: center;color: #cbcaca;">版本号 {{version}}</p>
      </view>
    </view>
  </uni-base-page>
@@ -24,7 +25,8 @@
export default {
  data() {
    return {
      loginInfo: this.$loginInfo
      loginInfo: this.$loginInfo,
     version:'v'+uni.getSystemInfoSync().appVersion
    }
  },
  created() {
@@ -38,6 +40,14 @@
    },
    bindLogout() {
      this.$logout();
      uni.setStorage({
         key: 'gs_mes_pad_userkey',
         data: null,
         success: function() {
         }
      });
      /**
       * 如果需要强制登录跳转回登录页面
       */