|
@@ -1,3 +1,60 @@
|
|
|
|
+/**
|
|
|
|
+ * 根据描述获取当前平台页面链接
|
|
|
|
+ * @param type
|
|
|
|
+ * @returns {string|*}
|
|
|
|
+ */
|
|
|
|
+function getPowerPageLink (type) {
|
|
|
|
+ var pageLinks = {
|
|
|
|
+ '订阅管理': {
|
|
|
|
+ app: '/jyapp/vipsubscribe/toSubVipSetPage',
|
|
|
|
+ wx: '/front/vipsubscribe/toSubVipSetPage'
|
|
|
|
+ },
|
|
|
|
+ '大会员-订阅管理': {
|
|
|
|
+ app: '/jyapp/vipsubscribe/toSubVipSetPage?vSwitch=m',
|
|
|
|
+ wx: '/front/vipsubscribe/toSubVipSetPage?vSwitch=m'
|
|
|
|
+ },
|
|
|
|
+ '超级订阅-订阅管理': {
|
|
|
|
+ app: '/jyapp/vipsubscribe/toSubVipSetPage?vSwitch=v',
|
|
|
|
+ wx: '/front/vipsubscribe/toSubVipSetPage?vSwitch=v'
|
|
|
|
+ },
|
|
|
|
+ '订阅': {
|
|
|
|
+ app: '/jyapp/swordfish/historypush',
|
|
|
|
+ wx: '/swordfish/newhistorypush'
|
|
|
|
+ },
|
|
|
|
+ '关键词设置': {
|
|
|
|
+ app: '/jyapp/vipsubscribe/toSetKeyWordPage',
|
|
|
|
+ wx: '/front/vipsubscribe/toSetKeyWordPage'
|
|
|
|
+ },
|
|
|
|
+ '旧版-关键词设置': {
|
|
|
|
+ app: '/jyapp/wxkeyset/keyset/index',
|
|
|
|
+ wx: '/wxkeyset/keyset/index'
|
|
|
|
+ },
|
|
|
|
+ '省份订阅包-设置省份': {
|
|
|
|
+ app: '/jyapp/areaPack/page/set_area',
|
|
|
|
+ wx: '/areaPack/wx/page/set_area'
|
|
|
|
+ },
|
|
|
|
+ '超级订阅-落地页': {
|
|
|
|
+ app: '/jyapp/vipsubscribe/introducePage',
|
|
|
|
+ wx: '/front/vipsubscribe/introducePage'
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if (Object.hasOwnProperty.call(pageLinks, type)) {
|
|
|
|
+ return pageLinks[type][utils.isWeiXinBrowser ? 'wx': 'app']
|
|
|
|
+ }
|
|
|
|
+ return ''
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+/**
|
|
|
|
+ * CV 移除缓存逻辑
|
|
|
|
+ */
|
|
|
|
+function removeSessionStorageForVm () {
|
|
|
|
+ sessionStorage.removeItem("historypushDataCache");
|
|
|
|
+ sessionStorage.removeItem("historypushPageIndexCache");
|
|
|
|
+ sessionStorage.removeItem("historypushScrollTop");
|
|
|
|
+ sessionStorage.removeItem("historypushHasNextPage");
|
|
|
|
+ sessionStorage.removeItem("closeAdvert");
|
|
|
|
+ sessionStorage.removeItem("hasFreeMore");
|
|
|
|
+}
|
|
var vm = new Vue({
|
|
var vm = new Vue({
|
|
el: '#select-meau',
|
|
el: '#select-meau',
|
|
delimiters: ['${', '}'],
|
|
delimiters: ['${', '}'],
|
|
@@ -137,7 +194,8 @@ var vm = new Vue({
|
|
}
|
|
}
|
|
this.subPageMove()
|
|
this.subPageMove()
|
|
if(firstTime) {
|
|
if(firstTime) {
|
|
- firstTime = firstTime / 1000 +'_'+ firstTime / 1000;
|
|
|
|
|
|
+ const pushtime = this.calcDateTime(firstTime / 1000)
|
|
|
|
+ firstTime = pushtime.start / 1000 + '_' + pushtime.end / 1000
|
|
this.time = firstTime
|
|
this.time = firstTime
|
|
this.setPushTime(firstTime)
|
|
this.setPushTime(firstTime)
|
|
}else {
|
|
}else {
|
|
@@ -146,10 +204,10 @@ var vm = new Vue({
|
|
// console.log(this.selectPro, '用户身份');
|
|
// console.log(this.selectPro, '用户身份');
|
|
},
|
|
},
|
|
mounted () {
|
|
mounted () {
|
|
- var recover = this.recover()
|
|
|
|
// 判断是否推送消息进入,清空缓存值,显示底部导航
|
|
// 判断是否推送消息进入,清空缓存值,显示底部导航
|
|
try {
|
|
try {
|
|
if (pushUrlTime) {
|
|
if (pushUrlTime) {
|
|
|
|
+ sessionStorage.removeItem(this.sessStorageKey)
|
|
this.setPushTime(pushUrlTime + '_' + pushUrlTime)
|
|
this.setPushTime(pushUrlTime + '_' + pushUrlTime)
|
|
this.revorceOtherData()
|
|
this.revorceOtherData()
|
|
JyObj.hiddenBottom("1")
|
|
JyObj.hiddenBottom("1")
|
|
@@ -157,6 +215,7 @@ var vm = new Vue({
|
|
} catch (e) {
|
|
} catch (e) {
|
|
console.log(e)
|
|
console.log(e)
|
|
}
|
|
}
|
|
|
|
+ var recover = this.recover()
|
|
if (!recover) {
|
|
if (!recover) {
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
// 如果订阅消息进来时间不为空
|
|
// 如果订阅消息进来时间不为空
|
|
@@ -274,8 +333,8 @@ var vm = new Vue({
|
|
// this.ajaxUrl = '/publicapply/subscribe/historyPush?t=' + new Date().getTime()
|
|
// this.ajaxUrl = '/publicapply/subscribe/historyPush?t=' + new Date().getTime()
|
|
}
|
|
}
|
|
firstTime = ''
|
|
firstTime = ''
|
|
- this.time = ''
|
|
|
|
- this.tagText.timeText = '时间'
|
|
|
|
|
|
+ this.time = ''
|
|
|
|
+ this.tagText.timeText = '时间'
|
|
this.bigSubShow = false
|
|
this.bigSubShow = false
|
|
ajaxFun(this.time, this.area, this.city, this.subscopeclass, this.buyerclass, this.key, this.subtype, this.selectFile, this.selectMoney)
|
|
ajaxFun(this.time, this.area, this.city, this.subscopeclass, this.buyerclass, this.key, this.subtype, this.selectFile, this.selectMoney)
|
|
},
|
|
},
|
|
@@ -466,13 +525,22 @@ var vm = new Vue({
|
|
this.showSuperVipDialog()
|
|
this.showSuperVipDialog()
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- // 订阅推送消息展示数据
|
|
|
|
- setPushTime: function(time) {
|
|
|
|
- // console.log(time)
|
|
|
|
|
|
+ calcDateTime: function (time) {
|
|
|
|
+ // @tip 调用时间选择组件函数格式化时间
|
|
|
|
+ const endTime = parseInt(String(time).split('_')[0] * 1000)
|
|
|
|
+
|
|
let pushtime = {
|
|
let pushtime = {
|
|
- start: parseInt(time.split('_')[0] * 1000),
|
|
|
|
- end: parseInt(time.split('_')[0] * 1000),
|
|
|
|
|
|
+ start: endTime,
|
|
|
|
+ end: endTime,
|
|
}
|
|
}
|
|
|
|
+ if (typeof dateComponent.methods.calcNotExactTime === 'function') {
|
|
|
|
+ pushtime = dateComponent.methods.calcNotExactTime('today', endTime)
|
|
|
|
+ }
|
|
|
|
+ return pushtime
|
|
|
|
+ },
|
|
|
|
+ // 订阅推送消息展示数据
|
|
|
|
+ setPushTime: function(time) {
|
|
|
|
+ const pushtime = this.calcDateTime(time)
|
|
this.tagText.timeText = new Date(pushtime.end).pattern('yyyy.MM.dd')
|
|
this.tagText.timeText = new Date(pushtime.end).pattern('yyyy.MM.dd')
|
|
this.selectDate.startDate = pushtime.start
|
|
this.selectDate.startDate = pushtime.start
|
|
this.selectDate.endDate= pushtime.end
|
|
this.selectDate.endDate= pushtime.end
|
|
@@ -547,7 +615,7 @@ var vm = new Vue({
|
|
sessionStorage.setItem('save-user-type-' + goTemplateData.params.userId, res.data.vt)
|
|
sessionStorage.setItem('save-user-type-' + goTemplateData.params.userId, res.data.vt)
|
|
|
|
|
|
if (type !== 'push' && res.data.vt != oldType) {
|
|
if (type !== 'push' && res.data.vt != oldType) {
|
|
- removeSessionStorage()
|
|
|
|
|
|
+ removeSessionStorageForVm()
|
|
sessionStorage.setItem('need-clear-' + + goTemplateData.params.userId, 'true')
|
|
sessionStorage.setItem('need-clear-' + + goTemplateData.params.userId, 'true')
|
|
location.reload()
|
|
location.reload()
|
|
return
|
|
return
|
|
@@ -778,7 +846,7 @@ var vm = new Vue({
|
|
setUserType = 'm'
|
|
setUserType = 'm'
|
|
}
|
|
}
|
|
sessionStorage.removeItem('history-set-user-type')
|
|
sessionStorage.removeItem('history-set-user-type')
|
|
- _this.switchVip(setUserType, 'push')
|
|
|
|
|
|
+ _this.switchVip(setUserType, canSelectMember ? 'push' : '')
|
|
} else {
|
|
} else {
|
|
_this.switchVip()
|
|
_this.switchVip()
|
|
}
|
|
}
|
|
@@ -844,6 +912,7 @@ var vm = new Vue({
|
|
},
|
|
},
|
|
confirm: function(data){
|
|
confirm: function(data){
|
|
if(data.name === 'dateItem'){
|
|
if(data.name === 'dateItem'){
|
|
|
|
+ firstTime = ''
|
|
const timeRange = {
|
|
const timeRange = {
|
|
start: (data.data.start / 1000).toFixed(0),
|
|
start: (data.data.start / 1000).toFixed(0),
|
|
end: (data.data.end / 1000).toFixed(0)
|
|
end: (data.data.end / 1000).toFixed(0)
|
|
@@ -944,6 +1013,7 @@ var vm = new Vue({
|
|
},
|
|
},
|
|
cancel: function(data){
|
|
cancel: function(data){
|
|
if(data.name === 'dateItem'){
|
|
if(data.name === 'dateItem'){
|
|
|
|
+ firstTime = ''
|
|
this.time = ''
|
|
this.time = ''
|
|
this.tagText.timeText = '时间'
|
|
this.tagText.timeText = '时间'
|
|
this.selectDate.start = ''
|
|
this.selectDate.start = ''
|
|
@@ -1024,3 +1094,33 @@ var vm = new Vue({
|
|
}
|
|
}
|
|
}
|
|
}
|
|
})
|
|
})
|
|
|
|
+/**
|
|
|
|
+ * 判断是否推送列表进入 (保留旧版app逻辑)
|
|
|
|
+ */
|
|
|
|
+function canChangePushTime () {
|
|
|
|
+ if (utils.isWeiXinBrowser) {
|
|
|
|
+ var selectTime = getUrlParam("times")
|
|
|
|
+ if (selectTime) {
|
|
|
|
+ removeSessionStorageForVm()
|
|
|
|
+ vm.setPushTime(selectTime +'_'+ selectTime)
|
|
|
|
+ if (getUrlParam("t") === 'member') {
|
|
|
|
+ sessionStorage.setItem('history-set-user-type', 'bigmember')
|
|
|
|
+ } else {
|
|
|
|
+ sessionStorage.removeItem('history-set-user-type')
|
|
|
|
+ }
|
|
|
|
+ history.replaceState(null, null, getPowerPageLink('订阅'))
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ if (getUrlParam("f") == "push") {
|
|
|
|
+ removeSessionStorageForVm();
|
|
|
|
+ if (history) {
|
|
|
|
+ var selectTime = getUrlParam("selectTime")
|
|
|
|
+ sessionStorage.setItem(sessionStorage.userId + "_searchTime", selectTime);
|
|
|
|
+ history.replaceState(null, null, getPowerPageLink('订阅'));
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+// 是否推送列表进入
|
|
|
|
+canChangePushTime()
|