Эх сурвалжийг харах

Merge branch 'dev4.6.2.4' of http://192.168.3.207:8080/qmx/jy into dev4.6.2.4

tsz 3 жил өмнө
parent
commit
4d305d4a47

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

@@ -1078,11 +1078,20 @@ var SuperSearch = {
             return;
           }
           // 免费用户搜索结果查看大于11页时弹窗提示
-          // if (!vMainSearchComponent.checkNowPower() && SuperSearch.reqParam["pageNum"] > 10) {
-          //   vMainSearchComponent.showBuyTip('招标搜索结果', '免费用户最多可查看500条招标搜素结果,可前往购买超级订阅解锁查看更多信息')
-          //   SuperSearch.noMoreData();
-          //   return;
-          // }
+          if (!vMainSearchComponent.checkNowPower() && SuperSearch.reqParam["pageNum"] > 10) {
+            // vMainSearchComponent.showBuyTip('招标搜索结果', '免费用户最多可查看500条招标搜素结果,可前往购买超级订阅解锁查看更多信息')
+            SuperSearch.noMoreData();
+            vKeepComponent.$dialog.confirm({
+              message: '开通大会员,查看更多招标项目,畅享商机不受 !',
+              className: 'ent-search-dialog max-54 add-close-after',
+              overlayClass: 'z-2030',
+              showCancelButton: false,
+              confirmButtonText: '免费体验',
+            }).then(function () {
+              location.href = '/jyapp/frontPage/bigmember/free/perfect_info?origin=app_article_list_exp'
+            }).catch(function () {});
+            return;
+          }
           if(SuperSearch.limitFlag){
             setTimeout(function(){
               SuperSearch.limitPaging(me);

+ 4 - 0
src/jfw/modules/app/src/web/templates/big-member/page_orderdetail_member.html

@@ -212,6 +212,10 @@
                 level_map.set(3, niche);
                 level_map.set(4, trial);
                 level_map.set(5, custom);
+                niche.set("level", "商机版2.0");
+                level_map.set(6, niche);
+                expert.set("level", "专家版2.0");
+                level_map.set(7, expert);
                 var member_endtime = "-";
                 $(".o-name").text("大会员")
                 $(".order-img > img").attr("src", level_map.get(filterObj.level).get("img"))

+ 11 - 4
src/jfw/modules/app/src/web/templates/weixin/wxinfocontent.html

@@ -546,7 +546,7 @@
                         </li>
                     {{end}}
                 </ul>
-                <div class="mask-zz" style="position:absolute; top:0;width: 380px;padding:0;height: 100%;background-color:white;z-index: 1;">
+                <div class="mask-zz" style="position:absolute; top:0;width: 100%;padding:0;height: 100%;background-color:white;z-index: 1;">
                     <img style="width: 100%;height: 100%" src="/images/pc/pc_mh.png">
                     <div class="mask-zz" style="position:absolute; left: 50%; top: 50%; margin-top: -110px;margin-left: -150px;width: 300px;height: 220px;background-color: white;z-index: 100;border-radius: 10px">
                         <div style="position: relative">
@@ -554,9 +554,10 @@
                             <div style="position: absolute;top: 50%;left: 50%; margin-left: -100px;width: 200px;height: 26px;color: antiquewhite;font-size: 16px;">想中标?提前介入很关键!</div>
                         </div>
                         <div style="display: flex;flex-direction: column;justify-content: center;align-items: center;padding: 20px;">
-                            <div style="color: #0d0d0d;font-size: 16px;font-weight: 500;margin-bottom: 5px">提前获取正在审批中的新项目,比招标信息更超前!</div>
-                            <div style="color: #0d0d0d;font-size: 16px;font-weight: 500;margin-bottom: 20px">助您提前了解项目信息,把握重要商机!</div>
-                            <button style="background-color: deepskyblue;color: white;border:none;width: 105px;height:30px;border-radius: 5px;margin-bottom: 20px" @click="onFree">免费体验</button>
+                            <div style="color: #0d0d0d;font-size: 14px;font-weight: 500;">拟建项目抢先获知,提前获取正在审批中的</div>
+                            <div style="color: #0d0d0d;font-size: 14px;font-weight: 500;">新项目,比招标信息更超前!</div>
+                            <div style="color: #0d0d0d;font-size: 14px;font-weight: 500;margin-bottom: 20px">助您提前了解项目信息,把握重要商机!</div>
+                            <button class="free-btn-reword" style="background-color: deepskyblue;color: white;border:none;width: 105px;height:30px;border-radius: 5px;margin-bottom: 20px" @click="onFree">免费体验</button>
                         </div>
                     </div>
                 </div>
@@ -1109,6 +1110,12 @@
         }
     }
 
+    //留资弹窗页面
+    $('.free-btn-reword').on('click', function() {
+        //  留资判断
+        location.href = '/jyapp/frontPage/bigmember/free/perfect_info?source=ent_portrait_contacts'
+    })
+
     // 判断账户权限
     function getAccountInfo () {
         $.ajax({

Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 1 - 1
src/jfw/modules/bigmember/src/config.json


+ 8 - 0
src/jfw/modules/publicapply/.idea/modules.xml

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="ProjectModuleManager">
+    <modules>
+      <module fileurl="file://$PROJECT_DIR$/.idea/publicapply.iml" filepath="$PROJECT_DIR$/.idea/publicapply.iml" />
+    </modules>
+  </component>
+</project>

+ 9 - 0
src/jfw/modules/publicapply/.idea/publicapply.iml

@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module type="WEB_MODULE" version="4">
+  <component name="Go" enabled="true" />
+  <component name="NewModuleRootManager">
+    <content url="file://$MODULE_DIR$" />
+    <orderEntry type="inheritedJdk" />
+    <orderEntry type="sourceFolder" forTests="false" />
+  </component>
+</module>

+ 6 - 0
src/jfw/modules/publicapply/.idea/vcs.xml

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="VcsDirectoryMappings">
+    <mapping directory="$PROJECT_DIR$/../../../.." vcs="Git" />
+  </component>
+</project>

+ 3 - 2
src/jfw/modules/publicapply/src/attachmentdow/service/service.go

@@ -5,7 +5,6 @@ import (
 	"config"
 	"db"
 	"fmt"
-	"github.com/go-xweb/xweb"
 	"jfw/public"
 	"log"
 	qu "qfw/util"
@@ -13,6 +12,8 @@ import (
 	"qfw/util/redis"
 	"time"
 	"util"
+
+	"github.com/go-xweb/xweb"
 )
 
 type Dow struct {
@@ -64,7 +65,7 @@ func (u *Dow) Subdow() {
 				}
 				//下载后自增一次
 				defer func() {
-					redis.Incr(jy.VipFileUploadNumKey, mon)
+					redis.Incr(jy.PowerCacheDb, mon)
 					data := make(map[string]interface{})
 					data["p_userid"] = userid
 					data["p_infoId"] = infoId

+ 1 - 1
src/jfw/modules/publicapply/src/config.json

@@ -14,7 +14,7 @@
             "user": "public03@topnet.net.cn"
         }
     ],
-    "attachmentRPC":"192.168.3.128:10082",
+    "attachmentRPC":"192.168.3.206:10082",
     "followPushRpc": "127.0.0.1:8759",
     "industry": "分类综合测试",
     "defaultEntList": [

+ 20 - 0
src/web/staticres/common-module/order-list/js/order-list-config.js

@@ -200,6 +200,16 @@ var assetsConf = {
       5: {
         wx: '/order/image/dahuiyuan1.png',
         app: '/jyapp/big-member/image/dahuiyuan1.png'
+      },
+      // 商机版2.0
+      6: {
+        wx: '/order/image/dahuiyuan2.png',
+        app: '/jyapp/big-member/image/dahuiyuan2.png'
+      },
+      // 专家版2.0
+      7: {
+        wx: '/order/image/dahuiyuan1.png',
+        app: '/jyapp/big-member/image/dahuiyuan1.png'
       }
     }
   },
@@ -256,6 +266,16 @@ var assetsConf = {
       5: {
         wx: '/order/image/zizhanghao1.png',
         app: '/jyapp/big-member/image/dahuiyuan1.png'
+      },
+      // 商机2.0
+      6: {
+        wx: '/order/image/zizhanghao2.png',
+        app: '/jyapp/big-member/image/zizhanghao2.png'
+      },
+      // 专家2.0
+      7: {
+        wx: '/order/image/zizhanghao1.png',
+        app: '/jyapp/big-member/image/zizhanghao1.png'
       }
     }
   },

+ 3 - 1
src/web/staticres/common-module/order-list/js/order-list.js

@@ -1851,7 +1851,9 @@ var vm = new Vue({
         2: '智慧版',
         3: '商机版',
         4: '试用版',
-        5: '自定义'
+        5: '自定义',
+        6: '商机版2.0',
+        7: '专家版2.0'
       }
 
       var levelInfo = {

+ 18 - 4
src/web/staticres/js/superSearch.js

@@ -53,10 +53,7 @@ $(function() {
     	$(window).scrollTop(0);
     	$('.custom-checkbox.check-all').prop('checked', false)
 		next();
-    	// TODO 免费用户搜索结果查看大于11页时弹窗提示
-		// if (!vipState) {
-		// 	return openVipDialog('招标搜索结果', '免费用户最多可查看500条招标搜素结果,可前往购买超级订阅解锁查看更多信息')
-		// }
+
 	})
 	//筛选关闭和打开
 	//根据cookie值设置筛选是否显示
@@ -1299,13 +1296,30 @@ function collectClick() {
   })
 }
 
+function openBigMemberDialog (str, content) {
+	$('.auth-dialog').show()
+	$('.auth-dialog .dialog-title').text('您暂无使用权限')
+	$('.auth-dialog .dialog-content').html(content ||  '开通大会员,查看更多招标项目,畅享商机不受限!')
+	$('.auth-dialog .default-btn').click(function () {
+		$('.auth-dialog').hide(300)
+	})
+	$('.auth-dialog .confirm-btn').text('免费体验')
+	$('.auth-dialog .confirm-btn').off('click').bind('click',function () {
+		var advName = '招标搜索' + str + '-去开通'
+		baiduEvent(advName) // 点击去开通事件 百度统计
+		// window.open('/swordfish/page_big_pc/free/svip/buy')
+	})
+}
+
 // 开通提醒弹框
 function  openVipDialog(str, content) {
   $('.auth-dialog').show()
+	$('.auth-dialog .dialog-title').text('开通超级订阅')
   $('.auth-dialog .dialog-content').html(content ||  '立享更多搜索权限,寻找商机更精准')
   $('.auth-dialog .default-btn').click(function () {
     $('.auth-dialog').hide(300)
   })
+	$('.auth-dialog .confirm-btn').text('去开通')
   $('.auth-dialog .confirm-btn').off('click').bind('click',function () {
     var advName = '招标搜索' + str + '-去开通'
     baiduEvent(advName) // 点击去开通事件 百度统计

+ 14 - 5
src/web/staticres/js/wxSupersearch.js

@@ -1059,11 +1059,20 @@ var SuperSearch = {
             return;
           }
           //  免费用户搜索结果查看大于11页时弹窗提示
-          // if (!vMainSearchComponent.checkNowPower() && SuperSearch.reqParam["pageNum"] > 10) {
-          //   vMainSearchComponent.showBuyTip('招标搜索结果', '免费用户最多可查看500条招标搜素结果,可前往购买超级订阅解锁查看更多信息')
-          //   SuperSearch.noMoreData();
-          //   return;
-          // }
+          if (!vMainSearchComponent.checkNowPower() && SuperSearch.reqParam["pageNum"] > 10) {
+            // vMainSearchComponent.showBuyTip('招标搜索结果', '免费用户最多可查看500条招标搜素结果,可前往购买超级订阅解锁查看更多信息')
+            SuperSearch.noMoreData();
+            vKeepComponent.$dialog.confirm({
+              message: '开通大会员,查看更多招标项目,畅享商机不受 !',
+              className: 'ent-search-dialog max-54 add-close-after',
+              overlayClass: 'z-2030',
+              showCancelButton: false,
+              confirmButtonText: '免费体验',
+            }).then(function () {
+              location.href = '/weixin/frontPage/bigmember/free/perfect_info?origin=wx_article_list_exp'
+            }).catch(function () {});
+            return;
+          }
           if(SuperSearch.limitFlag){
             setTimeout(function(){
               SuperSearch.limitPaging(me);

+ 2 - 0
src/web/templates/pc/member_orderDetail.html

@@ -157,6 +157,8 @@
                     level_map.set(3, "商机版");
                     level_map.set(4, "试用版");
                     level_map.set(5, "自定义");
+                    level_map.set(6, "商机版2.0");
+                    level_map.set(7, "专家版2.0");
                     if (filterObj.free_sub_num){
                       $(".free_num").text(filterObj.free_sub_num+"个");
                     }else{

+ 9 - 1
src/web/templates/pc/myOrder.html

@@ -611,6 +611,12 @@
                 },
                 '自定义': {
                   icon: '/order/image/dahuiyuan1.png'
+                },
+                '商机版2.0': {
+                  icon: '/order/image/dahuiyuan2.png'
+                },
+                '专家版2.0': {
+                  icon: '/order/image/dahuiyuan1.png'
                 }
               }
             },
@@ -657,7 +663,9 @@
             2: '智慧版',
             3: '商机版',
             4: '试用版',
-            5: '自定义'
+            5: '自定义',
+            6: '商机版2.0',
+            7: '专家版2.0'
           },
           list: [],
           ind: 0,

+ 8 - 2
src/web/templates/pc/supsearch.html

@@ -1083,11 +1083,11 @@ var IframeOnClick = {
             <img class="icon-vip" src="/images/biddingSearch/VIP.png" alt="">
           </span>
           <span class="search-list">
-            <span data-name="buyer" class="search-list-checkbox">采购单位</span>  
+            <span data-name="buyer" class="search-list-checkbox">采购单位</span>
             <img class="icon-vip" src="/images/biddingSearch/VIP.png" alt="">
           </span>
           <span class="search-list">
-            <span data-name="winner" class="search-list-checkbox">中标企业<em style="color: #2cb7ca;font-size: 12px;"> 老用户免费专享</em></span>  
+            <span data-name="winner" class="search-list-checkbox">中标企业<em style="color: #2cb7ca;font-size: 12px;"> 老用户免费专享</em></span>
             <img class="icon-vip" src="/images/biddingSearch/VIP.png" alt="">
           </span>
           <span class="search-list">
@@ -2184,6 +2184,12 @@ document.querySelector(".searchControl").oncopy = function(){
     },
     methods: {
       onPageChange (p) {
+
+	  	// TODO 免费用户搜索结果查看大于11页时弹窗提示
+	  	if (!vipState && p > 10) {
+	  		return openBigMemberDialog('招标搜索500条限制')
+	  	}
+
         currentPage = p
         this.listState.num = p
         $(".tabContainer").hide();

+ 4 - 0
src/web/templates/weixin/member/memberdetail.html

@@ -200,6 +200,10 @@
                 level_map.set(3, niche);
                 level_map.set(4, trial);
                 level_map.set(5, custom);
+                niche.set("level", "商机版2.0");
+                level_map.set(6, niche);
+                expert.set("level", "专家版2.0");
+                level_map.set(7, expert);
                 $(".o-name").text("大会员")
                 $(".order-img > img").attr("src", level_map.get(filterObj.level).get("img"))
                 var member_endtime = "-";

+ 145 - 78
src/web/templates/weixin/wxinfocontent_rec.html

@@ -633,6 +633,46 @@ pre {
   background-size: contain;
   margin-right: .04rem;
 }
+.free-down-text,.file-count-tip{
+  display: none;
+  margin-left: .24rem;
+  padding: 0 .16rem;
+  background: rgba(42, 189, 209, 0.1);
+  border-radius: 10px;
+  line-height: .4rem;
+  font-size: .22rem;
+  color: #2ABDD1;
+}
+.concat-kf {
+  display: none;
+  padding: 0.06rem .16rem;
+  background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAMAAADXqc3KAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMDY3IDc5LjE1Nzc0NywgMjAxNS8wMy8zMC0yMzo0MDo0MiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTUgKFdpbmRvd3MpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOjNGMjBGMzQ2NEYyQzExRUNBNDRBRDFDQjI2MEM5NTRBIiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOjNGMjBGMzQ3NEYyQzExRUNBNDRBRDFDQjI2MEM5NTRBIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6M0YyMEYzNDQ0RjJDMTFFQ0E0NEFEMUNCMjYwQzk1NEEiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6M0YyMEYzNDU0RjJDMTFFQ0E0NEFEMUNCMjYwQzk1NEEiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5KLSJ9AAAABlBMVEX///////9VfPVsAAAAAnRSTlP/AOW3MEoAAABISURBVHjazNIxDgAgCEPR9v6XdsBEUL6udiPPEBVkiC6gCIL+AtN1GUyt2rdH1UgBpa7zlLasb0cwQqU6QYRE58wR3lsyBBgA3KsBiK25dREAAAAASUVORK5CYII=) no-repeat 6px center #2ABDD1;
+  background-size: .28rem .28rem;
+  padding-left: .48rem;
+  border-radius: 8px;
+  color:#fff;
+  font-size: .22rem;
+  line-height: normal;
+}
+.icon-help{
+  display: none;
+  width: .32rem;
+  height: .32rem;
+  margin: 0 .38rem 0 .2rem;
+  background: url(/images/help-b.png) no-repeat center center;
+  background-size: contain;
+}
+.download-list ul .downs {
+  margin-bottom: 0.32rem;
+  font-size: .3rem;
+  line-height: .44rem;
+  color: #2ABED1;
+  text-decoration: underline;
+}
+.join {
+    display: flex;
+    align-items: center;
+}
 </style>
 </head>
 <body>
@@ -977,6 +1017,10 @@ pre {
                     <a class="adv_center" style="display: flex;flex-direction: column;flex: 1;">
                         <div class="join">
                             附件下载
+                            <span class="free-down-text">免费用户享有1次附件下载权益</span>
+                            <span class="file-count-tip">本月剩余:<em class="file-count"></em>次</span>
+                            <span class="icon-help"></span>
+                            <span class="concat-kf">联系客服</span>
                         </div>
                     </a>
                 </div>
@@ -1157,6 +1201,8 @@ var buyer_ = {{.T.obj.buyer}};
 var buyerperson_ = {{.T.obj.buyerperson}};
 var buyertel_ = {{.T.obj.buyertel}};
 var isbid =false; //是否是中标,需要显示所有
+var isFree = false;//是否是免费用户
+var fileNum = 0;//免费用户附件体验次数
 //拟建项目广告
 var nj_adv=["批量导出拟建项目"]
 //招标公告广告
@@ -1487,16 +1533,16 @@ function isOpening() {
 			url:'/bigmember/use/isAdd',
 			success: function(res) {
 					//console.log(res)
-					// res.data.memberStatus = 0
           bigstatus = res.data.memberStatus
           powerArr = res.data.power
-				if (bigstatus <= 0 || powerArr.indexOf(3) == -1) {
-					window.isNoMember = true
-				}
+          isFree = res.data.isFree
+          fileNum = res.data.fileNum
+  				if (bigstatus > 0 && powerArr.indexOf(3) > -1) {
+  					window.isMemberAndPower = true
+  				}
 					// 不是大会员
 					if (bigstatus <= 0) {
 							getDrainInfo()
-							getAccountInfo()
 							$('.lead-btn').hide()
 							if({{.T.obj.subtype}}!="拟建") {
 									$('.lead-btn').hide()
@@ -1509,6 +1555,16 @@ function isOpening() {
           }
           if (res.data.power && res.data.power.indexOf(6) > -1) {
             $('#analysis-in').hide()
+          }
+          // 免费用户展示可下载一次提示(免费用户且没有体验过附件下载权益的展示)
+          if (res.data && res.data.isFree && res.data.freeFile == 0) {
+            $('.free-down-text').css('display', 'inline-block')
+          }
+          if (res.data && res.data.vipStatus > 0 && res.data.viper) {
+            $('.file-count-tip').css('display', 'inline-block')
+            $('.concat-kf').css('display', 'inline-block')
+            $('.icon-help').css('display', 'inline-block')
+            $('.file-count').html(res.data.fileNum)
           }
 			},
 			error:function(err) {
@@ -1538,85 +1594,82 @@ function getDrainInfo () {
 				}
 		})
 }
-// 判断账户权限
-function getAccountInfo () {
-		$.ajax({
-				type: 'POST',
-				url: '/publicapply/bidcoll/power',
-				success: function(res) {
-						console.log(res)
-						if(res.error_code == 0) {
-								if(res.data) {
-									drainPower = res.data
-								    if (!res.data.member) {
-									  window.isNoMember = true
-										$(".atta-list").show()
-									} else {
-								    	$(".atta-list").hide()
-									}
-								}
-						}
-				},
-				error: function(err) {
-						console.log(err)
-				}
-		})
-}
-    // 附件下载展示
-    function andownload() {
-        $.ajax({
-            type:'post',
-            url:'/bigmember/attachment/get',
-            data:{
-                infoId:{{.T.obj._id}}
-            },
-            success:function(data){
-                if(data.data&&data.data.attachment !=null&&data.data.attachment.length!=0){
-                    var html = ''
-                    if(mySysIsIos()){
-                        for(var i=0;i<data.data.attachment.length;i++) {
-                            html += "<li class='downs'>"+"<a class='downfiles' data-href="+data.data.attachment[i].downurl+">"+data.data.attachment[i].filename+"</a></li>"
-                        }
-                    }else{
-                        for(var i=0;i<data.data.attachment.length;i++) {
-                            // html += "<li class='downs'>"+"<a class='downfiles' download="+data.data[i].filename+" href="+data.data[i].downurl+">"+data.data[i].filename+"</a></li>"
-                            html += "<li class='downs'>"+"<a class='menu_list' data-href="+data.data.attachment[i].downurl+">"+data.data.attachment[i].filename+"</a></li>"
-                        }
-                    }
 
-                    $('.download-list>ul').append(html)
-                    $('.downs').on('click', function() {
-                        var url = $(this).find('a').attr('data-href')
-                        //  留资判断
-                        if (window.isNoMember == true) {
-                            location.href = '/weixin/frontPage/bigmember/free/perfect_info?source=member_attach'
-                            return
-                        }
-                        if(mySysIsIos()){
-                            iosShow(url)
-                        } else {
-                            location.href = url
-                        }
-                    })
-                    if (window.isNoMember) {
-                        $('.atta-list').show()
+andownload()
+// 附件下载展示
+function andownload() {
+    $.ajax({
+        type:'post',
+        url:'/bigmember/attachment/get',
+        data:{
+            infoId:{{.T.obj._id}}
+        },
+        success:function(data){
+            if(data.data&&data.data.attachment !=null&&data.data.attachment.length!=0){
+                var html = ''
+                if(mySysIsIos()){
+                    for(var i=0;i<data.data.attachment.length;i++) {
+                        html += "<li class='downs'>"+"<a class='downfiles' data-href="+data.data.attachment[i].downurl+">"+data.data.attachment[i].filename+"</a></li>"
                     }
                 }else{
-                    $('.atta-list').hide()
-                    $('.atta-download-have').hide()
+                    for(var i=0;i<data.data.attachment.length;i++) {
+                        // html += "<li class='downs'>"+"<a class='downfiles' download="+data.data[i].filename+" href="+data.data[i].downurl+">"+data.data[i].filename+"</a></li>"
+                        html += "<li class='downs'>"+"<a class='menu_list' data-href="+data.data.attachment[i].downurl+">"+data.data.attachment[i].filename+"</a></li>"
+                    }
                 }
 
-                if(data.data&&data.data.len===0){ //此文章无附件
-                    $(".atta-download").hide();
-                } else { //有附件
-                    if(data.data&&data.data.attachment.length==0){ //有附件,无权限下载
-                        $('.atta-download').css("display","flex")
-                    }
+                $('.download-list>ul').append(html)
+                $('.downs').on('click', function(){
+                  //  留资判断
+                  if (isFree&&fileNum==0) {
+                      location.href = '/weixin/frontPage/bigmember/free/perfect_info?source=article_attach_freeuser'
+                      return
+                  }
+                  gotoFilePage($(this).find('a').text())
+                })
+                //if (window.isNoMember) {
+                  //向所有用户开放
+                  $('.atta-list').show()
+                //}
+            }else{
+                $('.atta-list').hide()
+                $('.atta-download-have').hide()
+            }
+
+            if(data.data&&data.data.len===0){ //此文章无附件
+                $(".atta-download").hide();
+            } else { //有附件
+                if(data.data&&data.data.attachment.length==0){ //有附件,无权限下载
+                    $('.atta-download').css("display","flex")
                 }
             }
-        });
-    }
-    andownload()
+        }
+    });
+}
+//浏览附件
+function gotoFilePage(name){
+  $.ajax({
+        type:'post',
+        url:'/publicapply/attachment/get',
+        data:{
+            infoId:{{.T.obj._id}}
+        },
+        success:function(r){
+          if(r.data&&r.data.attachment !=null&&r.data.attachment.length!=0){
+            for(var i=0;i<r.data.attachment.length;i++) {
+              if (name!=""&&name == r.data.attachment[i].filename){
+                var url = r.data.attachment[i].downurl
+                if(mySysIsIos()){
+                    iosShow(url)
+                } else {
+                    location.href = url
+                }
+              }
+            }
+          }
+        }
+      })
+}
 // 大会员文案点击
 $('.bigvip_drain').on('click', function() {
 	let powerInt = []
@@ -2468,7 +2521,21 @@ $(function(){
     {{end}}
     $(".original_name").attr("adv_name",original_name);
     $(".original").attr("dataHref",original);
-
+    
+    // 下载帮助
+    $('.icon-help').click(function(){
+      vant.Dialog.alert({
+        message: '点击附件即为下载,系统会扣除当月附件下载次数;每月下载次数有限,次月清零,请合理使用。',
+        className: 'custom-dialog',
+        confirmButtonText: '我知道了',
+        confirmButtonColor: '#2ABDD1',
+        width: 303,
+      }).then(() => {})
+    })
+    // 联系客服
+    $('.concat-kf').click(function(){
+      location.href = '/big/wx/page/customer'
+    })
 })
 function reward(){
 	window.location.href = "/jypay/weixin/reward/redirect?id={{.T.obj._id}}&source=m";

Энэ ялгаанд хэт олон файл өөрчлөгдсөн тул зарим файлыг харуулаагүй болно