Bladeren bron

Merge remote-tracking branch 'origin/dev3.5' into dev3.5

wangkaiyue 4 jaren geleden
bovenliggende
commit
9bd7826a73

+ 6 - 2
src/jfw/modules/app/src/web/staticres/jyapp/js/searchindex.js

@@ -9,7 +9,11 @@ $(function () {
 		});
 		window.addEventListener('pagehide', function () {
 		    isPageHide = true;
-		});
+        });
+        // ios特殊操作会没有弹出获取定位授权弹窗, 需要刚进入页面时先获取定位权限
+        try{
+            JyObj.getLocation();
+        }catch(e){}
 	}
 	window.nowTop = function () {
 		// console.log($("#searchIndex").offset(), $("#searchIndex").scrollTop())
@@ -776,7 +780,7 @@ var SuperSearch = {
 			SuperSearch.isTable(false);
 		}else{
 			SuperSearch.isTable(true);
-		}
+        }
 	},
 	recoveryPage: function(){
 		$("#searchIndex").addClass("hidden");

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

@@ -106,10 +106,10 @@ var account = {
     bindWX: function () {
         var that = this;
         // 可以绑定调用客户端JyObj.loginByWeixin() 唤起微信,页面需要定义回调方法loginByWeixinCallBack(wxSign) 回调参数wxSign即为提交绑定param参数
-        $('#bindWX').on('click', function () {
+        $('#bindWX').unbind('click').click(function () {
             var val = $(this).find('.van-cell__value').children().html();
             if (val == '去绑定') {
-                console.log('调用微信客户端方法,绑定微信JyObj.loginByWeixin')
+                console.log('调用微信客户端方法绑定微信')
                 try {
                     JyObj.removeUserToken();
                     JyObj.loginByWeixin();

+ 14 - 5
src/jfw/modules/app/src/web/staticres/jyapp/me/js/association.js

@@ -5,12 +5,12 @@ var company = {
     importText: $('.import_text'), // 联想公司输入框
     assoList: $('.assoList'), // 联想出的公司列表
     assoUl: $('.asso_ul'),
+    isregister:true,
     init: function () {
         this.addEventKeys();
         this.addEventLister();
         this.iosBackInvoke();
         $(comname).on('click', this.setCompanyName)
-        // $(company.importCancel[0]).on('click', this.setCancel)
         $(company.importText[0]).on('input', this.getCompanyList)
         $(company.importText[0]).on('blur', this.inputLoseFocus)
     },
@@ -30,11 +30,19 @@ var company = {
                 } else {
                     // 键盘收起事件处理
                     // alert("android 键盘收起事件处理")
-                    company.setCancel()
+                    var params = window.location.search.substring(1)
+                    if(params == '') {
+                        company.association.fadeOut()
+                    }else{
+                        company.isregister = false
+                        company.setCancel()
+                    }
                 }
-            });
+            },false);
         }
     },
+    // 解绑输入框失去焦点事件
+
     isAndroid: function (_isAndroid,ua) {
         if (_isAndroid === -1) {
             _isAndroid = /Android/i.test(ua) ? 1 : 0;
@@ -53,7 +61,9 @@ var company = {
     // 输入框失去焦点触发事件
     inputLoseFocus: function () {
         company.association.fadeOut()
-        company.setCancel()
+        if(company.isregister){
+            company.setCancel()
+        }
     },
     // ios返回刷新问题
     iosBackInvoke: function () {
@@ -74,7 +84,6 @@ var company = {
         for (var i=0; i<assoLiAll.length; i++) {
             $(assoLiAll[i]).on('click', function(){
                 $(comname).val($(this).find('.asso_res').text())
-                // company.setCancel()
             })
         }
     },

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

@@ -73,7 +73,6 @@
                 </van-cell-group>
             </div>
         </div>
-        
     </div>
     <!--S-当前页面的资源-->
     <script src=//cdn.jsdelivr.net/npm/vue@2.6.11/dist/vue.min.js></script>

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

@@ -117,6 +117,7 @@
 						EasyAlert.show("手机号格式错误");
 					}else if(r.status=="codeError"){
 						EasyAlert.show("图形验证码错误");
+						reLoadCaptcha();
 					}else if(r.status=="phoneNotExists"){
 						EasyAlert.show("手机号不存在");
 					}else if(r.status=="y"){

+ 10 - 4
src/jfw/modules/app/src/web/templates/me/permissions.html

@@ -59,8 +59,8 @@
     <script src=//cdn.jsdelivr.net/npm/vue@2.6.11/dist/vue.min.js></script>
     <script src=//cdn.jsdelivr.net/npm/vant@2.8.2/lib/vant.min.js></script>
     <script src=//cdn.jsdelivr.net/npm/zepto@1.2.0/dist/zepto.min.js></script>
-    <script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/js/common.js?v={{Msg "seo" "mod_version"}}'></script>
     {{include "/big-member/commonjs.html"}}
+    <script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/js/common.js?v={{Msg "seo" "version"}}'></script>
     <script>
         var vNode = {
             delimiters: ['${', '}'],
@@ -101,9 +101,15 @@
             },
             methods: {
                 getVersion: function () {
-                    try {
-                        this.curVersion = JyObj.getVersion();
-                    } catch (error) {}
+                    var _this = this;
+                    setTimeout(function () {
+                        try {
+                            _this.curVersion = JyObj.getVersion();
+                            console.log(_this.curVersion)
+                        } catch (error) {
+                            console.log('error')
+                        }
+                    }, 50)
                 },
                 // 更新开关状态
                 updateNoticeSwitch: function () {

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

@@ -294,7 +294,6 @@
 				return _isAndroid === 1;                
 			}
 			if (isAndroid()) {
-				console.log('123')
 				const innerHeight = window.innerHeight;
 				window.addEventListener('resize', () => {
 					const newInnerHeight = window.innerHeight;

+ 20 - 11
src/jfw/modules/app/src/web/templates/weixin/search/mainSearch.html

@@ -1071,20 +1071,29 @@
             }else if(em_selectType=="标题搜索"){
                 SuperSearch.reqParam.selectType="title";
             }
+            // @date 2021/3/2 阻止短时间内多次请求,导致触发浏览器取消请求执行Error回调
+            var nowT = new Date().getTime()
+            if (!window.ajaxExportStatus) {
+              window.ajaxExportTime = nowT - 301
+            }
+            if (nowT - window.ajaxExportTime <= 300) {
+              return
+            }
+            window.ajaxExportTime = nowT
             $.ajax({
-                type: "post",
+              type: "post",
                 url: "/jyapp/front/dataExport/searchExport",
                 data: SuperSearch.reqParam,
-                dataType: "json",
-                success: function(data){
-                    $(".loading_").hide();
-                    if(data._id!=""){
-                        window.location.href="/jyapp/front/dataExport/toCreateOrderPage?id="+data._id+"&source=d"
-                    }
-                },
-                error:function(e){
-                    $(".loading_").hide();
-                    window.location.href="/jyapp/free/login"
+                dataType: "json"
+            }).done(function (data) {
+              $(".loading_").hide();
+              if(data._id!=""){
+                window.location.href="/jyapp/front/dataExport/toCreateOrderPage?id="+data._id+"&source=d"
+              }
+            }).fail(function(xml, status, e){
+                $(".loading_").hide();
+                if (/parser/gmi.test(JSON.stringify(e))) {
+                  window.location.href="/jyapp/free/login"
                 }
             })
         }