|
@@ -13,7 +13,7 @@ var vm = new Vue({
|
|
// 当前信息
|
|
// 当前信息
|
|
filter: {
|
|
filter: {
|
|
loaded: false, // 是否请求加载完成
|
|
loaded: false, // 是否请求加载完成
|
|
- pickerShow: false, //picker是否显示
|
|
|
|
|
|
+ pickerShow: false, // picker是否显示
|
|
groupName: '', // 为空表示全部
|
|
groupName: '', // 为空表示全部
|
|
allKeywordsList: [], // 筛选前的数组
|
|
allKeywordsList: [], // 筛选前的数组
|
|
keywordsList: [], // 筛选后的数组
|
|
keywordsList: [], // 筛选后的数组
|
|
@@ -23,7 +23,9 @@ var vm = new Vue({
|
|
upgrade: false // 关键词升级提示弹框
|
|
upgrade: false // 关键词升级提示弹框
|
|
},
|
|
},
|
|
tip: {
|
|
tip: {
|
|
- fastImport: true
|
|
|
|
|
|
+ fastImport: true, // 控制快速导入入口的显示隐藏
|
|
|
|
+ i_vip_fastimport: 0,
|
|
|
|
+ ordinarykc: 0
|
|
},
|
|
},
|
|
scrollTop: 0 // 记录滚动高度
|
|
scrollTop: 0 // 记录滚动高度
|
|
},
|
|
},
|
|
@@ -34,7 +36,8 @@ var vm = new Vue({
|
|
})
|
|
})
|
|
},
|
|
},
|
|
fastImportTipShow: function () {
|
|
fastImportTipShow: function () {
|
|
- return this.filter.allKeywordsList.length === 0 && this.filter.loaded && this.tip.fastImport
|
|
|
|
|
|
+ var needShow = this.tip.i_vip_fastimport == 0 && this.tip.ordinarykc > 0
|
|
|
|
+ return needShow && this.filter.loaded && this.tip.fastImport
|
|
},
|
|
},
|
|
listShow: function () {
|
|
listShow: function () {
|
|
return this.filter.keywordsList.length !== 0 && this.filter.loaded
|
|
return this.filter.keywordsList.length !== 0 && this.filter.loaded
|
|
@@ -65,10 +68,13 @@ var vm = new Vue({
|
|
}
|
|
}
|
|
},
|
|
},
|
|
created: function () {
|
|
created: function () {
|
|
- this.getKeywordsGroupList(true)
|
|
|
|
this.restoreState()
|
|
this.restoreState()
|
|
|
|
+ this.getKeywordsGroupList(true)
|
|
|
|
+ },
|
|
|
|
+ mounted: function () {
|
|
|
|
+ // 清除大会员初始化缓存
|
|
|
|
+ localStorage.removeItem('big_member_save_init_big_data_nov')
|
|
},
|
|
},
|
|
- mounted: function () {},
|
|
|
|
methods: {
|
|
methods: {
|
|
showLoading: function () {
|
|
showLoading: function () {
|
|
return this.$toast.loading({
|
|
return this.$toast.loading({
|
|
@@ -128,6 +134,14 @@ var vm = new Vue({
|
|
}
|
|
}
|
|
if (res && res.userData) {
|
|
if (res && res.userData) {
|
|
_this.userData = res.userData
|
|
_this.userData = res.userData
|
|
|
|
+ if (res.userData) {
|
|
|
|
+ _this.tip.i_vip_fastimport = res.userData.i_vip_fastimport
|
|
|
|
+ _this.tip.ordinarykc = res.userData.ordinarykc
|
|
|
|
+ // 关键词弹窗提醒 fasle:需要弹窗 true:不需要弹窗
|
|
|
|
+ if (!res.userData.b_keytip) {
|
|
|
|
+ _this.dialog.upgrade = true
|
|
|
|
+ }
|
|
|
|
+ }
|
|
if (res.userData && res.userData.o_vipjy) {
|
|
if (res.userData && res.userData.o_vipjy) {
|
|
// 整理数据
|
|
// 整理数据
|
|
var groupList = _this.addInfoToKeyItem(res.userData.o_vipjy.a_items)
|
|
var groupList = _this.addInfoToKeyItem(res.userData.o_vipjy.a_items)
|
|
@@ -165,7 +179,9 @@ var vm = new Vue({
|
|
groupList.forEach(function (keywordsList, index) {
|
|
groupList.forEach(function (keywordsList, index) {
|
|
if (keywordsList && Array.isArray(keywordsList.a_key)) {
|
|
if (keywordsList && Array.isArray(keywordsList.a_key)) {
|
|
keywordsList.groupIndex = index
|
|
keywordsList.groupIndex = index
|
|
- keywordsList.updatetime = _this.getMaxUpdateTime(keywordsList.a_key)
|
|
|
|
|
|
+ if (!keywordsList.updatetime) {
|
|
|
|
+ keywordsList.updatetime = 0
|
|
|
|
+ }
|
|
keywordsList.a_key.forEach(function (keyword, iindex) {
|
|
keywordsList.a_key.forEach(function (keyword, iindex) {
|
|
// 添加一些其他信息
|
|
// 添加一些其他信息
|
|
keyword.groupName = keywordsList.s_item // 分类名
|
|
keyword.groupName = keywordsList.s_item // 分类名
|
|
@@ -190,22 +206,13 @@ var vm = new Vue({
|
|
groupNameList.push({
|
|
groupNameList.push({
|
|
name: item.s_item, // 分类名
|
|
name: item.s_item, // 分类名
|
|
count: count, // 分类下有多少个关键词
|
|
count: count, // 分类下有多少个关键词
|
|
- groupIndex: item.groupIndex
|
|
|
|
|
|
+ groupIndex: item.groupIndex,
|
|
|
|
+ updatetime: item.updatetime
|
|
})
|
|
})
|
|
}
|
|
}
|
|
})
|
|
})
|
|
return groupNameList
|
|
return groupNameList
|
|
},
|
|
},
|
|
- getMaxUpdateTime: function (arr) {
|
|
|
|
- var max = 0
|
|
|
|
- if (!Array.isArray(arr)) return max
|
|
|
|
- arr.some(function (item) {
|
|
|
|
- if (item.updatetime && item.updatetime > max) {
|
|
|
|
- max = item.updatetime
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- return max
|
|
|
|
- },
|
|
|
|
calcKeyInfo: function (item) {
|
|
calcKeyInfo: function (item) {
|
|
// 匹配方式 item.matchway 0/null精准 1模糊
|
|
// 匹配方式 item.matchway 0/null精准 1模糊
|
|
var key = item.key
|
|
var key = item.key
|
|
@@ -454,6 +461,7 @@ var vm = new Vue({
|
|
location.href = '/jyapp/vipsubscribe/toSetinfoPage' + '?' + queryString
|
|
location.href = '/jyapp/vipsubscribe/toSetinfoPage' + '?' + queryString
|
|
},
|
|
},
|
|
toKeyManagePage: function () {
|
|
toKeyManagePage: function () {
|
|
|
|
+ this.filter.pickerShow = false
|
|
this.savePageState()
|
|
this.savePageState()
|
|
location.href = '/jyapp/vipsubscribe/toSetmanagePage'
|
|
location.href = '/jyapp/vipsubscribe/toSetmanagePage'
|
|
},
|
|
},
|
|
@@ -489,6 +497,15 @@ var vm = new Vue({
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
+ upgradeDialogClose: function () {
|
|
|
|
+ $.ajax({
|
|
|
|
+ type: 'POST',
|
|
|
|
+ url: '/subscribepay/afterPay/setUserInfo',
|
|
|
|
+ data: {
|
|
|
|
+ pageType: 'keytip'
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
// 恢复数据
|
|
// 恢复数据
|
|
restoreState: function () {
|
|
restoreState: function () {
|
|
var $data = sessionStorage.getItem(this.conf.sessKey)
|
|
var $data = sessionStorage.getItem(this.conf.sessKey)
|