Prechádzať zdrojové kódy

fix:pc三级页下载留资

yangfeng 3 rokov pred
rodič
commit
5e16ac11c1

+ 8 - 8
src/web/staticres/js/pc-collect-user-info.js

@@ -458,10 +458,10 @@ var vm = new Vue({
     // 不需要调留资接口 弹出留资弹框回调方法
     noCallApiFn: function(source, isRefresh) {
       this.isRefresh = isRefresh
-      this.source = source
+      vm.source = source
       this.showForm = true
       this.calcTitleText(source)
-      this.getOldInfo()
+      this.getOldInfo(source)
     },
     calcTitleText: function (source) {
       if (!source) return
@@ -480,7 +480,7 @@ var vm = new Vue({
 
       }
       //  判断阅读原文留资显示
-      if (vm.source = "article_original"){
+      if (vm.source == "article_original"){
         for (var k in vm.moduleShow) {
           vm.moduleShow[k] = false
         }
@@ -552,7 +552,7 @@ var vm = new Vue({
             _this.showForm = false
             res.data.retainedCapital = false
             callback && callback(res)
-            _this.formAjax(_this.source, res.info)
+            _this.formAjax(vm.source, res.info)
             switch (source) {
               case 'member_freeuse': {
                 _this.showSuccess = true
@@ -589,7 +589,7 @@ var vm = new Vue({
             _this.isForce = res.data.fource
             if (res.data.retainedCapital) {
               _this.showForm = true
-              _this.getOldInfo()
+              _this.getOldInfo(source)
               _this.curDom = dom
             } else {
               callback && callback(res)
@@ -603,7 +603,7 @@ var vm = new Vue({
       var _this = this
       this.$refs[formName].validate(function (valid) {
         if (valid) {
-          _this.formAjax(_this.source)
+          _this.formAjax(vm.source)
           _this.bigDocAjax()
         } else {
           console.log('error submit!!');
@@ -717,13 +717,13 @@ var vm = new Vue({
       this.form.phone = val.replace(/[^\d]/g,'')
     },
     // 查询表单回显信息
-    getOldInfo: function() {
+    getOldInfo: function(source) {
       var _this = this
       $.ajax({
         type:'POST',
         url:'/salesLeads/retainedCapital?t=' + Date.now(),
         data: {
-          source: _this.source
+          source: source
         },
         success:function (res) {
           if (res && res.info) {

+ 1 - 5
src/web/staticres/public-pc/js/article-content.js

@@ -2064,11 +2064,7 @@ function goDownload(url) {
     // 判断有无体验过 0:未体验过
     if (window.freeFile == 0) {
       // 判断有无留过资 且未体验过 - 去留资
-      vm.source = 'article_attach_freeuser'
-      vm.calcTitleText('article_attach_freeuser')
-      vm.showForm = true
-      vm.getOldInfo()
-      // vm.isNeedSubmit('article_attach_freeuser', function() {})
+      vm.noCallApiFn('article_attach_freeuser', true)
     } else if (window.freeFile > 0 ){
       // 留过资 更新下载次数 进入附件下载页面
       location.href = url