소스 검색

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

TANGSHIZHE 4 년 전
부모
커밋
83b44aa0fa

+ 5 - 1
src/jfw/front/front.go

@@ -1022,7 +1022,11 @@ func (f *Front) TSGuide() error {
 					continue
 				}
 				keyMaps = append(keyMaps, map[string]interface{}{
-					"key": vs,
+					"key":      vs,
+					"area":     []string{},
+					"infotype": []string{},
+					"notkey":   []string{},
+					"from":     1, //用于记录是否可以选择全国
 				})
 				if len(keyMaps) >= 10 {
 					break

+ 5 - 1
src/jfw/modules/app/src/app/front/front.go

@@ -296,7 +296,11 @@ func (f *Front) TSGuide() error {
 					continue
 				}
 				keyMaps = append(keyMaps, map[string]interface{}{
-					"key": vs,
+					"key":      vs,
+					"area":     []string{},
+					"infotype": []string{},
+					"notkey":   []string{},
+					"from":     1, //用于记录是否可以选择全国
 				})
 				if len(keyMaps) >= 10 {
 					break

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

@@ -138,7 +138,7 @@ var vm = new Vue({
               _this.tip.i_vip_fastimport = res.userData.i_vip_fastimport
               _this.tip.ordinarykc = res.userData.ordinarykc
               // 关键词弹窗提醒 fasle:需要弹窗 true:不需要弹窗
-              if (res.userData.o_vipjy && !res.userData.o_vipjy.b_keytip) {
+              if (res.userData && !res.userData.b_keytip) {
                 _this.dialog.upgrade = true
               }
             }

+ 8 - 1
src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/js/keyset-detail.js

@@ -561,7 +561,7 @@ var keySetDetail = new Vue({
           if (r) {
             _this.conf.i_new = r.i_new
             if (r.i_new == 1) {
-              delete _this.provinceListMap['#']
+              _this.provinceListMap['#'] = []
               _this.initIndexBar()
             }
           }
@@ -576,6 +576,7 @@ var keySetDetail = new Vue({
           if (r.a_key && $.isArray(r.a_key)) {
             r.a_key.forEach(function (item) {
               for (var key in item) {
+                if (key == 'from') continue
                 item[key] = pTools.arrayRemoveSpace(item[key])
               }
             })
@@ -603,6 +604,12 @@ var keySetDetail = new Vue({
             }
           }
 
+          if (_this.currentInfo.from == 1) {
+            _this.conf.i_new = 0
+            _this.provinceListMap['#'].push('全国')
+            _this.initIndexBar()
+          }
+
           // 备份关键词
           _this.currentInfoBackUp = JSON.parse(JSON.stringify(_this.currentInfo))
 

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

@@ -110,7 +110,7 @@
             <div class="j-button-group add" v-if="pInfo.editType === 'add'">
                 <button class="j-button-confirm" @click="saveKeyWord" :disabled="!keyInfo.key">
                     <span class="info-text">确认</span>
-                    <span class="sub-text" v-if="false">(近3个月内共匹${ pInfo.pushCount }条信息)</span>
+                    <span class="sub-text" v-if="pInfo.pushCount">(近3个月内共匹${ pInfo.pushCount }条信息)</span>
                 </button>
             </div>
             <div class="j-button-group edit" v-if="pInfo.editType === 'edit'">

+ 1 - 1
src/jfw/modules/app/src/web/templates/weixin/historypush.html

@@ -117,7 +117,7 @@
 </div>
 {{include "/big-member/commonjs.html"}}
 <div class="app-layout-content-b j-container">
-    <div class="app-content j-header" style="background:#fff">
+    <div class="app-content j-header" style="background:#fff;border-top: 1px solid transparent;">
       {{if and (not .T.isIosExam) (not .T.isIosExamPhone)}}
   		<div class="header_header" style="height: 60px;display:none;transition: all 0.1s;">
   			<div class="only-personal" style="position: absolute;top: .35rem;left: 4%;background-image: url(/jyapp/vipsubscribe/image/entback.png?v=51430);background-size: 100%;background-repeat: no-repeat;border-radius: 8px;width: 92%;display: flex;align-items: center;justify-content: space-between;height: 44px;">

+ 8 - 7
src/jfw/modules/weixin/src/wx/wx.go

@@ -333,7 +333,7 @@ func pcSetUserKeys(user map[string]interface{}, shareid, pccodepre string) (map[
 							}
 							if len(newkeys) > 0 {
 								for _, keys := range newkeys {
-									tmp = append(tmp, map[string]interface{}{"key": strings.Split(keys, "++")})
+									tmp = append(tmp, map[string]interface{}{"key": strings.Split(keys, "++"), "notkey": []string{}, "area": []string{}, "from": 1})
 								}
 								o_jy["a_key"] = tmp
 								result = "ok"
@@ -342,14 +342,14 @@ func pcSetUserKeys(user map[string]interface{}, shareid, pccodepre string) (map[
 							}
 						} else {
 							for _, key := range keys {
-								tmp = append(tmp, map[string]interface{}{"key": strings.Split(key, "++")})
+								tmp = append(tmp, map[string]interface{}{"key": strings.Split(key, "++"), "notkey": []string{}, "area": []string{}, "from": 1})
 							}
 							o_jy["a_key"] = tmp
 							result = "ok"
 						}
 					} else {
 						for _, key := range keys {
-							tmp = append(tmp, map[string]interface{}{"key": strings.Split(key, "++")})
+							tmp = append(tmp, map[string]interface{}{"key": strings.Split(key, "++"), "notkey": []string{}, "area": []string{}, "from": 1})
 						}
 						o_jy["a_key"] = tmp
 						result = "ok"
@@ -358,7 +358,7 @@ func pcSetUserKeys(user map[string]interface{}, shareid, pccodepre string) (map[
 			} else {
 				tmp := []interface{}{}
 				for _, key := range keys {
-					tmp = append(tmp, map[string]interface{}{"key": strings.Split(key, "++")})
+					tmp = append(tmp, map[string]interface{}{"key": strings.Split(key, "++"), "notkey": []string{}, "area": []string{}, "from": 1})
 				}
 				o_jy["a_key"] = tmp
 				result = "ok"
@@ -367,8 +367,8 @@ func pcSetUserKeys(user map[string]interface{}, shareid, pccodepre string) (map[
 			user["o_jy"] = o_jy
 		} else {
 			tmp := []interface{}{}
-			for _, key := range keys {
-				tmp = append(tmp, map[string]interface{}{"key": strings.Split(key, "++")})
+			for _, key := range keys { //订阅指令以及pc端订阅向导订阅  from :1
+				tmp = append(tmp, map[string]interface{}{"key": strings.Split(key, "++"), "notkey": []string{}, "area": []string{}, "from": 1})
 			}
 			user["o_jy"] = map[string]interface{}{
 				"a_key":        tmp,
@@ -1936,11 +1936,12 @@ func fastSubscribe(content, openId string) (int, string, bool) {
 					}
 				}
 			}
-			key := map[string][]string{}
+			key := map[string]interface{}{}
 			key["key"] = strings.Split(keyWord, "++")
 			key["notkey"] = []string{}
 			key["infotype"] = []string{}
 			key["area"] = []string{}
+			key["from"] = 1
 			a_key = append(a_key, key)
 			tools.MQFW.Update("user", `{"s_m_openid":"`+openId+`"}`, map[string]interface{}{
 				"$set": map[string]interface{}{

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

@@ -135,7 +135,7 @@ var vm = new Vue({
               _this.tip.i_vip_fastimport = res.userData.i_vip_fastimport
               _this.tip.ordinarykc = res.userData.ordinarykc
               // 关键词弹窗提醒 fasle:需要弹窗 true:不需要弹窗
-               if (res.userData.o_vipjy && !res.userData.o_vipjy.b_keytip) {
+               if (res.userData && !res.userData.b_keytip) {
                 _this.dialog.upgrade = true
               }
             }

+ 8 - 1
src/web/staticres/vipsubscribe/js/keyset-detail.js

@@ -573,7 +573,7 @@ var keySetDetail = new Vue({
           if (r) {
             _this.conf.i_new = r.i_new
             if (r.i_new == 1) {
-              delete _this.provinceListMap['#']
+              _this.provinceListMap['#'] = []
               _this.initIndexBar()
             }
           }
@@ -588,6 +588,7 @@ var keySetDetail = new Vue({
           if (r.a_key && $.isArray(r.a_key)) {
             r.a_key.forEach(function (item) {
               for (var key in item) {
+                if (key == 'from') continue
                 item[key] = pTools.arrayRemoveSpace(item[key])
               }
             })
@@ -615,6 +616,12 @@ var keySetDetail = new Vue({
             }
           }
 
+          if (_this.currentInfo.from == 1) {
+            _this.conf.i_new = 0
+            _this.provinceListMap['#'].push('全国')
+            _this.initIndexBar()
+          }
+
           // 备份关键词
           _this.currentInfoBackUp = JSON.parse(JSON.stringify(_this.currentInfo))
 

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

@@ -108,7 +108,7 @@
                 <div class="j-button-group add" v-if="pInfo.editType === 'add'">
                     <button class="j-button-confirm" @click="saveKeyWord" :disabled="!keyInfo.key">
                         <span class="info-text">确认</span>
-                        <span class="sub-text" v-if="false">(近3个月内共匹${ pInfo.pushCount }条信息)</span>
+                        <span class="sub-text" v-if="pInfo.pushCount">(近3个月内共匹${ pInfo.pushCount }条信息)</span>
                     </button>
                 </div>
                 <div class="j-button-group edit" v-if="pInfo.editType === 'edit'">