Răsfoiți Sursa

Merge branch 'master' into feature/v4.10.9

yuelujie 3 luni în urmă
părinte
comite
717f7614e6

+ 35 - 14
src/jfw/modules/app/src/web/staticres/jyapp/me/js/account.js

@@ -31,7 +31,28 @@ var account = {
                     if(r.data.showWxBind) {
                         // 手机号用户
                         $('#wxInfo').hide();
-                        $('#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)
+                          }
+                        } else {
+                          $('#bindWX').show();
+                        }
+
+
                         $('#bindPhone').show();
                         $('#phoneInfo').hide();
                     } else {
@@ -167,7 +188,7 @@ var account = {
                                             }
                                         });
                                     }else{
-                                        weui.toast(r.error_msg,{ 
+                                        weui.toast(r.error_msg,{
                                             duration: 2000,
                                             className: 'j-toast',
                                         });
@@ -244,7 +265,7 @@ function loginByWeixinCallBack(wxSign) {
                     }
                 }
             } else {
-                weui.toast('您选择的微信号已被绑定,请更换后重试',{ 
+                weui.toast('您选择的微信号已被绑定,请更换后重试',{
                     duration: 2000,
                     className: 'j-toast',
                 });
@@ -252,23 +273,23 @@ function loginByWeixinCallBack(wxSign) {
         },
         error: function(){
             loading.hide()
-            weui.toast('登录超时',{ 
+            weui.toast('登录超时',{
                 duration: 2000,
                 className: 'j-toast',
             });
         }
     });
 }
-$(function () {   
+$(function () {
     var u = navigator.userAgent;
     var isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);
-    var isPageHide = false;   
-    window.addEventListener('pageshow', function () {   
-        if (isPageHide && isiOS) {   
-        window.location.reload();   
-        }   
-    });   
-    window.addEventListener('pagehide', function () {   
-        isPageHide = true;   
+    var isPageHide = false;
+    window.addEventListener('pageshow', function () {
+        if (isPageHide && isiOS) {
+        window.location.reload();
+        }
+    });
+    window.addEventListener('pagehide', function () {
+        isPageHide = true;
     });
-}) 
+})

+ 1 - 1
src/jfw/modules/app/src/web/templates/me/account.html

@@ -77,7 +77,7 @@
                             </div>
                             <i class="van-icon van-icon-arrow van-cell__right-icon"></i>
                         </div>
-                        <div role="button" class="van-cell van-cell--clickable van-cell--center" id="bindWX">
+                        <div role="button" class="van-cell van-cell--clickable van-cell--center" id="bindWX" style="display: none">
                             <div class="weixin">
                                 <span class="wx-img"></span>
                             </div>

+ 19 - 4
src/jfw/modules/app/src/web/templates/me/login.html

@@ -195,9 +195,9 @@
 	    <div class="footer-container">
         <div class="third-and-fast-login-container">
             <div class="fast-login-item">
-              <a href="javascript:void(0)" class="fast-login-open-link" style="display: none;">本机号码一键登录</a>
+              <a href="javascript:void(0)" class="fast-login-open-link no-right-line" style="display: none;">本机号码一键登录</a>
             </div>
-            <div class="fast-login-item wx">
+            <div class="fast-login-item wx" style="display: none;">
               <div class=" third_wx">
                 <img src="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/me/images/login_wx.png?v={{Msg "seo" "version"}}">
               </div>
@@ -294,8 +294,23 @@
 
     function showWxLoginIcon(f) {
       if (f) {
-        $('.wx').show()
-        $('.fast-login-open-link').removeClass('no-right-line')
+        // 判断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) {
+              $('.wx').show()
+              $('.fast-login-open-link').removeClass('no-right-line')
+            }
+          }
+        } catch (error) {
+          console.log(error)
+        }
       } else {
         $('.wx').hide()
         $('.fast-login-open-link').addClass('no-right-line')