Bläddra i källkod

提交增加跳转参数

wenmenghao321 1 år sedan
förälder
incheckning
e645a5f5ec

+ 6 - 1
src/jfw/modules/app/src/web/templates/weixin/wxinfocontent.html

@@ -1542,7 +1542,7 @@
                    } else {
                     if(res.data.status == '1'){
                       // 需要留资 留资提示即刻获得一次查看原文机会
-                      let url_ = utils.$envs.inH5?'/jyapp/frontPage/bigmember/free/perfect_info?source=h5_article_original_one&signId='+encodeURIComponent(id):'/jyapp/frontPage/bigmember/free/perfect_info?source=app_article_original_one&signId='+encodeURIComponent(id)
+                      let url_ = utils.$envs.inH5?'/jyapp/frontPage/bigmember/free/perfect_info?source=h5_article_original_one&signId=' + encodeURIComponent(id) + '&article='+ extractString_(location.href) :'/jyapp/frontPage/bigmember/free/perfect_info?source=app_article_original_one&signId=' + encodeURIComponent(id) + '&article='+ extractString_(location.href)
                       location.href = url_
                       
                     } else if(res.data.status == '2'){
@@ -1601,6 +1601,11 @@
              });
 
     }
+    function extractString_(str){
+          const regex = /\/article\/(.*?)\//;
+          const match = str.match(regex);
+          return match ? match[1] : null;
+    }
     // 大会员引流文案
     function getDrainInfo () {
         $.ajax({

+ 1 - 1
src/web/staticres/common-module/perfect-info/js/perfect-info.js

@@ -1355,7 +1355,7 @@ var vNode = {
         type: "POST",
         url: "/publicapply/userbase/getOriginalText",
         contentType: 'application/json',
-        data:JSON.stringify({id:_this.signId}),
+        data:JSON.stringify({id:_this.signId,use:true}),
         success: function(res){
           if(!res.data){
             return

+ 6 - 1
src/web/templates/weixin/wxinfocontent_rec.html

@@ -2159,7 +2159,7 @@ function setEntServiceInfo (res) {
                    } else {
                     if(res.data.status == '1'){
                       // 需要留资 留资提示即刻获得一次查看原文机会
-                      let url_ = '/weixin/frontPage/bigmember/free/perfect_info?source=wx_article_original_one&signId='+encodeURIComponent(id)
+                      let url_ = '/weixin/frontPage/bigmember/free/perfect_info?source=wx_article_original_one&signId='+encodeURIComponent(id) + '&article='+ extractString_(location.href)
                       location.href = url_
                       
                     } else if(res.data.status == '2'){
@@ -2219,6 +2219,11 @@ function setEntServiceInfo (res) {
              });
 
     }
+    function extractString_(str){
+          const regex = /\/article\/(.*?)\//;
+          const match = str.match(regex);
+          return match ? match[1] : null;
+    }
 // 大会员引流文案
 function getDrainInfo () {
 		$.ajax({