|
@@ -14,7 +14,7 @@ var subScribeTemplate = `
|
|
</span>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
</a>
|
|
</a>
|
|
- <div class="amendmentNum">
|
|
|
|
|
|
+ <div class="amendmentNum" v-show="vSwitch === 'f'">
|
|
当年剩余可修改次数:<span class="numColor" v-show="userAreaNum != -1">{{userAreaNum}} </span><span v-show="userAreaNum != -1">次</span><span v-show="userAreaNum === -1">无限制</span>
|
|
当年剩余可修改次数:<span class="numColor" v-show="userAreaNum != -1">{{userAreaNum}} </span><span v-show="userAreaNum != -1">次</span><span v-show="userAreaNum === -1">无限制</span>
|
|
<i class="iconfont icon-bangzhu" @click="amendmentNumNotice"></i>
|
|
<i class="iconfont icon-bangzhu" @click="amendmentNumNotice"></i>
|
|
</div>
|
|
</div>
|
|
@@ -25,7 +25,7 @@ var subScribeTemplate = `
|
|
<span class="item-l">
|
|
<span class="item-l">
|
|
<span class="leading jy-icon-industry"></span>
|
|
<span class="leading jy-icon-industry"></span>
|
|
<span class="item-label">采购单位类型</span>
|
|
<span class="item-label">采购单位类型</span>
|
|
- <span class="openVip">开通</span>
|
|
|
|
|
|
+ <span class="openVip" v-show="vSwitch === 'f'">开通</span>
|
|
</span>
|
|
</span>
|
|
<span class="item-r">
|
|
<span class="item-r">
|
|
<span class="keywords-text ellipsis">{{info.industry}}</span>
|
|
<span class="keywords-text ellipsis">{{info.industry}}</span>
|
|
@@ -84,7 +84,7 @@ var subScribeTemplate = `
|
|
<span class="item-label matching">
|
|
<span class="item-label matching">
|
|
<span class="label-text">项目匹配</span>
|
|
<span class="label-text">项目匹配</span>
|
|
<i class="iconfont icon-bangzhu" @click="projectNotice"></i>
|
|
<i class="iconfont icon-bangzhu" @click="projectNotice"></i>
|
|
- <span class="openVip">开通</span>
|
|
|
|
|
|
+ <span class="openVip" v-show="vSwitch === 'f'">开通</span>
|
|
</span>
|
|
</span>
|
|
</span>
|
|
</span>
|
|
<span class="item-r media_switch">
|
|
<span class="item-r media_switch">
|
|
@@ -142,7 +142,7 @@ var subScribeTemplate = `
|
|
<p class="cell_title">按标题匹配</p>
|
|
<p class="cell_title">按标题匹配</p>
|
|
</div>
|
|
</div>
|
|
<div class="weui-actionsheet__cell allMacth" :class="{active:active==2}" @click="actionSheet('按全文匹配', 2)">
|
|
<div class="weui-actionsheet__cell allMacth" :class="{active:active==2}" @click="actionSheet('按全文匹配', 2)">
|
|
- <p class="cell_title">按全文匹配<span class="openVip-keywords">开通</span></p>
|
|
|
|
|
|
+ <p class="cell_title">按全文匹配<span class="openVip-keywords" v-show="vSwitch === 'f'">开通</span></p>
|
|
<p class="small-title">会产生无效信息,请根据需要选择</p>
|
|
<p class="small-title">会产生无效信息,请根据需要选择</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -192,9 +192,11 @@ var subComponent = {
|
|
},
|
|
},
|
|
"type": {
|
|
"type": {
|
|
type: String,
|
|
type: String,
|
|
- default: function() {
|
|
|
|
- return ''
|
|
|
|
- }
|
|
|
|
|
|
+ default: ''
|
|
|
|
+ },
|
|
|
|
+ vSwitch: {
|
|
|
|
+ type: String,
|
|
|
|
+ default: 'f'
|
|
}
|
|
}
|
|
},
|
|
},
|
|
data: function() {
|
|
data: function() {
|
|
@@ -245,7 +247,7 @@ var subComponent = {
|
|
infoTypeMenu: false, // 信息类型弹窗状态
|
|
infoTypeMenu: false, // 信息类型弹窗状态
|
|
infoTypeData: ['全部'], // 信息类型选择列表
|
|
infoTypeData: ['全部'], // 信息类型选择列表
|
|
isChange: false, // 信息类型是否做过更改
|
|
isChange: false, // 信息类型是否做过更改
|
|
- conf: {} // 信息类型数据
|
|
|
|
|
|
+ conf: {}, // 信息类型数据
|
|
}
|
|
}
|
|
},
|
|
},
|
|
mounted () {
|
|
mounted () {
|
|
@@ -259,7 +261,6 @@ var subComponent = {
|
|
}
|
|
}
|
|
this.getData()
|
|
this.getData()
|
|
this.$emit('mounted')
|
|
this.$emit('mounted')
|
|
- this.getUserSubscribe()
|
|
|
|
},
|
|
},
|
|
watch: {
|
|
watch: {
|
|
initdata: function(newVal, oldVal) {
|
|
initdata: function(newVal, oldVal) {
|
|
@@ -268,6 +269,11 @@ var subComponent = {
|
|
this.getData()
|
|
this.getData()
|
|
this.setIosData()
|
|
this.setIosData()
|
|
}
|
|
}
|
|
|
|
+ },
|
|
|
|
+ vSwitch: function (val) {
|
|
|
|
+ if (val === 'f') {
|
|
|
|
+ this.getUserSubscribe()
|
|
|
|
+ }
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
@@ -280,10 +286,11 @@ var subComponent = {
|
|
this.getProjectMatch()
|
|
this.getProjectMatch()
|
|
this.iosBackRefresh()
|
|
this.iosBackRefresh()
|
|
},
|
|
},
|
|
|
|
+ // 判断用户权限
|
|
|
|
+
|
|
// 设置区域
|
|
// 设置区域
|
|
setArea: function() {
|
|
setArea: function() {
|
|
let _this = this
|
|
let _this = this
|
|
- console.info(this.initdata)
|
|
|
|
if(this.initdata.area) {
|
|
if(this.initdata.area) {
|
|
if(_this.accStatus == 2) {
|
|
if(_this.accStatus == 2) {
|
|
sessionStorage.setItem('big-setArea', JSON.stringify(this.initdata.area))
|
|
sessionStorage.setItem('big-setArea', JSON.stringify(this.initdata.area))
|
|
@@ -417,10 +424,14 @@ var subComponent = {
|
|
},
|
|
},
|
|
switchs: function() {
|
|
switchs: function() {
|
|
// 用户未购买项目匹配功能
|
|
// 用户未购买项目匹配功能
|
|
- if (!this.userType) {
|
|
|
|
|
|
+ if (this.vSwitch === 'f') {
|
|
$('.switch').removeClass('checked')
|
|
$('.switch').removeClass('checked')
|
|
this.checkedflag = false
|
|
this.checkedflag = false
|
|
- var href = '/jyapp/vipsubscribe/introducePage'
|
|
|
|
|
|
+ if (location.href.indexOf('front') !== -1) {
|
|
|
|
+ var href = '/front/vipsubscribe/introducePage'
|
|
|
|
+ } else {
|
|
|
|
+ var href = '/jyapp/vipsubscribe/introducePage'
|
|
|
|
+ }
|
|
location.href = href
|
|
location.href = href
|
|
} else {
|
|
} else {
|
|
// switch点击切换
|
|
// switch点击切换
|
|
@@ -514,8 +525,14 @@ var subComponent = {
|
|
actionSheet: function(title, index) {
|
|
actionSheet: function(title, index) {
|
|
let _this = this
|
|
let _this = this
|
|
let vswitch = 'v'
|
|
let vswitch = 'v'
|
|
- if (index === 2) {
|
|
|
|
- location.href = '/jyapp/vipsubscribe/introducePage'
|
|
|
|
|
|
+ var href = ''
|
|
|
|
+ if (index === 2 && this.vSwitch === 'f') {
|
|
|
|
+ if (location.href.indexOf('front') !== -1) {
|
|
|
|
+ href = '/front/vipsubscribe/introducePage'
|
|
|
|
+ } else {
|
|
|
|
+ href = '/jyapp/vipsubscribe/introducePage'
|
|
|
|
+ }
|
|
|
|
+ location.href = href
|
|
} else {
|
|
} else {
|
|
if(_this.accStatus == 2) {
|
|
if(_this.accStatus == 2) {
|
|
vswitch = 'm'
|
|
vswitch = 'm'
|
|
@@ -593,19 +610,23 @@ var subComponent = {
|
|
},
|
|
},
|
|
// 用户未购买修改采购单位类型功能
|
|
// 用户未购买修改采购单位类型功能
|
|
userNoIndustry: function () {
|
|
userNoIndustry: function () {
|
|
- if (this.userType) {
|
|
|
|
|
|
+ if (this.vSwitch !== 'f') {
|
|
var href = '/jyapp/vipsubscribe/toChangeIndustry?header=save'
|
|
var href = '/jyapp/vipsubscribe/toChangeIndustry?header=save'
|
|
} else {
|
|
} else {
|
|
- var href = '/jyapp/vipsubscribe/introducePage'
|
|
|
|
|
|
+ if (location.href.indexOf('front') !== -1) {
|
|
|
|
+ var href = '/front/vipsubscribe/introducePage'
|
|
|
|
+ } else {
|
|
|
|
+ var href = '/jyapp/vipsubscribe/introducePage'
|
|
|
|
+ }
|
|
}
|
|
}
|
|
this.linkobj.industry = href
|
|
this.linkobj.industry = href
|
|
},
|
|
},
|
|
// 修改地区无次数点击事件
|
|
// 修改地区无次数点击事件
|
|
userNumOver: function () {
|
|
userNumOver: function () {
|
|
- if (this.userAreaNum === 0) {
|
|
|
|
|
|
+ if (this.vSwitch === 'f' && this.userAreaNum === 0) {
|
|
this.linkobj.area = 'javascript:;'
|
|
this.linkobj.area = 'javascript:;'
|
|
- if (this.userType) {
|
|
|
|
- var str = `对不起,您当月修改区域的机会(${this.userAreaAllNum}次)已消耗完毕,无法再次修改~可前往升级省份订阅包增加订阅省份和修改次数`
|
|
|
|
|
|
+ if (this.userAreaAllNum > 0) {
|
|
|
|
+ var str = `对不起,您当月修改区域的机会(${this.userAreaAllNum + this.userAreaNum}次)已消耗完毕,无法再次修改~可前往升级省份订阅包增加订阅省份和修改次数`
|
|
} else {
|
|
} else {
|
|
var str = `对不起,您今年修改免费订阅区域的机会(1次)已消耗完毕,无法再次修改~可前往购买省份订阅包增加订阅省份`
|
|
var str = `对不起,您今年修改免费订阅区域的机会(1次)已消耗完毕,无法再次修改~可前往购买省份订阅包增加订阅省份`
|
|
}
|
|
}
|
|
@@ -616,9 +637,23 @@ var subComponent = {
|
|
label: '取消',
|
|
label: '取消',
|
|
type: 'default'
|
|
type: 'default'
|
|
},{
|
|
},{
|
|
- label:'去购买',
|
|
|
|
|
|
+ label: this.userType ? '去升级' : '去购买',
|
|
onClick: function(){
|
|
onClick: function(){
|
|
|
|
+ if (this.userType) {
|
|
|
|
+ if (location.href.indexOf('front') !== -1) {
|
|
|
|
+ var href = '/areaPack/wx/page/buy?type=upgrade'
|
|
|
|
+ } else {
|
|
|
|
+ var href = '/jyapp/areaPack/page/buy?type=upgrade'
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ if (location.href.indexOf('front') !== -1) {
|
|
|
|
+ var href = '/areaPack/wx/page/buy?type=buy'
|
|
|
|
+ } else {
|
|
|
|
+ var href = '/jyapp/areaPack/page/buy?type=buy'
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
|
|
|
|
+ location.href = href
|
|
}
|
|
}
|
|
}]
|
|
}]
|
|
});
|
|
});
|
|
@@ -626,15 +661,15 @@ var subComponent = {
|
|
else {
|
|
else {
|
|
// this.linkobj.area = '/jyapp/big/page/set_area?callback=setting_save'
|
|
// this.linkobj.area = '/jyapp/big/page/set_area?callback=setting_save'
|
|
if (location.href.indexOf('front') !== -1) {
|
|
if (location.href.indexOf('front') !== -1) {
|
|
-
|
|
|
|
|
|
+ this.linkobj.area = '/areaPack/wx/page/set_area'
|
|
} else {
|
|
} else {
|
|
- this.linkobj.area = '/jyapp/areaPack/set_area'
|
|
|
|
|
|
+ this.linkobj.area = '/jyapp/areaPack/page/set_area'
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
// 修改地区剩余次数问号点击事件
|
|
// 修改地区剩余次数问号点击事件
|
|
amendmentNumNotice: function () {
|
|
amendmentNumNotice: function () {
|
|
- if (this.userType) {
|
|
|
|
|
|
+ if (this.userAreaAllNum > 0) {
|
|
var str = '每月可修改次数=可订阅省份数量,即每增加购买1个省份,可增加1次修改机会,次月清零重新计算,购买全国不限制每月修改次数。'
|
|
var str = '每月可修改次数=可订阅省份数量,即每增加购买1个省份,可增加1次修改机会,次月清零重新计算,购买全国不限制每月修改次数。'
|
|
} else {
|
|
} else {
|
|
var str = '免费用户每年享有 1 次修改区域的机会'
|
|
var str = '免费用户每年享有 1 次修改区域的机会'
|
|
@@ -707,10 +742,9 @@ var subComponent = {
|
|
url: '/publicapply/free/subscribe',
|
|
url: '/publicapply/free/subscribe',
|
|
type: 'POST',
|
|
type: 'POST',
|
|
success: function (res) {
|
|
success: function (res) {
|
|
- console.info(res)
|
|
|
|
_this.userAreaNum = res.data.areanum
|
|
_this.userAreaNum = res.data.areanum
|
|
_this.userType = res.data.provincenum === 0 ? false : true
|
|
_this.userType = res.data.provincenum === 0 ? false : true
|
|
- _this.userAreaAllNum = res.data.areanum + res.data.provincenum
|
|
|
|
|
|
+ _this.userAreaAllNum = res.data.provincenum
|
|
// _this.$emit('UserSubscribe',res)
|
|
// _this.$emit('UserSubscribe',res)
|
|
let areaArr = []
|
|
let areaArr = []
|
|
for (const key in res.data.area) {
|
|
for (const key in res.data.area) {
|
|
@@ -735,16 +769,18 @@ var subComponent = {
|
|
vt = 'v'
|
|
vt = 'v'
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- this.initdata.items.forEach(function(item) {
|
|
|
|
- item.a_key.forEach(function(r) {
|
|
|
|
- keyArr.push(r.key[0])
|
|
|
|
- if(r.notkey) {
|
|
|
|
- r.notkey.forEach(function(nok) {
|
|
|
|
- notKeyArr.push(nok)
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
|
|
+ if (this.initdata.items) {
|
|
|
|
+ this.initdata.items.forEach(function(item) {
|
|
|
|
+ item.a_key.forEach(function(r) {
|
|
|
|
+ keyArr.push(r.key[0])
|
|
|
|
+ if(r.notkey) {
|
|
|
|
+ r.notkey.forEach(function(nok) {
|
|
|
|
+ notKeyArr.push(nok)
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ })
|
|
})
|
|
})
|
|
- })
|
|
|
|
|
|
+ }
|
|
let _this = this
|
|
let _this = this
|
|
$.ajax({
|
|
$.ajax({
|
|
type: 'POST',
|
|
type: 'POST',
|
|
@@ -800,8 +836,8 @@ var setInfoTypeFn = {
|
|
if (initData) {
|
|
if (initData) {
|
|
initData = JSON.parse(initData)
|
|
initData = JSON.parse(initData)
|
|
console.log(initData)
|
|
console.log(initData)
|
|
- vNode.data.initInfoType = initData
|
|
|
|
- vueComponent.setInfoTypeState(vNode.data.initInfoType)
|
|
|
|
|
|
+ // vNode.data.initInfoType = initData
|
|
|
|
+ // vueComponent.setInfoTypeState(vNode.data.initInfoType)
|
|
}
|
|
}
|
|
},
|
|
},
|
|
saveToSessionStorage: function (data) {
|
|
saveToSessionStorage: function (data) {
|