فهرست منبع

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

TANGSHIZHE 4 سال پیش
والد
کامیت
5497fce28b

+ 1 - 1
src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/css/keyWord.css

@@ -87,7 +87,7 @@
   justify-content: center;
   margin-top: .28rem;
   padding: .16rem .48rem;
-  width: 3.2rem;
+  min-width: 3.2rem;
   height: 0.8rem;
   font-size: .32rem;
   line-height: .48rem;

+ 16 - 2
src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/js/keyWord.js

@@ -106,6 +106,14 @@ var vm = new Vue({
       }
       return arr.join('&')
     },
+    scrollTo: function (scrollTop, animate) {
+      var jMain = this.$refs.jMain
+      if (animate) {
+        $(jMain).animate({ scrollTop: scrollTop }, 300)
+      } else {
+        $(jMain).scrollTop(scrollTop)
+      }
+    },
     getKeywordsGroupList: function (needLoading) {
       var _this = this
       if (needLoading)  {
@@ -131,7 +139,7 @@ var vm = new Vue({
 
               if (needLoading && _this.scrollTop != 0) {
                 _this.$nextTick(function () {
-                  $(_this.$refs.jMain).animate({ scrollTop: _this.scrollTop }, 300)
+                  _this.scrollTo(_this.scrollTop)
                   _this.scrollTop = 0
                 })
               }
@@ -230,9 +238,13 @@ var vm = new Vue({
       this.showFilterPicker(false)
     },
     doFilter: function (groupName) {
+      var _this = this
       this.filter.groupName = groupName
       var rList = this.filterKeywordsList(groupName)
       this.filter.keywordsList = rList
+      this.$nextTick(function () {
+        _this.scrollTo(0)
+      })
     },
     // 筛选分类列表
     filterKeywordsList: function (filterName) {
@@ -492,7 +504,9 @@ var vm = new Vue({
     savePageState: function () {
       this.scrollTop = $(this.$refs.jMain).scrollTop()
       var data = {
-        filter: this.filter,
+        filter: {
+          groupName: this.filter.groupName
+        },
         scrollTop: this.scrollTop
       }
       sessionStorage.setItem(this.conf.sessKey, JSON.stringify(data))

+ 5 - 1
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 < 30
+      return this.pInfo.pushCount != 0 && this.pInfo.pushCount < 30 && this.keyInfo.key
     },
     // 监听关键词和匹配方式变化
     needGetRecList: function () {
@@ -505,6 +505,10 @@ var vm = new Vue({
             matchway: this.keyInfo.matchWay
           })
         }
+
+        if (filterArr.length === 0) {
+          filterArr = this.allKeywordsList
+        }
       } else {
         filterArr = this.allKeywordsList
       }

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

@@ -46,7 +46,7 @@
             <div class="module-rec pd">
                 <div class="rec-cells card-radius" v-show="recListState.listAll.length">
                     <div class="rec-header">
-                        <div class="rec-title">相似订阅条件推荐</div>
+                        <div class="rec-title">相似订阅推荐</div>
                         <div class="rec-change" @click="nextPageRec">
                             <van-icon :class="recListState.loading ? 'active' : ''" name="replay"></van-icon>
                             <span class="text">换一批</span>

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

@@ -90,7 +90,7 @@
                 <div class="empty-text">暂无关键词组</div>
                 <button class="add-keyword-button" @click="addKeyWord" :disabled="filter.allKeywordsList.length >= conf.keywordMax">
                     <van-icon name="plus"></van-icon>
-                    <span class="button-text">订阅关键词</span>
+                    <span class="button-text">添加关键词组</span>
                 </button>
                 <div class="keywords-count">
                     关键词添加数量:<span class="highlight-text">${ totalKeywordsCount }</span> / ${ conf.keywordMax }

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

@@ -127,7 +127,7 @@
                     </button>
                 </div>
                 <div class="j-button-group" v-else>
-                    <button class="j-button-confirm" @click="addGroup">新关键词分类</button>
+                    <button class="j-button-confirm" @click="addGroup">新关键词分类</button>
                 </div>
             </div>
         </div>

+ 1 - 1
src/web/staticres/vipsubscribe/css/keyWord.css

@@ -87,7 +87,7 @@
   justify-content: center;
   margin-top: .28rem;
   padding: .16rem .48rem;
-  width: 3.2rem;
+  min-width: 3.2rem;
   height: 0.8rem;
   font-size: .32rem;
   line-height: .48rem;

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

@@ -106,6 +106,14 @@ var vm = new Vue({
       }
       return arr.join('&')
     },
+    scrollTo: function (scrollTop, animate) {
+      var jMain = this.$refs.jMain
+      if (animate) {
+        $(jMain).animate({ scrollTop: scrollTop }, 300)
+      } else {
+        $(jMain).scrollTop(scrollTop)
+      }
+    },
     getKeywordsGroupList: function (needLoading) {
       var _this = this
       if (needLoading)  {
@@ -130,7 +138,7 @@ var vm = new Vue({
               _this.filter.allKeywordsList = _this.filterKeywordsList()
               if (needLoading && _this.scrollTop != 0) {
                 _this.$nextTick(function () {
-                  $(_this.$refs.jMain).animate({ scrollTop: _this.scrollTop }, 300)
+                  _this.scrollTo(_this.scrollTop)
                   _this.scrollTop = 0
                 })
               }
@@ -229,9 +237,13 @@ var vm = new Vue({
       this.showFilterPicker(false)
     },
     doFilter: function (groupName) {
+      var _this = this
       this.filter.groupName = groupName
       var rList = this.filterKeywordsList(groupName)
       this.filter.keywordsList = rList
+      this.$nextTick(function () {
+        _this.scrollTo(0)
+      })
     },
     // 筛选分类列表
     filterKeywordsList: function (filterName) {
@@ -491,7 +503,9 @@ var vm = new Vue({
     savePageState: function () {
       this.scrollTop = $(this.$refs.jMain).scrollTop()
       var data = {
-        filter: this.filter,
+        filter: {
+          groupName: this.filter.groupName
+        },
         scrollTop: this.scrollTop
       }
       sessionStorage.setItem(this.conf.sessKey, JSON.stringify(data))

+ 5 - 1
src/web/staticres/vipsubscribe/js/keyword-info.js

@@ -48,7 +48,7 @@ var vm = new Vue({
   },
   computed: {
     tooLittleTipShow: function () {
-      return this.pInfo.pushCount < 30
+      return this.pInfo.pushCount != 0 && this.pInfo.pushCount < 30 && this.keyInfo.key
     },
     // 监听关键词和匹配方式变化
     needGetRecList: function () {
@@ -505,6 +505,10 @@ var vm = new Vue({
             matchway: this.keyInfo.matchWay
           })
         }
+
+        if (filterArr.length === 0) {
+          filterArr = this.allKeywordsList
+        }
       } else {
         filterArr = this.allKeywordsList
       }

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

@@ -44,7 +44,7 @@
                 <div class="module-rec pd">
                     <div class="rec-cells card-radius" v-show="recListState.listAll.length">
                         <div class="rec-header">
-                            <div class="rec-title">相似订阅条件推荐</div>
+                            <div class="rec-title">相似订阅推荐</div>
                             <div class="rec-change" @click="nextPageRec">
                                 <van-icon :class="recListState.loading ? 'active' : ''" name="replay"></van-icon>
                                 <span class="text">换一批</span>

+ 2 - 2
src/web/templates/weixin/vipsubscribe/keyWord.html

@@ -83,7 +83,7 @@
                 <div class="empty-text">暂无关键词组</div>
                 <button class="add-keyword-button" @click="addKeyWord" :disabled="filter.allKeywordsList.length >= conf.keywordMax">
                     <van-icon name="plus"></van-icon>
-                    <span class="button-text">订阅关键词</span>
+                    <span class="button-text">添加关键词组</span>
                 </button>
                 <div class="keywords-count">
                     关键词添加数量:<span class="highlight-text">${ totalKeywordsCount }</span> / ${ conf.keywordMax }
@@ -107,7 +107,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>

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

@@ -125,7 +125,7 @@
                     </button>
                 </div>
                 <div class="j-button-group" v-else>
-                    <button class="j-button-confirm" @click="addGroup">新关键词分类</button>
+                    <button class="j-button-confirm" @click="addGroup">新关键词分类</button>
                 </div>
             </div>
         </div>