瀏覽代碼

Merge branch 'dev2.10.4' of http://192.168.3.207:10080/qmx/jy into dev2.10.4

TANGSHIZHE 5 年之前
父節點
當前提交
955ad8eea4
共有 100 個文件被更改,包括 4161 次插入557 次删除
  1. 2 1
      README.md
  2. 17 19
      src/jfw/front/dataExport.go
  3. 5 3
      src/jfw/front/front.go
  4. 56 0
      src/jfw/front/order.go
  5. 91 0
      src/jfw/front/singleLogin.go
  6. 8 5
      src/jfw/front/ws_dataExport.go
  7. 3 0
      src/jfw/front/wxMyOrder.go
  8. 1 0
      src/jfw/modules/app/src/app/front/login.go
  9. 0 4
      src/jfw/modules/app/src/web/staticres/jyapp/course/css/order_list.css
  10. 二進制
      src/jfw/modules/app/src/web/staticres/jyapp/course/image/course_book.png
  11. 二進制
      src/jfw/modules/app/src/web/staticres/jyapp/course/image/lessonsOffline.png
  12. 二進制
      src/jfw/modules/app/src/web/staticres/jyapp/course/image/lessonsOnline.png
  13. 72 52
      src/jfw/modules/app/src/web/staticres/jyapp/css/layout.css
  14. 二進制
      src/jfw/modules/app/src/web/staticres/jyapp/datareport/image/report_icon.png
  15. 二進制
      src/jfw/modules/app/src/web/staticres/jyapp/images/reportTip.png
  16. 二進制
      src/jfw/modules/app/src/web/staticres/jyapp/images/report_dialog.png
  17. 二進制
      src/jfw/modules/app/src/web/staticres/jyapp/images/search/home_tab_1.png
  18. 二進制
      src/jfw/modules/app/src/web/staticres/jyapp/images/search/home_tab_2.png
  19. 二進制
      src/jfw/modules/app/src/web/staticres/jyapp/images/search/home_tab_3.png
  20. 10 1
      src/jfw/modules/app/src/web/staticres/jyapp/js/common.js
  21. 106 10
      src/jfw/modules/app/src/web/staticres/jyapp/js/searchindex.js
  22. 177 0
      src/jfw/modules/app/src/web/staticres/jyapp/wx_course/css/order_list.css
  23. 0 1
      src/jfw/modules/app/src/web/templates/dataExport/dataExport.html
  24. 169 9
      src/jfw/modules/app/src/web/templates/dataExport/dataExport_toMyOrder.html
  25. 1 1
      src/jfw/modules/app/src/web/templates/dataExport/dataExport_toOrderDetail.html
  26. 81 60
      src/jfw/modules/app/src/web/templates/invoice/check_invoice.html
  27. 3 0
      src/jfw/modules/app/src/web/templates/invoice/invoicing.html
  28. 8 1
      src/jfw/modules/app/src/web/templates/me/mine.html
  29. 13 0
      src/jfw/modules/app/src/web/templates/vipsubscribe/vip_introduce.html
  30. 58 97
      src/jfw/modules/app/src/web/templates/weixin/follow/set.html
  31. 71 2
      src/jfw/modules/app/src/web/templates/weixin/historypush.html
  32. 138 11
      src/jfw/modules/app/src/web/templates/weixin/search/mainSearch.html
  33. 4 0
      src/jfw/modules/app/src/web/templates/weixin/wxkeyset/index.html
  34. 25 0
      src/jfw/modules/datareport/src/a/init.go
  35. 31 0
      src/jfw/modules/datareport/src/config.json
  36. 48 0
      src/jfw/modules/datareport/src/config/config.go
  37. 109 0
      src/jfw/modules/datareport/src/entity/report.go
  38. 9 0
      src/jfw/modules/datareport/src/filter/filter.go
  39. 22 0
      src/jfw/modules/datareport/src/filter/sessionfilter.go
  40. 17 0
      src/jfw/modules/datareport/src/main.go
  41. 309 0
      src/jfw/modules/datareport/src/service/newDataReport.go
  42. 225 0
      src/jfw/modules/datareport/src/service/reportOrder.go
  43. 二進制
      src/jfw/modules/datareport/src/src
  44. 66 0
      src/jfw/modules/datareport/src/util/common.go
  45. 36 0
      src/jfw/modules/datareport/src/util/db.go
  46. 154 7
      src/jfw/modules/subscribepay/src/entity/dataReportStruct.go
  47. 14 5
      src/jfw/modules/subscribepay/src/entity/dataexport.go
  48. 175 0
      src/jfw/modules/subscribepay/src/entity/jyCourseOnlineStruct.go
  49. 3 2
      src/jfw/modules/subscribepay/src/filter/sessionfilter.go
  50. 8 3
      src/jfw/modules/subscribepay/src/main.go
  51. 37 28
      src/jfw/modules/subscribepay/src/pay/aliPay.go
  52. 77 0
      src/jfw/modules/subscribepay/src/pay/util.go
  53. 29 18
      src/jfw/modules/subscribepay/src/pay/wxPay.go
  54. 2 0
      src/jfw/modules/subscribepay/src/pay_config.json
  55. 36 0
      src/jfw/modules/subscribepay/src/reportEmailTemplate.html
  56. 65 0
      src/jfw/modules/subscribepay/src/rpcfollow/rpc.go
  57. 211 1
      src/jfw/modules/subscribepay/src/service/commonAction.go
  58. 2 2
      src/jfw/modules/subscribepay/src/service/orderListDetails.go
  59. 22 11
      src/jfw/modules/subscribepay/src/service/payCallback.go
  60. 17 5
      src/jfw/modules/weixin/src/config.json
  61. 22 1
      src/jfw/modules/weixin/src/jrpc/jrpc.go
  62. 40 3
      src/jfw/modules/weixin/src/wx/wx.go
  63. 6 0
      src/jfw/public/rpccall.go
  64. 二進制
      src/web/staticres/course/image/lessonsOffline.png
  65. 二進制
      src/web/staticres/course/image/lessonsOnline.png
  66. 二進制
      src/web/staticres/datareport/image/datareport_repy_icon.jpg
  67. 二進制
      src/web/staticres/datareport/image/report_icon.png
  68. 二進制
      src/web/staticres/images/search/home_tab_1.png
  69. 二進制
      src/web/staticres/images/search/home_tab_2.png
  70. 二進制
      src/web/staticres/images/search/home_tab_3.png
  71. 二進制
      src/web/staticres/images/search/home_tab_4.png
  72. 二進制
      src/web/staticres/images/search/home_tab_light.png
  73. 2 2
      src/web/staticres/js/public-nav.js
  74. 259 162
      src/web/staticres/js/wxSupersearch.js
  75. 4 0
      src/web/staticres/order/css/bootstrap.min.css
  76. 3 0
      src/web/staticres/order/css/iconfont.css
  77. 237 0
      src/web/staticres/order/css/order_detail.css
  78. 442 0
      src/web/staticres/order/css/order_pay.css
  79. 169 0
      src/web/staticres/order/css/pay_success.css
  80. 76 0
      src/web/staticres/order/css/reset_pc.css
  81. 3 0
      src/web/staticres/order/iconfont/iconfont.css
  82. 二進制
      src/web/staticres/order/iconfont/iconfont.eot
  83. 二進制
      src/web/staticres/order/iconfont/iconfont.ttf
  84. 二進制
      src/web/staticres/order/iconfont/iconfont.woff
  85. 二進制
      src/web/staticres/order/iconfont/iconfont.woff2
  86. 二進制
      src/web/staticres/order/image/alipay.png
  87. 二進制
      src/web/staticres/order/image/bgsanjiao.png
  88. 二進制
      src/web/staticres/order/image/pay_success.png
  89. 二進制
      src/web/staticres/order/image/qrcode.png
  90. 二進制
      src/web/staticres/order/image/smallCode.png
  91. 二進制
      src/web/staticres/order/image/telphone.png
  92. 二進制
      src/web/staticres/order/image/wxpay.png
  93. 二進制
      src/web/staticres/order/image/zhifubao.png
  94. 5 0
      src/web/staticres/order/js/bootstrap.min.js
  95. 1 0
      src/web/staticres/order/js/jquery-2.1.4.min.js
  96. 38 20
      src/web/staticres/pccss/public-nav-1200.css
  97. 2 2
      src/web/staticres/vipsubscribe/css/weui.min.css
  98. 2 2
      src/web/staticres/vipsubscribe/js/weui.min.js
  99. 0 4
      src/web/staticres/wx_course/css/order_list.css
  100. 7 2
      src/web/templates/common/pchead.html

+ 2 - 1
README.md

@@ -4,4 +4,5 @@ weixin sdk https://github.com/wizjin/weixin
 web用xweb框架
 
 v2.10.4
-微信app样式统一
+微信app样式统一
+

+ 17 - 19
src/jfw/front/dataExport.go

@@ -241,26 +241,24 @@ func (d *DataExport) QueryOrder() error {
 				v["order_money"] = float64(orderMoney.(int64)) / 100
 			}
 			v["filter_id"] = util.EncodeArticleId2ByCheck(util.ObjToString(v["filter_id"]))
-			if util.ObjToString(v["product_type"]) == "招投标课程" {
-				/*
-					create_time_str := util.ObjToString(v["create_time"])
-					//创建时间戳
-					create_time, _ := time.ParseInLocation(util.Date_Full_Layout, create_time_str, time.Local)
-					var create_time_stamp int64 = 0
-					order_countdown := config.Seoconfig["orderCountdown"].(string) //配置文件读取
-					onehour, _ := time.ParseDuration(util.ObjToString(order_countdown))
-					create_time_stamp = create_time.Add(onehour).Unix()
-					//如果超过72小时 取消订单  创建72小时后的时间戳<当前时间戳
-					if create_time_stamp < time.Now().Unix() && util.IntAll(v["order_status"]) == 0 {
-						v["order_status"] = orderStatus_cancel
-						//需要把pc端获取订单和移动结合在一起。
-						var thsql = `UPDATE dataexport_order  SET order_status = -2 WHERE order_status = 0 AND order_code = '` + util.ObjToString(v["order_code"]) + `'`
-						i := public.Mysql.UpdateOrDeleteBySql(thsql)
-						if i < 1 {
-							log.Println(util.ObjToString(v["order_code"]), "订单状态处理失败")
-						}
+			if util.ObjToString(v["product_type"]) == "招投标课程" || util.ObjToString(v["product_type"]) == "线上课程" || util.ObjToString(v["product_type"]) == "VIP订阅" || util.ObjToString(v["product_type"]) == "企业商机管理" || util.ObjToString(v["product_type"]) == "数据报告" {
+				create_time_str := util.ObjToString(v["create_time"])
+				//创建时间戳
+				create_time, _ := time.ParseInLocation(util.Date_Full_Layout, create_time_str, time.Local)
+				var create_time_stamp int64 = 0
+				order_countdown := config.Seoconfig["orderCountdown"].(string) //配置文件读取
+				onehour, _ := time.ParseDuration(util.ObjToString(order_countdown))
+				create_time_stamp = create_time.Add(onehour).Unix()
+				//如果超过72小时 取消订单  创建72小时后的时间戳<当前时间戳
+				if create_time_stamp < time.Now().Unix() && util.IntAll(v["order_status"]) == 0 {
+					v["order_status"] = orderStatus_cancel
+					//需要把pc端获取订单和移动结合在一起。
+					var thsql = `UPDATE dataexport_order  SET order_status = -2 WHERE order_status = 0 AND order_code = '` + util.ObjToString(v["order_code"]) + `'`
+					i := public.Mysql.UpdateOrDeleteBySql(thsql)
+					if i < 1 {
+						log.Println(util.ObjToString(v["order_code"]), "订单状态处理失败")
 					}
-				*/
+				}
 			}
 		}
 	}

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

@@ -465,10 +465,12 @@ func (f *Front) Topics() error {
 
 //
 func (f *Front) Notin() error {
-	ref := f.GetSession("referer")
-	if ref != nil && ref != "" {
-		f.T["ref"] = ref.(string)
+	refer := "/"
+	tmp := f.Header("Referer")
+	if tmp != f.Request.URL.String() {
+		refer = tmp
 	}
+	f.T["ref"] = refer
 	var shareid = f.GetString("id")
 	if len(shareid) == 0 {
 		shareid = "10" //fmt.Sprintf("%s%d", config.Seoconfig["jysskzy"].(string)+fmt.Sprintf("%d", time.Now().UnixNano())[7:14], rand.Intn(9))

+ 56 - 0
src/jfw/front/order.go

@@ -0,0 +1,56 @@
+package front
+
+import (
+	"fmt"
+	qutil "qfw/util"
+	"strings"
+	"time"
+
+	"github.com/go-xweb/xweb"
+)
+
+type JyOrder struct {
+	*xweb.Action
+	orderDetail xweb.Mapper `xweb:"/front/(.*)/jyOrderDetail/(.*)"` //订单详情
+	orderPay    xweb.Mapper `xweb:"/front/(\\w+)/orderPay/(.*)"`    //订单支付
+	paySuccess  xweb.Mapper `xweb:"/front/(\\w+)/paySuccess/(.*)"`  //支付完成页面
+}
+
+func init() {
+	xweb.AddAction(&JyOrder{})
+}
+
+//pc端详情页
+func (this *JyOrder) OrderDetail(orderType, orderCode string) {
+	this.T["orderId"] = orderCode
+	this.Render(fmt.Sprintf("/order/pc/%s/detail.html", orderType))
+}
+
+//pc端订单支付页
+func (this *JyOrder) OrderPay(orderType, orderCode string) error {
+	userId := qutil.ObjToString(this.GetSession("userId"))
+	if userId == "" {
+		return this.Redirect("/notin/page")
+	}
+	this.T["shareid"] = "10"
+	this.T["orderType"] = orderType
+	this.T["orderCode"] = orderCode
+	return this.Render("/order/pc/orderPay.html")
+}
+
+//pc支付成功页面
+func (this *JyOrder) PaySuccess(orderType, orderCode string) error {
+	userId := qutil.ObjToString(this.GetSession("userId"))
+	if userId == "" {
+		return this.Redirect("/notin/page")
+	}
+	this.T["payway"] = qutil.If(strings.Index(this.GetString("payway"), "wx") > -1, "微信", "支付宝")
+	this.T["email"] = this.GetString("email")
+	if payTime, err := this.GetInt("payTime"); err == nil {
+		this.T["payTime"] = time.Unix(payTime, 0).Format("2006年01月02日")
+	}
+	this.T["shareid"] = "10"
+	this.T["orderType"] = orderType
+	this.T["orderCode"] = orderCode
+	return this.Render("/order/pc/paySuccess.html")
+}

+ 91 - 0
src/jfw/front/singleLogin.go

@@ -0,0 +1,91 @@
+package front
+
+import (
+	"fmt"
+	"jfw/public"
+	"net/url"
+	"qfw/util/redis"
+	"time"
+
+	"github.com/go-xweb/httpsession"
+
+	"jfw/config"
+	"jfw/jyutil"
+	"log"
+	qutil "qfw/util"
+
+	"github.com/go-xweb/xweb"
+	"gopkg.in/mgo.v2/bson"
+)
+
+type SingleLogin struct {
+	*xweb.Action
+	singleLogin xweb.Mapper `xweb:"/swordfish/SingleLogin"` //微信登录中转
+}
+
+func init() {
+	xweb.AddAction(&SingleLogin{})
+}
+
+//是否关注处理
+func (this *SingleLogin) SingleLogin() error {
+	userid := qutil.ObjToString(this.GetSession("userId"))
+	toHref := this.GetString("toHref")
+	log.Println("SingleLogin sessionId", this.Session().Id())
+	if userid != "" { //已有session,直接跳转至结果页面
+		return this.Redirect(toHref)
+	}
+	data := map[string]interface{}{}
+	stateKey := this.GetString("state")
+	log.Println("SingleLogin stateKey", userid, stateKey)
+	if stateKey == "" { //公众号回调
+		stateKey = getTmpKey()
+		data["href"] = toHref
+		data["title"] = this.GetString("title")
+		redis.Put("other", stateKey, data, 60*5) //存储信息
+		return this.Redirect(fmt.Sprintf(config.Wxoauth, url.QueryEscape(this.Site()+this.Url()), stateKey), 302)
+	}
+	//获取wx跳转前参数
+	if redisValue := redis.Get("other", stateKey); redisValue != nil {
+		if param, ok := redisValue.(map[string]interface{}); ok {
+			data = param
+		}
+	}
+	log.Println("SingleLogin data", data)
+	openid := jyutil.Getopenid(this.GetString("code")) //获取用户openid
+	if loginCreateSess(openid, this.Session()) {
+		log.Println("已关注用户", openid, data["href"])
+		return this.Redirect(qutil.ObjToString(data["href"]))
+	}
+	log.Println("SingleLogin 未关注用户", openid)
+	if len(data) > 0 { //存储携带信息
+		redis.Put("other", fmt.Sprintf("SingleLogin_%s", openid), data, 60*30)
+	}
+	return this.Render("/weixin/singlelogin/index.html")
+}
+
+func getTmpKey() string {
+	return fmt.Sprintf("%s_%s", time.Now().Format("20060102150405"), qutil.GetLetterRandom(5))
+}
+
+func loginCreateSess(openid string, sess *httpsession.Session) bool {
+	_person, ok := public.MQFW.FindOne("user", bson.M{"s_m_openid": openid, "i_ispush": 1})
+	if ok && *_person != nil && len(*_person) > 0 {
+		person := *_person
+		if person["i_shareknow"] != nil {
+			sess.Set("shareknow", person["i_shareknow"])
+		}
+		sess.Set("userId", (person["_id"].(bson.ObjectId)).Hex())
+		sess.Set("s_m_openid", person["s_m_openid"])
+		sess.Set("openid", person["s_m_openid"])
+		sess.Set("s_nickname", person["s_nickname"])
+		if person["s_avatar"] == nil {
+			sess.Set("s_avatar", person["s_headimage"])
+		} else {
+			sess.Set("s_avatar", person["s_avatar"])
+		}
+		return true
+	} else {
+		return false
+	}
+}

+ 8 - 5
src/jfw/front/ws_dataExport.go

@@ -14,7 +14,6 @@ import (
 	"qfw/util"
 	"qfw/util/jy"
 	"qfw/util/redis"
-	"strconv"
 	"strings"
 	"time"
 
@@ -90,10 +89,14 @@ func (w *WsDataExport) GetPreview() error {
 //
 func (w *WsDataExport) PaySuccessPage() error {
 	defer util.Catch()
-	w.T["email"] = w.GetString("email")
-	w.T["orderCode"] = w.GetString("orderCode")
-	payTime, _ := strconv.ParseInt(w.GetString("payTime"), 10, 64)
-	w.T["payTime"] = util.FormatDateByInt64(&payTime, util.Date_Short_Layout)
+	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)
 }
 

+ 3 - 0
src/jfw/front/wxMyOrder.go

@@ -329,6 +329,9 @@ func (w *WxMyOrder) WxToOrderDetail() error {
 			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"])
 		}()
 	}

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

@@ -916,6 +916,7 @@ func ClearSession(s *httpsession.Session) {
 	s.Del("prevSelectEntId")
 	s.Del("autoSelectEntId")
 	s.Del("app_name")
+	s.Del("s_phone")
 }
 
 //生成签名,返回手机端

文件差異過大導致無法顯示
+ 0 - 4
src/jfw/modules/app/src/web/staticres/jyapp/course/css/order_list.css


二進制
src/jfw/modules/app/src/web/staticres/jyapp/course/image/course_book.png


二進制
src/jfw/modules/app/src/web/staticres/jyapp/course/image/lessonsOffline.png


二進制
src/jfw/modules/app/src/web/staticres/jyapp/course/image/lessonsOnline.png


+ 72 - 52
src/jfw/modules/app/src/web/staticres/jyapp/css/layout.css

@@ -336,13 +336,13 @@ ul, li, ol {
 }
 #home_main.p13 .home .home_data .data_list .tags > div {
     color: #5F5E64;
-    font-size: 12px;
-    line-height: 16px;
+    font-size: 0.24rem;
+    line-height: 0.32rem;
     background: #F7F9FA;
     border: 0.5px solid rgba(0, 0, 0, 0.05);
     box-sizing: border-box;
     border-radius: 4px;
-    padding: 1px 8px;
+    padding: 1px 0.16rem;
     height: auto;
     margin: 0 4px 0 0;
 }
@@ -353,8 +353,8 @@ ul, li, ol {
     padding-left: 0;
 }
 #home_main.p13 .home .home_data .data_list .list_title p {
-    font-size: 16px;
-    line-height: 24px;
+    font-size: 0.32rem;
+    line-height: 0.48rem;
     color: #171826;
     font-weight: 500;
 }
@@ -385,8 +385,8 @@ ul, li, ol {
 }
 .p13 .tslist a.bt {
     color: #171826 !important;
-    font-size: 16px;
-    line-height: 24px;
+    font-size: 0.32rem;
+    line-height: 0.48rem;
 }
 
 /* hover */
@@ -415,7 +415,7 @@ ul, li, ol {
 .p13 .restime {
     float: left;
     width: 100%;
-    margin-top: 13px;
+    margin-top: 0.26rem;
     color: #5F5E64;
     position: relative;
 }
@@ -424,13 +424,13 @@ ul, li, ol {
 }
 .p13 .restime span.location, .p13 .restime span.industry, .p13 .restime span.type {
     color: inherit;
-    font-size: 12px;
-    line-height: 16px;
+    font-size: 0.24rem;
+    line-height: 0.32rem;
     background: #F7F9FA;
     border: 0.5px solid rgba(0, 0, 0, 0.05);
     box-sizing: border-box;
     border-radius: 4px;
-    padding: 1px 8px;
+    padding: 1px 0.16rem;
     height: auto;
     display: inline-block;
     margin: 0 4px 0 0;
@@ -446,18 +446,18 @@ ul, li, ol {
 /*  全文 */
 #home_main.p13 .detail {
     padding: 0 !important;
-    margin-top: 12px;
-    font-size: 13px;
-    line-height: 20px;
+    margin-top: 0.24rem;
+    font-size: 0.26rem;
+    line-height: 0.4rem;
     color: #5F5E64;
 }
 
 /* ad */
 .p13 #supersearchPage .adv-appsearch-center, .p13 .adv-wxpush-center {
-    max-height: 64px;
+    max-height: 1.28rem;
     overflow: hidden;
     border-radius: 8px;
-    margin: 18px 16px 0;
+    margin: 0.36rem 0.32rem 0;
     width: auto;
 }
 .p13 #supersearchPage .adv-appsearch-center::before, .p13 .adv-wxpush-center::before {
@@ -467,21 +467,21 @@ ul, li, ol {
     border-radius: 2px;
     background: rgba(0, 0, 0, 0.27);
     color: #fff;
-    font-size: 12px;
-    line-height: 14px;
+    font-size: 0.24rem;
+    line-height: 0.28rem;
     padding: 1px 4px;
-    top: 5px;
-    left: 8px;
+    top: 0.1rem;
+    left: 0.16rem;
 }
 .p13 #supersearchPage img.closeadv, .p13 .adv-wxpush-center img.closeadv {
-    width: 16px;
-    top: 5px;
-    right: 5px;
+    width: 0.32rem;
+    top: 0.1rem;
+    right: 0.1rem;
     z-index: 1;
 }
 .p13 #supersearchPage .closeadv-bg, .p13 .adv-wxpush-center .closeadv-bg  {
-    top: 5px;
-    right: 5px;
+    top: 0.1rem;
+    right: 0.1rem;
     z-index: 1;
 }
 
@@ -499,11 +499,11 @@ ul, li, ol {
     content: none;
 }
 .p13 .jymobile-datePicker .weui-picker__item {
-    font-size: 15px;
+    font-size: 0.3rem;
 }
 .p13 .jymobile-datePicker .weui-picker__item.is-now-select  {
     color: #2ABED1;
-    font-size: 18px;
+    font-size: 0.36rem;
 }
 .p13 .jymobile-datePicker .weui-picker__indicator {
     background: rgba(42, 190, 209, 0.05);
@@ -512,42 +512,62 @@ ul, li, ol {
     padding: 0;
 }
 .p13 .jymobile-datePicker .weui-half-screen-dialog__hd {
-    padding: 0 16px;
+    padding: 0 0.32rem;
     flex-direction: row-reverse;
 }
 .p13 .jymobile-datePicker .weui-half-screen-dialog__hd__side+.weui-half-screen-dialog__hd__main {
     text-align: left;
     padding-left: 0;
 }
+.p13 ._header.fix-top {
+    position: fixed;
+    transition: all 0.3s;
+}
 .p13 .filter_tab.is-hide-border {
     border-bottom-color: transparent;
 }
 .p13 .jymobile-datePicker .weui-half-screen-dialog__title {
     color: #171826;
-    font-size: 20px;
+    font-size: 0.4rem;
     font-weight: 500;
 }
 .p13 .jymobile-datePicker.up .weui-picker {
     border-radius: 0;
     z-index: 666;
-    top: -284px;
-    padding-top: 40px;
-    max-height: calc(75% - 120px);
+    top: 1rem;
+    bottom: initial;
+    bottom: unset;
+    padding-top: 0.8rem;
+    /*max-height: calc(75% - 2.4rem);*/
 }
 @keyframes aa {
     0% {
         -webkit-transform: translate3d(0,100%,0);
-        transform: translate3d(0,100%,0);
+        transform: translate3d(0,-100%,0);
     }
     100% {
         -webkit-transform: translateZ(0);
         transform: translateZ(0);
     }
 }
+@keyframes bb {
+    0% {
+        -webkit-transform: translateZ(0);
+        transform: translateZ(0);
+    }
+    100% {
+        -webkit-transform: translate3d(0,100%,0);
+        transform: translate3d(0,-100%,0);
+    }
+}
+.p13 .jymobile-datePicker.up .weui-animate-slide-up.weui-animate-slide-down {
+    animation-name: bb;
+    animation-duration: 0.44s;
+}
 .p13 .jymobile-datePicker.up .weui-animate-slide-up {
-    animation-direction: reverse;
+    /*animation-direction: reverse;*/
     animation-duration: 0.44s;
-    /*animation-name: aa;*/
+    animation-name: aa;
 }
 .p13 .jymobile-datePicker.up .weui-half-screen-dialog__hd{
     display: none;
@@ -558,32 +578,32 @@ ul, li, ol {
 }
 .p13 .jymobile-datePicker .weui-btn_disabled{
     flex: 1;
-    margin: 0 16px;
-    padding: 5px 0;
+    margin: 0 0.32rem;
+    padding: 0.1rem 0;
     background: #EDEFF2;
     border-radius: 8px;
     color: #5F5E64 !important;
     font-weight: 500;
-    font-size: 18px;
-    line-height: 30px;
-    width: calc(50% - 16px) !important;
+    font-size: 0.32rem;
+    line-height: 0.6rem;
+    width: calc(50% - 0.32rem) !important;
 }
 .p13 .jymobile-datePicker .weui-btn_disabled + .weui-btn_primary{
-    width: calc(50% - 16px) !important;
+    width: calc(50% - 0.32rem) !important;
 }
 .p13 .jymobile-datePicker .weui-btn_primary{
     flex: 1;
-    margin: 0 16px;
-    height: 40px;
+    margin: 0 0.32rem;
+    height: 0.8rem;
     box-sizing: border-box;
-    padding: 5px 0;
+    padding: 0.1rem 0;
     width: auto;
     background: #2ABED1;
     border-radius: 8px;
     color: #F7F9FA !important;
     font-weight: 500;
-    font-size: 18px;
-    line-height: 30px;
+    font-size: 0.32rem;
+    line-height: 0.6rem;
 }
 .p13 .jymobile-datePicker  .weui-half-screen-dialog__ft {
     padding: 8px 0;
@@ -608,24 +628,24 @@ ul, li, ol {
     transform: unset;
 }
 .p13 .filter_tab .area_container .area_wrap .handle_menu {
-    padding: 8px 0;
+    padding: 0.16rem 0;
     border: none;
     position: relative;
-    height: 56px;
+    height: 1.12rem;
 }
 .p13 .filter_tab .area_container .area_wrap .handle_menu button.reset_btn {
     background: #EDEFF2;
     color: #5F5E64;
 }
 .p13 .filter_tab .area_container .area_wrap .handle_menu button {
-    width: calc(50% - 16px) !important;
-    margin: 0 8px;
+    width: calc(50% - 0.32rem) !important;
+    margin: 0 0.16rem;
     background: #2ABED1;
     border-radius: 8px;
     color: #F7F9FA;
     font-weight: 500;
-    font-size: 18px;
-    line-height: 30px;
+    font-size: 0.36rem;
+    line-height: 0.6rem;
 }
 .p13 .jymobile-datePicker  .weui-half-screen-dialog__ft::before, .p13 .handle_menu::before {
     content: '';

二進制
src/jfw/modules/app/src/web/staticres/jyapp/datareport/image/report_icon.png


二進制
src/jfw/modules/app/src/web/staticres/jyapp/images/reportTip.png


二進制
src/jfw/modules/app/src/web/staticres/jyapp/images/report_dialog.png


二進制
src/jfw/modules/app/src/web/staticres/jyapp/images/search/home_tab_1.png


二進制
src/jfw/modules/app/src/web/staticres/jyapp/images/search/home_tab_2.png


二進制
src/jfw/modules/app/src/web/staticres/jyapp/images/search/home_tab_3.png


+ 10 - 1
src/jfw/modules/app/src/web/staticres/jyapp/js/common.js

@@ -621,7 +621,7 @@ function loginSuccess(result){
 	if(callBackUrl != null){
 		afterLoginSuccess("",true);
 		//window.location.href = callBackUrl;
-		location.replace(callBackUrl);
+		locationReplace(callBackUrl);
 		return
 	}
 	//
@@ -632,6 +632,15 @@ function loginSuccess(result){
 	//window.location.href = "/jyapp/jylab/mainSearch";
 	//location.replace("/jyapp/jylab/mainSearch");
 }
+//2020-05-30 android replace失效
+function locationReplace(url){
+	if(history.replaceState){
+		history.replaceState(null, document.title, url);
+		history.go(0);
+	}else{
+		location.replace(url);
+	}
+}
 function afterLoginSuccess(type,canBack){
 	if(!canBack){
 		prohibitBack();

+ 106 - 10
src/jfw/modules/app/src/web/staticres/jyapp/js/searchindex.js

@@ -31,6 +31,62 @@ $(function () {
 		}
 	}
 })
+/*
+* money unit for zyh @date 2020/6/5
+* */
+var MoneyUnit = {
+	levelArr: ['元', '万元', '亿元', '万亿元'],
+	test: function (num, type, lv) {
+	if (type === void 0) {
+		type = 'string';
+	}
+
+	if (lv === void 0) {
+		lv = 0;
+	}
+
+	if (num === 0) {
+		if (type === 'string') {
+			return '0';
+		}
+
+		if (type === 'lv') {
+			return this.levelArr[lv];
+		}
+
+		if (type === 'number') {
+			return 0;
+		}
+
+		if (type === 'index') {
+			return lv;
+		}
+	}
+
+	var result = num / Math.pow(10000, lv);
+
+	if (result > 10000 && lv < 2) {
+		return this.test(num, type, lv + 1);
+	} else {
+		if (type === 'string') {
+			return result.toFixed(2).replace('.00', '') + this.levelArr[lv];
+		}
+
+		if (type === 'lv') {
+			return this.levelArr[lv];
+		}
+
+		if (type === 'index') {
+			return lv;
+		}
+
+		if (type === 'number') {
+			return result.toFixed(2).replace('.00', '');
+		}
+	}
+}
+}
+
 var SuperSearch = {
 	secondFlag:"",
 	secondList:"",
@@ -1311,6 +1367,14 @@ var SuperSearch = {
 					}
 				}
 			}
+			// 金额标签
+			var moneyTag = '';
+			if(typeof(list[i].budget) != "undefined" && list[i].budget != null && list[i].budget != ""){
+				moneyTag = '<span class="industry">'+MoneyUnit.test(list[i].budget)+'</span>';
+			}
+			if(typeof(list[i].bidamount) != "undefined" && list[i].bidamount != null && list[i].bidamount != ""){
+				moneyTag = '<span class="industry">'+MoneyUnit.test(list[i].bidamount)+'</span>';
+			}
 			if(i==3&&pageNum==1){
 				ListHtml += '<div class="tslist" style="border-bottom-width:0px;">'
 			}else{
@@ -1326,7 +1390,7 @@ var SuperSearch = {
 						+'</div>'
 						+'<div style="clear:both;"></div>'
 						+'<div class="restime time-diff">'
-						+area+datatype+industry+tdf
+						+area+industry+datatype+moneyTag+tdf
 						+'</div>'
 						+'<div style="clear:both;"></div>'
 						+detail
@@ -2212,12 +2276,21 @@ var SuperSearch = {
 				if(subtype==undefined){
 					subtype = ""
 				}
+				if(subtype!=""){
+					homeListHtml +='<div class="course">'+subtype+'</div>'
+				}
 				if (industry!=""){
 					homeListHtml +='<div class="industry">'+industry+'</div>'
 				}
-				if(subtype!=""){
-					homeListHtml +='<div class="course">'+subtype+'</div>'
+				var moneyTag = ''
+				// 金额标签
+				if(typeof(_list.budget) != "undefined" && _list.budget != null && _list.budget != ""){
+					moneyTag = '<div class="industry">'+MoneyUnit.test(_list.budget)+'</div>';
 				}
+				if(typeof(_list.bidamount) != "undefined" && _list.bidamount != null && _list.bidamount != ""){
+					moneyTag = '<div class="industry">'+MoneyUnit.test(_list.bidamount)+'</div>';
+				}
+				homeListHtml += moneyTag
 				//时间
 				var publishtime = _list["publishtime"];
 				if(publishtime&&Number(publishtime)>=1000000){
@@ -3086,17 +3159,21 @@ var Active_Tip = function(){
 	this.active = null;
 	this.isLogin = false;
 	var _this = this;
+	var tipEndTime = 1593532800000; //2020-07-01-00-00-00
 	//默认弹出框
 	if(_this.active == null){
 		var time = localStorage.getItem("Active_Vip_Invite")
-		if(!time||_this.nowTime>parseInt(time)+1000*60*60*24*30){
+		if(parseInt(time) >= tipEndTime){
+			return   //超过弹窗结束日期
+		}
+		if(!time||_this.nowTime>parseInt(time)+1000*60*60*24){
 			_this.active = new Active_Vip_Invite(_this.nowTime);
 		}
 	}
 	if(_this.active != null){
 		$("body").append('<div class="modal fade" id="myModal-tap" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" data-backdrop="true" style="z-index: 100001;">'
 						+'<div class="modal-dialog" style="height:100%;margin:0px;">'
-							+'<div style="width: 5.6rem;height: 7.2rem;position: relative;top: 3.5rem;left: 50%;margin-left: -2.8rem;">'
+							+'<div style="width: 6rem;height: 7.2rem;position: relative;top: 3.5rem;left: 50%;margin-left: -2.8rem;">'
 								+'<img src="/jyapp/vipsubscribe/image/close.png" style="position: absolute;width: 27px;top:-66.5px;right: .3rem;" onclick="ActiveTip.close()">'
 								+_this.active.getHtml()
 							+'</div>'
@@ -3425,7 +3502,7 @@ var Active_Default = function(nowTime){
 		localStorage.setItem("lastAlertDate",nowTime);
 	}
 	this.getHtml = function(){
-		var html = '<div class="pop-new" style="background: url(/jyapp/images/search/dataexportAd.png);background-size: cover;height: inherit;width: inherit;border-radius: 8px;">'
+		var html = '<div class="pop-new" style="background: url(/jyapp/images/report_dialog.png);background-size: cover;height: inherit;width: inherit;border-radius: 8px;">'
 					+'<div style="position: absolute;color: #0687DB;font-size: 14px;bottom: .6rem;left: 50%;margin-left: -2.3rem;font-family: 微软雅黑;width: 4.6rem;border: 1px solid #fff;border-radius: 6px;text-align: center;cursor: pointer;height: .8rem;line-height: .8rem;" id="goToInvite"></div>'
 				+'</div>';
 		return html;
@@ -3437,16 +3514,17 @@ var Active_Vip_Invite = function(nowTime){
 		$("#goToInvite").on("tap",function(){
 			if(ActiveTip.isLogin){
 				ActiveTip.close();
-				window.location.href = "/jyapp/vipsubscribe/introducePage";
+				window.location.href = "/datareport/page/introduce";
 			}else{
-				window.location.href = "/jyapp/free/login?url="+encodeURIComponent("/jyapp/vipsubscribe/introducePage");
+				window.location.href = "/jyapp/free/login?url="+encodeURIComponent("/datareport/page/introduce");
 			}
 		});
+		nowTime = new Date(formatDate(nowTime,true)+ " 00:00:00").getTime();
 		localStorage.setItem("Active_Vip_Invite",nowTime);
 	}
 	this.getHtml = function(){
-		var html = '<div class="pop-new" style="background: url(/jyapp/vipsubscribe/image/vip_home.png);background-size: cover;height: inherit;width: inherit;border-radius: 8px;">'
-					+'<div style="position: absolute;color: #0687DB;font-size: 14px;bottom: .65rem;left: 50%;margin-left: -1.7rem;font-family: 微软雅黑;width: 3.4rem;border-radius: 20px;text-align: center;cursor: pointer;height: .8rem;line-height: .8rem;" id="goToInvite"></div>'
+		var html = '<div class="pop-new" style="background: url(/jyapp/images/reportTip.png);background-size: cover;height: inherit;width: inherit;border-radius: 8px;">'
+					+'<div style="position: absolute;color: #0687DB;font-size: 14px;bottom: 1.35rem;left: 50%;margin-left: -1.7rem;font-family: 微软雅黑;width: 4.3rem;border-radius: 20px;text-align: center;cursor: pointer;height: 1.2rem;line-height: 1.2rem;" id="goToInvite"></div>'
 				+'</div>';
 		return html;
 	}
@@ -3456,3 +3534,21 @@ var ActiveTip = null;
 window.onload = function(){
 	ActiveTip = new Active_Tip();
 }
+
+function formatDate(date,hms) {
+	if(date ===null || date==="" || date === 0){
+		return "-"
+	}
+	var date = new Date(date);
+	var YY = date.getFullYear() + '-';
+	var MM = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-';
+	var DD = (date.getDate() < 10 ? '0' + (date.getDate()) : date.getDate());
+	var hh = (date.getHours() < 10 ? '0' + date.getHours() : date.getHours()) + ':';
+	var mm = (date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()) + ':';
+	var ss = (date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds());
+	if(!hms){
+		return YY + MM + DD + " " + hh + mm + ss
+	}else{
+		return YY + MM + DD
+	}
+}

文件差異過大導致無法顯示
+ 177 - 0
src/jfw/modules/app/src/web/staticres/jyapp/wx_course/css/order_list.css


+ 0 - 1
src/jfw/modules/app/src/web/templates/dataExport/dataExport.html

@@ -9,7 +9,6 @@
     <link rel="stylesheet" type="text/css" href="{{Msg "seo" "cdn"}}/jyapp/dataExport/css/dataExport.css?v={{Msg "seo" "version"}}">
     <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/jyapp/vipsubscribe/css/weui.min.css?v={{Msg "seo" "version"}}"/>
     <link rel="stylesheet" type="text/css" href="{{Msg "seo" "cdn"}}/jyapp/css/layout.css?v={{Msg "seo" "version"}}" />
-    <link rel="stylesheet" type="text/css" href="{{Msg "seo" "cdn"}}/jyapp/dataExport/css/weui.min.css?v={{Msg "seo" "version"}}">
     <link rel="stylesheet" type="text/css" href="{{Msg "seo" "cdn"}}/jyapp/css/appbutton.css?v={{Msg "seo" "version"}}1" >
 	<link rel="stylesheet" type="text/css" href="{{Msg "seo" "cdn"}}/jyapp/css/layout.css?v={{Msg "seo" "version"}}" />
     <link rel="stylesheet" type="text/css" href="{{Msg "seo" "cdn"}}/jyapp/css/font.css?v={{Msg "seo" "version"}}" />

+ 169 - 9
src/jfw/modules/app/src/web/templates/dataExport/dataExport_toMyOrder.html

@@ -560,11 +560,14 @@
 
 			function appendList(listhtml){
 				listhtml.children(".card-content").on("click", function(event){
+          if($(this).find(".media").attr("href")){
+            return
+          }
 					var eid = $(this).find(".media").attr("eid");
 					var isVipOrder =$(this).find(".media").attr("isvipOrder");
-                    var courseOrder = $(this).find(".media").attr("courseOrder");
-                    var isent = $(this).find(".media").attr("isent");
-                    var vid = $(this).find(".media").attr("vid");
+          var courseOrder = $(this).find(".media").attr("courseOrder");
+          var isent = $(this).find(".media").attr("isent");
+          var vid = $(this).find(".media").attr("vid");
 					beforeJump(eid,isVipOrder,courseOrder,isent,vid);
 				});
 				$(".card_lists").append(listhtml);
@@ -612,6 +615,7 @@
 			}
 
 			function renewalOrBuyAgain_ent(pattern,e){
+        setSessionStorage()
 				var renew = 0;
 				setSessionStorage();
 				var orderCode = $(e).parent(".card-footer").prev(".card-content").find("a").attr("eid");
@@ -746,6 +750,7 @@
 												var isEntOrder =$(obj).parent(".card-footer").prev(".card-content").children(".media").attr("isent");
 												var courseOrder =$(obj).parent(".card-footer").prev(".card-content").children(".media").attr("courseOrder");
 												var courseId = $(obj).parent(".card-footer").prev(".card-content").find("a").attr("eid");
+                        var courseOnlineOrder =$(obj).parent(".card-footer").prev(".card-content").children(".media").attr("courseOnlineOrder");
 												//vip订单取消了没有再次购买
 												if (isVipOrder!="true"){
 													if(courseOrder !== "true"){
@@ -753,7 +758,10 @@
 															self.text("已取消");
 															/*$(obj).parent(".card-footer").html('<a  onclick="renewalOrBuyAgain_ent(1,this)" class="btn cancle">再次购买</a>')*/
 															$(obj).parent(".card-footer").html("");
-														}else{
+														}else if(courseOnlineOrder=="true"){
+                              self.text("已取消");
+                              $(obj).parent(".card-footer").remove();
+                            }else{
 															self.text("已取消");
 															$(obj).parent(".card-footer").html('<a  onclick="onceMore(this)" class="btn cancle">再次购买</a>')
 														}
@@ -1883,7 +1891,7 @@
 										orderStatusHtmls = "notpay";
 										lastHtml = `<div class="card-footer">
 														<a  class="btn cancle gopay_btn" onclick="cancelOrder(${id},this)">取消订单</a>
-														<a onclick="setSessionStorage()" href="/jyapp/course/optionPay?code=${orderCode}" class="btn pay green-btn">去支付</a>
+														<a onclick="setSessionStorage()" href="/jyapp/course/optionPay?code=${orderCode}" class="btn green-btn">去支付</a>
 													</div>`;
 									}else if(orderStatus === 1){
 										if(courseStatus === 5){
@@ -1944,7 +1952,7 @@
 											orderStatusHtmls = "refund";
 											lastHtml = `<div class="card-footer">
 															<a  class="btn cancle gray-btn" onclick="cancelOrder(${id},this)">取消订单</a>
-															<a onclick="setSessionStorage()" href="/jyapp/course/optionPay?code=${orderCode}" class="btn pay green-btn">再次支付</a>
+															<a onclick="setSessionStorage()" href="/jyapp/course/optionPay?code=${orderCode}" class="btn green-btn">再次支付</a>
 														</div>`;
 											helpHtml = `<span class="doubt iconfont icon-bangzhu" onclick="phoneShow()"></span>`
 										}else{
@@ -1952,7 +1960,7 @@
                                             orderStatusHtmls = "notpay";
                                             lastHtml = `<div class="card-footer">
                                             				<a class="btn cancle gray-btn" onclick="cancelOrder(${id},this)">取消订单</a>
-                                            				<a onclick="setSessionStorage()" href="/jyapp/course/optionPay?code=${orderCode}" class="btn pay green-btn">去支付</a>
+                                            				<a onclick="setSessionStorage()" href="/jyapp/course/optionPay?code=${orderCode}" class="btn green-btn">去支付</a>
                                             			</div>`;
                                         }
 									}else if(orderStatus === 1){
@@ -2015,8 +2023,7 @@
 												<div class="card-content">
 													<a onclick="setSessionStorage()" href="${orderUrl}" eid="${courseId}" vid="${orderCode}" class="media" courseOrder="true">
 														<div class="media-img">
-															<span class="img-container">
-															</span>
+															<img src="/jyapp/course/image/lessonsOffline.png">
 														</div>
 														<div class="media-info">
 															<p class="item-ifo ellipsis-2">${courseName}</p>
@@ -2031,6 +2038,157 @@
 												</div>
 												${lastHtml}
 											</div>`
+							}else if (obj.product_type=="线上课程"){
+								count++;
+								var id = obj.id;
+								//订单编号
+								var orderCode = obj.order_code;
+								//创建时间
+								var createTime=obj.create_time;
+								createTime =createTime.replace(/-/g,".")
+								var payWay = obj.pay_way
+								var filterObj = JSON.parse(obj.filter);
+								var courseName = filterObj.s_name;
+								var courseLength = filterObj.s_courseDate;
+								var courseEndTimeStamp = filterObj.l_endtime;
+								var courseId = filterObj._id;
+								var orderStatus = obj.order_status;
+								var orderStatusHtml = "";
+								var orderStatusHtmls = "";
+                var orderMoney = obj.order_money;
+                var applybillStatus= obj.applybill_status;
+                
+                var courseEndTime = new Date(courseEndTimeStamp*1000)
+                
+								var lastHtml = "";
+								var orderUrl = "/jyxsapp/orderMsg?code="+ orderCode;
+							
+								if(orderStatus === 0){
+									orderStatusHtml = "待付款";
+									orderStatusHtmls = "notpay";
+									lastHtml = `<div class="card-footer">
+													<a  class="btn cancle" onclick="cancelOrder(${id},this)">取消订单</a>
+													<a onclick="setSessionStorage()" href="/jyxsapp/confirmPay?code=${orderCode}&price=${orderMoney}" class="btn green-btn">去支付</a>
+												</div>`;
+								}else if(orderStatus === 1){
+									orderStatusHtml = "已完成";
+                  orderStatusHtmls ="finish";
+                  if(applybillStatus==1){
+                		lastHtml = `<div class="card-footer">
+											<a onclick="setSessionStorage()" href="/jyxsapp/invoiceDetail?code=${orderCode}&id=${id}" class="btn cancle">查看发票</a>
+										</div>`
+                  }else{
+                		lastHtml = `<div class="card-footer">
+											<a onclick="setSessionStorage()" href="/jyxsapp/invoice?code=${orderCode}" class="btn cancle">开发票</a>
+										</div>`
+                  }
+								}else{
+									orderStatusHtml = "已取消";
+                  orderStatusHtmls = "status-text";
+								}
+
+								listhtml += `<div class="card">
+												<div class="card-header">
+													<span class="time">${createTime}</span>
+													<span class="status ${orderStatusHtmls}">${orderStatusHtml}</span>
+													<a class="shanchu iconfont  icon-shanchu" title="删除订单" onclick="deleteOrder(${id},this)"></a>
+													
+												</div>
+												<div class="card-content">
+													<a onclick="setSessionStorage()" href="${orderUrl}" eid="${courseId}" vid="${orderCode}" class="media" courseOnlineOrder="true">
+														<div class="media-img">
+															<img src="/jyapp/course/image/lessonsOnline.png">
+														</div>
+														<div class="media-info">
+															<p class="item-ifo ellipsis-2">${courseName}</p>
+															<p class="item-ifo ellipsis">课程类型:线上课程</p>
+															<p class="item-ifo ellipsis">课程时长:${courseLength}</p>
+															<p class="item-ifo ellipsis">有效日期:${courseEndTime.getFullYear()}/${courseEndTime.getMonth()+1}/${courseEndTime.getDate()} 到期</p>
+														</div>
+													</a>
+													<div class="price">
+														<strong class="current">¥${formatMoney(orderMoney)}</strong>
+													</div>
+												</div>
+												${lastHtml}
+											</div>`
+							}else if (obj.product_type=="数据报告"){
+								if(typ==1 || $(".tab-link.active").index() === 1){	//待付款订单列表页
+									if(obj.order_status==-2){
+										continue;
+									}
+								}
+								count++;
+								var id = obj.id;
+								//订单编号
+								var orderCode = obj.order_code;
+								//创建时间
+								var createTime=obj.create_time;
+								createTime =createTime.replace(/-/g,".")
+								var payWay = obj.pay_way
+								var filterObj = JSON.parse(obj.filter);
+
+								var courseId = filterObj._id;
+								var orderStatus = obj.order_status;
+								var orderStatusHtml = "";
+								var orderStatusHtmls = "";
+								var reportName = filterObj.report_name;
+								var pushTimeStamp = filterObj.l_pushtime;
+                var orderMoney = obj.order_money;
+                var applybillStatus= obj.applybill_status;
+
+                var pushTime = new Date(pushTimeStamp * 1000)
+                
+								var lastHtml = "";
+								var orderUrl = "/datareport/page/order/detail/" + orderCode;
+							
+								if(orderStatus === 0){
+									orderStatusHtml = "待付款";
+									orderStatusHtmls = "notpay";
+									lastHtml = `<div class="card-footer">
+													<a  class="btn cancle" onclick="cancelOrder(${id},this)">取消订单</a>
+													<a onclick="setSessionStorage()" href="/datareport/page/pay?ordercode=${orderCode}" class="btn green-btn">去支付</a>
+												</div>`;
+								}else if(orderStatus === 1){
+									orderStatusHtml = "已完成";
+                  orderStatusHtmls ="finish";
+                  if(applybillStatus==1){
+                		lastHtml = `<div class="card-footer">
+											<a onclick="checkinvoice(this)" class="btn cancle">查看发票</a>
+										</div>`
+                  }else{
+                		lastHtml = `<div class="card-footer">
+											<a onclick="invoiceAdd(this)" class="btn cancle">开发票</a>
+										</div>`
+                  }
+								}else{
+									orderStatusHtml = "已取消";
+                  orderStatusHtmls = "status-text";
+								}
+
+								listhtml += `<div class="card">
+												<div class="card-header">
+													<span class="time">${createTime}</span>
+													<span class="status ${orderStatusHtmls}">${orderStatusHtml}</span>
+													<a class="shanchu iconfont  icon-shanchu" title="删除订单" onclick="deleteOrder(${id},this)"></a>
+													
+												</div>
+												<div class="card-content">
+													<a onclick="setSessionStorage()" href="${orderUrl}" eid="${orderCode}" class="media" datareportOrder="true">
+														<div class="media-img">
+															<img src="/jyapp/datareport/image/report_icon.png">
+														</div>
+														<div class="media-info">
+														  <p class="item-ifo ellipsis">报告名称:${reportName}</p>
+										          <p class="item-ifo ellipsis">发布日期:${pushTime.getFullYear()}/${pushTime.getMonth() + 1}/${pushTime.getDate()}</p>	
+                            </div>
+													</a>
+													<div class="price">
+														<strong class="current">¥${formatMoney(orderMoney)}</strong>
+													</div>
+												</div>
+												${lastHtml}
+											</div>`
 							}else if (obj.product_type=="企业商机管理"){
 								if(typ==1 || $(".tab-link.active").index() === 1){	//待付款订单列表页
 									if(obj.order_status==-2){
@@ -2291,11 +2449,13 @@
 			})
 				//查看发票
 				function checkinvoice(e) {
+          setSessionStorage()
 					var orderCode = $(e).parent(".card-footer").prev(".card-content").find("a").attr("eid");
 					window.location.href = "/jyapp/front/invoice/check_invoice.html?order_code="+orderCode;
 				}
 				//开发票
   			function invoiceAdd(e){
+          setSessionStorage()
   				var orderCode = $(e).parent(".card-footer").prev(".card-content").find("a").attr("eid");
           $.post("/subscribepay/orderListDetails/isOver", {"order_code":orderCode}, function(data) {
               if(data.status==1){

+ 1 - 1
src/jfw/modules/app/src/web/templates/dataExport/dataExport_toOrderDetail.html

@@ -760,7 +760,7 @@
 										var wait_html = '<div class="bg nopay-bg"><h3 class="status">待付款</h3><p class="remaining"></p><div>'
 
 										$(".order-main").before(wait_html)
-										startTimeOver(r.data.create_time,r.data.countdown)
+										// startTimeOver(r.data.create_time,r.data.countdown)
 										var go_pay = ''
 										go_pay += '<div class="j-button-group" ><button class="j-button-confirm" id="buy" onclick="choosePayWay(\''+r.data.order_code+'\',\''+filter_id+'\')">立即支付</button></div>'
 										$(".j-footer").append(go_pay)

+ 81 - 60
src/jfw/modules/app/src/web/templates/invoice/check_invoice.html

@@ -113,68 +113,18 @@
 		var u = navigator.userAgent, app = navigator.appVersion;
 		var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Linux') > -1;
         $(function () {
-            $.ajax({
-                url:"/jypay/invoice/show",
-                type:"POST",
-                data:{"order_code":order_code},
-                success:function (r) {
-                    console.log("rrrr",r)
-                    if (r.data !=""){
-                        $(".taitou").text(r.data.invoice_type)
-                        $("#phone_num").text(r.data.phone);
-                        $("#identification_number").text(r.data.taxpayer_identnum)
-                        if(r.data.company_name == null||r.data.company_name == ""){
-                            $("#company").hide()
-                            $("#id_number").hide()
-                        }else{
-                            $("#company_name").text(r.data.company_name)
-                            $("#identification_number").text(r.data.taxpayer_identnum)
-                        }
-                        $("#e-mail").text(r.data.mail)
-                        if (r.status == "success"){
-                            $("#process li").addClass("active")
-                            $("#processing").hide()
-                            $("#change").show()
-                            download_url = r.data.url
-                            $("#show_invoice").attr('href_',r.data.url);
-                            if (r.data.invoice_changed == 1){
-                                $(".j-footer").html("");
-                                var checkinvoice = ' <div class="j-button-group" id="processing" onclick="download(\''+download_url+'\')"><a id="show_invoice" href_='+r.data.url+' + class="j-button-confirm">查看发票</a></div>'
-                                $(".j-footer").append(checkinvoice)
-
-                            }
-
-                        }else{
-                            if (r.data.invoice_status == -1){
-                                $(".change").hide()
-                                $("#processing").hide()
-                                changed = r.data.invoice_changed
-                                $.post("/subscribepay/orderListDetails/isOver", {"order_code":order_code,"ischanged": "true"}, function(data) {
+            var interval;
+            var isOk =false;
+            checkInvoiceStatus(order_code);
+            function checkInvoiceStatus(order_code){
+                if (interval) {
+                    clearInterval(interval);
+                }
+                clicktime()
+                interval = setInterval(clicktime ,2000)
 
-                                    if(data.status==1){
-                                        $(".backInvoice").show()
-                                    }else{
-                                        window.location.href = "/jyapp/front/cantInvoice";
-                                    };
-                                })
-                            }
-                        }
-                    }else{
-                        $("#phone_num").text(r.datas.user_phone);
-                        $("#identification_number").text(r.datas.applybill_taxnum)
-                        if(typeof (r.datas.applybill_company) == "undefined"||r.datas.applybill_company == null){
-                            $("#company").hide()
-                            $("#id_number").hide()
-                        }else{
-                            $("#company_name").text(r.data.applybill_company)
-                            $("#identification_number").text(r.data.applybill_taxnum)
-                        }
-                        $("#e-mail").text(r.datas.user_mail)
-                        $("#processing").hide()
-                    }
+            }
 
-                }
-            })
             if (getParam("cc")=="replaceInv"){
               $(".again_inv").hide();
             }
@@ -254,6 +204,77 @@
                         window.open("/jyapp/front/invoice/showpage?order_code="+order_code+"&c=1&isSys=true",'_self');
                     }
         })
+
+        //查看发票接口
+        function clicktime (){
+            $.ajax({
+                url:"/jypay/invoice/show",
+                type:"POST",
+                data:{"order_code":order_code},
+                success:function (r) {
+                    console.log("rrrr",r)
+                    if (r.data !=""){
+                        $(".taitou").text(r.data.invoice_type)
+                        $("#phone_num").text(r.data.phone);
+                        $("#identification_number").text(r.data.taxpayer_identnum)
+                        if(r.data.company_name == null||r.data.company_name == ""){
+                            $("#company").hide()
+                            $("#id_number").hide()
+                        }else{
+                            $("#company_name").text(r.data.company_name)
+                            $("#identification_number").text(r.data.taxpayer_identnum)
+                        }
+                        $("#e-mail").text(r.data.mail)
+                        if (r.status == "success"){
+                            $("#process li").addClass("active")
+                            $("#processing").hide()
+                            $("#change").show()
+                            download_url = r.data.url
+                            $("#show_invoice").attr('href_',r.data.url);
+                            if (r.data.invoice_changed == 1){
+                                $(".j-footer").html("");
+                                var checkinvoice = ' <div class="j-button-group" id="processing" onclick="download(\''+download_url+'\')"><a id="show_invoice" href_='+r.data.url+' + class="j-button-confirm">查看发票</a></div>'
+                                $(".j-footer").append(checkinvoice)
+
+                            }
+                            isOk=true;
+
+                        }else{
+                            if (r.data.invoice_status == -1){
+                                $(".change").hide()
+                                $("#processing").hide()
+                                changed = r.data.invoice_changed
+                                $.post("/subscribepay/orderListDetails/isOver", {"order_code":order_code,"ischanged": "true"}, function(data) {
+
+                                    if(data.status==1){
+                                        $(".backInvoice").show()
+                                    }else{
+                                        window.location.href = "/jyapp/front/cantInvoice";
+                                    };
+                                })
+                            }
+                        }
+                    }else{
+                        $("#phone_num").text(r.datas.user_phone);
+                        $("#identification_number").text(r.datas.applybill_taxnum)
+                        if(typeof (r.datas.applybill_company) == "undefined"||r.datas.applybill_company == null){
+                            $("#company").hide()
+                            $("#id_number").hide()
+                        }else{
+                            $("#company_name").text(r.datas.applybill_company)
+                            $("#identification_number").text(r.data.applybill_taxnum)
+                        }
+                        $("#e-mail").text(r.datas.user_mail)
+                        $("#processing").hide()
+                        isOk=true;
+                    }
+
+                }
+            })
+            if (isOk) {
+                clearInterval(interval);
+            }
+        }
     </script>
 </body>
 </html>

+ 3 - 0
src/jfw/modules/app/src/web/templates/invoice/invoicing.html

@@ -147,6 +147,9 @@
                                 if (product_name == 0){  //历史数据
                                     $(".user-phone").attr("value",r.datas.user_phone)
                                     $(".user-mail").attr("value",r.datas.user_mail)
+									invoice.phoneStatus = true;
+									invoice.emailStatus = true;
+									$(".j-button-confirm").removeAttr("disabled")
                                 }
                                 if (r.datas.applybill_status == 1){
                                     $(".j-footer").hide();

+ 8 - 1
src/jfw/modules/app/src/web/templates/me/mine.html

@@ -287,8 +287,15 @@ color:#1d1d1d;
     <script src="{{Msg "seo" "cdn"}}/jyapp/js/fastclick.js?v={{Msg "seo" "version"}}"></script>
 	{{include "/common/js.html"}}
     <script>
+    var isExaminePhone={{session "s_phone"}}=="18613717801";
     $(function () {
-      var isPageHide = false;   
+        if(isExaminePhone){
+          $(".u_right.govip").remove();
+        }
+        // 商机管理购买成功:记录从哪个页面跳到去购买的
+        sessionStorage.setItem('paySuccessNextStepLink', location.pathname);
+
+        var isPageHide = false;
 			window.addEventListener('pageshow', function () {      
 				if (isPageHide) {
 					location.reload();

+ 13 - 0
src/jfw/modules/app/src/web/templates/vipsubscribe/vip_introduce.html

@@ -146,6 +146,19 @@
                 <a onclick="window.location.replace('/jyapp/vipsubscribe/vipsubscribe_new')" class="subscribe_btn j-button">去订阅</a>
             </div>
             {{end}}
+            <script>
+              var phone = {{session "s_phone"}}
+              if(phone=="18613717801"){
+                document.write('<div style="color: #2CB7CA;border-top: 1px solid #ddd;font-size: .33rem;background-color: #fff;position: absolute;left: 0px;right: 0px;top: 0px;bottom: 0px;text-align: center;">详情请咨询<span style="font-size: .28rem;padding-left: 10px;">zhengkun@topnet.net.cn</span></div>');  
+              }else{
+                var html = "";
+                {{if not .T.notShowTrial}}
+                  html += '<a onclick="window.location.replace(\'/jyapp/vipsubscribe/trialInfo\')" class="try_btn">试用7天</a>';
+                {{end}}
+                html += '<a onclick="window.location.replace(\'/jyapp/vipsubscribe/vipsubscribe_new\')" class="subscribe_btn">去订阅</a>';
+                document.write(html);
+              }
+            </script>
         </div>
     </div>
 </div>

+ 58 - 97
src/jfw/modules/app/src/web/templates/weixin/follow/set.html

@@ -2,7 +2,6 @@
 <head>
 <title>项目信息</title>
 {{include "/common/meta.html"}}
-<link href="{{Msg "seo" "cdn"}}/jyapp/mobiscroll/mobiscroll.min.css?v={{Msg "seo" "version"}}" rel="stylesheet">
 <link href="{{Msg "seo" "cdn"}}/jyapp/css/common.css?v={{Msg "seo" "version"}}" rel="stylesheet">
 <link href="{{Msg "seo" "cdn"}}/jyapp/css/follow.css?v={{Msg "seo" "version"}}" rel="stylesheet">
 <script src="{{Msg "seo" "cdn"}}/jyapp/js/jquery.js?v={{Msg "seo" "version"}}"></script>
@@ -10,7 +9,6 @@
 <script src="{{Msg "seo" "cdn"}}/jyapp/vipsubscribe/js/weui.min.js?v={{Msg "seo" "version"}}"></script>
 {{include "/common/js.html"}}
 <script src="{{Msg "seo" "cdn"}}/jyapp/js/fastclick.js?v={{Msg "seo" "version"}}"></script>
-<!--<script src="{{Msg "seo" "cdn"}}/jyapp/mobiscroll/mobiscroll.min.js?v={{Msg "seo" "version"}}"></script>-->
 <script>
 	var hasReload = false;
 	if(sessionStorage){
@@ -239,7 +237,7 @@
 			defaults.end = new Date(defaults.end.replace(/-/g, '/'));
 		}
 
-		var findBy = function findBy(array, key, value) {
+			var findBy = function findBy(array, key, value) {
 			for (var i = 0, len = array.length; i < len; i++) {
 				var _obj = array[i];
 
@@ -252,8 +250,18 @@
 		var date = [];
 		var tempS = new Date(defaults.start.getTime())
 		var tempE = new Date(defaults.end.getTime())
+		var tempDefaultE = new Date(defaults.end.getTime())
+		// console.log('fix before', defaults.end.toLocaleString())
+		tempDefaultE.setHours(0)
+		tempDefaultE.setMinutes(0)
+		tempDefaultE.setSeconds(0)
+		defaults.end = new Date(tempDefaultE.getTime() + 60 * 60 * 24 * 1000)
+		// console.log('fix', defaults.end.toLocaleString(), tempDefaultE.toLocaleString())
+		// if (tempE.getFullYear() == tempS.getFullYear() && (tempE.getMonth() + 1) == (tempS.getMonth() + 1) && tempE.getDate() != tempS.getDate()) {
+		// 	defaults.end.setDate(defaults.end.getDate() + 1)
+		// }
 		var interval = weuiCron().parse(defaults.cron, defaults.start, defaults.end);
-		console.log(tempS.toLocaleString(), tempE.toLocaleString())
+		// console.log(tempS.toLocaleString(), tempE.toLocaleString())
 		var obj;
 
 		do {
@@ -283,10 +291,22 @@
 				Y.children.push(M);
 			}
 			var cc = Fixhours
-			console.log('s', tempS.toLocaleString(), obj.value.toLocaleString())
-			if (year == tempS.getFullYear() && month == (tempS.getMonth() + 1) && day == tempS.getDate()) {
+			var isS = year == tempS.getFullYear() && month == (tempS.getMonth() + 1) && day == tempS.getDate()
+			var isE = year == tempE.getFullYear() && month == (tempE.getMonth() + 1) && day == tempE.getDate()
+			// console.log(isS, isE, obj.value.toLocaleString())
+			// console.log(tempS.getHours(), tempE.getHours())
+			if (isS) {
 				cc = costomDatePicker([], tempS.getHours(), 24, '时')
 			}
+			if (isE) {
+				var maxT = tempE.getHours() + 1
+				cc = costomDatePicker([], 0, maxT > 24 ? 24 : maxT, '时')
+			}
+			if (isS && isE) {
+				var maxT = tempE.getHours() + 1
+				cc = costomDatePicker([], tempS.getHours(), maxT > 24 ? 24 : maxT, '时')
+			}
+
 			M.children.push({
 				label: day + '日',
 				value: day,
@@ -345,11 +365,7 @@ function beforeRedirect(obj,sid,link,isOld){
 		newredirect("",link,sid);
 	}
 }
-function afterRemindtimeSelect(date){
-	$("#bidopentime>.time").mobiscroll('getInst').option({minDate: date});
-	l_remindtime = date.getTime()+"";
-	l_remindtime = l_remindtime.substring(0,l_remindtime.length - 3);
-}
+
 function pageJump(){
 	setTimeout(function(){
 		if(sessionStorage){
@@ -762,54 +778,44 @@ $(function(){
 	var weekDay = ["周日", "周一", "周二", "周三", "周四", "周五", "周六"];
 	// 显示记录值
 	var nowStartTime, nowEndTime;
-	function getDefaultTime () {
-		var stime = $("#starttime").val();
-		var etime = $("#endtime").val();
-		var regTime = new RegExp(/\d{4}年\d{2}月\d{2}日/)
-		if (stime && regTime.test(stime)) {
-			nowStartTime = stime.replace('日', '').split(/[年|月]/)
-		}
-		if (etime && regTime.test(etime)) {
-			nowEndTime = etime.replace('日', '').split(/[年|月]/)
-		}
-	}
-	var nowStartTime, nowEndTime, minStartTime, minEndTime;
+	var minSTime, minETime;
 	function getDefaultNowTime () {
-		minStartTime = minDate
-		// l_bidopentime = new Date().getTime() + 60 * 60 * 24 * 1000
-		l_bidopentime = new Date('2020/06/03 19:30:00').getTime()
-		// l_bidopentime = Number(l_bidopentime + '000')
-		console.log(new Date(l_bidopentime).toLocaleString())
-		if(l_bidopentime != "" && minDate.getTime() <= l_bidopentime){
-			console.log('s')
-			minStartTime = new Date(Number(l_bidopentime))
-			minEndTime = new Date(Number(l_bidopentime) - 60 * 60 * 24 * 1000)
-			nowStartTime = nowDateForHour(Number(l_bidopentime))
-			nowEndTime = nowDateForHour(Number(l_bidopentime) - 60 * 60 * 24 * 1000)
-			var time_result = nowStartTime[0] + '年' + nowStartTime[1] + '月' + nowStartTime[2] + '日 ' + nowStartTime[3] + '时 ' + weekDay[minStartTime.getDay()];
-			$("#bidopentime input").val(time_result).attr('value', time_result)
-			if (minDate.getTime() > minEndTime) {
-				nowEndTime = nowDateForHour(minDate.getTime())
+		// 获取默认值 开标
+		if (l_bidopentime != '') {
+			minSTime = new Date(Number(l_bidopentime + '000'))
+			// 默认值低,需使用最小值
+			if (minSTime.getTime() < minDate.getTime()) {
+				minSTime = new Date(minDate.getTime())
+			}
+		} else {
+			minSTime = new Date(minDate.getTime())
+		}
+		nowStartTime = nowDateForHour(minSTime.getTime())
+
+		// 获取默认值 提醒
+		minETime = new Date(minDate.getTime())
+		if (l_remindtime != '') {
+			var tempNowDate = new Date(Number(l_remindtime + '000'))
+			nowEndTime = nowDateForHour(tempNowDate.getTime())
+			// 默认值低
+			if (minETime.getTime() > tempNowDate.getTime()) {
+				nowEndTime = nowDateForHour(minETime.getTime())
 			}
-			var time_result_end = nowEndTime[0] + '年' + nowEndTime[1] + '月' + nowEndTime[2] + '日 ' + nowEndTime[3] + '时 ' + weekDay[new Date(Number(l_bidopentime) - 60 * 60 * 24 * 1000).getDay()];
-			$("#remindtime input").val(time_result_end).attr('value', time_result_end)
 		} else {
-			$("#bidopentime input").val('').attr('value', '')
-			$("#remindtime input").val('').attr('value', '')
+			nowEndTime = nowDateForHour(minETime.getTime())
 		}
 	}
 	getDefaultNowTime()
 	$("#bidopentime").click(function(){
-		console.log(nowStartTime)
 		if(!remind){
 			return false;
 		}
 		datePickerForHour({
 			id: 'start' + new Date().getTime(),
-			start: minStartTime,
+			start: new Date(minSTime.getTime()),
 			title: '选择开标时间',
 			cron: '* * *',
-			end: nowEndTime ? nowEndTime.join('-') : new Date().getFullYear()+5,
+			end: new Date().getFullYear()+5,
 			defaultValue: nowStartTime ? nowStartTime : nowDate.split('/'),
 			className: 'jymobile-datePicker start',
 			onChange: function (result) {
@@ -847,9 +853,12 @@ $(function(){
 				}
 
 				if(!setRemindTimeFlag){
-					maxPickerTime = defaultValue
 					l_remindtime = defaultValue.getTime()+"";
 					l_remindtime = l_remindtime.substring(0,l_remindtime.length - 3);
+					var tl_remindtime = Number(l_remindtime + '000')
+					nowEndTime = nowDateForHour(Number(tl_remindtime))
+					var time_result_end = nowEndTime[0] + '年' + nowEndTime[1] + '月' + nowEndTime[2] + '日 ' + nowEndTime[3] + '时 ' + weekDay[new Date(Number(tl_remindtime)).getDay()];
+					$("#remindtime input").val(time_result_end).attr('value', time_result_end)
 				}
 				l_bidopentime = date.getTime()+"";
 				l_bidopentime = l_bidopentime.substring(0,l_bidopentime.length - 3);
@@ -857,41 +866,18 @@ $(function(){
 			}
 		});
 		$(".jymobile-datePicker.start #weui-picker-confirm").text('确认')
-		if (!nowStartTime) {return}
-		$(".jymobile-datePicker.start .weui-half-screen-dialog__ft").prepend(`<a href="javascript:;" class="weui-btn weui-btn_disabled weui-picker__btn" id="resetTime" data-action="select" style="text-decoration: none;">重置</a>`)
-		$(".jymobile-datePicker.start #resetTime").on('click',function () {
-			$('.jymobile-datePicker.start .weui-mask.weui-animate-fade-in').trigger('click');
-			$('.jymobile-datePicker.start .weui-mask.weui-animate-fade-in').click();
-			$("#starttime").attr("value","").val('');
-			nowStartTime = null
-			localStorage.removeItem("export_starttime");
-			if ($("#endtime").val()==""){
-				$("#endtime").removeClass("timeSelect");
-				$("#starttime").removeClass("timeSelect");
-				$(".dateMake").css({"color":"#000"});
-				$(".chooseTime > i").css("color","#888");
-				$(".chooseTime ul li").removeClass('active');
-				$(".chooseTime ul li:eq(0)").addClass('active');
-			}
-		})
 		return false;
 	});
 	$("#remindtime").click(function(){
-		console.log(nowStartTime, nowEndTime)
 		if(!remind){
 			return false;
 		}
-		if(l_remindtime != "" && !nowEndTime){
-			nowEndTime = nowDateForHour(Number(l_remindtime+"000"))
-		}
-		console.log(remindtimeMinDate.toLocaleString(), remindtimeMaxDate.toLocaleString())
-		console.log(nowStartTime ? new Date(nowStartTime[0] + '/' + nowStartTime[1] + '/' + nowStartTime[2] + ' ' + nowStartTime[3] + ':00:00') : remindtimeMaxDate)
 		datePickerForHour({
 			id: 'end' + new Date().getTime(),
-			start: remindtimeMinDate,
+			start: new Date(minETime.getTime()),
 			title: '选择提醒时间',
 			cron: '* * *',
-			end: nowStartTime ? new Date(nowStartTime[0] + '/' + nowStartTime[1] + '/' + nowStartTime[2] + ' ' + nowStartTime[3] + ':00:00') : remindtimeMaxDate,
+			end: new Date(nowStartTime[0] + '/' + nowStartTime[1] + '/' + nowStartTime[2] + ' ' + nowStartTime[3] + ':00:00'),
 			defaultValue: nowEndTime ? nowEndTime : nowDate.split('/'),
 			className: 'jymobile-datePicker end',
 			onChange: function (result) {
@@ -916,17 +902,9 @@ $(function(){
 				nowEndTime = [year, month, day, hour]
 
 				var date = new Date(timeSec);
+				minSTime = new Date(timeSec)
 				var time_result = year + '年' + month + '月' + day + '日 ' + hour + '时 ' + weekDay[date.getDay()];
 				$("#remindtime input").val(time_result).attr('value', time_result)
-				var now = new Date();
-				var defaultValue = null;
-				if(!(now.getFullYear() == date.getFullYear() && now.getMonth() == date.getMonth() && now.getDate() == date.getDate())){
-					defaultValue = new Date(date.getTime());
-					defaultValue.setDate(defaultValue.getDate() - 1);
-				}else{
-					defaultValue = new Date(now.getFullYear(),now.getMonth(),now.getDate(),now.getHours());
-					defaultValue.setHours(defaultValue.getHours() + 1);
-				}
 
 				setRemindTimeFlag = true;
 				l_remindtime = date.getTime()+"";
@@ -935,23 +913,6 @@ $(function(){
 			}
 		});
 		$(".jymobile-datePicker.end #weui-picker-confirm").text('确认')
-		if (!nowStartTime) {return}
-		$(".jymobile-datePicker.end .weui-half-screen-dialog__ft").prepend(`<a href="javascript:;" class="weui-btn weui-btn_disabled weui-picker__btn" id="resetTime" data-action="select" style="text-decoration: none;">重置</a>`)
-		$(".jymobile-datePicker.end #resetTime").on('click',function () {
-			$('.jymobile-datePicker.start .weui-mask.weui-animate-fade-in').trigger('click');
-			$('.jymobile-datePicker.start .weui-mask.weui-animate-fade-in').click();
-			$("#starttime").attr("value","").val('');
-			nowStartTime = null
-			localStorage.removeItem("export_starttime");
-			if ($("#endtime").val()==""){
-				$("#endtime").removeClass("timeSelect");
-				$("#starttime").removeClass("timeSelect");
-				$(".dateMake").css({"color":"#000"});
-				$(".chooseTime > i").css("color","#888");
-				$(".chooseTime ul li").removeClass('active');
-				$(".chooseTime ul li:eq(0)").addClass('active');
-			}
-		})
 		return false;
 	});
 	$("#hasNoFollow-sure").click(function(){

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

@@ -11,7 +11,62 @@
     <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/jyapp/vipsubscribe/css/weui.min.css?v={{Msg "seo" "version"}}"/>
     <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/jyapp/vipsubscribe/iconfont/iconfont.css?v={{Msg "seo" "version"}}"/>
     <script>
-		//
+        /*
+        * money unit for zyh @date 2020/6/5
+        * */
+        var MoneyUnit = {
+            levelArr: ['元', '万元', '亿元', '万亿元'],
+            test: function (num, type, lv) {
+                if (type === void 0) {
+                    type = 'string';
+                }
+
+                if (lv === void 0) {
+                    lv = 0;
+                }
+
+                if (num === 0) {
+                    if (type === 'string') {
+                        return '0';
+                    }
+
+                    if (type === 'lv') {
+                        return this.levelArr[lv];
+                    }
+
+                    if (type === 'number') {
+                        return 0;
+                    }
+
+                    if (type === 'index') {
+                        return lv;
+                    }
+                }
+
+                var result = num / Math.pow(10000, lv);
+
+                if (result > 10000 && lv < 2) {
+                    return this.test(num, type, lv + 1);
+                } else {
+                    if (type === 'string') {
+                        return result.toFixed(2).replace('.00', '') + this.levelArr[lv];
+                    }
+
+                    if (type === 'lv') {
+                        return this.levelArr[lv];
+                    }
+
+                    if (type === 'index') {
+                        return lv;
+                    }
+
+                    if (type === 'number') {
+                        return result.toFixed(2).replace('.00', '');
+                    }
+                }
+            }
+        }
+        var isExaminePhone={{session "s_phone"}}=="18613717801";
     		function afterReceivePushMessage(type,url){
           if(type=="bid" || type=="vipreport"){
             JyObj.showRedSpotOnMenu("subscribe");
@@ -47,6 +102,10 @@
             }
         }
         $(function () {
+            if(isExaminePhone){
+              $(".app-layout-header>ul>li:eq(1)").css("visibility","hidden");
+              $(".header_header,.open_remind,.renew_toast,._renew_toast,.nv_renew_toast,.vip_report_tip").remove();
+            }
             setTimeout(function(){
               loadJS("{{Msg "seo" "cdn"}}/jyapp/js/fastclick.js?v={{Msg "seo" "version"}}",function(){
                 FastClick.attach(document.body);
@@ -507,6 +566,14 @@
                         industryListname = '<span class="industry">' + industryname + '</span>';
                     }
                 }
+                // 预算:budget;中标:bidamount
+                var moneyList = "";
+                if (obj.budget != null && obj.budget != "") {
+                    moneyList = '<span class="industry money">' + MoneyUnit.test(obj.budget) + '</span>';
+                }
+                if (obj.bidamount != null && obj.bidamount != "") {
+                    moneyList = '<span class="industry money">' + MoneyUnit.test(obj.bidamount) + '</span>';
+                }
                 //时间
                 var showdateList = ""
                 var showdateTable = ""
@@ -524,7 +591,7 @@
                 if (projectM == 1) {
                     projectMList = '<span class="projectM">项目匹配</span>'
                 } else {
-                    projectMList = areaList + datatypeList + industryListname
+                    projectMList = areaList + industryListname + datatypeList + moneyList
                 }
                 //序号位置
                 var paddingLeft = 20
@@ -1297,6 +1364,7 @@
                 $(".jymobile-datePicker .weui-mask").trigger('click')
             } else {
                 var computedTop = $("._header").offset().top + $("._header").height() - 1
+                $("._header").addClass('fix-top')
                 $(".filter_tab").addClass('is-hide-border')
                 weui.datePicker({
                     id: 'up',
@@ -1318,6 +1386,7 @@
                         })
                     },
                     onClose: function () {
+                        $("._header").removeClass('fix-top')
                         $(".filter_tab").removeClass('is-hide-border')
                         closeTimePicker()
                     },

+ 138 - 11
src/jfw/modules/app/src/web/templates/weixin/search/mainSearch.html

@@ -23,6 +23,10 @@
 	SuperSearch.sortArray = {{.T.sortArray}};
 	var CDN = {{Msg "seo" "cdn"}};
 	var VERSION = {{Msg "seo" "version"}};
+  var isExaminePhone={{session "s_phone"}}=="18613717801";
+  if(mySysIsIos()&&(userId==null||userId==""||isExaminePhone)){
+    localStorage.setItem("Active_Vip_Invite",new Date().getTime());
+  }
 </script>
 </head>
 <body id="home_main" class="p13">
@@ -36,6 +40,120 @@
 	body .loading_,body .loading_Top{
 		margin-top:0px;
 	}
+	.p13 .home .top .home_banner {
+		padding: 0;
+		margin-top: 0.3rem;
+		position: relative;
+	}
+	.p13 .home .top .home_banner::after {
+		content: "";
+		display: block;
+		position: absolute;
+		top: 0;
+		left: 0.3rem;
+		width: 6.86rem;
+		height: 2.4rem;
+		border-radius: 8px;
+		background: #EDEFF2;
+	}
+	.p13 .home .top .home_search {
+		height: 0.92rem;
+		/*height: 0.8rem;*/
+		border-radius: 0.16rem;
+		background: #fff;
+		/*background: #F5F6F7;*/
+		border: 0.5px solid rgba(0, 0, 0, 0.05);
+	}
+	.p13 .home .top .home_search .home_search_left {
+		height: 100%;
+	}
+	.p13 .home .top .home_banner .lunbo .custorm_dot {
+		bottom: 0.12rem;
+	}
+	.p13 .home .top .home_banner .lunbo {
+		padding: 0 0.3rem;
+		height: 2.4rem;
+	}
+	.p13 .home .home_tab {
+		padding: 0 0.32rem;
+		background: #fff;
+		border-bottom: none;
+	}
+	.p13 .home .top {
+		height: auto;
+		background: none;
+		padding-top: 0;
+		background: #fff;
+	}
+	.p13 .home .home_tab .tab_container .tab_item img {
+		width: 0.88rem;
+		height: 0.88rem;
+	}
+	.p13 .home .home_tab .tab_container .tab_item span {
+		color: #171826;
+		font-size: 0.24rem;
+	}
+	.p13 .home .top .home_banner .lunbo .swiper-slide a img {
+		background: #EDEFF2;
+	}
+	.p13 .home .home_tab .tab_container::after {
+		content: '';
+		position: absolute;
+		bottom: 0;
+		background: rgba(0, 0, 0, 0.05);
+		width: 100%;
+		height: 1px;
+		-webkit-transform: scaleY(0.5);
+		transform: scaleY(0.5);
+		-webkit-transform-origin: 0 0;
+		transform-origin: 0 0;
+	}
+	.p13 .home .home_tab .tab_container {
+		padding: 0.5rem 0;
+		border-bottom: none;
+		position: relative;
+	}
+	.p13 .swiper-slide {
+		border-radius: 8px;
+		max-height: 2.4rem;
+		overflow: hidden;
+	}
+	.p13 .top-bg-box {
+		position: relative;
+		padding-top: 1.04rem;
+		/*height: 4.32rem;*/
+	}
+	.p13 .top-bg-right {
+		position: absolute;
+		width: 450px;
+		height: 450px;
+		border-radius: 50%;
+		right: -201px;
+		top: -254px;
+		background: linear-gradient(0deg, #29B9CC 0%, #2AD1D1 100%);
+	}
+	.p13 .top-bg-left {
+		position: absolute;
+		width: 400px;
+		height: 400px;
+		border-radius: 50%;
+		top: -184px;
+		left: -73px;
+		background: #29B9CC;
+	}
+	.p13 .top-title {
+		font-weight: bold;
+		font-size: 0.44rem;
+		line-height: 0.64rem;
+		color: #FFFFFF;
+		position: relative;
+		margin-left: 0.32rem;
+		margin-bottom: 0.32rem;
+	}
+	.p13 .home .top .home_search {
+		position: relative;
+		margin: 0 0.32rem;
+	}
 </style>
 
 <div class="loading_Top" style="display: none;">
@@ -56,6 +174,11 @@
 		<!--2.8.5 start-->
 		<div class="home">
 	        <div class="top">
+				<div class="top-bg-box">
+					<div class="top-bg-right"></div>
+					<div class="top-bg-left"></div>
+				</div>
+				<div class="top-title">剑鱼标讯</div>
 	            <div class="home_search">
 <!--					<input class="inp-search" type="text" name="" value="" maxlength="50" placeholder="示例:税务局 软件" readonly="">-->
 	                <div class="home_search_left inp-search">
@@ -63,10 +186,10 @@
 <!--	                    <img class="icon_search" src="{{Msg "seo" "cdn"}}/jyapp/images/search/home_search.png?v={{Msg "seo" "version"}}" alt="">-->
 	                    <span>示例:税务局 软件</span>
 	                </div>
-	                <div class="home_search_right">
-						<div class="jy_sprite_main sprite_home_question icon_question"></div>
-<!--	                    <img class="icon_question" src="{{Msg "seo" "cdn"}}/jyapp/images/search/home_question.png?v={{Msg "seo" "version"}}" alt="">-->
-	                </div>
+<!--	                <div class="home_search_right">-->
+<!--						<div class="jy_sprite_main sprite_home_question icon_question"></div>-->
+<!--&lt;!&ndash;	                    <img class="icon_question" src="{{Msg "seo" "cdn"}}/jyapp/images/search/home_question.png?v={{Msg "seo" "version"}}" alt="">&ndash;&gt;-->
+<!--	                </div>-->
 	            </div>
 	            <div class="home_banner">
 	                <div class="swiper-container lunbo" id="swiper1">
@@ -81,18 +204,18 @@
 	        <div class="home_tab">
 	            <div class="tab_container">
 	                <a class="tab_item">
-						<div class="jy_sprite_main sprite_home_tab_1"></div>
-<!--	                    <img src="{{Msg "seo" "cdn"}}/jyapp/images/search/home_tab_1.png?v={{Msg "seo" "version"}}" alt="">-->
+<!--						<div class="jy_sprite_main sprite_home_tab_1"></div>-->
+	                    <img src="{{Msg "seo" "cdn"}}/jyapp/images/search/home_tab_1.png?v={{Msg "seo" "version"}}" alt="">
 	                    <span>搜中标企业</span>
 	                </a>
 	                <a class="tab_item">
-						<div class="jy_sprite_main sprite_home_tab_2"></div>
-<!--	                    <img src="{{Msg "seo" "cdn"}}/jyapp/images/search/home_tab_2.png?v={{Msg "seo" "version"}}" alt="">-->
+<!--						<div class="jy_sprite_main sprite_home_tab_2"></div>-->
+	                    <img src="{{Msg "seo" "cdn"}}/jyapp/images/search/home_tab_2.png?v={{Msg "seo" "version"}}" alt="">
 	                    <span>数据导出</span>
 	                </a>
 	                <a class="tab_item">
-						<div class="jy_sprite_main sprite_home_tab_light"></div>
-<!--	                    <img src="{{Msg "seo" "cdn"}}/jyapp/images/search/home_tab_light.png?v={{Msg "seo" "version"}}" alt="">-->
+<!--						<div class="jy_sprite_main sprite_home_tab_light"></div>-->
+	                    <img src="{{Msg "seo" "cdn"}}/jyapp/images/search/home_tab_3.png?v={{Msg "seo" "version"}}" alt="">
 	                    <span>商机管理</span>
 	                </a>
 					<!--
@@ -971,7 +1094,7 @@
 				if(userId==""){
 					window.location.href='/jyapp/free/login?back=index';
 				}else{
-					window.location.href='/jyapp/course/list';
+					window.location.href='/jyxsapp/';
 				}
 			},300);
     });
@@ -1028,6 +1151,10 @@
   		window.location.href = "/jyapp/free/login?to=back";
   		return;
   	}
+    var adv_name = $(e).parent().attr("adv_name");
+    if((localStorage.loginPhone=="18613717801"||isExaminePhone)&&adv_name&&adv_name.indexOf("APP搜索页轮播图")>-1){
+      return
+    }
 		//百度统计
 		var ce = $(e).parent();
  // if (ce.attr("adv_name")!="APP搜索列表页-中部"){

+ 4 - 0
src/jfw/modules/app/src/web/templates/weixin/wxkeyset/index.html

@@ -87,6 +87,7 @@
 }
 </style>
 <script>
+var isExaminePhone={{session "s_phone"}}=="18613717801";
 var isIOS = !!navigator.userAgent.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端
 var isfocusing = true;
 var focusinputindex = -1;
@@ -112,6 +113,9 @@ if(localStorage&&localStorage.tsGuide_status=="1"){
 	backUrl = "/jyapp/swordfish/historypush";
 }
 $(function(){
+  if(isExaminePhone){
+    $(".vip_banner").remove();
+  }
 	// 关闭设置弹窗
 	$('#close_set').on('click',() =>{
 		$('.msg_alert').hide();

+ 25 - 0
src/jfw/modules/datareport/src/a/init.go

@@ -0,0 +1,25 @@
+package initxweb
+
+import (
+	"service"
+	"time"
+
+	"github.com/go-xweb/httpsession"
+	"github.com/go-xweb/xweb"
+)
+
+func init() {
+	//开启redissession
+	httpsession.IsRedisSessionStore = true
+	xweb.Config.Profiler = true
+	xweb.RootApp().AppConfig.StaticFileVersion = false
+	xweb.RootApp().AppConfig.CheckXsrf = false
+	xweb.RootApp().AppConfig.EnableHttpCache = false
+	xweb.RootApp().AppConfig.Mode = xweb.Product
+	xweb.RootApp().AppConfig.ReloadTemplates = true
+	xweb.RootApp().AppConfig.SessionTimeout = 7 * 24 * time.Hour
+	xweb.RootApp().Logger.SetOutputLevel(1) //输出日志,改为4则不输出任何日志
+
+	xweb.AddRouter("/datareport/api", &service.NewDataReport{})
+	xweb.AddRouter("/datareport/api", &service.ReportOrder{})
+}

+ 31 - 0
src/jfw/modules/datareport/src/config.json

@@ -0,0 +1,31 @@
+{
+	"mongodbServers": "192.168.3.128:27080",
+    "mongodbPoolSize": 5,
+    "mongodbName": "qfw",
+    "redisaddrs": "other=192.168.3.128:1712,session=192.168.3.128:1712",
+    "webport": "92",
+    "jypayrpc":"127.0.0.1:8600",
+    "mysql": {
+        "dbName": "jianyu",
+        "address": "192.168.3.11:3366",
+        "userName": "root",
+        "passWord": "Topnet123",
+		"maxOpenConns":500,
+		"maxIdleConns":200
+    },
+    "mail": [
+        {
+            "addr": "smtp.exmail.qq.com",
+            "port": 465,
+            "pwd": "ue9Rg9Sf4CVtdm5a",
+            "user": "public03@topnet.net.cn"
+        },
+        {
+            "addr": "smtp.exmail.qq.com",
+            "port": 465,
+            "pwd": "ue9Rg9Sf4CVtdm5a",
+            "user": "public03@topnet.net.cn"
+        }
+    ],
+    "orderTimeoutHours":72
+}

+ 48 - 0
src/jfw/modules/datareport/src/config/config.go

@@ -0,0 +1,48 @@
+package config
+
+import (
+	qutil "qfw/util"
+	"qfw/util/mail"
+)
+
+type config struct {
+	MongodbServers  string
+	MongodbPoolSize int
+	MongodbName     string
+	Redisaddrs      string
+	Webport         string
+	Jypayrpc        string
+	Mysql           struct {
+		DbName       string
+		Address      string
+		UserName     string
+		PassWord     string
+		MaxOpenConns int
+		MaxIdleConns int
+	}
+	Mail []struct {
+		Addr string
+		Port int
+		Pwd  string
+		User string
+	}
+	OrderTimeoutHours int
+}
+
+var Config *config
+
+//发送邮件邮箱
+var GmailAuth []*mail.GmailAuth
+
+func init() {
+	qutil.ReadConfig(&Config)
+	for _, v := range Config.Mail {
+		mail := &mail.GmailAuth{
+			SmtpHost: v.Addr,
+			SmtpPort: v.Port,
+			User:     v.User,
+			Pwd:      v.Pwd,
+		}
+		GmailAuth = append(GmailAuth, mail)
+	}
+}

+ 109 - 0
src/jfw/modules/datareport/src/entity/report.go

@@ -0,0 +1,109 @@
+package entity
+
+import (
+	. "config"
+	"errors"
+	"log"
+	"net/rpc"
+	frpc "qfw/util/rpc"
+)
+
+var JyReportMamager reportOrder
+
+type reportOrder struct {
+}
+
+type ReportOutline struct {
+	ReportId    string //报告id
+	ReportName  string //报告名称
+	BrforePrice int    //原价
+	Price       int    //价格
+	Pushtime    int64  //发布日期
+	CoverUrl    string //封面地址
+	Email       string
+	Phone       string
+	Company     string
+}
+
+//创建订单
+func (this *reportOrder) CreateOrder(userid, openid string, outline ReportOutline) (string, error) {
+	r, err := rpc.DialHTTP("tcp", Config.Jypayrpc)
+	if err != nil {
+		return "", err
+	}
+	param := frpc.JyPayOrderParam{
+		Price:       outline.Price,
+		ProductType: "DATAREPORT",
+		Userid:      userid,
+		Openid:      openid,
+		Detail: map[string]interface{}{
+			"report_id":   outline.ReportId,
+			"report_name": outline.ReportName,
+			"s_price":     outline.BrforePrice,
+			"i_price":     outline.Price,
+			"l_pushtime":  outline.Pushtime,
+			"cover_url":   outline.CoverUrl,
+			"email":       outline.Email,
+			"phone":       outline.Phone,
+			"company":     outline.Company,
+		},
+	}
+	resData := frpc.JyPayOrderResult{}
+	err = r.Call("JyPayRpc.CreateOrder", param, &resData)
+	if err != nil {
+		return "", err
+	}
+	if resData.Status == -1 { //出错
+		return "", errors.New(resData.Err)
+	} else { //成功
+		return resData.OrderCode, nil
+	}
+}
+
+//选择支付方式
+func (this *reportOrder) FlushOrder(ordercode, pay_way, openid, ip string) (string, error) {
+	r, err := rpc.DialHTTP("tcp", Config.Jypayrpc)
+	if err != nil {
+		return "", err
+	}
+	param := frpc.JyPayOrderChangeParam{
+		ProductType: "DATAREPORT",
+		OrderCode:   ordercode,
+		Ip:          ip,
+		Openid:      openid,
+		PayWay:      pay_way,
+	}
+	resData := frpc.JyPayOrderResult{}
+	err = r.Call("JyPayRpc.FlushOrder", param, &resData)
+	if err != nil {
+		return "", err
+	}
+	if resData.Status == -1 { //出错
+		return "", errors.New(resData.Err)
+	} else { //成功
+		return resData.PayStr, nil
+	}
+}
+
+//关闭订单
+func (this *reportOrder) CloseOrder(ordercode string) error {
+	r, err := rpc.DialHTTP("tcp", Config.Jypayrpc)
+	if err != nil {
+		log.Println("DialHTTP: ", err)
+	}
+	param := frpc.JyPayOrderCloseParam{
+		ProductType: "DATAREPORT",
+		OrderCode:   ordercode,
+	}
+	resData := frpc.JyPayOrderResult{}
+	err = r.Call("JyPayRpc.CloseOrder", param, &resData)
+	if err != nil {
+		return nil
+	}
+	if resData.Status == -1 { //出错
+		log.Println(resData.Err)
+		return errors.New(resData.Err)
+	} else { //成功
+		return nil
+	}
+}

+ 9 - 0
src/jfw/modules/datareport/src/filter/filter.go

@@ -0,0 +1,9 @@
+package filter
+
+import (
+	"github.com/go-xweb/xweb"
+)
+
+func init() {
+	xweb.AddFilter(&sessionfilter{App: xweb.RootApp()})
+}

+ 22 - 0
src/jfw/modules/datareport/src/filter/sessionfilter.go

@@ -0,0 +1,22 @@
+package filter
+
+import (
+	"net/http"
+
+	"github.com/go-xweb/xweb"
+)
+
+//登录限制
+type sessionfilter struct {
+	App *xweb.App
+}
+
+//继承过滤器方法
+func (l *sessionfilter) Do(w http.ResponseWriter, req *http.Request) bool {
+	session := l.App.SessionManager.Session(req, w)
+	if session.Get("userId") == nil {
+		w.Write([]byte("{\"error_code\":1001,\"error_msg\":\"需要登录\"}"))
+		return false
+	}
+	return true
+}

+ 17 - 0
src/jfw/modules/datareport/src/main.go

@@ -0,0 +1,17 @@
+package main
+
+import (
+	_ "a"
+	. "config"
+	_ "filter"
+	"net/http"
+	_ "service"
+	_ "util"
+
+	"github.com/go-xweb/xweb"
+)
+
+func main() {
+	mux1 := http.NewServeMux()
+	xweb.RunBase(":"+Config.Webport, mux1)
+}

+ 309 - 0
src/jfw/modules/datareport/src/service/newDataReport.go

@@ -0,0 +1,309 @@
+package service
+
+import (
+	. "api"
+	"config"
+	"encoding/json"
+	"entity"
+	"fmt"
+	"log"
+	"math"
+	qutil "qfw/util"
+	"qfw/util/redis"
+	"strconv"
+	"strings"
+	"time"
+	"util"
+
+	"github.com/go-xweb/xweb"
+)
+
+//数据报告公共接口
+type NewDataReport struct {
+	*xweb.Action
+	reportList   xweb.Mapper `xweb:"/getList"`     //获取数据报告列表
+	reportDetail xweb.Mapper `xweb:"/getDetail"`   //获取数据报告详情页信息
+	orderSubmit  xweb.Mapper `xweb:"/orderSubmit"` //数据报告订单提交
+
+	sendEmailCode  xweb.Mapper `xweb:"/sendEmailCode"`  //发送邮箱验证码
+	checkEmailCode xweb.Mapper `xweb:"/checkEmailCode"` //校验邮箱验证码
+	userMsg        xweb.Mapper `xweb:"/userMsg"`        //用户信息回显
+	pay            xweb.Mapper `xweb:"/pay"`            //订单支付
+}
+
+var (
+	pageSize  = 10 //每页数据量
+	tableName = "jy_datareport"
+)
+
+//数据报告列表
+func (this *NewDataReport) ReportList() {
+	pageIndex, _ := this.GetInteger("page_index") //当前页码数
+	errMsg, data := func() (string, map[string]interface{}) {
+		pageIndex = qutil.If(pageIndex < 1, 1, pageIndex).(int)
+		key := "datareport_page_" + strconv.Itoa(pageIndex)
+		if dataArr := redis.Get("other", key); dataArr != nil {
+			counts := util.Mysql.Count(tableName, M{"report_status": 1, "isdelete": 0})
+			if counts == 0 {
+				return "未查询到数据", nil
+			}
+			pCounts := math.Ceil(float64(counts) / float64(pageSize))
+			return "", map[string]interface{}{
+				"page_count": pCounts,   //总页数
+				"page_index": pageIndex, //当前页数
+				"list":       dataArr,   //数据
+			}
+		}
+		count := util.Mysql.Count(tableName, M{"report_status": 1, "isdelete": 0})
+		if count == 0 {
+			return "未查询到数据", nil
+		}
+		rData := util.Mysql.Find(tableName, M{"report_status": 1, "isdelete": 0}, "", "create_time desc", (pageIndex-1)*pageSize, pageSize)
+		if rData == nil || len(*rData) == 0 {
+			return "数据查询异常", nil
+		}
+		resArr := []map[string]interface{}{}
+		for _, v := range *rData {
+			resArr = append(resArr, map[string]interface{}{
+				"id":           v["report_id"],
+				"title":        v["report_name"],
+				"price":        v["i_price"],
+				"before_price": v["s_price"],
+				"publishtime":  v["start_time"],
+				"img":          v["cover_url"],
+			})
+		}
+		redis.Put("other", key, resArr, 60)
+		pCount := math.Ceil(float64(count) / float64(pageSize))
+		return "", map[string]interface{}{
+			"page_count": pCount,    //总页数
+			"page_index": pageIndex, //当前页数
+			"list":       resArr,    //数据
+		}
+	}()
+	this.ServeJson(Result{
+		Data:       data,
+		Error_msg:  errMsg,
+		Error_code: qutil.If(errMsg == "", 0, -1).(int),
+	})
+}
+
+//数据报告详情页信息
+func (this *NewDataReport) ReportDetail() {
+	if !R.CheckReqParam(this.ResponseWriter, this.Request, "id") {
+		return
+	}
+	errMsg, rData := func() (string, map[string]interface{}) {
+		reportId := this.GetString("id") //报告id
+		key := "datareport_detail_" + reportId
+		if res := redis.Get("other", key); res != nil {
+			data := qutil.ObjToMap(res)
+			return "", map[string]interface{}{
+				"id":           (*data)["report_id"],
+				"title":        (*data)["report_name"],
+				"price":        (*data)["i_price"],
+				"before_price": (*data)["s_price"],
+				"publishtime":  (*data)["start_time"],
+				"img":          (*data)["cover_url"],
+				"content":      (*data)["s_desrice"],
+			}
+		}
+		rData := util.Mysql.FindOne(tableName, M{"report_id": reportId}, "report_id,report_name,i_price,s_price,start_time,cover_url,s_desrice", "")
+		if rData == nil {
+			return "未查询到数据", nil
+		}
+		if str, err := json.Marshal(*rData); err == nil {
+			redis.Put("other", key, string(str), 60*60)
+		} else {
+			log.Println("数据报告订单详情redis序列化错误")
+		}
+
+		return "", map[string]interface{}{
+			"id":           (*rData)["report_id"],
+			"title":        (*rData)["report_name"],
+			"price":        (*rData)["i_price"],
+			"before_price": (*rData)["s_price"],
+			"publishtime":  (*rData)["start_time"],
+			"img":          (*rData)["cover_url"],
+			"content":      (*rData)["s_desrice"],
+		}
+	}()
+	this.ServeJson(Result{
+		Data:       rData,
+		Error_msg:  errMsg,
+		Error_code: qutil.If(errMsg == "", 0, -1).(int),
+	})
+}
+
+//订单提交
+func (this *NewDataReport) OrderSubmit() {
+	reportId := this.GetString("reportId") //报告id
+	email := this.GetString("email")
+	phone := this.GetString("phone")
+	company := this.GetString("company")
+	errMsg, rData := func() (string, map[string]interface{}) {
+		//数据校验
+		if !util.PhoneReg.MatchString(phone) || !util.EmailReg.MatchString(email) || company == "" {
+			return "数据校验不通过", nil
+		}
+		//报告校验
+		query := map[string]interface{}{"report_id": reportId, "report_status": 1, "isdelete": 0}
+		// query := map[string]interface{}{"report_id": reportId}
+		log.Println("query", query)
+		r := util.Mysql.FindOne(tableName, query, "report_id,report_name,i_price,s_price,start_time,cover_url", "")
+		if r == nil || len(*r) == 0 {
+			return "未查询到此报告", nil
+		}
+		userid := qutil.ObjToString(this.GetSession("userId"))
+		openid := qutil.ObjToString(this.GetSession("s_m_openid"))
+		startTime := qutil.Int64All((*r)["start_time"])
+		ordercode, err := entity.JyReportMamager.CreateOrder(userid, openid, entity.ReportOutline{
+			ReportId:    fmt.Sprint((*r)["report_id"]),
+			ReportName:  qutil.ObjToString((*r)["report_name"]),
+			BrforePrice: qutil.IntAll((*r)["s_price"]),
+			Price:       qutil.IntAll((*r)["i_price"]),
+			Pushtime:    startTime,
+			CoverUrl:    qutil.ObjToString((*r)["cover_url"]),
+			Email:       email,
+			Phone:       phone,
+			Company:     company,
+		})
+		if err != nil {
+			log.Printf("%s OrderSubmit CreateOrder %v\n", userid, err)
+			return "创建订单出错", nil
+		}
+		return "", map[string]interface{}{
+			"ordercode": ordercode,
+		}
+	}()
+	this.ServeJson(Result{
+		Data:       rData,
+		Error_msg:  errMsg,
+		Error_code: qutil.If(errMsg == "", 0, -1).(int),
+	})
+}
+
+//发送邮箱验证码
+func (this *NewDataReport) SendEmailCode() {
+	if !R.CheckReqParam(this.ResponseWriter, this.Request, "email") {
+		return
+	}
+	errMsg, rData := func() (string, map[string]interface{}) {
+		email := this.GetString("email")
+		if !util.EmailReg.MatchString(email) {
+			return "邮箱校验失败", nil
+		}
+		userId := qutil.ObjToString(this.GetSession("userId"))
+		lastSendDEVerify := qutil.Int64All(this.GetSession("ReportCreateEmailCodeTime_" + userId))
+		timeSpaceing := lastSendDEVerify + 60*5 - time.Now().Unix()
+		incurKey := fmt.Sprintf("ReportSendEmailCode_%s_%d", userId, time.Now().Day())
+		if timeSpaceing >= 0 {
+			return "已发送,5分钟后再尝试", nil
+		}
+		//每日限制10次
+		times := qutil.IntAll(redis.Get("other", incurKey))
+		if times >= 10 {
+			return "已达到每日最大验证次数", nil
+		}
+		if times == 0 {
+			redis.Put("other", incurKey, 1, 24*60*60)
+		} else {
+			redis.Incr("other", incurKey)
+		}
+		//生成随机数
+		verifyStr := strings.ToUpper(qutil.GetComplexRandom(6, 3, 3))
+		this.SetSession("ReportSendEmail_"+userId, email)
+		this.SetSession("ReportSendEmailCode_"+userId, verifyStr)
+		this.SetSession("ReportCreateEmailCodeTime_"+userId, time.Now().Unix())
+		if !util.SendMailIdentCode(email, verifyStr, config.GmailAuth) {
+			return "验证码发送失败", nil
+		}
+		return "", map[string]interface{}{"status": 1}
+	}()
+	this.ServeJson(Result{
+		Data:       rData,
+		Error_msg:  errMsg,
+		Error_code: qutil.If(errMsg == "", 0, -1).(int),
+	})
+}
+
+//验证邮箱验证码
+func (this *NewDataReport) CheckEmailCode() {
+	email := this.GetString("email")
+	emailCode := this.GetString("emailCode")
+	userId := qutil.ObjToString(this.GetSession("userId"))
+	errMsg, rData := func() (string, map[string]interface{}) {
+		ReportSendEmail := qutil.ObjToString(this.GetSession("ReportSendEmail_" + userId))
+		ReportSendEmailCode := qutil.ObjToString(this.GetSession("ReportSendEmailCode_" + userId))
+		if email != "" && emailCode == ReportSendEmailCode && emailCode != "" && email == ReportSendEmail {
+			this.DelSession("ReportSendEmailCode_" + userId)
+			this.DelSession("ReportCreateEmailCodeTime_" + userId)
+			this.DelSession("ReportSendEmail_" + userId)
+		} else {
+			return "验证码错误", nil
+		}
+		return "", map[string]interface{}{"status": 1}
+	}()
+	this.ServeJson(Result{
+		Data:       rData,
+		Error_msg:  errMsg,
+		Error_code: qutil.If(errMsg == "", 0, -1).(int),
+	})
+}
+
+//用户信息回显
+func (this *NewDataReport) UserMsg() {
+	userId, _ := this.GetSession("userId").(string)
+	errMsg, rData := func() (string, map[string]interface{}) {
+		data := util.Mysql.FindOne("dataexport_order", map[string]interface{}{
+			"user_id":      userId,
+			"product_type": "数据报告",
+		}, "order_status,pay_time,user_mail,pay_way,filter", "create_time desc")
+		// if data != nil && qutil.IntAll((*data)["order_status"]) == 1 {
+		if data != nil {
+			str := map[string]interface{}{}
+			filterStr := qutil.ObjToString((*data)["filter"])
+			if err := json.Unmarshal([]byte(filterStr), &str); err != nil {
+				log.Printf("%s UserMsgUnmarshal 出错 [%s]\n", userId, filterStr)
+				return "查询回显信息失败", nil
+			}
+			email := str["email"]
+			phone := str["phone"]
+			company := str["company"]
+			return "", map[string]interface{}{"email": email, "phone": phone, "company": company}
+		} else {
+			return "", nil
+		}
+	}()
+	this.ServeJson(Result{
+		Data:       rData,
+		Error_msg:  errMsg,
+		Error_code: qutil.If(errMsg == "", 0, -1).(int),
+	})
+}
+
+//订单支付
+func (this *NewDataReport) Pay() {
+	// userId, _ := this.GetSession("userId").(string)
+	orderCode := qutil.ObjToString(this.GetString("ordercode"))
+	payway := qutil.ObjToString(this.GetString("payway"))
+	openId := qutil.ObjToString(this.GetSession("s_m_openid"))
+	errMsg, rData := func() (string, map[string]interface{}) {
+		if payway == "" { //默认微信js支付
+			payway = "wx_js"
+		}
+		if !(payway == "wx_js" || payway == "wx_app" || payway == "ali_app") { //
+			return "未知支付方式", nil
+		}
+		payStr, err := entity.JyReportMamager.FlushOrder(orderCode, payway, openId, this.IP())
+		if err != nil {
+			return "支付失败", map[string]interface{}{"status": 0}
+		}
+		return "", map[string]interface{}{"status": 1, "payStr": payStr}
+	}()
+	this.ServeJson(Result{
+		Data:       rData,
+		Error_msg:  errMsg,
+		Error_code: qutil.If(errMsg == "", 0, -1).(int),
+	})
+}

+ 225 - 0
src/jfw/modules/datareport/src/service/reportOrder.go

@@ -0,0 +1,225 @@
+package service
+
+import (
+	. "api"
+	"config"
+	"encoding/base64"
+	"encoding/json"
+	"entity"
+	"log"
+	qutil "qfw/util"
+	"strings"
+	"time"
+	"util"
+
+	"github.com/SKatiyar/qr"
+	"github.com/go-xweb/xweb"
+)
+
+type ReportOrder struct {
+	*xweb.Action
+	getPayParam xweb.Mapper `xweb:"/pay"`         //获取支付串
+	paySuccess  xweb.Mapper `xweb:"/paySuccess"`  //订单支付完成查询
+	orderDetail xweb.Mapper `xweb:"/orderDetail"` //订单详情
+}
+
+var ReportPaywayArr = []string{"wx_js", "wx_app", "wx_pc", "ali_app", "ali_pc"}
+
+//获取支付参数
+func (this *ReportOrder) GetPayParam() {
+	if !R.CheckReqParam(this.ResponseWriter, this.Request, "payway", "ordercode") {
+		return
+	}
+	errMsg, rData := func() (string, map[string]interface{}) {
+		payway := this.GetString("payway")
+		ordercode := this.GetString("ordercode")
+		//支付方式校验
+		paywayCheck := false
+		for _, v := range ReportPaywayArr {
+			if v == payway {
+				paywayCheck = true
+				break
+			}
+		}
+		if !paywayCheck {
+			return "未知支付方式", nil
+		}
+		r := util.Mysql.FindOne("dataexport_order", M{"order_code": ordercode, "user_id": this.GetSession("userId")}, "pay_way,code_url,prepay_time", "")
+		if r == nil || len(*r) == 0 {
+			return "未知订单", nil
+		}
+		payStr := (*r)["code_url"]
+		if payStr != "" && payway == (*r)["pay_way"] {
+			prepayTime, err := time.ParseInLocation(qutil.Date_Full_Layout, qutil.ObjToString((*r)["prepay_time"]), time.Local)
+			surplus_second := prepayTime.Unix() + 7200 - time.Now().Unix()
+			if payway == "wx_pc" {
+				r, _ := qr.Encode(payStr.(string), qr.M)
+				pngdat := r.PNG()
+				payStr = base64.StdEncoding.EncodeToString(pngdat)
+			}
+			if err == nil && surplus_second > 0 {
+				return "", map[string]interface{}{
+					"payStr":  payStr,
+					"timeout": surplus_second,
+				}
+			}
+		}
+		openid := qutil.ObjToString(this.GetSession("s_m_openid"))
+		payStr, err := entity.JyReportMamager.FlushOrder(ordercode, payway, openid, this.IP())
+		if err != nil {
+			log.Println(err)
+			return "创建订单出错", nil
+		}
+		if payway == "wx_pc" {
+			r, _ := qr.Encode(payStr.(string), qr.M)
+			pngdat := r.PNG()
+			payStr = base64.StdEncoding.EncodeToString(pngdat)
+		}
+		return "", map[string]interface{}{
+			"payStr":  payStr,
+			"timeout": 7200,
+		}
+	}()
+	this.ServeJson(Result{
+		Data:       rData,
+		Error_msg:  errMsg,
+		Error_code: qutil.If(errMsg == "", 0, -1).(int),
+	})
+}
+
+//取消订单
+func (this *ReportOrder) OrderCancel() {
+	if !R.CheckReqParam(this.ResponseWriter, this.Request, "ordercode") {
+		return
+	}
+	errMsg, rData := func() (string, map[string]interface{}) {
+		return "", nil
+	}()
+	this.ServeJson(Result{
+		Data:       rData,
+		Error_msg:  errMsg,
+		Error_code: qutil.If(errMsg == "", 0, -1).(int),
+	})
+}
+
+//订单支付是否完成
+func (this *ReportOrder) PaySuccess() {
+	if !R.CheckReqParam(this.ResponseWriter, this.Request, "ordercode") {
+		return
+	}
+	errMsg, rData := func() (string, map[string]interface{}) {
+		ordercode := this.GetString("ordercode")
+		r := util.Mysql.FindOne("dataexport_order", M{"order_code": ordercode, "user_id": this.GetSession("userId")}, "order_status", "")
+		if r == nil || len(*r) == 0 {
+			return "未知订单", nil
+		}
+		return "", map[string]interface{}{
+			"status": qutil.If(qutil.IntAll((*r)["order_status"]) == 1, 1, 0),
+		}
+	}()
+	this.ServeJson(Result{
+		Data:       rData,
+		Error_msg:  errMsg,
+		Error_code: qutil.If(errMsg == "", 0, -1).(int),
+	})
+}
+
+//订单详情
+func (this *ReportOrder) OrderDetail() {
+	if !R.CheckReqParam(this.ResponseWriter, this.Request, "ordercode") {
+		return
+	}
+	errMsg, rData := func() (string, map[string]interface{}) {
+		ordercode := this.GetString("ordercode")
+		allMsg := this.GetString("all")
+		r := util.Mysql.FindOne("dataexport_order", M{"order_code": ordercode, "user_id": this.GetSession("userId")},
+			"pay_way,order_money,user_mail,filter,pay_time,order_status,product_type,create_time,order_code,out_trade_no,prepay_time,applybill_status", "")
+		if r == nil || len(*r) == 0 {
+			return "未知订单", nil
+		}
+		payWay := qutil.ObjToString((*r)["pay_way"])
+		orderStatus := qutil.IntAll((*r)["order_status"])
+		if orderStatus == -1{
+			return "订单已删除",nil
+		}
+		baseMap := map[string]interface{}{
+			"state":           orderStatus,
+			"payWay":          payWay,
+			"ordercode":       (*r)["order_code"],
+			"payMoney":        (*r)["order_money"],
+			"email":           (*r)["user_mail"],
+			"productType":     "数据报告",
+			"applybillStatus": (*r)["applybill_status"],
+		}
+		//创建时间
+		createTimeStr := qutil.ObjToString((*r)["create_time"])
+		createTime, err := time.ParseInLocation(qutil.Date_Full_Layout, createTimeStr, time.Local)
+		if err == nil {
+			baseMap["createTime"] = createTime.Unix()
+		}
+		nowStamp := time.Now().Unix()
+		if orderStatus == 1 { //获取支付时间和订单号
+			payTimeStr := qutil.ObjToString((*r)["pay_time"])
+			payTime, _ := time.ParseInLocation(qutil.Date_Full_Layout, payTimeStr, time.Local)
+			baseMap["payTime"] = payTime.Unix()
+			baseMap["paymentId"] = func() string {
+				table := "weixin_pay"
+				if strings.Index(payWay, "ali") > -1 {
+					table = "ali_pay"
+				}
+				wxpaydata := util.Mysql.FindOne(table, map[string]interface{}{
+					"out_trade_no": qutil.ObjToString((*r)["out_trade_no"]),
+				}, "transaction_id", "")
+				if wxpaydata != nil && len(*wxpaydata) > 0 { //线下支付没有微信订单编号
+					return qutil.ObjToString((*wxpaydata)["transaction_id"])
+				}
+				return ""
+			}()
+		} else if orderStatus == 0 {
+			//订单支付剩余时间
+			orderTimeout := createTime.Add(time.Duration(config.Config.OrderTimeoutHours)*time.Hour).Unix() - nowStamp
+			if orderTimeout <= 0 {
+				//订单状态已取消
+				baseMap["state"] = -2
+				util.Mysql.Update("dataexport_order", map[string]interface{}{
+					"order_code": ordercode,
+				}, map[string]interface{}{
+					"order_status": -2,
+				})
+			} else {
+				if strings.Index(payWay, "pc") > -1 { //返回二维码有效时间
+					if prepayTime, err := time.ParseInLocation(qutil.Date_Full_Layout, qutil.ObjToString((*r)["prepay_time"]), time.Local); err == nil {
+						baseMap["surplusTime"] = prepayTime.Unix() + 7200 - nowStamp
+					}
+				} else { //返回订单有效时间
+					baseMap["surplusTime"] = orderTimeout
+				}
+			}
+		}
+
+		if allMsg == "" {
+			return "", baseMap
+		}
+		productInfo := map[string]interface{}{}
+		if filter := qutil.ObjToString((*r)["filter"]); filter != "" {
+			detailMap := map[string]interface{}{}
+			if json.Unmarshal([]byte(filter), &detailMap) == nil {
+				productInfo["productName"] = detailMap["report_name"]
+				productInfo["phone"] = detailMap["phone"]
+				productInfo["entName"] = detailMap["company"]
+				productInfo["releaseTime"] = detailMap["l_pushtime"] //发布时间
+				productInfo["email"] = detailMap["email"]            //
+				productInfo["beforePrice"] = detailMap["s_price"]    //原价
+			}
+		}
+		return "", map[string]interface{}{
+			"productInfo": productInfo,
+			"orderInfo":   baseMap,
+		}
+	}()
+	this.ServeJson(Result{
+		Data:       rData,
+		Error_msg:  errMsg,
+		Error_code: qutil.If(errMsg == "", 0, -1).(int),
+	})
+}

二進制
src/jfw/modules/datareport/src/src


+ 66 - 0
src/jfw/modules/datareport/src/util/common.go

@@ -0,0 +1,66 @@
+package util
+
+import (
+	"config"
+	"fmt"
+	"log"
+	"qfw/util/mail"
+	"regexp"
+	"time"
+)
+
+var (
+	EmailReg = regexp.MustCompile("^([a-zA-Z0-9_\\-\\.]+)@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.)|(([a-zA-Z0-9\\-]+\\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\\]?)$")
+	PhoneReg = regexp.MustCompile("^[1][3-9][0-9]{9}$")
+)
+
+//发送邮件
+func ReportSendMail(target_mail, html string) {
+	for k, v := range config.GmailAuth {
+		if mail.GSendMail("剑鱼标讯", target_mail, "", "", "数据报告", html, "", "", v) {
+			log.Println(target_mail, fmt.Sprintf("使用%s发送数据报告邮件成功", v.User))
+			break
+		}
+		if k < len(config.GmailAuth)-1 {
+			log.Println(target_mail, fmt.Sprintf("使用%s发送数据报告邮件失败!3s后使用其他邮箱尝试", v.User))
+		} else {
+			log.Println(target_mail, fmt.Sprintf("使用%s发送数据报告邮件失败!", v.User))
+		}
+		time.Sleep(time.Second * 3)
+	}
+}
+
+//发送邮箱验证码
+func SendMailIdentCode(to, code string, auth []*mail.GmailAuth) bool {
+	html := fmt.Sprintf(`<div>
+            <div>
+                  %s,您好!
+            </div>
+            <div style="padding: 20px 70px 10px 70px;">
+                  <p>您正在验证邮箱地址,请在邮件验证码输入框输入下方验证码:</p>
+                  <span style="font-weight: bold;font-size: x-large;">%s</span>
+                  <p>请勿向任何人泄露您收到的验证码。</p>
+                  <p>如果您没有使用剑鱼标讯,请忽略此邮件。</p>
+                  <p>此为系统邮件,请勿回复。</p>
+                  <p>如有疑问,请联系客服 400-108-6670。</p>
+            </div>
+            <div>
+                  <p>此致</p>
+                  <p>剑鱼标讯</p>
+            </div>      
+      </div>`, to, code)
+
+	for k, v := range auth {
+		if mail.GSendMail("剑鱼标讯", to, "", "", "剑鱼标讯邮箱校验", html, "", "", v) {
+			log.Println(to, fmt.Sprintf("使用%s发送邮件成功", v.User))
+			return true
+		}
+		if k < len(auth)-1 {
+			log.Println(to, fmt.Sprintf("使用%s发送邮件失败!3s后使用其他邮箱尝试", v.User))
+		} else {
+			log.Println(to, fmt.Sprintf("使用%s发送邮件失败!", v.User))
+		}
+		time.Sleep(time.Second * 3)
+	}
+	return false
+}

+ 36 - 0
src/jfw/modules/datareport/src/util/db.go

@@ -0,0 +1,36 @@
+package util
+
+import (
+	. "config"
+	mg "qfw/mongodb"
+	"qfw/util/mysql"
+	"qfw/util/redis"
+)
+
+var MQFW mg.MongodbSim
+var Mysql *mysql.Mysql
+
+func init() {
+	//初始化redis
+	redisConfig := Config.Redisaddrs
+	if redisConfig != "" {
+		redis.InitRedisBySize(redisConfig, 100, 30, 300)
+	}
+	//初始化mongodb
+	MQFW = mg.MongodbSim{
+		MongodbAddr: Config.MongodbServers,
+		Size:        Config.MongodbPoolSize,
+		DbName:      Config.MongodbName,
+	}
+	MQFW.InitPool()
+	//初始化mysql
+	Mysql = &mysql.Mysql{
+		Address:      Config.Mysql.Address,
+		UserName:     Config.Mysql.UserName,
+		PassWord:     Config.Mysql.PassWord,
+		DBName:       Config.Mysql.DbName,
+		MaxOpenConns: Config.Mysql.MaxOpenConns,
+		MaxIdleConns: Config.Mysql.MaxIdleConns,
+	}
+	Mysql.Init()
+}

+ 154 - 7
src/jfw/modules/subscribepay/src/entity/dataReportStruct.go

@@ -2,7 +2,14 @@ package entity
 
 import (
 	"config"
+	"encoding/json"
+	"errors"
+	"fmt"
+	"log"
+	"pay"
 	qutil "qfw/util"
+	frpc "qfw/util/rpc"
+	"strconv"
 	"time"
 	"util"
 )
@@ -11,31 +18,171 @@ import (
 type dataReportStruct struct{}
 
 var JyDataReportStruct dataReportStruct
+var DataReportSign map[string]string
+
+func init() {
+	DataReportSign = map[string]string{
+		"wx_app":  pay.WX_DATAREPORT_APP,
+		"wx_js":   pay.WX_DATAREPORT_JSAPI,
+		"wx_pc":   pay.WX_DATAREPORT_NATIVE,
+		"ali_app": pay.ALI_DATAREPORT_APP,
+		"ali_pc":  pay.ALI_DATAREPORT_NATIVE,
+	}
+}
 
 func (this *dataReportStruct) PayCallBack(param *CallBackParam) (update bool) {
-	orderdata := util.Mysql.FindOne("jy_datareport_order", map[string]interface{}{
+	orderdata := util.Mysql.FindOne("dataexport_order", map[string]interface{}{
 		"out_trade_no": param.OutTradeno,
 		"order_money":  param.TotalFee,
-	}, "order_status,report_id,user_mail", "")
-
+	}, "order_status,create_time,user_mail,user_openid,product_type,order_code,filter", "")
 	if orderdata != nil {
 		now := time.Now()
 		order_status := qutil.IntAll((*orderdata)["order_status"])
 		if order_status == 0 {
-			update = util.Mysql.Update("jy_datareport_order", map[string]interface{}{
+			payTime := qutil.FormatDate(&now, qutil.Date_Full_Layout)
+			update = util.Mysql.Update("dataexport_order", map[string]interface{}{
 				"out_trade_no": param.OutTradeno,
 				"order_money":  param.TotalFee,
 			}, map[string]interface{}{
 				"pay_money":    param.CashFee,
-				"pay_time":     qutil.FormatDate(&now, qutil.Date_Full_Layout),
+				"pay_time":     payTime,
 				"order_status": 1,
-				//"pay_way":      "wx_js",
 			})
 			if update {
 				//发送数据
-				go SendDatareportMailToPayUser(qutil.IntAll((*orderdata)["report_id"]), param.OutTradeno, qutil.ObjToString((*orderdata)["user_mail"]), config.GmailAuth)
+				str := map[string]interface{}{}
+				filterStr := qutil.ObjToString((*orderdata)["filter"])
+				if err := json.Unmarshal([]byte(filterStr), &str); err != nil {
+					log.Printf("Unmarshal 出错 [%s]\n", filterStr)
+					return false
+				}
+				orderCode := qutil.ObjToString((*orderdata)["order_code"])
+				createTime := qutil.ObjToString((*orderdata)["create_time"])
+				price := param.CashFee
+				prices := strconv.FormatFloat(float64(price)/100, 'f', -1, 64)
+				email := qutil.ObjToString(str["email"])
+				phone := qutil.ObjToString(str["phone"])
+				company := qutil.ObjToString(str["company"])
+				report_id := qutil.IntAll(str["report_id"])
+				openid := qutil.ObjToString((*orderdata)["user_openid"])
+				product_type := qutil.ObjToString((*orderdata)["product_type"])
+				report_name := qutil.ObjToString(str["report_name"])
+				go sendtemp(openid, orderCode, report_name+" "+product_type, payTime)
+				go SendDatareportMailToPayUser(report_id, prices, param.OutTradeno, email, orderCode, phone, company, createTime, payTime, config.GmailAuth)
 			}
 		}
 	}
 	return
 }
+
+//创建订单
+func (this *dataReportStruct) NewOrder(param frpc.JyPayOrderParam) (ordercode string, err error) {
+	//插入数据库
+	now := time.Now()
+	ordercode = pay.GetOrderCode(param.Userid)
+	detailByte, marshalErr := json.Marshal(param.Detail)
+	if marshalErr != nil {
+		err = marshalErr
+		return
+	}
+
+	orderId := util.Mysql.Insert("dataexport_order", map[string]interface{}{
+		"order_money":    param.Price,
+		"order_status":   0,
+		"user_openid":    param.Openid,
+		"order_code":     ordercode,
+		"product_type":   "数据报告",
+		"create_time":    qutil.FormatDate(&now, qutil.Date_Full_Layout),
+		"prepay_time":    qutil.FormatDate(&now, qutil.Date_Full_Layout),
+		"original_price": param.Price,
+		"filter_id":      qutil.If(param.Detail != nil && param.Detail["report_id"] != nil, param.Detail["report_id"], ""), //课程id
+		"pay_way":        param.PayWay,
+		"user_id":        param.Userid,
+		"user_phone":     param.Detail["phone"],
+		"user_mail":      param.Detail["email"],
+		"filter":         string(detailByte), //订单详情
+	})
+	if orderId <= 0 {
+		err = errors.New("订单插入失败")
+		return
+	}
+	return
+}
+
+//更新订单
+func (this *dataReportStruct) FlushOrder(param frpc.JyPayOrderChangeParam) (string, error) {
+	productSign, ok := DataReportSign[param.PayWay]
+	if !ok || productSign == "" {
+		return "", errors.New("未知支付类型")
+	}
+	//查询订单
+	res := util.Mysql.FindOne("dataexport_order", map[string]interface{}{
+		"order_code":   param.OrderCode,
+		"order_status": 0,
+	}, "order_money,out_trade_no,pay_way", "")
+	if res == nil || len(*res) == 0 {
+		return "", errors.New("未找到订单" + param.OrderCode)
+	}
+	price := qutil.IntAll((*res)["order_money"])
+	if price == 0 {
+		return "", errors.New("查询金额异常" + param.OrderCode)
+	}
+	//关闭之前交易
+	pay.CloseOrder(qutil.ObjToString((*res)["pay_way"]), qutil.ObjToString((*res)["out_trade_no"]))
+
+	//创建支付串
+	tradeno, prepayid, payParam, payErr := pay.CreateOrderPay(price, productSign, param.Ip, param.Openid, param.PayWay)
+	if payErr != nil {
+		return "", payErr
+	}
+	now := time.Now()
+	if !util.Mysql.Update("dataexport_order", map[string]interface{}{
+		"order_status": 0,
+		"order_code":   param.OrderCode,
+	}, map[string]interface{}{
+		"prepay_time":  qutil.FormatDate(&now, qutil.Date_Full_Layout),
+		"prepay_id":    prepayid,
+		"code_url":     payParam,
+		"out_trade_no": tradeno,
+		"pay_way":      param.PayWay,
+	}) {
+		return "", errors.New(fmt.Sprintf("%s,%s更新数据库出错", param.OrderCode, param.PayWay))
+	}
+	return payParam, nil
+}
+
+func (this *dataReportStruct) CloseOrder(ordercode string) error {
+	err := pay.CloseOrderByOrderCode(ordercode)
+	if err != nil {
+		return err
+	}
+	if !util.Mysql.Update("dataexport_order", map[string]interface{}{
+		"order_status": 0,
+		"order_code":   ordercode,
+	}, map[string]interface{}{
+		"order_status": -2,
+	}) {
+		return errors.New(fmt.Sprintf("%s关闭订单更新数据库出错", ordercode))
+	}
+	return nil
+}
+
+func sendtemp(openid, order_coded, product_type, pay_time string) {
+	if openid == "" || order_coded == "" || product_type == "" || pay_time == "" {
+		fmt.Println("数据报告模板参数异常")
+	} else {
+		ok, status := frpc.WxPush(config.Config.Weixinrpc, "WeiXinRpc.SendDataReportMsg", &frpc.NotifyMsg{
+			Openid:  openid,
+			Title:   "尊敬的客户,您的订单已支付成功",
+			Detail:  product_type, //产品类型
+			Service: order_coded,  //订单编号
+			Date:    pay_time,     //支付时间
+			Remark:  "数据报告将以电子版形式发送至您的邮箱,请注意垃圾邮件过滤,感谢您的光临",
+			Url:config.Config.WebDomain+"/datareport/page/order/detail/"+order_coded,
+
+		})
+		if !ok {
+			fmt.Println("数据报告", order_coded, ok, status)
+		}
+	}
+}

+ 14 - 5
src/jfw/modules/subscribepay/src/entity/dataexport.go

@@ -6,6 +6,7 @@ import (
 	"encoding/json"
 	"errors"
 	"fmt"
+	"io/ioutil"
 	"log"
 	"os"
 	qutil "qfw/util"
@@ -21,10 +22,18 @@ import (
 	"gopkg.in/mgo.v2/bson"
 )
 
-var ExConf *DataexportConfig
+var (
+	ExConf          *DataexportConfig
+	reportEmailHtml string
+)
 
 func init() {
 	qutil.ReadConfig("./dataexport.json", &ExConf)
+	r, err := os.Open("./reportEmailTemplate.html")
+	log.Println("MailHtmlError", err)
+	defer r.Close()
+	bs, _ := ioutil.ReadAll(r)
+	reportEmailHtml = string(bs)
 }
 
 //价格配置文件
@@ -872,15 +881,15 @@ func GetPriceDes_SieveCondition(minPrice, maxPrice string) string {
 }
 
 //数据报告发送邮件
-func SendDatareportMailToPayUser(report_id int, out_trade_no, user_mail string, auth []*mail.GmailAuth) {
+func SendDatareportMailToPayUser(report_id int, price, out_trade_no, user_mail, order_code, phone, company, create_time, pay_time string, auth []*mail.GmailAuth) {
 	res := util.Mysql.FindOne("jy_datareport", map[string]interface{}{
 		"report_id": report_id,
-	}, "s_url", "")
-	if res == nil || (*res)["s_url"] == "" {
+	}, "report_url", "")
+	if res == nil || (*res)["report_url"] == "" {
 		log.Println("%d:未知数据报告\n", report_id)
 		return
 	}
-	mailcontent := fmt.Sprintf(ExConf.DataReportContent, config.Config.WebDomain+(*res)["s_url"].(string))
+	mailcontent := fmt.Sprintf(reportEmailHtml, config.Config.WebDomain+(*res)["report_url"].(string), order_code, create_time, pay_time, price, user_mail, phone, company)
 	if SendRetryMail(ExConf.Mail_retry, user_mail, "数据报告", mailcontent, "", nil, auth) {
 		log.Printf("用户%s:数据报告附件邮件发送成功!数据报告id:%d\n", user_mail, report_id)
 		now := time.Now()

+ 175 - 0
src/jfw/modules/subscribepay/src/entity/jyCourseOnlineStruct.go

@@ -0,0 +1,175 @@
+package entity
+
+import (
+	"encoding/json"
+	"errors"
+	"fmt"
+	"pay"
+	qutil "qfw/util"
+	frpc "qfw/util/rpc"
+	"time"
+	"util"
+
+	"gopkg.in/mgo.v2/bson"
+)
+
+//剑鱼线上课程
+
+type jyCourseOnline struct{}
+
+var JyCourseOnline jyCourseOnline
+
+var CourseProductSign map[string]string
+
+func init() {
+	CourseProductSign = map[string]string{
+		"wx_app":  pay.WX_COURSEONLINE_APP,
+		"wx_js":   pay.WX_COURSEONLINE_JSAPI,
+		"wx_pc":   pay.WX_COURSEONLINE_NATIVE,
+		"ali_app": pay.ALI_COURSEONLINE_APP,
+		"ali_pc":  pay.ALI_COURSEONLINE_NATIVE,
+	}
+}
+
+//支付完成回调
+func (this *jyCourseOnline) PayCallBack(param *CallBackParam) bool {
+	now := time.Now()
+	update := false
+	orderdata := util.Mysql.FindOne("dataexport_order", map[string]interface{}{
+		"out_trade_no": param.OutTradeno,
+		"order_money":  param.TotalFee,
+		"product_type": "线上课程",
+	}, "id,order_status,order_money,order_code,filter_id,user_id", "")
+	pay_time := qutil.FormatDate(&now, qutil.Date_Full_Layout)
+	if orderdata != nil {
+		order_status := qutil.IntAll((*orderdata)["order_status"])
+		if order_status == 0 {
+			update = util.Mysql.Update("dataexport_order", map[string]interface{}{
+				"order_status": 0,
+				"out_trade_no": param.OutTradeno,
+				"order_money":  param.TotalFee,
+			}, map[string]interface{}{
+				"pay_money":    param.CashFee,
+				"pay_time":     pay_time,
+				"order_status": 1,
+			})
+			courseId := qutil.ObjToString((*orderdata)["filter_id"])
+			if update && courseId != "" {
+				//更新课程销量
+				util.MQFW.Update("jy_course", &map[string]interface{}{
+					"_id": qutil.StringTOBsonId(courseId),
+				}, &map[string]interface{}{
+					"$inc": bson.M{"i_tradeRate": 1},
+				}, false, false)
+				//取消此用户其他此课程订单
+				util.Mysql.Update("dataexport_order", map[string]interface{}{
+					"user_id":      (*orderdata)["user_id"],
+					"filter_id":    courseId,
+					"order_status": 0,
+				}, map[string]interface{}{
+					"order_status": -2,
+				})
+			}
+		} else {
+			update = true
+		}
+	}
+	return update
+}
+
+//生成订单
+func (this *jyCourseOnline) NewOrder(param frpc.JyPayOrderParam) (ordercode string, err error) {
+	productSign, ok := CourseProductSign[param.PayWay]
+	if !ok || productSign == "" {
+		err = errors.New("未知支付类型")
+		return
+	}
+	//创建支付串
+	tradeno, prepayid, payParam, payErr := pay.CreateOrderPay(param.Price, productSign, param.Ip, param.Openid, param.PayWay)
+	if payErr != nil {
+		err = payErr
+		return
+	}
+	//插入数据库
+	now := time.Now()
+	ordercode = pay.GetOrderCode(param.Userid)
+	detailByte, marshalErr := json.Marshal(param.Detail)
+	if marshalErr != nil {
+		err = marshalErr
+		return
+	}
+	orderId := util.Mysql.Insert("dataexport_order", map[string]interface{}{
+		"order_money":    param.Price,
+		"order_status":   0,
+		"user_openid":    param.Openid,
+		"prepay_id":      prepayid,
+		"code_url":       payParam,
+		"out_trade_no":   tradeno,
+		"order_code":     ordercode,
+		"product_type":   "线上课程",
+		"create_time":    qutil.FormatDate(&now, qutil.Date_Full_Layout),
+		"prepay_time":    qutil.FormatDate(&now, qutil.Date_Full_Layout),
+		"original_price": param.Price,
+		"filter_id":      qutil.If(param.Detail != nil && param.Detail["_id"] != nil, param.Detail["_id"], ""), //课程id
+		"pay_way":        param.PayWay,
+		"user_id":        param.Userid,
+		"filter":         string(detailByte), //订单详情
+	})
+	if orderId <= 0 {
+		err = errors.New("订单插入失败")
+		return
+	}
+	return
+}
+
+//更新订单
+func (this *jyCourseOnline) FlushOrder(param frpc.JyPayOrderChangeParam) (string, error) {
+	productSign, ok := CourseProductSign[param.PayWay]
+	if !ok || productSign == "" {
+		return "", errors.New("未知支付类型")
+	}
+	//查询订单
+	res := util.Mysql.FindOne("dataexport_order", map[string]interface{}{"order_code": param.OrderCode}, "order_money", "")
+	if res == nil || len(*res) == 0 {
+		return "", errors.New("未找到订单" + param.OrderCode)
+	}
+	price := qutil.IntAll((*res)["order_money"])
+	if price == 0 {
+		return "", errors.New("查询金额异常" + param.OrderCode)
+	}
+	//创建支付串
+	tradeno, prepayid, payParam, payErr := pay.CreateOrderPay(price, productSign, param.Ip, param.Openid, param.PayWay)
+	if payErr != nil {
+		return "", payErr
+	}
+	now := time.Now()
+	if !util.Mysql.Update("dataexport_order", map[string]interface{}{
+		"order_status": 0,
+		"order_code":   param.OrderCode,
+	}, map[string]interface{}{
+		"prepay_time":  qutil.FormatDate(&now, qutil.Date_Full_Layout),
+		"prepay_id":    prepayid,
+		"code_url":     payParam,
+		"out_trade_no": tradeno,
+		"pay_way":      param.PayWay,
+	}) {
+		return "", errors.New(fmt.Sprintf("%s,%s更新数据库出错", param.OrderCode, param.PayWay))
+	}
+	return payParam, nil
+}
+
+func (this *jyCourseOnline) CloseOrder(ordercode string) error {
+	err := pay.CloseOrderByOrderCode(ordercode)
+	if err != nil {
+		return err
+	}
+	if !util.Mysql.Update("dataexport_order", map[string]interface{}{
+		"order_status": 0,
+		"order_code":   ordercode,
+	}, map[string]interface{}{
+		"order_status": -2,
+	}) {
+		return errors.New(fmt.Sprintf("%s关闭订单更新数据库出错", ordercode))
+	}
+	return nil
+}

+ 3 - 2
src/jfw/modules/subscribepay/src/filter/sessionfilter.go

@@ -17,10 +17,11 @@ func (l *sessionfilter) Do(w http.ResponseWriter, req *http.Request) bool {
 	rqu := req.URL.Path
 	if strings.HasPrefix(rqu, "/jypay/callback/") || //支付回调
 		strings.HasPrefix(rqu, "/jypay/weixin/reward/") || //打赏跳转
-		strings.HasPrefix(rqu, "/jypay/course/free") ||
+		strings.HasPrefix(rqu, "/jypay/course/free") || //招投标课程
 		strings.HasPrefix(rqu, "/jypay/invoice/callback") ||
 		strings.HasPrefix(rqu, "/subscribepay/index/getIndexMessage") ||
-		strings.HasPrefix(rqu, "/res/dataexport") {
+		strings.HasPrefix(rqu, "/res/dataexport") ||
+		rqu == "/jypay/wx/getwxSdkSign" { //微信js调用参数
 		return true
 	}
 	session := l.App.SessionManager.Session(req, w)

+ 8 - 3
src/jfw/modules/subscribepay/src/main.go

@@ -4,14 +4,16 @@ import (
 	_ "a"
 	. "config"
 	_ "filter"
-	"github.com/go-xweb/xweb"
 	"log"
 	"net/http"
 	"net/rpc"
+	"qfw/util/endless"
 	"rpcfollow"
 	_ "service"
 	"timetask"
 	_ "util"
+
+	"github.com/go-xweb/xweb"
 )
 
 func main() {
@@ -20,8 +22,11 @@ func main() {
 		frpc := new(rpcfollow.JyPayRpc)
 		rpc.Register(frpc)
 		rpc.HandleHTTP()
-
-		err := http.ListenAndServe(":"+Config.Webrpcport, nil)
+		// err := http.ListenAndServe(":"+Config.Webrpcport, nil)
+		// if err != nil {
+		// 	log.Println("ListenAndServe: ", err)
+		// }
+		err := endless.ListenAndServe(":"+Config.Webrpcport, nil, func() {})
 		if err != nil {
 			log.Println("ListenAndServe: ", err)
 		}

+ 37 - 28
src/jfw/modules/subscribepay/src/pay/aliPay.go

@@ -18,16 +18,17 @@ import (
 )
 
 type aliPayStruct struct {
-	Appid            string
-	PrivateKey       *rsa.PrivateKey //请求接口秘钥
-	AliPublicKey     *rsa.PublicKey  //支付完成回调,校验使用(取支付宝后台)
-	CallBackUrl      string          //支付完成回调地址
-	Requseturl       string          //接口请求地址
-	Subject_sjdc     string          //支付小标题
-	Subject_sjbg     string          //支付小标题
-	Subject_subvip   string          //支付小标题
-	Subject_course   string          //支付小标题
-	Subject_entniche string          //支付小标题
+	Appid                string
+	PrivateKey           *rsa.PrivateKey //请求接口秘钥
+	AliPublicKey         *rsa.PublicKey  //支付完成回调,校验使用(取支付宝后台)
+	CallBackUrl          string          //支付完成回调地址
+	Requseturl           string          //接口请求地址
+	Subject_sjdc         string          //支付小标题
+	Subject_sjbg         string          //支付小标题
+	Subject_subvip       string          //支付小标题
+	Subject_course       string          //支付小标题
+	Subject_courseOnline string          //支付小标题
+	Subject_entniche     string          //支付小标题
 }
 
 var Alipay *aliPayStruct
@@ -44,16 +45,17 @@ func init() {
 		panic(err)
 	}
 	Alipay = &aliPayStruct{
-		Appid:            qutil.ObjToString(config.AliPayConf["appid"]),
-		PrivateKey:       privateKey,
-		AliPublicKey:     aliPublicKey,
-		CallBackUrl:      qutil.ObjToString(config.Config.WebDomain) + "/jypay/callback/aliPay",
-		Requseturl:       qutil.ObjToString(config.AliPayConf["reqUrl"]),
-		Subject_sjdc:     qutil.ObjToString(config.AliPayConf["Subject_sjdc"]),
-		Subject_sjbg:     qutil.ObjToString(config.AliPayConf["Subject_sjbg"]),
-		Subject_subvip:   qutil.ObjToString(config.AliPayConf["Subject_subvip"]),
-		Subject_course:   qutil.ObjToString(config.AliPayConf["Subject_course"]),
-		Subject_entniche: qutil.ObjToString(config.AliPayConf["Subject_entniche"]),
+		Appid:                qutil.ObjToString(config.AliPayConf["appid"]),
+		PrivateKey:           privateKey,
+		AliPublicKey:         aliPublicKey,
+		CallBackUrl:          qutil.ObjToString(config.Config.WebDomain) + "/jypay/callback/aliPay",
+		Requseturl:           qutil.ObjToString(config.AliPayConf["reqUrl"]),
+		Subject_sjdc:         qutil.ObjToString(config.AliPayConf["Subject_sjdc"]),
+		Subject_sjbg:         qutil.ObjToString(config.AliPayConf["Subject_sjbg"]),
+		Subject_subvip:       qutil.ObjToString(config.AliPayConf["Subject_subvip"]),
+		Subject_course:       qutil.ObjToString(config.AliPayConf["Subject_course"]),
+		Subject_entniche:     qutil.ObjToString(config.AliPayConf["Subject_entniche"]),
+		Subject_courseOnline: qutil.ObjToString(config.AliPayConf["Subject_courseOnline"]),
 	}
 }
 
@@ -68,25 +70,32 @@ const (
 	ALI_DATAEXPORT_NATIVE = "z" //支付宝数据导出-扫码支付
 	ALI_DATAEXPORT_APP    = "Z" //支付宝数据导出-app支付
 	ALI_DATAREPORT_APP    = "X" //支付宝数据报告-app支付
-	ALI_SUBVIP_NATIVE     = "y" //支付宝vip订阅-扫码支付
-	ALI_SUBVIP_APP        = "Y" //支付宝数vip订阅--扫码支付
-	ALI_COURSE_NATIVE     = "v" //剑鱼招投标课程-扫码支付
-	ALI_COURSE_APP        = "V" //剑鱼招投标课程-app支付
-	ALI_ENTNICHE_APP      = "U" //支付宝企业商机管理--app支付
+	ALI_DATAREPORT_NATIVE = "x" //支付宝数据报告-扫码支付
+
+	ALI_SUBVIP_NATIVE       = "y" //支付宝vip订阅-扫码支付
+	ALI_SUBVIP_APP          = "Y" //支付宝数vip订阅--扫码支付
+	ALI_COURSE_NATIVE       = "v" //剑鱼招投标课程-扫码支付
+	ALI_COURSE_APP          = "V" //剑鱼招投标课程-app支付
+	ALI_ENTNICHE_APP        = "U" //支付宝企业商机管理--app支付
+	ALI_ENTNICHE_NATIVE     = "u" //支付宝企业商机管理--app支付
+	ALI_COURSEONLINE_NATIVE = "t" //剑鱼线上课程-扫码支付
+	ALI_COURSEONLINE_APP    = "T" //剑鱼线上课程-app支付
 )
 
 func (w *aliPayStruct) GetTradeno(tradenoSign string) (string, string) {
 	tradeno, subject := "", ""
 	if tradenoSign == ALI_DATAEXPORT_NATIVE || tradenoSign == ALI_DATAEXPORT_APP {
 		subject = w.Subject_sjdc
-	} else if tradenoSign == ALI_DATAREPORT_APP {
+	} else if tradenoSign == ALI_DATAREPORT_APP || tradenoSign == ALI_DATAREPORT_NATIVE {
 		subject = w.Subject_sjbg
-	} else if tradenoSign == ALI_SUBVIP_NATIVE || tradenoSign == ALI_SUBVIP_APP {
+	} else if tradenoSign == ALI_SUBVIP_NATIVE || tradenoSign == ALI_SUBVIP_APP || tradenoSign == ALI_SUBVIP_NATIVE {
 		subject = w.Subject_subvip
 	} else if tradenoSign == ALI_COURSE_NATIVE || tradenoSign == ALI_COURSE_APP {
 		subject = w.Subject_course
-	} else if tradenoSign == ALI_ENTNICHE_APP {
+	} else if tradenoSign == ALI_ENTNICHE_APP || tradenoSign == ALI_ENTNICHE_NATIVE {
 		subject = w.Subject_entniche
+	} else if tradenoSign == ALI_COURSEONLINE_NATIVE || tradenoSign == ALI_COURSEONLINE_APP {
+		subject = w.Subject_courseOnline
 	}
 	tradeno = fmt.Sprintf("%s_%d%s%s", tradenoSign, time.Now().UnixNano(), qutil.GetRandom(5), qutil.GetLetterRandom(6))
 	return tradeno, subject

+ 77 - 0
src/jfw/modules/subscribepay/src/pay/util.go

@@ -15,8 +15,85 @@ import (
 	qutil "qfw/util"
 	"strings"
 	"time"
+	"util"
 )
 
+/*
+公共创建订单
+price 价格
+productSign 产品种类标识
+ip 用户ip(仅微信支付需要)
+openid 用户openid(仅微信支付需要)
+payWay 支付方式
+*/
+func CreateOrderPay(price int, productSign, ip, openid, payWay string) (tradeno, prepayid, payParam string, err error) {
+	switch payWay {
+	case "wx_js", "wx_app", "wx_pc": //微信公众号支付,微信app支付,微信扫码支付
+		var ret *map[string]string
+		tradeno, ret = WxStruct.CreatePrepayOrder(productSign, ip, openid, "", price)
+		log.Println(tradeno, ret)
+		if ret == nil {
+			err = errors.New("创建异常")
+			return
+		}
+		if (*ret)["status"] != "1" {
+			errMsg := "创建微信订单出错"
+			if (*ret)["errcodedes"] != "" {
+				errMsg = (*ret)["errcodedes"]
+			} else if (*ret)["errcode"] != "" {
+				errMsg = (*ret)["errcode"]
+			}
+			err = errors.New(errMsg)
+			return
+		}
+		prepayid = qutil.ObjToString((*ret)["prepayid"])
+		if payWay == "wx_js" {
+			payParam = WxStruct.GetWxjsPaySign(prepayid)
+		} else if payWay == "wx_app" {
+			payParam = WxStruct.GetAppWxPayStr(prepayid)
+		} else if payWay == "wx_pc" {
+			payParam = (*ret)["codeurl"]
+		}
+	case "ali_app", "ali_pc": //支付宝app支付,支付宝扫码支付
+		payParam, tradeno, err = Alipay.GetOrderPayParam(qutil.Float64All(price), productSign)
+		if err != nil {
+			errors.New("创建支付宝订单出错")
+			return
+		}
+	}
+	return
+}
+
+//关闭订单
+func CloseOrderByOrderCode(ordercode string) error {
+	res := util.Mysql.FindOne("dataexport_order", map[string]interface{}{"order_code": ordercode}, "out_trade_no,pay_way", "")
+	if res == nil || len(*res) == 0 {
+		return errors.New("关闭订单出错,未找到订单" + ordercode)
+	}
+	tradeno := qutil.ObjToString((*res)["out_trade_no"])
+	if tradeno == "" {
+		return errors.New("关闭订单出错,tradeno异常" + ordercode)
+	}
+	payWay := qutil.ObjToString((*res)["pay_way"])
+	if payWay == "" {
+		return errors.New("关闭订单出错,pay_way异常" + ordercode)
+	}
+	if !CloseOrder(tradeno, payWay) {
+		return errors.New(fmt.Sprintf("%s关闭订单异常%s", ordercode, payWay))
+	}
+	return nil
+}
+
+func CloseOrder(tradeno, payWay string) bool {
+	if strings.HasPrefix(payWay, "wx") {
+		return WxStruct.CloseOrder(tradeno, payWay)
+
+	} else if strings.HasPrefix(payWay, "ali") {
+		return Alipay.CloseOrder(tradeno)
+	}
+	return false
+}
+
 //创建订单号
 func GetOrderCode(id string) string {
 	return fmt.Sprintf("%s%s", time.Now().Format("150405"), qutil.GetRandom(6))

+ 29 - 18
src/jfw/modules/subscribepay/src/pay/wxPay.go

@@ -12,18 +12,25 @@ import (
 )
 
 const (
-	WX_REWARD_JSAPI      = "a" //微信打赏
-	WX_DATAEXPORT_NATIVE = "b" //数据导出-扫码支付
-	WX_DATAEXPORT_JSAPI  = "c" //数据导出-微信js支付
-	WX_DATAEXPORT_APP    = "C" //数据导出-微信app支付
-	WX_DATAREPORT_JSAPI  = "d" //数据报告-微信js支付
-	WX_DATAREPORT_APP    = "D" //数据报告-微信app支付
-	WX_SUBVIP_JSAPI      = "e" //VIP订阅-js支付
-	WX_SUBVIP_APP        = "E" //VIP订阅-APP支付
-	WX_COURSE_JSAPI      = "f" //剑鱼招投标课程-js支付
-	WX_COURSE_APP        = "F" //剑鱼招投标课程-APP支付
-	WX_COURSE_NATIVE     = "g" //剑鱼招投标课程-扫码支付
-	WX_ENTNICHE_APP      = "H" //企业商机管理-APP支付
+	WX_REWARD_JSAPI        = "a" //微信打赏
+	WX_DATAEXPORT_NATIVE   = "b" //数据导出-扫码支付
+	WX_DATAEXPORT_JSAPI    = "c" //数据导出-微信js支付
+	WX_DATAEXPORT_APP      = "C" //数据导出-微信app支付
+	WX_DATAREPORT_JSAPI    = "d" //数据报告-微信js支付
+	WX_DATAREPORT_APP      = "D" //数据报告-微信app支付
+	WX_SUBVIP_JSAPI        = "e" //VIP订阅-js支付
+	WX_SUBVIP_APP          = "E" //VIP订阅-APP支付
+	WX_COURSE_JSAPI        = "f" //剑鱼招投标课程-js支付
+	WX_COURSE_APP          = "F" //剑鱼招投标课程-APP支付
+	WX_COURSE_NATIVE       = "g" //剑鱼招投标课程-扫码支付
+	WX_ENTNICHE_APP        = "H" //企业商机管理-APP支付
+	WX_COURSEONLINE_JSAPI  = "i" //课程线上课程-js支付
+	WX_COURSEONLINE_APP    = "I" //剑鱼线上课程-APP支付
+	WX_COURSEONLINE_NATIVE = "j" //剑鱼线上课程-扫码支付
+	WX_DATAREPORT_NATIVE   = "k" //数据报告-扫码支付
+	WX_SUBVIP_NATIVE       = "l" //VIP订阅-APP支付
+	WX_ENTNICHE_NATIVE     = "m" //VIP订阅-APP支付
+
 )
 
 var WxStruct *WeixinStruct
@@ -41,6 +48,7 @@ type WeixinStruct struct {
 	Subvip_msg        string
 	Entniche_msg      string
 	Course_msg        string
+	CourseOnline_msg  string
 	OpenidSwitch      *map[string]interface{}
 }
 
@@ -60,6 +68,7 @@ func init() {
 		Subvip_msg:        util.ObjToString(payConfig["subvip_msg"]),
 		Entniche_msg:      util.ObjToString(payConfig["entniche_msg"]),
 		Course_msg:        util.ObjToString(payConfig["course_msg"]),
+		CourseOnline_msg:  util.ObjToString(payConfig["courseOnline_msg"]),
 		OpenidSwitch:      util.ObjToMap(config.WxPayConf["openidSwitch"]),
 	}
 }
@@ -78,24 +87,26 @@ func (w *WeixinStruct) CreatePrepayOrder(tradeno, ip, openid, detailmsg string,
 		attachmsg, bodymsg = w.Dashang_attachmsg, w.Dashang_bodymsg
 	} else if tradeno == WX_DATAEXPORT_NATIVE || tradeno == WX_DATAEXPORT_JSAPI || tradeno == WX_DATAEXPORT_APP { //数据导出
 		attachmsg, bodymsg, detailmsg = w.sjdc_msg, w.sjdc_msg, w.sjdc_msg
-	} else if tradeno == WX_DATAREPORT_JSAPI || tradeno == WX_DATAREPORT_APP { //数据报告
+	} else if tradeno == WX_DATAREPORT_JSAPI || tradeno == WX_DATAREPORT_APP || tradeno == WX_DATAREPORT_NATIVE { //数据报告
 		attachmsg, bodymsg, detailmsg = w.Sjbg_msg, w.Sjbg_msg, w.Sjbg_msg
-	} else if tradeno == WX_SUBVIP_JSAPI || tradeno == WX_SUBVIP_APP { //vip订阅
+	} else if tradeno == WX_SUBVIP_JSAPI || tradeno == WX_SUBVIP_APP || tradeno == WX_SUBVIP_NATIVE { //vip订阅
 		attachmsg, bodymsg, detailmsg = w.Subvip_msg, w.Subvip_msg, w.Subvip_msg
 	} else if tradeno == WX_COURSE_NATIVE || tradeno == WX_COURSE_APP || tradeno == WX_COURSE_JSAPI { //招投标课程
 		attachmsg, bodymsg, detailmsg = w.Course_msg, w.Course_msg, w.Course_msg
-	} else if tradeno == WX_ENTNICHE_APP {
+	} else if tradeno == WX_ENTNICHE_APP || tradeno == WX_ENTNICHE_NATIVE {
 		attachmsg, bodymsg, detailmsg = w.Entniche_msg, w.Entniche_msg, w.Entniche_msg
+	} else if tradeno == WX_COURSEONLINE_APP || tradeno == WX_COURSEONLINE_JSAPI || tradeno == WX_COURSEONLINE_NATIVE {
+		attachmsg, bodymsg, detailmsg = w.CourseOnline_msg, w.CourseOnline_msg, w.CourseOnline_msg
 	}
 	//支付类型分类
 
 	tradeType, appid := "", w.Appid
-	if tradeno == WX_REWARD_JSAPI || tradeno == WX_DATAEXPORT_JSAPI || tradeno == WX_DATAREPORT_JSAPI || tradeno == WX_SUBVIP_JSAPI || tradeno == WX_COURSE_JSAPI { //微信js支付
+	if tradeno == WX_REWARD_JSAPI || tradeno == WX_DATAEXPORT_JSAPI || tradeno == WX_DATAREPORT_JSAPI || tradeno == WX_SUBVIP_JSAPI || tradeno == WX_COURSE_JSAPI || tradeno == WX_COURSEONLINE_JSAPI { //微信js支付
 		tradeType = "JSAPI"
-	} else if tradeno == WX_DATAEXPORT_APP || tradeno == WX_DATAREPORT_APP || tradeno == WX_SUBVIP_APP || tradeno == WX_COURSE_APP || tradeno == WX_ENTNICHE_APP { //app支付
+	} else if tradeno == WX_DATAEXPORT_APP || tradeno == WX_DATAREPORT_APP || tradeno == WX_SUBVIP_APP || tradeno == WX_COURSE_APP || tradeno == WX_ENTNICHE_APP || tradeno == WX_COURSEONLINE_APP { //app支付
 		tradeType = "APP"
 		appid = w.Appid_app
-	} else if tradeno == WX_DATAEXPORT_NATIVE || tradeno == WX_COURSE_NATIVE { //扫码支付
+	} else if tradeno == WX_DATAEXPORT_NATIVE || tradeno == WX_COURSE_NATIVE || tradeno == WX_COURSEONLINE_NATIVE || tradeno == WX_DATAREPORT_NATIVE || tradeno == WX_ENTNICHE_NATIVE || tradeno == WX_SUBVIP_NATIVE { //扫码支付
 		tradeType = "NATIVE"
 	}
 	tradeno = w.GetTradeno(tradeno)

+ 2 - 0
src/jfw/modules/subscribepay/src/pay_config.json

@@ -12,6 +12,7 @@
             "sjbg_msg": "剑鱼标讯-数据报告",
             "subvip_msg":"剑鱼标讯-vip订阅",
             "course_msg":"剑鱼标讯-招投标课程",
+            "courseOnline_msg":"剑鱼标讯-线上课程",
 			"entniche_msg":"剑鱼标讯-企业商机管理"
         },
         "openidSwitch": {
@@ -32,6 +33,7 @@
         "Subject_sjbg": "剑鱼数据报告",
         "Subject_subvip": "剑鱼VIP订阅",
         "Subject_course":"剑鱼标讯-招投标课程",
+		"Subject_courseOnline":"剑鱼标讯-线上课程",
 		"Subject_entniche": "企业商机管理",
         "privateKey": "-----BEGIN RSA PRIVATE KEY-----\nMIIEogIBAAKCAQEAtO7CU4hpdcMmV43MEA8bqQJYYx+f6yvYkP0nFc/oCvU24bU6zAdK/H2H56quEwD8Dh5YtVTfUCcKqpcG9HXY11TXWKCEUQiK1tkb0o7oSSURwk6h1DdDbg8m1+H8s+k+mvMvcqVCYKYi03PIPQyJCuHmzx/vcaALXRr2HOrEFaFFA8WYST1rywiKeyrC9PCNX1aJjGADhCs3cGrdZEJc4k+2tIHTYJccx+mJ96QiEkzFhJTqEmSFPcNqNUX9uCPgeVhfHW2pRNyffvrhoEyeSr1QoOpaYyn0I5JD2axnypBFCbk6P69LY3eGNKtOe81lp9hiZbMYpXPqb6KwPXTVQQIDAQABAoIBAEbJQm276MaR2uZWK4f84S12JW5iaQZw2QGgiTIXbQkcdqRHawF3uPafhhQ0ynXU5MgBR2NqGRQasimbfLUXhgZ4wueBpUKuvOLhfekaz/YN8qy6ZsXH+TGN6/x6BYu9rSiiC+YmkZmOZgGkQqrfxJ3lU4+lRuCFZOzAJ5mYn652CHRJXy6eDgZfyFLP2ol4/ioJEhwnGFXV345DlsVgmXTEe+IfjTyuvzxBtjod4lfu3dj/f2PhPrcgvN0ZQf1ldZbS+6FkMWInMOQt/WsJ/ANfiKgQ4sPzlxIhmVjrvDlnYTc1lbFekyInzZumV0pDyId+1Y6LAjxJTAhnjFAlBSECgYEAwsQdxOiZNLtxZ8J8JCQHKERYIo7euArW0iAurF+3Q9VNeGj0voFrmfHPju5OF5BHtuc7D3lkwZG4Ac+pyQtxF5dsEMl4vBoNc6onRQFsSDVEEIpl7OBghGlg1as23tvPSMh7DKnILM9OzVfFQ9WLvwHJwLRGsM7LOtmNovq4UFsCgYEA7dE/9Avr5YtCUjij8Y2zkAxN6qb8+ggqFoPiCr91JNGaKNKV9D2K7D3Zk49TXFJm7SX2zgYFuqR2Pa9vAWh9jtmwsc8L0qpIym4J1MM5ud/Xiu9c8O/prQOr7JlICNdk8WfqGbUC83BYfWa5SDonlXFYi6x3LlXdZnvEfZF645MCgYAC2ZnR6tFrGx8StJ7abIiKR02+27ZYnRf9pSjprtDgtjtW+royG3S2oPo3jjcoUx0piQKtPEqEJpy5sg86+ObjwHx9VmVk40C1I5VFhjrOZ7EiSNQq/jGLXntjRQkdg7vpxb0/NzDNrw7pJFKnpnVQCzenkTvDlJMWvl47N04BJwKBgHnpVtuIcPlPFkSH/KMLfQ1PAXJVAEI8hTbdjLbtxuOE/34F1hFKqzjHzA2034roQxM27vpWZAF15Zdho4oZQqREPCwqc2kfGgmLt0Z2fdUnRptWcVKh6ixjQXMccKz3niuSlZNwE38wDGzciAbaqQgW/sk7NC1wnvq2X9fvCAw5AoGANG2usqWYF4x+LvbhcdrKpJsjtvkLa2u9g2/wNXdoj+tBrv310O22/YM5LOcq9MrKPlx1S1C1KLoQO9TWFZiYuQ9C/sk7/ZTNmKQxCxVV0FVPaBYp+meD6sjgoRVJvaqY0UxnJwlHWMrusPTFua7Mtogqx9cvzlQolWh5VX7N1DM=\n-----END RSA PRIVATE KEY-----",
         "callbackPublicKey":"MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAqFZfev75+sa7O0f29qwuWeqWRQ+p59c8hz2s4aeh5Ohc08P1ls5e8UmPhaN9ZTkGwabOKN658pOhmVoa16ldKFZQ5j1hLTDS6yfKcvVs/hf1mQvsbUjtZgCfMQx5NNf1R4MsTvAqbl2l6DXMu7gHjAhKNR0QQBELv7HmYuWPE35ELQqBH0eVcvWSNV3/3zOansftY5NIT749B+Bv1uirE8PNMp20sWWqx8fMNi2EZksnWNUmnVldBqUwMJIxcXolBH/RGX5ZjBlBenoIB3PVQ8/+SPz9Hip7+QNH8utSnUlrh2AsJVtdNKIQk74Eevkn+Q+WyUVGoY0ca9DzGwh4hQIDAQAB"

文件差異過大導致無法顯示
+ 36 - 0
src/jfw/modules/subscribepay/src/reportEmailTemplate.html


+ 65 - 0
src/jfw/modules/subscribepay/src/rpcfollow/rpc.go

@@ -3,6 +3,7 @@ package rpcfollow
 import (
 	"config"
 	"entity"
+	"errors"
 	"fmt"
 	"log"
 	qutil "qfw/util"
@@ -13,6 +14,70 @@ import (
 
 type JyPayRpc struct{}
 
+//rpc调用获取支付
+func (c *JyPayRpc) CreateOrder(param *frpc.JyPayOrderParam, res *frpc.JyPayOrderResult) error {
+	qutil.Try(func() {
+		var err error
+		if param.ProductType == "COURSEONLINE" {
+			res.OrderCode, err = entity.JyCourseOnline.NewOrder(*param)
+		} else if param.ProductType == "DATAREPORT" {
+			res.OrderCode, err = entity.JyDataReportStruct.NewOrder(*param)
+		} else {
+			err = errors.New("未知产品信息")
+		}
+		if err != nil {
+			res.Err = err.Error()
+			res.Status = -1
+		}
+		return
+	}, func(e interface{}) {})
+	return nil
+}
+
+//rpc刷新订单
+func (c *JyPayRpc) FlushOrder(param *frpc.JyPayOrderChangeParam, res *frpc.JyPayOrderResult) error {
+	qutil.Try(func() {
+		var payStr string
+		var err error
+		if param.ProductType == "COURSEONLINE" {
+			payStr, err = entity.JyCourseOnline.FlushOrder(*param)
+		} else if param.ProductType == "DATAREPORT" {
+			payStr, err = entity.JyDataReportStruct.FlushOrder(*param)
+		} else {
+			err = errors.New("未知产品信息")
+		}
+		if err != nil {
+			res.Err = err.Error()
+			res.Status = -1
+		} else {
+			res.OrderCode = param.OrderCode
+			res.PayStr = payStr
+		}
+		return
+	}, func(e interface{}) {})
+	return nil
+}
+
+//关闭订单
+func (c *JyPayRpc) CloseOrder(param *frpc.JyPayOrderCloseParam, res *frpc.JyPayOrderResult) error {
+	qutil.Try(func() {
+		var err error
+		if param.ProductType == "COURSEONLINE" {
+			err = entity.JyCourseOnline.CloseOrder(param.OrderCode)
+		} else {
+			err = errors.New("未知产品信息")
+		}
+		if err != nil {
+			res.Err = err.Error()
+			res.Status = -1
+		} else {
+			res.OrderCode = param.OrderCode
+		}
+		return
+	}, func(e interface{}) {})
+	return nil
+}
+
 //数据导出线下支付完成调用
 func (c *JyPayRpc) DateExportOrderFinishByOffline(param *frpc.DateExportData, ret *string) error {
 	log.Println("DateExportOrderFinishByOffline---", param)

+ 211 - 1
src/jfw/modules/subscribepay/src/service/commonAction.go

@@ -2,14 +2,20 @@ package service
 
 import (
 	"config"
+	"encoding/base64"
+	"encoding/json"
 	"entity"
+	"errors"
 	"log"
+	"net/rpc"
 	"pay"
 	qutil "qfw/util"
+	"qfw/util/redis"
 	"strings"
 	"time"
 	"util"
 
+	"github.com/SKatiyar/qr"
 	"gopkg.in/mgo.v2/bson"
 
 	"github.com/go-xweb/xweb"
@@ -23,7 +29,11 @@ type CommonAction struct {
 	deleteOrder   xweb.Mapper `xweb:"/deleteOrder"`           //删除订单
 	vipPaySuccess xweb.Mapper `xweb:"/vipPaySuccess"`         //数据导出是否支付成功
 
-	applyInvoice xweb.Mapper `xweb:"/applyInvoice"` //申请发票
+	applyInvoice    xweb.Mapper `xweb:"/applyInvoice"`       //申请发票
+	getwxSdkSign    xweb.Mapper `xweb:"/wx/getwxSdkSign"`    //微信js参数
+	getWxjsPayParam xweb.Mapper `xweb:"/wx/getWxjsPayParam"` //获取微信支付参数
+	getPcPayCode    xweb.Mapper `xweb:"/pc/getPayCode"`      //获取扫码支付参数
+
 }
 
 //----------------------------申请发票------------------------------------
@@ -204,3 +214,203 @@ func (d *CommonAction) VipPaySuccess() {
 		"success": success,
 	})
 }
+
+func (d *CommonAction) GetwxSdkSign() {
+	var sign []string
+	url := d.GetString("url")
+	if url != "" {
+		sign = SignJSSDK(url)
+	}
+	d.ServeJson(map[string]interface{}{
+		"wxsdk": sign,
+	})
+}
+
+func SignJSSDK(url string) []string {
+	qutil.Catch()
+	var signature []string
+	var key = "wxsignature_" + url
+	if ret := redis.Get("other", key); ret != nil {
+		if d, err := json.Marshal(ret); err == nil {
+			json.Unmarshal(d, &signature)
+		}
+	}
+	if signature == nil || len(signature) == 0 {
+		qutil.Try(func() {
+			client, err := rpc.DialHTTP("tcp", config.Config.Weixinrpc)
+			defer client.Close()
+			if err != nil {
+				log.Println(err.Error())
+				return
+			}
+			err = client.Call("WeiXinRpc.GetJSInterfaceParam", url, &signature)
+			if err != nil {
+				log.Println(err.Error())
+			}
+		}, func(e interface{}) {})
+		if signature == nil || len(signature) != 4 || signature[3] == "" {
+			signature = []string{"", "", "", ""}
+		} else {
+			redis.Put("other", key, signature, 90*60)
+		}
+	}
+	return signature
+}
+
+func (this *CommonAction) GetWxjsPayParam() {
+	orderCode := this.GetString("orderCode")
+	userId := qutil.ObjToString(this.GetSession("userId"))
+	r := func() *entity.FuncResult {
+		//根据订单号获取订单数据
+		query := map[string]interface{}{
+			"user_id":      userId,
+			"order_code":   orderCode,
+			"order_status": 0,
+		}
+		oData := util.Mysql.FindOne("dataexport_order", query, "id,code_url,prepay_time,pay_way,order_money", "")
+		if oData == nil || len(*oData) == 0 {
+			return &entity.FuncResult{false, errors.New("未知订单"), nil}
+		}
+		//判断订单是否超过两小时
+		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"])
+		if time.Now().Before(prepayTime.Add(time.Hour*2)) && jsPayParam != "" && payway == "wx_js" {
+			//未过期
+			return &entity.FuncResult{true, nil, map[string]interface{}{"res": jsPayParam}}
+		}
+		//重新生成订单
+		totalfee := qutil.IntAll((*oData)["order_money"])
+		tradeno, prepayid := "", ""
+		dotype := this.GetString("dotype")
+		productFlag := ""
+		if dotype == "vip" {
+			productFlag = pay.WX_SUBVIP_JSAPI
+		} else if dotype == "dataexport" {
+			productFlag = pay.WX_DATAEXPORT_JSAPI
+		} else if dotype == "onlineCourse" {
+			productFlag = pay.WX_COURSEONLINE_JSAPI
+		} else if dotype == "datareport" {
+			productFlag = pay.WX_DATAREPORT_JSAPI
+		} else {
+			return &entity.FuncResult{false, errors.New("未知订单类型"), nil}
+		}
+		var ret *map[string]string
+		tradeno, ret = pay.WxStruct.CreatePrepayOrder(productFlag, this.IP(), qutil.ObjToString(this.GetSession("s_m_openid")), "", totalfee)
+		if ret == nil || (*ret)["status"] != "1" {
+			errMsg := "创建微信订单出错"
+			if (*ret)["errcodedes"] != "" {
+				errMsg = (*ret)["errcodedes"]
+			} else if (*ret)["errcode"] != "" {
+				errMsg = (*ret)["errcode"]
+			}
+			return &entity.FuncResult{false, errors.New(errMsg), nil}
+		}
+		prepayid = qutil.ObjToString((*ret)["prepayid"])
+		jsPayParam = pay.GetWxJsPayStr(prepayid)
+
+		//更新订单表
+		now := time.Now()
+		ok := util.Mysql.Update("dataexport_order", query, map[string]interface{}{
+			"code_url":     jsPayParam,
+			"prepay_time":  qutil.FormatDate(&now, qutil.Date_Full_Layout),
+			"out_trade_no": tradeno,
+			"prepay_id":    prepayid,
+			"pay_way":      "wx_js",
+		})
+		if !ok {
+			return &entity.FuncResult{false, errors.New("数据库操作异常"), nil}
+		}
+		return &entity.FuncResult{true, nil, map[string]interface{}{"orderCode": orderCode, "res": jsPayParam}}
+	}()
+	if r.Err != nil {
+		log.Printf("%s CreateOrder err:%v\n", userId, r.Err.Error())
+	}
+	this.ServeJson(r.Format())
+}
+
+//扫码支付公共接口
+func (this *CommonAction) GetPcPayCode() {
+	orderCode := this.GetString("orderCode")
+	payway_req := this.GetString("payway")
+	userId := qutil.ObjToString(this.GetSession("userId"))
+	r := func() *entity.FuncResult {
+
+		//根据订单号获取订单数据
+		query := map[string]interface{}{
+			"user_id":      userId,
+			"order_code":   orderCode,
+			"order_status": 0,
+		}
+		oData := util.Mysql.FindOne("dataexport_order", query, "id,code_url,prepay_time,pay_way,order_money,product_type", "")
+		if oData == nil || len(*oData) == 0 {
+			return &entity.FuncResult{false, errors.New("未知订单"), nil}
+		}
+		payway := qutil.ObjToString((*oData)["pay_way"])
+		codeParam := qutil.ObjToString((*oData)["code_url"])
+		totalfee := qutil.IntAll((*oData)["order_money"])
+		if totalfee <= 0 {
+			return &entity.FuncResult{false, errors.New("订单金额异常"), nil}
+		}
+		if payway_req == "" { //回显之前支付方式
+			if payway == "wx_pc" || payway == "ali_pc" {
+				payway_req = payway
+			} else {
+				payway_req = "wx_pc" //默认支付方式
+			}
+		}
+		if !(payway_req == "wx_pc" || payway_req == "ali_pc") {
+			return &entity.FuncResult{false, errors.New("参数异常"), nil}
+		}
+		if payway == payway_req && codeParam != "" {
+			//判断订单是否超过两小时
+			prepayTime, _ := time.ParseInLocation(qutil.Date_Full_Layout, qutil.ObjToString((*oData)["prepay_time"]), time.Local)
+			timeout := prepayTime.Unix() + 2*60*60 - time.Now().Unix()
+			if timeout > 0 {
+				//未过期
+				return &entity.FuncResult{true, nil, map[string]interface{}{"payway": payway_req, "res": codeParam, "money": totalfee, "timeout": timeout}}
+			}
+		}
+		//重新生成订单
+		dotype := qutil.ObjToString((*oData)["product_type"])
+		productFlag := ""
+		if dotype == "企业商机管理" {
+			productFlag = qutil.If(payway_req == "wx_pc", pay.WX_ENTNICHE_NATIVE, pay.ALI_ENTNICHE_NATIVE).(string)
+		} else if dotype == "数据报告" {
+			productFlag = qutil.If(payway_req == "wx_pc", pay.WX_DATAREPORT_NATIVE, pay.ALI_DATAREPORT_NATIVE).(string)
+		} else if dotype == "VIP订阅" {
+			productFlag = qutil.If(payway_req == "wx_pc", pay.WX_SUBVIP_NATIVE, pay.ALI_SUBVIP_NATIVE).(string)
+		} else {
+			return &entity.FuncResult{false, errors.New("未知订单类型"), nil}
+		}
+		//获取订单支付串
+		log.Println(totalfee, productFlag, this.IP(), qutil.ObjToString(this.GetSession("s_m_openid")), payway_req)
+		tradeno, prepayid, codeParam, err := pay.CreateOrderPay(totalfee, productFlag, this.IP(), qutil.ObjToString(this.GetSession("s_m_openid")), payway_req)
+		if err != nil {
+			log.Printf("GetPcPayCode %s %s创建订单出错%v\n", userId, payway_req, err)
+			return &entity.FuncResult{false, errors.New("创建订单异常"), nil}
+		}
+		//更新订单表
+		now := time.Now()
+		ok := util.Mysql.Update("dataexport_order", query, map[string]interface{}{
+			"code_url":     codeParam,
+			"prepay_time":  qutil.FormatDate(&now, qutil.Date_Full_Layout),
+			"out_trade_no": tradeno,
+			"prepay_id":    prepayid,
+			"pay_way":      payway_req,
+		})
+		if !ok {
+			return &entity.FuncResult{false, errors.New("数据库操作异常"), nil}
+		}
+		return &entity.FuncResult{true, nil, map[string]interface{}{"payway": payway_req, "res": codeParam, "money": totalfee, "timeout": 2 * 60 * 60}}
+	}()
+	if r.Err != nil {
+		log.Printf("%s CreateOrder err:%v\n", userId, r.Err.Error())
+	}
+	if payway_req == "wx_pc" && r.Data["res"] != nil {
+		rEncode, _ := qr.Encode(qutil.ObjToString(r.Data["res"]), qr.M)
+		pngdat := rEncode.PNG()
+		r.Data["res"] = base64.StdEncoding.EncodeToString(pngdat)
+	}
+	this.ServeJson(r.Format())
+}

+ 2 - 2
src/jfw/modules/subscribepay/src/service/orderListDetails.go

@@ -572,7 +572,7 @@ func (o *OrderListDetails) SetRes(res []map[string]interface{}, queryM map[strin
 			create_time_stamp = create_time.AddDate(0, 0, i_countdown).Unix()
 		}
 		now_time_stamp := time.Now().Unix()
-		if create_time_stamp < now_time_stamp && (qutil.ObjToString(v["product_type"]) == "VIP订阅" || qutil.ObjToString(v["product_type"]) == "招投标课程" || qutil.ObjToString(v["product_type"]) == "企业商机管理") {
+		if create_time_stamp < now_time_stamp && (qutil.ObjToString(v["product_type"]) == "VIP订阅" || qutil.ObjToString(v["product_type"]) == "招投标课程" || qutil.ObjToString(v["product_type"]) == "线上课程" || qutil.ObjToString(v["product_type"]) == "企业商机管理" || qutil.ObjToString(v["product_type"]) == "数据报告") {
 			if v["order_status"] != nil {
 				order_status := qutil.Int64All(v["order_status"])
 				if order_status == 0 {
@@ -731,7 +731,7 @@ func FortyEightHoursCancel(order string, create_time_stamp, now_time_stamp int64
 		}
 		//如果超过48小时 取消订单  创建48小时后的时间戳<当前时间戳
 		if create_time_stamp < now_time_stamp {
-			if qutil.IntAll((*res)["order_status"]) == 0 && qutil.ObjToString((*res)["pay_way"]) != "transferAccounts" { //未支付状态下 删除订单需要先关闭订单
+			if qutil.IntAll((*res)["order_status"]) == 0 && qutil.ObjToString((*res)["pay_way"]) != "transferAccounts" && qutil.ObjToString((*res)["out_trade_no"]) != "" { //未支付状态下 删除订单需要先关闭订单
 				flag = pay.CloseDataExportOrder(qutil.ObjToString((*res)["pay_way"]), qutil.ObjToString((*res)["out_trade_no"]), qutil.ObjToString((*res)["prepay_time"]))
 			} else {
 				flag = true

+ 22 - 11
src/jfw/modules/subscribepay/src/service/payCallback.go

@@ -35,19 +35,15 @@ func (this *PayCallBackAction) TestPay() {
 		"user_id": userid,
 	}
 	ordercode := this.GetString("ordercode")
-	typeFlag := this.GetString("type")
-	if !(typeFlag == "dataexport" || typeFlag == "datareport" || typeFlag == "vip") {
-		this.Write("未知操作")
-		return
-	}
 	if ordercode != "" {
 		query["order_code"] = ordercode
 	}
-	rDate := util.Mysql.FindOne("dataexport_order", query, "", "create_time desc")
+	rDate := util.Mysql.FindOne("dataexport_order", query, "product_type,out_trade_no,order_money", "create_time desc")
 	if rDate == nil || len(*rDate) == 0 {
 		this.Write("未找到此订单")
 		return
 	}
+	typeFlag := qutil.ObjToString((*rDate)["product_type"])
 	thisParam := &entity.CallBackParam{
 		qutil.IntAll((*rDate)["order_money"]),
 		0,
@@ -56,24 +52,31 @@ func (this *PayCallBackAction) TestPay() {
 		"",
 		"",
 	}
-	if typeFlag == "dataexport" { //数据导出
+	if typeFlag == "数据报告" { //数据导出
 		if !entity.JyDataExportStruct.PayCallBack(thisParam) {
 			log.Printf("数据导出更新执行出错 %+v\n", thisParam)
 			this.Write("数据导出更新执行出错")
 			return
 		}
-	} else if typeFlag == "datareport" { //数据报告
+	} else if typeFlag == "数据报告" { //数据报告
 		if !entity.JyDataReportStruct.PayCallBack(thisParam) {
 			log.Printf("数据报告更新执行出错 %+v\n", thisParam)
 			this.Write("数据报告更新执行出错")
 			return
 		}
-	} else if typeFlag == "vip" { //vip订阅
+	} else if typeFlag == "VIP订阅" { //vip订阅
 		if !entity.JyVipSubStruct.PayCallBack(thisParam) {
 			log.Printf("vip订阅更新执行出错 %+v\n", thisParam)
 			this.Write("vip订阅更新执行出错")
 			return
 		}
+	} else if typeFlag == "企业商机管理" {
+		if !entity.EntnicheStruct.PayCallBack(thisParam) {
+			log.Printf("企业商机管理管理更新执行出错 %+v\n", thisParam)
+			return
+		}
+	} else {
+		this.Write("未知支付类型")
 	}
 	log.Printf("%s模拟支付成功\n", ordercode)
 	this.Write("模拟支付成功")
@@ -122,7 +125,7 @@ func (a *PayCallBackAction) AliPayCallback() {
 				log.Printf("支付宝数据导出更新执行出错 %+v\n", thisParam)
 				return false
 			}
-		} else if strings.HasPrefix(thisParam.OutTradeno, pay.ALI_DATAREPORT_APP) { //数据报告
+		} else if strings.HasPrefix(thisParam.OutTradeno, pay.ALI_DATAREPORT_APP) || strings.HasPrefix(thisParam.OutTradeno, pay.ALI_DATAREPORT_NATIVE) { //数据报告
 			if !entity.JyDataReportStruct.PayCallBack(thisParam) {
 				log.Printf("支付宝数据报告更新执行出错 %+v\n", thisParam)
 				return false
@@ -141,6 +144,10 @@ func (a *PayCallBackAction) AliPayCallback() {
 				log.Printf("支付宝企业商机管理更新执行出错 %+v\n", thisParam)
 				return false
 			}
+		} else if strings.HasPrefix(thisParam.OutTradeno, pay.ALI_COURSEONLINE_APP) || strings.HasPrefix(thisParam.OutTradeno, pay.ALI_COURSEONLINE_NATIVE) { //线上课程
+			if !entity.JyCourseOnline.PayCallBack(thisParam) {
+				log.Printf("支付宝线上课程更新执行出错 %+v\n", thisParam)
+			}
 		}
 		if !thisParam.SaveAliPayRecord() {
 			log.Printf("支付宝支付保存支付记录出错 %+v\n", thisParam)
@@ -189,7 +196,7 @@ func (p *PayCallBackAction) WxPayCallback() {
 			if update = entity.JyDataExportStruct.PayCallBack(thisParam); !update {
 				log.Printf("微信数据导出更新执行出错 %+v\n", thisParam)
 			}
-		} else if strings.HasPrefix(thisParam.OutTradeno, pay.WX_DATAREPORT_APP) || strings.HasPrefix(thisParam.OutTradeno, pay.WX_DATAREPORT_JSAPI) { //数据报告
+		} else if strings.HasPrefix(thisParam.OutTradeno, pay.WX_DATAREPORT_APP) || strings.HasPrefix(thisParam.OutTradeno, pay.WX_DATAREPORT_JSAPI) || strings.HasPrefix(thisParam.OutTradeno, pay.WX_DATAREPORT_NATIVE) { //数据报告
 			if update = entity.JyDataReportStruct.PayCallBack(thisParam); !update {
 				log.Printf("微信数据报告更新执行出错 %+v\n", thisParam)
 			}
@@ -205,6 +212,10 @@ func (p *PayCallBackAction) WxPayCallback() {
 			if update = entity.EntnicheStruct.PayCallBack(thisParam); !update {
 				log.Printf("微信企业商机管理更新执行出错 %+v\n", thisParam)
 			}
+		} else if strings.HasPrefix(thisParam.OutTradeno, pay.WX_COURSEONLINE_APP) || strings.HasPrefix(thisParam.OutTradeno, pay.WX_COURSEONLINE_JSAPI) || strings.HasPrefix(thisParam.OutTradeno, pay.WX_COURSEONLINE_NATIVE) { //线上课程
+			if update = entity.JyCourseOnline.PayCallBack(thisParam); !update {
+				log.Printf("微信线上课程更新执行出错 %+v\n", thisParam)
+			}
 		}
 		if insert = thisParam.SaveWxPayRecord(); !insert {
 			log.Printf("微信支付保存支付记录出错 %+v\n", thisParam)

+ 17 - 5
src/jfw/modules/weixin/src/config.json

@@ -8,11 +8,11 @@
     "weixinrpcport": "8083",
     "webrpcport": "127.0.0.1:8084",
     "jyop_webrpcport": "127.0.0.1:8012",
-    "webdomain": "http://web-jydev-zyh.jianyu360.cn",
-    "appid": "wxa9bf9bc2e6817908",
-    "apptoken": "top20192019",
-    "appsecret": "a06e55ae0496314b83902edb478147e9",
-    "proxysess": "http://web-jydev-zyh.jianyu360.cn/front/sess/%s",
+    "webdomain": "http://web-jydev-wky.jianyu360.cn",
+	"appid": "wx79f2cc873dbea989",
+	"apptoken": "top2016top2016",
+	"appsecret": "fb3f77e9c6725811b5c39f6d58bd58a3",
+	"proxysess": "http://web-jydev-wky.jianyu360.cn/front/sess/%s",
     "followCompany": 10,
     "welcomemsg": "用剑鱼标讯,所有功能完全免费,\n和传统的会员制说再见!\n\n<a href='%s'>点击这里</a>设置关键词,或直接回复“订阅 关键词”,如“订阅 教学设备”,您将随时随地接收招标信息!\n\n剑鱼标讯,让投标无限可能!",
     "tpl_subscribe_push_id": "IY_RWWzMlwDK6hcd6RAzTec6qre8n5r8PNOOUM_hgk0",
@@ -20,6 +20,7 @@
     "tpl_bidopen_id": "3URB-9evmkJ9wntI8iGMEl8_elSAC3wL3ZrQQX-q0cg",
     "tpl_managernotify_id": "LB0XHcbNQKcbgUdDfDncuJW10jay4EfoJ9j-UVh2j5A",
     "tpl_logapply_id": "nWhZ25_llXTKg-3ulTpwAVIdDzRxnxyQ36MdHAiANOk",
+    "tpl_datareport_id": "bkGuL_twVo6lTiMQhN_fWiE2TtqvewvPMElQ14IidCY",
     "tpl_activeapply_id": "zZ5ELQuVLfWH3a9cNAf2OBAnn30iY-ywI1rqByJ6KTI",
     "weixinAutoRpl": "感谢使用剑鱼标讯!\n1.<a href='%s'>【订阅招标信息】</a>\n2.<a href='%s'>【搜索招标信息】</a>\n3.<a href='http://mp.weixin.qq.com/mp/homepage?__biz=MzIyNTM1NDUyNw==&hid=1&sn=f9e98da1975f85011ee138a4ee5cfbe8#wechat_redirect'>【产品帮助】</a>\n4.<a href='http://www.myfans.cc/30a78e9b78'>【招标社区】</a> \n5.<a href='%s'>点击这里,查看“%s”的相关招标信息</a>\n6.快速订阅:回复“订阅”加上你的关键词,比如“订阅 教学设备”\n7.如需人工协助,请回复“客服”\n8.<a href='https://res.jianyu360.com/jyapp/free/download/normal?source=weixinAutoRpl'>下载剑鱼标讯APP,更加方便快捷</a>",
     "autoReplay": {
@@ -91,5 +92,16 @@
         }
     ],
 	"policysupport":"<a href='https://www.jianyu360.com/jyfcfg/main.html'>点击此处</a>,立即查看最新的企业扶持政策。",
+<<<<<<< HEAD
 	"policyKeys":"政策"
 }
+=======
+	"policyKeys":"政策",
+	"datareportUserReply":{
+		"title":"剑鱼标讯数据报告",
+		"url":"https://www.jianyu360.com/swordfish/SingleLogin?toHref=https%3A%2F%2Fwww.jianyu360.com%2Fdatareport%2Fpage%2Fintroduce",
+		"picUrl":"http://web-jydev-wky.jianyu360.cn/datareport/image/datareport_repy_icon.jpg",
+		"desc":"剑鱼标讯官方制作的高质量行业数据报告"
+	}
+}
+>>>>>>> release

+ 22 - 1
src/jfw/modules/weixin/src/jrpc/jrpc.go

@@ -23,12 +23,13 @@ type WeiXinRpc struct {
 	Wwx *weixin.Weixin
 }
 
-var TPL_SUBSCRIBE_PUSH_ID, TPL_PUSH_ID, TPL_BIDOPEN_ID, TPL_MANAGERNOTIFY_ID, TPL_LOGAPPLY_ID, TPL_ACTIVEAPPLY_ID string
+var TPL_SUBSCRIBE_PUSH_ID, TPL_PUSH_ID, TPL_BIDOPEN_ID, TPL_MANAGERNOTIFY_ID, TPL_LOGAPPLY_ID, TPL_ACTIVEAPPLY_ID ,TPL_DATAREPORT_ID string
 
 func init() {
 	TPL_SUBSCRIBE_PUSH_ID = config.Sysconfig["tpl_subscribe_push_id"].(string)
 	TPL_PUSH_ID = config.Sysconfig["tpl_push_id"].(string)
 	TPL_BIDOPEN_ID = config.Sysconfig["tpl_bidopen_id"].(string)
+	TPL_DATAREPORT_ID = config.Sysconfig["tpl_datareport_id"].(string)
 	TPL_MANAGERNOTIFY_ID = config.Sysconfig["tpl_managernotify_id"].(string)
 	TPL_LOGAPPLY_ID = config.Sysconfig["tpl_logapply_id"].(string)
 	TPL_ACTIVEAPPLY_ID = config.Sysconfig["tpl_activeapply_id"].(string)
@@ -89,6 +90,26 @@ func (w *WeiXinRpc) SendBidOpenMsg(param *qrpc.NotifyMsg, ret *qrpc.RpcResult) e
 	return nil
 }
 
+//数据报告订阅成功发送模板消息
+func (w *WeiXinRpc) SendDataReportMsg(param *qrpc.NotifyMsg, ret *qrpc.RpcResult) error {
+	_, err := w.Wwx.PostTemplateMessage(param.Openid, TPL_DATAREPORT_ID, param.Url,
+		weixin.TmplData{
+			"first":    weixin.TmplItem{param.Title, ""},
+			"keyword1": weixin.TmplItem{param.Detail, ""},
+			"keyword2": weixin.TmplItem{param.Service, ""},
+			"keyword3": weixin.TmplItem{param.Date, ""},
+			"keyword4": weixin.TmplItem{"无", ""},
+			"remark":   weixin.TmplItem{param.Remark, ""},
+		})
+	if err != nil {
+		*ret = "N"
+		log.Println("SendDataReportMsg error", err, param.Openid)
+	} else {
+		*ret = "Y"
+		log.Println("SendDataReportMsg success", param.Openid)
+	}
+	return nil
+}
 //发送保函消息
 func (w *WeiXinRpc) SendLOGApplyMsg(param *qrpc.NotifyMsg, ret *qrpc.RpcResult) error {
 	_, err := w.Wwx.PostTemplateMessage(param.Openid, TPL_LOGAPPLY_ID, param.Url,

+ 40 - 3
src/jfw/modules/weixin/src/wx/wx.go

@@ -793,7 +793,29 @@ func Subscribe(w ResponseWriter, r *Request) {
 			Description: subscribeReply["description"].(string),
 		}})
 	}
-
+	if source == "68" { //微信扫码登录页-登录回复
+		if redisValue := redis.Get("other", fmt.Sprintf("SingleLogin_%s", openid)); redisValue != nil {
+			if param, ok := redisValue.(map[string]interface{}); ok {
+				time.AfterFunc(time.Second, func() {
+					w.PostText(fmt.Sprintf("<a href='%s'>点击此处打开《%s》</a>", util.ObjToString(param["href"]), util.ObjToString(param["title"])))
+				})
+			}
+		}
+	}
+	if source == "69" { //数据报告-关注回复图文
+		datareportReply := util.ObjToMap(config.Sysconfig["datareportUserReply"])
+		if datareportReply != nil && len(*datareportReply) > 0 {
+			time.AfterFunc(time.Second, func() {
+				artArr := []Article{Article{
+					Title:       (*datareportReply)["title"].(string),
+					Url:         (*datareportReply)["url"].(string),
+					PicUrl:      (*datareportReply)["picUrl"].(string),
+					Description: (*datareportReply)["desc"].(string),
+				}}
+				w.PostNews(artArr)
+			})
+		}
+	}
 	//企业扶持
 	if source == "66" {
 		go w.PostText(config.Sysconfig["policysupport"].(string))
@@ -926,7 +948,22 @@ func ScanHandler(w ResponseWriter, r *Request) {
 	if isRepeatCall(openid, r.CreateTime) {
 		return
 	}
-	log.Println("openid======", openid)
+	log.Println("openid======", openid, r.EventKey)
+	if r.EventKey == "69" { //数据报告-扫码回复图文
+		datareportReply := util.ObjToMap(config.Sysconfig["datareportUserReply"])
+		if datareportReply != nil && len(*datareportReply) > 0 {
+			time.AfterFunc(time.Second, func() {
+				artArr := []Article{Article{
+					Title:       (*datareportReply)["title"].(string),
+					Url:         (*datareportReply)["url"].(string),
+					PicUrl:      (*datareportReply)["picUrl"].(string),
+					Description: (*datareportReply)["desc"].(string),
+				}}
+				w.PostNews(artArr)
+			})
+		}
+	}
+
 	m, b := tools.MQFW.FindOneByField("user", `{"s_m_openid":"`+openid+`"}`, `{"_id":1,"s_headimage":1,"o_jy":1,"o_vipjy":1,"i_vip_status":1}`)
 	if b {
 		//剑鱼标讯订阅提醒  (1:关注事件,2:扫码事件,3:发送客服消息处理,4:支付操作)
@@ -1632,7 +1669,7 @@ func vipFastSubscribe(user *map[string]interface{}, keyWord, openId, m string) (
 				},
 			},
 			"$set": bson.M{
-				"o_vipjy.l_modifydate":                                        time.Now().Unix(),
+				"o_vipjy.l_modifydate": time.Now().Unix(),
 				"o_vipjy.a_items." + strconv.Itoa(classify_index) + ".s_item": classify_name,
 			},
 		}, false, false)

+ 6 - 0
src/jfw/public/rpccall.go

@@ -23,6 +23,12 @@ func SendBidOpenMsg(p *qrpc.NotifyMsg) bool {
 	return ok
 }
 
+//发送数据报告模板消息
+func SendDataReportMsg(p *qrpc.NotifyMsg) bool {
+	ok, _ := qrpc.WxPush(rpcserver, "WeiXinRpc.SendDataReportMsg", p)
+	return ok
+}
+
 //发送保函申请消息
 func SendLOGApplyMsg(p *qrpc.NotifyMsg) bool {
 	ok, _ := qrpc.WxPush(rpcserver, "WeiXinRpc.SendLOGApplyMsg", p)

二進制
src/web/staticres/course/image/lessonsOffline.png


二進制
src/web/staticres/course/image/lessonsOnline.png


二進制
src/web/staticres/datareport/image/datareport_repy_icon.jpg


二進制
src/web/staticres/datareport/image/report_icon.png


二進制
src/web/staticres/images/search/home_tab_1.png


二進制
src/web/staticres/images/search/home_tab_2.png


二進制
src/web/staticres/images/search/home_tab_3.png


二進制
src/web/staticres/images/search/home_tab_4.png


二進制
src/web/staticres/images/search/home_tab_light.png


+ 2 - 2
src/web/staticres/js/public-nav.js

@@ -9,7 +9,7 @@ $(function () {
 		    $thisWidth = $(this).width(),
 		    //当前宽度
 		$thisIndex = $(this).index();
-		if((typeof(myPageNavIsNormal)!="undefined"&&myPageNavIsNormal==true)||$href.indexOf("supsearch")>-1||$href.indexOf("bidsearchforent")>-1||$href.indexOf("promotional/topics")>-1||$href.indexOf("list")>-1||$href.indexOf("article/content")>-1||$href.indexOf("article/bdprivate")>-1||$href.indexOf("article/mailprivate")>-1||$href.indexOf("article/bdcontent")>-1||$href.indexOf("/jypc/toPushView")>-1||$href.indexOf("/jyblog")>-1||$href.indexOf("/dataExport")>-1||$href.indexOf("/front/dataService.html")>-1||$href.indexOf("/front/course")>-1||$href.indexOf("/front/dataexport")>-1){
+		if((typeof(myPageNavIsNormal)!="undefined"&&myPageNavIsNormal==true)||$href.indexOf("supsearch")>-1||$href.indexOf("bidsearchforent")>-1||$href.indexOf("promotional/topics")>-1||$href.indexOf("list")>-1||$href.indexOf("article/content")>-1||$href.indexOf("article/bdprivate")>-1||$href.indexOf("article/mailprivate")>-1||$href.indexOf("article/bdcontent")>-1||$href.indexOf("/jypc/toPushView")>-1||$href.indexOf("/jyblog")>-1||$href.indexOf("/dataExport")>-1||$href.indexOf("/front/dataService.html")>-1||$href.indexOf("/front/course")>-1||$href.indexOf("/front/dataexport")>-1||$href.indexOf("/orderPay")>-1){
             $navLi.find("a:not(.link)").css({"color":"#252627"});
 		}else{
 			$navLi.find("a:not(.link)").css({"color":"#fff"});
@@ -54,7 +54,7 @@ function seclectNavLi(el, $index) {
 	var $slider = $(".public-nav .jynav .slider");
 	/*获取当前这个元素的css*/
 	var $thisCss = el.eq($index).width();
-	if((typeof(myPageNavIsNormal)!="undefined"&&myPageNavIsNormal==true)||$href.indexOf("supsearch")>-1||$href.indexOf("bidsearchforent")>-1||$href.indexOf("promotional/topics")>-1||$href.indexOf("list")>-1||$href.indexOf("article/content")>-1||$href.indexOf("article/bdprivate")>-1||$href.indexOf("article/mailprivate")>-1||$href.indexOf("article/bdcontent")>-1||$href.indexOf("/jyblog")>-1||$href.indexOf("/dataExport")>-1||$href.indexOf("/front/dataService.html")>-1||$href.indexOf("/front/course")>-1||$href.indexOf("/front/dataexport")>-1){
+	if((typeof(myPageNavIsNormal)!="undefined"&&myPageNavIsNormal==true)||$href.indexOf("supsearch")>-1||$href.indexOf("bidsearchforent")>-1||$href.indexOf("promotional/topics")>-1||$href.indexOf("list")>-1||$href.indexOf("article/content")>-1||$href.indexOf("article/bdprivate")>-1||$href.indexOf("article/mailprivate")>-1||$href.indexOf("article/bdcontent")>-1||$href.indexOf("/jyblog")>-1||$href.indexOf("/dataExport")>-1||$href.indexOf("/front/dataService.html")>-1||$href.indexOf("/front/course")>-1||$href.indexOf("/front/dataexport")>-1||$href.indexOf("/orderPay")>-1){
         el.find("a:not(.link)").css({"color":"#252627"});
 	}else{
 		el.find("a:not(.link)").css({"color":"#fff"});

+ 259 - 162
src/web/staticres/js/wxSupersearch.js

@@ -1,3 +1,58 @@
+/*
+* money unit for zyh @date 2020/6/5
+* */
+var MoneyUnit = {
+	levelArr: ['元', '万元', '亿元', '万亿元'],
+	test: function (num, type, lv) {
+	if (type === void 0) {
+		type = 'string';
+	}
+
+	if (lv === void 0) {
+		lv = 0;
+	}
+
+	if (num === 0) {
+		if (type === 'string') {
+			return '0';
+		}
+
+		if (type === 'lv') {
+			return this.levelArr[lv];
+		}
+
+		if (type === 'number') {
+			return 0;
+		}
+
+		if (type === 'index') {
+			return lv;
+		}
+	}
+
+	var result = num / Math.pow(10000, lv);
+
+	if (result > 10000 && lv < 2) {
+		return this.test(num, type, lv + 1);
+	} else {
+		if (type === 'string') {
+			return result.toFixed(2).replace('.00', '') + this.levelArr[lv];
+		}
+
+		if (type === 'lv') {
+			return this.levelArr[lv];
+		}
+
+		if (type === 'index') {
+			return lv;
+		}
+
+		if (type === 'number') {
+			return result.toFixed(2).replace('.00', '');
+		}
+	}
+}
+}
 var SuperSearch = {
 	secondFlag:"",
 	secondList:"",
@@ -118,7 +173,7 @@ var SuperSearch = {
 				}
 				if(SuperSearch.showNull){
 					$("#supersearchPage #selLable").removeClass("hidden");
-					$("#supersearchPage .nullcontent").removeClass("hidden");	
+					$("#supersearchPage .nullcontent").removeClass("hidden");
 				}else{
 					if(SuperSearch.showNull == null){
 						$("#supersearchPage #selLable").addClass("hidden");
@@ -134,11 +189,11 @@ var SuperSearch = {
 				$("#supersearchPage #wrapper").addClass("hidden");
 			}
 		});
-		
+
 		$("#supersearchPage input[name=super_searchinput]").on("input",function(){
 			SuperSearch.canSearch();
 		});
-		
+
 		//是否显示提示搜索框
 		$("#supersearchPage input[name=super_searchinput]").focus(function(){
 			hideTab();
@@ -148,7 +203,7 @@ var SuperSearch = {
 				$("#supersearchPage .inputDiv").addClass("hidden");
 			},300);
 		});
-		
+
 		//清除输入框功能
 		$("#supersearchPage .clearInpt").on("tap",function(){
 			$("#supersearchPage input[name=super_searchinput]").val("");
@@ -178,7 +233,7 @@ var SuperSearch = {
 			SuperSearch.showToOrder(false)
 			SuperSearch.dyDiv=true;
 		});
-		
+
 		//订阅
 		$("#supersearchPage #zjdy").on("tap",function(){
 			var rFlag = false;
@@ -243,7 +298,7 @@ var SuperSearch = {
 				});
 			}
 		});
-		
+
 		////
 		SuperSearch.njTipEasyPopup = new EasyPopup("nijianTip");
 		$("#supersearchPage .q-mark").on("tap",function(){
@@ -258,7 +313,7 @@ var SuperSearch = {
             $(this).addClass("active");
             $("#supersearchPage .money-dialog .btn").removeClass("active");
 		});
-	
+
 	    var reg = /^[\u4e00-\u9fa5]+$/;
 	    var maxnum = "";
 	    $("#supersearchPage .maxMrice").on("input propertychange",function(){
@@ -318,7 +373,7 @@ var SuperSearch = {
 	            maxnum = min;
 			}
 		});
-	
+
 	    var minnum = "";
 	    $("#supersearchPage .minMrice").on("input propertychange",function(){
 	    	/*
@@ -377,7 +432,7 @@ var SuperSearch = {
 	            maxnum = min;
 	        }
 	    });
-	
+
 	    $("#supersearchPage .shaixIndustry").on("tap",function(){
 	            $(this).addClass("shaixcl");
 	            $(this).siblings().removeClass("shaixcl");
@@ -410,7 +465,7 @@ var SuperSearch = {
 	        $(this).addClass("shaixcl");
 	        $(this).siblings().removeClass("shaixcl");
 		});
-			
+
 		var dialogObj = $("#supersearchPage .contentone");
 		dialogObj.find(".btn").on("tap",function(){
 			if($(this).parent().index() == 0){
@@ -423,7 +478,7 @@ var SuperSearch = {
 				dialogObj.find("ul:first li:first .btn").addClass("active");
 			};
 		});
-		
+
 		var dialogObjtwo = $("#supersearchPage .contenttwo");
 	    dialogObjtwo.find(".btn").on("tap",function(){
 	        if($(this).parent().index() == 0){
@@ -444,7 +499,7 @@ var SuperSearch = {
 	            dialogObjtwo.find("ul:first li:first .btn").addClass("active");
 	        };
 	    });
-	
+
 	    dialogObjtwo.find('div[id="dqbtn"]').on("tap",function(){
 	        $(this).toggleClass("active");
 	        if ($(this).attr("class") != "active"){
@@ -457,7 +512,7 @@ var SuperSearch = {
 	            dialogObjtwo.find("ul:first li:first .btn").addClass("active");
 	        };
 	    });
-	
+
 		//获取输入时间
 		$("#supersearchPage .jypt-pt button").on("tap",function(){
 			var thisIndex = $("#supersearchPage .jypt-pt .jypt-active").index();
@@ -479,13 +534,151 @@ var SuperSearch = {
 				$("#supersearchPage .jypt-pt>button:first").addClass("jypt-active");
 			}
 		});
+		//获取当前时间
+		var date = (function () {
+			var date = new Date();
+			var year = date.getFullYear();
+			var month = date.getMonth() + 1;
+			var day = date.getDate();
+			month = month < 10 ? '0' + month : month;
+			day = day < 10 ? '0' + day : day;
+			return year + '-' + month + '-' + day;
+		})();
+		// 显示记录值
+		var nowStartTime, nowEndTime;
+		function resetDefaultTime () {
+			var stime = localStorage.search_starttime;
+			var etime = localStorage.search_endtime;
+			var regTime = new RegExp(/\d{4}年\d{2}月\d{2}日/)
+			if (stime && regTime.test(stime)) {
+				nowStartTime = stime.replace('日', '').split(/[年|月]/)
+				$("#supersearchPage #starttime").val(stime).attr('data-value', new Date(nowStartTime.join('/')).getTime());
+			} else {
+				$("#supersearchPage #starttime").val('').attr('data-value', '');
+				localStorage.removeItem('search_starttime')
+			}
+			if (etime && regTime.test(etime)) {
+				nowEndTime = etime.replace('日', '').split(/[年|月]/)
+				$("#supersearchPage #endtime").val(etime).attr('data-value', new Date(nowEndTime.join('/')).getTime());
+			} else {
+				$("#supersearchPage #endtime").val('').attr('data-value', '');
+				localStorage.removeItem('search_endtime')
+			}
+		}
+		resetDefaultTime()
+		// 点击事件绑定datepicker
 		$("#supersearchPage #starttime").on("click",function(){
-	        $("#supersearchPage #starttime").mobiscroll('show');
+			if(typeof(isWxsearchlist) != "undefined"){
+				$("#supersearchPage .sl-jyshxbottom").addClass("hide");
+			}
+			weui.datePicker({
+				id: 'start' + new Date().getTime(),
+				start: 2000,
+				title: '选择开始时间',
+				end: nowEndTime ? nowEndTime.join('-') : new Date(),
+				defaultValue: nowStartTime ? nowStartTime : date.split('-'),
+				className: 'jymobile-datePicker start',
+				onChange: function (result) {
+					var nowTArr = result.map(function (v) {
+						return v.label
+					})
+					$(".jymobile-datePicker.start .weui-picker__item").each(function(){
+						var nowT = $(this).text()
+						$(this).removeClass('is-now-select')
+						if (nowTArr.indexOf(nowT) !== -1) {
+							$(this).addClass('is-now-select')
+						}
+					})
+				},
+				onClose: function () {
+					if(typeof(isWxsearchlist) != "undefined"){
+						$("#supersearchPage .sl-jyshxbottom").removeClass("hide");
+					}
+				},
+				onConfirm: function (result) {
+					var year = result[0].value;
+					var month = result[1].value < 10 ? '0' + result[1].value : result[1].value;
+					var day = result[2].value < 10 ? '0' + result[2].value : result[2].value;
+					var time_result = year + '年' + month + '月' + day + '日';
+					var timeSec = year + '/' + month + '/' + day
+					nowStartTime = [year, month, day]
+					if(localStorage){
+						localStorage.search_starttime = time_result;
+					}
+					$("#supersearchPage #starttime").val(time_result).attr('data-value', new Date(timeSec).getTime());
+					SuperSearch.afterSelect();
+				}
+			});
+			$(".jymobile-datePicker.start #weui-picker-confirm").text('确认')
+			if (!nowStartTime) {return}
+			$(".jymobile-datePicker.start .weui-half-screen-dialog__ft").prepend(`<a href="javascript:;" class="weui-btn weui-btn_disabled weui-picker__btn" id="resetTime" data-action="select" style="text-decoration: none;">重置</a>`)
+			$(".jymobile-datePicker.start #resetTime").on('click',function () {
+				$('.jymobile-datePicker.start .weui-mask.weui-animate-fade-in').trigger('click');
+				$('.jymobile-datePicker.start .weui-mask.weui-animate-fade-in').click();
+				$("#supersearchPage #starttime").attr("data-value","").val('');
+				nowStartTime = null
+				if(localStorage){
+					localStorage.removeItem("search_starttime");
+				}
+				SuperSearch.afterOnClear();
+			})
 		});
 		$("#supersearchPage #endtime").on("click",function(){
-	        $("#supersearchPage #endtime").mobiscroll('show');
+			if(typeof(isWxsearchlist) != "undefined"){
+				$("#supersearchPage .sl-jyshxbottom").addClass("hide");
+			}
+			weui.datePicker({
+				id: 'end' + new Date().getTime(),
+				start: nowStartTime ? nowStartTime.join('-') : 2000,
+				title: '选择结束时间',
+				end: new Date(),
+				defaultValue: nowEndTime ? nowEndTime : date.split('-'),
+				className: 'jymobile-datePicker end',
+				onChange: function (result) {
+					var nowTArr = result.map(function (v) {
+						return v.label
+					})
+					$(".jymobile-datePicker.end .weui-picker__item").each(function(){
+						var nowT = $(this).text()
+						$(this).removeClass('is-now-select')
+						if (nowTArr.indexOf(nowT) !== -1) {
+							$(this).addClass('is-now-select')
+						}
+					})
+				},
+				onClose: function () {
+					if(typeof(isWxsearchlist) != "undefined"){
+						$("#supersearchPage .sl-jyshxbottom").removeClass("hide");
+					}
+				},
+				onConfirm: function (result) {
+					var year = result[0].value;
+					var month = result[1].value < 10 ? '0' + result[1].value : result[1].value;
+					var day = result[2].value < 10 ? '0' + result[2].value : result[2].value;
+					var time_result = year + '年' + month + '月' + day + '日';
+					var timeSec = year + '/' + month + '/' + day
+					nowEndTime = [year, month, day]
+					if(localStorage){
+						localStorage.search_endtime = time_result;
+					}
+					$("#supersearchPage #endtime").val(time_result).attr('data-value', new Date(timeSec).getTime());
+					SuperSearch.afterSelect();
+				}
+			});
+			$(".jymobile-datePicker.end #weui-picker-confirm").text('确认')
+			if (!nowEndTime) {return}
+			$(".jymobile-datePicker.end .weui-half-screen-dialog__ft").prepend(`<a href="javascript:;" class="weui-btn weui-btn_disabled weui-picker__btn" id="resetTime" data-action="select" style="text-decoration: none;">重置</a>`)
+			$(".jymobile-datePicker.end #resetTime").on('click',function () {
+				$('.jymobile-datePicker.end .weui-mask.weui-animate-fade-in').trigger('click');
+				$('.jymobile-datePicker.end .weui-mask.weui-animate-fade-in').click();
+				$("#supersearchPage #endtime").attr("data-value","").val('');
+				nowEndTime = null
+				if(localStorage){
+					localStorage.removeItem("search_endtime");
+				}
+				SuperSearch.afterOnClear();
+			})
 		});
-		SuperSearch.initMobiscroll();
 		//返回时 是否显示table的查看更多
 		if($(".newdialog .tab-box .sub-show-list").find("li.active").attr('dataVal')=="showlist"){
 			SuperSearch.isTable(false);
@@ -614,7 +807,7 @@ var SuperSearch = {
 					SuperSearch.noMoreData();
 					return;
 				}
-				
+
 				$.ajax({
 					type: 'post',
 					url: '/swordfish/searchlist/paging',
@@ -652,7 +845,7 @@ var SuperSearch = {
 				SuperSearch.isTable(true);
 			}
 		}
-		
+
 		if(!hasNextPage){
 			SuperSearch.noMoreData();
 			return;
@@ -727,7 +920,7 @@ var SuperSearch = {
 			}
 		});
 		SuperSearch.reqParam.scope=scope.join(",");
-	
+
 		//行业类型
 		var industrySelect="";
 		if($("#supersearchPage .contentthree .active").hasClass("btn")){
@@ -736,7 +929,7 @@ var SuperSearch = {
 			}else{
 				industrySelect= $("#supersearchPage .contentthree .active").attr("data-value");
 			}
-		
+
 		}else{
 			$("#supersearchPage .contentthree .active").parent("li").find(".btn").each(function(){
 				industrySelect+= $(this).attr("data-value")+",";
@@ -744,7 +937,7 @@ var SuperSearch = {
 			industrySelect=industrySelect.substring(0,industrySelect.length-1);
 		}
 		SuperSearch.reqParam.industry=industrySelect;
-	
+
 		//信息类型
 		var selectToptypes = "";
 		$("#supersearchPage .contenttwo #dqbtn.active").each(function(){
@@ -754,7 +947,7 @@ var SuperSearch = {
 		}
 			selectToptypes += thisText;
 		});
-	
+
 		var selectSubTypes = "";
 		$("#supersearchPage .contenttwo  .btn.active").each(function(){
 			if($(this).parent().index() == 0){
@@ -767,7 +960,7 @@ var SuperSearch = {
 			selectSubTypes += thisText;
 		});
 		SuperSearch.reqParam.subtype=selectSubTypes;
-	
+
 		//金额
 		var moneyRange=$("#supersearchPage .money-dialog .active").attr("data-value");
 		if(moneyRange!="all"){
@@ -778,12 +971,12 @@ var SuperSearch = {
 			SuperSearch.reqParam.minprice="";
 			SuperSearch.reqParam.maxprice="";
 		}
-	
+
 		//SuperSearch.reqParam.money=moneyRange;
-	
+
 		//日期
 		SuperSearch.reqParam.publishtime=SuperSearch.setPublishtime();
-	
+
 		//全文or标题
 		if($(".newdialog .tab-box .sub-search-title").find("li.active").attr('dataVal')=="searchtitle"){
 			SuperSearch.reqParam.selectType="title";
@@ -798,7 +991,7 @@ var SuperSearch = {
 			var model = "lab_search";
 			var s_url = "/jylab/mainSearch/";
 			var s_model = "搜索";
-		
+
 			var s_industry = "";//行业-单选
 			var s_key = "";//关键词
 			var i_amount = 0;//中标金额 1-含 0-不含
@@ -837,9 +1030,9 @@ var SuperSearch = {
 			}else{
 				i_infotable = 1;
 			}
-		
+
 			var content = '{"encode":"' + encode + '","model":"' + model + '","s_url":"' + s_url + '","s_model":"' + s_model + '","s_openid":"' + s_openid + '","s_industry":"' + s_industry + '","s_key":"'+s_key+'","i_amount":'+i_amount+',"i_area":'+i_area+',"i_industry":'+i_industry+',"i_infotable":'+i_infotable+',"i_infotype":'+i_infotype+',"i_time":'+i_time+'}';
-		
+
 			$.post('/accesslog/byajax',{json:content},function(r){});
 		}
 	},
@@ -887,7 +1080,7 @@ var SuperSearch = {
 			$(".newdialog .sub-search-title").find("li").removeClass("active");
 			$(".selected-export .options .search-title").find("em").text("标题搜索");
 			$(".newdialog .sub-search-title").find("li[dataval='searchtitle']").addClass("active");
-			
+
 			$(".newdialog .sub-show-list").find("li").removeClass("active");
 			$(".selected-export .show-list").find("em").text("列表显示");
 			$(".newdialog .sub-show-list").find("li[dataval='showlist']").addClass("active");
@@ -914,7 +1107,7 @@ var SuperSearch = {
 				$("#supersearchPage .selLable").removeClass("hidden");
 				//铺查询信息
 				$("#supersearchPage #wrapper .dropload-down").remove();
-				
+
 				if(data["list"] == null || data["list"].length == 0){
 					$("#supersearchPage #hasNoData_tiptext>font").hide();
 					if(data.status==-1){
@@ -1031,7 +1224,7 @@ var SuperSearch = {
 			if(industry!=""){
 				industry='<span class="industry">'+industry+'</span>';
 			}
-		
+
 			//时间
 			var tdf = list[i].publishtime;
 			var fullTime="";
@@ -1047,7 +1240,7 @@ var SuperSearch = {
 			}else{
 				tdf = '';
 			}
-		
+
 			var datatype = "";
 			if(list[i].subtype){
 				datatype='<span class="type">'+list[i].subtype+'</span>'
@@ -1087,6 +1280,14 @@ var SuperSearch = {
 					}
 				}
 			}
+			// 金额标签
+			var moneyTag = '';
+			if(typeof(list[i].budget) != "undefined" && list[i].budget != null && list[i].budget != ""){
+				moneyTag = '<span class="industry">'+MoneyUnit.test(list[i].budget)+'</span>';
+			}
+			if(typeof(list[i].bidamount) != "undefined" && list[i].bidamount != null && list[i].bidamount != ""){
+				moneyTag = '<span class="industry">'+MoneyUnit.test(list[i].bidamount)+'</span>';
+			}
 			if(i==3&&pageNum==1){
 				ListHtml += '<div class="tslist" style="border-bottom-width:0px;">'
 			}else{
@@ -1102,14 +1303,14 @@ var SuperSearch = {
 						+'</div>'
 						+'<div style="clear:both;"></div>'
 						+'<div class="restime time-diff">'
-						+area+datatype+industry+tdf
+						+area+industry+datatype+moneyTag+tdf
 						+'</div>'
 						+'<div style="clear:both;"></div>'
 						+detail
 						+'</div>';
 			if(i>=20||pageNum!=1){
 				continue
-			}			
+			}
 			//拟建项目
 			if(SuperSearch.subtype_proposed==SuperSearch.reqParam.subtype){
 				var projectinfo = list[i].projectinfo;
@@ -1243,7 +1444,7 @@ var SuperSearch = {
 	       SuperSearch.myredirect(h,sid,sds,industry);
 	   	});
 	   	$('#supersearchPage #list').html(ListHtmlObj);
-	
+
 	   	TableHtmlobj.on("tap",function(event){
 	       	var h =  $(this).attr("s");
 	       	var sid = $(this).attr("sid");
@@ -1257,7 +1458,7 @@ var SuperSearch = {
 	  	    $("#supersearchPage #table .content").html("<tr><td><div>序号</div></td><td><div>项目名称</div></td><td><div>公告类型</div></td><td><div>预算<br>(万元)</div></td><td><div>招标单位</div></td><td><div>开标时间</div></td><td><div>中标单位</div></td><td>中标金额<br>(万元)</td><td><div>发布时间</div></td></tr>");
 	   	}
 	   	$("#supersearchPage #table .content").append(TableHtmlobj);
-		
+
 		$(".loading_").hide();
 	},
 	myredirect: function (link,sid,sds,industry){  //跳转三级页
@@ -1349,7 +1550,7 @@ var SuperSearch = {
 //		}else{
 //			$("#supersearchPage .inputDiv").css("border-top-width","1px");
 		}
-		//		
+		//
 		var len=$("#supersearchPage .inputDiv ul li").length;
 		$("#supersearchPage .inputDiv ul li:eq("+(len-1)+")").css("border-bottom-right-radius","5px").css("border-bottom-left-radius","5px");
 		//点击提示框内容 进行搜索
@@ -1418,7 +1619,7 @@ var SuperSearch = {
 					if(document.all){
 						window.event.cancelBubble = true;
 				 	}else{
-						event.stopPropagation(); 
+						event.stopPropagation();
 					}
 				}
 			},1000);
@@ -1436,7 +1637,7 @@ var SuperSearch = {
 		if(flag){ //table
 			if(SuperSearch.dropload){//表格只展示20条数据
 				SuperSearch.dropload.lock();
-			} 
+			}
 			if($("#table .content tr").length>20){
 				$(".dropload-down").css("display","none");
 				$("#wrapper .shade_table").css("display","");
@@ -1559,7 +1760,7 @@ var SuperSearch = {
 		}
 	    $("body").scrollTop(sessionStorage.superSearch_yScroll);
 	    $("#supersearchPage #table .data").scrollLeft(sessionStorage.superSearch_xScroll);
-	
+
 	    //筛选时间
 	    var ptime= sessionStorage.superSearch_publishtime;
 	    if(typeof(ptime) != "undefined" && ptime != ""){
@@ -1594,7 +1795,7 @@ var SuperSearch = {
 			    });
 			}
 	    }
-	
+
 	    //地区
 	    var scopes=sessionStorage.superSearch_scope;
 	    if(typeof(scopes) != "undefined" && scopes != "A"&&scopes != ""){
@@ -1616,8 +1817,8 @@ var SuperSearch = {
 	    /*if(industry != "A"&&industry != ""){
 		$("#supersearchPage .contentthree").find("ul:first li:first .btn").removeClass("active");
 		industry = industry.split(",");
-	
-	
+
+
 		if(industry.length>1){
 		  //  alert(1)
 		    $("#supersearchPage [data-value='"+industry[0]+"']").parent("li").find("#dqbtn").addClass("active");
@@ -1751,119 +1952,6 @@ var SuperSearch = {
 		    }
 	    });
 	},
-	initMobiscroll: function(){
-		var starttime = null;
-		var endtime = null;
-		if(localStorage){
-			var stime = localStorage.search_starttime;
-			var etime = localStorage.search_endtime;
-			if(stime){
-				$("#supersearchPage #starttime").attr("data-value",stime);
-				starttime = new Date(Number(stime));
-				$('#supersearchPage #starttime').val(starttime.Format("yyyy年MM月dd日"));
-			}else{
-				$("#supersearchPage #starttime").attr("data-value","");
-				$('#supersearchPage #starttime').val("");
-			}
-			if(etime){
-				$("#supersearchPage #endtime").attr("data-value",etime);
-				endtime = new Date(Number(etime));
-				$('#supersearchPage #endtime').val(endtime.Format("yyyy年MM月dd日"));
-			}else{
-				$("#supersearchPage #endtime").attr("data-value","");
-				$('#supersearchPage #endtime').val("");
-			}
-		}
-		$.mobiscroll.setDefaults({
-			theme: "ios",
-			lang: "zh",
-			setText: "确定",
-			clearText: "清空",
-			buttons: [ 
-			    'set',
-			    { 
-					text: '选择时间',
-					cssClass: 'dwb title',
-					handler: function(event,inst){ 
-					    
-					}
-			    },
-				'clear'
-			],
-			dateFormat: "yyyy年mm月dd日",
-			dateOrder: "yyyymd",
-			timeWheels: "H",
-			timeFormat: "HH时 周DD",
-			dayNames: ["日","一","二","三","四","五","六"],
-			headerText: false,
-			yearSuffix: "年",
-			monthSuffix: "月",
-			daySuffix: "日",
-			showOnTap: false,
-			onBeforeShow: function(inst){
-				if(typeof(isWxsearchlist) != "undefined"){
-					$("#supersearchPage .sl-jyshxbottom").addClass("hide");
-				}
-			},
-			onClosed: function(valueText, inst){
-				if(typeof(isWxsearchlist) != "undefined"){
-					$("#supersearchPage .sl-jyshxbottom").removeClass("hide");
-				}
-			}
-		});
-		$("#supersearchPage #starttime").mobiscroll().date({
-			maxDate: endtime,
-			onInit: function(inst){
-				if(starttime){
-					inst.setVal(new Date(Number(starttime)));
-				}
-			},
-			onSelect: function(valueText,inst){
-				var arrayVal = inst.getArrayVal();
-				var date = new Date(arrayVal[0],arrayVal[1],arrayVal[2]);
-				var inst = $("#supersearchPage #endtime").mobiscroll('getInst');
-				inst.option({minDate: date});
-				if(localStorage){
-					localStorage.search_starttime = date.getTime();
-				}
-				$("#supersearchPage #starttime").attr("data-value",date.getTime());
-				SuperSearch.afterSelect();
-			},
-			onClear: function (event, inst){
-				$("#supersearchPage #starttime").attr("data-value","");
-				if(localStorage){
-					localStorage.removeItem("search_starttime");
-				}
-				SuperSearch.afterOnClear();
-			}
-	    });
-		$("#supersearchPage #endtime").mobiscroll().date({
-			minDate: starttime,
-			onInit: function(inst){
-				if(endtime){
-					inst.setVal(new Date(Number(endtime)));
-				}
-			},
-			onSelect: function(valueText,inst){
-				var arrayVal = inst.getArrayVal();
-				var date = new Date(arrayVal[0],arrayVal[1],arrayVal[2]);
-				var inst = $("#supersearchPage #starttime").mobiscroll('getInst');
-				inst.option({maxDate: date});
-				if(localStorage){
-					localStorage.search_endtime = date.getTime();
-				}
-				$("#supersearchPage #endtime").attr("data-value",date.getTime());
-				SuperSearch.afterSelect();
-			},
-			onClear: function (event, inst){
-				$("#supersearchPage #endtime").attr("data-value","");
-				if(localStorage){
-					localStorage.removeItem("search_endtime");
-				}
-				SuperSearch.afterOnClear();
-			}
-	    });
-	},
 	afterSelect: function(){
 		$("#supersearchPage .jypt-timeinputs").addClass("jypt-timeinputs-active");
 		$("#supersearchPage .jypt-pt .jypt-active").removeClass("jypt-active");
@@ -1886,7 +1974,7 @@ var SuperSearch = {
 			}
 			publishtime = SuperSearch.getInputTime().join("_");
 			if(publishtime != "_"){
-				return publishtime;	
+				return publishtime;
 			}else{
 				return "";
 			}
@@ -1916,7 +2004,7 @@ var SuperSearch = {
 		if(SuperSearch.dropload != null){
 			SuperSearch.dropload.resetload();
 		}
-		//再html内点击都会存缓存 关闭广告后再刷新 会取缓存 
+		//再html内点击都会存缓存 关闭广告后再刷新 会取缓存
 		SuperSearch.clearSessionStorage();
 	},
 	appendInterceptWord: function(word){
@@ -2034,12 +2122,21 @@ var SuperSearch = {
 				if(subtype==undefined){
 					subtype = ""
 				}
+				if(subtype!=""){
+					homeListHtml +='<div class="course">'+subtype+'</div>'
+				}
 				if (industry!=""){
 					homeListHtml +='<div class="industry">'+industry+'</div>'
 				}
-				if(subtype!=""){
-					homeListHtml +='<div class="course">'+subtype+'</div>'
+				var moneyTag = ''
+				// 金额标签
+				if(typeof(_list.budget) != "undefined" && _list.budget != null && _list.budget != ""){
+					moneyTag = '<div class="industry">'+MoneyUnit.test(_list.budget)+'</div>';
+				}
+				if(typeof(_list.bidamount) != "undefined" && _list.bidamount != null && _list.bidamount != ""){
+					moneyTag = '<div class="industry">'+MoneyUnit.test(_list.bidamount)+'</div>';
 				}
+				homeListHtml += moneyTag
 				//时间
 				var publishtime = _list["publishtime"];
 				if(publishtime){
@@ -2124,4 +2221,4 @@ var SuperSearch = {
 			$(".no_data").show();
 		}
 	}
-};
+};

文件差異過大導致無法顯示
+ 4 - 0
src/web/staticres/order/css/bootstrap.min.css


文件差異過大導致無法顯示
+ 3 - 0
src/web/staticres/order/css/iconfont.css


+ 237 - 0
src/web/staticres/order/css/order_detail.css

@@ -0,0 +1,237 @@
+#order_detail {
+  line-height: 1;
+  padding-top: 76px;
+  padding-bottom: 60px;
+  background-color: #fff;
+}
+
+#order_detail .order_crumb {
+  padding: 24px 0 12px;
+}
+
+#order_detail .order_crumb a {
+  display: inline-block;
+  font-size: 16px;
+  color: #1D1D1D;
+  cursor: pointer;
+  text-decoration: none;
+  font-size: 14px;
+}
+
+#order_detail .order_crumb .active {
+  color: #2CB7CA;
+}
+
+#order_detail .order_main .greenBg {
+  border-top: 2px solid #2CB7CA;
+  background-color: rgba(44, 183, 202, 0.08);
+}
+
+#order_detail .order_main .redBg {
+  border-top: 2px solid #FE737A;
+  background-color: rgba(254, 115, 122, 0.08);
+}
+
+#order_detail .order_main .greenFont {
+  color: #2CB7CA;
+}
+
+#order_detail .order_main .redFont {
+  color: #FE737A;
+}
+
+#order_detail .order_main .o_m_thead {
+  padding: 18px 30px 20px;
+}
+
+#order_detail .order_main .o_m_thead .order_id {
+  font-size: 14px;
+  line-height: 24px;
+}
+
+#order_detail .order_main .o_m_thead .order_state {
+  margin-top: 14px;
+}
+
+#order_detail .order_main .o_m_thead .order_state span:nth-child(1) {
+  float: left;
+}
+
+#order_detail .order_main .o_m_thead .order_state .go_pay {
+  float: right;
+  display: inline-block;
+  padding: 6px 24px;
+  font-size: 14px;
+  line-height: 18px;
+  background: #2CB7CA;
+  border-radius: 4px;
+  color: #fff;
+  text-decoration: none;
+}
+
+#order_detail .order_main .o_m_thead .refund_item {
+  font-size: 14px;
+  line-height: 24px;
+}
+
+#order_detail .order_main .o_m_tbody .b_list {
+  margin-top: 16px;
+  border: 1px solid #EBEBEB;
+}
+
+#order_detail .order_main .o_m_tbody .list_thead {
+  padding: 0 30px;
+  height: 36px;
+  line-height: 36px;
+  background: #F5F5FB;
+  font-size: 14px;
+  color: #1D1D1D;
+  border-top: 2px solid #AAAAAA;
+}
+
+#order_detail .order_main .o_m_tbody .list_tbody {
+  padding: 20px 30px;
+}
+
+#order_detail .order_main .o_m_tbody .tb_left {
+  width: 540px;
+  border-right: 1px solid #EBEBEB;
+  padding-right: 30px;
+}
+
+#order_detail .order_main .o_m_tbody .tb_left p {
+  line-height: 24px;
+  font-size: 14px;
+  color: #1D1D1D;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+}
+
+#order_detail .order_main .o_m_tbody .tb_right {
+  padding-left: 30px;
+}
+
+#order_detail .order_main .o_m_tbody .tb_right p {
+  line-height: 24px;
+  font-size: 14px;
+  color: #1D1D1D;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+}
+
+#order_detail .order_main .o_m_tbody .line {
+  width: 1140px;
+  margin: 0 auto;
+  height: 1px;
+  border-bottom: 1px dashed #E0E0E0;
+}
+
+#order_detail .order_main .o_m_tbody .check_voucher {
+  display: inline-block;
+  width: 68px;
+  height: 22px;
+  line-height: 22px;
+  font-size: 13px;
+  color: #fff;
+  background: #2CB7CA;
+  border-radius: 2px;
+  text-decoration: none;
+  text-align: center;
+}
+
+#order_detail .order_main .o_m_tbody .refund_label {
+  display: inline-block;
+  width: 70px;
+  margin-right: 36px;
+  font-size: 14px;
+  color: #1D1D1D;
+}
+
+#order_detail .order_main .o_m_tbody .refund_value {
+  font-size: 14px;
+  color: #FF3A20;
+}
+
+#order_detail .order_main .o_m_tbody .refund_select {
+  display: inline-block;
+  width: 260px;
+  height: 36px;
+  margin-top: 16px;
+  padding: 0 20px;
+  line-height: 36px;
+  vertical-align: middle;
+  font-size: 14px;
+  border: 1px solid #E0E0E0;
+  box-sizing: border-box;
+  border-radius: 4px;
+}
+
+#order_detail .order_main .o_m_tbody .refund_handle {
+  margin-top: 32px;
+  margin-bottom: 160px;
+}
+
+#order_detail .order_main .o_m_tbody .refund_handle .refund_btn .submit_btn, #order_detail .order_main .o_m_tbody .refund_handle .refund_btn .cancel_btn {
+  width: 180px;
+  height: 46px;
+  line-height: 46px;
+  text-align: center;
+  font-size: 16px;
+  border-radius: 6px;
+}
+
+#order_detail .order_main .o_m_tbody .refund_handle .refund_btn .submit_btn {
+  background-color: #2CB7CA;
+  color: #fff;
+  margin-right: 6px;
+}
+
+#order_detail .order_main .o_m_tbody .refund_handle .refund_btn .submit_btn:disabled {
+  color: rgba(255, 255, 255, 0.6);
+  cursor: no-drop;
+}
+
+#order_detail .order_main .o_m_tbody .refund_handle .refund_btn .cancel_btn {
+  background-color: #fff;
+  border: 1px solid #E0E0E0;
+  color: #1D1D1D;
+}
+
+#order_detail .toast {
+  display: none;
+  position: fixed;
+  top: 50%;
+  left: 50%;
+  width: 144px;
+  height: 140px;
+  background: rgba(0, 0, 0, 0.65);
+  border-radius: 12px;
+  margin-top: -70px;
+  margin-left: -72px;
+  text-align: center;
+}
+
+#order_detail .toast i {
+  display: block;
+  margin-top: 26px;
+  font-size: 52px;
+  color: #fff;
+}
+
+#order_detail .toast span {
+  display: block;
+  margin-top: 14px;
+  font-size: 16px;
+  color: #fff;
+  line-height: 24px;
+}
+#order_detail .order_main .o_m_thead .service_number{
+  font-family: Microsoft YaHei;
+  font-style: normal;
+  font-weight: normal;
+  font-size: 14px;
+  line-height: 24px;
+  color: #686868;
+}

+ 442 - 0
src/web/staticres/order/css/order_pay.css

@@ -0,0 +1,442 @@
+#order_pay {
+    line-height: 1;
+    /*  padding-top: 76px;*/
+    padding-bottom: 60px;
+    background-color: #fff;
+    font-size: 14px;
+}
+
+#order_pay .op_crumb {
+    padding: 24px 0 12px;
+}
+
+#order_pay .op_crumb a {
+    display: inline-block;
+    font-size: 16px;
+    color: #1D1D1D;
+    cursor: pointer;
+    text-decoration: none;
+    font-size: 14px;
+}
+
+#order_pay .op_crumb .active {
+    color: #2CB7CA;
+}
+
+#order_pay .op_main {
+    padding: 0 30px;
+    border-top: 2px solid #2CB7CA;
+    border-left: 1px solid #EBEBEB;
+    border-right: 1px solid #EBEBEB;
+    border-bottom: 1px solid #EBEBEB;
+}
+
+#order_pay .op_main .top {
+    height: 84px;
+    border-bottom: 1px solid #E0E0E0;
+}
+
+#order_pay .op_main .top .t_left {
+    float: left;
+    padding: 34px 0 30px;
+    font-size: 16px;
+    color: #1D1D1D;
+}
+
+#order_pay .op_main .top .t_right {
+    float: right;
+}
+
+#order_pay .op_main .top .t_right .t_right_number {
+    padding-top: 16px;
+    line-height: 24px;
+    color: #686868;
+    font-size: 14px;
+}
+
+#order_pay .op_main .top .t_right .t_right_money {
+    color: #1D1D1D;
+    font-size: 14px;
+}
+
+#order_pay .op_main .top .t_right .t_right_money strong {
+    color: #FF3A20;
+    font-size: 24px;
+}
+
+#order_pay .op_main .middle {
+    padding-bottom: 40px;
+}
+
+#order_pay .op_main .middle .pay_box {
+    height: 88px;
+    line-height: 88px;
+    border-bottom: 1px solid #EBEBEB;
+}
+
+#order_pay .op_main .middle .pay_tab {
+    margin: 24px 0 24px 30px;
+}
+
+#order_pay .op_main .middle .pay_tab .tab_item {
+    width: 136px;
+    height: 40px;
+    line-height: 40px;
+    text-align: center;
+    border: 1px solid #E0E0E0;
+    border-radius: 4px;
+    float: left;
+    margin-right: 16px;
+    font-size: 14px;
+    color: #1D1D1D;
+    cursor: pointer;
+}
+
+#order_pay .op_main .middle .pay_tab .wx img {
+    width: 22px;
+    height: 20px;
+    margin-right: 8px;
+    vertical-align: middle;
+    margin-top: -4px;
+}
+
+#order_pay .op_main .middle .pay_tab .zfb img {
+    width: 20px;
+    height: 20px;
+    margin-right: 8px;
+    vertical-align: middle;
+}
+
+#order_pay .op_main .middle .pay_tab .active {
+    border-radius: 5px;
+    border: 1px solid #2CB7CA;
+    background: url(../image/bgsanjiao.png) no-repeat bottom right;
+    background-size: 19px 19px;
+}
+
+#order_pay .op_main .middle .pay_content .m_code {
+    float: left;
+    margin: 38px 0 0 214px;
+}
+
+#order_pay .op_main .middle .pay_content .m_code .warn {
+    font-size: 14px;
+    line-height: 18px;
+    color: #1D1D1D;
+}
+
+#order_pay .op_main .middle .pay_content .m_code .warn em {
+    color: #FF3A20;
+}
+
+#order_pay .op_main .middle .pay_content .m_code .qrcode_box {
+    width: 308px;
+    height: 308px;
+    margin-top: 26px;
+    border: 1px solid #E0E0E0;
+    border-radius: 4px;
+    overflow: hidden;
+}
+
+#order_pay .op_main .middle .pay_content .m_code .qrcode_box img {
+    width: 100%;
+    height: 100%;
+}
+
+#order_pay .op_main .middle .pay_content .m_code .tips {
+    margin-top: 34px;
+    margin-left: 32px;
+    color: #1D1D1D;
+    font-size: 16px;
+    line-height: 20px;
+}
+
+#order_pay .op_main .middle .pay_content .m_code .tips img {
+    width: 26px;
+    height: 26px;
+    vertical-align: middle;
+    margin-right: 10px;
+}
+
+#order_pay .op_main .middle .pay_content .m_phone {
+    float: left;
+    margin-top: 80px;
+    width: 323px;
+    height: 399px;
+}
+
+#order_pay .op_main .middle .pay_content .m_phone img {
+    width: 100%;
+    height: 100%;
+}
+
+#order_pay .op_main .middle .pay_content .m_l_title {
+    padding: 24px 0 16px;
+    color: #1D1D1D;
+    font-size: 16px;
+}
+
+#order_pay .op_main .middle .pay_content .m_l_body {
+    background: #F7F7F7;
+    padding: 20px;
+    line-height: 24px;
+    display: inline-block;
+}
+
+#order_pay .op_main .middle .pay_content .m_l_body li {
+    font-size: 14px;
+    width: 100%;
+}
+
+#order_pay .op_main .middle .pay_content .m_l_body li span:nth-child(1) {
+    color: #1D1D1D;
+}
+
+#order_pay .op_main .middle .pay_content .m_l_body li span:nth-child(2) {
+    color: #686868;
+}
+
+#order_pay .op_main .middle .pay_content .transfer_tips {
+    line-height: 24px;
+    padding: 16px 0 18px;
+    font-size: 14px;
+    color: #686868;
+    border-bottom: 1px solid #E0E0E0;
+    height: 100px;
+}
+
+#order_pay .op_main .middle .pay_content .transfer_tips li {
+    width: 100%;
+}
+
+#order_pay .op_main .middle .pay_content .example {
+    margin-left: 24px;
+    color: #2CB7CA;
+    font-size: 14px;
+    line-height: 24px;
+    cursor: pointer;
+}
+
+#order_pay .op_main .middle .pay_content .upload .upload_box {
+    position: relative;
+    width: 100px;
+    height: 100px;
+    border-radius: 4px;
+    background: #F7F7F7;
+    border: 1px solid #E0E0E0;
+    overflow: hidden;
+    cursor: pointer;
+}
+
+#order_pay .op_main .middle .pay_content .upload .upload_box .input_label, #order_pay .op_main .middle .pay_content .upload .upload_box .input_file, #order_pay .op_main .middle .pay_content .upload .upload_box img, #order_pay .op_main .middle .pay_content .upload .upload_box .screen {
+    position: absolute;
+    top: 0;
+    left: 0;
+    bottom: 0;
+    right: 0;
+    width: 100%;
+    height: 100%;
+}
+
+#order_pay .op_main .middle .pay_content .upload .upload_box .input_label {
+    text-align: center;
+    z-index: 88;
+}
+
+#order_pay .op_main .middle .pay_content .upload .upload_box .input_label i {
+    display: block;
+    color: #686868;
+    font-size: 24px;
+    line-height: 24px;
+    margin-top: 24px;
+}
+
+#order_pay .op_main .middle .pay_content .upload .upload_box .input_label span {
+    font-size: 20px;
+    font-size: 14px;
+    line-height: 24px;
+    color: #686868;
+}
+
+#order_pay .op_main .middle .pay_content .upload .upload_box .input_file {
+    opacity: 0;
+    z-index: 100;
+    cursor: pointer;
+}
+
+#order_pay .op_main .middle .pay_content .upload .upload_box img {
+    z-index: 101;
+    display: block;
+}
+
+#order_pay .op_main .middle .pay_content .upload .upload_box .screen {
+    display: none;
+    z-index: 102;
+    background-color: rgba(0, 0, 0, 0.6);
+}
+
+#order_pay .op_main .middle .pay_content .upload .upload_box .screen .del {
+    width: 40px;
+    text-align: center;
+    margin: 30px auto;
+}
+
+#order_pay .op_main .middle .pay_content .upload .upload_box .screen .del i {
+    display: block;
+    font-size: 16px;
+    color: #fff;
+}
+
+#order_pay .op_main .middle .pay_content .upload .upload_box .screen .del span {
+    display: block;
+    font-size: 14px;
+    color: #fff;
+    line-height: 24px;
+}
+
+#order_pay .op_main .middle .pay_content .btn_handle {
+    margin-top: 30px;
+}
+
+#order_pay .op_main .middle .pay_content .btn_handle .submit_btn, #order_pay .op_main .middle .pay_content .btn_handle .cancel_btn {
+    width: 180px;
+    height: 46px;
+    line-height: 46px;
+    text-align: center;
+    font-size: 16px;
+    border-radius: 6px;
+}
+
+#order_pay .op_main .middle .pay_content .btn_handle .submit_btn {
+    background-color: #2CB7CA;
+    color: #fff;
+    border: 1px solid #2CB7CA;
+    margin-right: 10px;
+}
+
+#order_pay .op_main .middle .pay_content .btn_handle .submit_btn:disabled {
+    background-color: #87DFEA;
+    cursor: no-drop;
+}
+
+#order_pay .op_main .middle .pay_content .btn_handle .cancel_btn {
+    background-color: #fff;
+    border: 1px solid #E0E0E0;
+    color: #1D1D1D;
+}
+
+#order_pay .toast {
+    display: none;
+    position: fixed;
+    top: 50%;
+    left: 50%;
+    width: 144px;
+    height: 140px;
+    background: rgba(0, 0, 0, 0.65);
+    border-radius: 12px;
+    margin-top: -70px;
+    margin-left: -72px;
+    text-align: center;
+}
+
+#order_pay .toast i {
+    display: block;
+    margin-top: 26px;
+    font-size: 52px;
+    color: #fff;
+}
+
+#order_pay .toast span {
+    display: block;
+    margin-top: 14px;
+    font-size: 16px;
+    color: #fff;
+    line-height: 24px;
+}
+
+.visib_ {
+    visibility: hidden;
+}
+
+.j-wx-code {
+    width: 335px;
+    height: 355px;
+    background-color: #fff;
+    -webkit-border-radius: 6px;
+    -moz-border-radius: 6px;
+    border-radius: 6px;
+    position: relative;
+
+}
+
+.j-wx-code > .code-close {
+    width: 40px;
+    height: 40px;
+    position: absolute;
+    right: -20px;
+    top: -20px;
+    cursor: pointer;
+    -webkit-transition: all 1s;
+    -o-transition: all 1s;
+    -moz-transition: all 1s;
+    transition: all 1s;
+}
+
+.j-wx-code > .code-close:hover {
+    -webkit-transform: scale(1.2);
+    -moz-transform: scale(1.2);
+    -ms-transform: scale(1.2);
+    -o-transform: scale(1.2);
+    transform: scale(1.2);
+}
+
+.j-wx-code > .code-title {
+    height: 82px;
+    background: url(/images/j-wx-code-title.png) center center no-repeat;
+    -webkit-animation: moveYun 15s infinite linear both;
+    -moz-animation: moveYun 15s infinite linear both;
+    -o-animation: moveYun 15s infinite linear both;
+    animation: moveYun 15s infinite linear both;
+}
+
+.j-wx-code > .code-wxm {
+    text-align: center;
+    margin-bottom: -6px;
+    margin-top: -16px;
+
+}
+
+.j-wx-code > .code-wxm > img {
+    width: 200px;
+    height: 200px;
+    margin-top: -5px;
+}
+
+.j-wx-code > .code-text {
+    font: 16px "microsoft yahei";
+    text-align: center;
+    color: #252627;
+}
+
+.j-wx-code > .code-bottom {
+    width: 470px;
+    height: 211px;
+    position: absolute;
+    bottom: -113px;
+    left: -73px;
+    background: url(/images/j-wx-code-bottom.png) 0 0 no-repeat;
+}
+
+.j-wx-code > .code-bottom > img {
+    position: absolute;
+    left: 280px;
+    top: 88px;
+    -webkit-animation: codeWxMove 10s linear both;
+    -moz-animation: codeWxMove 10s linear both;
+    -o-animation: codeWxMove 10s linear both;
+    animation: codeWxMove 10s linear both;
+    -webkit-animation-fill-mode: forwards;
+    -moz-animation-fill-mode: forwards;
+    -o-animation-fill-mode: forwards;
+    animation-fill-mode: forwards;
+}

+ 169 - 0
src/web/staticres/order/css/pay_success.css

@@ -0,0 +1,169 @@
+.pay_success {
+  line-height: 1;
+  padding-top: 76px;
+  padding-bottom: 60px;
+  background-color: #F5F5FB;
+}
+
+.pay_success .ps_header {
+  padding: 40px 0 16px;
+  font-size: 18px;
+  color: #1D1D1D;
+}
+
+.pay_success .ps_content {
+  padding: 0 30px;
+  border-top: 2px solid #2CB7CA;
+  background-color: #fff;
+}
+
+.pay_success .ps_content .c_top {
+  padding: 18px 0 24px;
+  border-bottom: 1px dashed #E0E0E0;
+}
+
+.pay_success .ps_content .c_top .c_t_status {
+  text-align: center;
+  font-size: 18px;
+  color: #1D1D1D;
+}
+
+.pay_success .ps_content .c_top .c_t_status img {
+  width: 100px;
+  height: 80px;
+}
+
+.pay_success .ps_content .c_top .c_t_status p {
+  line-height: 24px;
+  padding-left: 20px;
+}
+
+.pay_success .ps_content .c_top .c_t_tips {
+  margin-top: 8px;
+  text-align: center;
+  font-size: 16px;
+  line-height: 24px;
+  color: #686868;
+}
+
+.pay_success .ps_content .c_top .c_t_price {
+  margin-top: 8px;
+  text-align: center;
+  color: #FF3A20;
+  font-size: 24px;
+  line-height: 32px;
+}
+
+.pay_success .ps_content .c_bottom {
+  padding: 24px 0 222px;
+  text-align: center;
+}
+
+.pay_success .ps_content .c_bottom .order_item {
+  font-size: 14px;
+  line-height: 24px;
+  color: #888888;
+}
+
+.pay_success .ps_content .c_bottom .order_item span:nth-child(1) {
+  display: inline-block;
+  width: 80px;
+  text-align: left;
+}
+
+.pay_success .ps_content .c_bottom .order_item span:nth-child(2) {
+  display: inline-block;
+  width: 160px;
+  text-align: right;
+}
+
+.pay_success .ps_content .c_bottom .check_order {
+  display: inline-block;
+  margin-top: 32px;
+  width: 132px;
+  height: 46px;
+  line-height: 46px;
+  background-color: #2CB7CA;
+  color: #fff;
+  font-size: 16px;
+  border-radius: 6px;
+  text-decoration: none;
+  text-align: center;
+}
+.j-wx-code{
+  width: 335px;
+  height: 355px;
+  background-color: #fff;
+  -webkit-border-radius: 6px;
+  -moz-border-radius: 6px;
+  border-radius: 6px;
+  position: relative;
+
+}
+.j-wx-code>.code-close{
+  width: 40px;
+  height: 40px;
+  position: absolute;
+  right: -20px;
+  top: -20px;
+  cursor: pointer;
+  -webkit-transition: all 1s;
+  -o-transition: all 1s;
+  -moz-transition: all 1s;
+  transition: all 1s;
+}
+.j-wx-code>.code-close:hover{
+  -webkit-transform: scale(1.2);
+  -moz-transform: scale(1.2);
+  -ms-transform: scale(1.2);
+  -o-transform: scale(1.2);
+  transform: scale(1.2);
+}
+.j-wx-code>.code-title{
+  height: 82px;
+  background:url(/images/j-wx-code-title.png) center center no-repeat;
+  -webkit-animation: moveYun 15s infinite linear both;
+  -moz-animation: moveYun 15s infinite linear both;
+  -o-animation: moveYun 15s infinite linear both;
+  animation: moveYun 15s infinite linear both;
+}
+.j-wx-code>.code-wxm{
+  text-align: center;
+  margin-bottom: -6px;
+  margin-top: -16px;
+
+}
+.j-wx-code>.code-wxm>img{
+  width: 200px;
+  height: 200px;
+  margin-top: -5px;
+}
+.j-wx-code>.code-text{
+  font: 16px "microsoft yahei";
+  text-align: center;
+  color: #252627;
+}
+.j-wx-code>.code-bottom{
+  width: 470px;
+  height: 211px;
+  position: absolute;
+  bottom: -113px;
+  left: -73px;
+  background: url(/images/j-wx-code-bottom.png) 0 0 no-repeat;
+}
+.j-wx-code>.code-bottom>img{
+  position: absolute;
+  left: 280px;
+  top: 88px;
+  -webkit-animation: codeWxMove 10s linear both;
+  -moz-animation: codeWxMove 10s linear both;
+  -o-animation: codeWxMove 10s linear both;
+  animation: codeWxMove 10s linear both;
+  -webkit-animation-fill-mode:forwards;
+  -moz-animation-fill-mode:forwards;
+  -o-animation-fill-mode:forwards;
+  animation-fill-mode:forwards;
+}
+.onlyDiscount{
+  display: none;
+}

+ 76 - 0
src/web/staticres/order/css/reset_pc.css

@@ -0,0 +1,76 @@
+html, body, div, span, applet, object, iframe, 
+h1, h2, h3, h4, h5, h6, p, blockquote, pre, 
+a, abbr, acronym, address, big, cite, code, 
+del, dfn, em, font, img, ins, kbd, q, s, samp, 
+small, strike, strong, sub, sup, tt, var, 
+dl, dt, dd, li, 
+fieldset, form, label, legend, 
+table, caption, tbody, tfoot, thead, tr, th, td { 
+margin: 0; 
+padding: 0; 
+border: 0; 
+outline: 0; 
+font-weight: inherit; 
+font-style: inherit; 
+font-family: inherit;
+-webkit-tap-highlight-color: transparent;
+} 
+:focus { 
+outline: 0; 
+} 
+body { 
+/*line-height: 1; */
+/*color: black; 
+background: white; */
+font-family: "Microsoft YaHei",sans-serif;
+font-size: 16px;
+-webkit-font-smoothing: antialiased;
+} 
+input{
+	font-family: "Microsoft YaHei",sans-serif;
+	-webkit-appearance: none;
+}
+button{ 
+	outline: none;border: none;
+	}
+table { 
+border-collapse: separate; 
+border-spacing: 0; 
+} 
+caption, th, td { 
+text-align: left; 
+font-weight: normal; 
+} 
+textarea { resize:none;-webkit-appearance: none; }
+img{border:0;}
+a{
+	text-decoration:none;
+	color: #000;
+	font-size: 14px;
+}
+/*selet 下拉三角改变*/
+/*select {border: none;border-radius: 0;appearance:none;-moz-appearance:none;-webkit-appearance:none;background:#ffffff url(../images/public-img/pub-Xsj.png) no-repeat 95% center;}*/
+/*清除ie的默认选择框样式清除,隐藏下拉箭头*/
+/*select::-ms-expand { display: none;}
+html{-webkit-text-size-adjust: none;}	*/	
+	
+/*a:link {color:#606060;} 
+a:visited {color:#606060;} 
+a:hover{color:#8cb91e;	text-decoration: underline;}
+a:active {color:#606060;}*/
+address,caption,cite,code,dfn,em,th,b,i {font-weight: normal;font-style: normal;}
+
+.clearfix:after {visibility: hidden; display: block; font-size: 0; content: " "; clear: both; height: 0; }
+.clearfix {*zoom:1; }
+.fl {float:left; }
+.fr {float: right; }
+.w {width: 1200px; margin: 0 auto;}
+.ellipsis {
+    overflow: hidden;
+    text-overflow: ellipsis;
+    white-space: nowrap;
+}
+/*去除下拉框*/
+/*input[type="search"]::-webkit-search-cancel-button{
+  display: none;
+}*/

文件差異過大導致無法顯示
+ 3 - 0
src/web/staticres/order/iconfont/iconfont.css


二進制
src/web/staticres/order/iconfont/iconfont.eot


二進制
src/web/staticres/order/iconfont/iconfont.ttf


二進制
src/web/staticres/order/iconfont/iconfont.woff


二進制
src/web/staticres/order/iconfont/iconfont.woff2


二進制
src/web/staticres/order/image/alipay.png


二進制
src/web/staticres/order/image/bgsanjiao.png


二進制
src/web/staticres/order/image/pay_success.png


二進制
src/web/staticres/order/image/qrcode.png


二進制
src/web/staticres/order/image/smallCode.png


二進制
src/web/staticres/order/image/telphone.png


二進制
src/web/staticres/order/image/wxpay.png


二進制
src/web/staticres/order/image/zhifubao.png


文件差異過大導致無法顯示
+ 5 - 0
src/web/staticres/order/js/bootstrap.min.js


文件差異過大導致無法顯示
+ 1 - 0
src/web/staticres/order/js/jquery-2.1.4.min.js


+ 38 - 20
src/web/staticres/pccss/public-nav-1200.css

@@ -134,26 +134,44 @@ input:-ms-input-placeholder {
 }
 
 .public-nav .more{
-  height: 75px;
-}
-
-.more .items{
-  background-color: #fff;
-  width: 95px;
-  margin-left: -10px;
-  position: absolute;
-  z-index: 999;
-  border-bottom-left-radius: 5px;
-  border-bottom-right-radius: 5px;
-  transition: all 0.5s;
+ 	height: 75px;
 }
 
-.more .items.course .link{
-  white-space: nowrap;
-  line-height: 60px;
-  cursor: pointer;
-  font-size: 15px;
-}
-.more .items.course .link:hover {
-  color: rgba(44,183,202)!important;
+.more .items.course{
+	background-color: #fff;
+	width: 100px;
+	margin-left: -10px;
+	position: absolute;
+	z-index: 999;
+	transition: all 0.5s;
+	border-radius: 4px;
+}
+.more .items.course .item{
+	height: 50px;
+	line-height:50px;
+}
+
+.more .items.course .item.item_line{
+	border-bottom: 1px solid #E0E0E0;
+}
+.more .items.course .item .link{
+	white-space: nowrap;
+	line-height: 49px;
+	cursor: pointer;
+	font-size: 15px;
+}
+.more .items.course .item a:hover {
+ 	color: rgba(44,183,202)!important;
+}
+
+.more .items.course::before {
+	content: "";
+    width: 0;
+    height: 0;
+    top: -8px;
+    margin-left: -2.5px;
+    position: absolute;
+    border-left: 5px solid transparent;
+    border-right: 5px solid transparent;
+    border-bottom: 8px solid #fff;
 }

文件差異過大導致無法顯示
+ 2 - 2
src/web/staticres/vipsubscribe/css/weui.min.css


文件差異過大導致無法顯示
+ 2 - 2
src/web/staticres/vipsubscribe/js/weui.min.js


文件差異過大導致無法顯示
+ 0 - 4
src/web/staticres/wx_course/css/order_list.css


+ 7 - 2
src/web/templates/common/pchead.html

@@ -37,9 +37,14 @@
                     <a href="/front/dataService.html">数据服务</a>
 				</li>
 				<li class="more">
-				    <a>增值服务</a>
+				  <a>增值服务</a>
 					<div class="items course" style="display: none">
-						<a class="link" href="/front/course/list">招投标课程</a>
+            <!--<div class="item item_line">
+              <a class="link" href="/jyxspc/">线上课程</a>
+            </div>-->
+            <div class="item">
+              <a class="link" href="/front/course/list">线下课程</a>
+            </div>
 					</div>
 				</li>
 				<li class="slider"></li>

部分文件因文件數量過多而無法顯示