|
@@ -260,6 +260,8 @@ var subComponent = {
|
|
|
conf: {}, // 信息类型数据
|
|
|
noAreaFreeType: false, // 免费用户未设置地区时显示弹窗
|
|
|
backTipShowCount: 0, // 离开页面展示弹窗次数
|
|
|
+ thisvSwitch: 'f',
|
|
|
+ UserSubscribe: {}, // 免费用户数据
|
|
|
}
|
|
|
},
|
|
|
mounted () {
|
|
@@ -286,6 +288,7 @@ var subComponent = {
|
|
|
}
|
|
|
},
|
|
|
vSwitch: function (val) {
|
|
|
+ sessionStorage.setItem('infoTypeVswitch', val)
|
|
|
if (val === 'f') {
|
|
|
this.getUserSubscribe()
|
|
|
}
|
|
@@ -703,7 +706,6 @@ var subComponent = {
|
|
|
},
|
|
|
// 重置信息类型
|
|
|
reset: function () {
|
|
|
- console.info(setInfoTypeFn.saveToSessionStorage())
|
|
|
if (this.isChange) {
|
|
|
this.infoTypeData = ['全部']
|
|
|
this.isChange = false
|
|
@@ -764,10 +766,34 @@ var subComponent = {
|
|
|
url: '/publicapply/free/subscribe',
|
|
|
type: 'POST',
|
|
|
success: function (res) {
|
|
|
+ _this.UserSubscribe = res
|
|
|
_this.userAreaNum = res.data.areanum
|
|
|
_this.userType = res.data.provincenum === 0 ? false : true
|
|
|
_this.userAreaAllNum = res.data.provincenum
|
|
|
+ _this.initdata.infotype = res.data.infotype
|
|
|
+ _this.info.infoType = _this.initdata.infotype.join('、')
|
|
|
// _this.$emit('UserSubscribe',res)
|
|
|
+
|
|
|
+ // let proStr = ''
|
|
|
+ // Object.keys(res.data.area).forEach(function(item,index) {
|
|
|
+ // if(res.data.area[item].length == 0) {
|
|
|
+ // proStr += item + '、'
|
|
|
+ // } else {
|
|
|
+ // let cityStr = ''
|
|
|
+ // res.data.area[item].forEach(function(data, i) {
|
|
|
+ // cityStr += data + '、'
|
|
|
+ // })
|
|
|
+ // if (cityStr.length > 0) {
|
|
|
+ // cityStr = cityStr.substr(0,cityStr.length - 1);
|
|
|
+ // }
|
|
|
+ // proStr += item+ '(' + cityStr + ')' + '、'
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ // if(proStr[proStr.length - 1] == '、') {
|
|
|
+ // proStr = proStr.substr(0,proStr.length - 1);
|
|
|
+ // }
|
|
|
+ // _this.info.area = '已选:' + proStr
|
|
|
+
|
|
|
let areaArr = []
|
|
|
if (res.data.area === {} || res.data.areanum) {
|
|
|
_this.noAreaFreeType = true
|
|
@@ -897,15 +923,17 @@ var custom = {
|
|
|
} else {
|
|
|
setdata = setdata.join(',')
|
|
|
}
|
|
|
+ let vswitch = sessionStorage.getItem('infoTypeVswitch')
|
|
|
$.ajax({
|
|
|
type:'POST',
|
|
|
url:'/publicapply/subscribe/setUserInfo',
|
|
|
data: {
|
|
|
pageType: 'infoType',
|
|
|
infoTypeArr: setdata,
|
|
|
- vSwitch: 'm'
|
|
|
+ vSwitch: vswitch
|
|
|
},
|
|
|
success:function(res){
|
|
|
+ sessionStorage.removeItem('infoTypeVswitch')
|
|
|
if(res.flag) {
|
|
|
sessionStorage.removeItem('big-setInfoType')
|
|
|
location.reload()
|