Browse Source

feat: 微信登录限制app版本号3

zhangyuhan 3 months ago
parent
commit
5fe8553e2e
1 changed files with 18 additions and 13 deletions
  1. 18 13
      src/jfw/modules/app/src/web/staticres/jyapp/me/js/account.js

+ 18 - 13
src/jfw/modules/app/src/web/staticres/jyapp/me/js/account.js

@@ -31,23 +31,28 @@ var account = {
                     if(r.data.showWxBind) {
                         // 手机号用户
                         $('#wxInfo').hide();
-                        // 判断APP版本
-                        // 如果app版本号大于等于3.1.2则展示
-                        var currentVersion = ''
-                        var targetVersion = '3.1.2'
-                        try {
-                          currentVersion = JyObj.getVersion()
-                          if (currentVersion) {
-                            var c = compareVersion(currentVersion, targetVersion)
-                            this.fastButtonShow(!c)
-                            if (c) {
-                              $('#bindWX').show();
+                        if (utils.$envs.inApp) {
+                          // 判断APP版本
+                          // 如果app版本号大于等于3.1.2则展示
+                          var currentVersion = ''
+                          var targetVersion = '3.1.2'
+                          try {
+                            currentVersion = JyObj.getVersion()
+                            if (currentVersion) {
+                              var c = compareVersion(currentVersion, targetVersion)
+                              this.fastButtonShow(!c)
+                              if (c) {
+                                $('#bindWX').show();
+                              }
                             }
+                          } catch (error) {
+                            console.log(error)
                           }
-                        } catch (error) {
-                          console.log(error)
+                        } else {
+                          $('#bindWX').show();
                         }
 
+
                         $('#bindPhone').show();
                         $('#phoneInfo').hide();
                     } else {