|
@@ -25,10 +25,10 @@ var subNode = new Vue({
|
|
|
}
|
|
|
},
|
|
|
created () {
|
|
|
- this.getUserSubscribe()
|
|
|
- this.getUserType()
|
|
|
+
|
|
|
},
|
|
|
mounted () {
|
|
|
+ this.getUserType()
|
|
|
this.$nextTick(function () {
|
|
|
$(".app-layout-content-b").removeAttr('v-cloak')
|
|
|
})
|
|
@@ -48,17 +48,26 @@ var subNode = new Vue({
|
|
|
// 得到用户是否购买省份包
|
|
|
getUserSubscribe: function () {
|
|
|
let _this = this
|
|
|
+ _this.$refs.subComponent.getUserSubscribe(function (res) {
|
|
|
+ if (res && res.data) {
|
|
|
+ _this.freeUserArea = res.data.area
|
|
|
+ _this.userType = res.data.provincenum === 0 ? false : true
|
|
|
+ _this.userAreaAllNum = res.data.provincenum === -1 ? '全国' : res.data.provincenum
|
|
|
+ _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
|
|
|
+ _this.linkObj.pushsetting = _this.linkObj.freepush
|
|
|
+
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+
|
|
|
$.ajax({
|
|
|
- url: '/publicapply/free/subscribe',
|
|
|
+ url: '/publicapply/free/pushcount',
|
|
|
type: 'POST',
|
|
|
success: function (res) {
|
|
|
- _this.freeUserArea = res.data.area
|
|
|
- _this.userAreaNum = res.data.areanum
|
|
|
- _this.userType = res.data.provincenum === 0 ? false : true
|
|
|
- _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
|
|
|
+ if (res && res.count) {
|
|
|
+ _this.$refs.subComponent.$data.resultTime = '(近3个月内共' + res.count + '条信息)'
|
|
|
+ }
|
|
|
}
|
|
|
})
|
|
|
},
|
|
@@ -84,11 +93,13 @@ var subNode = new Vue({
|
|
|
$('.update_renew').hide()
|
|
|
$('.super-title').text('订阅管理-免费订阅');
|
|
|
$('.super-title').css('background', 'none')
|
|
|
+ _this.getUserSubscribe()
|
|
|
} else {
|
|
|
_this.vSwitch = 'v'
|
|
|
document.title = '订阅管理-超级订阅'
|
|
|
$('.update_renew').show()
|
|
|
$('.super-title').show();
|
|
|
+ window.getDataWitXHR()
|
|
|
}
|
|
|
}
|
|
|
})
|
|
@@ -345,7 +356,7 @@ $(function () {
|
|
|
$(".list-content").html(returnHtml);
|
|
|
}
|
|
|
|
|
|
- function getDataWitXHR() {
|
|
|
+ window.getDataWitXHR = function () {
|
|
|
$DoPost('/subscribepay/vipsubscribe/getSubBuyMsg', {}, function (res) {
|
|
|
if (!res.success) return;
|
|
|
if(!res.data.industry) {
|
|
@@ -1020,7 +1031,7 @@ $(function () {
|
|
|
// } else {
|
|
|
|
|
|
// }
|
|
|
- getDataWitXHR()
|
|
|
+ // getDataWitXHR()
|
|
|
//返回提示使用
|
|
|
function pushHistory() {
|
|
|
var state = {
|