Browse Source

Merge branch 'dev4.6.2.1' of http://192.168.3.207:8080/qmx/jy into dev4.6.2.1

wangshan 3 years ago
parent
commit
e48d1a7d12

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

@@ -1047,7 +1047,6 @@ func (f *Front) TSGuide() error {
 					}
 					keyMaps = append(keyMaps, map[string]interface{}{
 						"key":      vs,
-						"area":     []string{area},
 						"infotype": []string{},
 						"notkey":   []string{},
 						"from":     1, //用于记录是否可以选择全国
@@ -1057,6 +1056,7 @@ func (f *Front) TSGuide() error {
 					}
 				}
 				saveData := bson.M{
+					"o_jy.o_area":       []string{area},
 					"o_jy.a_key":        keyMaps,
 					"o_jy.l_modifydate": time.Now().Unix(),
 					"i_ts_guide":        2,

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

@@ -33,7 +33,7 @@ func (m *Front) WxKeyset(tpl string) error {
 		})
 	}
 	vipMsg := jy.GetBigVipUserBaseMsg(userid, public.Mysql, public.MQFW)
-	if tpl == "index" && vipMsg.VipStatus < 0 && vipMsg.Status < 0 && isInTSguide(userid) { //仅免费用户跳转向导页面
+	if tpl == "index" && vipMsg.VipStatus <= 0 && vipMsg.Status <= 0 && isInTSguide(userid) { //仅免费用户跳转向导页面
 		return m.Redirect("/front/tenderSubscribe/guide")
 	}
 	if tpl == "seniorset" {

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

@@ -306,7 +306,6 @@ func (f *Front) TSGuide() error {
 					}
 					keyMaps = append(keyMaps, map[string]interface{}{
 						"key":      vs,
-						"area":     []string{area},
 						"infotype": []string{},
 						"notkey":   []string{},
 						"from":     1, //用于记录是否可以选择全国
@@ -316,6 +315,7 @@ func (f *Front) TSGuide() error {
 					}
 				}
 				saveData := bson.M{
+					"o_jy.o_area":       []string{area},
 					"o_jy.a_key":        keyMaps,
 					"o_jy.l_modifydate": time.Now().Unix(),
 					"i_ts_guide":        2,

+ 6 - 2
src/jfw/modules/app/src/web/templates/commonPay/checkout.html

@@ -317,11 +317,15 @@
                                         if (bigmemberBid==="1"){
                                            href = "/jyapp/aiForecastPack/paySuccess?orderCode=" + res.orderCode + "&email=" + res.email + "&payTime=" + res.payTime + "&pay_way=" + res.pay_way + "&price=" + res.price + "&t={{.T.t}}"
                                         }
+
+                                        if (res.filter) {
+                                            href += ('&filter=' + encodeURIComponent(res.filter))
+                                        }
+
                                         // 数据流量包定制
                                         if (productType === 'dataPack') {
-                                            href = href + '&header=充值数据流量包&filter=' + res.filter
+                                            href = href + '&header=充值数据流量包'
                                         }
-
                                         var docsId=checkout.getUrlParam("docId");
                                         if (docsId!=null){
                                           href +="&docsId="+docsId

+ 39 - 3
src/jfw/modules/app/src/web/templates/commonPay/paySuccess.html

@@ -95,9 +95,9 @@
                     继续浏览
                 </button>
             </div>
-        {{else if eq .T.doType "dataPack"}}
+        {{else if or .T.doType "dataPack" .T.doType "areaPack"}}
             <div class="bottom_button j-button-group">
-                <button id ="order" class="j-button-confirm" onclick="window.location.href = '/jyapp/common/dataPack/orderDetail?order_code={{.T.orderCode}}'">
+                <button id ="order" class="j-button-confirm" onclick="window.location.href = '/jyapp/common/{{.T.doType}}/orderDetail?order_code={{.T.orderCode}}'">
                     查看订单
                 </button>
             </div>
@@ -136,6 +136,36 @@
                     allTotal = Number(allTotal) + Number(orderFilter.give_cycle)
                 }
                 $('.info-box .info-item').text('数据流量包:+' + allTotal)
+            } else if (productType === 'areaPack') {
+                // https://showdoc.jydev.jianyu360.com/web/#/67?page_id=891
+                // {
+                //     num: 0, // 购买的数量 -1全国
+                //     ordertype: 1, // 1正常购买 2升级 3续费
+                //     cycleunit: 0, // 日期单位 1月 2季 3年
+                //     OldNum: 0, // 升级前购买的省份数量
+                // }
+                var titleMap = {
+                    1: '购买',
+                    2: '升级',
+                    3: '续费'
+                }
+                setHeaderTitle(titleMap[orderFilter.ordertype] + $('.header-title').text())
+                var cycleType = ' 个月'
+                if (orderFilter.cycleunit == 2) {
+                    cycleType = ' 季'
+                } else if (orderFilter.cycleunit == 3) {
+                    cycleType = ' 年'
+                }
+
+                var html = `${titleMap[orderFilter.ordertype]}省份数量:<span class="highlight-text">${orderFilter.num === -1 ? '全国' : orderFilter.num}</span>${orderFilter.num === -1 ? '' : ' 个省'}`
+                html += `&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;`
+                html += `订阅周期:`
+                if (orderFilter.ordertype == 2) {
+                    html += `不延期`
+                } else {
+                    html += `<span class="highlight-text">1</span>${ cycleType }`
+                }
+                $('.info-box .info-item').html(html)
             }
         }
 
@@ -168,6 +198,12 @@
         }
     })
 
+    function setHeaderTitle (title) {
+        if (!title) return
+        document.title = title
+        $('.header-title').text(title)
+    }
+
     function formatMoney(s, n) {
         s = s / 100
         if (n === undefined) {
@@ -207,7 +243,7 @@
         var money = t.split('').reverse().join('') + point + right;
         return money;
     }
-      //获取url参数
+    //获取url参数
     function getParam(name) {
         var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
         var r = window.location.search.substr(1).match(reg); //获取url中"?"符后的字符串并正则匹配

+ 6 - 5
src/jfw/modules/bigmember/src/service/portrait/subvipPortraitAction.go

@@ -26,7 +26,7 @@ type SubVipPortrait struct {
 	portraitRecord      xweb.Mapper `xweb:"/portrait/subVipPortrait/record"`       //超级订阅升级版画像浏览记录
 }
 
-//超级订阅升级版查询基本信息
+//SubVipEntDetail 超级订阅升级版查询基本信息
 func (this *SubVipPortrait) SubVipEntDetail() {
 	userId := qutil.ObjToString(this.GetSession("userId"))
 	rData, errMsg := func() (interface{}, error) {
@@ -47,7 +47,7 @@ func (this *SubVipPortrait) SubVipEntDetail() {
 	this.ServeJson(NewResult(rData, errMsg))
 }
 
-//超级订阅升级版查看最新中标动态
+//SubVipWinnerNewMsg 超级订阅升级版查看最新中标动态
 func (this *SubVipPortrait) SubVipWinnerNewMsg() {
 	userId := qutil.ObjToString(this.GetSession("userId"))
 	rData, errMsg := func() (interface{}, error) {
@@ -95,6 +95,7 @@ func (this *SubVipPortrait) SubVipWinnerNewMsg() {
 	this.ServeJson(NewResult(rData, errMsg))
 }
 
+//SubVipNewMsgSelects 获取画像可筛选项
 func (this *SubVipPortrait) SubVipNewMsgSelects() {
 	userId := qutil.ObjToString(this.GetSession("userId"))
 	rData, errMsg := func() (interface{}, error) {
@@ -119,7 +120,7 @@ func (this *SubVipPortrait) SubVipNewMsgSelects() {
 	this.ServeJson(NewResult(rData, errMsg))
 }
 
-//超级订阅升级版查看企业画像
+//SubVipPortrait 超级订阅升级版查看企业画像
 func (this *SubVipPortrait) SubVipPortrait() {
 	userId := qutil.ObjToString(this.GetSession("userId"))
 	rData, errMsg := func() (interface{}, error) {
@@ -153,7 +154,7 @@ func (this *SubVipPortrait) SubVipPortrait() {
 	this.ServeJson(NewResult(rData, errMsg))
 }
 
-//超级订阅升级版画像浏览量查询
+//PortraitUsage 超级订阅升级版画像浏览量查询
 func (this *SubVipPortrait) PortraitUsage() {
 	userId := qutil.ObjToString(this.GetSession("userId"))
 	rData, errMsg := func() (interface{}, error) {
@@ -179,7 +180,7 @@ func (this *SubVipPortrait) PortraitUsage() {
 	this.ServeJson(NewResult(rData, errMsg))
 }
 
-//超级订阅升级版画像查看记录
+//PortraitRecord 超级订阅升级版画像查看记录
 func (this *SubVipPortrait) PortraitRecord() {
 	userId := qutil.ObjToString(this.GetSession("userId"))
 	rData, errMsg := func() (interface{}, error) {

+ 0 - 0
src/web/templates/areaPack/pc/page_test.html


+ 5 - 1
src/web/templates/weixin/commonPay/checkout.html

@@ -320,9 +320,13 @@
                                           href="/weixin/aiForecastPack/paySuccess?orderCode=" + res.orderCode + "&email=" + res.email + "&payTime=" + res.payTime + "&price=" + res.price + "&t={{.T.t}}"
                                         }
 
+                                        if (res.filter) {
+                                            href += ('&filter=' + encodeURIComponent(res.filter))
+                                        }
+
                                         // 数据流量包定制
                                         if (productType === 'dataPack') {
-                                            href = href + '&header=充值数据流量包&filter=' + res.filter
+                                            href = href + '&header=充值数据流量包'
                                         }
 
                                         var docsId=checkout.getUrlParam("docId")

+ 37 - 2
src/web/templates/weixin/commonPay/paySuccess.html

@@ -79,9 +79,9 @@
             继续浏览
         </button>
     </div>
-    {{else if eq .T.doType "dataPack"}}
+    {{else if or .T.doType "dataPack" .T.doType "areaPack"}}
         <div class="bottom_button j-button-group">
-            <button id ="order" class="j-button-confirm" onclick="window.location.href = '/weixin/common/dataPack/orderDetail?order_code={{.T.orderCode}}'">
+            <button id ="order" class="j-button-confirm" onclick="window.location.href = '/weixin/common/{{.T.doType}}/orderDetail?order_code={{.T.orderCode}}'">
                 查看订单
             </button>
         </div>
@@ -109,6 +109,36 @@
                     allTotal = Number(allTotal) + Number(orderFilter.give_cycle)
                 }
                 $('.info-box .info-item').text('数据流量包:+' + allTotal)
+            } else if (productType === 'areaPack') {
+                // https://showdoc.jydev.jianyu360.com/web/#/67?page_id=891
+                // {
+                //     num: 0, // 购买的数量 -1全国
+                //     ordertype: 1, // 1正常购买 2升级 3续费
+                //     cycleunit: 0, // 日期单位 1月 2季 3年
+                //     OldNum: 0, // 升级前购买的省份数量
+                // }
+                var titleMap = {
+                    1: '购买',
+                    2: '升级',
+                    3: '续费'
+                }
+                setHeaderTitle(titleMap[orderFilter.ordertype] + $('.header-title').text())
+                var cycleType = ' 个月'
+                if (orderFilter.cycleunit == 2) {
+                    cycleType = ' 季'
+                } else if (orderFilter.cycleunit == 3) {
+                    cycleType = ' 年'
+                }
+
+                var html = `${titleMap[orderFilter.ordertype]}省份数量:<span class="highlight-text">${orderFilter.num === -1 ? '全国' : orderFilter.num}</span>${orderFilter.num === -1 ? '' : ' 个省'}`
+                html += `&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;`
+                html += `订阅周期:`
+                if (orderFilter.ordertype == 2) {
+                    html += `不延期`
+                } else {
+                    html += `<span class="highlight-text">1</span>${ cycleType }`
+                }
+                $('.info-box .info-item').html(html)
             }
         }
 
@@ -134,6 +164,11 @@
         }
     })
 
+    function setHeaderTitle (title) {
+        if (!title) return
+        document.title = title
+    }
+
     function formatMoney(s, n) {
         s = s / 100
         if (n === undefined) {