loulijun2021
2024-01-09 3e0e40c844c3a10aca5cc0c87b18579122700b61
pages/login/index.vue
@@ -34,6 +34,17 @@
                  @click="gotoIndex"></u-button>
            </view>
            <u-modal :show="isShow" :showCancelButton="isShowCancelButton" :showConfirmButton='false' title=""
               @confirm='isShowConfirm' @cancel='isShowCancel'>
               <view>
                  <view>
                     <u--text type="info" :size='32' :block='false' text="当前版本不是最新版本,请点击"></u--text>
                  </view>
                  <view>
                     <u--text :block='false' mode="link" :size='50' text="链接下载" :href="downloadUrl"></u--text>
                  </view>
               </view>
            </u-modal>
         </view>
@@ -54,6 +65,7 @@
   import {
      LoginSave,
      ForcedOffline,
      AppUpgrade
   } from '../../config/api.js';
   import {
      decode
@@ -74,7 +86,7 @@
            isDisabledSubmitButton: false, //提交按钮是否处于加载中
            isShowCancelButton: false,
            isShowCancelButton: true,
            isShow: false,
            downloadUrl: '', //下载地址
@@ -86,12 +98,21 @@
      },
      created() {
         this.getAppUpgrade()
      },
      mounted() {
      },
      methods: {
         getAppUpgrade() {
            AppUpgrade().then(res => {
               this.isShow = res.data[0].version !== this.$appVersion
               if (res.data[0].version !== this.$appVersion) { // 说明与最新版本不匹配
                  this.downloadUrl = this.$baseUrl.substring(0, 25) + '/APK/JLAPP.apk'
               }
            })
         },
         //密码是否查看  显示明文
         isViewClick() {
            this.isView = !this.isView