소스 검색

检查版本号带上系统

wzh 2 년 전
부모
커밋
09862f3486
2개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 1 1
      api/login.js
  2. 2 2
      pages/login.vue

+ 1 - 1
api/login.js

@@ -55,7 +55,7 @@ export function getInfo() {
 // 获取用户详细信息
 export function checkVersion(obj) {
   return request({
-    'url': '/device/checkVersion?versionCode='+obj.versionCode,
+    'url': '/device/checkVersion?versionCode='+obj.versionCode+"&platom="+obj.platom,
     data:obj,
     'method': 'post'
   })

+ 2 - 2
pages/login.vue

@@ -177,6 +177,7 @@
       uni.getSystemInfo({
         success:function(res){
           self.platom = res.platform;
+		  self.checkVersion();
         }
       });
      this.setLocale()
@@ -187,7 +188,6 @@
 				console.log('当前位置的纬度:' + res.latitude);
 			}
 		});
-      this.checkVersion();
       this.checkLogin();
     },
     methods: {
@@ -286,7 +286,7 @@
         this.appVersionCode = appVersionCode;
 		this.version = appVersionCode;
         let self = this;
-        checkVersion({"versionCode":appVersionCode}).then(res=>{
+        checkVersion({"versionCode":appVersionCode,"platom":this.platom}).then(res=>{
           let cz_app_version =res.data;
           console.log(cz_app_version)
           if(cz_app_version != null){