소스 검색

pc 微信端 支付调整

wangkaiyue 5 년 전
부모
커밋
df70fa6f96
43개의 변경된 파일3697개의 추가작업 그리고 2450개의 파일을 삭제
  1. 0 0
      src/jfw/front/commonPayPc.go
  2. 43 0
      src/jfw/front/commonPayWx.go
  3. 9 9
      src/jfw/front/front.go
  4. 11 22
      src/jfw/front/vipsubscribe.go
  5. 160 23
      src/jfw/front/ws_dataExport.go
  6. 4 148
      src/jfw/front/wxMyOrder.go
  7. 3 3
      src/jfw/modules/subscribepay/src/service/commonAction.go
  8. 1 1
      src/web/staticres/js/wxSupersearch.js
  9. 3 1
      src/web/staticres/vipsubscribe/js/vip_index_new.js
  10. 185 0
      src/web/staticres/wxCommonPay/css/base.css
  11. 266 0
      src/web/staticres/wxCommonPay/css/pay_success.css
  12. 746 0
      src/web/staticres/wxCommonPay/css/public.css
  13. 4 0
      src/web/staticres/wxCommonPay/css/weui.min.css
  14. 3 0
      src/web/staticres/wxCommonPay/iconfont/iconfont.css
  15. BIN
      src/web/staticres/wxCommonPay/iconfont/iconfont.eot
  16. BIN
      src/web/staticres/wxCommonPay/iconfont/iconfont.ttf
  17. BIN
      src/web/staticres/wxCommonPay/iconfont/iconfont.woff
  18. BIN
      src/web/staticres/wxCommonPay/iconfont/iconfont.woff2
  19. 2 2
      src/web/templates/active/livePage/live_online_wx.html
  20. 6 6
      src/web/templates/pc/myOrder.html
  21. 358 0
      src/web/templates/weixin/commonPay/checkout.html
  22. 61 0
      src/web/templates/weixin/commonPay/paySuccess.html
  23. 1 1
      src/web/templates/weixin/dataExport/dataExport.html
  24. 31 90
      src/web/templates/weixin/dataExport/dataExport_payOrder.html
  25. 121 117
      src/web/templates/weixin/dataExport/dataExport_paySuccess.html
  26. 5 5
      src/web/templates/weixin/dataExport/dataExport_toMyOrder.html
  27. 1 70
      src/web/templates/weixin/dataExport/dataExport_toOrderDetail.html
  28. 2 2
      src/web/templates/weixin/email/bind_success.html
  29. 5 5
      src/web/templates/weixin/historypush.html
  30. 1 1
      src/web/templates/weixin/my.html
  31. 1 1
      src/web/templates/weixin/search/mainSearch.html
  32. 1 1
      src/web/templates/weixin/treasure_box.html
  33. 2 2
      src/web/templates/weixin/vipsubscribe/renew_notice.html
  34. 1 1
      src/web/templates/weixin/vipsubscribe/renew_pay.html
  35. 2 2
      src/web/templates/weixin/vipsubscribe/trial_info.html
  36. 4 4
      src/web/templates/weixin/vipsubscribe/vip_index.html
  37. 2 59
      src/web/templates/weixin/vipsubscribe/vip_index_new.html
  38. 4 4
      src/web/templates/weixin/vipsubscribe/vip_introduce.html
  39. 741 845
      src/web/templates/weixin/vipsubscribe/vip_order_detail.html
  40. 77 76
      src/web/templates/weixin/vipsubscribe/vip_pay_success.html
  41. 825 890
      src/web/templates/weixin/vipsubscribe/vip_purchase.html
  42. 4 58
      src/web/templates/weixin/vipsubscribe/vip_renew.html
  43. 1 1
      src/web/templates/weixin/vipsubscribe/vip_viewPage.html

+ 0 - 0
src/jfw/front/order.go → src/jfw/front/commonPayPc.go


+ 43 - 0
src/jfw/front/commonPayWx.go

@@ -0,0 +1,43 @@
+package front
+
+import (
+	"errors"
+	"github.com/go-xweb/xweb"
+	"jfw/wx"
+)
+
+/*
+微信公众号支付公共页面
+*/
+type WxPayCommon struct {
+	*xweb.Action
+	toCreateOrderPage xweb.Mapper `xweb:"/weixin/pay/checkout_(.*)"` //微信数据导出-支付页面
+	paySuccess        xweb.Mapper `xweb:"/weixin/(\\w+)/paySuccess"` //微信支付-支付完成
+}
+
+func init() {
+	xweb.AddAction(&WxPayCommon{})
+}
+
+func (w *WxPayCommon) ToCreateOrderPage(doType string) error {
+	orderCode := w.GetString("orderCode")
+	if orderCode == "" || doType == "" {
+		return errors.New("未知订单")
+	}
+	w.T["doType"] = doType
+	w.T["orderCode"] = orderCode
+	w.T["signature"] = wx.SignJSSDK(w.Site() + w.Url())
+	return w.Render("/weixin/commonPay/checkout.html", &w.T)
+}
+
+func (w *WxPayCommon) PaySuccess(doType string) error {
+	//获取参数
+	w.T["orderCode"] = w.GetString("orderCode")
+	w.T["payTime"] = w.GetString("payTime")
+	w.T["email"] = w.GetString("email")
+	if doType == "dataexport" {
+		return w.Render("/weixin/dataExport/dataExport_paySuccess.html", &w.T)
+	}
+	w.T["doType"] = doType
+	return w.Render("/weixin/commonPay/paySuccess.html", &w.T)
+}

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

@@ -1464,39 +1464,39 @@ func (f *Front) Msgremind() error {
 	}
 	t := param["type"]
 	if t == "unpaid" { //未支付 已支付
-		return f.Redirect("/weixin/pay/toOrderDetailPage?orderCode=" + param["ordercode"])
+		return f.Redirect("/front/vipsubscribe/toOrderDetailPage?orderCode=" + param["ordercode"])
 	} else if t == "paid" {
 		if i_vip_status > 0 {
-			return f.Redirect("/weixin/pay/toSubVipSetPage")
+			return f.Redirect("/front/vipsubscribe/toSubVipSetPage")
 		} else {
-			return f.Redirect("/weixin/pay/vipsubscribe_new?orderCode=" + myLastOrderCode(userId))
+			return f.Redirect("/front/vipsubscribe/vipsubscribe_new?orderCode=" + myLastOrderCode(userId))
 		}
 	} else if t == "ontrial_soonexprie" || t == "ontrial_expried" || t == "soonexprie" || t == "expried" { //试用即将到期 试用已到期 即将到期 已到期
 		if t == "ontrial_soonexprie" || t == "ontrial_expried" {
 			if i_vip_status == 2 {
-				return f.Redirect("/weixin/pay/toSubVipSetPage")
+				return f.Redirect("/front/vipsubscribe/toSubVipSetPage")
 			} else {
-				return f.Redirect("/weixin/pay/vipsubscribe_new")
+				return f.Redirect("/front/vipsubscribe/vipsubscribe_new")
 			}
 		} else if t == "soonexprie" || t == "expried" {
 			now_unix := time.Now().Unix()
 			l_vip_endtime := util.Int64All((*user)["l_vip_endtime"])
 			if now_unix < l_vip_endtime-259200 {
 				//已续费
-				return f.Redirect("/weixin/pay/toSubVipSetPage")
+				return f.Redirect("/front/vipsubscribe/toSubVipSetPage")
 			} else {
 				if now_unix > l_vip_endtime {
 					//未续费已到期,跳转到再次购买页面
-					return f.Redirect("/weixin/pay/vipsubscribe_new?orderCode=" + myLastOrderCode(userId))
+					return f.Redirect("/front/vipsubscribe/vipsubscribe_new?orderCode=" + myLastOrderCode(userId))
 				} else {
 					//未续费未到期,跳转到续费页面
-					return f.Redirect("/weixin/pay/vipsubscribe_renew")
+					return f.Redirect("/front/vipsubscribe/vipsubscribe_renew")
 				}
 			}
 		}
 	} else if t == "buyerclass" { //公共资源交易提醒
 		if i_vip_status > 0 { //vip未到期
-			return f.Redirect("/weixin/pay/toSubVipSetPage")
+			return f.Redirect("/front/vipsubscribe/toSubVipSetPage")
 		} else if i_vip_status < 0 { //vip已到期
 			return f.Redirect("/front/vipsubscribe/introducePage")
 		}

+ 11 - 22
src/jfw/front/vipsubscribe.go

@@ -16,14 +16,14 @@ import (
 
 type Subscribepay struct {
 	*xweb.Action
-	introduce         xweb.Mapper `xweb:"/front/vipsubscribe/introducePage"`    //订阅收费介绍页
-	trialInfo         xweb.Mapper `xweb:"/front/vipsubscribe/trialInfo"`        //vip订阅服务-用户信息录入页面
-	toPurchasePage    xweb.Mapper `xweb:"/weixin/pay/vipsubscribe_(.*)"`        //订阅收费购买页面(试用用户)
-	toChooseArea      xweb.Mapper `xweb:"/front/vipsubscribe/toChooseArea"`     //订阅收费地区筛选
-	toChooseIndustry  xweb.Mapper `xweb:"/front/vipsubscribe/toChooseIndustry"` //订阅收费行业筛选
-	toPaySuccessPage  xweb.Mapper `xweb:"/front/vipsubscribe/toPaySuccessPage"` //订阅支付完成页面
-	toOrderDetailPage xweb.Mapper `xweb:"/weixin/pay/toOrderDetailPage"`        //订阅收费支付订单详情页面
-	toSetKeyWordPage  xweb.Mapper `xweb:"/front/vipsubscribe/toSetKeyWordPage"` //订阅收费设置关键词
+	introduce         xweb.Mapper `xweb:"/front/vipsubscribe/introducePage"`     //订阅收费介绍页
+	trialInfo         xweb.Mapper `xweb:"/front/vipsubscribe/trialInfo"`         //vip订阅服务-用户信息录入页面
+	toPurchasePage    xweb.Mapper `xweb:"/front/vipsubscribe/vipsubscribe_(.*)"` //订阅收费购买页面(试用用户)
+	toChooseArea      xweb.Mapper `xweb:"/front/vipsubscribe/toChooseArea"`      //订阅收费地区筛选
+	toChooseIndustry  xweb.Mapper `xweb:"/front/vipsubscribe/toChooseIndustry"`  //订阅收费行业筛选
+	toPaySuccessPage  xweb.Mapper `xweb:"/front/vipsubscribe/toPaySuccessPage"`  //订阅支付完成页面
+	toOrderDetailPage xweb.Mapper `xweb:"/front/vipsubscribe/toOrderDetailPage"` //订阅收费支付订单详情页面
+	toSetKeyWordPage  xweb.Mapper `xweb:"/front/vipsubscribe/toSetKeyWordPage"`  //订阅收费设置关键词
 
 	//toSetPageOld      xweb.Mapper `xweb:"/front/vipsubscribe/toSetPageOld"`      //订阅收费设置
 	toSetInfoTypePage xweb.Mapper `xweb:"/front/vipsubscribe/toSetInfoTypePage"` //订阅收费设置信息类型
@@ -31,23 +31,12 @@ type Subscribepay struct {
 	toVIPViewPage     xweb.Mapper `xweb:"/front/vipsubscribe/toVIPViewPage"`     //订阅收费预览
 
 	//修改升级
-	toSetPage        xweb.Mapper `xweb:"/weixin/pay/toSubVipSetPage"`          //订阅收费设置
+	toSetPage        xweb.Mapper `xweb:"/front/vipsubscribe/toSubVipSetPage"`  //订阅收费设置
 	toChangeArea     xweb.Mapper `xweb:"/front/vipsubscribe/toChangeArea"`     //修改区域
 	toChangeIndustry xweb.Mapper `xweb:"/front/vipsubscribe/toChangeIndustry"` //修改行业
 	toChangeTime     xweb.Mapper `xweb:"/front/vipsubscribe/toChangeTime"`     //修改时间
 	toSetPushSetPage xweb.Mapper `xweb:"/front/vipsubscribe/toSetPushSetPage"` //订阅收费推送设置
 
-	//修改
-	//toEditSubPage       xweb.Mapper `xweb:"/front/vipsubscribe/toEditSubPage"`       //订阅收费修改页面
-	//toEditSubAreaPage   xweb.Mapper `xweb:"/front/vipsubscribe/toEditSubAreaPage"`   //订阅收费修改地区
-	//toEditSubInduPage   xweb.Mapper `xweb:"/front/vipsubscribe/toEditSubInduPage"`   //订阅收费修改行业
-	//submitEditSubFinish xweb.Mapper `xweb:"/front/vipsubscribe/submitEditSubFinish"` //订阅收费修改成功
-
-	//升级
-	//toUpgradePage xweb.Mapper `xweb:"/weixin/pay/toUpgradePage"`                   //订阅收费升级服务页面
-	//addArea       xweb.Mapper `xweb:"/front/vipsubscribe/toChooseAreaUpgrade"`     //订阅收费升级新增区域页面
-	//addIndustry   xweb.Mapper `xweb:"/front/vipsubscribe/toChooseIndustryUpgrade"` //订阅收费升级新增行业页面
-
 	//续费
 	renewPage xweb.Mapper `xweb:"/front/vipsubscribe/renewPage/(.*)"` //订阅到期(will:即将到期,exprie:已到期)
 	//renewPayPage xweb.Mapper `xweb:"/weixin/pay/renewPayPage"`           //订阅到期续费
@@ -196,7 +185,7 @@ func (s *Subscribepay) Introduce() error {
 	}
 	obj := util.ObjToMap((*m)["o_vipjy"])
 	if util.IntAll((*m)["i_vip_status"]) > 0 {
-		return s.Redirect("/weixin/pay/toSubVipSetPage")
+		return s.Redirect("/front/vipsubscribe/toSubVipSetPage")
 	}
 	s.T["notShowTrial"] = util.IntAll((*obj)["i_trial"]) == -1 || (*m)["i_vip_status"] != nil
 	s.T["signature"] = wx.SignJSSDK(s.Site() + s.Url())
@@ -382,7 +371,7 @@ func (s *Subscribepay) PreheatPoster() {
 	u, ok := public.MQFW.FindOne("user", `{"s_m_openid":"`+myopenid+`"}`)
 	if len(*u) > 0 && ok {
 		if util.Int64All((*u)["i_vip_status"]) == 1 || util.Int64All((*u)["i_vip_status"]) == 2 {
-			s.Redirect("/weixin/pay/toSubVipSetPage")
+			s.Redirect("/front/vipsubscribe/toSubVipSetPage")
 		} else {
 			s.Redirect("/front/vipsubscribe/introducePage")
 		}

+ 160 - 23
src/jfw/front/ws_dataExport.go

@@ -1,11 +1,15 @@
 package front
 
 import (
+	"encoding/json"
 	"errors"
 	"fmt"
 	"jfw/config"
 	"jfw/jyutil"
+	"strconv"
 
+	"github.com/go-xweb/xweb"
+	"gopkg.in/mgo.v2/bson"
 	//	"jfw/pay"
 	"jfw/public"
 	"jfw/wx"
@@ -16,25 +20,159 @@ import (
 	"qfw/util/redis"
 	"strings"
 	"time"
-
-	"github.com/go-xweb/xweb"
-	"gopkg.in/mgo.v2/bson"
 )
 
 type WsDataExport struct {
 	*xweb.Action
-	searchExport   xweb.Mapper `xweb:"/front/wx_dataExport/searchExport"`   //微信数据导出
-	toPreview      xweb.Mapper `xweb:"/front/wx_dataExport/toPreview/(.*)"` //微信数据导出-预览页面
-	paySuccessPage xweb.Mapper `xweb:"/front/wx_dataExport/paySuccessPage"` //微信数据导出-支付成功页面
-	//微信端支付
-	toCreateOrderPage xweb.Mapper `xweb:"/weixin/pay/dataexport"`          //微信数据导出-订单微信支付
-	getPreview        xweb.Mapper `xweb:"/front/wx_dataExport/getPreview"` //微信数据导出-预览数据
+	searchExport    xweb.Mapper `xweb:"/front/wx_dataExport/searchExport"`    //微信数据导出
+	toPreview       xweb.Mapper `xweb:"/front/wx_dataExport/toPreview/(.*)"`  //微信数据导出-预览页面
+	getPreview      xweb.Mapper `xweb:"/front/wx_dataExport/getPreview"`      //微信数据导出-预览数据
+	submitOrder     xweb.Mapper `xweb:"/front/wx_dataExport/submitOrder"`     //微信数据导出-提交订单页面
+	wxToOrderDetail xweb.Mapper `xweb:"/front/wx_dataExport/wxToOrderDetail"` //微信数据导出-订单详情
+
 }
 
 func init() {
 	xweb.AddAction(&WsDataExport{})
 }
 
+func (w *WsDataExport) WxToOrderDetail() error {
+	myOpenid := ""
+	if openid := w.GetSession("s_m_openid"); openid != nil {
+		myOpenid = openid.(string)
+	} else {
+		checkIsSubscribeFlag := true
+		if w.GetString("state") == "wx" {
+			//微信跳回来的
+			code := w.GetString("code")
+			if code != "" {
+				openid := jyutil.Getopenid(code)
+				if openid != "" {
+					isSubscribe := true
+					if !checkIsSubscribeFlag {
+						checkIsSubscribeFlag = true
+						isSubscribe = CheckUserIsSubscribe(openid)
+					}
+					if isSubscribe {
+						FindUserAndCreateSess(openid, w.Session())
+					}
+				}
+			}
+		} else {
+			if public.CheckWxBrowser(w.Request) {
+				//所有参数都不再使用,跳到微信验证用户
+				return w.Redirect(fmt.Sprintf(config.Wxoauth, url.QueryEscape(w.Site()+w.Url()), "wx"), 302)
+			}
+		}
+		userid := util.ObjToString(w.GetSession("userId"))
+		myOpenid, _ = w.Session().Get("s_m_openid").(string)
+		if userid == "" {
+			return errors.New("未登录")
+		}
+	}
+	myUserId, _ := w.Session().Get("userId").(string)
+	orderCode := w.GetString("orderCode")
+	//分享
+	w.T["signature"] = wx.SignJSSDK(w.Site() + w.Url())
+	w.T["openid"] = se.EncodeString(myOpenid)
+	mynickname, _ := w.Session().Get("s_nickname").(string)
+	myavatar, _ := w.Session().Get("s_avatar").(string)
+	w.T["nickname"] = mynickname
+	w.T["avatar"] = myavatar
+	//-----------------------
+	orderDetail := map[string]interface{}{}
+	filter := public.SieveCondition{}
+	queryMap := map[string]interface{}{
+		"order_code": orderCode,
+		"user_id":    myUserId,
+	}
+	if orderCode != "" {
+		orderDetail = *public.Mysql.FindOne(tableName_order, queryMap, "", "")
+	}
+	orderDetail["order_code"] = orderCode
+	if orderDetail["pay_money"] != nil {
+		orderDetail["pay_money"] = float64(orderDetail["pay_money"].(int64)) / 100
+	}
+	if orderDetail["filter"] != nil {
+		err := json.Unmarshal([]byte(orderDetail["filter"].(string)), &filter)
+		if err == nil {
+			publishtime := filter.PublishTime
+			if publishtime != "" {
+				timeArr := strings.Split(publishtime, "_")
+				if len(timeArr) == 2 {
+					start, err := strconv.ParseInt(timeArr[0], 10, 64)
+					end, erro := strconv.ParseInt(timeArr[1], 10, 64)
+					if err == nil && erro == nil {
+						filter.PublishTime = util.FormatDateByInt64(&start, layout_date) + "-" + util.FormatDateByInt64(&end, layout_date)
+					} else if err == nil && erro != nil {
+						filter.PublishTime = util.FormatDateByInt64(&start, layout_date) + "-"
+					} else if err != nil && erro == nil {
+						filter.PublishTime = "-" + util.FormatDateByInt64(&end, layout_date)
+					}
+				}
+			}
+			filter.MinPrice = public.GetPriceDes_SieveCondition(filter.MinPrice, filter.MaxPrice)
+			orderDetail["filter"] = filter
+		} else {
+			log.Println("筛选条件-关键词-结构体反序列化-错误", err)
+		}
+	}
+	if orderDetail["applybill_type"] != nil && orderDetail["applybill_type"].(int64) == 0 {
+		orderDetail["applybill_type"] = "个人"
+	} else if orderDetail["applybill_type"] != nil && orderDetail["applybill_type"].(int64) == 1 {
+		orderDetail["applybill_type"] = "单位"
+	} else {
+		orderDetail["applybill_type"] = "-"
+	}
+	if orderDetail["applybill_status"] != nil && orderDetail["applybill_status"].(int64) == 1 {
+		orderDetail["applybill_status"] = "T" //已申请
+	} else {
+		orderDetail["applybill_status"] = "F" //未申请
+	}
+	if orderDetail["pay_time"] != nil {
+		pay_time := strings.Replace(orderDetail["pay_time"].(string), "-", ".", -1)
+		orderDetail["pay_time"] = pay_time
+	}
+	if orderDetail["create_time"] != nil {
+		create_time := strings.Replace(orderDetail["create_time"].(string), "-", ".", -1)
+		orderDetail["create_time"] = create_time
+	}
+	orderMoney := orderDetail["order_money"]
+	if orderMoney != nil {
+		orderDetail["order_money"] = float64(orderMoney.(int64)) / 100
+	}
+	//加密
+	orderStatus := util.IntAll((orderDetail)["order_status"])
+	orderDetail["order_status"] = orderStatus
+	if orderStatus == 1 {
+		orderDetail["transaction_id"] = func() string {
+			table := ""
+			payway := util.ObjToString(orderDetail["pay_way"])
+			if strings.Contains(payway, "wx") {
+				payway = "微信"
+				table = "weixin_pay"
+			} else if strings.Contains(payway, "ali") {
+				payway = "支付宝"
+				table = "ali_pay"
+			} else {
+				return ""
+			}
+			orderDetail["pay_way"] = payway
+
+			wxPayMap := map[string]interface{}{}
+			wxPayMap["out_trade_no"] = orderDetail["out_trade_no"]
+			wxpay := public.Mysql.FindOne(table, wxPayMap, "", "")
+			if wxpay == nil {
+				return ""
+			}
+			return util.ObjToString((*wxpay)["transaction_id"])
+		}()
+	}
+	w.T["o"] = orderDetail
+	w.Render("/weixin/dataExport/dataExport_toOrderDetail.html", &w.T)
+	return nil
+}
+
 //
 func (w *WsDataExport) GetPreview() error {
 	userId := util.ObjToString(w.GetSession("userId"))
@@ -87,18 +225,18 @@ func (w *WsDataExport) GetPreview() error {
 }
 
 //
-func (w *WsDataExport) PaySuccessPage() error {
-	defer util.Catch()
-	orderCode := w.GetString("orderCode")
-	userId := util.ObjToString(w.GetSession("userId"))
-	res := public.Mysql.FindOne("dataexport_order", map[string]interface{}{"user_id": userId, "order_code": orderCode}, "user_mail,pay_time", "")
-	if res != nil || len(*res) == 0 {
-		w.T["email"] = (*res)["user_mail"]
-		w.T["payTime"] = (*res)["pay_time"]
-	}
-	w.T["orderCode"] = orderCode
-	return w.Render("/weixin/dataExport/dataExport_paySuccess.html", &w.T)
-}
+//func (w *WsDataExport) PaySuccessPage() error {
+//	defer util.Catch()
+//	orderCode := w.GetString("orderCode")
+//	userId := util.ObjToString(w.GetSession("userId"))
+//	res := public.Mysql.FindOne("dataexport_order", map[string]interface{}{"user_id": userId, "order_code": orderCode}, "user_mail,pay_time", "")
+//	if res != nil || len(*res) == 0 {
+//		w.T["email"] = (*res)["user_mail"]
+//		w.T["payTime"] = (*res)["pay_time"]
+//	}
+//	w.T["orderCode"] = orderCode
+//	return w.Render("/weixin/dataExport/dataExport_paySuccess.html", &w.T)
+//}
 
 //预览
 func (w *WsDataExport) ToPreview(_id string) error {
@@ -138,7 +276,7 @@ func (w *WsDataExport) ToPreview(_id string) error {
 }
 
 //创建订单页面
-func (w *WsDataExport) ToCreateOrderPage() error {
+func (w *WsDataExport) SubmitOrder() error {
 	defer util.Catch()
 	checkIsSubscribeFlag := true
 	id := util.SE.Decode4Hex(w.GetString("id"))
@@ -235,7 +373,6 @@ func (w *WsDataExport) ToCreateOrderPage() error {
 	incurKey := fmt.Sprintf("PreviewData_%s_%d", w.GetSession("userId"), time.Now().Day()) //每日限制预览次数
 	w.T["PreviewData"] = util.IntAll(redis.Get("other", incurKey))
 
-	w.T["signature"] = wx.SignJSSDK(w.Site() + w.Url())
 	//字段包
 	spec := w.GetString("dataspec")
 	if spec != "" {

+ 4 - 148
src/jfw/front/wxMyOrder.go

@@ -1,9 +1,10 @@
 package front
 
 import (
-	"encoding/json"
 	"errors"
 	"fmt"
+	"github.com/go-xweb/xweb"
+	"gopkg.in/mgo.v2/bson"
 	"jfw/config"
 	"jfw/jyutil"
 	"jfw/public"
@@ -11,11 +12,6 @@ import (
 	"log"
 	"net/url"
 	"qfw/util"
-	"strconv"
-	"strings"
-
-	"github.com/go-xweb/xweb"
-	"gopkg.in/mgo.v2/bson"
 )
 
 type WxMyOrder struct {
@@ -27,7 +23,7 @@ type WxMyOrder struct {
 	wxPaySuccess   xweb.Mapper `xweb:"/front/wxMyorder/wxPaySuccess/(\\w+)"`
 	//需要调用微信支付接口的页面
 	toMyWxOrder     xweb.Mapper `xweb:"/weixin/pay/toMyWxOrder"`     //微信我的订单
-	wxToOrderDetail xweb.Mapper `xweb:"/weixin/pay/wxToOrderDetail"` //订单详情
+
 	//
 	getValuationList xweb.Mapper `xweb:"/front/wxMyOrder/getValuationList/(\\w+)"` //计价清单
 	myset            xweb.Mapper `xweb:"/front/wxMyOrder/myset"`                   //设置页面
@@ -202,146 +198,6 @@ func (w *WxMyOrder) ToMyWxOrder() error {
 	return w.Render("/weixin/dataExport/dataExport_toMyOrder.html", &w.T)
 }
 
-func (w *WxMyOrder) WxToOrderDetail() error {
-	myOpenid := ""
-	if openid := w.GetSession("s_m_openid"); openid != nil {
-		myOpenid = openid.(string)
-	} else {
-		checkIsSubscribeFlag := true
-		if w.GetString("state") == "wx" {
-			//微信跳回来的
-			code := w.GetString("code")
-			if code != "" {
-				openid := jyutil.Getopenid(code)
-				if openid != "" {
-					isSubscribe := true
-					if !checkIsSubscribeFlag {
-						checkIsSubscribeFlag = true
-						isSubscribe = CheckUserIsSubscribe(openid)
-					}
-					if isSubscribe {
-						FindUserAndCreateSess(openid, w.Session())
-					}
-				}
-			}
-		} else {
-			if public.CheckWxBrowser(w.Request) {
-				//所有参数都不再使用,跳到微信验证用户
-				return w.Redirect(fmt.Sprintf(config.Wxoauth, url.QueryEscape(w.Site()+w.Url()), "wx"), 302)
-			}
-		}
-		userid := util.ObjToString(w.GetSession("userId"))
-		myOpenid, _ = w.Session().Get("s_m_openid").(string)
-		if userid == "" {
-			return errors.New("未登录")
-		}
-	}
-	myUserId, _ := w.Session().Get("userId").(string)
-	orderCode := w.GetString("orderCode")
-	//分享
-	w.T["signature"] = wx.SignJSSDK(w.Site() + w.Url())
-	w.T["openid"] = se.EncodeString(myOpenid)
-	mynickname, _ := w.Session().Get("s_nickname").(string)
-	myavatar, _ := w.Session().Get("s_avatar").(string)
-	w.T["nickname"] = mynickname
-	w.T["avatar"] = myavatar
-	//-----------------------
-	orderDetail := map[string]interface{}{}
-	filter := public.SieveCondition{}
-	queryMap := map[string]interface{}{
-		"order_code": orderCode,
-		"user_id":    myUserId,
-	}
-	if orderCode != "" {
-		orderDetail = *public.Mysql.FindOne(tableName_order, queryMap, "", "")
-	}
-	orderDetail["order_code"] = orderCode
-	if orderDetail["pay_money"] != nil {
-		orderDetail["pay_money"] = float64(orderDetail["pay_money"].(int64)) / 100
-	}
-	if orderDetail["filter"] != nil {
-		err := json.Unmarshal([]byte(orderDetail["filter"].(string)), &filter)
-		if err == nil {
-			publishtime := filter.PublishTime
-			if publishtime != "" {
-				timeArr := strings.Split(publishtime, "_")
-				if len(timeArr) == 2 {
-					start, err := strconv.ParseInt(timeArr[0], 10, 64)
-					end, erro := strconv.ParseInt(timeArr[1], 10, 64)
-					if err == nil && erro == nil {
-						filter.PublishTime = util.FormatDateByInt64(&start, layout_date) + "-" + util.FormatDateByInt64(&end, layout_date)
-					} else if err == nil && erro != nil {
-						filter.PublishTime = util.FormatDateByInt64(&start, layout_date) + "-"
-					} else if err != nil && erro == nil {
-						filter.PublishTime = "-" + util.FormatDateByInt64(&end, layout_date)
-					}
-				}
-			}
-			filter.MinPrice = public.GetPriceDes_SieveCondition(filter.MinPrice, filter.MaxPrice)
-			orderDetail["filter"] = filter
-		} else {
-			log.Println("筛选条件-关键词-结构体反序列化-错误", err)
-		}
-	}
-	if orderDetail["applybill_type"] != nil && orderDetail["applybill_type"].(int64) == 0 {
-		orderDetail["applybill_type"] = "个人"
-	} else if orderDetail["applybill_type"] != nil && orderDetail["applybill_type"].(int64) == 1 {
-		orderDetail["applybill_type"] = "单位"
-	} else {
-		orderDetail["applybill_type"] = "-"
-	}
-	if orderDetail["applybill_status"] != nil && orderDetail["applybill_status"].(int64) == 1 {
-		orderDetail["applybill_status"] = "T" //已申请
-	} else {
-		orderDetail["applybill_status"] = "F" //未申请
-	}
-	if orderDetail["pay_time"] != nil {
-		pay_time := strings.Replace(orderDetail["pay_time"].(string), "-", ".", -1)
-		orderDetail["pay_time"] = pay_time
-	}
-	if orderDetail["create_time"] != nil {
-		create_time := strings.Replace(orderDetail["create_time"].(string), "-", ".", -1)
-		orderDetail["create_time"] = create_time
-	}
-	orderMoney := orderDetail["order_money"]
-	if orderMoney != nil {
-		orderDetail["order_money"] = float64(orderMoney.(int64)) / 100
-	}
-	if orderDetail["id"] != nil && orderMoney != nil && orderDetail["order_code"] != nil {
-		orderDetail["token"] = public.GetWaitPayToken(orderDetail["id"].(int64), int(orderMoney.(int64)), orderDetail["order_code"].(string), util.ObjToString(orderDetail["pay_way"]), myUserId)
-	}
-	//加密
-	orderDetail["filter_id"] = util.SE.Encode2Hex(orderDetail["filter_id"].(string))
-	orderStatus := util.IntAll((orderDetail)["order_status"])
-	orderDetail["order_status"] = orderStatus
-	if orderStatus == 1 {
-		orderDetail["transaction_id"] = func() string {
-			table := ""
-			payway := util.ObjToString(orderDetail["pay_way"])
-			if strings.Contains(payway, "wx") {
-				payway = "微信"
-				table = "weixin_pay"
-			} else if strings.Contains(payway, "ali") {
-				payway = "支付宝"
-				table = "ali_pay"
-			} else {
-				return ""
-			}
-			orderDetail["pay_way"] = payway
-
-			wxPayMap := map[string]interface{}{}
-			wxPayMap["out_trade_no"] = orderDetail["out_trade_no"]
-			wxpay := public.Mysql.FindOne(table, wxPayMap, "", "")
-			if wxpay == nil {
-				return ""
-			}
-			return util.ObjToString((*wxpay)["transaction_id"])
-		}()
-	}
-	w.T["o"] = orderDetail
-	w.Render("/weixin/dataExport/dataExport_toOrderDetail.html", &w.T)
-	return nil
-}
 
 func (w *WxMyOrder) WxGetOrderCode(order_code string) error {
 	myOpenid := ""
@@ -368,7 +224,7 @@ func (w *WxMyOrder) WxGetOrderCode(order_code string) error {
 	w.T["order_code"] = order_code
 	//是否申请发票 支付状态
 	if status == 1 || order_status == 0 {
-		w.Redirect("/weixin/pay/wxToOrderDetail?orderCode=" + order_code)
+		w.Redirect("/front/wx_dataExport/wxToOrderDetail?orderCode=" + order_code)
 	} else {
 		w.Render("/weixin/dataExport/dataExport_applyInvoice.html", &w.T)
 	}

+ 3 - 3
src/jfw/modules/subscribepay/src/service/commonAction.go

@@ -275,12 +275,12 @@ func (this *CommonAction) GetWxjsPayParam() {
 		prepayTime, _ := time.ParseInLocation(qutil.Date_Full_Layout, qutil.ObjToString((*oData)["prepay_time"]), time.Local)
 		jsPayParam := qutil.ObjToString((*oData)["code_url"])
 		payway := qutil.ObjToString((*oData)["pay_way"])
+		totalfee := qutil.IntAll((*oData)["order_money"])
 		if time.Now().Before(prepayTime.Add(time.Hour*2)) && jsPayParam != "" && payway == "wx_js" {
 			//未过期
-			return &entity.FuncResult{true, nil, map[string]interface{}{"res": jsPayParam}}
+			return &entity.FuncResult{true, nil, map[string]interface{}{"orderCode": orderCode, "res": jsPayParam, "price": totalfee}}
 		}
 		//重新生成订单
-		totalfee := qutil.IntAll((*oData)["order_money"])
 		tradeno, prepayid := "", ""
 		dotype := this.GetString("dotype")
 		productFlag := ""
@@ -321,7 +321,7 @@ func (this *CommonAction) GetWxjsPayParam() {
 		if !ok {
 			return &entity.FuncResult{false, errors.New("数据库操作异常"), nil}
 		}
-		return &entity.FuncResult{true, nil, map[string]interface{}{"orderCode": orderCode, "res": jsPayParam}}
+		return &entity.FuncResult{true, nil, map[string]interface{}{"orderCode": orderCode, "res": jsPayParam, "price": totalfee}}
 	}()
 	if r.Err != nil {
 		log.Printf("%s CreateOrder err:%v\n", userId, r.Err.Error())

+ 1 - 1
src/web/staticres/js/wxSupersearch.js

@@ -2222,7 +2222,7 @@ var SuperSearch = {
 	initHomePage:function(){
 		$(".home_toset").click(function(){
 			if(SuperSearch.isVip){
-				window.location.href="/weixin/pay/toSubVipSetPage"
+				window.location.href="/front/vipsubscribe/toSubVipSetPage"
 			}else{
 				sessionStorage.removeItem("keysetindexToHistory");
 				window.location.href="/swordfish/historypush"

+ 3 - 1
src/web/staticres/vipsubscribe/js/vip_index_new.js

@@ -843,7 +843,9 @@ $(function () {
             if (r.success) {
                 if (r.data.needPay) {
                     //创建支付订单
-                    onBridgeReady(JSON.parse(r.data.res), r.data.code);
+                    //onBridgeReady(JSON.parse(r.data.res), r.data.code);
+                    //clearSessionStorage();
+                    window.location.replace("/weixin/pay/checkout_vip?orderCode=" + r.data.code);
                 } else {
                     //订阅修改
                     if (r.data.doSuccess) {

+ 185 - 0
src/web/staticres/wxCommonPay/css/base.css

@@ -0,0 +1,185 @@
+* {
+  -webkit-box-sizing: border-box;
+  box-sizing: border-box;
+  -webkit-overflow-scrolling: touch;
+  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
+  -webkit-tap-highlight-color: transparent;
+}
+body,
+div,
+dl,
+dt,
+dd,
+ul,
+ol,
+li,
+h1,
+h2,
+h3,
+h4,
+h5,
+h6,
+pre,
+code,
+form,
+fieldset,
+legend,
+input,
+textarea,
+p,
+blockquote,
+th,
+td,
+hr,
+button,
+article,
+aside,
+details,
+figcaption,
+figure,
+footer,
+header,
+hgroup,
+menu,
+nav,
+section,
+sumary {
+  margin: 0;
+  padding: 0;
+}
+html,
+body {
+  /* max-width: 750px; */
+  -webkit-text-size-adjust: 100%;
+  margin: 0 auto;
+  height: 100%;
+  overflow-x: hidden;
+  -webkit-box-sizing: border-box;
+  box-sizing: border-box;
+  font-size: 0.24rem;
+  background: rgba(245, 244, 249, 1);
+  color: #3d3d3d;
+  font-family: "Microsoft YaHei", "Helvetica Neue", "Roboto", "Segoe UI",
+    "PingFang SC", "Hiragino Sans GB", sans-serif;
+}
+
+ul,
+ol {
+  list-style: none;
+}
+/*清除输入框内阴影*/
+input,
+textarea,
+select,
+button {
+  outline: none;
+  border: 0;
+  -webkit-appearance: none;
+  appearance: none;
+}
+button,
+span,
+div {
+  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
+  /* -webkit-user-modify:read-only; */
+}
+img {
+  border: 0;
+  vertical-align: middle;
+  max-width: 100%;
+  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
+}
+
+a {
+  text-decoration: none;
+  color: #3d3d3d;
+  -webkit-tap-highlight-color: rgba(255, 255, 255, 0);
+  -webkit-user-select: none;
+  -moz-user-focus: none;
+  -moz-user-select: none;
+}
+/*禁用长按页面时的弹出菜单(iOS下有效) ,img和a标签都要加*/
+img,
+a {
+  -webkit-touch-callout: none;
+}
+em,
+i {
+  font-style: normal;
+}
+
+/*兼容ios调取h5页面的头部*/
+.ios-head {
+  display: none;
+  position: fixed;
+  top: 0;
+  padding-top: 15px;
+  background: #18974b;
+  width: 100%;
+  z-index: 100;
+}
+/*base*/
+.clearfix {
+  zoom: 1;
+}
+.clearfix:after {
+  clear: both;
+  height: 0;
+  overflow: hidden;
+  display: block;
+  visibility: hidden;
+  content: "";
+}
+
+.left {
+  float: left;
+}
+
+.right {
+  float: right;
+}
+.ellipsis {
+  overflow: hidden;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+  text-align: justify
+}
+
+/* 超过2行省略号显示 */
+.ellipsis-2 {
+    overflow: hidden;
+    text-overflow: ellipsis;
+    display: -webkit-box;
+    -webkit-line-clamp: 2;
+    -webkit-box-orient: vertical;
+    text-align: justify
+}
+
+/* 超过3行省略号显示 */
+.ellipsis-3 {
+    overflow: hidden;
+    text-overflow: ellipsis;
+    display: -webkit-box;
+    -webkit-line-clamp: 3;
+    -webkit-box-orient: vertical;
+}
+
+.show {
+  display: block;
+}
+.hide {
+  display: none;
+}
+@media (min-width: 320px){html{font-size: 42.6667px;} }
+@media (min-width: 360px){html{font-size: 48px;} }
+@media (min-width: 375px){html{font-size: 50px;} }
+@media (min-width: 384px){html{font-size: 51.2px;} }
+@media (min-width: 414px){html{font-size: 55.2px;} }
+@media (min-width: 448px){html{font-size: 59.7333px;} }
+@media (min-width: 480px){html{font-size: 48px;} }
+@media (min-width: 512px){html{font-size: 68.2667px;} }
+@media (min-width: 544px){html{font-size: 72.5333px;} }
+@media (min-width: 576px){html{font-size: 76.8px;} }
+@media (min-width: 608px){html{font-size: 81.0667px;} }
+@media (min-width: 640px){html{font-size: 85.3333px;} }
+@media (min-width: 750px){html{font-size: 100px;} }

+ 266 - 0
src/web/staticres/wxCommonPay/css/pay_success.css

@@ -0,0 +1,266 @@
+@charset "UTF-8";
+.main {
+  width: 100%;
+  overflow: scroll;
+}
+
+.main::-webkit-scrollbar {
+  display: none;
+}
+
+.layout_top-bottom {
+  display: flex;
+  flex-direction: column;
+  justify-content: space-between;
+  height: 100%;
+}
+
+.layout_top-bottom .layou_top {
+  flex: 1;
+  overflow: scroll;
+}
+
+.bottom_button {
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  width: 100%;
+  height: .94rem;
+  position: fixed;
+  bottom: 0;
+}
+
+.bottom_button .left_btn,
+.bottom_button .right_btn {
+  flex: 1;
+  height: 100%;
+  font-size: .34rem;
+}
+
+.bottom_button .left_btn {
+  color: #2cb7ca;
+  background-color: #fff;
+  border-top: 1px solid #e0e0e0;
+}
+
+.bottom_button .right_btn {
+  color: #fff;
+  background-color: #2cb7ca;
+  border-top: 1px solid #2cb7ca;
+}
+
+.bottom_button button[disabled] {
+  opacity: .5;
+}
+
+.jy_icon {
+  position: relative;
+  width: 100%;
+  height: 100%;
+}
+
+.jy_icon.decrease:before,
+.jy_icon.increase:before,
+.jy_icon.increase:after {
+  position: absolute;
+  left: 50%;
+  top: 50%;
+  content: '';
+  width: 0.4rem;
+  height: 0.04rem;
+  background-color: #686868;
+  transform: translate(-50%, -50%);
+}
+
+.jy_icon.increase:after {
+  transform: translate(-50%, -50%) rotate(90deg);
+}
+
+/*禁止长按复制 加给body*/
+.no-touch {
+  -webkit-touch-callout: none;
+  -webkit-user-select: none;
+  -khtml-user-select: none;
+  -moz-user-select: none;
+  -ms-user-select: none;
+  user-select: none;
+}
+
+/* 弹性盒子布局 */
+.flex_alginC {
+  display: flex;
+  align-items: center;
+}
+
+.flex_alginC_justB {
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+}
+
+.flex_alginC_justC {
+  display: flex;
+  align-items: center;
+  justify-content: center;
+}
+
+.flex_column {
+  display: flex;
+  flex-direction: column;
+}
+
+.flex_column_alignC {
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+}
+
+/* 自定义弹窗*/
+.custom-dialog .weui-dialog__hd {
+  background: #F5F4F9;
+  padding: .17rem 0;
+  color: #000;
+  font-size: .34rem;
+  text-align: center;
+}
+
+.custom-dialog .weui-dialog__bd {
+  padding: .37rem 0;
+  color: #1D1D1D;
+  font-size: .32rem;
+  text-align: center;
+}
+
+.custom-dialog .weui-dialog__ft:after {
+  border: 0;
+}
+
+.custom-dialog .weui-dialog__btn:after {
+  border: 0;
+}
+
+.custom-dialog .weui-dialog__ft {
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  padding-bottom: .38rem;
+  box-sizing: border-box;
+  text-align: center;
+}
+
+.custom-dialog .weui-dialog__btn {
+  display: block;
+  width: 1.72rem;
+  height: .72rem;
+  line-height: .72rem;
+  color: #fff;
+  padding: 0;
+  flex: none;
+  text-align: center;
+  border-radius: 3px;
+}
+
+.custom-dialog .weui-dialog__btn_primary {
+  background-color: #2CB7CA;
+  margin-right: 1rem;
+}
+
+.custom-dialog .weui-dialog__btn_default {
+  background-color: #BFBFC3;
+}
+
+/* 自定义switch按钮 */
+.custom-switch {
+  position: relative;
+  width: 52px;
+  height: 32px;
+  border: 1px solid #dfdfdf;
+  outline: 0;
+  border-radius: 16px;
+  box-sizing: border-box;
+  background-color: #dfdfdf;
+  -webkit-transition: background-color .1s,border .1s;
+  transition: background-color .1s,border .1s;
+  -webkit-appearance: none;
+}
+
+.custom-switch:before {
+  content: " ";
+  position: absolute;
+  top: 0;
+  left: 0;
+  width: 50px;
+  height: 30px;
+  border-radius: 15px;
+  background-color: #fdfdfd;
+  -webkit-transition: -webkit-transform 0.35s cubic-bezier(0.45, 1, 0.4, 1);
+  transition: -webkit-transform 0.35s cubic-bezier(0.45, 1, 0.4, 1);
+  transition: transform 0.35s cubic-bezier(0.45, 1, 0.4, 1);
+  transition: transform 0.35s cubic-bezier(0.45, 1, 0.4, 1), -webkit-transform 0.35s cubic-bezier(0.45, 1, 0.4, 1);
+}
+
+.custom-switch:after {
+  content: " ";
+  position: absolute;
+  top: 0;
+  left: 0;
+  width: 30px;
+  height: 30px;
+  border-radius: 15px;
+  background-color: #fff;
+  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
+  -webkit-transition: -webkit-transform 0.35s cubic-bezier(0.4, 0.4, 0.25, 1.35);
+  transition: -webkit-transform 0.35s cubic-bezier(0.4, 0.4, 0.25, 1.35);
+  transition: transform 0.35s cubic-bezier(0.4, 0.4, 0.25, 1.35);
+  transition: transform 0.35s cubic-bezier(0.4, 0.4, 0.25, 1.35), -webkit-transform 0.35s cubic-bezier(0.4, 0.4, 0.25, 1.35);
+}
+
+.custom-switch.checked {
+  border-color: #04be02;
+  background-color: #04be02;
+}
+
+.custom-switch.checked:before {
+  transform: scale(0);
+}
+
+.custom-switch.checked:after {
+  transform: translateX(20px);
+}
+
+.layou_top .icon_box {
+  display: flex;
+  flex-direction: column;
+  justify-content: center;
+  align-items: center;
+  height: 4rem;
+  color: #2cb7ca;
+}
+
+.layou_top .icon_box i.icon {
+  font-size: 1.6rem;
+}
+
+.layou_top .icon_box p {
+  font-size: .48rem;
+}
+
+.layou_top .info_box {
+  padding: 0 .4rem;
+  border-top: 1px solid #e0e0e0;
+  border-bottom: 1px solid #e0e0e0;
+}
+
+.layou_top .info_box > div {
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  height: .88rem;
+  color: #666;
+  font-size: .28rem;
+  border-bottom: 1px solid #e0e0e0;
+}
+
+.layou_top .info_box > div:last-of-type {
+  border-bottom: 0;
+}

+ 746 - 0
src/web/staticres/wxCommonPay/css/public.css

@@ -0,0 +1,746 @@
+@charset "UTF-8";
+.scrollbar-none::-webkit-scrollbar {
+  display: none;
+}
+
+body {
+  color: #171826;
+  line-height: 1.6;
+}
+
+input,
+textarea {
+  caret-color: #2cb7ca;
+}
+
+.error-tip {
+  display: none;
+  color: #FB483D;
+  font-size: .24rem;
+}
+
+/*禁止长按复制 加给body*/
+.no-touch {
+  -webkit-touch-callout: none;
+  -webkit-user-select: none;
+  -khtml-user-select: none;
+  -moz-user-select: none;
+  -ms-user-select: none;
+  user-select: none;
+}
+
+.j-pd {
+  padding-left: 0.32rem;
+  padding-right: 0.32rem;
+}
+
+.j-arrow {
+  display: inline-block;
+  width: 0.26rem;
+  height: 0.26rem;
+  border: 2px solid #5f5e64;
+  border-bottom-color: transparent;
+  border-right-color: transparent;
+  background: 0 0;
+  transform: rotate(-45deg);
+}
+
+.highlight-text {
+  color: #2cb7ca;
+}
+
+.j-container {
+  display: flex;
+  flex-direction: column;
+  justify-content: space-between;
+  height: 100%;
+}
+
+.j-header {
+  position: relative;
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+  min-height: 0.88rem;
+  padding: 26px 0.24rem 6px;
+  padding: 30px 0.24rem 0.14rem;
+  font-size: 0.36rem;
+  font-size: 17px;
+  background-color: #fff;
+}
+
+.j-header:after {
+  content: '';
+  position: absolute;
+  left: 0;
+  bottom: 0;
+  width: 100%;
+  height: 1px;
+  background-image: linear-gradient(0deg, rgba(0, 0, 0, 0.1) 65%, transparent 35%);
+}
+
+.j-header .header-left,
+.j-header .header-title,
+.j-header .header-right {
+  display: flex;
+  align-items: center;
+}
+
+.j-header .header-left {
+  color: #5f5e64;
+  color: #444;
+  font-size: 0.4rem;
+}
+
+.j-header .header-title {
+  color: #171826;
+}
+
+.j-header .header-right {
+  height: 100%;
+  min-width: 0.4rem;
+  font-size: 0.3rem;
+}
+
+.j-body {
+  flex: 1;
+  overflow-y: scroll;
+  overflow-x: hidden;
+}
+
+.j-footer {
+  box-shadow: 0px -2px 8px rgba(54, 147, 179, 0.051);
+}
+
+@keyframes ballRotate {
+  0% {
+    transform: rotate(0);
+  }
+  100% {
+    transform: rotate(360deg);
+  }
+}
+
+.ball-clip-rotate {
+  position: absolute;
+  left: 50%;
+  top: 50%;
+  z-index: 2;
+  transform: translate(-50%, -50%);
+}
+
+.ball-clip-rotate .ball {
+  display: inline-block;
+  width: 26px;
+  height: 26px;
+  border-radius: 50%;
+  border: 3px solid #fff;
+  border-bottom-color: transparent;
+  background: 0 0;
+  -webkit-animation: ballRotate 0.75s 0s linear infinite;
+  animation: ballRotate 0.75s 0s linear infinite;
+}
+
+.j-mask {
+  position: fixed;
+  z-index: 1000;
+  top: 0;
+  right: 0;
+  left: 0;
+  bottom: 0;
+}
+
+.black {
+  background: rgba(0, 0, 0, 0.6);
+}
+
+.j-loading {
+  display: none;
+}
+
+.j-loading .j-toast {
+  position: fixed;
+  top: 45%;
+  left: 50%;
+  z-index: 1001;
+  padding: 0.2rem;
+  min-width: 2.2rem;
+  max-width: 6.2rem;
+  width: auto;
+  height: auto;
+  color: #fff;
+  font-size: 0.28rem;
+  text-align: center;
+  background: rgba(18, 18, 18, 0.7);
+  border-radius: 5px;
+  transform: translate(-50%, -50%);
+}
+
+.j-loading .j-toast.icon {
+  padding: 0.5rem 0.2rem;
+}
+
+.j-loading .j-toast.icon .j-toast_icon {
+  display: inline-block;
+  width: 38px;
+  height: 38px;
+}
+
+.j-loading .j-toast .j-toast_icon {
+  display: none;
+}
+
+.j-loading .j-toast .j-toast_content {
+  text-align: center;
+}
+
+.j-loading-icon {
+  display: inline-block;
+  width: 20px;
+  height: 20px;
+  vertical-align: baseline;
+  background: transparent url("data:image/svg+xml;charset=utf8, %3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 100 100'%3E%3Cpath fill='none' d='M0 0h100v100H0z'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23E9E9E9' rx='5' ry='5' transform='translate(0 -30)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23989697' rx='5' ry='5' transform='rotate(30 105.98 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%239B999A' rx='5' ry='5' transform='rotate(60 75.98 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23A3A1A2' rx='5' ry='5' transform='rotate(90 65 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23ABA9AA' rx='5' ry='5' transform='rotate(120 58.66 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23B2B2B2' rx='5' ry='5' transform='rotate(150 54.02 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23BAB8B9' rx='5' ry='5' transform='rotate(180 50 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23C2C0C1' rx='5' ry='5' transform='rotate(-150 45.98 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23CBCBCB' rx='5' ry='5' transform='rotate(-120 41.34 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23D2D2D2' rx='5' ry='5' transform='rotate(-90 35 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23DADADA' rx='5' ry='5' transform='rotate(-60 24.02 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23E2E2E2' rx='5' ry='5' transform='rotate(-30 -5.98 65)'/%3E%3C/svg%3E") no-repeat;
+  background-size: 100%;
+  -webkit-animation: ballRotate 1s steps(12) infinite;
+  animation: ballRotate 1s steps(12) infinite;
+}
+
+.j-button-group {
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  width: 100%;
+  padding: 0.16rem 0.32rem 0.24rem;
+  background-color: #fff;
+}
+
+.j-button-confirm, .j-picker .weui-half-screen-dialog__ft .weui-picker__btn,
+.j-button-cancel {
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  flex: 1;
+  width: 100%;
+  height: 0.92rem;
+  font-size: 0.32rem;
+  line-height: inherit;
+  text-align: center;
+  border-radius: 0.16rem;
+}
+
+.j-button-cancel {
+  margin-right: 0.26rem;
+  color: #5f5e64;
+  background-color: #edeff2;
+}
+
+.j-button-confirm, .j-picker .weui-half-screen-dialog__ft .weui-picker__btn {
+  color: #fff;
+  background-color: #2cb7ca;
+}
+
+button[disabled] {
+  opacity: 0.5;
+}
+
+.j-cells {
+  position: relative;
+  width: 100%;
+  font-size: 0.32rem;
+  background-color: #fff;
+}
+
+.j-cells:before, .j-cells:after {
+  content: '';
+  position: absolute;
+  left: 0;
+  right: 0;
+  width: 100%;
+  height: 1px;
+  background-image: linear-gradient(0deg, rgba(0, 0, 0, 0.05) 70%, transparent 30%);
+}
+
+.j-cells:before {
+  top: 0;
+}
+
+.j-cells:after {
+  bottom: 0;
+}
+
+.j-cell {
+  position: relative;
+  display: flex;
+  align-items: center;
+  padding-left: 0.32rem;
+  width: 100%;
+  min-height: 1.08rem;
+  overflow: hidden;
+}
+
+.j-cell .j-cell_left {
+  margin-right: 0.28rem;
+  white-space: nowrap;
+}
+
+.j-cell .j-cell_right {
+  padding-right: 0.32rem;
+  display: flex;
+  align-items: center;
+  flex: 1;
+  height: 100%;
+}
+
+.j-cell .j-cell_right:after {
+  content: '';
+  position: absolute;
+  left: 1.04rem;
+  right: 0;
+  bottom: 0;
+  width: 100%;
+  height: 1px;
+  background-image: linear-gradient(0deg, rgba(0, 0, 0, 0.05) 80%, transparent 20%);
+}
+
+.j-cell .j-cell_right .iconfont {
+  margin-left: 0.2rem;
+}
+
+.j-cell .j-cell_right .j-cell_rl {
+  flex: 1;
+}
+
+.j-cell:last-of-type .j-cell_right:after {
+  height: 0;
+  border-top: 0;
+}
+
+.j-cells.without-icon .j-cell {
+  justify-content: space-between;
+}
+
+.j-cells.without-icon .j-cell_right:after {
+  left: 0.32rem;
+}
+
+.j-cells.without-icon .j-cell_right {
+  display: flex;
+  align-items: center;
+  justify-content: flex-end;
+  max-width: 65%;
+}
+
+.j-cells.without-icon .j-cell_right:after {
+  left: 0.32rem;
+}
+
+.j-cells.with-sub-info {
+  margin: 0.2rem 0.24rem;
+  width: auto;
+  border-radius: 0.16rem;
+}
+
+.j-cells.with-sub-info:before, .j-cells.with-sub-info:after {
+  height: 0;
+}
+
+.j-cells.with-sub-info .j-cell_right:after {
+  left: 0.32rem;
+}
+
+.j-cells.with-sub-info .j-cell {
+  flex-direction: column;
+  justify-content: space-between;
+  padding-top: 0.24rem;
+  padding-bottom: 0.24rem;
+  color: #9b9ca3;
+  font-size: 0.28rem;
+}
+
+.j-cells.with-sub-info .cell-hd {
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+  width: 100%;
+}
+
+.j-cells.with-sub-info .cell-ft {
+  padding-right: 0.32rem;
+  width: 100%;
+}
+
+.j-cells.with-sub-info .j-cell_left {
+  color: #171826;
+  font-size: 0.36rem;
+}
+
+.j-cells.with-sub-info .j-cell_right {
+  flex-wrap: nowrap;
+  justify-content: flex-end;
+  max-width: 65%;
+}
+
+.border-all {
+  position: relative;
+}
+
+.border-all:after {
+  content: '';
+  position: absolute;
+  left: 0;
+  top: 0;
+  z-index: -1;
+  width: 200%;
+  height: 200%;
+  border: 1px solid rgba(0, 0, 0, 0.1);
+  -webkit-transform-origin: 0 0;
+  transform-origin: 0 0;
+  -webkit-transform: scale(0.5, 0.5);
+  transform: scale(0.5, 0.5);
+}
+
+.weui-dialog {
+  left: 0.72rem;
+  right: 0.72rem;
+  border-radius: 0.16rem;
+}
+
+.weui-skin_android .weui-dialog__btn,
+.weui-dialog__btn {
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  margin: 0;
+  padding: 0;
+  width: 100%;
+  height: 100%;
+  color: #2cb7ca;
+  font-size: 0.36rem;
+  font-weight: 400;
+}
+
+.weui-skin_android .weui-dialog__btn {
+  border-left: 1px solid rgba(0, 0, 0, 0.1);
+}
+
+.weui-skin_android .weui-dialog__btn:first-of-type {
+  border-left: 0;
+}
+
+.weui-skin_android .weui-dialog__btn:after,
+.weui-dialog__btn:after {
+  transform: scale(1);
+}
+
+.weui-skin_android .weui-dialog__btn:last-child {
+  margin: 0;
+}
+
+.weui-skin_android .weui-dialog__btn_default,
+.weui-dialog__btn_default {
+  color: #171826;
+}
+
+.weui-skin_android .weui-dialog__btn_primary,
+.weui-dialog__btn_primary {
+  color: #2cb7ca;
+}
+
+.weui-skin_android .weui-dialog__btn_warning,
+.weui-dialog__btn_warning {
+  color: #fb483d;
+}
+
+.weui-skin_android .weui-dialog__bd,
+.weui-dialog__bd {
+  margin: 0.44rem 0.4rem 0.44rem;
+  padding: 0;
+  min-height: auto;
+  font-size: 0.32rem;
+  color: #171826;
+  text-align: center;
+}
+
+.weui-dialog__bd:first-child {
+  padding: 0;
+}
+
+.weui-skin_android .weui-dialog__ft,
+.weui-dialog__ft {
+  display: flex;
+  padding: 0;
+  height: 0.92rem;
+  border-top: 1px solid #efeffe;
+  text-align: center;
+}
+
+.j-alert .weui-dialog__hd {
+  padding: 0.48rem 0.4rem 0;
+  color: #1d1d1d;
+  text-align: center;
+}
+
+.j-alert .weui-dialog__hd .weui-dialog__title {
+  font-size: 0.34rem;
+  font-weight: 700;
+}
+
+.j-dialog .weui-dialog__hd {
+  background: #f5f4f9;
+  padding: 0.17rem 0;
+  color: #000;
+  font-size: 0.34rem;
+  text-align: center;
+}
+
+.j-dialog .weui-dialog__ft:after {
+  border: 0;
+}
+
+.weui-toast {
+  font-size: 0.3rem;
+  padding: 0.15rem 0.2rem;
+  max-width: 6rem;
+  min-height: 0;
+  width: auto;
+  height: auto;
+  top: 45%;
+  left: 50%;
+  margin-left: 0;
+  transform: translate(-50%, -50%);
+}
+
+.j-toast .weui-icon_toast {
+  display: none;
+}
+
+.j-toast .weui-toast__content {
+  margin: 0;
+}
+
+.j-toast-icon .weui-toast {
+  width: 2.2rem;
+  height: 2.2rem;
+  padding: 0.2rem 0.2rem;
+}
+
+.j-toast-icon .weui-icon_toast {
+  margin: 0.1rem 0 0;
+}
+
+.j-toast-icon .weui-toast__content {
+  margin: 0;
+}
+
+.j-switch {
+  box-sizing: border-box;
+  position: relative;
+  width: 1.04rem;
+  height: 0.64rem;
+  border: 2px solid #edeff2;
+  border-radius: 0.32rem;
+  background-color: #edeff2;
+  outline: 0;
+  -webkit-transition: background-color 0.1s, border 0.1s;
+  transition: background-color 0.1s, border 0.1s;
+  -webkit-appearance: none;
+}
+
+.j-switch:before {
+  content: '';
+  position: absolute;
+  top: 0;
+  left: 0;
+  bottom: 0;
+  right: 0;
+  border-radius: 0.32rem;
+  background-color: #edeff2;
+  -webkit-transition: -webkit-transform 0.35s cubic-bezier(0.45, 1, 0.4, 1);
+  transition: -webkit-transform 0.35s cubic-bezier(0.45, 1, 0.4, 1);
+  transition: transform 0.35s cubic-bezier(0.45, 1, 0.4, 1);
+  transition: transform 0.35s cubic-bezier(0.45, 1, 0.4, 1), -webkit-transform 0.35s cubic-bezier(0.45, 1, 0.4, 1);
+}
+
+.j-switch:after {
+  content: '';
+  position: absolute;
+  top: 50%;
+  left: 0.04rem;
+  margin-top: -0.26rem;
+  width: 0.52rem;
+  height: 0.52rem;
+  border-radius: 50%;
+  background-color: #fff;
+  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
+  -webkit-transition: -webkit-transform 0.35s cubic-bezier(0.4, 0.4, 0.25, 1.35);
+  transition: -webkit-transform 0.35s cubic-bezier(0.4, 0.4, 0.25, 1.35);
+  transition: transform 0.35s cubic-bezier(0.4, 0.4, 0.25, 1.35);
+  transition: transform 0.35s cubic-bezier(0.4, 0.4, 0.25, 1.35), -webkit-transform 0.35s cubic-bezier(0.4, 0.4, 0.25, 1.35);
+}
+
+.j-switch:checked {
+  border-color: #2cb7ca;
+  background-color: #2cb7ca;
+}
+
+.j-switch:checked:before {
+  transform: scale(0);
+}
+
+.j-switch:checked:after {
+  transform: translateX(0.4rem);
+}
+
+.j-picker.adaption .weui-half-screen-dialog__bd {
+  flex: 1;
+}
+
+.j-picker.adaption .weui-half-screen-dialog__bd .weui-picker__bd {
+  height: auto;
+}
+
+.j-picker .weui-picker {
+  display: flex;
+  flex-direction: column;
+  justify-content: space-between;
+  padding: 0 0.32rem;
+  min-height: 6.24rem;
+}
+
+.j-picker .weui-half-screen-dialog {
+  max-height: 70%;
+}
+
+.j-picker .weui-half-screen-dialog__hd {
+  justify-content: space-between;
+  padding: 0.44rem 0.44rem 0.24rem 0;
+  width: 100%;
+}
+
+.j-picker .weui-half-screen-dialog__hd .weui-half-screen-dialog__hd__main {
+  flex: none;
+  order: 1;
+  padding: 0;
+  text-align: left;
+}
+
+.j-picker .weui-half-screen-dialog__hd .weui-half-screen-dialog__hd__main .weui-half-screen-dialog__title {
+  color: #171826;
+  font-size: 0.4rem;
+  font-weight: normal;
+}
+
+.j-picker .weui-half-screen-dialog__hd .weui-half-screen-dialog__hd__side {
+  order: 2;
+}
+
+.j-picker .weui-half-screen-dialog__hd .weui-half-screen-dialog__hd__side .weui-picker__btn {
+  color: #c0c4cc;
+  font-size: 0.42rem;
+}
+
+.j-picker .weui-half-screen-dialog__bd {
+  font-size: 0.36rem;
+}
+
+.j-picker .weui-half-screen-dialog__ft {
+  padding: 0.16rem 0 0.24rem;
+}
+
+.j-picker .weui-half-screen-dialog__ft .weui-picker__btn {
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  margin: 0;
+  padding: 0;
+  color: #f7f9fa;
+  font-size: 0.36rem;
+  font-weight: 400;
+}
+
+.j-tab-triangle {
+  position: relative;
+}
+
+.j-tab-triangle:after {
+  content: '';
+  position: absolute;
+  top: 50%;
+  right: 0;
+  width: 0;
+  height: 0;
+  font-size: 0;
+  line-height: 0;
+  border-style: solid;
+  border-width: 0.1rem;
+  border-color: #aaa transparent transparent transparent;
+  transform: translate(140%, -30%);
+}
+
+.j-tab-triangle.active:after {
+  border-color: transparent transparent #2cb7ca transparent;
+  transform: translate(140%, -70%);
+}
+
+.j-tab-triangle.current {
+  color: #2cb7ca;
+}
+
+.j-tab-triangle.current:after {
+  border-color: #2cb7ca transparent transparent transparent;
+}
+
+.checkbox {
+  width: 0.4rem;
+  height: 0.4rem;
+  border: 1px solid #ddd;
+  border-radius: 50%;
+  margin-right: 0.2rem;
+  -webkit-appearance: none;
+  background: #fff;
+}
+
+.checkbox:checked {
+  border: 0;
+  background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAACpElEQVRogc1asa2DMBBlhIyQMpKNxAiMwAiMwAhswAgZgQrOHSVwLhiBERghvwCSwMdgOzYG6aQUhLw7v3u+Z+J5Bq4g724U6pCUTeIznlGGHQHsKcOBAPbT544yntOiTSnUoYnf/Rm0X7YRAXxShgMFfCkH4zkBjE8HTos21QYtCJ/xzDpwAhgTwN4k8OWK4GBlRYK8u1HGc2vA/yfSPaC+GwFPoQ6tVn1vNQoMfgJPyiYxzXXl3ijbSA88YOwa/BzKfUEKDK4C/hOSe8cD6vv1wOOLMhykGvtUtVFPotunDmDsHORBCPth1PoLUmeDStvUKdrUObgxqinE9xRt+q/6TjarZWW79cZFGXaiVQjy7va+0S/byDX4LYUhZZOIvrPoBafKw7BbVFOW1ozn7pt3B/xe9ed4QH33KNSho+pXv4CngC9SNon0zVcDTwFHNTqb/wTwqcX5TQry3KNHmmswfMYzEXif8Uz5mQwHT1r/55MGC+AJ4FPruVIJrJwRhToUbjA74LeATxuoHvg5gSMJFf24bO9YAy+7AgTwuQVAirfrmeULvBHxYDhINTEpm0SYhGgMsQ1+LG4v3f17B09rCyqa2Y0fzzCeq8pXJUpiPB/F6jTwc1GVJ1GNQ6dp3lJSLqkEyjbSG+YYDrKnBA+o77a8xruQunK219yeN/aGNaM0j9NTAvpmXqA2VsHDSigMWMrFdDnt1vY8xtpSep4hUz+qTGXbIG1K+iWMvW7137x1Y27UQtBzHyqd6A80qi/00AsqXfKETuWFh0OjLwSv/KLjSkkcbZjXTYLhoA3eeRI6tBFd86h8Inhzr1m/L+v7xESZQ6m8XCJnARckoketca+paNGmVuiievllG032tKKjtezf1f36u43PeEYAY1PV/gMeU6lGAhyHxgAAAABJRU5ErkJggg==) no-repeat center center;
+  background-size: 100% 100%;
+}
+
+.checkbox.transparent:checked {
+  border: 0;
+  background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAHBSURBVHgBzZiPcYIwFIeDE7hB6QR1gzqCG2g3cAPtBLqBdoK6Ae0EXCd4bmA3+PW9JlxTJEJCgnx37xQSku9IyL9MeQIg558FxxPHnGNqQvjmOJv45DhlWXZWKWCRFUcBf0p5VsWCC5tzEPpDvcT44SnHDvGRMqe+Mjn0q04FQffFzjKE9FCrFHQzEYZDWuFf801qThuOXA3HzNR5DfRnfS/mlUdmCZEa9u3YnHkAfZQ/EyOzGkjmyPHWcD+HPUYh7SdesbXqOzakF1VijvRs7dfB1wdHvgdJXCMtdZnljbxryfCOccgIh1v9h6CbM3Qa8ZX5rVMyXtoKhB7Bfd5kiIxwUTcSCbW5hq/38JdZwAPVkk4NUlt0l5nB3QJOobYHqKNUbxmYJqMuGaWCWoX23HeMICOUrlHTxbKh4n0kGeEUMjA2LxdUlMXdOnTq2CSQEfKqsAL+7CLLlK4O6lUI9C4itM/YrMRlnAs0w4u6H6+Nd9FtaojN3qkJPYkOsXqsILTtYjGmjeKAUmVnmVrzpehTUqbfYUNNTMYoQn8I1oawN0YspMMX8DgXypQn+DvSe1Z6IJWwj/QkPji+VMCR3g//T7SIqLP6vQAAAABJRU5ErkJggg==) no-repeat center center;
+  background-size: 100% 100%;
+}
+
+.j-button {
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  height: 0.72rem;
+  padding: 0 0.2rem;
+  background-color: #f5f6f7;
+  color: #5f5e64;
+  border-radius: 0.08rem;
+}
+
+.j-button-item {
+  position: relative;
+  display: inline-block;
+  color: #171826;
+}
+
+.j-button-item.active {
+  color: #2abed1;
+  background-color: #e8fafd;
+}
+
+.j-button-item.active:after {
+  content: '';
+  position: absolute;
+  right: 0;
+  bottom: 0;
+  width: 0.24rem;
+  height: 0.24rem;
+  background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAKySURBVHgB7Zg/aNRQHMd/eXfWP6i9omJBhBOXa0W4bK6ni6Murro76Cgu1kF0aysOjnXTyTopLkEcHM8TxIMOHghFQfBAaUtp8/P9Qt+Rpnm99y+XBO6zXJJ7gc83v+S9XwIwZsyY0jIbdB54UFIuBF/mEfFu6QLUX7drR2qVeUC8RfulChDJT7KAbzbFsdIEaLxt19nBSL4eP16KADJ5ovAB9pMnCh1g9n276VVZgAA12RgGBaURdG4OkycKWYGZoHPHQ1hQGVu4CkSrq6I8UagKkDwgzOmcU5gAojUATXIPkGwNdMk1QFproEtuAYYtUKrkEsCVPDHyAC7liZEGUGkNdBnZQqbaGugykgrotAa6ZF4B3dZAlwpkiElrILg2PQVL/nm4ceYE/N3ahu6/jdRxmd1Cpq0BQfKPZs4O9inApY9fU8dWwTGiNUDD1iApT1AAGU4DDFoDRKPWIE2eePb9l/QcZ7eQ7QIlk7//7Qe8+flHep6TAHnJE9azUFJedfYQ2MgTVgGoNWAT7BPfnBbHnl6sw8mJA3C8WoErpyZhdWNTGsJWntM3XshkrQGJxyFBEk3iQJ7oGVWAWgOG8JxvHkr+93tzK7rycZKVcCTPn2B8px1gpzV4IvufJElWFqJx9LAbeU6IuKg1C+m0BrKrnIaJPLHmhVPKFaDWgMvfUx0vq0QSU3l++yyttPxXQ1dim9ZgeUdMVgljeU4I+JB+961A7KvBVTBEVgkbeURY7F5uvqRtaQVcvruKStw+dxqO8Wn28cqquTyfOtdZOCf2Ux9i1y/eriB59MJWt+X3xLE9C1mR5T0vvB6XJ3ZVIIuvBi5Iu/KCQQWy+mpgCz2w617op8kTUQWy/GpgSB8xfIEMFmTiAs/mxdshfX6te9zjM78pPqyx7eVey++rnPgfnLxxiLvERTEAAAAASUVORK5CYII=) no-repeat;
+  background-size: contain;
+}

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 4 - 0
src/web/staticres/wxCommonPay/css/weui.min.css


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 3 - 0
src/web/staticres/wxCommonPay/iconfont/iconfont.css


BIN
src/web/staticres/wxCommonPay/iconfont/iconfont.eot


BIN
src/web/staticres/wxCommonPay/iconfont/iconfont.ttf


BIN
src/web/staticres/wxCommonPay/iconfont/iconfont.woff


BIN
src/web/staticres/wxCommonPay/iconfont/iconfont.woff2


+ 2 - 2
src/web/templates/active/livePage/live_online_wx.html

@@ -210,9 +210,9 @@
                   if (isSub){
                     //是VIP且不是试用用户 跳到付费页面  免费用户跳到购买页面
                     if(isVip&&!isOnTail){
-                      window.location.href="/weixin/pay/vipsubscribe_renew"
+                      window.location.href="/front/vipsubscribe/vipsubscribe_renew"
                     }else{
-                      window.location.href="/weixin/pay/vipsubscribe_new"
+                      window.location.href="/front/vipsubscribe/vipsubscribe_new"
                     }
                   } else {
                     $androidActionSheet.fadeIn(200);

+ 6 - 6
src/web/templates/pc/myOrder.html

@@ -573,9 +573,9 @@
 										orderStatusClassTwo="blueBg"
 										
 										m_status_html +='待付款'
-										m_handle_html +='-'
-                    					//m_handle_html += '<p><a href="/front/vip/orderPay/' + orderCode + '" class="go_pay">去支付</a></p>'
-										//+ '<p><a  orderCode="' + orderCode + '" onclick="toCancel(' + id + ',this,\'\',3)">取消订单</a></p>'
+										//m_handle_html +='-'
+                    					m_handle_html += '<p><a href="/front/vip/orderPay/' + orderCode + '" class="go_pay">去支付</a></p>'
+										+ '<p><a  orderCode="' + orderCode + '" onclick="toCancel(' + id + ',this,\'\',3)">取消订单</a></p>'
                     
 									}else if (orderStatus == 1) {//已完成
 										if (filter_.cycleunit==3){	//试用用户
@@ -606,9 +606,9 @@
 										orderStatusClassTwo="blueBg"
 										
 										m_status_html +='待付款'
-										m_handle_html +='-'
-                    					//m_handle_html += '<p><a href="/front/entniche/orderPay/' + orderCode + '" class="go_pay">去支付</a></p>'
-										//+ '<p><a  orderCode="' + orderCode + '" onclick="toCancel(' + id + ',this,\'\',3)">取消订单</a></p>'
+										//m_handle_html +='-'
+                    					m_handle_html += '<p><a href="/front/entniche/orderPay/' + orderCode + '" class="go_pay">去支付</a></p>'
+										+ '<p><a  orderCode="' + orderCode + '" onclick="toCancel(' + id + ',this,\'\',3)">取消订单</a></p>'
                     
 									}else if (orderStatus == 1) {//已完成
 										m_status_html +='<p class="finish_status">已完成</p>'

+ 358 - 0
src/web/templates/weixin/commonPay/checkout.html

@@ -0,0 +1,358 @@
+<!DOCTYPE html>
+<html lang="zh-CN">
+
+<head>
+    <meta charset="UTF-8">
+    <meta name="viewport"
+          content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"/>
+    <meta name="apple-mobile-web-app-capable" content="yes">
+    <meta name="apple-mobile-web-app-status-bar-style" content="black">
+    <meta http-equiv="X-UA-Compatible" content="ie=edge">
+    <title>支付</title>
+    <script src="{{Msg "seo" "cdn"}}/js/rem.js"></script>
+    <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/wxCommonPay/css/weui.min.css?v={{Msg "seo" "version"}}">
+    <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/wxCommonPay/css/base.css?v={{Msg "seo" "version"}}">
+    <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/wxCommonPay/iconfont/iconfont.css?v={{Msg "seo" "version"}}">
+    <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/wxCommonPay/css/public.css?v={{Msg "seo" "version"}}">
+    <style>
+        .j-body .need-pay {
+            display: flex;
+            flex-direction: column;
+            align-items: center;
+            justify-content: center;
+            height: 1.6rem;
+        }
+
+        .need-pay {
+            margin-bottom: .2rem;
+            background-color: #fff;
+        }
+
+        .need-pay .tip-text {
+            color: #9B9CA3;
+            font-size: .24rem;
+        }
+
+        .price-container {
+            margin-top: .03rem;
+            color: #FB483D;
+            font-size: .32rem;
+        }
+
+        .price-container .price {
+            font-size: .4rem;
+        }
+
+        .j-cell .iconfont {
+            color: #2ABED1;
+            font-size: .48rem;
+        }
+
+        .j-cell .icon-weixinzhifu {
+            color: #09BB07;
+        }
+
+
+        .j-cell .j-cell_right .iconfont {
+            visibility: hidden;
+        }
+
+        .j-cell.active .j-cell_right .iconfont {
+            visibility: visible;
+        }
+    </style>
+    {{include "/common/weixin.html"}}
+    <script>
+        var signature = {{.T.signature}};
+        var isConfigSuccess = true;
+        if (signature && signature.length == 4) {
+            wx.config({
+                debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
+                appId: signature[0], // 必填,公众号的唯一标识
+                timestamp: signature[1], // 必填,生成签名的时间戳
+                nonceStr: signature[2], // 必填,生成签名的随机串
+                signature: signature[3],// 必填,签名,见附录1
+                jsApiList: ['chooseWXPay', 'hideAllNonBaseMenuItem'] // 必填,需要使用的JS接口列表,所有JS接口列表见附录2
+            });
+            wx.ready(function () {
+                if (!isConfigSuccess) {
+                    return;
+                }
+                wx.hideAllNonBaseMenuItem();
+            });
+            wx.error(function (res) {
+                //config信息验证失败会执行error函数,如签名过期导致验证失败,具体错误信息可以打开config的debug模式查看,也可以在返回的res参数中查看,对于SPA可以在这里更新签名。
+                //alert(res);
+                isConfigSuccess = false;
+            });
+        }
+    </script>
+</head>
+
+<body>
+<div class="j-container">
+    <div class="j-body">
+        <div class="need-pay">
+            <div class="tip-text">需支付金额</div>
+            <div class="price-container">
+                <span class="yen">&yen;</span>
+                <span class="price">0</span>
+            </div>
+        </div>
+        <div class="j-cells">
+            <div class="j-cell active" data-pay-mode="weixin">
+                <div class="j-cell_left iconfont icon-weixinzhifu"></div>
+                <div class="j-cell_right">
+                    <div class="j-cell_rl">微信支付</div>
+                    <div class="j-cell_rr iconfont icon-shezhichenggong"></div>
+                </div>
+            </div>
+        </div>
+    </div>
+    <div class="j-footer j-button-group">
+        <button class="j-button-confirm">确认支付</button>
+    </div>
+</div>
+
+<script src="{{Msg "seo" "cdn"}}/js/jquery-3.2.1.min.js?v={{Msg "seo" "version"}}"></script>
+<script>
+    $(function () {
+        var checkout = {
+            modeMap: {
+                'weixin': 'wx_js',
+            },
+            errorMap: {
+                0: '操作失败',
+                1: '操作成功'
+            },
+            mode: 'wx_js',
+            orderInfo: {
+                ordercode: {{.T.orderCode}},
+                productType:{{.T.doType}},
+                payObj: {}
+            },
+            loading: null,
+            init: function () {
+                this.getOrderPay()
+            },
+            getOrderPay: function () {
+                this.loading = this.jLoading({
+                    content: '加载中...',
+                })
+                $.ajax({
+                    url: '/jypay/wx/getWxjsPayParam',
+                    type: 'POST',
+                    data: {
+                        orderCode: this.orderInfo.ordercode,
+                        dotype: this.orderInfo.productType,
+                    },
+                    contentType: 'application/x-www-form-urlencoded',
+                    success: function (res) {
+                        checkout.loading.hide(function () {
+                            checkout.loading = null
+                            if (res.success) {
+                                $(".price-container .price").text(checkout.formatMoney(res.data.price / 100));
+                                try {
+                                    checkout.orderInfo.payObj = JSON.parse(res.data.res);
+                                    checkout.confirmPayEvent()//支付点击事件
+                                } catch (e) {
+                                    checkout.jLoading({
+                                        content: "支付创建异常",
+                                        iconHide: true,
+                                        duration: 1500
+                                    })
+                                }
+                            } else {
+                                checkout.jLoading({
+                                    content: res.errMsg,
+                                    iconHide: true,
+                                    duration: 1500
+                                })
+                            }
+                        })
+                    },
+                    error: function (err) {
+                        console.log(err);
+                    }
+                })
+            },
+            confirmPayEvent: function () {
+                $('.j-button-confirm').on('click', function () {
+                    // 如果loading有值说明正在请求中
+                    if (checkout.loading) return
+                    checkout.onBridgeReady(checkout.orderInfo.payObj)
+                })
+            },
+            onBridgeReady(res) { //调用微信支付
+                WeixinJSBridge.invoke('getBrandWCPayRequest', {
+                        "appId": res["appId"],
+                        "timeStamp": res["timestamp"],
+                        "nonceStr": res["nonceStr"],
+                        "package": res["prepayId"],
+                        "signType": res["signType"],
+                        "paySign": res["sign"]
+                    },
+                    function (r) {
+                        if (r.err_msg === "get_brand_wcpay_request:ok") {
+                            checkout.checkIsPaySuccess()//校验数据库是否是支付
+                        } else if (r.err_msg === "get_brand_wcpay_request:cancel") {
+                            //取消支付 跳转订单详情
+                            console.log("取消支付")
+                            switch (checkout.orderInfo.productType) {
+                                case "vip": {
+                                    window.location.replace("/front/vipsubscribe/toOrderDetailPage?orderCode=" + checkout.orderInfo.ordercode)
+                                    break
+                                }
+                                case "dataexport" :{
+                                    window.location.replace("/front/wx_dataExport/wxToOrderDetail?orderCode=" + checkout.orderInfo.ordercode)
+                                    break
+                                }
+                            }
+                        } else {
+                            EasyAlert.show("系统异常,请稍微再试", "", 3000);
+                        }
+                    });
+            },
+            // 开启定时任务,3s查询一次是否支付成功
+            checkIsPaySuccess: function () {
+                var checkPaySuccessTimer = setInterval(function () {
+                    vTools.ajax({
+                        url: '/jypay/isPaySuccess',
+                        type: 'POST',
+                        data: {
+                            code: checkout.orderInfo.ordercode
+                        },
+                        contentType: 'application/x-www-form-urlencoded',
+                        success: function (res) {
+                            if (res.success) {
+                                // 清除购买页面的缓存
+                                // 直到找到支付完成订单,关闭加载动画
+                                clearInterval(checkPaySuccessTimer)
+                                // 显示支付成功提示,成功后跳转
+                                this.jLoading({
+                                    content: '支付成功',
+                                    iconHide: true,
+                                    duration: 1500,
+                                    callback: function () {
+                                        //清楚购买缓存
+                                        switch (checkout.orderInfo.productType) {
+                                            case  "vip": {
+                                                sessionStorage.removeItem("sub_vip_state");
+                                                sessionStorage.removeItem("vip_index_read");
+                                                sessionStorage.removeItem("vip_change_time");
+                                                sessionStorage.removeItem("vip_trial_buy");
+                                                sessionStorage.removeItem("vipSubSelectArea");
+                                                sessionStorage.removeItem("vipSubSelectIndustry");
+                                                sessionStorage.removeItem("vipSubSelectTime");
+                                                sessionStorage.removeItem("endTime");
+                                                sessionStorage.removeItem("liveActiveCode_new");
+                                                sessionStorage.removeItem("liveActiveCode_renew");
+                                                break
+                                            }
+                                            case "dataexport": {
+                                                var dataexportId = checkout.getUrlParam("attach")
+                                                sessionStorage.removeItem("readClause");
+                                                sessionStorage.removeItem("index");
+                                                sessionStorage.removeItem("EmailVerity_" + dataexportId);
+                                                sessionStorage.removeItem("keyWords");
+                                                break
+                                            }
+                                        }
+                                        location.replace("/weixin/{{.T.doType}}/paySuccess?orderCode=" + res.orderCode + "&email=" + res.email + "&payTime=" + res.payTime)
+                                    }
+                                })
+                            }
+                        }
+                    })
+                }, 1000)
+            },
+            formatMoney: function (s, n) {
+                if (n === undefined) {
+                    n = -1
+                } else {
+                    n = n > 0 && n <= 20 ? n : 2;
+                }
+                var intS = parseInt(s)
+                var point = '.'
+                var left;
+                var right;
+                s = parseFloat((s + '').replace(/[^\d\.-]/g, ''))
+                // 没传n,默认(如果为整数,则不保留小数。如果为浮点数,则保留两位小数)
+                if (n === -1) {
+                    if (s === intS) {
+                        n = 0
+                        right = ''
+                        point = ''
+                    } else {
+                        n = 2
+                        s = s.toFixed(n);
+                        right = s.split('.')[1];
+                    }
+                    s = s + ''
+                    left = s.split('.')[0].split('').reverse();
+                } else {
+                    s = parseFloat((s + '').replace(/[^\d\.-]/g, '')).toFixed(n) + '';
+                    left = s.split('.')[0].split('').reverse();
+                    right = s.split('.')[1];
+                }
+
+                t = '';
+                for (i = 0; i < left.length; i++) {
+                    t += left[i] + ((i + 1) % 3 == 0 && (i + 1) != left.length ? ',' : '');
+                }
+
+                var money = t.split('').reverse().join('') + point + right;
+                return money;
+            },
+            jLoading: function (options) {
+                // 设置options参数的默认值
+                options.content = options.content || 'loading...'
+                options.bgc = options.bgc || 'transparent'
+                options.icon = options.icon || 'j-loading-icon'
+                options.duration = options.duration || 0
+                // 将其拼接成width: 5rem;的形式
+                options.width = options.width ? 'width:' + options.width + ';' : ''
+                var that = this
+                var bgcClassMap = {
+                    transparent: '',
+                    black: 'black'
+                }
+
+                var icon = options.iconHide ? '' : 'icon';
+                var html = '<div class="j-loading"><div class="j-mask ' + bgcClassMap[options.bgc] + '"></div><div class="j-toast ' + icon + '" style="' + options.width + '"><i class="j-toast_icon ' + options.icon + '"></i><p class="j-toast_content">' + options.content + '</p></div></div>'
+                var _html = $(html)
+                $('body').append(_html)
+                _html.fadeIn(this.loadingTransition)
+
+                var _loading = {
+                    _html: _html,
+                    hide: function (callback) {
+                        this._html.fadeOut(that.loadingTransition, function () {
+                            this.remove()
+                            callback && callback()
+                        })
+                    }
+                }
+
+                if (options.duration > 0) {
+                    setTimeout(function () {
+                        _loading.hide(options.callback)
+                    }, options.duration)
+                }
+
+                return _loading
+            },
+            getUrlParam(name) {
+                var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
+                var r = window.location.search.substr(1).match(reg);
+                if (r != null)
+                    return unescape(r[2]);
+                return null;
+            }
+        }
+        checkout.init()
+    })
+</script>
+</body>
+
+</html>

+ 61 - 0
src/web/templates/weixin/commonPay/paySuccess.html

@@ -0,0 +1,61 @@
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="utf-8">
+    <meta name="viewport"
+          content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"/>
+    <title>支付完成</title>
+    <script src="{{Msg "seo" "cdn"}}/js/rem.js"></script>
+    <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/wxCommonPay/css/base.css?v={{Msg "seo" "version"}}"/>
+    <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/wxCommonPay/css/weui.min.css?v={{Msg "seo" "version"}}">
+    <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/wxCommonPay/iconfont/iconfont.css?v={{Msg "seo" "version"}}">
+    <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/wxCommonPay/css/pay_success.css?v={{Msg "seo" "version"}}">
+    <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/css/wxbutton.css?v={{Msg "seo" "version"}}5">
+</head>
+<body>
+<div class="vip_pay_success layout_top-bottom">
+    <div class="layou_top">
+        <div class="icon_box">
+            <i class="icon iconfont">&#xe612;</i>
+            <p>支付成功</p>
+        </div>
+        <div class="info_box">
+            <div class="pay_mode">
+                <span>支付方式</span>
+                <span class="payway">微信支付</span>
+            </div>
+            <div class="pay_time">
+                <span>支付时间</span>
+                <span class="paytime"></span>
+            </div>
+            <div class="pay_id">
+                <span>订单编号</span>
+                <span class="orderCode">{{.T.orderCode}}</span>
+            </div>
+        </div>
+    </div>
+    {{if eq .T.doType "vip"}}
+    <div class="bottom_button j-button-group" id="vip">
+        <button class="left_btn j-button-cancel1" onclick="window.location.href = '/front/vipsubscribe/toOrderDetailPage?orderCode=' + orderCode">查看订单</button>
+        <button class="right_btn j-button-confirm1" onclick="window.location.href = '/front/vipsubscribe/toSubVipSetPage'">VIP设置</button>
+    </div>
+    {{end}}
+</div>
+</body>
+<script src="{{Msg "seo" "cdn"}}/js/jquery-3.2.1.min.js?v={{Msg "seo" "version"}}"></script>
+<script>
+    $(function () {
+        var payTime = {{.T.payTime}}
+        $(function () {
+            let payData
+            if (payTime) {
+                payData = new Date(parseInt(payTime) * 1000)
+            } else {
+                payData = new Date();
+            }
+            $(".paytime").text(payData.getFullYear() + "年" + (payData.getMonth() + 1) + "月" + payData.getDate() + "日");
+        })
+    })
+</script>
+{{include "/common/baiducc.html"}}
+</html>

+ 1 - 1
src/web/templates/weixin/dataExport/dataExport.html

@@ -979,7 +979,7 @@
                 dataType: 'json',
                 success: function(data){
                     if(data._id!==""){
-                        window.location.href="/weixin/pay/dataexport?id="+data._id+"&source=d&dataspec="+data_spec;
+                        window.location.href="/front/wx_dataExport/submitOrder?id="+data._id+"&source=d&dataspec="+data_spec;
                     }
                 }
             })

+ 31 - 90
src/web/templates/weixin/dataExport/dataExport_payOrder.html

@@ -16,33 +16,6 @@
     <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/css/wxbutton.css?v={{Msg "seo" "version"}}3">
     <script src="{{Msg "seo" "cdn"}}/js/jquery-3.2.1.min.js"></script>
     <script src="{{Msg "seo" "cdn"}}/wx_dataExport/js/weui.min.js"></script>
-    {{include "/common/weixin.html"}}
-    <script>
-        var signature = {{.T.signature}};
-        var isConfigSuccess = true;
-        var id = {{.T._id}}
-        if (signature && signature.length == 4) {
-            wx.config({
-                debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
-                appId: signature[0], // 必填,公众号的唯一标识
-                timestamp: signature[1], // 必填,生成签名的时间戳
-                nonceStr: signature[2], // 必填,生成签名的随机串
-                signature: signature[3],// 必填,签名,见附录1
-                jsApiList: ['chooseWXPay', 'hideAllNonBaseMenuItem'] // 必填,需要使用的JS接口列表,所有JS接口列表见附录2
-            });
-            wx.ready(function () {
-                if (!isConfigSuccess) {
-                    return;
-                }
-                wx.hideAllNonBaseMenuItem();
-            });
-            wx.error(function (res) {
-                //config信息验证失败会执行error函数,如签名过期导致验证失败,具体错误信息可以打开config的debug模式查看,也可以在返回的res参数中查看,对于SPA可以在这里更新签名。
-                //alert(res);
-                isConfigSuccess = false;
-            });
-        }
-    </script>
 </head>
 <body>
 <style>
@@ -159,11 +132,11 @@
                 </div>
             </div>
             <div class="form-item" style="margin-top: .2rem;">
-                <div class="way">
-                    <span>支付方式</span>
-                    <div class="way-right" id="choose_way"><span class="payment">微信支付</span><i
-                                class="iconfont icon-arrow icon-right"></i></div>
-                </div>
+                <!--  <div class="way">
+                      <span>支付方式</span>
+                      <div class="way-right" id="choose_way"><span class="payment">微信支付</span>
+                      <i class="iconfont icon-arrow icon-right"></i></div>
+                  </div>-->
             </div>
             <p class="msg">购买须知:最低起售<span></span>元;标准字段包:原价<span></span>元/条、<span></span>
                 折价<span></span>元/条计费;高级字段包:原价<span></span>元/条、<span></span>
@@ -200,7 +173,9 @@
         </div>
         <div class="form-btn j-button-group">
             <button class="btn prew dataPreview j-button-cancel" style="flex:none;line-height: normal;">预览数据</button>
-            <button class="btn enter toPay j-button-confirm" style="flex:none;line-height: normal;" disabled="disabled">确认支付</button>
+            <button class="btn enter toPay j-button-confirm" style="flex:none;line-height: normal;" disabled="disabled">
+                确认支付
+            </button>
         </div>
     </div>
     <!-- 引用weui Dialog组件 -->
@@ -243,28 +218,27 @@
     var finishPhoneVerity = false;
     //
     var email_lastInput ={{.T.email}}
-    if(email_lastInput==null){
-      email_lastInput=""
+    if (email_lastInput == null) {
+        email_lastInput = ""
     }
     var email_lastVerity ={{.T.timeSpaceing}}
-    if (email_lastVerity==null){
-      email_lastVerity=""
+    if (email_lastVerity == null) {
+        email_lastVerity = ""
     }
     var previewDataTime ={{.T.PreviewData}}
-    if (previewDataTime==null){
-      previewDataTime=""
+    if (previewDataTime == null) {
+        previewDataTime = ""
     }
     var phone_lastInput ={{.T.phone}}
-    if (phone_lastInput==null){
-      phone_lastInput=""
+    if (phone_lastInput == null) {
+        phone_lastInput = ""
     }
     var dataspec ={{.T.dataspec}}
-    if(dataspec==null){
-      dataspec=""
+    if (dataspec == null) {
+        dataspec = ""
     }
 
 
-
     //可以支付
     var canpay = true;
     //订单编号
@@ -306,12 +280,12 @@
         //购买须知
         $(".msg span:eq(0)").text(orderMinPrice);
         $(".msg span:eq(1)").text(unitPrice_normal);
-        $(".msg span:eq(2)").text(discount*10);
-        $(".msg span:eq(3)").text(discount*unitPrice_normal);
+        $(".msg span:eq(2)").text(discount * 10);
+        $(".msg span:eq(3)").text(discount * unitPrice_normal);
 
         $(".msg span:eq(4)").text(unitPrice_senior);
-        $(".msg span:eq(5)").text(discount*10);
-        $(".msg span:eq(6)").text(discount*unitPrice_senior);
+        $(".msg span:eq(5)").text(discount * 10);
+        $(".msg span:eq(6)").text(discount * unitPrice_senior);
 
 
         //记录用户上次选择的字段包  1标准2高级
@@ -384,7 +358,7 @@
             $(".email_check_ok").show();
             $(".email_input").val(localStorage.getItem("new_email_" + userId));
             finishEmailVerity = true;
-        } else if (email_lastInput != ""&&email_lastInput != null) {
+        } else if (email_lastInput != "" && email_lastInput != null) {
             //alert("~~")
             $(".email_check_ok").show();
             $(".email_input").val(email_lastInput);
@@ -410,7 +384,7 @@
                 finishPhoneVerity = false;
                 $(".toPay").attr("disabled", "disabled");
             }
-        } else if (phone_lastInput != ""&&phone_lastInput != null) {
+        } else if (phone_lastInput != "" && phone_lastInput != null) {
             $(".phone_check_ok").show();
             $(".phone_input").val(phone_lastInput);
             finishPhoneVerity = true;
@@ -723,10 +697,7 @@
                     sessionStorage.readClause = "false";
                     $(".toPay").attr("disabled", "disabled");
                 }
-                window.open("/front/wx_dataExport/toPreview/"+{{.T._id}}+
-                "?dataType=" + dataType
-            )
-                ;
+                window.open("/front/wx_dataExport/toPreview/{{.T._id}}?dataType=" + dataType);
             } else {
                 EasyAlert.show("预览数据次数超出今日上限!", "", 3000);
             }
@@ -739,7 +710,6 @@
             }
             $(".loading_").show();
             canpay = false;
-
             var param = {};
             param.pay_way = "wx_js";
             param.data_spec = dataType == 2 ? "senior" : "standard";
@@ -750,10 +720,15 @@
                         sessionStorage.setItem("order_spec" +{{.T._id}}, dataType);
                         sessionStorage.setItem("order_email" +{{.T._id}}, $(".email_input").val().replace(/\s*/g, ""));
                         sessionStorage.setItem("order_phone" +{{.T._id}}, $(".phone_input").val().replace(/\s*/g, ""));
+
+                        /*sessionStorage.removeItem("readClause");
+                        sessionStorage.removeItem("index");
+                        sessionStorage.removeItem("EmailVerity_" +{{.T._id}});
+                        sessionStorage.removeItem("keyWords");*/
                         //预支付订单创建成功后 调微信支付
                         if (data.res) {
                             order_code = data.code;
-                            onBridgeReady(data.res);
+                            window.location.href = "/weixin/pay/checkout_dataexport?orderCode=" + data.code+"&attach="+{{.T._id}}
                         }
                     } else {
                         canpay = true;
@@ -765,40 +740,6 @@
         })
     })
 
-    //调用微信支付接口
-    function onBridgeReady(res) {
-        WeixinJSBridge.invoke('getBrandWCPayRequest', {
-                "appId": res["appId"],
-                "timeStamp": res["timestamp"],
-                "nonceStr": res["nonceStr"],
-                "package": res["prepayId"],
-                "signType": res["signType"],
-                "paySign": res["sign"]
-            },
-            function (r) {
-                if (r.err_msg == "get_brand_wcpay_request:ok") {
-                    //清除我已阅读缓存
-                    sessionStorage.removeItem("readClause");
-                    sessionStorage.removeItem("index");
-                    sessionStorage.removeItem("EmailVerity_" +{{.T._id}});
-                    sessionStorage.removeItem("keyWords");
-                    $(".toPay").attr("disabled", "disabled");
-                    var email_pay = sessionStorage.getItem("order_email" +{{.T._id}})
-                    setTimeout(function () {
-                        window.location.replace("/front/wx_dataExport/paySuccessPage?email=" + email_pay + "&orderCode=" + order_code + "&payTime=" + res["timestamp"]);
-                    }, 500)
-                } else if (r.err_msg == "get_brand_wcpay_request:cancel") {
-                    //取消支付 可以再次支付
-                    canpay = true;
-                } else {
-                    EasyAlert.show("系统异常,请稍微再试", "", 3000);
-                }
-                //清除我已阅读缓存
-                sessionStorage.removeItem("index");
-                sessionStorage.removeItem("EmailVerity_" +{{.T._id}});
-            });
-    }
-
     //倒计时
     function sendemailTimer(t) {
         $(".sendCode").text("" + t + "s");

+ 121 - 117
src/web/templates/weixin/dataExport/dataExport_paySuccess.html

@@ -1,120 +1,124 @@
 <html>
-	<head>
-		<meta charset="utf-8">
-		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
-		<title>数据导出</title>
-		<script src="{{Msg "seo" "cdn"}}/js/rem.js"></script>
-		<link rel="stylesheet" type="text/css" href="{{Msg "seo" "cdn"}}/wx_dataExport/css/base.css"/>
-		<link rel="stylesheet" href="{{Msg "seo" "cdn"}}/wx_dataExport/css/pay_success.css"?v={{Msg "seo" "version"}}1>
-		<link rel="stylesheet" href="{{Msg "seo" "cdn"}}/wx_dataExport/iconfont/iconfont.css">
-		<link rel="stylesheet" href="{{Msg "seo" "cdn"}}/css/wxbutton.css?v={{Msg "seo" "version"}}3">        
-		<script src="{{Msg "seo" "cdn"}}/js/jquery-3.2.1.min.js"></script>
-		<style>
-		html,body{
-			height:auto;
-			overflow-x:auto;
-		}
-		#pay_success{
-			display: flex;
-			flex-direction: column;
-			height:auto;
-		}
-		#pay_success .main {
-		    padding-bottom: 1.4rem;
-		}
-		.j-footer{
-			position: fixed;
-			bottom: 0;
-			left: 0;
-			z-index: 999;
-			width: 100%;
-			height: 1.32rem;
-		}
-		.j-button{
-			height: 0.92rem!important;
-		}
-		</style>
-		<script>
-			var email = {{.T.email}}
-			var orderCode = {{.T.orderCode}}
-			var payTime = {{.T.payTime}}
-			$(function(){
-				$(".email").text(email);
-				$(".orderCode").text(orderCode);
-        if(payTime){
-          payTime =  payTime.split(" ")[0]
-				  payTime =  payTime.split("-")[0]+"年"+payTime.split("-")[1]+"月"+payTime.split("-")[2]+"日";
-        }else{
-          var now =new Date();
-          payTime = now.getFullYear()+"年"+now.getMonth()+"月"+now.getDate()+"日";
+<head>
+    <meta charset="utf-8">
+    <meta name="viewport"
+          content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"/>
+    <title>数据导出</title>
+    <script src="{{Msg "seo" "cdn"}}/js/rem.js"></script>
+    <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/wx_dataExport/css/base.css?v={{Msg "seo" "version"}}"/>
+    <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/wx_dataExport/css/pay_success.css?v={{Msg "seo" "version"}}">
+    <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/wx_dataExport/iconfont/iconfont.css?v={{Msg "seo" "version"}}">
+    <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/css/wxbutton.css?v={{Msg "seo" "version"}}">
+    <script src="{{Msg "seo" "cdn"}}/js/jquery-3.2.1.min.js?v={{Msg "seo" "version"}}"></script>
+    <style>
+        html, body {
+            height: auto;
+            overflow-x: auto;
         }
-       
-				$(".payTime").text(payTime);
-			})
-			function detail(){
-					window.location.href="/weixin/pay/wxToOrderDetail?orderCode={{.T.orderCode}}"
-			}
-		</script>
-	</head>
-	<body>
-		<div id="pay_success">
-			<main class="main">
-				<div class="progress">
-					<div class="p-item">
-						<p class="p-item-icon">
-							<i class="icon iconfont">&#xe606;</i>
-						</p>
-						<span>条件筛选</span>
-						<div class="line"></div>
-					</div>
-					
-					<div class="p-item">
-						<p class="p-item-icon">
-							<i class="icon iconfont">&#xe617;</i>
-						</p>
-						<span>支付订单</span>
-						<div class="line"></div>
-					</div>
-					
-					<div class="p-item">
-						<p class="p-item-icon">
-							<i class="icon iconfont">&#xe616;</i>
-						</p>
-						<span>数据导出</span>
-					</div>
-				</div>
-				<div class="space"></div>
-				<div class="result">
-					<div class="success">
-						<i class="icon iconfont">&#xe612;</i>
-						<h2>支付成功</h2>
-						<p>我们会尽快将历史数据发送至您的邮箱</p>
-						<p>请稍后查阅</p>
-					</div>
-					<div class="order_lists">
-						<div class="item">
-							<span>邮箱地址</span>
-							<span  class="email"></span>
-						</div>
-						<div class="item">
-							<span>支付方式</span>
-							<span>微信支付</span>
-						</div>
-						<div class="item">
-							<span>支付时间</span>
-							<span class="payTime"></span>
-						</div>
-						<div class="item">
-							<span>订单编号</span>
-							<span class="orderCode"></span>
-						</div>
-					</div>
-				</div>
-			</main>
-			<div class="j-footer">
-				<a onclick="detail()" class="go_detail j-button">查看订单</a>
-			</div>
-		</div>
-	{{include "/common/baiducc.html"}}
-	</body>
+
+        #pay_success {
+            display: flex;
+            flex-direction: column;
+            height: auto;
+        }
+
+        #pay_success .main {
+            padding-bottom: 1.4rem;
+        }
+
+        .j-footer {
+            position: fixed;
+            bottom: 0;
+            left: 0;
+            z-index: 999;
+            width: 100%;
+            height: 1.32rem;
+        }
+
+        .j-button {
+            height: 0.92rem !important;
+        }
+    </style>
+    <script>
+        var email = {{.T.email}}
+        var orderCode = {{.T.orderCode}}
+        var payTime = {{.T.payTime}}
+            $(function () {
+                $(".email").text(email);
+                $(".orderCode").text(orderCode);
+                let payData
+                if (payTime) {
+                    payData = new Date(parseInt(payTime) * 1000)
+                } else {
+                    payData = new Date();
+                }
+                $(".payTime").text(payData.getFullYear() + "年" + (payData.getMonth() + 1) + "月" + payData.getDate() + "日");
+            })
+
+        function detail() {
+            window.location.href = "/front/wx_dataExport/wxToOrderDetail?orderCode={{.T.orderCode}}"
+        }
+    </script>
+</head>
+<body>
+<div id="pay_success">
+    <main class="main">
+        <div class="progress">
+            <div class="p-item">
+                <p class="p-item-icon">
+                    <i class="icon iconfont">&#xe606;</i>
+                </p>
+                <span>条件筛选</span>
+                <div class="line"></div>
+            </div>
+
+            <div class="p-item">
+                <p class="p-item-icon">
+                    <i class="icon iconfont">&#xe617;</i>
+                </p>
+                <span>支付订单</span>
+                <div class="line"></div>
+            </div>
+
+            <div class="p-item">
+                <p class="p-item-icon">
+                    <i class="icon iconfont">&#xe616;</i>
+                </p>
+                <span>数据导出</span>
+            </div>
+        </div>
+        <div class="space"></div>
+        <div class="result">
+            <div class="success">
+                <i class="icon iconfont">&#xe612;</i>
+                <h2>支付成功</h2>
+                <p>我们会尽快将历史数据发送至您的邮箱</p>
+                <p>请稍后查阅</p>
+            </div>
+            <div class="order_lists">
+                <div class="item">
+                    <span>邮箱地址</span>
+                    <span class="email"></span>
+                </div>
+                <div class="item">
+                    <span>支付方式</span>
+                    <span>微信支付</span>
+                </div>
+                <div class="item">
+                    <span>支付时间</span>
+                    <span class="payTime"></span>
+                </div>
+                <div class="item">
+                    <span>订单编号</span>
+                    <span class="orderCode"></span>
+                </div>
+            </div>
+        </div>
+    </main>
+    <div class="j-footer">
+        <a onclick="detail()" class="go_detail j-button">查看订单</a>
+    </div>
+</div>
+{{include "/common/baiducc.html"}}
+</body>
 </html>

+ 5 - 5
src/web/templates/weixin/dataExport/dataExport_toMyOrder.html

@@ -247,9 +247,9 @@
             // 	return;
             // }
             //window.location.href="/weixin/pay/renewPayPage?orderCode="+orderCode;
-            window.location.href = "/weixin/pay/vipsubscribe_renew?orderCode" + orderCode;
+            window.location.href = "/front/vipsubscribe/vipsubscribe_renew?orderCode" + orderCode;
         } else if (pattern == 2) {
-            window.location.href = "/weixin/pay/vipsubscribe_new?orderCode=" + orderCode;
+            window.location.href = "/front/vipsubscribe/vipsubscribe_new?orderCode=" + orderCode;
         }
     }
 
@@ -671,7 +671,7 @@
                     + orderHtml
                     + '</div>'
                     + '<div class="card-content">'
-                    + '<a onclick="setSessionStorage()" eid='+orderCode+' href="/weixin/pay/wxToOrderDetail?orderCode=' + orderCode + '" class="media">'
+                    + '<a onclick="setSessionStorage()" eid='+orderCode+' href="/front/wx_dataExport/wxToOrderDetail?orderCode=' + orderCode + '" class="media">'
                     + '<div class="media-img">'
                     + '<img src="/dataExport/image/dataOutput.png">'
                     + '</div>'
@@ -1187,7 +1187,7 @@
                         + orderHtml
                         + '</div>'
                         + '<div class="card-content">'
-                        + '<a onclick="setSessionStorage()" eid='+orderCode_vip+' href="/weixin/pay/toOrderDetailPage?orderCode=' + orderCode_vip + '" class="media" isvipOrder="true">'
+                        + '<a onclick="setSessionStorage()" eid='+orderCode_vip+' href="/front/vipsubscribe/toOrderDetailPage?orderCode=' + orderCode_vip + '" class="media" isvipOrder="true">'
                         + '<div class="media-img">'
                         + '<img src="/vipsubscribe/image/vipBook.png">'
                         + '</div>'
@@ -1225,7 +1225,7 @@
                         + orderHtml
                         + '</div>'
                         + '<div class="card-content">'
-                        + '<a  onclick="setSessionStorage()" eid='+orderCode_vip+' href="/weixin/pay/toOrderDetailPage?orderCode=' + orderCode_vip + '" class="media" isvipOrder="true">'
+                        + '<a  onclick="setSessionStorage()" eid='+orderCode_vip+' href="/front/vipsubscribe/toOrderDetailPage?orderCode=' + orderCode_vip + '" class="media" isvipOrder="true">'
                         + '<div class="media-img">'
                         + '<img src="/vipsubscribe/image/vipBook.png">'
                         + '</div>'

+ 1 - 70
src/web/templates/weixin/dataExport/dataExport_toOrderDetail.html

@@ -10,7 +10,6 @@
 	<script src="{{Msg " seo " "cdn "}}/wx_dataExport/js/rem.js"></script>
 	<script src="{{Msg " seo " "cdn "}}/js/jquery-3.2.1.min.js"></script>
 	<script src="{{Msg " seo " "cdn "}}/wxswordfish/share.js?v={{Msg "seo " "version "}}"></script>
-	{{include "/common/weixin.html"}}
 	<link rel="stylesheet" type="text/css" href="{{Msg " seo " "cdn "}}/wx_dataExport/css/base.css?v={{Msg "seo " "version "}}" />
 	<link rel="stylesheet" href="{{Msg " seo " "cdn "}}/wx_dataExport/css/public.css?v={{Msg "seo " "version "}}">
 	<link rel="stylesheet" type="text/css" href="{{Msg " seo " "cdn "}}/wx_dataExport/iconfont/iconfont.css" />
@@ -41,78 +40,10 @@
 	}
 </style>
 <script>
-	initShare({{.T.signature}}, {{.T.openid}}, 2, "jy_wxmyorder", {{.T.nickname}}, {{.T.avatar}});
-
-	var signature = {{.T.signature}};
-	var isConfigSuccess = true;
-	var id = {{.T._id}}
-	if(signature && signature.length == 4) {
-		wx.config({
-			debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
-			appId: signature[0], // 必填,公众号的唯一标识
-			timestamp: signature[1], // 必填,生成签名的时间戳
-			nonceStr: signature[2], // 必填,生成签名的随机串
-			signature: signature[3], // 必填,签名,见附录1
-			jsApiList: ['chooseWXPay','hideAllNonBaseMenuItem'] // 必填,需要使用的JS接口列表,所有JS接口列表见附录2
-		});
-		wx.ready(function() {
-			if(!isConfigSuccess) {
-				return;
-			}
-			wx.hideAllNonBaseMenuItem();
-		});
-		wx.error(function(res) {
-			//config信息验证失败会执行error函数,如签名过期导致验证失败,具体错误信息可以打开config的debug模式查看,也可以在返回的res参数中查看,对于SPA可以在这里更新签名。
-			isConfigSuccess = false;
-		});
-	}
 	//调用微信支付接口
-	function onBridgeReady(res) {
-		WeixinJSBridge.invoke('getBrandWCPayRequest', {
-					"appId": res["appId"],
-					"timeStamp": res["timestamp"],
-					"nonceStr": res["nonceStr"],
-					"package": res["prepayId"],
-					"signType": res["signType"],
-					"paySign": res["sign"]
-				},
-				function(r) {
-					if(r.err_msg == "get_brand_wcpay_request:ok") {
-						//location.reload();
-						sessionStorage.setItem("paySuccess_" + {{.T.o.order_code}}, 1);
-						window.location.replace("/front/wx_dataExport/paySuccessPage?email=" + res["user_mail"] + "&orderCode=" + res["order_code"] + "&payTime=" + res["timestamp"] + "&param=detail");
-					} else if(r.err_msg == "get_brand_wcpay_request:cancel") {
-						//取消支付 可以再次支付
-						canpay = true;
-						isReqing = false;
-					} else {
-						EasyAlert.show("系统异常,请稍微再试", "", 3000);
-					}
-				});
-	}
-	//
 	var isReqing = false;
-
 	function goPay() {
-		var filterid = {{.T.o.filter_id}};
-		var token = {{.T.o.token}};
-		var id = {{.T.o.id}};
-		if(isReqing) {
-			return;
-		}
-		isReqing = true;
-		$.post("/jypay/dataExport/weixin/getPayParm", {
-			"filterid": filterid,
-			"id": id,
-			"token": token
-		}, function(res) {
-			isReqing = false;
-			console.log(res)
-			if(res.status == 1) {
-				//sessionStorage.setItem("paySuccess_"+{{.T.o.order_code}},1);
-				onBridgeReady(res);
-			}
-		});
+		window.location.replace("/weixin/pay/checkout_dataexport?orderCode=" + {{.T.o.order_code}});
 	}
 	//提示框
 	var EasyAlert = {

+ 2 - 2
src/web/templates/weixin/email/bind_success.html

@@ -52,7 +52,7 @@
 					if(time == 0){
 						$('.time').html('');
 						if((param=="invoice")&&(orderCode!=null)){
-							window.location.replace('/weixin/pay/toOrderDetailPage?orderCode='+orderCode);
+							window.location.replace('/front/vipsubscribe/toOrderDetailPage?orderCode='+orderCode);
 						}else{
 							window.history.go(-1);
 							//window.location.replace('/front/wxMyOrder/myEmail');
@@ -87,7 +87,7 @@
 				/* 返回 */
 				$('.back').on('click',() =>{
 					if((param=="invoice")&&(orderCode!=null)){
-							window.location.replace('/weixin/pay/toOrderDetailPage?orderCode='+orderCode);
+							window.location.replace('/front/vipsubscribe/toOrderDetailPage?orderCode='+orderCode);
 						}else{
 							window.history.go(-1);
 							//window.location.replace('/front/wxMyOrder/myEmail');

+ 5 - 5
src/web/templates/weixin/historypush.html

@@ -808,7 +808,7 @@
         //vip设置
         function tosetpage() {
             setSessionStorage();
-            window.location.href = "/weixin/pay/toSubVipSetPage";
+            window.location.href = "/front/vipsubscribe/toSubVipSetPage";
         }
 
         //vip关键词设置
@@ -820,13 +820,13 @@
         //续费
         function torepay() {
             setSessionStorage();
-            window.location.href = "/weixin/pay/vipsubscribe_renew";
+            window.location.href = "/front/vipsubscribe/vipsubscribe_renew";
         }
 
         //购买
         function topay() {
             setSessionStorage();
-            window.location.href = "/weixin/pay/vipsubscribe_new";
+            window.location.href = "/front/vipsubscribe/vipsubscribe_new";
         }
 
         //直播活动
@@ -837,9 +837,9 @@
         //直播
         function toPay_live(){
           if (parseInt(isOnTail) != 1) {
-            window.location.href = "/weixin/pay/vipsubscribe_renew";
+            window.location.href = "/front/vipsubscribe/vipsubscribe_renew";
           }else{
-            window.location.href = "/weixin/pay/vipsubscribe_new";
+            window.location.href = "/front/vipsubscribe/vipsubscribe_new";
           }
         }
     </script>

+ 1 - 1
src/web/templates/weixin/my.html

@@ -137,7 +137,7 @@
 			$(".vip").on("click",function(){
 				$.post("/subscribepay/orderListDetails/isVip?v="+nowTimestamp,{},function(data){
 					if (data.isvip){
-						window.location.href="/weixin/pay/toSubVipSetPage";		//vip订阅入口  试用或正式vip
+						window.location.href="/front/vipsubscribe/toSubVipSetPage";		//vip订阅入口  试用或正式vip
 					}else{
 						window.location.href="/front/vipsubscribe/introducePage";		//vip订阅入口  非vip
 					}

+ 1 - 1
src/web/templates/weixin/search/mainSearch.html

@@ -221,7 +221,7 @@
 			success: function(data){
 				if(data._id!=""){
 					$(".loading_").hide();
-					window.location.href="/weixin/pay/dataexport?id="+data._id+"&source=d"
+					window.location.href="/front/wx_dataExport/submitOrder?id="+data._id+"&source=d"
 					//window.location.href="/front/pay/redirect?id="+data._id+"&source=d"
 				}
 			}

+ 1 - 1
src/web/templates/weixin/treasure_box.html

@@ -85,7 +85,7 @@
 			$(".vip").on("click",function(){
 				$.post("/subscribepay/orderListDetails/isVip?v="+nowTimestamp,{},function(data){
 					if (data.isvip){
-						window.location.href="/weixin/pay/toSubVipSetPage";		//vip订阅入口  试用或正式vip
+						window.location.href="/front/vipsubscribe/toSubVipSetPage";		//vip订阅入口  试用或正式vip
 					}else{
 						window.location.href="/front/vipsubscribe/introducePage";		//vip订阅入口  非vip
 					}

+ 2 - 2
src/web/templates/weixin/vipsubscribe/renew_notice.html

@@ -226,10 +226,10 @@
     }
 
     $(".renew_service").on("click", function () {
-        window.location.replace("/weixin/pay/vipsubscribe_renew");
+        window.location.replace("/front/vipsubscribe/vipsubscribe_renew");
     });
     $(".aginBuy").on("click", function () {
-        window.location.replace("/weixin/pay/vipsubscribe_new?orderCode=" + orderCode);
+        window.location.replace("/front/vipsubscribe/vipsubscribe_new?orderCode=" + orderCode);
     });
 
     //

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

@@ -842,7 +842,7 @@
 		}
 		function toWillExpire(){
 			sessionStorage.removeItem("vipSubBuySet");
-			window.location.href="/weixin/pay/vipsubscribe_willExpire"
+			window.location.href="/front/vipsubscribe/vipsubscribe_willExpire"
 		}
     </script>
 {{include "/common/baiducc.html"}}

+ 2 - 2
src/web/templates/weixin/vipsubscribe/trial_info.html

@@ -177,7 +177,7 @@
             // ajax提交成功后跳转至vip购买页
             $DoPost("/subscribepay/trial/submitApply", post_data, function (r) {
                 if (r.success) {
-                    window.location.replace("/weixin/pay/vipsubscribe_trial");
+                    window.location.replace("/front/vipsubscribe/vipsubscribe_trial");
                 }else{
                     if(r.errMsg==="短信验证码错误"){
                         $('.btn').attr('disabled','disabled');
@@ -236,7 +236,7 @@
     }
     {{else}}
     $(".btn").on("click",function (e) {
-        window.location.replace("/weixin/pay/vipsubscribe_trial");
+        window.location.replace("/front/vipsubscribe/vipsubscribe_trial");
     });
     {{end}}
 

+ 4 - 4
src/web/templates/weixin/vipsubscribe/vip_index.html

@@ -145,7 +145,7 @@
                 <i class="icon iconfont" id="nv_close_renew">&#xe61a;</i>
                 <span class="other">VIP订阅服务还有 <span class="renew_day"></span> 天到期,请及时购买!</span>
                 <span class="today" style="display:none;">VIP订阅服务今天到期,请及时购买!</span>
-                <a href="/weixin/pay/vipsubscribe_new">去购买</a>
+                <a href="/front/vipsubscribe/vipsubscribe_new">去购买</a>
             </div>
         </div>
         <!-- 升级 续费 -->
@@ -226,7 +226,7 @@
         })
         $('#nv_close_renew').on('click', function () {
             $('.nv_renew_toast').hide();
-            $(".tabbar").html('<a style="width: 100%;color: #fff;background: #2CB7CA;" href="/weixin/pay/vipsubscribe_new" class="update_btn">去购买</a>');
+            $(".tabbar").html('<a style="width: 100%;color: #fff;background: #2CB7CA;" href="/front/vipsubscribe/vipsubscribe_new" class="update_btn">去购买</a>');
             $(".tabbar").show();
         })
         // 点击扩大
@@ -287,7 +287,7 @@
                             $(".tabbar").hide();
                         } else {
                             $(".to_expired").hide();
-                            $(".tabbar").html('<a style="width: 100%;color: #fff;background: #2CB7CA;" href="/weixin/pay/vipsubscribe_new" class="update_btn">去购买</a>')
+                            $(".tabbar").html('<a style="width: 100%;color: #fff;background: #2CB7CA;" href="/front/vipsubscribe/vipsubscribe_new" class="update_btn">去购买</a>')
                         }
                         $('.free7days_pic').text("VIP订阅服务");
                         $('.free7days_pic').append("<style>.free7days_pic::after{display:inline-block}</style>");
@@ -382,7 +382,7 @@
 
     //
     function rebuy() {
-        window.location.href = "/weixin/pay/vipsubscribe_renew"
+        window.location.href = "/front/vipsubscribe/vipsubscribe_renew"
     }
 </script>
 {{include "/common/baiducc.html"}}

+ 2 - 59
src/web/templates/weixin/vipsubscribe/vip_index_new.html

@@ -62,14 +62,14 @@
                 <div class="vip-logo"></div>
                 <div class="vip-text free7days">VIP订阅服务</div>
             </div>
-            <a href="/weixin/pay/vipsubscribe_new" class="renew-r">去购买</a>
+            <a href="/front/vipsubscribe/vipsubscribe_new" class="renew-r">去购买</a>
         </div>
         <div class="header-renew renew" style="display: none">
             <div class="renew-l">
                 <div class="vip-logo"></div>
                 <div class="vip-text">VIP订阅服务</div>
             </div>
-            <a href="/weixin/pay/vipsubscribe_renew" class="renew-r">续费</a>
+            <a href="/front/vipsubscribe/vipsubscribe_renew" class="renew-r">续费</a>
         </div>
         <!-- 到期提醒 -->
         <div class="expire-remind" style="display: none">
@@ -527,63 +527,6 @@
 		endTime: {{.T.liveActiveEndTime}},
 	    activeDiscount: {{.T.activeDiscount}}
 	}
-    try {
-        var signature = {{.T.signature}};
-        var isConfigSuccess = true;
-        var id = {{.T._id}}
-        if (signature && signature.length === 4) {
-            wx.config({
-                debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
-                appId: signature[0], // 必填,公众号的唯一标识
-                timestamp: signature[1], // 必填,生成签名的时间戳
-                nonceStr: signature[2], // 必填,生成签名的随机串
-                signature: signature[3],// 必填,签名,见附录1
-                jsApiList: ['chooseWXPay', 'hideAllNonBaseMenuItem'] // 必填,需要使用的JS接口列表,所有JS接口列表见附录2
-            });
-            wx.ready(function () {
-                if (!isConfigSuccess) {
-                    return;
-                }
-                wx.hideAllNonBaseMenuItem();
-            });
-            wx.error(function (res) {
-                //config信息验证失败会执行error函数,如签名过期导致验证失败,具体错误信息可以打开config的debug模式查看,也可以在返回的res参数中查看,对于SPA可以在这里更新签名。
-                //alert(res);
-                isConfigSuccess = false;
-            });
-        }
-
-        //调用微信支付接口
-        function onBridgeReady(res, ordercode) {
-            WeixinJSBridge.invoke('getBrandWCPayRequest', {
-                    "appId": res["appId"],
-                    "timeStamp": res["timestamp"],
-                    "nonceStr": res["nonceStr"],
-                    "package": res["prepayId"],
-                    "signType": res["signType"],
-                    "paySign": res["sign"]
-                },
-                function (r) {
-                    if (r.err_msg == "get_brand_wcpay_request:ok") {
-                        setTimeout(function () {
-                            clearSessionStorage();
-                            window.location.replace("/front/vipsubscribe/toPaySuccessPage?orderCode=" + ordercode);
-                        }, 500)
-                    } else if (r.err_msg == "get_brand_wcpay_request:cancel") {
-                        console.log("支付已取消")
-                    } else {
-                        weui.toast("系统异常,请稍微再试", {
-                            duration: 2000,
-                            className: 'custom-toast',
-                        });
-                    }
-                });
-        }
-
-        //微信支付end
-    } catch (e) {
-        console.log(e)
-    }
 </script>
 <script src="/vipsubscribe/js/UpgradePrice.js?v={{Msg "seo" "version"}}"></script>
 <script src="/vipsubscribe/js/vip_index_new.js?v={{Msg "seo" "version"}}"></script>

+ 4 - 4
src/web/templates/weixin/vipsubscribe/vip_introduce.html

@@ -146,11 +146,11 @@
             <!-- {{if not .T.notShowTrial }}
             <div class="j-button-group">
                 <a onclick="window.location.replace('/front/vipsubscribe/trialInfo')" class="try_btn j-button-cancel1">试用7天</a>
-                <a onclick="window.location.replace('/weixin/pay/vipsubscribe_new')"  class="subscribe_btn j-button-confirm1">去订阅</a>
+                <a onclick="window.location.replace('/front/vipsubscribe/vipsubscribe_new')"  class="subscribe_btn j-button-confirm1">去订阅</a>
             </div>
             {{else}}
             <div class="j-footer" style="width: 100%;">
-                <a onclick="window.location.replace('/weixin/pay/vipsubscribe_new')"  class="subscribe_btn j-button">去订阅</a>
+                <a onclick="window.location.replace('/front/vipsubscribe/vipsubscribe_new')"  class="subscribe_btn j-button">去订阅</a>
             </div> -->
             <!-- {{end}} -->
             <script>
@@ -160,9 +160,9 @@
                 }else{
                   var html = "";
                   {{if not .T.notShowTrial}}
-                    html += '<div class="j-button-group"><a onclick="window.location.replace(\'/front/vipsubscribe/trialInfo\')" class="try_btn j-button-cancel1">试用7天</a><a onclick="window.location.replace(\'/weixin/pay/vipsubscribe_new\')" class="subscribe_btn j-button-confirm1">去订阅</a> </div>';
+                    html += '<div class="j-button-group"><a onclick="window.location.replace(\'/front/vipsubscribe/trialInfo\')" class="try_btn j-button-cancel1">试用7天</a><a onclick="window.location.replace(\'/front/vipsubscribe/vipsubscribe_new\')" class="subscribe_btn j-button-confirm1">去订阅</a> </div>';
                   {{else}}
-                    html += '<div class="j-footer" style="width: 100%;"><a onclick="window.location.replace(\'/weixin/pay/vipsubscribe_new\')" class="subscribe_btn j-button">去订阅</a></div>';
+                    html += '<div class="j-footer" style="width: 100%;"><a onclick="window.location.replace(\'/front/vipsubscribe/vipsubscribe_new\')" class="subscribe_btn j-button">去订阅</a></div>';
                   {{end}}
                   document.write(html);
                 }

+ 741 - 845
src/web/templates/weixin/vipsubscribe/vip_order_detail.html

@@ -9,58 +9,65 @@
     <meta name="apple-mobile-web-app-capable" content="yes">
     <meta name="apple-mobile-web-app-status-bar-style" content="black">
     <script src="/vipsubscribe/js/rem.js?v={{Msg "seo" "version"}}"></script>
-    <link rel="stylesheet" type="text/css" href="https://cdn.bootcss.com/weui/1.1.2/style/weui.css" />
-    <link rel="stylesheet" type="text/css" href="{{Msg "seo" "cdn"}}/vipsubscribe/css/base.css?v={{Msg "seo" "version"}}" />
-    <link rel="stylesheet" type="text/css" href="{{Msg "seo" "cdn"}}/vipsubscribe/iconfont/iconfont.css?v={{Msg "seo" "version"}}" />
+    <link rel="stylesheet" type="text/css" href="https://cdn.bootcss.com/weui/1.1.2/style/weui.css"/>
+    <link rel="stylesheet" type="text/css"
+          href="{{Msg "seo" "cdn"}}/vipsubscribe/css/base.css?v={{Msg "seo" "version"}}"/>
+    <link rel="stylesheet" type="text/css"
+          href="{{Msg "seo" "cdn"}}/vipsubscribe/iconfont/iconfont.css?v={{Msg "seo" "version"}}"/>
     <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/vipsubscribe/css/public.css?v={{Msg "seo" "version"}}">
     <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/vipsubscribe/css/weui.min.css?v={{Msg "seo" "version"}}">
     <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/vipsubscribe/css/vip_order_detail.css?v={{Msg "seo" "version"}}">
     <link rel="stylesheet" href="/css/wxbutton.css?v={{Msg "seo" "version"}}">
-	{{include "/common/weixin.html"}}
-	<script src="{{Msg "seo" "cdn"}}/wxswordfish/share.js?v={{Msg "seo" "version"}}"></script>
+    {{include "/common/weixin.html"}}
+    <script src="{{Msg "seo" "cdn"}}/wxswordfish/share.js?v={{Msg "seo" "version"}}"></script>
 </head>
 <style>
-    .stop{
+    .stop {
         overflow: hidden;
         height: 100%;
     }
+
     .va-total-container .total-price {
         font-weight: 400 !important;
-        font-size: 0.36rem  !important;
+        font-size: 0.36rem !important;
         color: #FB483D !important;
     }
+
     body, html {
         height: 100%;
     }
-	.bill-origin-price {
-	  display: none;
-	  align-items: center;
-	  justify-content: flex-end;
-	  padding: 0 .32rem;
-	  color: #9B9CA3;
-	  margin-bottom: 0.2rem;
-	}
-	.j-button-cancel {
-    margin-right: 0;
-  }
-	.bill-origin-price .price-num {
-	  text-decoration: line-through;
-	}
+
+    .bill-origin-price {
+        display: none;
+        align-items: center;
+        justify-content: flex-end;
+        padding: 0 .32rem;
+        color: #9B9CA3;
+        margin-bottom: 0.2rem;
+    }
+
+    .j-button-cancel {
+        margin-right: 0;
+    }
+
+    .bill-origin-price .price-num {
+        text-decoration: line-through;
+    }
 </style>
 <body style="visibility:hidden">
-	<div class="nothing" style="display:none;text-align: center;  padding-top: 2rem;">
-        <img src="/vipsubscribe/image/nothing.png" style="width: 3rem"/>
-		<div class="nothingDiv" style="margin-top: 1rem;">
-			该订单记录已删除
-		</div>
+<div class="nothing" style="display:none;text-align: center;  padding-top: 2rem;">
+    <img src="/vipsubscribe/image/nothing.png" style="width: 3rem"/>
+    <div class="nothingDiv" style="margin-top: 1rem;">
+        该订单记录已删除
     </div>
+</div>
 <div class="j-container" id="order_detail">
     <div class="j-body">
-                    <div id="card-header-bg">
-                        <h3 id="pageTitle"></h3>
-                        <!-- <h3>待付款</h3> -->
-                        <p class="remaining" hidden></p>
-                    </div>
+        <div id="card-header-bg">
+            <h3 id="pageTitle"></h3>
+            <!-- <h3>待付款</h3> -->
+            <p class="remaining" hidden></p>
+        </div>
         <div class="order-main">
             <div class="vip_order">
                 <div class="top">
@@ -117,14 +124,14 @@
                         </p>
                         <!-- 订单状态为已完成时显示支付时间、支付方式和订单号,状态为待付款时不显示 -->
                         <p class="l-item line_paytime" style="display:none">
-                            <span class="label" id="paytime" >支付时间:</span>
+                            <span class="label" id="paytime">支付时间:</span>
                             <span class="payTime value"></span>
                         </p>
                         <p class="l-item line_payway" style="display:none">
-                            <span class="label" >支付方式:</span>
+                            <span class="label">支付方式:</span>
                             <span class="payWay value"></span>
                         </p>
-                        <p class="l-item line_transaction"  style="display:none">
+                        <p class="l-item line_transaction" style="display:none">
                             <span class="label">支付单号:</span>
                             <span class="transaction_id value"></span>
                         </p>
@@ -134,7 +141,8 @@
                         </p>
                         <p class="l-item">
                             <span class="label" id="price">实付金额:</span>
-                            <span class="price value"></span><em class="qingdan valuationList" style="display:none">计费清单</em>
+                            <span class="price value"></span><em class="qingdan valuationList"
+                                                                 style="display:none">计费清单</em>
                         </p>
                     </div>
                 </div>
@@ -143,833 +151,721 @@
     </div>
     <div class="j-footer j-button-group"></div>
 </div>
-	<!-- 计费清单picker -->
-	<div class="billing-list-container p13" style="display: none;">
-		<div class="weui-mask weui-animate-fade-in"></div>
-		<div class="weui-half-screen-dialog weui-picker weui-animate-slide-up" style="border-radius: 22px 22px 0 0;">
-			<div class="weui-half-screen-dialog__hd" style="border-radius:100%">
-				<div class="dialog_hd__title">计费清单</div>
-				<div class="dialog_hd__close j-icon icon-del-grey"></div>
-			</div>
-			<div class="weui-half-screen-dialog__bd valuation_list">
-				<div class="va-list-container">
-					<ul class="list-content">
-					</ul>
-				</div>
-			</div>
-			<div class="weui-half-screen-dialog__ft">
-				<div class="va-total-container">
-					<span class="total-label"></span>
-					<span class="total-price"></span>
-				</div>
-			</div>
-			<div class="bill-origin-price">
-			    <span class="price-label">原价:</span>
-			    <div class="price-container">
-			        <span class="currency-type">&yen;</span>
-			        <span class="price-num">5.80</span>
-			    </div>
-			</div>
-		</div>
-	</div>
+<!-- 计费清单picker -->
+<div class="billing-list-container p13" style="display: none;">
+    <div class="weui-mask weui-animate-fade-in"></div>
+    <div class="weui-half-screen-dialog weui-picker weui-animate-slide-up" style="border-radius: 22px 22px 0 0;">
+        <div class="weui-half-screen-dialog__hd" style="border-radius:100%">
+            <div class="dialog_hd__title">计费清单</div>
+            <div class="dialog_hd__close j-icon icon-del-grey"></div>
+        </div>
+        <div class="weui-half-screen-dialog__bd valuation_list">
+            <div class="va-list-container">
+                <ul class="list-content">
+                </ul>
+            </div>
+        </div>
+        <div class="weui-half-screen-dialog__ft">
+            <div class="va-total-container">
+                <span class="total-label"></span>
+                <span class="total-price"></span>
+            </div>
+        </div>
+        <div class="bill-origin-price">
+            <span class="price-label">原价:</span>
+            <div class="price-container">
+                <span class="currency-type">&yen;</span>
+                <span class="price-num">5.80</span>
+            </div>
+        </div>
+    </div>
+</div>
 </body>
 <script src="{{Msg "seo" "cdn"}}/vipsubscribe/js/jquery-2.1.4.js?v={{Msg "seo" "version"}}"></script>
 <script src="{{Msg "seo" "cdn"}}/vipsubscribe/js/common.js?v={{Msg "seo" "version"}}"></script>
 <script src="{{Msg "seo" "cdn"}}/vipsubscribe/js/weui.min.js?v={{Msg "seo" "version"}}"></script>
 <script>
-try{
-  var signature = {{.T.signature}};
-  var isConfigSuccess = true;
-  if(signature && signature.length == 4){
-  	wx.config({
-  	    debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
-  	    appId: signature[0], // 必填,公众号的唯一标识
-  	    timestamp:signature[1], // 必填,生成签名的时间戳
-  	    nonceStr: signature[2], // 必填,生成签名的随机串
-  	    signature: signature[3],// 必填,签名,见附录1
-  	    jsApiList: ['chooseWXPay','hideAllNonBaseMenuItem'] // 必填,需要使用的JS接口列表,所有JS接口列表见附录2
-  	});
-  	wx.ready(function () {
-  		if(!isConfigSuccess){
-  			return;
-  		}
-  		wx.hideAllNonBaseMenuItem();
-      });
-  	wx.error(function(res){
-  	    //config信息验证失败会执行error函数,如签名过期导致验证失败,具体错误信息可以打开config的debug模式查看,也可以在返回的res参数中查看,对于SPA可以在这里更新签名。
-  		//alert(res);
-  		isConfigSuccess = false;
-  	});
-  }
-}catch(e){
-  console.log(e)
-}
-</script>
-<script>
-  $(function(){
-  	//分享
-  	initShare({{.T.signature}},{{.T.openid}},2,"jy_wxmyorder",{{.T.nickname}},{{.T.avatar}});
-    var canpay=true;
-    var orderCode=decodeURIComponent(getParam("orderCode"));
-    if(!orderCode){
-      weui.toast("订单号异常",{
-        duration: 2000,
-        className: 'custom-toast',
-	    });
-    }
-    $(".orderCode").text(orderCode);
-    var liveActiveStartTime = {{.T.liveActiveStartTime}};
-    var liveActiveEndTime = {{.T.liveActiveEndTime}};
-    $DoPost("/subscribepay/orderListDetails/getOrderPayAllMsg",{"orderCode":orderCode},function(r){
-      $("body").css("visibility","");
-      if(r.success){
-		if(r.data.order.order_status==-1){
-			$(".nothing").show();
-			$("#order_detail").hide();
-		}
-        //下单时间
-        if(r.data.order.create_time) {
-        	$(".prepayTime").text(r.data.order.create_time.replace("-",".").replace("-","."));
+    $(function () {
+        //分享
+        initShare({{.T.signature}},{{.T.openid}}, 2, "jy_wxmyorder",{{.T.nickname}},{{.T.avatar}});
+        var canpay = true;
+        var orderCode = decodeURIComponent(getParam("orderCode"));
+        if (!orderCode) {
+            weui.toast("订单号异常", {
+                duration: 2000,
+                className: 'custom-toast',
+            });
         }
-        //产品类型
-        if(r.data.order.product_type) $(".productType").text(r.data.order.product_type);
-        if(r.data.order.original_price==0){
-        	$(".productType").text(r.data.order.product_type+"(试用)");
+        $(".orderCode").text(orderCode);
+        var liveActiveStartTime = {{.T.liveActiveStartTime}};
+        var liveActiveEndTime = {{.T.liveActiveEndTime}};
+        $DoPost("/subscribepay/orderListDetails/getOrderPayAllMsg", {"orderCode": orderCode}, function (r) {
+            $("body").css("visibility", "");
+            if (r.success) {
+                if (r.data.order.order_status == -1) {
+                    $(".nothing").show();
+                    $("#order_detail").hide();
+                }
+                //下单时间
+                if (r.data.order.create_time) {
+                    $(".prepayTime").text(r.data.order.create_time.replace("-", ".").replace("-", "."));
+                }
+                //产品类型
+                if (r.data.order.product_type) $(".productType").text(r.data.order.product_type);
+                if (r.data.order.original_price == 0) {
+                    $(".productType").text(r.data.order.product_type + "(试用)");
+                }
+                //价格
+                $(".price").text("¥ " + r.data.order.original_price / 100 + "元");
+
+                //优惠码
+                if (r.data.order.isUsedActiveCode) {
+                    $(".discount-container").removeClass("hide");
+                }
+                if (!r.data.order.isLiveActive) {
+                    $(".origin-price-container").hide();
+                } else {
+                    var activeDiscount = {{.T.activeDiscount}};
+                    var originPrice = (r.data.order.original_price / 100 / parseFloat(activeDiscount)).toFixed(2);
+                    $(".price-num").text(originPrice);
+                    $(".bill-origin-price").css("display", "flex")
+                }
+
+                //订单条件
+                if (r.data.order.filter) {
+                    var filterObj = JSON.parse(r.data.order.filter);
+                    var areaText = "";
+                    if ((r.data.order.vip_type != 2) && (r.data.order.vip_type != 1)) {
+                        if (!$.isEmptyObject(filterObj.newBuyset)) {	//p1
+                            var newBuyset = filterObj.newBuyset
+                            if (newBuyset.areacount != -1) {
+                                var newcitys = newBuyset.newcitys;
+                                var scatter = newcitys.length;//分布
+                                var citynum = 0;
+                                for (var k in newcitys) {
+                                    citynum += newcitys[k];
+                                }
+                                if (newBuyset.areacount > 0) {
+                                    areaText = newBuyset.areacount + "个省级区域";
+                                    if (citynum != 0) {
+                                        if (scatter > 1) {
+                                            areaText += "、" + citynum + "个地市(分布在" + scatter + "省内)";
+                                        } else {
+                                            areaText += "、" + citynum + "个地市";
+                                        }
+                                    }
+                                } else {
+                                    if (scatter > 1) {
+                                        areaText = citynum + "个地市(分布在" + scatter + "省内)";
+                                    } else {
+                                        areaText = citynum + "个地市";
+                                    }
+                                }
+                                $(".areaNum").text(areaText);
+                            } else {
+                                $(".areaNum").text("全国");
+                            }
+                            if (newBuyset.buyerclasscount != -1) {
+                                $(".industryNum").text(newBuyset.buyerclasscount + "个行业");
+                            } else {
+                                $(".industryNum").text("全行业");
+                            }
+                        } else {
+                            //省份数 城市数
+                            if (!$.isEmptyObject(filterObj.area)) {
+                                var cityNum = 0;
+                                var provinceNum = 0;
+                                for (var i in filterObj.area) {
+                                    var citys = filterObj.area[i];
+                                    if (citys.length > 0) {
+                                        cityNum += citys.length;
+                                    } else {
+                                        provinceNum++;
+                                    }
+                                }
+                                var areaText = "";//1个省级区域、4个地市
+                                if (provinceNum > 0) areaText = areaText + provinceNum + "个省级区域";
+                                if (cityNum > 0) {
+                                    if (provinceNum > 0) areaText = areaText + "、"
+                                    areaText = areaText + cityNum + "个地市";
+                                }
+                                $(".areaNum").text(areaText);
+                            } else {
+                                $(".areaNum").text("全国");
+                            }
+                            //行业数
+                            if (filterObj.industry.length != 0) {
+                                $(".industryNum").text(filterObj.industry.length + "个行业");
+                            } else {
+                                $(".industryNum").text("全行业");
+                            }
+                        }
+                    } else if (r.data.order.vip_type == 2) {
+                        //升级订单 单独处理
+                        if (!$.isEmptyObject(filterObj.newBuyset)) {	//p1更新
+                            var newBuyset = filterObj.newBuyset;
+                            if (newBuyset.areacount != -1) {
+                                var newcitys = newBuyset.newcitys;
+                                var scatter = newcitys.length;//分布
+                                var citynum = 0;
+                                for (var k in newcitys) {
+                                    citynum += newcitys[k];
+                                }
+                                if (newBuyset.areacount > 0) {
+                                    areaText = newBuyset.areacount + "个省级区域";
+                                    if (citynum != 0) {
+                                        if (scatter > 1) {
+                                            areaText += "、" + citynum + "个地市(分布在" + scatter + "省内)";
+                                        } else {
+                                            areaText += "、" + citynum + "个地市";
+                                        }
+                                    }
+                                } else {
+                                    if (scatter > 1) {
+                                        areaText = citynum + "个地市(分布在" + scatter + "省内)";
+                                    } else {
+                                        areaText = citynum + "个地市";
+                                    }
+                                }
+                            } else {
+                                areaText = "全国";
+                            }
+                        } else {
+                            if (!$.isEmptyObject(filterObj.addareacount)) {
+                                if ((filterObj.addareacount.province == 0) && (filterObj.addareacount.city == 0)) {
+                                    areaText = "全国";
+                                }
+                                if ((filterObj.addareacount.province != 0) && (filterObj.addareacount.city == 0)) {
+                                    areaText = filterObj.addareacount.province + "个省级区域";
+                                }
+                                if ((filterObj.addareacount.province == 0) && (filterObj.addareacount.city != 0)) {
+                                    areaText = filterObj.addareacount.city + "个地市";
+                                }
+                                if ((filterObj.addareacount.province != 0) && (filterObj.addareacount.city != 0)) {
+                                    areaText = filterObj.addareacount.province + "个省级区域、" + filterObj.addareacount.city + "个地市";
+                                }
+                            } else {
+                                areaText = "无";
+                            }
+                        }
+                        $(".areaNum").text(areaText);
+                        //行业
+                        var industry_vip = "";
+                        if (filterObj.addbuyerclasscount == undefined) {	//p1
+                            var buyerclasscount = newBuyset.buyerclasscount;
+                            if (buyerclasscount > 3) {
+                                buyerclasscount = filterObj.industry.length;
+                                industry_vip = "全行业(" + buyerclasscount + "个行业)";
+                            } else {
+                                industry_vip = buyerclasscount + "个行业";
+                            }
+                            if (buyerclasscount == -1) {
+                                industry_vip = "全行业";
+                            }
+                        } else {
+                            industry_vip = filterObj.addbuyerclasscount + "个行业";
+                            if (filterObj.addbuyerclasscount == 0) {
+                                industry_vip = "无";
+                            }
+                            if (filterObj.addbuyerclasscount == -1) {
+                                industry_vip = "全行业";
+                            }
+                        }
+                        $(".industryNum").text(industry_vip);
+                    } else if (r.data.order.vip_type == 1) {
+                        var renewal_market = 0; //续费市级地区
+                        var buyset = filterObj.buyset;
+                        var newBuyset = filterObj.newBuyset;
+                        if (!$.isEmptyObject(newBuyset)) { //p1
+                            if (newBuyset.areacount != -1) {
+                                var newcitys = newBuyset.newcitys;
+                                var scatter = newcitys.length;//分布
+                                var citynum = 0;
+                                for (var k in newcitys) {
+                                    citynum += newcitys[k];
+                                }
+                                if (newBuyset.areacount > 0) {
+                                    areaText = newBuyset.areacount + "个省级区域";
+                                    if (citynum != 0) {
+                                        if (scatter > 1) {
+                                            areaText += "、" + citynum + "个地市(分布在" + scatter + "省内)";
+                                        } else {
+                                            areaText += "、" + citynum + "个地市";
+                                        }
+                                    }
+                                } else {
+                                    if (scatter > 1) {
+                                        areaText = citynum + "个地市(分布在" + scatter + "省内)";
+                                    } else {
+                                        areaText = citynum + "个地市";
+                                    }
+                                }
+                                $(".areaNum").text(areaText);
+                            } else {
+                                $(".areaNum").text("全国");
+                            }
+                            if (newBuyset.buyerclasscount != -1) {
+                                $(".industryNum").text(newBuyset.buyerclasscount + "个行业");
+                            } else {
+                                $(".industryNum").text("全行业");
+                            }
+                        } else {
+                            if (!$.isEmptyObject(buyset)) {
+                                if (buyset.citys != undefined) {
+                                    if (buyset.areacount == -1) {
+                                        $(".areaNum").text("全国");
+                                    } else {
+                                        if (!$.isEmptyObject(buyset.citys)) {
+                                            for (var key in buyset.citys) {
+                                                renewal_market += (buyset.citys[key]);
+                                            }
+                                        }
+                                        //
+                                        var areaText = "";
+                                        if ((buyset.areacount != 0) && (renewal_market != 0)) {
+                                            areaText = buyset.areacount + "个省级地区、" + renewal_market + "个地市";
+                                        } else if ((buyset.areacount == 0) && (renewal_market != 0)) {
+                                            areaText = renewal_market + "个地市";
+                                        } else if ((buyset.areacount != 0) && (renewal_market == 0)) {
+                                            areaText = buyset.areacount + "个省级地区";
+                                        }
+                                        $(".areaNum").text(areaText);
+                                    }
+                                    if (buyset.buyerclasscount == -1) {
+                                        $(".industryNum").text("全行业");
+                                    } else {
+                                        $(".industryNum").text(buyset.buyerclasscount + "个行业");
+                                    }
+                                }
+                            }
+                        }
+                    }
+
+                }
+
+                //周期
+                if ((r.data.order.vip_starttime != undefined) && (r.data.order.vip_endtime != undefined)) {
+                    var start_time_vip = r.data.order.vip_starttime;
+                    var end_time_vip = r.data.order.vip_endtime;
+                    var start_time_arr = start_time_vip.split(" ")[0].split("-")
+                    var end_time_arr = end_time_vip.split(" ")[0].split("-")
+                    var start_year = start_time_arr[0];
+                    var start_month = start_time_arr[1];
+                    var end_year = end_time_arr[0];
+                    var end_month = end_time_arr[1];
+                    var year = 0;
+                    var month = 0;
+                    if (end_year > start_year) {
+                        if (end_month > start_month) {
+                            year = end_year - start_year;
+                            month = end_month - start_month;
+                        } else {
+                            year = end_year - start_year - 1;
+                            month = 12 + Number(end_month) - start_month;
+                            if (month == 12) {
+                                year = Number(year) + 1;
+                                month = 0;
+                            }
+                        }
+                    } else if (end_year === start_year) {
+                        month = end_month - start_month;
+                    }
+
+                    if (year != 0 && month != 0) {
+                        $(".cyclecount").text(year + "年" + month + "个月");
+                    } else if (year !== 0 && month === 0) {
+                        $(".cyclecount").text(year + "年");
+                    } else if (year === 0 && month !== 0) {
+                        $(".cyclecount").text(month + "个月");
+                    }
+                    if (filterObj.cycleunit == 1) {
+                        $(".cyclecount").text(filterObj.cyclecount + "年")
+                    } else if (filterObj.cycleunit == 2) {
+                        $(".cyclecount").text(filterObj.cyclecount + "个月")
+                    } else if (filterObj.cycleunit == 3) {
+                        $(".cyclecount").text(filterObj.cyclecount + "天")
+                    }
+                } else {
+                    //未支付
+                    if (filterObj.cycleunit == 1) {
+                        $(".cyclecount").text(filterObj.cyclecount + "年")
+                    } else if (filterObj.cycleunit == 2) {
+                        $(".cyclecount").text(filterObj.cyclecount + "个月")
+                    } else if (filterObj.cycleunit == 3) {
+                        $(".cyclecount").text(filterObj.cyclecount + "天")
+                    }
+                }
+
+                if (r.data.order.vip_type == 1) {
+                    $(".productType").text(r.data.order.product_type + "(续费)");
+                    $(".dyqy").text("续费区域:");
+                    $(".dyhy").text("续费采购单位行业:");
+                    $(".dyzq").text("续费周期:");
+                } else if (r.data.order.vip_type == 2) {
+                    $(".productType").text(r.data.order.product_type + "(升级)");
+                    if (filterObj.cycleunit == 1) {
+                        $(".cyclecount").text(filterObj.cyclecount + "年")
+                    } else if (filterObj.cycleunit == 2) {
+                        $(".cyclecount").text(filterObj.cyclecount + "个月")
+                    } else if (filterObj.cycleunit == 3) {
+                        $(".cyclecount").text(filterObj.cyclecount + "天")
+                    } else if (filterObj.cycleunit == -1) {
+                        $(".cyclecount").text("不延期");
+                    }
+                    //续费升级逻辑修改后判断是否不延期
+                    if (filterObj.cycleunit == 0 && filterObj.cyclecount == 0) {
+                        $(".cyclecount").text("不延期");
+                    }
+                    $(".dyqy").text("升级区域:");
+                    $(".dyhy").text("升级采购单位行业:");
+                    $(".dyzq").text("延长周期:");
+                }
+
+                if (r.data.order.order_status == 0) {
+                    //未支付
+                    $("#card-header-bg").addClass("bg nopay-bg")
+                    $("#pageTitle").addClass("status")
+                    $("#pageTitle").text("待付款");
+                    $(".remaining").show()
+                    var order_create_time = r.data.order.create_time
+                    order_create_time = order_create_time.replace(/-/g, '/')
+                    var downtime = r.data.order.order_countdown.split("h")[0]
+                    downtime = downtime * 60 * 60 * 1000
+                    var create_unix = new Date(order_create_time).getTime();
+                    if (new Date().getTime() >= parseInt(liveActiveStartTime) * 1000 && new Date().getTime() < parseInt(liveActiveEndTime) * 1000) {
+                        if (parseInt(liveActiveEndTime) * 1000 - create_unix < 72 * 60 * 60 * 1000) {
+                            downtime = parseInt(liveActiveEndTime) * 1000 - create_unix;
+                        }
+                    }
+                    var t = setInterval(() => {
+                        var nowtime = new Date()  //获取当前时间
+                        endtime = new Date(order_create_time);  //定义结束时间
+                        var lefttime = endtime.getTime() + downtime - nowtime.getTime() //距离结束时间的毫秒数
+                        if (Math.floor(lefttime % 1000) <= 0) {
+                            clearInterval(t)
+                            $.ajax({
+                                type: "post",
+                                url: "/subscribepay/orderListDetails/deleteOrder",
+                                data: {
+                                    "id": r.data.order.id,
+                                    "pageNum": 1,
+                                    "type": 1,
+                                    "cancel": "cancel"
+                                },
+                                dataType: 'json',
+                                success: function () {
+                                    $(".nopay-bg h3").text("已取消")
+                                    $(".remaining").text("")
+                                    $(".nopay-bg").removeClass("nopay-bg").addClass("cancel-bg")
+                                    $(".j-footer").hide().text('')
+                                }
+                            })
+                        } else {
+                            var hour = Math.floor(lefttime / (1000 * 60 * 60)),  //计算小时数
+                                hour = hour < 10 ? '0' + hour : hour;
+                            var minute = Math.floor(lefttime / (1000 * 60) % 60),  //计算分钟数
+                                minute = minute < 10 ? '0' + minute : minute;
+                            var seconds = Math.floor(lefttime / 1000 % 60);  //计算秒数
+                            seconds = seconds < 10 ? '0' + seconds : seconds;
+                            $(".remaining").text("剩余支付时间" + hour + ":" + minute + ":" + seconds)
+                        }
+                    }, 1000)
+                    var pay_now = "<button class=\"j-button-confirm gopay\" >去支付</button>"
+                    $(".j-footer").html(pay_now).css('display', 'flex')
+                    $(".invoice").hide();//隐藏开发票
+                    $(".gopay").on("click", function () {//显示去支付按钮
+                        window.location.replace("/weixin/pay/checkout_vip?orderCode=" + orderCode);
+                    })
+                } else if (r.data.order.order_status == 1) {
+                    $("#card-header-bg").addClass("bg finish-bg")
+                    $("#pageTitle").addClass("status")
+                    $("#pageTitle").text("已完成");
+                    //支付时间
+                    $(".line_paytime").css("display", "");
+                    if (r.data.order.pay_time) $(".payTime").text(r.data.order.pay_time.replace("-", ".").replace("-", "."));
+                    if (r.data.order.original_price == 0) {
+                        $(".line_paytime").css("display", "none");
+                    }
+
+                    //有效周期
+                    $(".line_cycle").css("display", "");
+                    //有效日期
+                    if (r.data.time.vip_starttime && r.data.time.vip_endtime) {
+                        var vip_starttime = r.data.time.vip_starttime + "";
+                        var vip_endtime = r.data.time.vip_endtime + "";
+                        vip_starttime = vip_starttime.split(" ")[0].replace(/-/g, ".");
+                        vip_endtime = vip_endtime.split(" ")[0].replace(/-/g, ".");
+                        var serviceTime = vip_starttime + " - " + vip_endtime;
+                        $(".serviceTime").text(serviceTime)
+                    }
+
+                    //支付方式
+                    if (r.data.order.pay_way.indexOf("wx") > -1) {
+                        $(".line_payway").css("display", "");
+                        $(".payWay").text("微信支付");
+                    } else if (r.data.order.pay_way.indexOf("ali") > -1) {
+                        $(".payWay").text("支付宝支付");
+                        $(".line_payway").css("display", "");
+                    } else {//试用用户
+                        $(".invoice").css("display", "none");
+                        return
+                    }
+
+                    $(".line_transaction").css("display", "");
+                    if (r.data.transaction_id) $(".transaction_id").text(r.data.transaction_id);
+                    var pay_again = ""
+                    //发票
+                    if (r.data.order.applybill_status == 0) {
+                        //已支付未申请发票
+                        pay_again += "<button class=\"j-button-cancel\" onclick='invoiceAdd()'>开发票</button>"
+
+                    } else {
+                        //已支付已申请发票
+                        pay_again += "<button class=\"j-button-cancel\" onclick='checkInvoice()'>查看发票</button>"
+                    }
+                    $(".j-footer").html(pay_again)
+                } else if (r.data.order.order_status == -2) {
+                    $("#card-header-bg").addClass("bg cancel-bg")
+                    $("#pageTitle").addClass("status")
+                    $("#pageTitle").text("已取消");
+                    $(".invoice").css("display", "none");//隐藏开发票
+                    $('.j-footer').hide()
+                }
+            }
+            //计价清单
+            var filterObj = JSON.parse(r.data.order.filter);
+            var upgradeSubtotail = filterObj.upgradeSubtotail;
+            if (upgradeSubtotail) {	//有则显示
+                $.ajax({
+                    type: 'POST',
+                    url: '/subscribepay/orderListDetails/getValuationList',
+                    data: {
+                        "order_code": orderCode
+                    },
+                    success: function (data) {
+                        appendList(data.list, data.order_money);
+                    }
+                });
+
+                $(".valuationList").css("display", "");
+                // 计算标准点击事件
+                $('.valuationList').on('click', function () {
+                    pickerShow('.billing-list-container', true)
+                    $("html,body").addClass("stop");
+                })
+                // 计算标准隐藏
+                $('.billing-list-container .dialog_hd__close').on('click', function () {
+                    pickerShow('.billing-list-container', false)
+                    $("html,body").removeClass("stop");
+                })
+                $('.weui-mask').on('click', function () {
+                    pickerShow('.billing-list-container', false)
+                    $("html,body").removeClass("stop");
+                })
+            }
+
+
+            //
+            if ((r.data.order.original_price == 0) && (r.data.order.out_trade_no == "") && (r.data.order.vip_type == 2)) {
+                $(".line_transaction").hide();
+                $(".invoice").hide();
+                $(".line_payway").hide();
+            }
+        })
+
+        function PrefixInteger(num, n) {
+            return (Array(n).join(0) + num).slice(-n);
         }
-        //价格
-        $(".price").text("¥ "+r.data.order.original_price/100 +"元");
-		
-		//优惠码
-		if(r.data.order.isUsedActiveCode){
-			$(".discount-container").removeClass("hide");
-		}
-		if(!r.data.order.isLiveActive){
-			$(".origin-price-container").hide();
-		}else{
-            var activeDiscount = {{.T.activeDiscount}};
-			var originPrice = (r.data.order.original_price/100 / parseFloat(activeDiscount)).toFixed(2);
-			$(".price-num").text(originPrice);
-            $(".bill-origin-price").css("display","flex")
-		}
-
-        //订单条件
-        if(r.data.order.filter){
-            var filterObj=JSON.parse(r.data.order.filter);
-			var areaText="";
-        	if ((r.data.order.vip_type!=2)&&(r.data.order.vip_type!=1)){
-				if(!$.isEmptyObject(filterObj.newBuyset)){	//p1
-					var newBuyset=filterObj.newBuyset
-					if (newBuyset.areacount!=-1){
-						var newcitys=newBuyset.newcitys;
-						var scatter=newcitys.length ;//分布
-						var citynum=0;
-						for(var k in newcitys){
-							citynum+=newcitys[k];
-						}
-						if(newBuyset.areacount>0){
-							areaText=newBuyset.areacount+"个省级区域";
-							if(citynum!=0){
-								if(scatter>1){
-									areaText+="、"+citynum+"个地市(分布在"+scatter+"省内)";
-								}else{
-									areaText+="、"+citynum+"个地市";
-								}
-							}
-						}else{
-							if (scatter>1){
-								areaText=citynum+"个地市(分布在"+scatter+"省内)";
-							}else{
-								areaText=citynum+"个地市";
-							}
-						}
-						$(".areaNum").text(areaText);
-					}else{
-						$(".areaNum").text("全国");
-					}
-					if(newBuyset.buyerclasscount!=-1){
-						$(".industryNum").text(newBuyset.buyerclasscount+"个行业");
-					}else{
-						$(".industryNum").text("全行业");
-					}
-				}else{
-					//省份数 城市数
-					if(!$.isEmptyObject(filterObj.area)){
-						var cityNum=0;
-						var provinceNum=0;
-						for(var i in filterObj.area) {
-							var citys=filterObj.area[i];
-							if(citys.length>0){
-							  cityNum+=citys.length;
-							}else{
-								provinceNum++;
-							}
-						}
-						var areaText="";//1个省级区域、4个地市
-						if(provinceNum>0) areaText= areaText + provinceNum+"个省级区域";
-						if(cityNum>0){
-							if(provinceNum>0) areaText= areaText+"、"
-							areaText = areaText+ cityNum+"个地市";
-						}
-						$(".areaNum").text(areaText);
-					}else{
-						$(".areaNum").text("全国");
-					}
-					//行业数
-					if(filterObj.industry.length!=0){
-						$(".industryNum").text(filterObj.industry.length+"个行业");
-					}else{
-						$(".industryNum").text("全行业");
-					}
-				}
-	        }else if(r.data.order.vip_type==2){
-	         	//升级订单 单独处理
-				if (!$.isEmptyObject(filterObj.newBuyset)){	//p1更新
-					var newBuyset=filterObj.newBuyset;
-					if(newBuyset.areacount!=-1){
-						var newcitys=newBuyset.newcitys;
-						var scatter=newcitys.length ;//分布
-						var citynum=0;
-						for(var k in newcitys){
-							citynum+=newcitys[k];
-						}
-						if(newBuyset.areacount>0){
-							areaText=newBuyset.areacount+"个省级区域";
-							if (citynum!=0){
-								if(scatter>1){
-									areaText+="、"+citynum+"个地市(分布在"+scatter+"省内)";
-								}else{
-									areaText+="、"+citynum+"个地市";
-								}
-							}
-						}else{
-							if (scatter>1){
-								areaText=citynum+"个地市(分布在"+scatter+"省内)";
-							}else{
-								areaText=citynum+"个地市";
-							}
-						}
-					}else{
-						areaText="全国";
-					}
-				}else{
-					if(!$.isEmptyObject(filterObj.addareacount)){
-						if((filterObj.addareacount.province==0)&&(filterObj.addareacount.city==0)){
-							areaText="全国";
-						}
-						if((filterObj.addareacount.province!=0)&&(filterObj.addareacount.city==0)){
-							areaText=filterObj.addareacount.province+"个省级区域";
-						}
-						if((filterObj.addareacount.province==0)&&(filterObj.addareacount.city!=0)){
-							areaText=filterObj.addareacount.city+"个地市";
-						}
-						if((filterObj.addareacount.province!=0)&&(filterObj.addareacount.city!=0)){
-							areaText=filterObj.addareacount.province+"个省级区域、"+filterObj.addareacount.city+"个地市";
-						}
-					}else{
-						areaText="无";
-					}
-				}
-				$(".areaNum").text(areaText);
-	         	//行业
-	         	var industry_vip="";
-				if (filterObj.addbuyerclasscount==undefined){	//p1
-					var buyerclasscount=newBuyset.buyerclasscount;
-					if(buyerclasscount>3){
-						buyerclasscount=filterObj.industry.length;
-						industry_vip="全行业("+buyerclasscount+"个行业)";
-					}else{
-						industry_vip=buyerclasscount+"个行业";
-					}
-					if(buyerclasscount==-1){
-						industry_vip="全行业";
-					}
-				}else{
-					industry_vip=filterObj.addbuyerclasscount+"个行业";
-					if(filterObj.addbuyerclasscount==0){
-						industry_vip="无";
-					}
-					if(filterObj.addbuyerclasscount==-1){
-						industry_vip="全行业";
-					}
-				}
-				$(".industryNum").text(industry_vip);
-	        }else if(r.data.order.vip_type==1){
-				var renewal_market=0; //续费市级地区
-				var buyset=filterObj.buyset;
-				var newBuyset=filterObj.newBuyset;
-				if(!$.isEmptyObject(newBuyset)){ //p1
-					if (newBuyset.areacount!=-1){
-						var newcitys=newBuyset.newcitys;
-						var scatter=newcitys.length ;//分布
-						var citynum=0;
-						for(var k in newcitys){
-							citynum+=newcitys[k];
-						}
-						if(newBuyset.areacount>0){
-							areaText=newBuyset.areacount+"个省级区域";
-							if (citynum!=0){
-								if(scatter>1){
-									areaText+="、"+citynum+"个地市(分布在"+scatter+"省内)";
-								}else{
-									areaText+="、"+citynum+"个地市";
-								}
-							}
-						}else{
-							if (scatter>1){
-								areaText=citynum+"个地市(分布在"+scatter+"省内)";
-							}else{
-								areaText=citynum+"个地市";
-							}
-						}
-						$(".areaNum").text(areaText);
-					}else{
-						$(".areaNum").text("全国");
-					}
-					if(newBuyset.buyerclasscount!=-1){
-						$(".industryNum").text(newBuyset.buyerclasscount+"个行业");
-					}else{
-						$(".industryNum").text("全行业");
-					}
-				}else{
-					if(!$.isEmptyObject(buyset)){
-						if (buyset.citys!=undefined){
-							if (buyset.areacount==-1){
-								$(".areaNum").text("全国");
-							}else{
-								if(!$.isEmptyObject(buyset.citys)){
-									for (var key in buyset.citys) {
-										renewal_market+=(buyset.citys[key]);
-									}
-								}
-								//
-								var areaText="";
-								if ((buyset.areacount!=0)&&(renewal_market!=0)){
-									areaText=buyset.areacount+"个省级地区、"+renewal_market+"个地市";
-								}else if((buyset.areacount==0)&&(renewal_market!=0)){
-									areaText=renewal_market+"个地市";
-								}else if((buyset.areacount!=0)&&(renewal_market==0)){
-									areaText=buyset.areacount+"个省级地区";
-								}
-								$(".areaNum").text(areaText);
-							}
-							if(buyset.buyerclasscount==-1){
-								$(".industryNum").text("全行业");
-							}else{
-								$(".industryNum").text(buyset.buyerclasscount+"个行业");
-							}
-						}
-					}
-				}
-			}
 
+        // 参数为结束时间戳
+        function setTimeFunc(endtime) {
+            var t = endtime - +new Date();
+            if (t <= 0) {
+                $(".button").hide();
+                $(".cancel_time").hide();
+                $("#pageTitle").html("已取消");
+            }
+            var days_ = PrefixInteger(parseInt(t / 1000 / 60 / 60, 10).toString(), 2)
+            var minutes_ = PrefixInteger(parseInt(t / 1000 / 60 % 60, 10).toString(), 2)
+            var seconds = PrefixInteger(parseInt(t / 1000 % 60, 10).toString(), 2)
+            $(".cancel_time").text("剩余" + days_ + ":" + minutes_ + ":" + seconds + " ");
         }
+    })
+
+    //苹果端  刷新js
+    $(function () {
+        var isPageHide = false;
+        window.addEventListener('pageshow', function () {
+            if (isPageHide) {
+                location.reload();
+            }
+        });
+        window.addEventListener('pagehide', function () {
+            isPageHide = true;
+        });
+    });
 
-        //周期
-       if((r.data.order.vip_starttime!=undefined)&&(r.data.order.vip_endtime!=undefined)){
-       		var start_time_vip = r.data.order.vip_starttime;
-       		var end_time_vip = r.data.order.vip_endtime;
-       		var start_time_arr = start_time_vip.split(" ")[0].split("-")
-       		var end_time_arr = end_time_vip.split(" ")[0].split("-")
-       		var start_year=start_time_arr[0];
-       		var start_month=start_time_arr[1];
-       		var end_year=end_time_arr[0];
-       		var end_month=end_time_arr[1];
-       		var year = 0;
-			var month = 0;
-			if(end_year > start_year){
-	    		if(end_month > start_month){
-    				year = end_year - start_year;
-    				month = end_month - start_month;
-	    		}else{
-    				year = end_year - start_year-1;
-    				month = 12+Number(end_month)-start_month;
-    				if (month==12){
-    					year=Number(year)+1;
-    					month=0;
-    				}
-	    		}
-	    	}else if(end_year === start_year){
-    			month = end_month - start_month;
-	    	}
-
-	    	if(year != 0 && month !=0){
-	    		$(".cyclecount").text(year+"年"+month+"个月");
-	    	}else if(year !== 0&& month ===0){
-	    		$(".cyclecount").text(year+"年");
-	    	}else if(year === 0&& month !==0){
-	    		$(".cyclecount").text(month+"个月");
-	    	}
-			if(filterObj.cycleunit==1){
-		        $(".cyclecount").text(filterObj.cyclecount+"年")
-		    }else if(filterObj.cycleunit==2){
-		       $(".cyclecount").text(filterObj.cyclecount+"个月")
-		    }else if(filterObj.cycleunit==3){
-		       $(".cyclecount").text(filterObj.cyclecount+"天")
-		    }
-       }else{
-       		//未支付
-	      if(filterObj.cycleunit==1){
-	        $(".cyclecount").text(filterObj.cyclecount+"年")
-	      }else if(filterObj.cycleunit==2){
-	       $(".cyclecount").text(filterObj.cyclecount+"个月")
-	      }else if(filterObj.cycleunit==3){
-	           $(".cyclecount").text(filterObj.cyclecount+"天")
-	      }
-       }
-
-        if(r.data.order.vip_type==1){
-        	$(".productType").text(r.data.order.product_type+"(续费)");
-        	$(".dyqy").text("续费区域:");
-        	$(".dyhy").text("续费采购单位行业:");
-        	$(".dyzq").text("续费周期:");
-        }else if(r.data.order.vip_type==2){
-        	$(".productType").text(r.data.order.product_type+"(升级)");
-        	if(filterObj.cycleunit==1){
-		        $(".cyclecount").text(filterObj.cyclecount+"年")
-		    }else if(filterObj.cycleunit==2){
-		        $(".cyclecount").text(filterObj.cyclecount+"个月")
-		    }else if(filterObj.cycleunit==3){
-		        $(".cyclecount").text(filterObj.cyclecount+"天")
-		    }else if (filterObj.cycleunit==-1){
-		        $(".cyclecount").text("不延期");
-		    }
-			//续费升级逻辑修改后判断是否不延期
-			if(filterObj.cycleunit==0&&filterObj.cyclecount==0){
-		        $(".cyclecount").text("不延期");
-			}
-        	$(".dyqy").text("升级区域:");
-        	$(".dyhy").text("升级采购单位行业:");
-        	$(".dyzq").text("延长周期:");
+    // picker的显示隐藏
+    function pickerShow(selector, f) {
+        if (f) {
+            // 添加进场动画,并显示
+            $(selector).find('.weui-mask').removeClass('weui-animate-fade-out').addClass('weui-animate-fade-in')
+            $(selector).find('.weui-picker').removeClass('weui-animate-slide-down').addClass('weui-animate-slide-up')
+            $(selector).show(300);
+        } else {
+            // 添加离场动画,并隐藏
+            $(selector).find('.weui-mask').removeClass('weui-animate-fade-in').addClass('weui-animate-fade-out')
+            $(selector).find('.weui-picker').removeClass('weui-animate-slide-up').addClass('weui-animate-slide-down')
+            $(selector).hide(300);
         }
+    }
+
+    var total_price = 0;
 
-        if(r.data.order.order_status==0){
-          //未支付
-          $("#card-header-bg").addClass("bg nopay-bg")
-          $("#pageTitle").addClass("status")
-          $("#pageTitle").text("待付款");
-          $(".remaining").show()
-          var order_create_time = r.data.order.create_time
-          order_create_time = order_create_time.replace(/-/g, '/')
-          var downtime  = r.data.order.order_countdown.split("h")[0]
-          downtime = downtime*60*60*1000
-          var create_unix = new Date(order_create_time).getTime();
-          if (new Date().getTime() >= parseInt(liveActiveStartTime)*1000 && new Date().getTime() < parseInt(liveActiveEndTime)*1000){
-              if(parseInt(liveActiveEndTime)*1000 - create_unix < 72*60*60*1000){
-                  downtime = parseInt(liveActiveEndTime) * 1000 - create_unix;
-              }
-          }
-          var t =setInterval(() => {
-                var nowtime = new Date()  //获取当前时间
-                    endtime = new Date(order_create_time);  //定义结束时间
-                var lefttime = endtime.getTime()+downtime - nowtime.getTime() //距离结束时间的毫秒数
-                if(Math.floor(lefttime %1000)<=0){
-                    clearInterval(t)
-                    $.ajax({
-                        type: "post",
-                        url: "/subscribepay/orderListDetails/deleteOrder",
-                        data: {
-                            "id": r.data.order.id,
-                            "pageNum": 1,
-                            "type": 1,
-                            "cancel": "cancel"
-                        },
-                        dataType: 'json',
-                        success: function () {
-                            $(".nopay-bg h3").text("已取消")
-                            $(".remaining").text("")
-                            $(".nopay-bg").removeClass("nopay-bg").addClass("cancel-bg")
-                            $(".j-footer").hide().text('')
+    function appendList(list, money) {
+        var returnHtml = "";
+        for (var i = 0; i < list.length; i++) {
+            var showTime = ""
+            var start = new Date(list[i].startTime * 1000).pattern('yyyy-MM-dd');
+            var end = new Date(list[i].endTime * 1000).pattern('yyyy-MM-dd');
+            showTime += new Date(list[i].startTime * 1000).pattern('yyyy年MM月dd日') + "-" + new Date(list[i].endTime * 1000).pattern('yyyy年MM月dd日');
+
+
+            var typeName = "";
+            if (list[i].type === 1) {
+                typeName = "续费"
+            } else if (list[i].type === 0) {
+                typeName = "升级"
+            }
+            var showArea = "";
+            if (list[i].oldBuyset.areacount === -1) {
+                showArea = "全国"
+            } else {
+                //if (list[i].oldBuyset.newcitys.length > 0) {
+                var cityCount = 0;
+                for (var j = 0; j < list[i].oldBuyset.newcitys.length; j++) {
+                    cityCount += list[i].oldBuyset.newcitys[j];
+                }
+                if (list[i].oldBuyset.areacount != 0) {
+                    showArea = list[i].oldBuyset.areacount + "个省";
+                    if (list[i].oldBuyset.newcitys.length > 1) {
+                        showArea += "、" + cityCount + "个市(分布在" + list[i].oldBuyset.newcitys.length + "个省内)";
+                    } else {
+                        if (cityCount != 0) {
+                            showArea += "、" + cityCount + "个市";
                         }
-                    })
-                }else{
-                    var hour = Math.floor(lefttime / (1000 * 60 * 60)),  //计算小时数
-                        hour = hour < 10 ? '0' + hour : hour;
-                    var minute = Math.floor(lefttime / (1000 * 60) % 60),  //计算分钟数
-                        minute = minute < 10 ? '0' + minute : minute;
-                    var seconds = Math.floor(lefttime / 1000 % 60);  //计算秒数
-                    seconds = seconds < 10 ? '0' + seconds : seconds;
-                    $(".remaining").text("剩余支付时间"+hour+":"+minute+":"+seconds)
+                    }
+                } else {
+                    if (list[i].oldBuyset.newcitys.length > 1) {
+                        showArea += cityCount + "个市(分布在" + list[i].oldBuyset.newcitys.length + "个省内)";
+                    } else {
+                        if (cityCount != 0) {
+                            showArea += cityCount + "个市";
+                        }
+                    }
                 }
-            },1000)
-          var pay_now = "<button class=\"j-button-confirm gopay\" >去支付</button>"
-          $(".j-footer").html(pay_now).css('display', 'flex')
-          $(".invoice").hide();//隐藏开发票
-          $(".gopay").on("click",function(){//显示去支付按钮
-            if(!canpay)return
-            canpay=false;
-            $DoPost("/subscribepay/vipsubscribe/orderToPay",{"orderCode":orderCode},function(r){
-              if(r.success){
-                onBridgeReady(JSON.parse(r.data.res),orderCode);
-              }else{
-                canpay=true;
-              }
-            })
-          })
-        }else if (r.data.order.order_status==1){
-          $("#card-header-bg").addClass("bg finish-bg")
-          $("#pageTitle").addClass("status")
-          $("#pageTitle").text("已完成");
-          //支付时间
-          $(".line_paytime").css("display","");
-          if(r.data.order.pay_time) $(".payTime").text(r.data.order.pay_time.replace("-",".").replace("-","."));
-          if (r.data.order.original_price==0){
-         	 $(".line_paytime").css("display","none");
-          }
-
-          //有效周期
-          $(".line_cycle").css("display","");
-          //有效日期
-          if(r.data.time.vip_starttime&&r.data.time.vip_endtime){
-            	var vip_starttime=r.data.time.vip_starttime+"";
-           		var vip_endtime=r.data.time.vip_endtime+"";
-           		vip_starttime=vip_starttime.split(" ")[0].replace(/-/g,".");
-           		vip_endtime=vip_endtime.split(" ")[0].replace(/-/g,".");
-           		var serviceTime=vip_starttime+" - "+vip_endtime;
-           	  	$(".serviceTime").text(serviceTime)
-          }
-
-          //支付方式
-          if(r.data.order.pay_way.indexOf("wx")>-1){
-            $(".line_payway").css("display","");
-            $(".payWay").text("微信支付");
-          }else if(r.data.order.pay_way.indexOf("ali")>-1){
-            $(".payWay").text("支付宝支付");
-            $(".line_payway").css("display","");
-          }else{//试用用户
-            $(".invoice").css("display","none");
-            return
-          }
-
-          $(".line_transaction").css("display","");
-          if(r.data.transaction_id) $(".transaction_id").text(r.data.transaction_id);
-          var pay_again = ""
-          //发票
-          if(r.data.order.applybill_status==0){
-            //已支付未申请发票
-            pay_again += "<button class=\"j-button-cancel\" onclick='invoiceAdd()'>开发票</button>"
-
-          }else{
-            //已支付已申请发票
-              pay_again += "<button class=\"j-button-cancel\" onclick='checkInvoice()'>查看发票</button>"
-          }
-            $(".j-footer").html(pay_again)
-        }else if(r.data.order.order_status==-2){
-            $("#card-header-bg").addClass("bg cancel-bg")
-            $("#pageTitle").addClass("status")
-    		$("#pageTitle").text("已取消");
-         $(".invoice").css("display","none");//隐藏开发票
-         $('.j-footer').hide()
+                //}
+            }
+            var industryShow = "";
+            if (list[i].oldBuyset.buyerclasscount === -1) {
+                industryShow = "全行业"
+            } else {
+                industryShow = list[i].oldBuyset.buyerclasscount + "个行业";
+            }
+            returnHtml += "<li class='list-item'>"
+                + '<div class="item-top">'
+                + '<div class="item-header">'
+                + '<span class="header-label">有效日期:</span>'
+                + '<span class="header-content ellipsis">' + showTime + '</span>'
+                + '</div>'
+                + '<div class="item-body">'
+                + '<div class="b-item body-area">'
+                + '<div class="body-area-title text-title">区域</div>'
+                + '<div class="body-area-sub">' + showArea + '</div>'
+                + '</div>'
+                + '<div class="b-item body-industry">'
+                + '<div class="body-industry-title text-title">采购单位行业</div>'
+                + '<div class="body-industry-sub">' + industryShow + '</div>'
+                + '</div>'
+            if (typeName != "") {
+                returnHtml += '<div class="vp-type">'
+                    + '<div class="vp-type-text">' + typeName + '</div>'
+                    + '</div>'
+            }
+
+            returnHtml += '</div>'
+                + '</div>'
+                + '<div class="item-footer">'
+                + '<span class="footer-label">小计:</span>'
+                + '<span class="footer-content text-title">¥' + (list[i].price / 100) + '</span>'
+                + '</div>'
+                + '</li>'
+
+            total_price += (list[i].price);
         }
-      }
-      	//计价清单
-      	var filterObj=JSON.parse(r.data.order.filter);
-      	var upgradeSubtotail=filterObj.upgradeSubtotail;
-      	if (upgradeSubtotail){	//有则显示
-      		$.ajax({
-      		    type: 'POST',
-      		    url: '/subscribepay/orderListDetails/getValuationList',
-      		    data: {
-      				"order_code":orderCode
-      		    },
-      		    success: function (data) {
-      		        appendList(data.list,data.order_money);
-      		    }
-      		});
-
-      		$(".valuationList").css("display","");
-      		// 计算标准点击事件
-      		$('.valuationList').on('click', function () {
-      			pickerShow('.billing-list-container', true)
-            $("html,body").addClass("stop");
-      		})
-      		// 计算标准隐藏
-      		$('.billing-list-container .dialog_hd__close').on('click', function () {
-      			pickerShow('.billing-list-container', false)
-            $("html,body").removeClass("stop");
-      		})
-      		$('.weui-mask').on('click', function () {
-      			pickerShow('.billing-list-container', false)
-            $("html,body").removeClass("stop");
-      		})
-      	}
-
-
-		//
-		if((r.data.order.original_price==0)&&(r.data.order.out_trade_no=="")&&(r.data.order.vip_type==2)){
-			$(".line_transaction").hide();
-			$(".invoice").hide();
-			$(".line_payway").hide();
-		}
-
-      //调用微信支付接口
-  		function onBridgeReady(res,ordercode){
-  		   	WeixinJSBridge.invoke('getBrandWCPayRequest',{
-  		    		"appId": res["appId"],
-  		          	"timeStamp": res["timestamp"],
-  		          	"nonceStr": res["nonceStr"],
-  		          	"package": res["prepayId"],
-  		          	"signType": res["signType"],
-  		         	"paySign": res["sign"]
-  				},
-  				function(r){
-  			    if(r.err_msg == "get_brand_wcpay_request:ok"){
-  						setTimeout(function(){
-  							window.location.replace("/front/vipsubscribe/toPaySuccessPage?orderCode="+ordercode);
-  						},500)
-  					}else if(r.err_msg == "get_brand_wcpay_request:cancel"){
-  						//取消支付 可以再次支付
-			            canpay=true;
-//			            alert("开发环境【支付跳转完成】")
-//			            try{
-//			  				window.location.replace("/front/vipsubscribe/toPaySuccessPage?orderCode="+ordercode);
-//		            	}catch(e){
-//			                alert(e)
-//		                }
-  					}else{
-		                weui.toast("系统异常,请稍微再试",{
-		               		duration: 2000,
-		                	className: 'custom-toast',
-		              	});
-  				  }
-  			});
-  		}
-    })
-    function formatEffectiveDate(strat,end){
-      var startDate = new Date(strat*1000);
-      var endDate = new Date(end*1000);
-      return formatDate(startDate)+" - "+formatDate(endDate)
+        $(".total-price").text("共计:¥" + money / 100);
+        $(".list-content").html(returnHtml);
     }
-    function formatDate(d){
-     return (d.getFullYear()) + "." +
-     (Array(2).join(0)+(d.getMonth() + 1)).slice(-2) + "." +
-     (Array(2).join(0)+(d.getDate())).slice(-2);
+
+    function MonthsBetw(date1, date2) { //date1和date2是2019-3-12格式
+        //用-分成数组
+        date1 = date1.split("-");
+        date2 = date2.split("-");
+        //获取年,月数
+        var year1 = parseInt(date1[0]),
+            month1 = parseInt(date1[1]),
+            year2 = parseInt(date2[0]),
+            month2 = parseInt(date2[1]),
+            //通过年,月差计算月份差
+            months = (year2 - year1) * 12 + (month2 - month1);
+        return months;
     }
 
-	function weuiDialog(){
-		weui.dialog({
-			title: '提示信息',
-			content: '您未绑定邮箱<br/>请绑定后再开发票',
-	        className: 'jymobile-setting-dialog',// 设置弹框的类名
-	        buttons: [
-	        {
-	        	label: '去设置',
-	        	type: 'primary',
-	        	onClick: function () {
-	        		//window.location.replace("/front/wxMyOrder/myEmail?name=invoice&orderCode="+orderCode);
-	        		window.location.href="/front/wxMyOrder/myEmail?name=invoice&orderCode="+orderCode;
-	        	}
-	        },
-	        {
-	        	label: '取消',
-	        	type: 'default',
-	        	onClick: function () {
-	        		console.log('取消')
-	        	}
-	        }
-	        ]
-	    });
-	}
-
-	function PrefixInteger(num,n) {
-		return (Array(n).join(0) + num).slice(-n);
-	}
-	// 参数为结束时间戳
-	function setTimeFunc (endtime){
-  		var t = endtime - +new Date();
-  		if (t <= 0) {
-  			$(".button").hide();
-  			$(".cancel_time").hide();
-  			$("#pageTitle").html("已取消");
-  		}
-  		var days_ =PrefixInteger(parseInt(t/1000/60/60, 10).toString(),2)
-  		var minutes_ =PrefixInteger(parseInt(t/1000/60%60, 10).toString(),2)
-  		var seconds =PrefixInteger(parseInt(t/1000%60, 10).toString(),2)
-  		$(".cancel_time").text("剩余"+days_+":" + minutes_+":"+seconds+" ");
-	  }
-  })
-
-  //苹果端  刷新js
-  $(function () {
-		var isPageHide = false;
-		window.addEventListener('pageshow', function () {
-		    if (isPageHide) {
-                location.reload();
-		    }
-		});
-		window.addEventListener('pagehide', function () {
-		    isPageHide = true;
-		});
-	});
-
-	 // picker的显示隐藏
-	function pickerShow(selector, f) {
-		if (f) {
-			// 添加进场动画,并显示
-			$(selector).find('.weui-mask').removeClass('weui-animate-fade-out').addClass('weui-animate-fade-in')
-			$(selector).find('.weui-picker').removeClass('weui-animate-slide-down').addClass('weui-animate-slide-up')
-			$(selector).show(300);
-		} else {
-			// 添加离场动画,并隐藏
-			$(selector).find('.weui-mask').removeClass('weui-animate-fade-in').addClass('weui-animate-fade-out')
-			$(selector).find('.weui-picker').removeClass('weui-animate-slide-up').addClass('weui-animate-slide-down')
-			$(selector).hide(300);
-		}
-	}
-	var total_price=0;
-	function appendList(list,money){
-		var returnHtml = "";
-		for (var i = 0; i < list.length; i++) {
-			var showTime=""
-			var start= new Date(list[i].startTime * 1000).pattern('yyyy-MM-dd');
-			var end =new Date(list[i].endTime * 1000).pattern('yyyy-MM-dd');
-		/*	var effective = MonthsBetw(start,end);	//月份
-			if (effective>=12){	//年份转换
-				if (effective%12==0){
-					showTime +="("+(effective/12)+"年)";
-				}else{
-					var effective_year ="";
-					effective_year+=(effective/12);
-					var indexof= effective_year.lastIndexOf(".");
-					effective_year =effective_year.substring(0,indexof);
-					showTime+="("+effective_year+"年"+(effective%12)+"个月)";
-				}
-			}else{
-				showTime +="("+effective+"个月)";
-			}
-			*/
-			showTime += new Date(list[i].startTime * 1000).pattern('yyyy年MM月dd日') + "-" + new Date(list[i].endTime * 1000).pattern('yyyy年MM月dd日');
-
-
-			var typeName = "";
-			if (list[i].type === 1) {
-				typeName = "续费"
-			} else if (list[i].type === 0) {
-				typeName = "升级"
-			}
-			var showArea = "";
-			if (list[i].oldBuyset.areacount === -1) {
-				showArea = "全国"
-			} else {
-				//if (list[i].oldBuyset.newcitys.length > 0) {
-					var cityCount = 0;
-					for (var j = 0; j < list[i].oldBuyset.newcitys.length; j++) {
-						cityCount += list[i].oldBuyset.newcitys[j];
-					}
-					if(list[i].oldBuyset.areacount!=0){
-						showArea = list[i].oldBuyset.areacount + "个省";
-						if (list[i].oldBuyset.newcitys.length>1){
-							showArea += "、" + cityCount + "个市(分布在" + list[i].oldBuyset.newcitys.length + "个省内)";
-						}else{
-							if(cityCount!=0){
-								showArea += "、" + cityCount + "个市";
-							}
-						}
-					}else{
-						if (list[i].oldBuyset.newcitys.length>1){
-							showArea += cityCount + "个市(分布在" + list[i].oldBuyset.newcitys.length + "个省内)";
-						}else{
-							if(cityCount!=0){
-								showArea += cityCount + "个市";
-							}
-						}
-					}
-				//}
-			}
-			var industryShow = "";
-			if (list[i].oldBuyset.buyerclasscount === -1) {
-				industryShow = "全行业"
-			} else {
-				industryShow = list[i].oldBuyset.buyerclasscount + "个行业";
-			}
-			returnHtml += "<li class='list-item'>"
-				+ '<div class="item-top">'
-				+ '<div class="item-header">'
-				+ '<span class="header-label">有效日期:</span>'
-				+ '<span class="header-content ellipsis">' + showTime + '</span>'
-				+ '</div>'
-				+ '<div class="item-body">'
-				+ '<div class="b-item body-area">'
-				+ '<div class="body-area-title text-title">区域</div>'
-				+ '<div class="body-area-sub">' + showArea + '</div>'
-				+ '</div>'
-				+ '<div class="b-item body-industry">'
-				+ '<div class="body-industry-title text-title">采购单位行业</div>'
-				+ '<div class="body-industry-sub">' + industryShow + '</div>'
-				+ '</div>'
-			if (typeName != "") {
-				returnHtml += '<div class="vp-type">'
-					+ '<div class="vp-type-text">' + typeName + '</div>'
-					+ '</div>'
-			}
-
-			returnHtml += '</div>'
-				+ '</div>'
-				+ '<div class="item-footer">'
-				+ '<span class="footer-label">小计:</span>'
-				+ '<span class="footer-content text-title">¥' +(list[i].price/100) + '</span>'
-				+ '</div>'
-				+ '</li>'
-
-			total_price+=(list[i].price) ;
-		}
-		$(".total-price").text("共计:¥"+money/100);
-		$(".list-content").html(returnHtml);
-	}
-
-	function MonthsBetw(date1, date2) { //date1和date2是2019-3-12格式
-	    //用-分成数组
-	    date1 = date1.split("-");
-	    date2 = date2.split("-");
-	    //获取年,月数
-	    var year1 = parseInt(date1[0]),
-	        month1 = parseInt(date1[1]),
-	        year2 = parseInt(date2[0]),
-	        month2 = parseInt(date2[1]),
-	        //通过年,月差计算月份差
-	        months = (year2 - year1) * 12 + (month2 - month1);
-	    return months;
-	}
-  //开发票
-      var orderCode=getParam("orderCode")
-  function invoiceAdd(){
-      $.post("/subscribepay/orderListDetails/isOver", {"order_code":orderCode}, function(data) {
-          if(data.status==1){
-            window.location.href = "/front/invoice/showpage?order_code="+orderCode;
-          }else{
-    				window.location.href = "/front/invoice/cantInvoice";
-          };
-      })
-  }
-  //再次购买
-  function payAgain(){
-      window.location.href="/weixin/pay/vipsubscribe_new";
-  }
-  //查看发票
-  function checkInvoice(){
-      orderCode=getParam("orderCode")
-      window.location.href = "/front/invoice/check_invoice.html?order_code="+orderCode
-  }
-
-  /******* 获取url参数(正则)********/
-  function getParam(name) {
-      var search = document.location.search;
-      // alert(search);
-      var pattern = new RegExp("[?&]" + name + "\=([^&]+)", "g");
-      var matcher = pattern.exec(search);
-      var items = null;
-      if (null != matcher) {
-          try {
-              items = decodeURIComponent(decodeURIComponent(matcher[1]));
-          } catch (e) {
-              try {
-                  items = decodeURIComponent(matcher[1]);
-              } catch (e) {
-                  items = matcher[1];
-              }
-          }
-      }
-      return items;
-  };
+    //开发票
+    var orderCode = getParam("orderCode")
+
+    function invoiceAdd() {
+        $.post("/subscribepay/orderListDetails/isOver", {"order_code": orderCode}, function (data) {
+            if (data.status == 1) {
+                window.location.href = "/front/invoice/showpage?order_code=" + orderCode;
+            } else {
+                window.location.href = "/front/invoice/cantInvoice";
+            }
+            ;
+        })
+    }
+
+    //再次购买
+    function payAgain() {
+        window.location.href = "/front/vipsubscribe/vipsubscribe_new";
+    }
+
+    //查看发票
+    function checkInvoice() {
+        orderCode = getParam("orderCode")
+        window.location.href = "/front/invoice/check_invoice.html?order_code=" + orderCode
+    }
+
+    /******* 获取url参数(正则)********/
+    function getParam(name) {
+        var search = document.location.search;
+        // alert(search);
+        var pattern = new RegExp("[?&]" + name + "\=([^&]+)", "g");
+        var matcher = pattern.exec(search);
+        var items = null;
+        if (null != matcher) {
+            try {
+                items = decodeURIComponent(decodeURIComponent(matcher[1]));
+            } catch (e) {
+                try {
+                    items = decodeURIComponent(matcher[1]);
+                } catch (e) {
+                    items = matcher[1];
+                }
+            }
+        }
+        return items;
+    };
 </script>
-	{{include "/common/baiducc.html"}}
+{{include "/common/baiducc.html"}}
 </html>

+ 77 - 76
src/web/templates/weixin/vipsubscribe/vip_pay_success.html

@@ -1,84 +1,85 @@
 <!DOCTYPE html>
 <html>
-	<head>
-		<meta charset="utf-8">
-		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
-		<title>VIP订阅</title>
-		<script src="/vipsubscribe/js/rem.js?v={{Msg "seo" "version"}}"></script>
-		<link rel="stylesheet" type="text/css" href="/vipsubscribe/css/base.css?v={{Msg "seo" "version"}}"/>
-		<link rel="stylesheet" href="/vipsubscribe/css/weui.min.css?v={{Msg "seo" "version"}}">
-		<link rel="stylesheet" href="/vipsubscribe/iconfont/iconfont.css?v={{Msg "seo" "version"}}">
+<head>
+    <meta charset="utf-8">
+    <meta name="viewport"
+          content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"/>
+    <title>VIP订阅</title>
+    <script src="/vipsubscribe/js/rem.js?v={{Msg "seo" "version"}}"></script>
+    <link rel="stylesheet" type="text/css" href="/vipsubscribe/css/base.css?v={{Msg "seo" "version"}}"/>
+    <link rel="stylesheet" href="/vipsubscribe/css/weui.min.css?v={{Msg "seo" "version"}}">
+    <link rel="stylesheet" href="/vipsubscribe/iconfont/iconfont.css?v={{Msg "seo" "version"}}">
     <link rel="stylesheet" href="/vipsubscribe/css/vip_pay_success.css?v={{Msg "seo" "version"}}">
     <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/css/wxbutton.css?v={{Msg "seo" "version"}}5">
-	</head>
-	<body>
-		<div class="vip_pay_success layout_top-bottom">
-			<div class="layou_top">
-                <div class="icon_box">
-                    <i class="icon iconfont">&#xe612;</i>
-                    <p>支付成功</p>
-                </div>
-				<div class="info_box">
-                    <div class="pay_mode">
-                        <span>支付方式</span>
-                        <span class="payway"></span>
-                    </div>
-                    <div class="pay_time">
-                        <span>支付时间</span>
-                        <span class="paytime"></span>
-                    </div>
-                    <div class="pay_id">
-                        <span>订单编号</span>
-                        <span class="orderCode"></span>
-                    </div>
-                </div>
-			</div>
-			<div class="bottom_button j-button-group">
-        <button class="left_btn j-button-cancel1" >查看订单</button>
-        <button class="right_btn j-button-confirm1" >VIP设置</button>
-			</div>
-		</div>
-	</body>
-  <script src="/vipsubscribe/js/jquery-2.1.4.js?v={{Msg "seo" "version"}}"></script>
-  <script src="/vipsubscribe/js/common.js?v={{Msg "seo" "version"}}"></script>
-  <script src="/vipsubscribe/js/weui.min.js?v={{Msg "seo" "version"}}"></script>
-  <script>
-    $(function(){
-      //查看订单
-      $(".left_btn").on("click",function(){
-        window.location.href ='/weixin/pay/toOrderDetailPage?orderCode='+orderCode
-      })
-      //设置关键词
-      $(".right_btn").on("click",function(){
-        window.location.href ='/weixin/pay/toSubVipSetPage'
-      }) 
-      
-      var orderCode=decodeURIComponent(getParam("orderCode"));
-      $(".orderCode").text(orderCode);
-      $DoPost("/subscribepay/orderListDetails/getOrderPayAllMsg",{"orderCode":orderCode},function(r){
-        if(r.success){
-          if(r.data.order.order_status==1){
-            if(r.data.order.pay_time){
-              $(".paytime").text(r.data.order.pay_time.replace("-","/").replace("-","/"));
+</head>
+<body>
+<div class="vip_pay_success layout_top-bottom">
+    <div class="layou_top">
+        <div class="icon_box">
+            <i class="icon iconfont">&#xe612;</i>
+            <p>支付成功</p>
+        </div>
+        <div class="info_box">
+            <div class="pay_mode">
+                <span>支付方式</span>
+                <span class="payway"></span>
+            </div>
+            <div class="pay_time">
+                <span>支付时间</span>
+                <span class="paytime"></span>
+            </div>
+            <div class="pay_id">
+                <span>订单编号</span>
+                <span class="orderCode"></span>
+            </div>
+        </div>
+    </div>
+    <div class="bottom_button j-button-group">
+        <button class="left_btn j-button-cancel1">查看订单</button>
+        <button class="right_btn j-button-confirm1">VIP设置</button>
+    </div>
+</div>
+</body>
+<script src="/vipsubscribe/js/jquery-2.1.4.js?v={{Msg "seo" "version"}}"></script>
+<script src="/vipsubscribe/js/common.js?v={{Msg "seo" "version"}}"></script>
+<script src="/vipsubscribe/js/weui.min.js?v={{Msg "seo" "version"}}"></script>
+<script>
+    $(function () {
+        //查看订单
+        $(".left_btn").on("click", function () {
+            window.location.href = '/front/vipsubscribe/toOrderDetailPage?orderCode=' + orderCode
+        })
+        //设置关键词
+        $(".right_btn").on("click", function () {
+            window.location.href = '/front/vipsubscribe/toSubVipSetPage'
+        })
+
+        var orderCode = decodeURIComponent(getParam("orderCode"));
+        $(".orderCode").text(orderCode);
+        $DoPost("/subscribepay/orderListDetails/getOrderPayAllMsg", {"orderCode": orderCode}, function (r) {
+            if (r.success) {
+                if (r.data.order.order_status == 1) {
+                    if (r.data.order.pay_time) {
+                        $(".paytime").text(r.data.order.pay_time.replace("-", "/").replace("-", "/"));
+                    }
+                    if (r.data.order.pay_way) {
+                        var payway
+                        if (r.data.order.pay_way.indexOf("wx") > -1) {
+                            payway = "微信支付";
+                        } else if (r.data.order.pay_way.indexOf("ali") > -1) {
+                            payway = "支付宝支付";
+                        } else {
+                            $(".pay_mode").css("display", "none");
+                        }
+                        $(".payway").text(payway);
+                    }
+                    if ((r.data.order.original_price == 0) && (r.data.order.out_trade_no == "") && (r.data.order.vip_type == 2)) {
+                        $(".pay_mode").hide();
+                    }
+                }
             }
-            if(r.data.order.pay_way){
-              	var payway
-            	if(r.data.order.pay_way.indexOf("wx")>-1){
-                	payway="微信支付";
-              	}else if(r.data.order.pay_way.indexOf("ali")>-1){
-                	payway="支付宝支付";
-              	}else{
-               		$(".pay_mode").css("display","none");
-              	}
-              	$(".payway").text(payway);
-            }
-			if((r.data.order.original_price==0)&&(r.data.order.out_trade_no=="")&&(r.data.order.vip_type==2)){
-				$(".pay_mode").hide();
-			}
-          }
-        }
-      })
+        })
     })
-  </script>
+</script>
 {{include "/common/baiducc.html"}}
 </html>

+ 825 - 890
src/web/templates/weixin/vipsubscribe/vip_purchase.html

@@ -16,980 +16,915 @@
 </head>
 <body>
 <div style="height: 100%;">
-      {{if not .T.isLiveActive}}
-      <div class="vip_purchase">
-      {{else}}
-      <div class="vip_purchase live-20200707">
-      {{end}}
-        {{if not .T.isTrial }}
-            <div class="hot-bought">
-                <span class="j-icon icon-cart"></span>
-                <span class="bought-text">已有<span class="bought-num">0</span>人购买</span>
-            </div>
+    {{if not .T.isLiveActive}}
+    <div class="vip_purchase">
         {{else}}
-            <div class="j-notice-bar bar-red free-7day-tip">
-                <span class="label">现在购买,可享6折优惠。</span>
-                <a href="/weixin/pay/vipsubscribe_new" class="link">去购买</a>
-            </div>
-        {{end}}
-        <div class="choose_condition">
-            <ul class="chooseList">
-                <li class="choose_item">
-                    <a href="/front/vipsubscribe/toChooseArea">
-                        <span class="label">区域</span>
-                        {{if not .T.isTrial }}
-                            <input type="text" disabled value="" placeholder="1个市"
-                                   class="info choose_area">
-                        {{else}}
-                            <input type="text" disabled value="" placeholder="选择全国、省份、地市" class="info choose_area">
-                        {{end}}
-                        <i class="iconfont icon-arrow"></i>
-                    </a>
-                    <p class="add_tips area_warn" style="display: none;">请选择区域</p>
-                    <!-- 无选择时不显示 -->
-                    <p class="add_tips area" style="display:none">已选择 0 个省级区域、0 个地市</p>
-                </li>
-                <li class="choose_item">
-                    <a href="/front/vipsubscribe/toChooseIndustry">
-                        <span class="label" style="white-space: nowrap;">采购单位行业</span>
+        <div class="vip_purchase live-20200707">
+            {{end}}
+            {{if not .T.isTrial }}
+                <div class="hot-bought">
+                    <span class="j-icon icon-cart"></span>
+                    <span class="bought-text">已有<span class="bought-num">0</span>人购买</span>
+                </div>
+            {{else}}
+                <div class="j-notice-bar bar-red free-7day-tip">
+                    <span class="label">现在购买,可享6折优惠。</span>
+                    <a href="/front/vipsubscribe/vipsubscribe_new" class="link">去购买</a>
+                </div>
+            {{end}}
+            <div class="choose_condition">
+                <ul class="chooseList">
+                    <li class="choose_item">
+                        <a href="/front/vipsubscribe/toChooseArea">
+                            <span class="label">区域</span>
+                            {{if not .T.isTrial }}
+                                <input type="text" disabled value="" placeholder="1个市"
+                                       class="info choose_area">
+                            {{else}}
+                                <input type="text" disabled value="" placeholder="选择全国、省份、地市" class="info choose_area">
+                            {{end}}
+                            <i class="iconfont icon-arrow"></i>
+                        </a>
+                        <p class="add_tips area_warn" style="display: none;">请选择区域</p>
+                        <!-- 无选择时不显示 -->
+                        <p class="add_tips area" style="display:none">已选择 0 个省级区域、0 个地市</p>
+                    </li>
+                    <li class="choose_item">
+                        <a href="/front/vipsubscribe/toChooseIndustry">
+                            <span class="label" style="white-space: nowrap;">采购单位行业</span>
+                            {{if not .T.isTrial }}
+                                <input type="text" disabled value="" placeholder="1个行业"
+                                       class="info choose_industry">
+                            {{else}}
+                                <input type="text" disabled value="" placeholder="选择采购单位行业"
+                                       class="info choose_industry">
+                            {{end}}
+                            <i class="iconfont icon-arrow"></i>
+                        </a>
+                        <!-- 无选择时不显示 -->
+                        <p class="add_tips industry_warn" style="display: none;">请选择行业</p>
+                        <p class="add_tips industry" style="display:none">已选择 0 个行业</p>
+                    </li>
+                    <li class="choose_item select_cycle">
+                        <!-- 需要选择订阅周期就用a标签,div.class="free-7day"隐藏 opacity: 1 !important; -->
+                        <!-- 需要选择试用就用div标签,a标签隐藏 -->
                         {{if not .T.isTrial }}
-                            <input type="text" disabled value="" placeholder="1个行业"
-                                   class="info choose_industry">
+                            <a href="javascript:;">
+                                <span class="label">订阅周期</span>
+                                <span class="show_time">一个月</span>
+                                <input type="text" readonly="readonly" disabled style="display:none;" value="1个月"
+                                       class="info choose_time">
+                                <i class="iconfont icon-arrow"></i>
+                            </a>
                         {{else}}
-                            <input type="text" disabled value="" placeholder="选择采购单位行业" class="info choose_industry">
+                            <div class="free-7day">
+                                <span class="label">订阅周期</span>
+                                <i class="info">免费试用7天</i>
+                            </div>
                         {{end}}
-                        <i class="iconfont icon-arrow"></i>
-                    </a>
-                    <!-- 无选择时不显示 -->
-                    <p class="add_tips industry_warn" style="display: none;">请选择行业</p>
-                    <p class="add_tips industry" style="display:none">已选择 0 个行业</p>
-                </li>
-                <li class="choose_item select_cycle">
-                    <!-- 需要选择订阅周期就用a标签,div.class="free-7day"隐藏 opacity: 1 !important; -->
-                    <!-- 需要选择试用就用div标签,a标签隐藏 -->
-                    {{if not .T.isTrial }}
-                        <a href="javascript:;">
-                            <span class="label">订阅周期</span>
-                            <span class="show_time">一个月</span>
-                            <input type="text" readonly="readonly" disabled style="display:none;" value="1个月"
-                                   class="info choose_time">
-                            <i class="iconfont icon-arrow"></i>
-                        </a>
-                    {{else}}
-                        <div class="free-7day">
-                            <span class="label">订阅周期</span>
-                            <i class="info">免费试用7天</i>
-                        </div>
-                    {{end}}
 
-                </li>
-            </ul>
-            <div class="pay_mode">
+                    </li>
+                </ul>
                 {{if not .T.isTrial }}
-                    <div class="select_payment choose_item">
-                        <a href="javascript:;">
-                            <span class="label">支付方式</span>
-                            <span class="info choose_way" style="width: 6rem;">微信支付</span>
-                            <!--<i class="iconfont"></i>-->
-                        </a>
+                    <div class="chooseList coupon-code-tx">
+                        <div class="coupon-code-sel choose_item">
+                            <a href="javascript:;">
+                                <span class="label">优惠码</span>
+                                <span class="info">输入优惠码</span>
+                                <i class="iconfont icon-arrow"></i>
+                            </a>
+                        </div>
                     </div>
                 {{end}}
-            </div>
-            {{if not .T.isTrial }}
-                <div class="chooseList coupon-code-tx">
-                    <div class="coupon-code-sel choose_item">
-                        <a href="javascript:;">
-                            <span class="label">优惠码</span>
-                            <span class="info">输入优惠码</span>
-                            <i class="iconfont icon-arrow"></i>
-                        </a>
+                <div class="vip_rules">
+                    <!--
+                      <div class="auto_renew weui-cells_checkbox radio-form">
+                          <label class="weui-cell weui-check__label" for="auto-renew">
+                              <div class="weui-cell__hd">
+                                  <input type="checkbox" class="weui-check" name="autoRenewService" id="auto-renew" />
+                                  <i class="weui-icon-checked"></i>
+                              </div>
+                              <div class="weui-cell__bd read">
+                                  <p>开通自动续费,根据当前订阅条件,服务到期时系统将为您自动续费</p>
+                              </div>
+                          </label>
+                      </div>
+                    -->
+                    <div class="vip_prise_table">
+                        <table class="monthly">
+                            <caption class="table_title">- VIP订阅价格 -</caption>
+                            <tr>
+                                <td colspan="2">按月购买</td>
+                            </tr>
+                            <tr>
+                                <td><span>5.8</span>元 月/市/行业</td>
+                                <td><span>18</span>元 月/市/全行业</td>
+                            </tr>
+                            <tr>
+                                <td><span>11.8</span>元 月/省/行业</td>
+                                <td><span>38</span>元 月/省/全行业</td>
+                            </tr>
+                            <tr>
+                                <td><span>118</span>元 月/全国/行业</td>
+                                <td><span>388</span>元 月/全国/全行业</td>
+                            </tr>
+                        </table>
+                        <table class="yearly">
+                            <tr>
+                                <td colspan="2">按年购买</td>
+                            </tr>
+                            <tr>
+                                <td><span>58</span>元 年/市/行业</td>
+                                <td><span>180</span>元 年/市/全行业</td>
+                            </tr>
+                            <tr>
+                                <td><span>118</span>元 年/省/行业</td>
+                                <td><span>380</span>元 年/省/全行业</td>
+                            </tr>
+                            <tr>
+                                <td><span>1180</span>元 年/全国/行业</td>
+                                <td><span>3880</span>元 年/全国/全行业</td>
+                            </tr>
+                        </table>
+                        <dl class="tips">
+                            <dt>购买须知:</dt>
+                            <dd>套餐周期内,不支持套餐降级,续费可降级;</dd>
+                            <dd>用户最多购买/续费3年套餐;</dd>
+                            <dd>支持套餐升级,补差价(按月进行补差价,不足一个月按一个月计算)。</dd>
+                            <dd>3个市及以上即为全省,10个省及以上即为全国。4个行业及以上即为全行业。</dd>
+                            <dd>购买的采购单位行业与地域为个数,购买后可不限次数进行更换。</dd>
+                        </dl>
                     </div>
                 </div>
-            {{end}}
-            <div class="vip_rules">
-                <!--
-                  <div class="auto_renew weui-cells_checkbox radio-form">
-                      <label class="weui-cell weui-check__label" for="auto-renew">
-                          <div class="weui-cell__hd">
-                              <input type="checkbox" class="weui-check" name="autoRenewService" id="auto-renew" />
-                              <i class="weui-icon-checked"></i>
-                          </div>
-                          <div class="weui-cell__bd read">
-                              <p>开通自动续费,根据当前订阅条件,服务到期时系统将为您自动续费</p>
-                          </div>
-                      </label>
-                  </div>
-                -->
-                <div class="vip_prise_table">
-                    <table class="monthly">
-                        <caption class="table_title">- VIP订阅价格 -</caption>
-                        <tr>
-                            <td colspan="2">按月购买</td>
-                        </tr>
-                        <tr>
-                            <td><span>5.8</span>元 月/市/行业</td>
-                            <td><span>18</span>元 月/市/全行业</td>
-                        </tr>
-                        <tr>
-                            <td><span>11.8</span>元 月/省/行业</td>
-                            <td><span>38</span>元 月/省/全行业</td>
-                        </tr>
-                        <tr>
-                            <td><span>118</span>元 月/全国/行业</td>
-                            <td><span>388</span>元 月/全国/全行业</td>
-                        </tr>
-                    </table>
-                    <table class="yearly">
-                        <tr>
-                            <td colspan="2">按年购买</td>
-                        </tr>
-                        <tr>
-                            <td><span>58</span>元 年/市/行业</td>
-                            <td><span>180</span>元 年/市/全行业</td>
-                        </tr>
-                        <tr>
-                            <td><span>118</span>元 年/省/行业</td>
-                            <td><span>380</span>元 年/省/全行业</td>
-                        </tr>
-                        <tr>
-                            <td><span>1180</span>元 年/全国/行业</td>
-                            <td><span>3880</span>元 年/全国/全行业</td>
-                        </tr>
-                    </table>
-                    <dl class="tips">
-                        <dt>购买须知:</dt>
-                        <dd>套餐周期内,不支持套餐降级,续费可降级;</dd>
-                        <dd>用户最多购买/续费3年套餐;</dd>
-                        <dd>支持套餐升级,补差价(按月进行补差价,不足一个月按一个月计算)。</dd>
-                        <dd>3个市及以上即为全省,10个省及以上即为全国。4个行业及以上即为全行业。</dd>
-                        <dd>购买的采购单位行业与地域为个数,购买后可不限次数进行更换。</dd>
-                    </dl>
-                </div>
-            </div>
-        </div>
-        <div class="fixed-bottom-box p15">
-            {{if not .T.isTrial }}
-            <div class="j-notice-bar bar-red vip-bar">限时6折,现在购买,帮您省<span class="reduce-price">0</span>元</div>
-            {{end}}
-            <div class="price">
-                <span class="billing-total">合计:</span>
-                <div class="billing-list-btn">
-                    <span class="billing-mon">&yen;</span>
-                    <strong class="billing-price">5.80</strong>
-                </div>
             </div>
-            {{if not .T.isTrial }}
-            <div class="origin-price">
-                <span class="price-label">原价:</span>
-                <div class="price-container">
-                    <span class="currency-type">&yen;</span>
-                    <span class="price-num">5.80</span>
-                </div>
-            </div>
-            {{end}}
-            <div class="weui-cells weui-cells_checkbox radio-form">
-                <label class="weui-cell weui-check__label" for="buy">
-                    <div class="weui-cell__hd">
-                        <input type="checkbox" class="weui-check" name="buyService" id="buy"/>
-                        <i class="weui-icon-checked"></i>
+            <div class="fixed-bottom-box p15">
+                {{if not .T.isTrial }}
+                    <div class="j-notice-bar bar-red vip-bar">限时6折,现在购买,帮您省<span class="reduce-price">0</span>元</div>
+                {{end}}
+                <div class="price">
+                    <span class="billing-total">合计:</span>
+                    <div class="billing-list-btn">
+                        <span class="billing-mon">&yen;</span>
+                        <strong class="billing-price">5.80</strong>
                     </div>
-                    <div class="weui-cell__bd read">
-                        <p>
-                            我已阅读,理解并接受
-                            <a href="/front/staticPage/wx-serviceterms.html">
-                                《剑鱼标讯线上购买与服务条款》
-                            </a>
-                        </p>
+                </div>
+                {{if not .T.isTrial }}
+                    <div class="origin-price">
+                        <span class="price-label">原价:</span>
+                        <div class="price-container">
+                            <span class="currency-type">&yen;</span>
+                            <span class="price-num">5.80</span>
+                        </div>
                     </div>
-                </label>
-            </div>
-            <div class="form-btn j-footer">
-                <button class="btn enter j-button" disabled id="payHandle">去支付</button>
+                {{end}}
+                <div class="weui-cells weui-cells_checkbox radio-form">
+                    <label class="weui-cell weui-check__label" for="buy">
+                        <div class="weui-cell__hd">
+                            <input type="checkbox" class="weui-check" name="buyService" id="buy"/>
+                            <i class="weui-icon-checked"></i>
+                        </div>
+                        <div class="weui-cell__bd read">
+                            <p>
+                                我已阅读,理解并接受
+                                <a href="/front/staticPage/wx-serviceterms.html">
+                                    《剑鱼标讯线上购买与服务条款》
+                                </a>
+                            </p>
+                        </div>
+                    </label>
+                </div>
+                <div class="form-btn j-footer">
+                    <button class="btn enter j-button" disabled id="payHandle">去支付</button>
+                </div>
             </div>
-        </div>
 
-        <!-- 选择行业 -->
-        <div class="js_dialog time_cycle p13" id="time_cycle" style="display: none;">
-            <div class="weui-mask"></div>
-            <div class="box">
-                <div class="box_hd">
-                    <h3>选择订阅周期</h3>
-                    <span class="cancel">
+            <!-- 选择行业 -->
+            <div class="js_dialog time_cycle p13" id="time_cycle" style="display: none;">
+                <div class="weui-mask"></div>
+                <div class="box">
+                    <div class="box_hd">
+                        <h3>选择订阅周期</h3>
+                        <span class="cancel">
                         <span class="j-icon icon-del-grey"></span>
                     </span>
-                </div>
-                <div class="box_bd">
-                    <!-- <div class="tips monthly_tips" style="display: none">
-                            3-6个月6折,大于6个月5折
-                        </div>
-                        <div class="tips yearly_tips" style="display: none">
-                            1-2年5折,3年4折
-                        </div> -->
-                    <!--<div class="tips profit_tips" style="display: none">已选择10个月,建议“按年订阅”</div>-->
-                    <div class="computed">
-                        <span class="computed_mon">¥</span>
-                        <div class="computed_price"></div>
                     </div>
-                    <div class="bd_select">
-                        <div class="weui-cells weui-cells_checkbox choose-form">
-                            <label class="weui-cell weui-check__label monthly_label" for="monthly">
-                                <div class="weui-cell__hd">
-                                    <input type="radio" class="weui-check monthly" name="time" value="month"
-                                           id="monthly"/>
-                                    <i class="weui-icon-checked"></i>
+                    <div class="box_bd">
+                        <!-- <div class="tips monthly_tips" style="display: none">
+                                3-6个月6折,大于6个月5折
+                            </div>
+                            <div class="tips yearly_tips" style="display: none">
+                                1-2年5折,3年4折
+                            </div> -->
+                        <!--<div class="tips profit_tips" style="display: none">已选择10个月,建议“按年订阅”</div>-->
+                        <div class="computed">
+                            <span class="computed_mon">¥</span>
+                            <div class="computed_price"></div>
+                        </div>
+                        <div class="bd_select">
+                            <div class="weui-cells weui-cells_checkbox choose-form">
+                                <label class="weui-cell weui-check__label monthly_label" for="monthly">
+                                    <div class="weui-cell__hd">
+                                        <input type="radio" class="weui-check monthly" name="time" value="month"
+                                               id="monthly"/>
+                                        <i class="weui-icon-checked"></i>
+                                    </div>
+                                    <div class="weui-cell__bd">
+                                        <p>按月订阅</p>
+                                    </div>
+                                </label>
+                                <div class="number_box" id="number_box_month" data-numbox-step="1" data-numbox-min="1"
+                                     data-numbox-max="12">
+                                    <button class="weui-btn weui-btn_plain-default" type="button" disabled>
+                                        <div class="jy_icon decrease"></div>
+                                    </button>
+                                    <span class="month_number">1</span>
+                                    <button class="weui-btn weui-btn_plain-default add" type="button">
+                                        <div class="jy_icon increase"></div>
+                                    </button>
                                 </div>
-                                <div class="weui-cell__bd">
-                                    <p>按月订阅</p>
+                            </div>
+                            <div class="weui-cells weui-cells_checkbox choose-form">
+                                <label class="weui-cell weui-check__label yearly_label" for="yearly">
+                                    <div class="weui-cell__hd">
+                                        <input type="radio" class="weui-check yearly" name="time" value="year"
+                                               id="yearly" checked/>
+                                        <i class="weui-icon-checked"></i>
+                                    </div>
+                                    <div class="weui-cell__bd">
+                                        <p>按年订阅</p>
+                                    </div>
+                                </label>
+                                <div class="number_box" id="number_box_year" style="border: 0;">
+                                    <span class="year_number j-button-select" data-id="1">1年</span>
+                                    <span class="year_number j-button-select" data-id="2">2年</span>
+                                    <span class="year_number j-button-select" data-id="3">3年</span>
                                 </div>
-                            </label>
-                            <div class="number_box" id="number_box_month" data-numbox-step="1" data-numbox-min="1"
-                                 data-numbox-max="12">
-                                <button class="weui-btn weui-btn_plain-default" type="button" disabled>
-                                    <div class="jy_icon decrease"></div>
-                                </button>
-                                <span class="month_number">1</span>
-                                <button class="weui-btn weui-btn_plain-default add" type="button">
-                                    <div class="jy_icon increase"></div>
-                                </button>
                             </div>
                         </div>
+                    </div>
+                    <div class="form-btn j-footer">
+                        <button class="btn enter j-button" id="enter_period">确认</button>
+                    </div>
+                </div>
+            </div>
+            <!-- 选择支付方式 -->
+            <div class="js_dialog pay_way" id="pay_way" style="display: none;">
+                <div class="weui-mask"></div>
+                <div class="box">
+                    <div class="box_hd">
+                        <span></span>
+                        <h3>支付方式</h3>
+                        <span class="cancel">取消</span>
+                    </div>
+                    <div class="box_bd">
                         <div class="weui-cells weui-cells_checkbox choose-form">
-                            <label class="weui-cell weui-check__label yearly_label" for="yearly">
+                            <label class="weui-cell weui-check__label wx_label" for="wx">
+                                <div class="weui-cell__bd read">
+                                    <p><img src="/vipsubscribe/image/weixin.png?v={{Msg "seo" "version"}}">微信支付</p>
+                                </div>
                                 <div class="weui-cell__hd">
-                                    <input type="radio" class="weui-check yearly" name="time" value="year"
-                                           id="yearly" checked/>
+                                    <input type="radio" class="weui-check" name="way" value="微信支付" id="wx" checked/>
                                     <i class="weui-icon-checked"></i>
                                 </div>
-                                <div class="weui-cell__bd">
-                                    <p>按年订阅</p>
+                            </label>
+                            <label class="weui-cell weui-check__label zfb_label" for="zfb">
+                                <div class="weui-cell__bd read">
+                                    <p><img src="/vipsubscribe/image/zhifubao.png?v={{Msg "seo" "version"}}">支付宝支付</p>
+                                </div>
+                                <div class="weui-cell__hd">
+                                    <input type="radio" class="weui-check" name="way" value="支付宝支付" id="zfb"/>
+                                    <i class="weui-icon-checked"></i>
                                 </div>
                             </label>
-                            <div class="number_box" id="number_box_year" style="border: 0;">
-                                <span class="year_number j-button-select" data-id="1">1年</span>
-                                <span class="year_number j-button-select" data-id="2">2年</span>
-                                <span class="year_number j-button-select" data-id="3">3年</span>
-                            </div>
                         </div>
                     </div>
                 </div>
-                <div class="form-btn j-footer">
-                    <button class="btn enter j-button" id="enter_period">确认</button>
-                </div>
             </div>
-        </div>
-        <!-- 选择支付方式 -->
-        <div class="js_dialog pay_way" id="pay_way" style="display: none;">
-            <div class="weui-mask"></div>
-            <div class="box">
-                <div class="box_hd">
-                    <span></span>
-                    <h3>支付方式</h3>
-                    <span class="cancel">取消</span>
-                </div>
-                <div class="box_bd">
-                    <div class="weui-cells weui-cells_checkbox choose-form">
-                        <label class="weui-cell weui-check__label wx_label" for="wx">
-                            <div class="weui-cell__bd read">
-                                <p><img src="/vipsubscribe/image/weixin.png?v={{Msg "seo" "version"}}">微信支付</p>
-                            </div>
-                            <div class="weui-cell__hd">
-                                <input type="radio" class="weui-check" name="way" value="微信支付" id="wx" checked/>
-                                <i class="weui-icon-checked"></i>
-                            </div>
-                        </label>
-                        <label class="weui-cell weui-check__label zfb_label" for="zfb">
-                            <div class="weui-cell__bd read">
-                                <p><img src="/vipsubscribe/image/zhifubao.png?v={{Msg "seo" "version"}}">支付宝支付</p>
-                            </div>
-                            <div class="weui-cell__hd">
-                                <input type="radio" class="weui-check" name="way" value="支付宝支付" id="zfb"/>
-                                <i class="weui-icon-checked"></i>
-                            </div>
-                        </label>
-                    </div>
-                </div>
-            </div>
-        </div>
-        <!-- 优惠码弹窗 -->
-        <div class="j-picker adaption coupon-picker">
-            <div class="weui-mask weui-animate-fade-in"></div>
-            <div class="weui-half-screen-dialog weui-picker weui-animate-slide-up">
-                <div class="weui-half-screen-dialog__hd">
-                    <div class="weui-half-screen-dialog__hd__main">
-                        <strong class="weui-half-screen-dialog__title">优惠码</strong>
+            <!-- 优惠码弹窗 -->
+            <div class="j-picker adaption coupon-picker">
+                <div class="weui-mask weui-animate-fade-in"></div>
+                <div class="weui-half-screen-dialog weui-picker weui-animate-slide-up">
+                    <div class="weui-half-screen-dialog__hd">
+                        <div class="weui-half-screen-dialog__hd__main">
+                            <strong class="weui-half-screen-dialog__title">优惠码</strong>
+                        </div>
+                        <span class="j-icon icon-del-grey cancel"></span>
                     </div>
-                    <span class="j-icon icon-del-grey cancel"></span>
-                </div>
-                <div class="weui-half-screen-dialog__bd">
-                    <div class="weui-picker__bd">
-                        <div class="weui-picker__group">
-                            <input type="text" class="weui-input" maxlength="9" placeholder="输入优惠码,即可赠送30天订阅周期">
+                    <div class="weui-half-screen-dialog__bd">
+                        <div class="weui-picker__bd">
+                            <div class="weui-picker__group">
+                                <input type="text" class="weui-input" maxlength="9" placeholder="输入优惠码,即可赠送30天订阅周期">
+                            </div>
                         </div>
                     </div>
-                </div>
-                <div class="weui-half-screen-dialog__ft">
-                  <button disabled class="weui-btn weui-btn_primary weui-picker__btn"
-                  data-action="select">确定</button>
+                    <div class="weui-half-screen-dialog__ft">
+                        <button disabled class="weui-btn weui-btn_primary weui-picker__btn"
+                                data-action="select">确定
+                        </button>
+                    </div>
                 </div>
             </div>
         </div>
-    </div>
-    <script src="/vipsubscribe/js/jquery-2.1.4.js?v={{Msg "seo" "version"}}"></script>
-    <script src="/vipsubscribe/js/weui.min.js?v={{Msg "seo" "version"}}"></script>
-    <script src="/vipsubscribe/js/common.js?v={{Msg "seo" "version"}}"></script>
-    {{include "/common/weixin.html"}}
-    <script>
-        $(window).bind("pageshow", function (event) {
-            if (event.originalEvent.persisted) {
-                window.location.reload();
-            }
-        });
-		var live20200707 = {
-			startTime: {{.T.liveActiveStartTime}},
-			endTime: {{.T.liveActiveEndTime}},
-		    activeDiscount: {{.T.activeDiscount}}
-		}
-        //微信支付start
-        {{if not .T.isTrial }}
-        try {
-            var signature = {{.T.signature}};
-            var isConfigSuccess = true;
-            var id = {{.T._id}}
-            if (signature && signature.length == 4) {
-                wx.config({
-                    debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
-                    appId: signature[0], // 必填,公众号的唯一标识
-                    timestamp: signature[1], // 必填,生成签名的时间戳
-                    nonceStr: signature[2], // 必填,生成签名的随机串
-                    signature: signature[3],// 必填,签名,见附录1
-                    jsApiList: ['chooseWXPay', 'hideAllNonBaseMenuItem'] // 必填,需要使用的JS接口列表,所有JS接口列表见附录2
-                });
-                wx.ready(function () {
-                    if (!isConfigSuccess) {
-                        return;
-                    }
-                    wx.hideAllNonBaseMenuItem();
-                });
-                wx.error(function (res) {
-                    //config信息验证失败会执行error函数,如签名过期导致验证失败,具体错误信息可以打开config的debug模式查看,也可以在返回的res参数中查看,对于SPA可以在这里更新签名。
-                    //alert(res);
-                    isConfigSuccess = false;
-                });
+        <script src="/vipsubscribe/js/jquery-2.1.4.js?v={{Msg "seo" "version"}}"></script>
+        <script src="/vipsubscribe/js/weui.min.js?v={{Msg "seo" "version"}}"></script>
+        <script src="/vipsubscribe/js/common.js?v={{Msg "seo" "version"}}"></script>
+        {{include "/common/weixin.html"}}
+        <script>
+            $(window).bind("pageshow", function (event) {
+                if (event.originalEvent.persisted) {
+                    window.location.reload();
+                }
+            });
+            var live20200707 = {
+                startTime: {{.T.liveActiveStartTime}},
+                endTime: {{.T.liveActiveEndTime}},
+                activeDiscount: {{.T.activeDiscount}}
             }
+            //微信支付start
+            {{if not .T.isTrial }}
+            sessionStorage.removeItem("vipSubisTrial");//非试用界面
+            {{else}}
+            sessionStorage.setItem("vipSubisTrial", "1");//试用界面
+            //试用用户
+            {{end}}
+            var isUsedActiveCode = false;
+            var purchase = {
+                areaSelect: {"一个省": ["一个市"]},//已选择地区 {"一个省":["一个市"]}计算价格临时变量
+                industrySelect: ["一个行业"],// 已选择行业 一个行业(计算价格临时变量)
+                timeSelect: [1, 2],//已选择时间 timeSelect[0]时长  timeSelect[1] 1:年 2:月
+                price: {}, //价格
+                nowBuyset: {},
+                vipSubisTrial: false,
+                initData: function () {
+                    //已选择
+                    try {
+                        if (sessionStorage.getItem("vipSubSelectArea")) {
+                            this.areaSelect = JSON.parse(sessionStorage.getItem("vipSubSelectArea"));
+                        }
+                        if (sessionStorage.getItem("vipSubSelectIndustry")) {
+                            this.industrySelect = JSON.parse(sessionStorage.getItem("vipSubSelectIndustry"));
+                        }
+                        if (sessionStorage.getItem("isUsedActiveCode")) {
+                            isUsedActiveCode = true;
+                        }
+                        if (sessionStorage.liveActiveCode_purchase === "jianyu360") {
+                            $('.coupon-code-tx .info').text("支付成功赠送30天订阅周期");
+                            $('.coupon-picker .weui-input').val("jianyu360");
+                            $('.coupon-code-tx').off('click');
+                        }
+                        {{if eq .T.orderType 5 }}
+                        $('#payHandle').text("立即续费");
+                        //即将到期 回显已购买
+                        if (!sessionStorage.getItem("vipSubSelectArea") || !sessionStorage.getItem("vipSubSelectIndustry")) {
+                            $DoPost("/subscribepay/vipsubscribe/getSubBuyMsg", {}, function (r) {
+                                if (r.success) {
+                                    if (!$.isEmptyObject(r.data.area)) {
+                                        purchase.areaSelect = r.data.area
+                                    } else {
+                                        purchase.areaSelect = {"全国": []}
+                                    }
+                                    if (r.data.industry.length != 0) {
+                                        purchase.industrySelect = r.data.industry
+                                    } else {
+                                        purchase.industrySelect = ["全部行业"]
+                                    }
+                                    sessionStorage.setItem("vipSubSelectArea", JSON.stringify(purchase.areaSelect));
+                                    sessionStorage.setItem("vipSubSelectIndustry", JSON.stringify(purchase.industrySelect));
+                                    if (r.data.isUsedActiveCode) {
+                                        isUsedActiveCode = true;
+                                        sessionStorage.setItem("isUsedActiveCode", true);
+                                    }
+                                }
+                            }, false)
+                        }
+                        {{end}}
+                        {{if .T.again}}    //再次购买回显
+                        {{if eq .T.again 1 }}
+                        var orderCode = getParam("orderCode")
+                        if (orderCode != "undefined") {
+                            if (!sessionStorage.getItem("vipSubSelectArea") || !sessionStorage.getItem("vipSubSelectIndustry")) {
+                                $DoPost("/subscribepay/orderListDetails/getVipOrderInfo", {"orderCode": orderCode}, function (r) {
+                                    if (!$.isEmptyObject(r.data.area)) {
+                                        purchase.areaSelect = r.data.area
+                                    } else {
+                                        purchase.areaSelect = {"全国": []}
+                                    }
+                                    if (r.data.industry.length != 0) {
+                                        purchase.industrySelect = r.data.industry
+                                    } else {
+                                        purchase.industrySelect = ["全部行业"]
+                                    }
+                                    //                          if (r.timeSelect!=undefined&&r.company!=undefined){
+                                    //                         		purchase.timeSelect=[r.timeSelect,r.company];
+                                    //                          }
+                                    $(".weui-icon-checked").click();
+                                    sessionStorage.setItem("vipSubSelectArea", JSON.stringify(purchase.areaSelect));
+                                    sessionStorage.setItem("vipSubSelectIndustry", JSON.stringify(purchase.industrySelect));
+                                    //sessionStorage.setItem("vipSubSelectTime", JSON.stringify(purchase.timeSelect));
+
+                                }, false)
+                            }
+                        }
+                        {{end}}
+                        {{end}}
+                        if (sessionStorage.getItem("vipSubSelectTime")) {
+                            this.timeSelect = JSON.parse(sessionStorage.getItem("vipSubSelectTime"));
+                        }
+                        //是否已经点击已读
+                        if (sessionStorage.getItem("vipSub_read") === "true") $("#buy").prop("checked", true);
+                        //是否试用界面
+                        if (sessionStorage.getItem("vipSubisTrial")) this.vipSubisTrial = true;
+
+                        //加载价格
+                        $DoPost("/subscribepay/vipsubscribe/getPrice", {}, function (r) {
+                            if (r) {
+                                purchase.price = r;
+                            }
+                        }, false)
 
-            //调用微信支付接口
-            function onBridgeReady(res, ordercode) {
-                WeixinJSBridge.invoke('getBrandWCPayRequest', {
-                        "appId": res["appId"],
-                        "timeStamp": res["timestamp"],
-                        "nonceStr": res["nonceStr"],
-                        "package": res["prepayId"],
-                        "signType": res["signType"],
-                        "paySign": res["sign"]
-                    },
-                    function (r) {
-                        if (r.err_msg == "get_brand_wcpay_request:ok") {
-                            setTimeout(function () {
-                                clearSessionStorage();
-                                window.location.replace("/front/vipsubscribe/toPaySuccessPage?orderCode=" + ordercode);
-                            }, 500)
-                        } else if (r.err_msg == "get_brand_wcpay_request:cancel") {
-                            console.log("支付已取消")
+                    } catch (e) {
+                        console.log(e)
+                    }
+                    this.nowBuyset = getBuySet(purchase.areaSelect, purchase.industrySelect, this.price);
+                },
+                showArea: function () {
+                    if (!$.isEmptyObject(this.areaSelect) && !this.areaSelect["一个省"]) { //有选择
+                        if (this.nowBuyset.areacount === -1) {
+                            $(".choose_area").val("全国");
                         } else {
-                            weui.toast("系统异常,请稍微再试", {
-                                duration: 2000,
-                                className: 'custom-toast',
+                            var tipTxt = "已选择 ";
+                            if (this.nowBuyset.areacount > 0) tipTxt += this.nowBuyset.areacount + " 个省";
+                            var count = 0;
+                            this.nowBuyset.citys.forEach(function (item, index) {
+                                count += item;
                             });
+                            if (count > 0) {
+                                if (this.nowBuyset.areacount > 0) tipTxt += "、";
+                                tipTxt += count + " 个市";
+                                if (this.nowBuyset.citys.length > 1) tipTxt += "(分布在" + this.nowBuyset.citys.length + "个省内)"
+                            }
+                            $(".choose_area").val(tipTxt);
+                        }
+                    } else {
+                        $(".choose_area").val("");
+                        //是否勾选已阅读
+                        if (sessionStorage.getItem("vipSub_read") === "true") {
+                            $(".area_warn").css("display", "");
                         }
-                    });
-            }
-
-            //微信支付end
-        } catch (e) {
-            console.log(e)
-        }
-        sessionStorage.removeItem("vipSubisTrial");//非试用界面
-        {{else}}
-        sessionStorage.setItem("vipSubisTrial", "1");//试用界面
-        //试用用户
-        {{end}}
-		var isUsedActiveCode = false;
-        var purchase = {
-            areaSelect: {"一个省": ["一个市"]},//已选择地区 {"一个省":["一个市"]}计算价格临时变量
-            industrySelect: ["一个行业"],// 已选择行业 一个行业(计算价格临时变量)
-            timeSelect: [1, 2],//已选择时间 timeSelect[0]时长  timeSelect[1] 1:年 2:月
-            price: {}, //价格
-            nowBuyset: {},
-            vipSubisTrial: false,
-            initData: function () {
-                //已选择
-                try {
-                    if (sessionStorage.getItem("vipSubSelectArea")) {
-                        this.areaSelect = JSON.parse(sessionStorage.getItem("vipSubSelectArea"));
-                    }
-                    if (sessionStorage.getItem("vipSubSelectIndustry")) {
-                        this.industrySelect = JSON.parse(sessionStorage.getItem("vipSubSelectIndustry"));
                     }
-					if (sessionStorage.getItem("isUsedActiveCode")){
-						isUsedActiveCode = true;
-					}
-					if (sessionStorage.liveActiveCode_purchase === "jianyu360"){
-						$('.coupon-code-tx .info').text("支付成功赠送30天订阅周期");
-						$('.coupon-picker .weui-input').val("jianyu360");
-						$('.coupon-code-tx').off('click');
-					}
-                    {{if eq .T.orderType 5 }}
-                    $('#payHandle').text("立即续费");
-                    //即将到期 回显已购买
-                    if (!sessionStorage.getItem("vipSubSelectArea") || !sessionStorage.getItem("vipSubSelectIndustry")) {
-                        $DoPost("/subscribepay/vipsubscribe/getSubBuyMsg", {}, function (r) {
-                            if (r.success) {
-                                if (!$.isEmptyObject(r.data.area)) {
-                                    purchase.areaSelect = r.data.area
-                                } else {
-                                    purchase.areaSelect = {"全国": []}
-                                }
-                                if (r.data.industry.length != 0) {
-                                    purchase.industrySelect = r.data.industry
-                                } else {
-                                    purchase.industrySelect = ["全部行业"]
-                                }
-                                sessionStorage.setItem("vipSubSelectArea", JSON.stringify(purchase.areaSelect));
-                                sessionStorage.setItem("vipSubSelectIndustry", JSON.stringify(purchase.industrySelect));
-								if (r.data.isUsedActiveCode){
-									isUsedActiveCode = true;
-									sessionStorage.setItem("isUsedActiveCode", true);
-								}
-							}
-                        }, false)
+                },
+                showPrice: function () {
+                    $('.monthly span:eq(0)').text(purchase.price.month.oneCity_oneBuyerClass / 100);
+                    $('.monthly span:eq(1)').text(purchase.price.month.oneCity_allBuyerClass / 100);
+                    $('.monthly span:eq(2)').text(purchase.price.month.oneProvince_oneBuyerClass / 100);
+                    $('.monthly span:eq(3)').text(purchase.price.month.oneProvince_allBuyerClass / 100);
+                    $('.monthly span:eq(4)').text(purchase.price.month.allProvince_oneBuyerClass / 100);
+                    $('.monthly span:eq(5)').text(purchase.price.month.allProvince_allBuyerClass / 100);
+
+                    $('.yearly span:eq(0)').text(purchase.price.year.oneCity_oneBuyerClass / 100);
+                    $('.yearly span:eq(1)').text(purchase.price.year.oneCity_allBuyerClass / 100);
+                    $('.yearly span:eq(2)').text(purchase.price.year.oneProvince_oneBuyerClass / 100);
+                    $('.yearly span:eq(3)').text(purchase.price.year.oneProvince_allBuyerClass / 100);
+                    $('.yearly span:eq(4)').text(purchase.price.year.allProvince_oneBuyerClass / 100);
+                    $('.yearly span:eq(5)').text(purchase.price.year.allProvince_allBuyerClass / 100);
+                },
+                showIndustry: function () {
+                    if (this.industrySelect.length > 0 && this.industrySelect[0] != "一个行业") { //选择有行业信息
+                        if (this.nowBuyset.buyerclasscount == -1) {
+                            $(".choose_industry").val("全部行业");
+                        } else {
+                            var tipTxt = "已选择 ";
+                            $(".choose_industry").val(tipTxt + this.nowBuyset.buyerclasscount + " 个行业");
+                        }
+                    } else {
+                        $(".choose_industry").val("");
+                        //是否勾选已阅读
+                        if (sessionStorage.getItem("vipSub_read") === "true") {
+                            $(".industry_warn").css("display", "");
+                        }
                     }
-                    {{end}}
-                    {{if .T.again}}    //再次购买回显
-                    {{if eq .T.again 1 }}
-                    var orderCode = getParam("orderCode")
-					if(orderCode!="undefined"){
-	                    if (!sessionStorage.getItem("vipSubSelectArea") || !sessionStorage.getItem("vipSubSelectIndustry")) {
-	                        $DoPost("/subscribepay/orderListDetails/getVipOrderInfo", {"orderCode": orderCode}, function (r) {
-	                            if (!$.isEmptyObject(r.data.area)) {
-	                                purchase.areaSelect = r.data.area
-	                            } else {
-	                                purchase.areaSelect = {"全国": []}
-	                            }
-	                            if (r.data.industry.length != 0) {
-	                                purchase.industrySelect = r.data.industry
-	                            } else {
-	                                purchase.industrySelect = ["全部行业"]
-	                            }
-	//                          if (r.timeSelect!=undefined&&r.company!=undefined){
-	//                         		purchase.timeSelect=[r.timeSelect,r.company];
-	//                          }
-	                            $(".weui-icon-checked").click();
-	                            sessionStorage.setItem("vipSubSelectArea", JSON.stringify(purchase.areaSelect));
-	                            sessionStorage.setItem("vipSubSelectIndustry", JSON.stringify(purchase.industrySelect));
-	                            //sessionStorage.setItem("vipSubSelectTime", JSON.stringify(purchase.timeSelect));
-
-	                        }, false)
-	                    }
-					}
-                    {{end}}
-                    {{end}}
-                    if (sessionStorage.getItem("vipSubSelectTime")) {
-                        this.timeSelect = JSON.parse(sessionStorage.getItem("vipSubSelectTime"));
+                },
+                showTime: function () {
+                    var tmp = this.timeSelect[0];
+                    if (this.timeSelect[1] == 1) {
+                        tmp += "年";
+                        $("#yearly").prop('checked', true);
+                        $('.year_number:eq(' + (this.timeSelect[0] - 1) + ')').addClass("active");
+                        //$(".number_box:eq(1)").addClass("active");
+                    } else {
+                        tmp += "个月";
+                        $("#monthly").prop('checked', true);
+                        $(".number_box:eq(0)").addClass("active");
+                        $("#number_box_month .month_number").text(this.timeSelect[0]);
+                        /*if (this.timeSelect[0] >= 10) {
+                            $('.profit_tips').text("已选择" + this.timeSelect[0] + "个月,建议“按年订阅”").show();
+                        }*/
+                        if (this.timeSelect[0] == 1) {
+                            $('#number_box_month button:eq(0)').attr("disabled", "disabled");
+                        } else {
+                            $('#number_box_month button:eq(0)').removeAttr("disabled");
+                        }
                     }
-                    //是否已经点击已读
-                    if (sessionStorage.getItem("vipSub_read") === "true") $("#buy").prop("checked", true);
-                    //是否试用界面
-                    if (sessionStorage.getItem("vipSubisTrial")) this.vipSubisTrial = true;
-
-                    //加载价格
-                    $DoPost("/subscribepay/vipsubscribe/getPrice", {}, function (r) {
-                        if (r) {
-                            purchase.price = r;
+                    $(".choose_item .show_time").text(tmp);
+                    $(".info.choose_time").val(tmp);
+                },
+                flushPrice: function (time, flag) {
+                    if (this.vipSubisTrial) {
+                        $('.price strong').text('0.00');
+                    } else {
+                        var price = getsubVipOrderPriceBybuyset(this.nowBuyset, time);
+                        //var price = getsubVipOrderPrice(this.areaSelect, this.industrySelect, time, this.price);
+                        var showPrice = formatMoney(price);
+                        var nowTime = new Date().getTime();
+                        var startTime = live20200707.startTime;
+                        var endTime = live20200707.endTime;
+                        var activeDiscount = parseFloat(live20200707.activeDiscount);
+                        var startTimes = parseInt(startTime) * 1000;
+                        var endTimes = parseInt(endTime) * 1000;
+                        var buyCount = {{.T.buyCount}};
+                        if (nowTime >= startTimes && nowTime < endTimes) {
+                            if (flag !== 2) {
+                                $(".price-num").text(showPrice);
+                                var activePrice = formatMoney(parseFloat(price) - parseFloat(price) * activeDiscount);
+                                $(".reduce-price").text(formatMoney(activePrice));
+                            }
+                            showPrice = formatMoney(parseFloat(price) * activeDiscount);
+                            $(".bought-num").text(buyCount);
+                        }
+                        if (flag === 1) {
+                            $('.price strong').text(showPrice);
+                        } else if (flag === 2) {
+                            $('.computed_price').html(showPrice);
+                        } else {
+                            $('.price strong').text(showPrice);
+                            $('.computed_price').html(showPrice);
                         }
-                    }, false)
 
-                } catch (e) {
-                    console.log(e)
+                    }
                 }
-                this.nowBuyset = getBuySet(purchase.areaSelect, purchase.industrySelect,this.price);
-            },
-            showArea: function () {
-                if (!$.isEmptyObject(this.areaSelect)&&!this.areaSelect["一个省"]) { //有选择
-                    if (this.nowBuyset.areacount === -1) {
-                        $(".choose_area").val("全国");
+            };
+
+
+            $(function () {
+                purchase.initData();
+                purchase.showArea();
+                purchase.showIndustry();
+                purchase.showPrice();
+                purchase.showTime();
+                purchase.flushPrice(purchase.timeSelect);
+                checkOk();
+                var time_limit;//定义一个周期变量
+                /*------ 关闭弹窗事件  点击取消或遮罩层 -----*/
+                $('.weui-mask').click(hideDialog);
+                $('.cancel').click(hideDialog);
+
+                /* -----  订阅周期、支付方式弹窗弹出事件 -------*/
+                // 选择订阅周期
+                $('.select_cycle a').click(function (e) {
+                    $('#time_cycle').show(200);
+                });
+
+
+                /* -----  选择完支付方式、订阅周期 回显到页面 -------*/
+                // 对支付方式选择的input绑定点击事件
+                $('#pay_way input:radio[name="way"]').click(function () {
+                    var checkValue = $('input:radio[name="way"]:checked').val();
+                    $('.pay_way').hide(200);
+                    $('.pay_mode .select_payment .choose_way.info').html(checkValue);
+                });
+                // 对订阅时间选择的input绑定点击事件
+                $('#time_cycle input:radio[name="time"]').on('click', function (e) {
+                    // 解除确认按钮的锁定
+                    $('#time_cycle .form-btn button').removeAttr('disabled');
+                    if ($(e.target).hasClass('monthly')) {
+                        // 按月订阅
+                        $('#number_box_month').addClass('active');
+                        $('#number_box_year span').removeClass('active');
                     } else {
-                        var tipTxt = "已选择 ";
-                        if (this.nowBuyset.areacount > 0) tipTxt += this.nowBuyset.areacount + " 个省";
-                        var count = 0;
-                        this.nowBuyset.citys.forEach(function (item, index) {
-                            count += item;
-                        });
-                        if (count > 0) {
-                            if (this.nowBuyset.areacount > 0) tipTxt += "、";
-                            tipTxt += count + " 个市";
-                            if(this.nowBuyset.citys.length>1) tipTxt += "(分布在" + this.nowBuyset.citys.length + "个省内)"
-                        }
-                        $(".choose_area").val(tipTxt);
+                        // 按年订阅
+                        $('#number_box_month').removeClass('active');
+                        // $('#number_box_year span:eq(0)').addClass('active').siblings().removeClass('active');
                     }
-                } else {
-                    $(".choose_area").val("");
-                    //是否勾选已阅读
-                    if (sessionStorage.getItem("vipSub_read") === "true") {
-                        $(".area_warn").css("display", "");
+                });
+
+                /* --------控制月份number_box的事件  点击加减号触发的事件------- */
+                $('#number_box_month').on('click', 'button', function (e) {
+                    // 点击加减号让input radio选中
+                    $('#monthly').prop('checked', true);
+                    $('#yearly').prop('checked', false);
+                    $('.number_box span').removeClass('active');
+                    $('#number_box_month').addClass('active');
+
+                    var $number = $('#number_box_month span.month_number');
+                    var $monthlyInput = $('#monthly');
+                    // 未整理的data数组,里面的值都是字符串
+                    var preData = e.delegateTarget.dataset;
+                    var currentNum = parseInt($number.text());
+                    var data = {};
+                    // 把字符串转换成数字
+                    for (var i in preData) {
+                        data[i] = preData[i] - 0
                     }
-                }
-            },
-            showPrice: function () {
-                $('.monthly span:eq(0)').text(purchase.price.month.oneCity_oneBuyerClass / 100);
-                $('.monthly span:eq(1)').text(purchase.price.month.oneCity_allBuyerClass / 100);
-                $('.monthly span:eq(2)').text(purchase.price.month.oneProvince_oneBuyerClass / 100);
-                $('.monthly span:eq(3)').text(purchase.price.month.oneProvince_allBuyerClass / 100);
-                $('.monthly span:eq(4)').text(purchase.price.month.allProvince_oneBuyerClass / 100);
-                $('.monthly span:eq(5)').text(purchase.price.month.allProvince_allBuyerClass / 100);
-
-                $('.yearly span:eq(0)').text(purchase.price.year.oneCity_oneBuyerClass / 100);
-                $('.yearly span:eq(1)').text(purchase.price.year.oneCity_allBuyerClass / 100);
-                $('.yearly span:eq(2)').text(purchase.price.year.oneProvince_oneBuyerClass / 100);
-                $('.yearly span:eq(3)').text(purchase.price.year.oneProvince_allBuyerClass / 100);
-                $('.yearly span:eq(4)').text(purchase.price.year.allProvince_oneBuyerClass / 100);
-                $('.yearly span:eq(5)').text(purchase.price.year.allProvince_allBuyerClass / 100);
-            },
-            showIndustry: function () {
-                if (this.industrySelect.length > 0 && this.industrySelect[0] != "一个行业") { //选择有行业信息
-                    if(this.nowBuyset.buyerclasscount==-1){
-                        $(".choose_industry").val("全部行业");
-                    }else{
-                        var tipTxt = "已选择 ";
-                        $(".choose_industry").val(tipTxt + this.nowBuyset.buyerclasscount + " 个行业");
+
+                    if (!$monthlyInput.prop('checked')) {
+                        return
                     }
-                } else {
-                    $(".choose_industry").val("");
-                    //是否勾选已阅读
-                    if (sessionStorage.getItem("vipSub_read") === "true") {
-                        $(".industry_warn").css("display", "");
+                    // 判断是点击的是+ 还是-
+                    if ($(e.target).hasClass('add') || $(e.currentTarget).hasClass('add')) {
+                        if (currentNum == 11) { //12个月自动跳转1年
+                            $("#number_box_year .year_number:eq(0)").trigger("click");
+                            return
+                        }
+                        // 点的+
+                        // currentNum = currentNum >= 12 ? 12 : currentNum + 1;
+                        currentNum = currentNum >= data.numboxMax ? data.numboxMax : (currentNum + data
+                            .numboxStep);
+                    } else {
+                        // 点的-
+                        // currentNum = currentNum <= 1 ? 1 : currentNum - 1;
+                        currentNum = currentNum <= data.numboxMin ? data.numboxMin : (currentNum - data
+                            .numboxStep);
                     }
-                }
-            },
-            showTime: function () {
-                var tmp = this.timeSelect[0];
-                if (this.timeSelect[1] == 1) {
-                    tmp += "年";
-                    $("#yearly").prop('checked', true);
-                    $('.year_number:eq(' + (this.timeSelect[0] - 1) + ')').addClass("active");
-                    //$(".number_box:eq(1)").addClass("active");
-                } else {
-                    tmp += "个月";
-                    $("#monthly").prop('checked', true);
-                    $(".number_box:eq(0)").addClass("active");
-                    $("#number_box_month .month_number").text(this.timeSelect[0]);
-                    /*if (this.timeSelect[0] >= 10) {
-                        $('.profit_tips').text("已选择" + this.timeSelect[0] + "个月,建议“按年订阅”").show();
+                    $number.text(currentNum);
+                    purchase.timeSelect_tmp = [Number(currentNum), 2];
+                    purchase.flushPrice(purchase.timeSelect_tmp, 2);
+                    //var price = (5.8 * currentNum).toFixed(1);
+                    //$('.computed_price').html(price)
+                    var firstButton = $('#number_box_month button:first');
+                    var lastButton = $('#number_box_month button:last');
+                    /*if (currentNum >= 10) {
+                        $('.profit_tips').text("已选择" + currentNum + "个月,建议“按年订阅”").show();
+                    } else {
+                        $('.profit_tips').hide();
                     }*/
-                    if (this.timeSelect[0] == 1) {
-                        $('#number_box_month button:eq(0)').attr("disabled", "disabled");
+                    // 如果为操作后的结果为1,则锁定减号按钮
+                    if (currentNum === data.numboxMin) {
+                        firstButton.attr('disabled', true)
                     } else {
-                        $('#number_box_month button:eq(0)').removeAttr("disabled");
+                        firstButton.removeAttr('disabled')
                     }
-                }
-                $(".choose_item .show_time").text(tmp);
-                $(".info.choose_time").val(tmp);
-            },
-            flushPrice: function (time, flag) {
-                if (this.vipSubisTrial) {
-                    $('.price strong').text('0.00');
-                } else {
-                    var price=getsubVipOrderPriceBybuyset(this.nowBuyset,time);
-                    //var price = getsubVipOrderPrice(this.areaSelect, this.industrySelect, time, this.price);
-                    var showPrice = formatMoney(price);
-					var nowTime = new Date().getTime();
-					var startTime = live20200707.startTime;
-					var endTime = live20200707.endTime;
-                    var activeDiscount = parseFloat(live20200707.activeDiscount);
-					var startTimes = parseInt(startTime)* 1000;
-					var endTimes = parseInt(endTime)* 1000;
-					var buyCount = {{.T.buyCount}};
-					if (nowTime >= startTimes && nowTime < endTimes) {
-                        if (flag !== 2) {
-                            $(".price-num").text(showPrice);
-                            var activePrice = formatMoney(parseFloat(price) - parseFloat(price) * activeDiscount);
-                            $(".reduce-price").text(formatMoney(activePrice));
-                        }
-						showPrice = formatMoney(parseFloat(price) * activeDiscount);
-						$(".bought-num").text(buyCount);
-					}
-                    if (flag === 1) {
-                        $('.price strong').text(showPrice);
-                    } else if (flag === 2) {
-                        $('.computed_price').html(showPrice);
+                    // 如果为操作后的结果为12,则锁定加号按钮
+                    if (currentNum === data.numboxMax) {
+                        lastButton.attr('disabled', true)
                     } else {
-                        $('.price strong').text(showPrice);
-                        $('.computed_price').html(showPrice);
+                        lastButton.removeAttr('disabled')
                     }
+                });
 
-                }
-            }
-        };
-
-
-        $(function () {
-            purchase.initData();
-            purchase.showArea();
-            purchase.showIndustry();
-            purchase.showPrice();
-            purchase.showTime();
-            purchase.flushPrice(purchase.timeSelect);
-            checkOk();
-            var time_limit;//定义一个周期变量
-            /*------ 关闭弹窗事件  点击取消或遮罩层 -----*/
-            $('.weui-mask').click(hideDialog);
-            $('.cancel').click(hideDialog);
-
-            /* -----  订阅周期、支付方式弹窗弹出事件 -------*/
-            // 选择订阅周期
-            $('.select_cycle a').click(function (e) {
-                $('#time_cycle').show(200);
-            });
-
-
-            /* -----  选择完支付方式、订阅周期 回显到页面 -------*/
-            // 对支付方式选择的input绑定点击事件
-            $('#pay_way input:radio[name="way"]').click(function () {
-                var checkValue = $('input:radio[name="way"]:checked').val();
-                $('.pay_way').hide(200);
-                $('.pay_mode .select_payment .choose_way.info').html(checkValue);
-            });
-            // 对订阅时间选择的input绑定点击事件
-            $('#time_cycle input:radio[name="time"]').on('click', function (e) {
-                // 解除确认按钮的锁定
-                $('#time_cycle .form-btn button').removeAttr('disabled');
-                if ($(e.target).hasClass('monthly')) {
-                    // 按月订阅
-                    $('#number_box_month').addClass('active');
-                    $('#number_box_year span').removeClass('active');
-                } else {
-                    // 按年订阅
+                /* -------- 控制年份number_box的事件  点击1年 2年 3年触发的事件------- */
+                $('#number_box_year').on('click', 'span', function (e) {
+                    console.log(e.target.dataset.id);
                     $('#number_box_month').removeClass('active');
-                    // $('#number_box_year span:eq(0)').addClass('active').siblings().removeClass('active');
-                }
-            });
+                    var id = e.target.dataset.id;
+                    //$('.profit_tips').hide();
+                    $(this).addClass('active').siblings().removeClass('active');
+                    $('#yearly').prop('checked', true);
+                    $("#monthly").prop('checked', false);
+
+                    // 渲染结果 保留一位小数
+                    //var result = (Number(id) * 58).toFixed(1);
+                    //$('.computed_price').html(result)
+                    purchase.timeSelect_tmp = [Number(id), 1]
+                    purchase.flushPrice(purchase.timeSelect_tmp, 2);
+                });
 
-            /* --------控制月份number_box的事件  点击加减号触发的事件------- */
-            $('#number_box_month').on('click', 'button', function (e) {
-                // 点击加减号让input radio选中
-                $('#monthly').prop('checked', true);
-                $('#yearly').prop('checked', false);
-                $('.number_box span').removeClass('active');
-                $('#number_box_month').addClass('active');
-
-                var $number = $('#number_box_month span.month_number');
-                var $monthlyInput = $('#monthly');
-                // 未整理的data数组,里面的值都是字符串
-                var preData = e.delegateTarget.dataset;
-                var currentNum = parseInt($number.text());
-                var data = {};
-                // 把字符串转换成数字
-                for (var i in preData) {
-                    data[i] = preData[i] - 0
-                }
+                /* -------- 选择按月订阅  radio触发的事件------- */
+                $('#monthly').on('change', function (e) {
+                    var isChecked = $(this).is(':checked');
+                    var val = $('.month_number').text();
+                    /*if (val >= 10) {
+                        $('.profit_tips').show()
+                    }*/
+                    if (!isChecked) {
+                        $('#number_box_month button').attr('disabled', true)
+                    }
+                    //var result = (Number(val) * 5.8).toFixed(1);
+                    //$('.computed_price').html(result);
+                    purchase.timeSelect_tmp = [Number(val), 2];
+                    purchase.flushPrice(purchase.timeSelect_tmp, 2);
 
-                if (!$monthlyInput.prop('checked')) {
-                    return
-                }
-                // 判断是点击的是+ 还是-
-                if ($(e.target).hasClass('add') || $(e.currentTarget).hasClass('add')) {
-                    if (currentNum == 11) { //12个月自动跳转1年
-                        $("#number_box_year .year_number:eq(0)").trigger("click");
-                        return
+                });
+                /* -------- 选择按年订阅  radio触发的事件------- */
+                $('#yearly').on('change', function (e) {
+                    //$('.profit_tips').hide();
+                    // console.log($(this).is(':checked'))
+                    var isChecked = $(this).is(':checked');
+                    // 按年订阅默认选择1年
+                    var val = 1;
+                    //$('.computed_price').html(Number(val) * 58)
+                    if (isChecked) {
+                        $('#number_box_year span:eq(0)').addClass('active').siblings().removeClass('active')
                     }
-                    // 点的+
-                    // currentNum = currentNum >= 12 ? 12 : currentNum + 1;
-                    currentNum = currentNum >= data.numboxMax ? data.numboxMax : (currentNum + data
-                        .numboxStep);
-                } else {
-                    // 点的-
-                    // currentNum = currentNum <= 1 ? 1 : currentNum - 1;
-                    currentNum = currentNum <= data.numboxMin ? data.numboxMin : (currentNum - data
-                        .numboxStep);
-                }
-                $number.text(currentNum);
-                purchase.timeSelect_tmp = [Number(currentNum), 2];
-                purchase.flushPrice(purchase.timeSelect_tmp, 2);
-                //var price = (5.8 * currentNum).toFixed(1);
-                //$('.computed_price').html(price)
-                var firstButton = $('#number_box_month button:first');
-                var lastButton = $('#number_box_month button:last');
-                /*if (currentNum >= 10) {
-                    $('.profit_tips').text("已选择" + currentNum + "个月,建议“按年订阅”").show();
-                } else {
-                    $('.profit_tips').hide();
-                }*/
-                // 如果为操作后的结果为1,则锁定减号按钮
-                if (currentNum === data.numboxMin) {
-                    firstButton.attr('disabled', true)
-                } else {
-                    firstButton.removeAttr('disabled')
-                }
-                // 如果为操作后的结果为12,则锁定加号按钮
-                if (currentNum === data.numboxMax) {
-                    lastButton.attr('disabled', true)
-                } else {
-                    lastButton.removeAttr('disabled')
-                }
-            });
+                    purchase.timeSelect_tmp = [Number(val), 1];
+                    purchase.flushPrice(purchase.timeSelect_tmp, 2);
+                });
 
-            /* -------- 控制年份number_box的事件  点击1年 2年 3年触发的事件------- */
-            $('#number_box_year').on('click', 'span', function (e) {
-                console.log(e.target.dataset.id);
-                $('#number_box_month').removeClass('active');
-                var id = e.target.dataset.id;
-                //$('.profit_tips').hide();
-                $(this).addClass('active').siblings().removeClass('active');
-                $('#yearly').prop('checked', true);
-                $("#monthly").prop('checked', false);
-
-                // 渲染结果 保留一位小数
-                //var result = (Number(id) * 58).toFixed(1);
-                //$('.computed_price').html(result)
-                purchase.timeSelect_tmp = [Number(id), 1]
-                purchase.flushPrice(purchase.timeSelect_tmp, 2);
-            });
+                // 确认订阅周期
+                $('#enter_period').on('click', function () {
+                    var val;
+                    $('input[name="time"]').each(function (i, v) {
+                        var isChecked = $(v).is(':checked');
+                        if ($(v).is(':checked') === true && $('.year_number').hasClass('active')) {
+                            val = $('.active').html();
+                            $('#time_cycle').hide(function () {
+                                $('.choose_time').val(val)
+                                $('.show_time').text(val);
+                            });
+                            purchase.timeSelect_tmp = [parseInt(val[0]), 1]
+                        } else if ($(v).is(':checked') === true) {
+                            val = $('.month_number').html();
+                            $('#time_cycle').hide(function () {
+                                $('.choose_time').val(val + '个月')
+                                $('.show_time').text(val + '个月');
+                            });
+                            purchase.timeSelect_tmp = [parseInt(val), 2]
+                        }
+                    });
+                    purchase.timeSelect = purchase.timeSelect_tmp;
+                    purchase.flushPrice(purchase.timeSelect, 1);
+                    sessionStorage.setItem("vipSubSelectTime", JSON.stringify(purchase.timeSelect));
+                });
+                $("input").bind("input propertychange change", function (event) {
+                    checkOk();
+                });
 
-            /* -------- 选择按月订阅  radio触发的事件------- */
-            $('#monthly').on('change', function (e) {
-                var isChecked = $(this).is(':checked');
-                var val = $('.month_number').text();
-                /*if (val >= 10) {
-                    $('.profit_tips').show()
-                }*/
-                if (!isChecked) {
-                    $('#number_box_month button').attr('disabled', true)
-                }
-                //var result = (Number(val) * 5.8).toFixed(1);
-                //$('.computed_price').html(result);
-                purchase.timeSelect_tmp = [Number(val), 2];
-                purchase.flushPrice(purchase.timeSelect_tmp, 2);
+                $('#payHandle').click(function () {
+                    $("#payHandle").attr("disabled", "disabled");
+                    //支付请求
+                    var area = purchase.areaSelect;
+                    var industry = purchase.industrySelect;
+                    if (area["全国"]) {
+                        area = {};
+                    }
+                    if (industry.length == 1 && industry[0] == "全部行业") {
+                        industry = [];
+                    }
+                    {{if not .T.isTrial}}
+                    //付费用户
+                    //优惠码
+                    var activeCode = $('.coupon-picker .weui-input').val();
+                    var activeCodes = "";
+                    if (activeCode.toLowerCase() === couponInfo.code && $('.coupon-code-tx .info').text() === couponInfo.successTip) {
+                        activeCodes = couponInfo.code;
+                    }
+                    var param = {
+                        "area": JSON.stringify(area),
+                        "industry": industry.join(","),
+                        "time": $(".info:eq(2)").val().trim(),
+                        "payWay": "wx_js",
+                        "orderType":{{.T.orderType}},
+                        "activeCode": activeCodes
+                    };
+                    $DoPost("/subscribepay/vipsubscribe/createOrder", param, function (r) {
+                        if (r.success) {
+                            //clearSessionStorage();
+                            window.location.href = "/weixin/pay/checkout_vip?orderCode=" + r.data.code
+                        }
+                        $("#payHandle").removeAttr("disabled")
+                    });
+                    {{else}}
+                    //试用用户
+                    $DoPost("/subscribepay/order/trialPay", {
+                        "area": JSON.stringify(area),
+                        "industry": industry.join(",")
+                    }, function (r) {
+                        if (r.success) {
+                            clearSessionStorage();
+                            $("#payHandle").attr("disabled", "disabled");
+                            window.location.replace("/front/vipsubscribe/toPaySuccessPage?orderCode=" + r.data.code);
+                        }
+                    });
+                    {{end}}
+                })
 
             });
-            /* -------- 选择按年订阅  radio触发的事件------- */
-            $('#yearly').on('change', function (e) {
-                //$('.profit_tips').hide();
-                // console.log($(this).is(':checked'))
-                var isChecked = $(this).is(':checked');
-                // 按年订阅默认选择1年
-                var val = 1;
-                //$('.computed_price').html(Number(val) * 58)
-                if (isChecked) {
-                    $('#number_box_year span:eq(0)').addClass('active').siblings().removeClass('active')
-                }
-                purchase.timeSelect_tmp = [Number(val), 1];
-                purchase.flushPrice(purchase.timeSelect_tmp, 2);
-            });
 
-            // 确认订阅周期
-            $('#enter_period').on('click', function () {
-                var val;
-                $('input[name="time"]').each(function (i, v) {
-                    var isChecked = $(v).is(':checked');
-                    if ($(v).is(':checked') === true && $('.year_number').hasClass('active')) {
-                        val = $('.active').html();
-                        $('#time_cycle').hide(function () {
-                            $('.choose_time').val(val)
-                            $('.show_time').text(val);
-                        });
-                        purchase.timeSelect_tmp = [parseInt(val[0]), 1]
-                    } else if ($(v).is(':checked') === true) {
-                        val = $('.month_number').html();
-                        $('#time_cycle').hide(function () {
-                            $('.choose_time').val(val + '个月')
-                            $('.show_time').text(val + '个月');
-                        });
-                        purchase.timeSelect_tmp = [parseInt(val), 2]
-                    }
-                });
-                purchase.timeSelect = purchase.timeSelect_tmp;
-                purchase.flushPrice(purchase.timeSelect, 1);
-                sessionStorage.setItem("vipSubSelectTime", JSON.stringify(purchase.timeSelect));
-            });
-            $("input").bind("input propertychange change", function (event) {
-                checkOk();
-            });
+            // 隐藏dialog选择框
+            function hideDialog() {
+                $('#pay_way').hide(200);
+                $('#time_cycle').hide(200);
+                $('.j-picker').hide();
+            }
 
-            $('#payHandle').click(function () {
-                $("#payHandle").attr("disabled", "disabled");
-                //支付请求
-                var area = purchase.areaSelect;
-                var industry = purchase.industrySelect;
-                if (area["全国"]) {
-                    area = {};
-                }
-                if (industry.length == 1 && industry[0] == "全部行业") {
-                    industry = [];
+            //是否可点击
+            function checkOk() {
+                var area = $(".info:eq(0)").val().trim();
+                var industry = $(".info:eq(1)").val().trim();
+                var checked = $('#buy').prop('checked');
+                if (area != '' && industry != '' && checked == true) {
+                    $("#payHandle").removeAttr('disabled');
+                } else {
+                    $("#payHandle").attr({
+                        'disabled': 'true'
+                    });
                 }
-                {{if not .T.isTrial}}
-                //付费用户
-				//优惠码
-				var activeCode = $('.coupon-picker .weui-input').val();
-				var activeCodes = "";
-				if (activeCode.toLowerCase() === couponInfo.code && $('.coupon-code-tx .info').text() === couponInfo.successTip){
-					activeCodes = couponInfo.code;
-				}
-                var param = {
-                    "area": JSON.stringify(area),
-                    "industry": industry.join(","),
-                    "time": $(".info:eq(2)").val().trim(),
-                    "payWay": "wx_js",
-                    "orderType":{{.T.orderType}},
-					"activeCode": activeCodes
-                };
-                $DoPost("/subscribepay/vipsubscribe/createOrder", param, function (r) {
-                    if (r.success) {
-                        onBridgeReady(JSON.parse(r.data.res), r.data.code);
+                if (checked) {
+                    if (area === '') {
+                        $(".area_warn").css("display", "block");
                     }
-                    $("#payHandle").removeAttr("disabled")
-                });
-                {{else}}
-                //试用用户
-                $DoPost("/subscribepay/order/trialPay", {
-                    "area": JSON.stringify(area),
-                    "industry": industry.join(",")
-                }, function (r) {
-                    if (r.success) {
-                        clearSessionStorage();
-                        $("#payHandle").attr("disabled", "disabled");
-                        window.location.replace("/front/vipsubscribe/toPaySuccessPage?orderCode=" + r.data.code);
+                    if (industry === "") {
+                        $(".industry_warn").css("display", "block");
                     }
-                });
-                {{end}}
-            })
+                }
+                // else {
+                //     $(".area_warn").css("display", "");
+                //     $(".industry_warn").css("display", "");
+                // }
+
+                sessionStorage.setItem("vipSub_read", checked)
 
-        });
-
-        // 隐藏dialog选择框
-        function hideDialog() {
-            $('#pay_way').hide(200);
-            $('#time_cycle').hide(200);
-            $('.j-picker').hide();
-        }
-
-        //是否可点击
-        function checkOk() {
-            var area = $(".info:eq(0)").val().trim();
-            var industry = $(".info:eq(1)").val().trim();
-            var checked = $('#buy').prop('checked');
-            if (area != '' && industry != '' && checked == true) {
-                $("#payHandle").removeAttr('disabled');
-            } else {
-                $("#payHandle").attr({
-                    'disabled': 'true'
-                });
             }
-            if (checked) {
-                if (area === '') {
-                    $(".area_warn").css("display", "block");
-                }
-                if (industry === "") {
-                    $(".industry_warn").css("display", "block");
-                }
+
+            function clearSessionStorage() {
+                sessionStorage.removeItem("vipSubSelectArea");
+                sessionStorage.removeItem("vipSubSelectIndustry");
+                sessionStorage.removeItem("vipSubSelectTime");
+                sessionStorage.removeItem("vipSub_read");
+                sessionStorage.removeItem("historypushDataCache");
+                sessionStorage.To_introducePage = 2;
+                //订阅首页
+                sessionStorage.removeItem("sub_vip_state");
+                sessionStorage.removeItem("vip_index_read");
+                sessionStorage.removeItem("vip_change_time");
+                sessionStorage.removeItem("liveActiveCode_purchase");
             }
-            // else {
-            //     $(".area_warn").css("display", "");
-            //     $(".industry_warn").css("display", "");
-            // }
-
-            sessionStorage.setItem("vipSub_read", checked)
-
-        }
-
-        function clearSessionStorage() {
-            sessionStorage.removeItem("vipSubSelectArea");
-            sessionStorage.removeItem("vipSubSelectIndustry");
-            sessionStorage.removeItem("vipSubSelectTime");
-            sessionStorage.removeItem("vipSub_read");
-            sessionStorage.removeItem("historypushDataCache");
-            sessionStorage.To_introducePage = 2;
-            //订阅首页
-            sessionStorage.removeItem("sub_vip_state");
-            sessionStorage.removeItem("vip_index_read");
-            sessionStorage.removeItem("vip_change_time");
-			sessionStorage.removeItem("liveActiveCode_purchase");
-        }
-
-        /******* 获取url参数(正则)********/
-        function getParam(name) {
-            var search = document.location.search;
-            // alert(search);
-            var pattern = new RegExp("[?&]" + name + "\=([^&]+)", "g");
-            var matcher = pattern.exec(search);
-            var items = null;
-            if (null != matcher) {
-                try {
-                    items = decodeURIComponent(decodeURIComponent(matcher[1]));
-                } catch (e) {
+
+            /******* 获取url参数(正则)********/
+            function getParam(name) {
+                var search = document.location.search;
+                // alert(search);
+                var pattern = new RegExp("[?&]" + name + "\=([^&]+)", "g");
+                var matcher = pattern.exec(search);
+                var items = null;
+                if (null != matcher) {
                     try {
-                        items = decodeURIComponent(matcher[1]);
+                        items = decodeURIComponent(decodeURIComponent(matcher[1]));
                     } catch (e) {
-                        items = matcher[1];
+                        try {
+                            items = decodeURIComponent(matcher[1]);
+                        } catch (e) {
+                            items = matcher[1];
+                        }
                     }
                 }
+                return items;
+            };
+
+            // 活动事件绑定
+            var couponInfo = {
+                code: 'jianyu360',
+                successTip: '支付成功赠送30天订阅周期'
             }
-            return items;
-        };
-
-        // 活动事件绑定
-        var couponInfo = {
-            code: 'jianyu360',
-            successTip: '支付成功赠送30天订阅周期'
-        }
-        $('.coupon-code-tx').on('click', function () {
-            if ($('.vip_purchase').hasClass('live-20200707')) {
-              $('.coupon-picker').show()
-            } else {
-              return
-            }
-            var input = $('.coupon-picker .weui-input')
-            var confirmButton = $('.coupon-picker .weui-picker__btn')
-            var cancelButton = $('.coupon-picker .cancel')
-            var value = input.val()
-            input.focus().on('input', function () {
-                value = this.value
-                confirmButton.prop('disabled', (value === '' || value === undefined))
+            $('.coupon-code-tx').on('click', function () {
+                if ($('.vip_purchase').hasClass('live-20200707')) {
+                    $('.coupon-picker').show()
+                } else {
+                    return
+                }
+                var input = $('.coupon-picker .weui-input')
+                var confirmButton = $('.coupon-picker .weui-picker__btn')
+                var cancelButton = $('.coupon-picker .cancel')
+                var value = input.val()
+                input.focus().on('input', function () {
+                    value = this.value
+                    confirmButton.prop('disabled', (value === '' || value === undefined))
+                })
+
+                confirmButton.on('click', function () {
+                    if (value.toLowerCase() !== couponInfo.code) {
+                        weui.toast('优惠码输入错误', {
+                            className: 'j-toast',
+                            duration: 1500
+                        })
+                        return
+                    }
+                    if (isUsedActiveCode) {
+                        weui.toast('每个用户仅可使用一次', {
+                            className: 'j-toast',
+                            duration: 1500
+                        })
+                        return
+                    }
+                    if (value.length === couponInfo.code.length && value.toLowerCase() === couponInfo.code) {
+                        $('.coupon-code-tx .info').text(couponInfo.successTip)
+                        sessionStorage.liveActiveCode_purchase = "jianyu360";
+                        $('.coupon-code-tx').off('click')
+                        cancelButton.trigger('click')
+                    }
+                })
             })
 
-            confirmButton.on('click', function () {
-                if (value.toLowerCase() !== couponInfo.code) {
-                    weui.toast('优惠码输入错误', {
-                        className: 'j-toast',
-                        duration: 1500
-                    })
-                	return
-                }
-                if (isUsedActiveCode){
-                	weui.toast('每个用户仅可使用一次', {
-                		className: 'j-toast',
-                		duration: 1500
-                	})
-                	return
-                }
-                if (value.length === couponInfo.code.length && value.toLowerCase() === couponInfo.code) {
-                    $('.coupon-code-tx .info').text(couponInfo.successTip)
-					sessionStorage.liveActiveCode_purchase = "jianyu360";
-                	$('.coupon-code-tx').off('click')
-                	cancelButton.trigger('click')
-                }
+            document.body.addEventListener("focusout", function () {
+                //软键盘收起的事件处理
+                setTimeout(function () {
+                    const scrollHeight =
+                        document.documentElement.scrollTop || document.body.scrollTop || 0;
+                    window.scrollTo(0, Math.max(scrollHeight - 1, 0));
+                }, 100);
             })
-        })
-
-        document.body.addEventListener("focusout", function () {
-          //软键盘收起的事件处理
-          setTimeout(function () {
-            const scrollHeight =
-            document.documentElement.scrollTop || document.body.scrollTop || 0;
-            window.scrollTo(0, Math.max(scrollHeight - 1, 0));
-          }, 100);
-        })
-    </script>
-</div>
-{{include "/common/baiducc.html"}}
+        </script>
+    </div>
+    {{include "/common/baiducc.html"}}
 </body>
 
 </html>

+ 4 - 58
src/web/templates/weixin/vipsubscribe/vip_renew.html

@@ -341,63 +341,7 @@
 		endTime: {{.T.liveActiveEndTime}},
 	    activeDiscount: {{.T.activeDiscount}}
 	}
-    try {
-        var signature = {{.T.signature}};
-        var isConfigSuccess = true;
-        var id = {{.T._id}}
-        if (signature && signature.length == 4) {
-            wx.config({
-                debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
-                appId: signature[0], // 必填,公众号的唯一标识
-                timestamp: signature[1], // 必填,生成签名的时间戳
-                nonceStr: signature[2], // 必填,生成签名的随机串
-                signature: signature[3],// 必填,签名,见附录1
-                jsApiList: ['chooseWXPay', 'hideAllNonBaseMenuItem'] // 必填,需要使用的JS接口列表,所有JS接口列表见附录2
-            });
-            wx.ready(function () {
-                if (!isConfigSuccess) {
-                    return;
-                }
-                wx.hideAllNonBaseMenuItem();
-            });
-            wx.error(function (res) {
-                //config信息验证失败会执行error函数,如签名过期导致验证失败,具体错误信息可以打开config的debug模式查看,也可以在返回的res参数中查看,对于SPA可以在这里更新签名。
-                //alert(res);
-                isConfigSuccess = false;
-            });
-        }
 
-        //调用微信支付接口
-        function onBridgeReady(res, ordercode) {
-            WeixinJSBridge.invoke('getBrandWCPayRequest', {
-                    "appId": res["appId"],
-                    "timeStamp": res["timestamp"],
-                    "nonceStr": res["nonceStr"],
-                    "package": res["prepayId"],
-                    "signType": res["signType"],
-                    "paySign": res["sign"]
-                },
-                function (r) {
-                    if (r.err_msg == "get_brand_wcpay_request:ok") {
-                        setTimeout(function () {
-                            clearSessionStorage();
-                            window.location.replace("/front/vipsubscribe/toPaySuccessPage?orderCode=" + ordercode);
-                        }, 500)
-                    } else if (r.err_msg == "get_brand_wcpay_request:cancel") {
-                        console.log("支付已取消")
-                    } else {
-                        weui.toast("系统异常,请稍微再试", {
-                            duration: 2000,
-                            className: 'custom-toast',
-                        });
-                    }
-                });
-        }
-
-        //微信支付end
-    } catch (e) {
-        alert(e)
-    }
 	var isUsedActiveCode = false;
     var purchase = {
         areaSelect: {"一个省": ["一个市"]},//已选择地区 {"一个省":["一个市"]}计算价格临时变量
@@ -865,10 +809,12 @@
             };
             $DoPost("/subscribepay/vipsubscribe/createOrder", param, function (r) {
                 if (r.success) {
-                    onBridgeReady(JSON.parse(r.data.res), r.data.code);
+                    //clearSessionStorage();
+                    window.location.replace("/weixin/pay/checkout_vip?orderCode=" + r.data.code);
+                }else {
+                    $('.vip-footer.renew .confirm').removeAttr("disabled");
                 }
             }, false);
-            $('.vip-footer.renew .confirm').removeAttr("disabled");
         })
 
     });

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

@@ -86,7 +86,7 @@
 			});
 
       $("#back").on("click",function(){
-       window.location.href="/weixin/pay/toSubVipSetPage";
+       window.location.href="/front/vipsubscribe/toSubVipSetPage";
       })
 
 			if(sessionStorage && sessionStorage.resultpreviewScrollTop && sessionStorage.resultpreviewListCache){

이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.