Эх сурвалжийг харах

Merge branch 'dev4.4' of http://192.168.3.207:10080/qmx/jy into dev4.4

DingChangSheng 4 жил өмнө
parent
commit
35a3bb8ffd

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

@@ -48,7 +48,7 @@ func (s *NewBigMemberAction) VipPageManager(htmlName string) error {
 			}
 		}
 		//如果没有首次使用
-		if !bigBaseMsg.Used {
+		if bigBaseMsg.Status > 0 && !bigBaseMsg.Used {
 			return s.Redirect("/jyapp/big/page/init") //跳转至首次初始化页面
 		}
 	}

+ 1 - 1
src/jfw/modules/app/src/web/staticres/jyapp/me/js/mine.js

@@ -220,7 +220,7 @@ var mine = {
                     if ($.isArray(res.data.power)) {
                         pageUserInfo.power = res.data.power
                     }
-                    if (res.viper) {
+                    if (res.data.viper) {
                         $('.ent-search').show().attr('data-href', '/jyapp/vipsubscribe/entSearch')
                     }
                     _this.setBigVipState()

+ 12 - 6
src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/js/price.js

@@ -33,7 +33,7 @@ var Calculation = {
             "cityMaxCount": 2,
             "provinceMaxCount": 9,
             "buyerClassMaxCount": 3,
-            "monthMaxCount": 9
+            "monthMaxCount": 10
         },
         "new": {
             "month": {
@@ -49,7 +49,8 @@ var Calculation = {
             "monthMaxCount": 10
         },
         "discount": 1
-    }, //套餐价格表
+    }
+    , //套餐价格表
     IsTrial: true, //是否时试用用户
     OldBuyset: new Buyset(),//用户之前套餐
     EndTime: 0, //会员到期时间
@@ -215,10 +216,15 @@ var Calculation = {
             if (pCount === -1) {
                 pCount = 0
             }
-            //当选择月份大于  按照全年计算
-            if (t[0] > this.PriceRule.new.monthMaxCount && unit === 2) { //月份十个月以上价格一样
-                count = 1
-                unit = 1
+            if (pCount !== 0) { //购买省份计算 省份10个月价格和11个月价格一样
+                //当选择月份大于  按照全年计算
+                if (t[0] > this.PriceRule.new.monthMaxCount && t[1] === 2) count = 10//月份十个月以上价格一样
+            } else { //购买全国计算 全国10个月价格和11个月价格不一样
+                //当选择月份大于  按照全年计算
+                if (t[0] > this.PriceRule.new.monthMaxCount && unit === 2) { //月份十个月以上价格一样
+                    count = 1
+                    unit = 1
+                }
             }
             return this.getSetMealPrice_new(pCount, unit) * count //全国1行业套餐
         }

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

@@ -237,7 +237,7 @@
                   <dd>用户最多购买/续费3年套餐;</dd>
                   <dd>支持套餐升级,补差价(按月进行补差价,不足一个月按一个月计算)。</dd>
                   <!-- <dd>3个市及以上即为全省,16个省及以上即为全国。4个行业及以上即为全行业。</dd> -->
-                  <dd>购买的采购单位行业与地域为个数,购买后可不限次数进行更换。</dd>
+                  <!-- <dd>购买的采购单位行业与地域为个数,购买后可不限次数进行更换。</dd> -->
                 </dl>
               </div>
             </div>

+ 1 - 1
src/jfw/modules/common/src/qfw/util/jy/bigVipPower.go

@@ -157,7 +157,7 @@ func (this *BigVipBaseMsg) CheckBigVipFrontPower(reqFlag string) (pass bool) {
 }
 
 func (this *BigVipBaseMsg) CheckBigVipBackPower(reqFlag string) (pass bool) {
-	if this.Viper && reqFlag == "entPortrait" {
+	if this.Viper && (reqFlag == "entPortrait" || reqFlag == "entDetail") {
 		return true
 	}
 	return this.checkPower(reqFlag, BackService)

+ 22 - 17
src/jfw/modules/subscribepay/src/entity/subscribeVip.go

@@ -348,15 +348,20 @@ func (this *vipSubscribeStruct) UpgradeSubVip(userId string, vmsg VipSimpleMsg,
 
 //超级订阅获取购买项
 func (this *vipSubscribeStruct) NewBuySet(area *map[string]interface{}, industry []string, isUpgrade bool) *SubvipBuySet {
-	if area != nil && (*area)["全国"] != nil {
-		area = &map[string]interface{}{}
+	pCount := -1
+	citys := []int{}
+	if area != nil {
+		if (*area)["全国"] != nil {
+			area = &map[string]interface{}{}
+		} else if pCount_tmp := qutil.IntAll((*area)["areacount"]); pCount_tmp > 0 {
+			pCount = pCount_tmp
+		}
 	}
 	buyset := SubvipBuySet{}
 	if !isUpgrade {
 		buyset.Upgrade = 0 //升级版超级订阅标识
 		if len(*area) > 0 {
-			pCount := 0
-			citys := []int{}
+			pCount = 0
 			for _, v := range *area {
 				tmp := v.([]interface{})
 				if len(tmp) == 0 || len(tmp) > SubVipPrice.Old.CityMaxCount { //省份
@@ -370,12 +375,9 @@ func (this *vipSubscribeStruct) NewBuySet(area *map[string]interface{}, industry
 				pCount = -1
 				citys = []int{}
 			}
-			buyset.NewCitys = citys   //城市
-			buyset.AreaCount = pCount //地区
-		} else {
-			buyset.AreaCount = -1 //全国
-			buyset.NewCitys = []int{}
 		}
+		buyset.NewCitys = citys
+		buyset.AreaCount = pCount //地区
 		//行业数量自动转换全行业
 		buyset.BuyerclassCount = len(industry)
 		if len(industry) > SubVipPrice.Old.BuyerClassMaxCount || len(industry) == 0 {
@@ -389,15 +391,13 @@ func (this *vipSubscribeStruct) NewBuySet(area *map[string]interface{}, industry
 			if pCount > SubVipPrice.New.ProvinceMaxCount {
 				pCount = -1
 			}
-			buyset.NewCitys = []int{} //城市,4.4改版不支持购买城市
-			buyset.AreaCount = pCount //地区
 		} else {
 			buyset.AreaCount = -1 //全国
-			buyset.NewCitys = []int{}
 		}
+		buyset.AreaCount = pCount   //地区
+		buyset.NewCitys = citys     //城市,4.4改版不支持购买城市
 		buyset.BuyerclassCount = -1 //行业,4.4改版只能购买全行业
 	}
-
 	return &buyset
 }
 
@@ -563,10 +563,15 @@ func (this *vipSubscribeStruct) GetSubVipPriceByBuySet(buySet *SubvipBuySet, cou
 			if pCount == -1 {
 				pCount = 0
 			}
-			//当选择月份大于  按照全年计算
-			if count > SubVipPrice.New.MonthMaxCount && unit == 2 { //月份十个月以上价格一样
-				unit = 1
-				count = 1
+			if pCount != 0 { //购买省份计算 省份10个月价格和11个月价格一样
+				if count > SubVipPrice.New.MonthMaxCount && unit == 2 {
+					count = 10
+				}
+			} else { //购买全国计算 全国10个月价格和11个月价格不一样 多9元为了个商机版价格保持一致
+				if count > SubVipPrice.New.MonthMaxCount && unit == 2 {
+					unit = 1
+					count = 1
+				}
 			}
 			return getSetMealPrice(pCount, unit) * count //全国1行业套餐
 		}

+ 15 - 5
src/jfw/modules/subscribepay/src/service/vipSubscribeChange.go

@@ -115,9 +115,11 @@ func (this *SubscribeChange) SaveChange() {
 func (this *SubscribeChange) Upgrade() {
 	userId := qutil.ObjToString(this.GetSession("userId"))
 	r := func() *entity.FuncResult {
+		area_count, _ := this.GetInteger("area_count") //地区
 		area := qutil.ObjToMap(this.GetString("area")) //地区
-		timeRenew := this.GetString("time")            //周期
-		req_price, _ := this.GetInteger("price")       //前端展示金额
+
+		timeRenew := this.GetString("time")      //周期
+		req_price, _ := this.GetInteger("price") //前端展示金额
 		openId := qutil.ObjToString(this.GetSession("s_m_openid"))
 		order_phone := this.GetString("order_phone") //p19.3用户信息采集 手机号
 
@@ -144,7 +146,11 @@ func (this *SubscribeChange) Upgrade() {
 			}
 			needRenew = true
 		}
-
+		area_select := true                     //是否回显城市选择
+		if len(*area) == 0 && area_count != 0 { //升级时为传入选择省份
+			(*area)["areacount"] = area_count
+			area_select = false
+		}
 		newBuyset := entity.JyVipSubStruct.NewBuySet(area, nil, true) //改版后只能购买升级版超级订阅
 
 		//升级校验
@@ -158,7 +164,6 @@ func (this *SubscribeChange) Upgrade() {
 		}
 
 		filter := entity.VipSimpleMsg{
-			Area:             area,
 			Industry:         nil, //行业保存默认选择
 			Cyclecount:       date_count,
 			Cycleunit:        date_unit,
@@ -168,6 +173,10 @@ func (this *SubscribeChange) Upgrade() {
 			OrderType:        3,
 			DisWord:          "",
 		}
+		if area_select {
+			filter.Area = area
+		}
+
 		var startTime, endTime time.Time
 		if needRenew {
 			startTime = now
@@ -485,7 +494,8 @@ func needUpgrade(newBuySet, oldBuySet *entity.SubvipBuySet) bool {
 			return false
 		}
 	} else {
-		return newBuySet.AreaCount > oldBuySet.AreaCount
+		return oldBuySet.AreaCount != -1 && newBuySet.AreaCount > oldBuySet.AreaCount
+		//return newBuySet.AreaCount == -1 || newBuySet.AreaCount > oldBuySet.AreaCount
 	}
 }
 

+ 1 - 1
src/jfw/modules/subscribepay/src/subvip_price.json

@@ -22,7 +22,7 @@
     "cityMaxCount": 2,
     "provinceMaxCount": 9,
     "buyerClassMaxCount": 3,
-    "monthMaxCount": 9
+    "monthMaxCount": 10
   },
   "new": {
     "month": {

+ 1 - 1
src/jfw/tag/tag.go

@@ -29,7 +29,7 @@ func seoConfigInit() {
 		applyV := util.ObjArrToStringArr(config.Seoconfig["applyVersion"].([]interface{}))
 		if len(applyV) > 0 {
 			for _, v := range applyV {
-				if len(strings.Split(v, ":")) > 0 {
+				if len(strings.Split(v, ":")) > 1 {
 					name := strings.Split(v, ":")[0]
 					version := strings.Split(v, ":")[1]
 					applyVersion[name] = version

+ 12 - 6
src/web/staticres/vipsubscribe/js/price.js

@@ -33,7 +33,7 @@ var Calculation = {
             "cityMaxCount": 2,
             "provinceMaxCount": 9,
             "buyerClassMaxCount": 3,
-            "monthMaxCount": 9
+            "monthMaxCount": 10
         },
         "new": {
             "month": {
@@ -49,7 +49,8 @@ var Calculation = {
             "monthMaxCount": 10
         },
         "discount": 1
-    }, //套餐价格表
+    }
+    , //套餐价格表
     IsTrial: true, //是否时试用用户
     OldBuyset: new Buyset(),//用户之前套餐
     EndTime: 0, //会员到期时间
@@ -215,10 +216,15 @@ var Calculation = {
             if (pCount === -1) {
                 pCount = 0
             }
-            //当选择月份大于  按照全年计算
-            if (t[0] > this.PriceRule.new.monthMaxCount && unit === 2) { //月份十个月以上价格一样
-                count = 1
-                unit = 1
+            if (pCount !== 0) { //购买省份计算 省份10个月价格和11个月价格一样
+                //当选择月份大于  按照全年计算
+                if (t[0] > this.PriceRule.new.monthMaxCount && t[1] === 2) count = 10//月份十个月以上价格一样
+            } else { //购买全国计算 全国10个月价格和11个月价格不一样
+                //当选择月份大于  按照全年计算
+                if (t[0] > this.PriceRule.new.monthMaxCount && unit === 2) { //月份十个月以上价格一样
+                    count = 1
+                    unit = 1
+                }
             }
             return this.getSetMealPrice_new(pCount, unit) * count //全国1行业套餐
         }

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

@@ -216,7 +216,7 @@
                             <dd>用户最多购买/续费3年套餐;</dd>
                             <dd>支持套餐升级,补差价(按月进行补差价,不足一个月按一个月计算)。</dd>
                             <!-- <dd>3个市及以上即为全省,10个省及以上即为全国。4个行业及以上即为全行业。</dd> -->
-                            <dd>购买的采购单位行业与地域为个数,购买后可不限次数进行更换。</dd>
+                            <!-- <dd>购买的采购单位行业与地域为个数,购买后可不限次数进行更换。</dd> -->
                         </dl>
                     </div>
                 </div>