浏览代码

Merge branch 'dev4.5.5' of http://127.0.0.1:8080/qmx/jy into dev4.5.5

zhangxinlei1996 4 年之前
父节点
当前提交
6a26b38663
共有 20 个文件被更改,包括 288 次插入99 次删除
  1. 77 11
      src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/js/change_area.js
  2. 34 17
      src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/js/keyWord.js
  3. 2 0
      src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/js/keyset-list.js
  4. 13 3
      src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/js/keyword-info.js
  5. 4 12
      src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/js/keyword-manage.js
  6. 1 1
      src/jfw/modules/app/src/web/templates/vipsubscribe/infoWord.html
  7. 2 1
      src/jfw/modules/app/src/web/templates/vipsubscribe/keyWord.html
  8. 1 1
      src/jfw/modules/app/src/web/templates/vipsubscribe/manageWord.html
  9. 3 1
      src/jfw/modules/app/src/web/templates/vipsubscribe/messageType.html
  10. 9 7
      src/jfw/modules/app/src/web/templates/vipsubscribe/vip_introduce.html
  11. 3 1
      src/web/staticres/common-module/vipsubscribe/js/vip-subscribe-set-template.js
  12. 77 3
      src/web/staticres/vipsubscribe/js/change_area.js
  13. 30 16
      src/web/staticres/vipsubscribe/js/keyWord.js
  14. 13 3
      src/web/staticres/vipsubscribe/js/keyword-info.js
  15. 4 12
      src/web/staticres/vipsubscribe/js/keyword-manage.js
  16. 1 1
      src/web/templates/weixin/vipsubscribe/infoWord.html
  17. 1 0
      src/web/templates/weixin/vipsubscribe/keyWord.html
  18. 1 1
      src/web/templates/weixin/vipsubscribe/manageWord.html
  19. 3 1
      src/web/templates/weixin/vipsubscribe/messageType.html
  20. 9 7
      src/web/templates/weixin/vipsubscribe/vip_introduce.html

+ 77 - 11
src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/js/change_area.js

@@ -63,6 +63,7 @@ $(function () {
 
     // 省下拉市事件
     var isAnimating = false
+    var keyItems = []
 
     function slideFunc() {
         if (isAnimating) return
@@ -99,6 +100,13 @@ $(function () {
         } else {
             isLockedTipButtons(false)
         }
+        if(Object.keys(selected) == '全国' || Object.keys(selected) == '') {
+            if(getParam('subvip') == 'free') {
+                isLockedTipButtons(true)
+            } else {
+                isLockedTipButtons(false) 
+            }
+        }
 
         //是否需要升级
         if (needUpgrade(getBuySet(selected, areaData.data.industry), {
@@ -132,11 +140,22 @@ $(function () {
                 if(getParam('subvip') == 'free') {
                     let freeSelect = Object.keys(new_selected)
                     if(freeSelect[0] == '全国') {
-                        isLockedTipButtons(true)
+                        if(keyItems.length == 0) {
+                            isLockedTipButtons(true)
+                        } else {
+                            isLockedTipButtons(false)
+                        }
                     }
                 }
                 return setDataInResult('.result-selected .result-info .info-overview', getBuySet(selected, []));
             }
+            if(!p) {
+                if(getParam('subvip') == 'free') {
+                    if(JSON.stringify(new_selected) == '{}') {
+                        isLockedTipButtons(true)
+                    }
+                }
+            }
             if (selected[p].length === 0) {
                 selectedCount.province++
             } else {
@@ -151,16 +170,29 @@ $(function () {
             $('.result .info-tip').hide().siblings('.info-overview').text('');
         } else {
             new_selected = selected
-            setDataInResult('.result-selected .result-info .info-overview', getBuySet(selected, []));
-        }
-        if(getParam('subvip') == 'free') {
-            console.log(Object.keys(new_selected))
-            let freeSelect = Object.keys(new_selected)
-            if(freeSelect.length > 1) {
-                isLockedTipButtons(true)
-            } else {
-                isLockedTipButtons(false)
+            // (1)免费订阅设置过订阅条件的用户,可继续选择全国和多个省份;
+            // (2)免费订阅未设置过订阅条件的用户,省份只可单选且不展示“全国”选项。
+            if(getParam('subvip') == 'free') {
+                console.log(Object.keys(new_selected))
+                let freeSelect = Object.keys(new_selected)
+                if(freeSelect.length > 1) {
+                    console.log(keyItems,$('.tab.whole').parents('li'))
+                    if(keyItems.length==0) {
+                        $('.tab.whole').parents('li').hide()
+                        isLockedTipButtons(true)
+                    } else {
+                        isLockedTipButtons(false)
+                    }
+                } else {
+                    if(!freeSelect) {
+                        if(JSON.stringify(new_selected) == '{}' || JSON.stringify(new_selected) == 'undefind') {
+                            isLockedTipButtons(true)
+                        }
+                    }
+                    isLockedTipButtons(false)
+                }
             }
+            setDataInResult('.result-selected .result-info .info-overview', getBuySet(selected, []));
         }
     }
 
@@ -182,7 +214,16 @@ $(function () {
         };
 
         if (selectedData.areacount === -1) {
-            $(selector).text('全国')
+            if(getParam('subvip') == 'free') {
+                let freeSelect = Object.keys(new_selected)
+                if(keyItems.length==0) {
+                    $(selector).text('')
+                } else {
+                    $(selector).text('全国')
+                }
+            } else {
+                $(selector).text('全国')
+            }
         } else {
             var dunhao = '';
             if (citySum !== 0 && selectedData.areacount !== 0) {
@@ -473,6 +514,31 @@ $(function () {
             if(!res.data.industry) {
                 res.data.industry = []
             }
+            if(res.data.items) {
+                res.data.items.forEach(function (item, index) {
+                    item.a_key.forEach(function(data,i) {
+                        keyItems.push(data.key[0])
+                    })
+                })
+                // (1)免费订阅设置过订阅条件的用户,可继续选择全国和多个省份;
+                // (2)免费订阅未设置过订阅条件的用户,省份只可单选且不展示“全国”选项。
+                if(getParam('subvip') == 'free') {
+                    let freeSelect = Object.keys(res.data.area)
+                    $('.result-purchased.result-item').hide()
+                    if(keyItems.length==0) {
+                        $('.tab.whole').parents('li').hide()
+                        $('.province.all-country').removeClass('active')
+                        $('.info-overview.ellipsis').html('')
+                        if(freeSelect.length > 1) {
+                            isLockedTipButtons(true)
+                        } else {
+                            isLockedTipButtons(false)
+                        }
+                    } else {
+                        isLockedTipButtons(false)
+                    }
+                }
+            }
             areaData.data = res.data
             res.data.oldArea = res.data.area;
             res.data.oldIndustry = res.data.industry;

+ 34 - 17
src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/js/keyWord.js

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

+ 2 - 0
src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/js/keyset-list.js

@@ -153,6 +153,8 @@ var keySet = new Vue({
   },
   mounted: function () {
     pTools.iosBackRefresh()
+    // 清除大会员初始化缓存
+    localStorage.removeItem('big_member_save_init_big_data_nov')
   },
   methods: {
     // 获取关键词数据

+ 13 - 3
src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/js/keyword-info.js

@@ -48,7 +48,7 @@ var vm = new Vue({
   },
   computed: {
     tooLittleTipShow: function () {
-      return this.pInfo.pushCount != 0 && this.pInfo.pushCount < 30 && this.keyInfo.key
+      return this.pInfo.pushCount !== '' && this.pInfo.pushCount < 30 && this.keyInfo.key
     },
     // 监听关键词和匹配方式变化
     needGetRecList: function () {
@@ -64,6 +64,13 @@ var vm = new Vue({
         notKey: this.keyInfo.notKey,
         matchWay: this.keyInfo.matchWay
       }
+    },
+    keyInfoChange2: function () {
+      return {
+        key: this.keyInfo.key,
+        notKey: this.keyInfo.notKey,
+        matchWay: this.keyInfo.matchWay
+      }
     }
   },
   watch: {
@@ -72,7 +79,10 @@ var vm = new Vue({
     }, 2000),
     keyInfoChange: utils.debounce(function () {
       this.getPushCount()
-    }, 2000)
+    }, 2000),
+    keyInfoChange2: function () {
+      this.pInfo.pushCount = ''
+    }
   },
   created: function () {
     // 获取url参数
@@ -139,7 +149,7 @@ var vm = new Vue({
           matchway: this.keyInfo.matchWay
         },
         success: function (res) {
-          if (res && res.count) {
+          if (res && res.count !== undefined && res.count !== null) {
             _this.pInfo.pushCount = res.count
           }
         }

+ 4 - 12
src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/js/keyword-manage.js

@@ -117,7 +117,9 @@ var vm = new Vue({
       groupList.forEach(function (keywordsList, index) {
         if (keywordsList && Array.isArray(keywordsList.a_key)) {
           keywordsList.groupIndex = index
-          keywordsList.updatetime = _this.getMaxUpdateTime(keywordsList.a_key)
+          if (!keywordsList.updatetime) {
+            keywordsList.updatetime = 0
+          }
           keywordsList.a_key.forEach(function (keyword, iindex) {
             // 添加一些其他信息
             keyword.groupName = keywordsList.s_item // 分类名
@@ -151,16 +153,6 @@ var vm = new Vue({
       })
       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
-    },
     // 通过已有分类得到一个未分类名
     getNewClassName: function () {
       var conf = {
@@ -368,7 +360,7 @@ var vm = new Vue({
         // 分类名不重复,新建分类
         this.saveGroupEdit(this.editGroupNameDialog.type)
       } else {
-        this.showToast('分类名不能重复')
+        // this.showToast('分类名不能重复')
       }
     },
     saveGroupEdit: function (type) {

+ 1 - 1
src/jfw/modules/app/src/web/templates/vipsubscribe/infoWord.html

@@ -1,5 +1,5 @@
 <!DOCTYPE html>
-<html lang="en">
+<html lang="zh-CN">
 
 <head>
     {{include "/common/meta.html"}}

+ 2 - 1
src/jfw/modules/app/src/web/templates/vipsubscribe/keyWord.html

@@ -114,7 +114,7 @@
             </div>
             <div class="j-button-group" v-else>
                 <button class="j-button-confirm" @click="addKeyWord" :disabled="filter.allKeywordsList.length >= conf.keywordMax">
-                    <span class="info-text">新增关键词</span>
+                    <span class="info-text">新增关键词</span>
                     <span class="sub-text">(${ totalKeywordsCount } / ${ conf.keywordMax })</span>
                 </button>
             </div>
@@ -138,6 +138,7 @@
         v-model="dialog.upgrade"
         class="dialog-upgrade"
         title="关键词升级提示"
+        @close="upgradeDialogClose"
         confirm-button-text="我知道了"
         confirm-button-color="#2abed1">
         <div class="fast-import-content">

+ 1 - 1
src/jfw/modules/app/src/web/templates/vipsubscribe/manageWord.html

@@ -1,5 +1,5 @@
 <!DOCTYPE html>
-<html lang="en">
+<html lang="zh-CN">
 
 <head>
     {{include "/common/meta.html"}}

+ 3 - 1
src/jfw/modules/app/src/web/templates/vipsubscribe/messageType.html

@@ -280,7 +280,9 @@
                 if(r.userData){
                     var _userData = r.userData;
                     var _vipData = _userData["o_vipjy"];
-                    var a_infotype = _vipData["a_infotype"]
+                    if(_vipData) {
+                        var a_infotype = _vipData["a_infotype"]
+                    }
                     if (a_infotype!=undefined&&a_infotype.length>0&&a_infotype!=""){
                         inputHtml(a_infotype);
                         isLockButton (true);

+ 9 - 7
src/jfw/modules/app/src/web/templates/vipsubscribe/vip_introduce.html

@@ -235,13 +235,15 @@
                         success:function(res) {
                             if(res.success) {
                                 _this.initData = res.data
-                                let proArea = res.data.area
-                                Object.keys(proArea).forEach(function(item, index) {
-                                    if(proArea[item].length !== 0) {
-                                        proArea[item] = []
-                                    }
-                                })
-                                sessionStorage.setItem('vipSubSelectArea', JSON.stringify(proArea))
+                                if(res.data.area) {
+                                    let proArea = res.data.area
+                                    Object.keys(proArea).forEach(function(item, index) {
+                                        if(proArea[item].length !== 0) {
+                                            proArea[item] = []
+                                        }
+                                    })
+                                    sessionStorage.setItem('vipSubSelectArea', JSON.stringify(proArea))
+                                }
                             }
                         }
                     })

+ 3 - 1
src/web/staticres/common-module/vipsubscribe/js/vip-subscribe-set-template.js

@@ -263,7 +263,9 @@ var subComponent = {
           } else {
               var arr = []
               state.items.forEach(function (item, index) {
-                  arr.push(item['s_item'])
+                item.a_key.forEach(function(data,i) {
+                  arr.push(data.key[0])
+                })
               })
               // $('.body-item.keywords .keywords-text').text(arr.join('、'))
               $('.body-item.keywords .keywords-text').text('已设置' +arr.length+ '组关键词')

+ 77 - 3
src/web/staticres/vipsubscribe/js/change_area.js

@@ -63,6 +63,7 @@ $(function () {
 
     // 省下拉市事件
     var isAnimating = false
+    var keyItems = []
 
     function slideFunc() {
         if (isAnimating) return
@@ -99,6 +100,13 @@ $(function () {
         } else {
             isLockedTipButtons(false)
         }
+        if(Object.keys(selected) == '全国' || Object.keys(selected) == '') {
+            if(getParam('subvip') == 'free') {
+                isLockedTipButtons(true)
+            } else {
+                isLockedTipButtons(false) 
+            }
+        }
 
         //是否需要升级
         if (needUpgrade(getBuySet(selected, areaData.data.industry), {
@@ -132,12 +140,22 @@ $(function () {
                 if(getParam('subvip') == 'free') {
                     let freeSelect = Object.keys(new_selected)
                     if(freeSelect[0] == '全国') {
-                        isLockedTipButtons(true)
+                        if(keyItems.length == 0) {
+                            isLockedTipButtons(true)
+                        } else {
+                            isLockedTipButtons(false)
+                        }
                     }
                 }
                 return setDataInResult('.result-selected .result-info .info-overview', getBuySet(selected, []));
             }
-
+            if(!p) {
+                if(getParam('subvip') == 'free') {
+                    if(JSON.stringify(new_selected) == '{}') {
+                        isLockedTipButtons(true)
+                    }
+                }
+            }
             if (selected[p].length === 0) {
                 selectedCount.province++
             } else {
@@ -152,6 +170,28 @@ $(function () {
             $('.result .info-tip').hide().siblings('.info-overview').text('');
         } else {
             new_selected = selected
+            // (1)免费订阅设置过订阅条件的用户,可继续选择全国和多个省份;
+            // (2)免费订阅未设置过订阅条件的用户,省份只可单选且不展示“全国”选项。
+            if(getParam('subvip') == 'free') {
+                console.log(Object.keys(new_selected))
+                let freeSelect = Object.keys(new_selected)
+                if(freeSelect.length > 1) {
+                    console.log(keyItems,$('.tab.whole').parents('li'))
+                    if(keyItems.length==0) {
+                        $('.tab.whole').parents('li').hide()
+                        isLockedTipButtons(true)
+                    } else {
+                        isLockedTipButtons(false)
+                    }
+                } else {
+                    if(!freeSelect) {
+                        if(JSON.stringify(new_selected) == '{}' || JSON.stringify(new_selected) == 'undefind') {
+                            isLockedTipButtons(true)
+                        }
+                    }
+                    isLockedTipButtons(false)
+                }
+            }
             setDataInResult('.result-selected .result-info .info-overview', getBuySet(selected, []));
         }
         if(getParam('subvip') == 'free') {
@@ -183,7 +223,16 @@ $(function () {
         };
 
         if (selectedData.areacount === -1) {
-            $(selector).text('全国')
+            if(getParam('subvip') == 'free') {
+                let freeSelect = Object.keys(new_selected)
+                if(keyItems.length==0) {
+                    $(selector).text('')
+                } else {
+                    $(selector).text('全国')
+                }
+            } else {
+                $(selector).text('全国')
+            }
         } else {
             var dunhao = '';
             if (citySum !== 0 && selectedData.areacount !== 0) {
@@ -474,6 +523,31 @@ $(function () {
             if(!res.data.industry) {
                 res.data.industry = []
             }
+            if(res.data.items) {
+                res.data.items.forEach(function (item, index) {
+                    item.a_key.forEach(function(data,i) {
+                        keyItems.push(data.key[0])
+                    })
+                })
+                // (1)免费订阅设置过订阅条件的用户,可继续选择全国和多个省份;
+                // (2)免费订阅未设置过订阅条件的用户,省份只可单选且不展示“全国”选项。
+                if(getParam('subvip') == 'free') {
+                    let freeSelect = Object.keys(res.data.area)
+                    $('.result-purchased.result-item').hide()
+                    if(keyItems.length==0) {
+                        $('.tab.whole').parents('li').hide()
+                        $('.province.all-country').removeClass('active')
+                        $('.info-overview.ellipsis').html('')
+                        if(freeSelect.length > 1) {
+                            isLockedTipButtons(true)
+                        } else {
+                            isLockedTipButtons(false)
+                        }
+                    } else {
+                        isLockedTipButtons(false)
+                    }
+                }
+            }
             areaData.data = res.data
             res.data.oldArea = res.data.area;
             res.data.oldIndustry = res.data.industry;

+ 30 - 16
src/web/staticres/vipsubscribe/js/keyWord.js

@@ -13,7 +13,7 @@ var vm = new Vue({
     // 当前信息
     filter: {
       loaded: false, // 是否请求加载完成
-      pickerShow: false, //picker是否显示
+      pickerShow: false, // picker是否显示
       groupName: '', // 为空表示全部
       allKeywordsList: [],  // 筛选前的数组
       keywordsList: [], // 筛选后的数组
@@ -23,7 +23,9 @@ var vm = new Vue({
       upgrade: false // 关键词升级提示弹框
     },
     tip: {
-      fastImport: true
+      fastImport: true, // 控制快速导入入口的显示隐藏
+      i_vip_fastimport: 0,
+      ordinarykc: 0
     },
     scrollTop: 0 // 记录滚动高度
   },
@@ -34,7 +36,8 @@ var vm = new Vue({
       })
     },
     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 () {
       return this.filter.keywordsList.length !== 0 && this.filter.loaded
@@ -65,8 +68,8 @@ var vm = new Vue({
     }
   },
   created: function () {
-    this.getKeywordsGroupList(true)
     this.restoreState()
+    this.getKeywordsGroupList(true)
   },
   mounted: function () {},
   methods: {
@@ -128,6 +131,14 @@ var vm = new Vue({
           }
           if (res && 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) {
               // 整理数据
               var groupList = _this.addInfoToKeyItem(res.userData.o_vipjy.a_items)
@@ -164,7 +175,9 @@ var vm = new Vue({
       groupList.forEach(function (keywordsList, index) {
         if (keywordsList && Array.isArray(keywordsList.a_key)) {
           keywordsList.groupIndex = index
-          keywordsList.updatetime = _this.getMaxUpdateTime(keywordsList.a_key)
+          if (!keywordsList.updatetime) {
+            keywordsList.updatetime = 0
+          }
           keywordsList.a_key.forEach(function (keyword, iindex) {
             // 添加一些其他信息
             keyword.groupName = keywordsList.s_item // 分类名
@@ -189,22 +202,13 @@ var vm = new Vue({
           groupNameList.push({
             name: item.s_item, // 分类名
             count: count, // 分类下有多少个关键词
-            groupIndex: item.groupIndex
+            groupIndex: item.groupIndex,
+            updatetime: item.updatetime
           })
         }
       })
       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) {
       // 匹配方式 item.matchway 0/null精准 1模糊
       var key = item.key
@@ -453,6 +457,7 @@ var vm = new Vue({
       location.href = '/front/vipsubscribe/toSetinfoPage' + '?' + queryString
     },
     toKeyManagePage: function () {
+      this.filter.pickerShow = false
       this.savePageState()
       location.href = '/front/vipsubscribe/toSetmanagePage'
     },
@@ -488,6 +493,15 @@ var vm = new Vue({
         }
       })
     },
+    upgradeDialogClose: function () {
+      $.ajax({
+        type: 'POST',
+        url: '/subscribepay/afterPay/setUserInfo',
+        data: {
+          pageType: 'keytip'
+        }
+      })
+    },
     // 恢复数据
     restoreState: function () {
       var $data = sessionStorage.getItem(this.conf.sessKey)

+ 13 - 3
src/web/staticres/vipsubscribe/js/keyword-info.js

@@ -48,7 +48,7 @@ var vm = new Vue({
   },
   computed: {
     tooLittleTipShow: function () {
-      return this.pInfo.pushCount != 0 && this.pInfo.pushCount < 30 && this.keyInfo.key
+      return this.pInfo.pushCount !== '' && this.pInfo.pushCount < 30 && this.keyInfo.key
     },
     // 监听关键词和匹配方式变化
     needGetRecList: function () {
@@ -64,6 +64,13 @@ var vm = new Vue({
         notKey: this.keyInfo.notKey,
         matchWay: this.keyInfo.matchWay
       }
+    },
+    keyInfoChange2: function () {
+      return {
+        key: this.keyInfo.key,
+        notKey: this.keyInfo.notKey,
+        matchWay: this.keyInfo.matchWay
+      }
     }
   },
   watch: {
@@ -72,7 +79,10 @@ var vm = new Vue({
     }, 2000),
     keyInfoChange: utils.debounce(function () {
       this.getPushCount()
-    }, 2000)
+    }, 2000),
+    keyInfoChange2: function () {
+      this.pInfo.pushCount = ''
+    }
   },
   created: function () {
     // 获取url参数
@@ -139,7 +149,7 @@ var vm = new Vue({
           matchway: this.keyInfo.matchWay
         },
         success: function (res) {
-          if (res && res.count) {
+          if (res && res.count !== undefined && res.count !== null) {
             _this.pInfo.pushCount = res.count
           }
         }

+ 4 - 12
src/web/staticres/vipsubscribe/js/keyword-manage.js

@@ -117,7 +117,9 @@ var vm = new Vue({
       groupList.forEach(function (keywordsList, index) {
         if (keywordsList && Array.isArray(keywordsList.a_key)) {
           keywordsList.groupIndex = index
-          keywordsList.updatetime = _this.getMaxUpdateTime(keywordsList.a_key)
+          if (!keywordsList.updatetime) {
+            keywordsList.updatetime = 0
+          }
           keywordsList.a_key.forEach(function (keyword, iindex) {
             // 添加一些其他信息
             keyword.groupName = keywordsList.s_item // 分类名
@@ -151,16 +153,6 @@ var vm = new Vue({
       })
       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
-    },
     // 通过已有分类得到一个未分类名
     getNewClassName: function () {
       var conf = {
@@ -368,7 +360,7 @@ var vm = new Vue({
         // 分类名不重复,新建分类
         this.saveGroupEdit(this.editGroupNameDialog.type)
       } else {
-        this.showToast('分类名不能重复')
+        // this.showToast('分类名不能重复')
       }
     },
     saveGroupEdit: function (type) {

+ 1 - 1
src/web/templates/weixin/vipsubscribe/infoWord.html

@@ -1,5 +1,5 @@
 <!DOCTYPE html>
-<html lang="en">
+<html lang="zh-CN">
 
 <head>
     <meta charset="UTF-8">

+ 1 - 0
src/web/templates/weixin/vipsubscribe/keyWord.html

@@ -131,6 +131,7 @@
         v-model="dialog.upgrade"
         class="dialog-upgrade"
         title="关键词升级提示"
+        @close="upgradeDialogClose"
         confirm-button-text="我知道了"
         confirm-button-color="#2abed1">
         <div class="fast-import-content">

+ 1 - 1
src/web/templates/weixin/vipsubscribe/manageWord.html

@@ -1,5 +1,5 @@
 <!DOCTYPE html>
-<html lang="en">
+<html lang="zh-CN">
 
 <head>
     <meta charset="UTF-8">

+ 3 - 1
src/web/templates/weixin/vipsubscribe/messageType.html

@@ -236,7 +236,9 @@
             if (r.userData) {
                 var _userData = r.userData;
                 var _vipData = _userData["o_vipjy"];
-                var a_infotype = _vipData["a_infotype"]
+                if(_vipData) {
+                    var a_infotype = _vipData["a_infotype"]
+                }
                 if (a_infotype != undefined && a_infotype.length > 0 && a_infotype != "") {
                     inputHtml(a_infotype);
                     isLockButton(true);

+ 9 - 7
src/web/templates/weixin/vipsubscribe/vip_introduce.html

@@ -231,13 +231,15 @@
                             success:function(res) {
                                 if(res.success) {
                                     _this.initData = res.data
-                                    let proArea = res.data.area
-                                    Object.keys(proArea).forEach(function(item, index) {
-                                        if(proArea[item].length !== 0) {
-                                            proArea[item] = []
-                                        }
-                                    })
-                                    sessionStorage.setItem('vipSubSelectArea', JSON.stringify(proArea))
+                                    if(res.data.area) {
+                                        let proArea = res.data.area
+                                        Object.keys(proArea).forEach(function(item, index) {
+                                            if(proArea[item].length !== 0) {
+                                                proArea[item] = []
+                                            }
+                                        })
+                                        sessionStorage.setItem('vipSubSelectArea', JSON.stringify(proArea))
+                                    }
                                 }
                             }
                         })