Bladeren bron

feat: 免费用户关键词页面添加完成按钮

cuiyalong 3 jaren geleden
bovenliggende
commit
9c30ce2f4e

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

@@ -168,3 +168,18 @@
   flex: 1;
 }
 
+.free .j-button-confirm {
+  height: 0.8rem;
+  border-radius: .08rem;
+}
+.free .j-button-confirm.white-bg {
+  background-color: #EDEFF2;
+  color: #171826;
+}
+.j-footer .j-button-group .j-button-confirm:nth-of-type(1) {
+  flex: 7;
+}
+.j-footer .j-button-group .j-button-confirm:nth-of-type(2) {
+  margin-left: .2rem;
+  flex: 3;
+}

+ 3 - 0
src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/js/keyWord.js

@@ -671,6 +671,9 @@ var vm = new Vue({
         }
       })
     },
+    completeToEdit: function () {
+      history.back()
+    },
     // 恢复数据
     restoreState: function () {
       var $data = sessionStorage.getItem(this.conf.sessKey)

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

@@ -100,7 +100,7 @@
                 </div>
           </div>
         </div>
-        <div class="j-footer" v-show="listShow">
+        <div class="j-footer" :class="{ free: vSwitch === 'f' }" v-show="listShow">
             <van-notice-bar
                 class="footer-tip center"
                 color="#2abed1"
@@ -110,16 +110,17 @@
                 任意1组关键词组匹配成功即推送相关信息
             </van-notice-bar>
             <div class="j-button-group" v-if="batchDeleteState">
-                <button class="j-button-confirm" @click="batchDelete" :disabled="this.selectedCount <= 0">
+                <button class="j-button-confirm" :class="{ 'white-bg': vSwitch === 'f' }" @click="batchDelete" :disabled="this.selectedCount <= 0">
                     <span class="info-text">删除</span>
                     <span class="sub-text">(已选中${ selectedCount }项)</span>
                 </button>
             </div>
             <div class="j-button-group" v-else>
-                <button class="j-button-confirm" @click="clickAddKeyWordButton" :disabled="fullKeys && vSwitch !== 'f'">
+                <button class="j-button-confirm white-bg" @click="clickAddKeyWordButton" :disabled="fullKeys && vSwitch !== 'f'">
                     <span class="info-text">${ addNewKeyButtonText }</span>
                     <span class="sub-text">(${ totalKeywordsCount } / ${ conf.keywordMax })</span>
                 </button>
+                <button v-if="vSwitch === 'f'" class="j-button-confirm" @click="completeToEdit">完成</button>
             </div>
         </div>
     </div>

+ 16 - 0
src/web/staticres/vipsubscribe/css/keyWord.css

@@ -165,3 +165,19 @@
   margin-left: .16rem;
   flex: 1;
 }
+
+.free .j-button-confirm {
+  height: 0.8rem;
+  border-radius: .08rem;
+}
+.free .j-button-confirm.white-bg {
+  background-color: #EDEFF2;
+  color: #171826;
+}
+.j-footer .j-button-group .j-button-confirm:nth-of-type(1) {
+  flex: 7;
+}
+.j-footer .j-button-group .j-button-confirm:nth-of-type(2) {
+  margin-left: .2rem;
+  flex: 3;
+}

+ 3 - 0
src/web/staticres/vipsubscribe/js/keyWord.js

@@ -567,6 +567,9 @@ var vm = new Vue({
         }
       })
     },
+    completeToEdit: function () {
+      location.href = '/front/vipsubscribe/toSubVipSetPage'
+    },
     // 恢复数据
     restoreState: function () {
       var $data = sessionStorage.getItem(this.conf.sessKey)

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

@@ -93,7 +93,7 @@
                 </div>
           </div>
         </div>
-        <div class="j-footer" v-show="listShow">
+        <div class="j-footer" :class="{ free: vSwitch === 'f' }" v-show="listShow">
             <van-notice-bar
                 class="footer-tip center"
                 color="#2abed1"
@@ -109,10 +109,11 @@
                 </button>
             </div>
             <div class="j-button-group" v-else>
-                <button class="j-button-confirm" @click="clickAddKeyWordButton" :disabled="fullKeys && vSwitch !== 'f'">
+                <button class="j-button-confirm" :class="{ 'white-bg': vSwitch === 'f' }" @click="clickAddKeyWordButton" :disabled="fullKeys && vSwitch !== 'f'">
                     <span class="info-text">${ addNewKeyButtonText }</span>
                     <span class="sub-text">(${ totalKeywordsCount } / ${ conf.keywordMax })</span>
                 </button>
+                <button v-if="vSwitch === 'f'" class="j-button-confirm" @click="completeToEdit">完成</button>
             </div>
         </div>
     </div>