|
@@ -2409,48 +2409,58 @@ function cjdyDownload (fname) {
|
|
|
title:goTemplateData.params.obj.title
|
|
|
},
|
|
|
success:function(data){
|
|
|
+ //P449 大客户附件下载无限制
|
|
|
if(data){
|
|
|
- if (data.r&&data.r.code&&data.r.code<0&&window.vipStatus>0){
|
|
|
- // 次数用完提醒去充值
|
|
|
- bidVue.$confirm('您本月附件下载机会已消耗完毕,如需下载更多附件,请前往充值。', {
|
|
|
- showClose:false,
|
|
|
- center: true,
|
|
|
- confirmButtonText: '立即充值',
|
|
|
- customClass: 'custom-alert',
|
|
|
- showCancelButton: true,
|
|
|
- confirmButtonClass: 'custom-confirm-btn',
|
|
|
- cancelButtonClass: 'custom-cancel-btn',
|
|
|
- cancelButtonText: '取消'
|
|
|
- }).then(function(data){
|
|
|
- location.href = '/swordfish/page_big_pc/free/filePack/buy'
|
|
|
- }).catch(function(){
|
|
|
- //$('.open-customer').trigger('click')
|
|
|
- //$('body').trigger('click')
|
|
|
- });
|
|
|
- }else if ((data.m && data.m!="")||data.r["downUrl"]==undefined||data.r["downUrl"]==""){
|
|
|
- bidVue.$confirm('附件下载异常,请前往联系客服。', {
|
|
|
- showClose:false,
|
|
|
- center: true,
|
|
|
- confirmButtonText: '取消',
|
|
|
- customClass: 'custom-alert',
|
|
|
- showCancelButton: true,
|
|
|
- confirmButtonClass: 'custom-cancel-btn',
|
|
|
- cancelButtonClass: 'custom-confirm-btn',
|
|
|
- cancelButtonText: '联系客服'
|
|
|
- }).then(function(data){
|
|
|
+ if (!entService){
|
|
|
+ if (data.r&&data.r.code&&data.r.code<0&&window.vipStatus>0){
|
|
|
+ // 次数用完提醒去充值
|
|
|
+ bidVue.$confirm('您本月附件下载机会已消耗完毕,如需下载更多附件,请前往充值。', {
|
|
|
+ showClose:false,
|
|
|
+ center: true,
|
|
|
+ confirmButtonText: '立即充值',
|
|
|
+ customClass: 'custom-alert',
|
|
|
+ showCancelButton: true,
|
|
|
+ confirmButtonClass: 'custom-confirm-btn',
|
|
|
+ cancelButtonClass: 'custom-cancel-btn',
|
|
|
+ cancelButtonText: '取消'
|
|
|
+ }).then(function(data){
|
|
|
+ location.href = '/swordfish/page_big_pc/free/filePack/buy'
|
|
|
+ }).catch(function(){
|
|
|
+ //$('.open-customer').trigger('click')
|
|
|
+ //$('body').trigger('click')
|
|
|
+ });
|
|
|
+ }else if ((data.m && data.m!=="")||data.r["downUrl"]===undefined||data.r["downUrl"]===""){
|
|
|
+ bidVue.$confirm('附件下载异常,请前往联系客服。', {
|
|
|
+ showClose:false,
|
|
|
+ center: true,
|
|
|
+ confirmButtonText: '取消',
|
|
|
+ customClass: 'custom-alert',
|
|
|
+ showCancelButton: true,
|
|
|
+ confirmButtonClass: 'custom-cancel-btn',
|
|
|
+ cancelButtonClass: 'custom-confirm-btn',
|
|
|
+ cancelButtonText: '联系客服'
|
|
|
+ }).then(function(data){
|
|
|
|
|
|
- }).catch(function(){
|
|
|
- $('.open-customer').trigger('click')
|
|
|
- $('body').trigger('click')
|
|
|
- });
|
|
|
+ }).catch(function(){
|
|
|
+ $('.open-customer').trigger('click')
|
|
|
+ $('body').trigger('click')
|
|
|
+ });
|
|
|
+ }else{
|
|
|
+ if(data.r&&fname == data.r["fileName"]){
|
|
|
+ if (!data.r["isExists"]){
|
|
|
+ $(".file-count").text($(".file-count").text()-1);
|
|
|
+ }
|
|
|
+ getFilePackLastCount()
|
|
|
+ location.href = data.r["downUrl"] + '?response-content-type=application/octet-stream'
|
|
|
+ //goDownload(data.r["downUrl"])
|
|
|
+ }
|
|
|
+ }
|
|
|
}else{
|
|
|
if(data.r&&fname == data.r["fileName"]){
|
|
|
if (!data.r["isExists"]){
|
|
|
$(".file-count").text($(".file-count").text()-1);
|
|
|
}
|
|
|
- getFilePackLastCount()
|
|
|
location.href = data.r["downUrl"] + '?response-content-type=application/octet-stream'
|
|
|
- //goDownload(data.r["downUrl"])
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -2486,8 +2496,12 @@ function getFileData () {
|
|
|
$(".downs").click(function (){
|
|
|
var name = $(this).find('a').text()
|
|
|
var fname = name.replace(/^\d+./, '')
|
|
|
- if(window.isFree){
|
|
|
- if(window.freeFile == 0){
|
|
|
+ //P449
|
|
|
+ if(location.pathname.indexOf('entservice') !== -1){
|
|
|
+ // 大客户来源 进入附件下载页面
|
|
|
+ cjdyDownload(fname)
|
|
|
+ }else if(window.isFree){
|
|
|
+ if(window.freeFile === 0){
|
|
|
// 判断有无留过资 且未体验过 - 去留资
|
|
|
// 弹窗留资弹框,第一个参数为source,第二个是留资成功后是否需要刷新页面 可不传,不传即为不刷新
|
|
|
// 不需要再调是否留资接口 只要isAdd接口里返回得对应参数值为0 即为需要留资 直接调noCallApiFn方法弹出弹框即可
|
|
@@ -2614,35 +2628,38 @@ function getFilePackLastCount () {
|
|
|
|
|
|
// 根据isAdd接口 展示附件部分dom
|
|
|
function showFileSomeDom () {
|
|
|
- // 免费用户展示可下载一次提示(免费用户且没有体验过附件下载权益的展示)
|
|
|
- $('.free-download .text').text(window.filePackAccount.number)
|
|
|
- if (window.isFree) {
|
|
|
- // 免费用户未留过资。次数为0,则值置为1,点击按钮引导留资
|
|
|
- if (window.freeFile == 0 && window.filePackAccount.number == 0) {
|
|
|
- $('.free-download .text').text(1)
|
|
|
- }
|
|
|
- if (window.freeFile == 0 || window.filePackAccount.number > 0) {
|
|
|
- // 展示按钮
|
|
|
- $('.free-download').css('display', 'inline-block')
|
|
|
- $('.free-go-open').hide()
|
|
|
- } else {
|
|
|
- // 展示引导超级订阅
|
|
|
- $('.free-go-open').css('display', 'inline-block')
|
|
|
- $('.free-download').hide()
|
|
|
- }
|
|
|
- }
|
|
|
- // 新超级订阅用户
|
|
|
- if (window.vipStatus > 0 && window.viper) {
|
|
|
- $('.super-vip-show').show()
|
|
|
- $('.super-vip-show .file-count').html(window.filePackAccount.number)
|
|
|
- $('.recharge-new').unbind("click").bind("click",function(){
|
|
|
- //超级订阅附件下载立即充值页面
|
|
|
- window.open("/swordfish/page_big_pc/free/filePack/buy")
|
|
|
- })
|
|
|
- }
|
|
|
- // 大会员隐藏次数
|
|
|
- if(window.memberStatus >0 && window.memberPower.indexOf(3) >= 0){
|
|
|
- $('.super-vip-show').hide()
|
|
|
+ //非大客户来源 P449
|
|
|
+ if(location.pathname.indexOf('entservice') <0) {
|
|
|
+ // 免费用户展示可下载一次提示(免费用户且没有体验过附件下载权益的展示)
|
|
|
+ $('.free-download .text').text(window.filePackAccount.number)
|
|
|
+ if (window.isFree) {
|
|
|
+ // 免费用户未留过资。次数为0,则值置为1,点击按钮引导留资
|
|
|
+ if (window.freeFile == 0 && window.filePackAccount.number == 0) {
|
|
|
+ $('.free-download .text').text(1)
|
|
|
+ }
|
|
|
+ if (window.freeFile == 0 || window.filePackAccount.number > 0) {
|
|
|
+ // 展示按钮
|
|
|
+ $('.free-download').css('display', 'inline-block')
|
|
|
+ $('.free-go-open').hide()
|
|
|
+ } else {
|
|
|
+ // 展示引导超级订阅
|
|
|
+ $('.free-go-open').css('display', 'inline-block')
|
|
|
+ $('.free-download').hide()
|
|
|
+ }
|
|
|
+ }
|
|
|
+ // 新超级订阅用户
|
|
|
+ if (window.vipStatus > 0 && window.viper) {
|
|
|
+ $('.super-vip-show').show()
|
|
|
+ $('.super-vip-show .file-count').html(window.filePackAccount.number)
|
|
|
+ $('.recharge-new').unbind("click").bind("click", function () {
|
|
|
+ //超级订阅附件下载立即充值页面
|
|
|
+ window.open("/swordfish/page_big_pc/free/filePack/buy")
|
|
|
+ })
|
|
|
+ }
|
|
|
+ // 大会员隐藏次数
|
|
|
+ if (window.memberStatus > 0 && window.memberPower.indexOf(3) >= 0) {
|
|
|
+ $('.super-vip-show').hide()
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
var isEntnicheNew = goTemplateData.params.isEntnicheNew
|