cuiqian2004
2025-03-04 733cfa21c16c019c0337f948ac884ca4961ea2ad
pages/login/index.vue
@@ -70,7 +70,10 @@
         </uni-popup>
         <!-- 版本升级弹窗结束 -->
      </view>
      <!-- <button @click="onClickWms">登录wms</button>
      <view class="webview">
         <web-view ref="webview" src="http://115.29.185.26:5000/mobox3/#/"></web-view>
      </view> -->
   </view>
</template>
@@ -152,12 +155,15 @@
               // var ser = this.userServer.toLowerCase().split('/');
               const res = await getApkVersionInfo(this.userServer)
               this.downloadUrl = res.dldUrl || ""
               var isver = this.compare(res.verNum, version);
               if (isver) {
                  this.$refs.promotion.open();
               } else {
                  console.log('当前已是最新版本')
               if (this.downloadUrl) {
                  var isver = this.compare(res.verNum || "", version);
                  if (isver) {
                     this.$refs.promotion.open();
                  } else {
                     console.log('当前已是最新版本')
                  }
               }
            } catch (ex) {
               // console.log(ex);
               let exStr = JSON.stringify(ex)
@@ -172,7 +178,7 @@
               });
            }
         },
         compare(curV, reqV) {
            var arr1 = curV.toString().split('.');
@@ -377,7 +383,7 @@
                  pwd: this.userPwd
               }
               hideLoading()
               uni.navigateTo({
                  url: '../index/index?args=9999999999'
               })
@@ -395,7 +401,14 @@
                  confirmText: this.translateSys("cancel")
               });
            }
         },
         onClickWms()
         {
            let otherAppSchemeURL = "testapp://pages/index/index"; // 替换为目标app的scheme URL
            plus.runtime.openURL(otherAppSchemeURL, function(error) {
               console.error('打开应用失败: ', error);
            }, "uni.TeatApp");
         },
         translate(t) {
            if (typeof this.$t == "function") return this.$t(`page.${t}`)
@@ -406,12 +419,20 @@
            else return t;
         },
      },
      onLoad() {
      onLoad(options) {
         //获取mac地址
         let tip=`login:account:${options.account || ""},password:${options.password || ""}`
         // console.log(options);
         uni.showModal({
            title: "参数",
            content: tip,
            showCancel: false,
            confirmText:"cancel"
         });
         var url = utils.session.getValue('server');
         var username = utils.session.getValue('account');
         var userpwd = utils.session.getValue('password');
         var ischecked = false;
         if (!this.userServer)
            this.userServer = url;