|
@@ -208,6 +208,8 @@ const handleDownload = debounce((item) => {
|
|
window.open(`${item.url}?name=${item.name}&id=${props.bId}`)
|
|
window.open(`${item.url}?name=${item.name}&id=${props.bId}`)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ // 重新获取报告按钮状态(查询使用次数)
|
|
|
|
+ getReportBtnStatus()
|
|
})
|
|
})
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -229,12 +231,12 @@ const onClickCompetitor = (ent, parent) => {
|
|
deductPackage(item, (code, data) => {
|
|
deductPackage(item, (code, data) => {
|
|
if (code === 0 && data) {
|
|
if (code === 0 && data) {
|
|
window.open(`/swordfish/page_big_pc/report/analysis/detail?id=${data}`)
|
|
window.open(`/swordfish/page_big_pc/report/analysis/detail?id=${data}`)
|
|
- // 重新获取报告按钮状态
|
|
|
|
- getReportBtnStatus()
|
|
|
|
} else {
|
|
} else {
|
|
// 没购买过||抵扣失败跳到购买页
|
|
// 没购买过||抵扣失败跳到购买页
|
|
window.open(`${parent.url}?name=${ent}&id=${props.bId}`)
|
|
window.open(`${parent.url}?name=${ent}&id=${props.bId}`)
|
|
}
|
|
}
|
|
|
|
+ // 重新获取报告按钮状态(查询使用次数)
|
|
|
|
+ getReportBtnStatus()
|
|
})
|
|
})
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -324,6 +326,12 @@ const startBubbleAnimation = () => {
|
|
|
|
|
|
// 套餐扣除
|
|
// 套餐扣除
|
|
const deductPackage = async (item, callback) => {
|
|
const deductPackage = async (item, callback) => {
|
|
|
|
+ const loading = that.$loading({
|
|
|
|
+ lock: true,
|
|
|
|
+ text: 'Loading',
|
|
|
|
+ spinner: 'el-icon-loading',
|
|
|
|
+ customClass: 'custom-toast-loading'
|
|
|
|
+ })
|
|
const { type, name } = item
|
|
const { type, name } = item
|
|
const params = {
|
|
const params = {
|
|
ent_name: type === 'competitor' ? name : '',
|
|
ent_name: type === 'competitor' ? name : '',
|
|
@@ -334,8 +342,10 @@ const deductPackage = async (item, callback) => {
|
|
}
|
|
}
|
|
try {
|
|
try {
|
|
const { error_code: code, data } = await ajaxReportEquityDeduct(params)
|
|
const { error_code: code, data } = await ajaxReportEquityDeduct(params)
|
|
|
|
+ loading.close()
|
|
callback && callback(code, data)
|
|
callback && callback(code, data)
|
|
} catch (error) {
|
|
} catch (error) {
|
|
|
|
+ loading.close()
|
|
callback && callback()
|
|
callback && callback()
|
|
}
|
|
}
|
|
}
|
|
}
|