|
@@ -633,6 +633,46 @@ pre {
|
|
background-size: contain;
|
|
background-size: contain;
|
|
margin-right: .04rem;
|
|
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>
|
|
</style>
|
|
</head>
|
|
</head>
|
|
<body>
|
|
<body>
|
|
@@ -977,6 +1017,10 @@ pre {
|
|
<a class="adv_center" style="display: flex;flex-direction: column;flex: 1;">
|
|
<a class="adv_center" style="display: flex;flex-direction: column;flex: 1;">
|
|
<div class="join">
|
|
<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>
|
|
</div>
|
|
</a>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
@@ -1157,6 +1201,8 @@ var buyer_ = {{.T.obj.buyer}};
|
|
var buyerperson_ = {{.T.obj.buyerperson}};
|
|
var buyerperson_ = {{.T.obj.buyerperson}};
|
|
var buyertel_ = {{.T.obj.buyertel}};
|
|
var buyertel_ = {{.T.obj.buyertel}};
|
|
var isbid =false; //是否是中标,需要显示所有
|
|
var isbid =false; //是否是中标,需要显示所有
|
|
|
|
+var isFree = false;//是否是免费用户
|
|
|
|
+var fileNum = 0;//免费用户附件体验次数
|
|
//拟建项目广告
|
|
//拟建项目广告
|
|
var nj_adv=["批量导出拟建项目"]
|
|
var nj_adv=["批量导出拟建项目"]
|
|
//招标公告广告
|
|
//招标公告广告
|
|
@@ -1487,16 +1533,16 @@ function isOpening() {
|
|
url:'/bigmember/use/isAdd',
|
|
url:'/bigmember/use/isAdd',
|
|
success: function(res) {
|
|
success: function(res) {
|
|
//console.log(res)
|
|
//console.log(res)
|
|
- // res.data.memberStatus = 0
|
|
|
|
bigstatus = res.data.memberStatus
|
|
bigstatus = res.data.memberStatus
|
|
powerArr = res.data.power
|
|
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) {
|
|
if (bigstatus <= 0) {
|
|
getDrainInfo()
|
|
getDrainInfo()
|
|
- getAccountInfo()
|
|
|
|
$('.lead-btn').hide()
|
|
$('.lead-btn').hide()
|
|
if({{.T.obj.subtype}}!="拟建") {
|
|
if({{.T.obj.subtype}}!="拟建") {
|
|
$('.lead-btn').hide()
|
|
$('.lead-btn').hide()
|
|
@@ -1509,6 +1555,16 @@ function isOpening() {
|
|
}
|
|
}
|
|
if (res.data.power && res.data.power.indexOf(6) > -1) {
|
|
if (res.data.power && res.data.power.indexOf(6) > -1) {
|
|
$('#analysis-in').hide()
|
|
$('#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) {
|
|
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{
|
|
}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() {
|
|
$('.bigvip_drain').on('click', function() {
|
|
let powerInt = []
|
|
let powerInt = []
|
|
@@ -2468,7 +2521,21 @@ $(function(){
|
|
{{end}}
|
|
{{end}}
|
|
$(".original_name").attr("adv_name",original_name);
|
|
$(".original_name").attr("adv_name",original_name);
|
|
$(".original").attr("dataHref",original);
|
|
$(".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(){
|
|
function reward(){
|
|
window.location.href = "/jypay/weixin/reward/redirect?id={{.T.obj._id}}&source=m";
|
|
window.location.href = "/jypay/weixin/reward/redirect?id={{.T.obj._id}}&source=m";
|