示例
{{getTextMap.titleText}}
{{getTextMap.headText.top}}
{{getTextMap.headText.bot}}
登录后解锁会员查看更多内容
`
var vipComponent = {
name: 'vip-dialog',
template: vipDialog,
props: {
'imgurl': {
type: String,
default: function() {
return ''
}
},
"canFreeExp": {
type: Boolean,
default: function () {
return false
}
},
"entvisit": {
type: Object,
default: function () {
return {
total: 0, // 本月画像次数总量
usage: 0, // 本月已使用次数
provin: 0 // 购买省份数量
}
}
},
"type": {
type: String,
default: function () {
return ''
}
},
"vipststus": {
type: Number,
default: function () {
return 0
}
},
"power": {
type: Object,
default: function () {
return {}
}
},
'newvip': {
type: Boolean,
default: function() {
return false
}
},
'islogin': {
type: Boolean,
default: function() {
return false
}
}
},
data: function() {
return {
titleText: '开通超级订阅',
btnText: '去开通',
headText: {
top: '通过实时监控项目的招标、中标、合同等',
bot: '信息,全面挖掘更多潜在商机!'
}
}
},
computed: {
getTextMap () {
// console.log(this.power)
var textMap = {
titleText: '开通超级订阅',
btnText: '去开通',
headText: {
top: '通过实时监控项目的招标、中标、合同等',
bot: '信息,全面挖掘更多潜在商机!'
},
source: ''
}
// console.log(this.power, this.power.isMember, this.power._4, this.power._13, this.newvip,this.entvisit, this.power.vipStatus)
if (this.power.isMember > 0 ) {
if (this.entvisit.total <= this.entvisit.usage && this.newvip) {
textMap.btnText = '联系客服'
} else {
if (this.type === 'item_8' || this.type === 'item_9') {
textMap.btnText = '联系客服'
} else {
textMap.btnText = !this.newvip && this.power.vipStatus > 0 ? '前往升级' : '去开通'
}
}
} else {
if (this.entvisit.total <= this.entvisit.usage && this.newvip) {
if (this.entvisit.provin == 0) {
textMap.btnText = '去开通'
} else if (this.entvisit.provin != -1) {
textMap.titleText = '超级订阅'
textMap.btnText = '前往升级'
if (this.type === 'item_8' || this.type === 'item_9') {
textMap.btnText = '免费体验'
}
} else if(this.entvisit.provin == -1) {
textMap.titleText = '超级订阅'
textMap.btnText = '联系客服'
if (this.type === 'item_8' || this.type === 'item_9') {
textMap.btnText = '免费体验'
}
}
} else {
if (this.type === 'item_8' || this.type === 'item_9') {
textMap.btnText = '免费体验'
} else {
textMap.btnText = !this.newvip && this.power.vipStatus > 0 ? '前往升级' : '去开通'
}
}
// (2)【立即解锁】:未体验过企业画像的免费用户,中标分析各模块,点击进行“欢迎体验企业中标分析”留资;
if (this.canFreeExp) {
textMap.btnText = '立即解锁'
} else {
if (this.power.vipStatus <= 0) {
textMap.btnText = '去开通'
} else if (!this.newvip && this.entvisit.provin != -1 && this.entvisit.total >= 0) {
// (4)【前往升级】:超级订阅老版用户,中标分析各模块;购买了非全国的超级订阅新版用户且企业画像余额为0;点击进入超级订阅升级页;
textMap.btnText = '前往升级'
}
}
}
switch (this.type) {
// 项目动态
case 'item_1': {
var buttonText = ''
// 非超级订阅,仅开通了大会员自定义(无13项目动态权限)
if (this.power.vipStatus <= 0 && this.power.isMember > 0 && !this.power._13) {
buttonText = '联系客服'
}
if (buttonText) {
textMap.btnText = buttonText
}
textMap.headText.top = '通过实时监控项目的招标、中标、合同等'
textMap.headText.bot = '信息,全面挖掘更多潜在商机!'
textMap.source = 'ent_portrait_winnerNewMsg_freeuser'
break
}
// 年度项目统计
case 'item_2': {
textMap.titleText = '开通大会员'
// textMap.btnText = this.power.isMember > 0 && !this.power._4 ? '联系客服' : '免费体验'
textMap.headText.top = '年度项目规模、增长趋势一目了然,'
textMap.headText.bot = '快速分析市场!'
textMap.source = 'ent_portrait_yearData_freeuser'
break
}
// 月度中标金额统计
case 'item_3': {
textMap.titleText = '开通大会员'
// textMap.btnText = this.power.isMember > 0 && !this.power._4 ? '联系客服' : '免费体验'
textMap.headText.top = '纵向对比采购单位各个年份月度采购规模,'
textMap.headText.bot = '不错过任何商机!'
textMap.source = 'ent_portrait_monthData_freeuser'
break
}
// 市场区域分布
case 'item_4': {
textMap.titleText = '开通大会员'
// textMap.btnText = this.power.isMember > 0 && !this.power._4 ? '联系客服' : '免费体验'
textMap.headText.top = '通过企业市场规模、市场格局,'
textMap.headText.bot = '分析企业的市场发展现状!'
textMap.source = 'ent_portrait_areaData_freeuser'
break
}
// 各类客户平均折扣率
case 'item_5': {
textMap.titleText = '开通大会员'
// textMap.btnText = this.power.isMember > 0 && !this.power._4 ? '联系客服' : '免费体验'
textMap.headText.top = '通过各个年份各类客户平均折扣率范围,'
textMap.headText.bot = '透视企业的行业盈利能力!'
textMap.source = 'ent_portrait_discountRate_freeuser'
break
}
// 客户类型分布
case 'item_6': {
textMap.titleText = '开通大会员'
// textMap.btnText = this.power.isMember > 0 && !this.power._4 ? '联系客服' : '免费体验'
textMap.headText.top = '通过企业主要客户类型分析,'
textMap.headText.bot = '洞悉企业业务模式、经营状况!'
textMap.source = 'ent_portrait_top10_freeuser'
break
}
// 重点客户
case 'item_7': {
textMap.titleText = '开通大会员'
// textMap.btnText = this.power.isMember > 0 && !this.power._4 ? '联系客服' : '免费体验'
textMap.headText.top = '通过挖掘企业重点及首次合作客户,直观了解'
textMap.headText.bot = '采购单位与供应商关系远近,辅助投标决策!'
textMap.source = 'ent_portrait_topShow_freeuser'
break
}
// 企业情报历史记录(工商变动)
case 'item_8': {
textMap.titleText = '开通大会员'
textMap.btnText = this.power.isMember > 0 && !this.power._12 ? '联系客服' : '免费体验'
textMap.headText.top = '快速查询全国企业工商信息、法人信息、'
textMap.headText.bot = '联系方式,全面掌控企业动态!'
textMap.source = 'ent_portrait_changeList'
break
}
// 历史项目联系方式
case 'item_9': {
textMap.titleText = '开通大会员'
textMap.btnText = this.power.isMember > 0 && this.power.arr.indexOf(4) == -1 ? '联系客服' : '免费体验'
textMap.headText.top = '获取企业联系人信息,一键拨打!'
textMap.headText.bot = ''
textMap.source = 'ent_portrait_contacts'
break
}
// 统计信息-概况
case 'item_10': {
textMap.titleText = ''
textMap.btnText = this.power.isMember > 0 && this.power.arr.indexOf(4) == -1 ? '联系客服' : '免费体验'
textMap.headText.top = '全面透视企业历史中标项目、中标'
textMap.headText.bot = '金额、客户数量'
textMap.source = 'ent_portrait_bidInfoDesc'
break
}
default: {
textMap.headText.top = '通过实时监控项目的招标、中标、合同等'
textMap.headText.bot = '信息,全面挖掘更多潜在商机!'
textMap.source = 'ent_portrait_new_free'
break
}
}
// 未登录
if(!this.islogin) {
textMap.btnText = '登录查看'
}
return textMap
},
},
methods: {
goOpenOfApp: function (btnText, source) {
switch (btnText) {
case '去开通': {
if(this.type == 'item_9' || this.type == 'item_8') {
// 跳转到大会员
// location.href = '/jyapp/big/page/buy_commit'
location.href = '/jy_mobile/common/order/create/bigmember'
// location.href = '/jyapp/frontPage/bigmember/free/perfect_info?source=ent_portrait'
} else {
// 跳转到超级订阅
// location.href = '/jyapp/vipsubscribe/vipsubscribe_new'
location.href = '/jy_mobile/common/order/create/svip?type=buy'
}
break
}
case '免费体验': {
location.href = '/jyapp/frontPage/bigmember/free/perfect_info?source=' + source
break
}
case '前往升级': {
//跳转清除旧套餐缓存,防止计算价格出错
sessionStorage.removeItem('vipSub_oldBuySet')
// location.href = '/jyapp/vipsubscribe/upgradePage'
location.href = '/jy_mobile/common/order/create/svip?type=upgrade'
break
}
case '联系客服': {
location.href = '/jyapp/free/customer'
break
}
case '立即解锁': {
location.href = '/jyapp/frontPage/bigmember/free/perfect_info?source=ent_portrait_freeuser'
break
}
case '登录查看': {
location.href = '/jyapp/free/login?to=back'
break
}
default: {
// location.href = '/jyapp/vipsubscribe/vipsubscribe_new'
location.href = '/jy_mobile/common/order/create/svip?type=buy'
break
}
}
},
goOpenOfWx: function (btnText, source) {
switch (btnText) {
case '去开通': {
if(this.type == 'item_9' || this.type == 'item_8') {
// 跳转到大会员
// location.href = '/big/wx/page/buy_commit'
location.href = '/jy_mobile/common/order/create/bigmember'
} else {
// 跳转到超级订阅
// location.href = '/front/vipsubscribe/vipsubscribe_new'
location.href = '/jy_mobile/common/order/create/svip?type=buy'
}
break
}
case '免费体验': {
location.href = '/weixin/frontPage/bigmember/free/perfect_info?source=' + source
break
}
case '前往升级': {
// location.href = '/front/vipsubscribe/upgradePage'
location.href = '/jy_mobile/common/order/create/svip?type=upgrade'
break
}
case '联系客服': {
location.href = '/big/wx/page/customer'
break
}
case '立即解锁': {
location.href = '/weixin/frontPage/bigmember/free/perfect_info?source=ent_portrait_freeuser'
break
}
default: {
// location.href = '/front/vipsubscribe/vipsubscribe_new'
location.href = '/jy_mobile/common/order/create/svip?type=buy'
break
}
}
},
goOpen: function(source) {
// 点击按钮保存tabActiveName值
this.$emit('tabactive', 'save')
const isWeixin = utils.isWeiXinBrowser
if (isWeixin) {
this.goOpenOfWx(this.getTextMap.btnText, source)
} else {
this.goOpenOfApp(this.getTextMap.btnText, source)
}
}
}
}