|
@@ -47,11 +47,7 @@ var subNode = new Vue({
|
|
|
},
|
|
|
// 省份订阅包升级
|
|
|
updateBtn: function () {
|
|
|
- let thisList = []
|
|
|
- for (const key in this.freeUserArea) {
|
|
|
- thisList.push(key)
|
|
|
- }
|
|
|
- location.href = '/jyapp/areaPack/page/buy?type=upgrade&area=' + encodeURIComponent(JSON.stringify(thisList))
|
|
|
+ location.href = '/jyapp/areaPack/page/buy?type=upgrade&area=' + encodeURIComponent(JSON.stringify(this.freeUserArea))
|
|
|
},
|
|
|
// 得到用户是否购买省份包
|
|
|
getUserSubscribe: function () {
|
|
@@ -63,7 +59,7 @@ var subNode = new Vue({
|
|
|
_this.freeUserArea = res.data.area
|
|
|
_this.userAreaNum = res.data.areanum
|
|
|
_this.userType = res.data.provincenum === 0 ? false : true
|
|
|
- _this.userAreaAllNum = res.data.provincenum
|
|
|
+ _this.userAreaAllNum = res.data.provincenum === -1 ? '全国' : res.data.provincenum
|
|
|
// _this.$emit('UserSubscribe',res)
|
|
|
_this.subscribeTime = new Date(res.data.ppstart * 1000).pattern('yyyy年MM月dd日') + "-" + new Date(res.data.ppend * 1000).pattern('yyyy年MM月dd日')
|
|
|
_this.initdata = res.data
|
|
@@ -416,13 +412,14 @@ $(function () {
|
|
|
// 设置已购买的区域和行业
|
|
|
function setBuyAreaAndInd(buySet) {
|
|
|
// 设置已购买区域
|
|
|
- var buySetCitySum = arrSum(buySet.newcitys)
|
|
|
+ if (buySet) {
|
|
|
+ var buySetCitySum = arrSum(buySet.newcitys)
|
|
|
+ }
|
|
|
var text = {
|
|
|
p: buySet.areacount === 0 ? '' : buySet.areacount + '个省',
|
|
|
c: buySetCitySum === 0 ? '' : buySetCitySum + '个市',
|
|
|
s: buySet.newcitys.length === 1 ? '' : '(分布在' + buySet.newcitys.length + '个省内)'
|
|
|
}
|
|
|
-
|
|
|
if (buySet.areacount === -1) {
|
|
|
$('.vip-body .area .buy-set-area').text('全国')
|
|
|
} else {
|