瀏覽代碼

Merge branch 'dev2.8.5' of ssh://192.168.3.207:10022/qmx/jy into dev2.8.5

wcj 5 年之前
父節點
當前提交
ac6a1584ac

+ 3 - 2
src/jfw/front/pchelper.go

@@ -343,9 +343,10 @@ func (l *PcHelper) PushView() error {
 	res := map[string]interface{}{}
 	res["hasNextPage"] = false
 	if userid != "" {
-		user, firstPushTime := public.HistoryPush.UserInfo(userid)
+		user, _ := public.HistoryPush.UserInfo(userid)
 		if user != nil {
-			hasNextPage, list, _ := public.HistoryPush.Datas(userid, pageNum, firstPushTime, "")
+			hasNextPage, list := public.HistoryPush.Datas_Mysql(userid, pageNum, "", "")
+			//hasNextPage, list, _ := public.HistoryPush.Datas(userid, pageNum, firstPushTime, "")
 			res["hasNextPage"] = hasNextPage
 			res["data"] = &list
 		}

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

@@ -678,7 +678,7 @@ $(function () {
 		}
 		let showCount = selectedCityLength - dataCount;
 		if(showCount > 2){
-			$(".tips_d_text").text("已选择"+showCount+"个市,建议购买“全省”");
+			$(".tips_d_text").text("已新增"+showCount+"个市,建议新增“全省”");
 			$(".tips_d_text").show();
 		}else{
 			$(".tips_d_text").hide();

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

@@ -340,7 +340,7 @@
                 let showCount = buyset - disabledCount;
                 let showCounts = selectedArr.length - showCount;
                 if (showCounts > 3) {
-                	$('.tips_btn .tips_d_text').text("已选择"+showCounts+"个行业,建议购买“全部行业”");
+                	$('.tips_btn .tips_d_text').text("已新增"+showCounts+"个行业,建议新增“全部行业”");
                     $('.tips_btn .tips_d_text').slideDown();
                 } else {
                     $('.tips_btn .tips_d_text').slideUp()

+ 30 - 20
src/jfw/modules/subscribepay/src/service/afterPay.go

@@ -268,6 +268,7 @@ func (a *AfterPay) SetUserInfo() error {
 			actionType := a.GetString("actionType")
 			addtion_kws := a.GetSlice("addition_kws")
 			not_kws := a.GetSlice("not_kws")
+			kwscount := a.GetString("kwscount")
 			if len([]rune(kws_name)) > 20 {
 				kws_name = qutil.SubString(kws_name, 0, 20)
 			}
@@ -294,27 +295,36 @@ func (a *AfterPay) SetUserInfo() error {
 							}
 						}
 					}
-					var _key = make(map[string]interface{})
-					var a_key = make([]map[string]interface{}, 1)
-					if classify_name == "" {
-						classify_name = "未分类"
-					}
-					_key["key"] = _kws
-					_key["appendkey"] = addtion_kws
-					_key["notkey"] = not_kws
-					a_key[0] = _key
-					if len(a_key) > 0 {
-						flag = util.MQFW.UpdateById("user", userId, bson.M{
-							"$push": bson.M{
-								"o_vipjy.a_items." + classify_index + ".a_key": bson.M{
-									"$each": a_key,
+					if kwscount != "0" {
+						//修改关键词
+						saveData["o_vipjy.a_items."+classify_index+".s_item"] = classify_name
+						saveData["o_vipjy.a_items."+classify_index+".a_key."+kws_index+".key"] = _kws
+						saveData["o_vipjy.a_items."+classify_index+".a_key."+kws_index+".appendkey"] = addtion_kws
+						saveData["o_vipjy.a_items."+classify_index+".a_key."+kws_index+".notkey"] = not_kws
+					} else {
+						//首次添加分类和关键词
+						var _key = make(map[string]interface{})
+						var a_key = make([]map[string]interface{}, 1)
+						if classify_name == "" {
+							classify_name = "未分类"
+						}
+						_key["key"] = _kws
+						_key["appendkey"] = addtion_kws
+						_key["notkey"] = not_kws
+						a_key[0] = _key
+						if len(a_key) > 0 {
+							flag = util.MQFW.UpdateById("user", userId, bson.M{
+								"$push": bson.M{
+									"o_vipjy.a_items." + classify_index + ".a_key": bson.M{
+										"$each": a_key,
+									},
 								},
-							},
-							"$set": bson.M{
-								"o_vipjy.l_modifydate":                          time.Now().Unix(),
-								"o_vipjy.a_items." + classify_index + ".s_item": classify_name,
-							},
-						})
+								"$set": bson.M{
+									"o_vipjy.l_modifydate":                          time.Now().Unix(),
+									"o_vipjy.a_items." + classify_index + ".s_item": classify_name,
+								},
+							})
+						}
 					}
 					//					}
 				} else if actionType == "DK" { //删除关键词

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

@@ -339,7 +339,7 @@
                 let showCount = buyset - disabledCount;
                 let showCounts = selectedArr.length - showCount;
                 if (showCounts > 3) {
-                	$('.tips_btn .tips_d_text').text("已选择"+showCounts+"个行业,建议购买“全部行业”");
+                	$('.tips_btn .tips_d_text').text("已新增"+showCounts+"个行业,建议新增“全部行业”");
                     $('.tips_btn .tips_d_text').slideDown();
                 } else {
                     $('.tips_btn .tips_d_text').slideUp()

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

@@ -634,6 +634,7 @@
             param.actionType = actionType;
             param.addition_kws = addition_kws;
             param.not_kws = not_kws;
+			 param.kwscount = $(".content .showKeyWord li").length;
             $.ajax({
                 type: "POST",
                 url: "/subscribepay/afterPay/setUserInfo",