Kaynağa Gözat

fix: 修复 this作用域问题

zhangyuhan 3 yıl önce
ebeveyn
işleme
75079dfd28

+ 3 - 5
src/jfw/modules/app/src/web/templates/frontRouter/bigmember/free/perfect_info.html

@@ -1059,15 +1059,13 @@
           }
           document.title = titleText
 
-          if (source == 'bid_document_Introduction_page') {
-
-          }
 
+          var _that = this
           function hideLabel (keys) {
             var hideType = keys || ['email', 'class', 'companyType', 'workScope', 'partnerNeeds', 'agree']
-            for (var k in this.moduleShow) {
+            for (var k in _that.moduleShow) {
               if (hideType.indexOf(k) !== -1)
-                this.moduleShow[k] = false
+                _that.moduleShow[k] = false
             }
           }
 

+ 3 - 2
src/web/templates/frontRouter/wx/bigmember/free/perfect_info.html

@@ -714,11 +714,12 @@
 
           document.title = titleText
 
+        var _that = this
         function hideLabel (keys) {
           var hideType = keys || ['email', 'class', 'companyType', 'workScope', 'partnerNeeds', 'agree']
-          for (var k in this.moduleShow) {
+          for (var k in _that.moduleShow) {
             if (hideType.indexOf(k) !== -1)
-              this.moduleShow[k] = false
+              _that.moduleShow[k] = false
           }
         }