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

Merge branch 'master' into feature/v4.9.34

lianbingjie 1 жил өмнө
parent
commit
8fadc9a066
86 өөрчлөгдсөн 4128 нэмэгдсэн , 945 устгасан
  1. 2 2
      src/active.json
  2. 22 1
      src/config.json
  3. 2 2
      src/go.mod
  4. 4 4
      src/go.sum
  5. 7 4
      src/index.yaml
  6. 4 4
      src/jfw/filter/cookie.go
  7. 1 0
      src/jfw/front/commonPayWx.go
  8. 15 0
      src/jfw/front/docMember.go
  9. 81 0
      src/jfw/front/index.go
  10. 9 2
      src/jfw/front/login.go
  11. 38 0
      src/jfw/front/partner.go
  12. 39 61
      src/jfw/front/tags.go
  13. 2 1
      src/jfw/modules/app/src/app/front/commonPay.go
  14. 12 3
      src/jfw/modules/app/src/app/front/login.go
  15. 9 2
      src/jfw/modules/app/src/app/front/wx.go
  16. 2 1
      src/jfw/modules/app/src/config.json
  17. 3 3
      src/jfw/modules/app/src/go.mod
  18. 4 17
      src/jfw/modules/app/src/go.sum
  19. 121 0
      src/jfw/modules/app/src/web/templates/commonPay/docMember/orderDetail.html
  20. 22 1
      src/jfw/modules/app/src/web/templates/commonPay/paySuccess.html
  21. 78 72
      src/jfw/modules/bigmember/src/go.mod
  22. 867 48
      src/jfw/modules/bigmember/src/go.sum
  23. 16 1
      src/jfw/modules/bigmember/src/service/use/use.go
  24. 2 2
      src/jfw/modules/publicapply/src/activityday/dao/orderInfo.go
  25. 1 19
      src/jfw/modules/publicapply/src/ad/service/actions.go
  26. 3 0
      src/jfw/modules/publicapply/src/config/config.go
  27. 540 540
      src/jfw/modules/publicapply/src/detail/dao/bidding.go
  28. 2 3
      src/jfw/modules/publicapply/src/go.mod
  29. 4 4
      src/jfw/modules/publicapply/src/go.sum
  30. 5 2
      src/jfw/modules/publicapply/src/oneclick/entity/entity.go
  31. 5 0
      src/jfw/modules/publicapply/src/util/util.go
  32. 1 0
      src/jfw/modules/subscribepay/src/a/init.go
  33. 2 1
      src/jfw/modules/subscribepay/src/config.json
  34. 9 7
      src/jfw/modules/subscribepay/src/config/config.go
  35. 5 0
      src/jfw/modules/subscribepay/src/docMember_price.json
  36. 114 32
      src/jfw/modules/subscribepay/src/entity/commodity.go
  37. 6 0
      src/jfw/modules/subscribepay/src/entity/consts.go
  38. 259 0
      src/jfw/modules/subscribepay/src/entity/docMember.go
  39. 126 0
      src/jfw/modules/subscribepay/src/entity/order.go
  40. 53 0
      src/jfw/modules/subscribepay/src/entity/product.go
  41. 2 2
      src/jfw/modules/subscribepay/src/go.mod
  42. 4 4
      src/jfw/modules/subscribepay/src/go.sum
  43. 0 1
      src/jfw/modules/subscribepay/src/main.go
  44. 14 6
      src/jfw/modules/subscribepay/src/pay/aliPay.go
  45. 11 3
      src/jfw/modules/subscribepay/src/pay/util.go
  46. 17 9
      src/jfw/modules/subscribepay/src/pay/wxPay.go
  47. 4 2
      src/jfw/modules/subscribepay/src/pay_config.json
  48. 94 0
      src/jfw/modules/subscribepay/src/service/docMember.go
  49. 7 0
      src/jfw/modules/subscribepay/src/service/orderListDetails.go
  50. 21 8
      src/jfw/modules/subscribepay/src/service/payCallback.go
  51. 6 0
      src/jfw/modules/subscribepay/src/test/http-client.env.json
  52. 81 0
      src/jfw/modules/subscribepay/src/test/p525.http
  53. 2 2
      src/jfw/modules/subscribepay/src/test/test.http
  54. 21 20
      src/jfw/modules/subscribepay/src/timetask.json
  55. 66 0
      src/jfw/modules/subscribepay/src/timetask/timetask.go
  56. 2 2
      src/jfw/modules/weixin/src/go.mod
  57. 4 4
      src/jfw/modules/weixin/src/go.sum
  58. 2 1
      src/jfw/modules/weixin/src/service/usersource.go
  59. 18 25
      src/jfw/modules/weixin/src/wx/wx.go
  60. 1 1
      src/jfw/qrmanager/qrmanager.go
  61. BIN
      src/web/staticres/common-module/exhibition/img/qr-code-shichang.png
  62. BIN
      src/web/staticres/common-module/order-list/image/docVip.png
  63. 166 1
      src/web/staticres/common-module/order-list/js/order-detail.js
  64. 27 3
      src/web/staticres/common-module/order-list/js/order-list-config.js
  65. 212 0
      src/web/staticres/common-module/order-list/js/order-list.js
  66. 7 0
      src/web/staticres/common-module/pc-dialog/js/pc-collect-user-info.js
  67. 0 0
      src/web/staticres/common-module/pc-dialog/js/pc-collect-user-info.min.js
  68. 20 0
      src/web/staticres/common-module/perfect-info/js/perfect-info.js
  69. BIN
      src/web/staticres/frontRouter/pc/cooperation/img/qr.png
  70. BIN
      src/web/staticres/images/pc/doc-error.png
  71. BIN
      src/web/staticres/images/pc/excel.png
  72. BIN
      src/web/staticres/images/pc/pdf.png
  73. BIN
      src/web/staticres/images/pc/ppt.png
  74. BIN
      src/web/staticres/images/pc/txt.png
  75. BIN
      src/web/staticres/images/pc/word.png
  76. 23 0
      src/web/staticres/js/index/index_2023.12.js
  77. 6 0
      src/web/staticres/js/login.js
  78. 106 2
      src/web/staticres/pccss/index_pc.css
  79. 1 1
      src/web/templates/frontRouter/pc/cooperation/free/index.html
  80. 6 4
      src/web/templates/frontRouter/pc/docs/sess/index.html
  81. 552 0
      src/web/templates/order/pc/docMember/detail.html
  82. 16 2
      src/web/templates/order/pc/paySuccess.html
  83. 44 2
      src/web/templates/pc/myOrder.html
  84. 6 0
      src/web/templates/pc/newIndex.html
  85. 41 0
      src/web/templates/pc/template/index/doc-card-module.html
  86. 21 1
      src/web/templates/weixin/commonPay/paySuccess.html

+ 2 - 2
src/active.json

@@ -16,5 +16,5 @@
 		"wxEr":81,
 		"startTime":"2022-05-01 12:00:00",
 		"endTime":"2022-05-31 23:59:59"
-	}	
-}
+	}
+}

+ 22 - 1
src/config.json

@@ -462,5 +462,26 @@
   "nzjConstructionContent": "拟在建项目是指尚在规划、报批、立项、环评、设计等阶段的项目,一般由发改委和各部委提供,且项目规模和投资额都较大。剑鱼标讯一般会在项目正式招标前3-12个月就通知付费客户,让客户有足够的时间和空间和业主联系,做好前期准备工作。",
   "nzjProgressRemark": "进展备注是剑鱼标讯通过一定渠道获得的项目进度计划,帮您提前把握商机!开通大会员即可享受此权益。",
   "keyBiddingArea": "广东,河南,北京,江苏,湖北,山东,河北,四川,陕西,安徽",
-  "precisionNum": 50
+  "precisionNum": 50,
+  "ossUrl":"https://jydocs-previewimg.oss-cn-beijing.aliyuncs.com/%s",
+  "docinUrl":"https://img3.douding.cn/docin_%s_90x80.jpg",
+  "h5": "https://h5.jianyu360.cn",
+  "indexDocClass": [
+    {
+      "class": "招标文件",
+      "search": "招标文件"
+    },
+    {
+      "class": "办公文档",
+      "search": "招标投标"
+    },
+    {
+      "class": "行业报告",
+      "search": "行业报告"
+    },
+    {
+      "class": "建筑/环境",
+      "search": "建筑/环境"
+    }
+  ]
 }

+ 2 - 2
src/go.mod

@@ -8,7 +8,7 @@ require (
 	app.yhyue.com/moapp/jyMarketing v0.0.2-0.20230308011651-df591d32df88
 	app.yhyue.com/moapp/jybase v0.0.0-20240412015757-6d8429bb4dae
 	app.yhyue.com/moapp/jylog v0.0.0-20230522075550-05d7230ca545
-	app.yhyue.com/moapp/jypkg v1.21.6
+	app.yhyue.com/moapp/jypkg v1.21.7
 	bp.jydev.jianyu360.cn/BaseService/userCenter v1.2.18
 	github.com/SKatiyar/qr v0.0.0-20151201054752-25b6bdf44e67
 	github.com/bwmarrin/snowflake v0.3.0
@@ -27,7 +27,7 @@ require (
 	app.yhyue.com/moapp/message v0.0.0-20231204024949-8c7145bfc161 // indirect
 	bp.jydev.jianyu360.cn/BaseService/entManageApplication v0.0.0-20231226074509-942d80dc34eb // indirect
 	bp.jydev.jianyu360.cn/BaseService/jyMicroservices v0.0.2 // indirect
-	bp.jydev.jianyu360.cn/BaseService/powerCheckCenter v0.0.0-20231222060155-36e225b61353 // indirect
+	bp.jydev.jianyu360.cn/BaseService/powerCheckCenter v0.0.0-20240607062231-ae1d02891843 // indirect
 	bp.jydev.jianyu360.cn/BaseService/resourceCenter v0.1.3 // indirect
 	filippo.io/edwards25519 v1.1.0 // indirect
 	github.com/BurntSushi/toml v1.2.0 // indirect

+ 4 - 4
src/go.sum

@@ -20,8 +20,8 @@ app.yhyue.com/moapp/jybase v0.0.0-20240412015757-6d8429bb4dae/go.mod h1:XHNATN6t
 app.yhyue.com/moapp/jyfs v0.0.0-20231024061508-480c270480d4/go.mod h1:61hzZ3dZHXL28BNl8BOgZsvM2S5UVY5YFzOkEUPrSu4=
 app.yhyue.com/moapp/jylog v0.0.0-20230522075550-05d7230ca545 h1:+Lak4m1zgsigQloOsvp8AJ+0XeX/+PGp9QP550xlbBQ=
 app.yhyue.com/moapp/jylog v0.0.0-20230522075550-05d7230ca545/go.mod h1:uFrsdUBFbETiJlEmr4PtJWPsZlUpPj2bHQRhryu6ggk=
-app.yhyue.com/moapp/jypkg v1.21.6 h1:RKfuhZxD4IOxGqkWF9m59JgHUds/3DHZBGuFEZdrVs4=
-app.yhyue.com/moapp/jypkg v1.21.6/go.mod h1:5e4YlWE2qq2+oWnE4dQsHra+LF0WldgGs1F3e5IQQLY=
+app.yhyue.com/moapp/jypkg v1.21.7 h1:maTxUGz6djnrkvDk9S4Y7IY3a/yzuiolnQJRFZOBwgg=
+app.yhyue.com/moapp/jypkg v1.21.7/go.mod h1:LlxnGEQUJALOD85IcaPU7FlYxlILF9OL1ctRRap0Kj0=
 app.yhyue.com/moapp/message v0.0.0-20231204024949-8c7145bfc161 h1:WGi4OEIoqw6NpNFGioUEBZnjK9aBa+xJqf/5WY+QyhM=
 app.yhyue.com/moapp/message v0.0.0-20231204024949-8c7145bfc161/go.mod h1:0Oj8SB4pVjdCLD28sy2zyM3hS0WHGpNuVcakLW43GmI=
 bp.jydev.jianyu360.cn/BP/jynsq v0.0.0-20220222052708-ebc43af90698/go.mod h1:ojo/AUH9Yr1wzarEjOaNMkj1Cet/9r8IgLyba64Z52E=
@@ -31,8 +31,8 @@ bp.jydev.jianyu360.cn/BaseService/gateway v0.0.0-20220419090715-88ddb32961be/go.
 bp.jydev.jianyu360.cn/BaseService/gateway v1.3.4/go.mod h1:BMLd/5wb3BIEGhnEgF9y1sJN9P5/Dw9kYsoiE9V8I9g=
 bp.jydev.jianyu360.cn/BaseService/jyMicroservices v0.0.2 h1:Qi8C7gZeR7+kjOtSl9ilR5HwbjCe8GO1RuotFb4+kFA=
 bp.jydev.jianyu360.cn/BaseService/jyMicroservices v0.0.2/go.mod h1:v8y7FCbkKEIRP4Ie9ZM8NtoRP+Fk4O3C1hnexNusYIQ=
-bp.jydev.jianyu360.cn/BaseService/powerCheckCenter v0.0.0-20231222060155-36e225b61353 h1:QnkyOQ0tHVaPmtYx0xcCKzwBrUEasWH+nQ3qVnD0XnI=
-bp.jydev.jianyu360.cn/BaseService/powerCheckCenter v0.0.0-20231222060155-36e225b61353/go.mod h1:rCCaOSWBYfQabf/yIvSVheSPtN2THnHeTl2J5/RrcuU=
+bp.jydev.jianyu360.cn/BaseService/powerCheckCenter v0.0.0-20240607062231-ae1d02891843 h1:u+8k/T0D6EUjj9BhI5RJdRa+8v4FZbyZhaNcm66L6Vs=
+bp.jydev.jianyu360.cn/BaseService/powerCheckCenter v0.0.0-20240607062231-ae1d02891843/go.mod h1:rCCaOSWBYfQabf/yIvSVheSPtN2THnHeTl2J5/RrcuU=
 bp.jydev.jianyu360.cn/BaseService/pushpkg v0.0.0-20230911091604-2faa31032743/go.mod h1:1SQIPPL5Ya5BzQdByFKtTkXrXTWBv+PDqWIhNknLnZw=
 bp.jydev.jianyu360.cn/BaseService/resourceCenter v0.0.0-20220418005748-8ba5d936dd53/go.mod h1:E5lcDI3k4FESLxiAetCfWQTq8qfpy9cv0yN1oKoEO34=
 bp.jydev.jianyu360.cn/BaseService/resourceCenter v0.0.0-20220419023723-0b32d4a41751/go.mod h1:6KL5LMEku83uRbre0W/bj5kXG2I6pJGBFtktmtp51yM=

+ 7 - 4
src/index.yaml

@@ -81,16 +81,19 @@ topMenu:
         href: /front/advservices.html
       - name: 企业认证
         href: /swordfish/frontPage/enterpriseCertificatio/free/index
-      - name: 展会报名
-        href: /exhibition/list/pc/index.html
+      - name: 中标必听课
+        href: /jyxspc
       - name: 渠道及商务合作
         href: /swordfish/frontPage/cooperation/free/index
         class: red
       - name: 发布供需信息
         href: /swordfish/frontPage/InformationDistribution/free/index
         class: red
-      - name: 中标必听课
-        href: /jyxspc
+      - name: 展会报名
+        href: /exhibition/list/pc/index.html
+      - name: 剑鱼文库
+        href: /swordfish/docs
+        class: red
   - title: 企业服务
     child:
       - name: 数字化营销

+ 4 - 4
src/jfw/filter/cookie.go

@@ -1,9 +1,9 @@
 package filter
 
 import (
-    "app.yhyue.com/moapp/jypkg/common/src/qfw/util/jy"
-    "net/http"
-    "strings"
+	"app.yhyue.com/moapp/jypkg/common/src/qfw/util/jy"
+	"net/http"
+	"strings"
 )
 
 // CookieInfo 信息
@@ -18,7 +18,7 @@ func (ci *CookieInfo) Do() {
 		if strings.Contains(crr, "cooperate") {
 			match := strings.Split(crr, "cooperate/")
 			if len(match) > 1 {
-				jy.SetCookieValue(ci.W, jy.ChannelCookieName, match[1], 172800) //两
+				jy.SetCookieValue(ci.W, jy.ChannelCookieName, match[1], 3*24*60*60) //3
 			}
 		}
 	}

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

@@ -32,6 +32,7 @@ var (
 		"areaPack":          {"省份订阅包"},
 		"filePack":          {"附件下载包"},
 		"buyerPortraitPack": {"采购单位画像包"},
+		"docMember":               {"剑鱼文库会员"},
 	}
 )
 

+ 15 - 0
src/jfw/front/docMember.go

@@ -0,0 +1,15 @@
+package front
+
+import "app.yhyue.com/moapp/jybase/go-xweb/xweb"
+
+type DocMember struct {
+	*xweb.Action
+	docMemberOrderDetail xweb.Mapper `xweb:"/front/docMember/orderDetail"` //文库会员订单详情
+}
+
+func init() {
+	xweb.AddAction(&DocMember{})
+}
+func (d *DocMember) DocMemberOrderDetail() {
+	d.Render("/order/pc/docMember/detail.html")
+}

+ 81 - 0
src/jfw/front/index.go

@@ -16,6 +16,7 @@ import (
 	"jy/src/jfw/config"
 	"jy/src/jfw/jyutil"
 	"jy/src/jfw/site/jySchool"
+	"log"
 	"math/rand"
 	"regexp"
 	"strings"
@@ -272,9 +273,89 @@ func (nIndex *NewIndex) NewIndex() error {
 	//nIndex.T["biddingTrend"] = HomeBiddingTrends()
 	nIndex.T["hotBuyerData"] = PurchasingData()
 	nIndex.T["simpleTemplateData"] = map[string]interface{}{"XwebVer": nIndex.T["XwebVer"]}
+	//文库
+	nIndex.T["docsClass"], nIndex.T["docsData"] = GetDocsData()
 	return nIndex.Render("/pc/newIndex.html", &nIndex.T)
 }
 
+func GetDocsData() (docClass []string, indexDocs [][]map[string]interface{}) {
+	cacheDocsInfoKey := "jy_index_docs_info"
+	cacheDocsClassKey := "jy_index_docs_class"
+	if bytes, err := redis.GetBytes(RedisNameNew, cacheDocsInfoKey); err == nil && bytes != nil {
+		if err := json.Unmarshal(*bytes, &indexDocs); err != nil {
+			log.Printf("[MANAGER-ERR]jy_index_docs_info  GetData Error %v \n", err)
+			return []string{}, nil
+		}
+		classNames := redis.GetStr(RedisNameNew, cacheDocsClassKey)
+		if classNames == "" {
+			return []string{}, nil
+		}
+		docClass = strings.Split(classNames, ",")
+		return
+	}
+	//浏览量前十的一级分类
+	var (
+		ossUrl   = common.InterfaceToStr(config.Sysconfig["ossUrl"])   // "https://jydocs-previewimg.oss-cn-beijing.aliyuncs.com/%s"
+		docinUrl = common.InterfaceToStr(config.Sysconfig["docinUrl"]) //"https://img3.douding.cn/docin_%s_90x80.jpg"
+	)
+	//浏览量前十的一级分类
+	docClassNames := config.Sysconfig["indexDocClass"].([]interface{})
+	if docClassNames != nil && len(docClassNames) > 0 {
+		docSql := `SELECT d.id,d.docName,d.docFileSuffix,d.docTags,d.previewImgId,d.productType,d.source FROM jydocs.doc d LEFT JOIN jydocs.doc_statistics ds ON d.id=ds.docId WHERE FIND_IN_SET(?,d.docTags) ORDER BY ds.viewTimes DESC LIMIT 10 `
+		for _, dv := range docClassNames {
+			tmpClass := common.ObjToMap(dv)
+			if tmpClass == nil {
+				continue
+			}
+			name := common.InterfaceToStr((*tmpClass)["class"])
+			search := common.InterfaceToStr((*tmpClass)["search"])
+			indexDoc := []map[string]interface{}{}
+			docs := public.BaseMysql.SelectBySql(docSql, search)
+			if docs != nil && len(*docs) > 0 {
+				for dock, docv := range *docs {
+					if dock > 7 {
+						break
+					}
+					previewImg := fmt.Sprintf(ossUrl, common.InterfaceToStr(docv["previewImgId"]))
+					if common.IntAll(docv["source"]) == 2 {
+						previewImg = fmt.Sprintf(docinUrl, common.InterfaceToStr(docv["previewImgId"]))
+					}
+					fileSuffix := common.InterfaceToStr(docv["docFileSuffix"])
+					if strings.HasPrefix(fileSuffix, ".") {
+						fileSuffix = strings.ReplaceAll(fileSuffix, ".", "")
+					}
+					indexDoc = append(indexDoc, map[string]interface{}{
+						"id":            common.InterfaceToStr(docv["id"]),
+						"docName":       common.InterfaceToStr(docv["docName"]),
+						"docFileSuffix": fileSuffix,
+						"previewImg":    previewImg,
+						"productType":   common.IntAll(docv["productType"]),
+					})
+				}
+			}
+			docClass = append(docClass, name)
+			indexDocs = append(indexDocs, indexDoc)
+
+		}
+	}
+	if len(indexDocs) > 0 {
+		b, err := json.Marshal(indexDocs)
+		if err == nil && len(b) > 0 {
+			err = redis.PutBytes(RedisNameNew, cacheDocsInfoKey, &b, 12*60*60)
+			if err != nil {
+				log.Println(fmt.Sprintf("首页 文库数据 缓存 %s,保存异常:%s", cacheDocsInfoKey, err.Error()))
+			}
+		}
+		if len(docClass) > 0 {
+			if b := redis.Put(RedisNameNew, cacheDocsClassKey, strings.Join(docClass, ","), 12*60*60); !b {
+				log.Println(fmt.Sprintf("首页 文库分类 缓存 %s,保存异常", cacheDocsClassKey))
+			}
+		}
+	}
+	fmt.Println(indexDocs)
+	return
+}
+
 func (nIndex *NewIndex) AppDownload() {
 	nIndex.T["includedInfo"] = GetIncludedInfo()
 	nIndex.Render("/frontRouter/pc/AppDownload/free/index.html", &nIndex.T)

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

@@ -81,7 +81,8 @@ func (l *Login) Login() error {
 		result           = map[string]interface{}{}
 		reqType          = l.GetString("reqType")
 		isAutoLogin, err = l.GetBool("isAutoLogin") //用户是否选择自动登录
-		channelCode      = "jy_pc_phone"
+		channelCode      = ""
+		loginCode        = "jy_pc_phone"
 	)
 	cc, ckErr := l.Request.Cookie(jy.ChannelCookieName)
 	if ckErr == nil {
@@ -178,7 +179,12 @@ func (l *Login) Login() error {
 					if jy.IsEmail(email) {
 						data["s_email"] = email
 					}
-					if sessVal["RSource"] != nil {
+					// 新用户注册 记录来源
+					sourceLabel := redis.GetStr("limitation", fmt.Sprintf("firstVisitTagByWX_%s", l.Session().Id()))
+					if sourceLabel != "" { //合作商
+						data["s_rsource"] = sourceLabel
+						channelCode = sourceLabel
+					} else if sessVal["RSource"] != nil {
 						data["s_rsource"] = sessVal["RSource"]
 					}
 					if ck, err := l.GetCookie("source"); err == nil && ck.Value != "" {
@@ -273,6 +279,7 @@ func (l *Login) Login() error {
 			ChannelCode:      channelCode,
 			EncryptionUserId: encrypt.SE.EncodeString(mgoUserId),
 			CreateTime:       time.Now().Format(date.Date_Full_Layout),
+			LoginCode:        loginCode,
 			LoginWay:         qutil.If(status == 1, status, 2).(int), //登录方式;1:手机号密码;2:手机号验证码;3:微信;4:手机号一键登录
 			Platform:         1,
 			Ip:               qutil.GetIp(l.Request),

+ 38 - 0
src/jfw/front/partner.go

@@ -0,0 +1,38 @@
+package front
+
+import (
+	"app.yhyue.com/moapp/jybase/go-xweb/xweb"
+	"app.yhyue.com/moapp/jybase/redis"
+	"app.yhyue.com/moapp/jypkg/common/src/qfw/util/jy"
+	"fmt"
+	"jy/src/jfw/config"
+	"log"
+)
+
+var (
+	cacheTimeOut = 3 * 24 * 60 * 60 //三天
+)
+
+type Partner struct {
+	*xweb.Action
+	partnerInfo xweb.Mapper `xweb:"/partner/(.*)"` // 中转路由
+}
+
+func init() {
+	xweb.AddAction(&Partner{})
+}
+
+// 微信首页地址
+func (p *Partner) PartnerInfo(source string) error {
+	log.Println("---sessionId----:", p.Session().Id())
+	//是否是移动端
+	if bm := mobileReg.MatchString(p.Header("User-Agent")); bm {
+		return p.Redirect(fmt.Sprintf("%s/jyapp/new/%s", config.Sysconfig["h5"].(string), source))
+	}
+	//未登录
+	if userId, _ := p.GetSession("userId").(string); userId == "" {
+		jy.SetCookieValue(p.ResponseWriter, jy.ChannelCookieName, source, cacheTimeOut)                      //三天
+		redis.Put("limitation", fmt.Sprintf("firstVisitTagByWX_%s", p.Session().Id()), source, cacheTimeOut) //登录注册 用户标识
+	}
+	return p.Redirect("/jylab/supsearch/index.html?keywords=&selectType=title&searchGroup=1&partner=" + source)
+}

+ 39 - 61
src/jfw/front/tags.go

@@ -511,54 +511,25 @@ func (this *Tags) GetNewBidInfo() (list []map[string]interface{}) {
 	list = bidInfosByCache(redisKey)
 	if len(list) == 0 {
 		list = bidInfosByCache(redisKeySL)
-		for {
-			if redisLock.TryLock() {
-				if len(list) == 0 {
-					list = newBidInfos()
-				}
-				if len(list) > 0 {
-					bidInfosToCache(list)
+		if len(list) == 0 {
+			list = newBidInfos()
+			bidInfosToCache(list)
+		} else {
+			go func() {
+				for {
+					if redisLock.TryLock() {
+						bidInfosToCache(newBidInfos())
+						redisLock.Unlock()
+					}
+					ri++
+					if len(list) > 0 || ri >= rn {
+						break
+					}
+					time.Sleep(100 * time.Millisecond)
 				}
-				redisLock.Unlock()
-			}
-			ri++
-			if len(list) > 0 || ri >= rn {
-				break
-			}
-			time.Sleep(100 * time.Millisecond)
+			}()
 		}
 	}
-	//rediskey := fmt.Sprintf("pcindex_newArticle")
-	//if l, ok := redis.Get("seoCache", rediskey).([]interface{}); ok && l != nil && len(l) > 0 {
-	//	list = qu.ObjArrToMapArr(l)
-	//} else {
-	//	// p397 未登录详情页最新招投标信息去掉拟建
-	//	var (
-	//		now         = time.Now()
-	//		startTime   = fmt.Sprint(time.Date(now.Year(), now.Month(), now.Day()-7, now.Hour(), now.Minute(), now.Second(), 0, time.Local).Unix()) //最近7天
-	//		endTime     = fmt.Sprint(now.Unix())
-	//		publishTime = fmt.Sprintf("%s_%s", startTime, endTime)
-	//	)
-	//	_, _, lists := bidsearch.GetPcBidSearchData("", "", "", publishTime, "招标预告,招标公告,招标结果,招标信用信息", "", "", "", "", "", "", "", "", 1, false, nil, bidSearch_field_1, "", false, false, "", 50, "")
-	//	if lists != nil && len(*lists) > 10 {
-	//		*lists = (*lists)[0:10]
-	//		for _, v := range *lists {
-	//			v["_id"] = encrypt.CommonEncodeArticle("content", v["_id"].(string))
-	//			delete(v, "toptype")
-	//			delete(v, "s_subscopeclass")
-	//			tmpdate := v["publishtime"]
-	//			v["publishtime"] = qu.Int64All(tmpdate.(float64))
-	//			v["date"] = time.Unix(qu.Int64All(tmpdate.(float64)), 0).Format(date.Date_Short_Layout)
-	//			if v["budget"] != nil {
-	//				v["budget"] = ConversionMoeny(v["budget"])
-	//			} else if v["bidamount"] != nil {
-	//				v["budget"] = ConversionMoeny(v["bidamount"])
-	//			}
-	//		}
-	//		list = *lists
-	//		redis.Put("seoCache", rediskey, list, cacheTime)
-	//	}
-	//}
 	return list
 }
 
@@ -822,23 +793,30 @@ func (this *Tags) GetBidding(industry, area, city, stype, keyword string, reques
 	data, count, b = biddingByCache(rediskey, rediskeyCount)
 	if data == nil || len(data) == 0 || count == 0 {
 		data, count, b = biddingByCache(redisKeySL, redisKeyCountSL)
-		for {
-			if redisLock.TryLock() {
-				if data == nil || len(data) == 0 || count == 0 {
-					//获取数据库数据
-					data, count, b = biddingData()
-				}
-				//更新缓存
-				if data != nil && len(data) > 0 && count > 0 {
-					biddingToCache(data, count)
+		if data == nil || len(data) == 0 || count == 0 {
+			data, count, b = biddingData()
+			biddingToCache(data, count)
+		} else {
+			go func() {
+				for {
+					if redisLock.TryLock() {
+						if data == nil || len(data) == 0 || count == 0 {
+							//获取数据库数据
+							data, count, b = biddingData()
+						}
+						//更新缓存
+						if data != nil && len(data) > 0 && count > 0 {
+							biddingToCache(data, count)
+						}
+						redisLock.Unlock()
+					}
+					ri++
+					if (data != nil && len(data) > 0 && count > 0) || ri >= rn {
+						break
+					}
+					time.Sleep(100 * time.Millisecond)
 				}
-				redisLock.Unlock()
-			}
-			ri++
-			if (data != nil && len(data) > 0 && count > 0) || ri >= rn {
-				break
-			}
-			time.Sleep(100 * time.Millisecond)
+			}()
 		}
 	}
 	return data, count, b

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

@@ -1,9 +1,9 @@
 package front
 
 import (
+	util "app.yhyue.com/moapp/jybase/common"
 	"errors"
 	"fmt"
-	util "app.yhyue.com/moapp/jybase/common"
 
 	"app.yhyue.com/moapp/jybase/go-xweb/xweb"
 )
@@ -25,6 +25,7 @@ var (
 		"areaPack":          {"省份订阅包"},
 		"filePack":          {"附件下载包"},
 		"buyerPortraitPack": {"采购单位画像包"},
+		"docMember":          {"剑鱼文库会员"},
 	}
 )
 

+ 12 - 3
src/jfw/modules/app/src/app/front/login.go

@@ -108,7 +108,8 @@ func (l *Login) Login() error {
 	var (
 		returnSign  = ""
 		userInfo    = map[string]interface{}{}
-		channelCode = qutil.If(strings.Contains(l.Request.Host, "h5"), "jy_h5_phone", "jy_app_phone").(string)
+		channelCode = ""
+		loginCode   = qutil.If(strings.Contains(l.Request.Host, "h5"), "jy_h5_phone", "jy_app_phone").(string)
 	)
 	cc, ckErr := l.Request.Cookie(jy.ChannelCookieName)
 	if ckErr == nil {
@@ -234,6 +235,7 @@ func (l *Login) Login() error {
 					sourceLabel := redis.GetStr("limitation", fmt.Sprintf("firstVisitTagByWX_%s", l.Session().Id()))
 					if sourceLabel != "" {
 						data["s_rsource"] = sourceLabel
+						channelCode = sourceLabel
 					} else {
 						activity := l.GetString("activity")
 						if activity != "" {
@@ -338,6 +340,7 @@ func (l *Login) Login() error {
 		ChannelCode:      channelCode,
 		EncryptionUserId: encrypt.SE.EncodeString(mgoUserId),
 		CreateTime:       time.Now().Format(date.Date_Full_Layout),
+		LoginCode:        loginCode,
 		LoginWay:         qutil.If(state == 1, state, 2).(int),                         //登录方式;1:手机号密码;2:手机号验证码;3:微信;4:手机号一键登录
 		Platform:         qutil.If(strings.Contains(l.Request.Host, "h5"), 4, 3).(int), //登录端;1:PC;2:WX;3:APP;4:H5
 		Ip:               qutil.GetIp(l.Request),
@@ -524,7 +527,8 @@ func (l *Login) Register() error {
 		returnSign   string
 		nsqPath, _   = config.Sysconfig["nsq"].(string)
 		nsq_topic, _ = config.Sysconfig["nsq_topic"].(string)
-		channelCode  = qutil.If(strings.Contains(l.Request.Host, "h5"), "jy_h5_phone", "jy_app_phone").(string)
+		channelCode  = ""
+		loginCode    = qutil.If(strings.Contains(l.Request.Host, "h5"), "jy_h5_phone", "jy_app_phone").(string)
 		cc, ckErr    = l.Request.Cookie(jy.ChannelCookieName)
 	)
 	if ckErr == nil {
@@ -586,6 +590,7 @@ func (l *Login) Register() error {
 				sourceLabel := redis.GetStr("limitation", fmt.Sprintf("firstVisitTagByWX_%s", l.Session().Id()))
 				if sourceLabel != "" {
 					data["s_rsource"] = sourceLabel
+					channelCode = sourceLabel
 				}
 				email := l.GetString("email")
 				registerclient := jy.NewRegister(jyutil.Compatible.Mgo, jyutil.Compatible.BaseService, jyutil.Compatible.MainMysql, jyutil.Compatible.Middleground)
@@ -648,6 +653,7 @@ func (l *Login) Register() error {
 						ChannelCode:      channelCode,
 						EncryptionUserId: encrypt.SE.EncodeString(mgoUserId),
 						CreateTime:       time.Now().Format(date.Date_Full_Layout),
+						LoginCode:        loginCode,
 						LoginWay:         1,                                                            //登录方式;1:手机号密码;2:手机号验证码;3:微信;4:手机号一键登录
 						Platform:         qutil.If(strings.Contains(l.Request.Host, "h5"), 4, 3).(int), //登录端;1:PC;2:WX;3:APP;4:H5
 						Ip:               qutil.GetIp(l.Request),
@@ -682,7 +688,8 @@ func (l *Login) WxLogin() {
 	disWord := l.GetString("disWord")
 	defer qutil.Catch()
 	returnSign := ""
-	channelCode := "jy_app_wx"
+	channelCode := ""
+	loginCode := "jy_app_wx"
 	cc, ckErr := l.Request.Cookie(jy.ChannelCookieName)
 	if ckErr == nil {
 		channelCode = cc.Value
@@ -793,6 +800,7 @@ func (l *Login) WxLogin() {
 			sourceLabel := redis.GetStr("limitation", fmt.Sprintf("firstVisitTagByWX_%s", l.Session().Id()))
 			if sourceLabel != "" {
 				newUser["s_rsource"] = sourceLabel
+				channelCode = sourceLabel
 			}
 			//注册邮箱
 			email := l.GetString("email")
@@ -868,6 +876,7 @@ func (l *Login) WxLogin() {
 			ChannelCode:      channelCode,
 			EncryptionUserId: encrypt.SE.EncodeString(mgoUserId),
 			CreateTime:       time.Now().Format(date.Date_Full_Layout),
+			LoginCode:        loginCode,
 			LoginWay:         3,                                                            //登录方式;1:手机号密码;2:手机号验证码;3:微信;4:手机号一键登录
 			Platform:         qutil.If(strings.Contains(l.Request.Host, "h5"), 4, 3).(int), //登录端;1:PC;2:WX;3:APP;4:H5
 			Ip:               qutil.GetIp(l.Request),

+ 9 - 2
src/jfw/modules/app/src/app/front/wx.go

@@ -3,7 +3,9 @@ package front
 import (
 	"app.yhyue.com/moapp/jybase/go-xweb/xweb"
 	"app.yhyue.com/moapp/jybase/redis"
+	"app.yhyue.com/moapp/jypkg/common/src/qfw/util/jy"
 	"fmt"
+	"jy/src/jfw/modules/app/src/jfw/config"
 	"log"
 )
 
@@ -24,11 +26,16 @@ func init() {
 // 微信首页地址
 func (w *WX) Index(pageLabel string) error {
 	log.Println("---sessionId----:", w.Session().Id())
+	//是否是电脑端
+	if bm := mobileReg.MatchString(w.Header("User-Agent")); !bm {
+		return w.Redirect(fmt.Sprintf("%s/partner/%s", config.Sysconfig["mainDomainName"].(string), pageLabel))
+	}
 	//未登录
 	if userId, _ := w.GetSession("userId").(string); userId == "" {
+		jy.SetCookieValue(w.ResponseWriter, jy.ChannelCookieName, pageLabel, cacheTimeOut)
 		redis.Put("limitation", fmt.Sprintf("firstVisitTagByWX_%s", w.Session().Id()), pageLabel, cacheTimeOut) //app 登录注册 用户标识
-		return w.Redirect("/jyapp/jylab/mainSearch?from=wx")
+		return w.Redirect("/jyapp/jylab/mainSearch?partner=" + pageLabel)
 	}
 	//已登录
-	return w.Redirect("/jy_mobile/tabbar/home?from=wx")
+	return w.Redirect("/jy_mobile/tabbar/home?partner=" + pageLabel)
 }

+ 2 - 1
src/jfw/modules/app/src/config.json

@@ -252,5 +252,6 @@
     "projecttype": true,
     "approvecity": true
   },
-  "ipInitAuthentication": "qwertyuiopzxcvbnm1234567890asdfghjkl"
+  "ipInitAuthentication": "qwertyuiopzxcvbnm1234567890asdfghjkl",
+  "mainDomainName": "https://www.jianyu360.cn"
 }

+ 3 - 3
src/jfw/modules/app/src/go.mod

@@ -1,11 +1,11 @@
 module jy/src/jfw/modules/app/src
 
-go 1.21
+go 1.20
 
 require (
 	app.yhyue.com/moapp/jybase v0.0.0-20240412015757-6d8429bb4dae
 	app.yhyue.com/moapp/jylog v0.0.0-20230522075550-05d7230ca545
-	app.yhyue.com/moapp/jypkg v1.19.9
+	app.yhyue.com/moapp/jypkg v1.21.5
 	bp.jydev.jianyu360.cn/BaseService/userCenter v1.2.16
 	github.com/SKatiyar/qr v0.0.0-20151201054752-25b6bdf44e67
 	github.com/gogf/gf/v2 v2.7.0
@@ -20,7 +20,7 @@ require (
 	app.yhyue.com/moapp/message v0.0.0-20231204024949-8c7145bfc161 // indirect
 	bp.jydev.jianyu360.cn/BaseService/entManageApplication v0.0.0-20231226074509-942d80dc34eb // indirect
 	bp.jydev.jianyu360.cn/BaseService/jyMicroservices v0.0.2 // indirect
-	bp.jydev.jianyu360.cn/BaseService/powerCheckCenter v0.0.0-20231222060155-36e225b61353 // indirect
+	bp.jydev.jianyu360.cn/BaseService/powerCheckCenter v0.0.0-20240603091545-83ceaad11e6b // indirect
 	bp.jydev.jianyu360.cn/BaseService/resourceCenter v0.1.3 // indirect
 	filippo.io/edwards25519 v1.1.0 // indirect
 	github.com/BurntSushi/toml v1.2.0 // indirect

+ 4 - 17
src/jfw/modules/app/src/go.sum

@@ -20,8 +20,8 @@ app.yhyue.com/moapp/jybase v0.0.0-20240412015757-6d8429bb4dae/go.mod h1:XHNATN6t
 app.yhyue.com/moapp/jyfs v0.0.0-20231024061508-480c270480d4/go.mod h1:61hzZ3dZHXL28BNl8BOgZsvM2S5UVY5YFzOkEUPrSu4=
 app.yhyue.com/moapp/jylog v0.0.0-20230522075550-05d7230ca545 h1:+Lak4m1zgsigQloOsvp8AJ+0XeX/+PGp9QP550xlbBQ=
 app.yhyue.com/moapp/jylog v0.0.0-20230522075550-05d7230ca545/go.mod h1:uFrsdUBFbETiJlEmr4PtJWPsZlUpPj2bHQRhryu6ggk=
-app.yhyue.com/moapp/jypkg v1.19.9 h1:sTeWmP5tzat5Lhyf8NyIWgzn0YT16XG2vLP3sEP8nFE=
-app.yhyue.com/moapp/jypkg v1.19.9/go.mod h1:b3+0Q50iZYNaiYn7yR9bIIvIEsPvSy5figX7riSi/n4=
+app.yhyue.com/moapp/jypkg v1.21.5 h1:maU7dRSMLAUB8GLDyQoS9BKKwiNAO+grTZwKj4sJphc=
+app.yhyue.com/moapp/jypkg v1.21.5/go.mod h1:wyJeNc8I9R5799tqch7n8SEZrB0s8nmNou0brBh91w4=
 app.yhyue.com/moapp/message v0.0.0-20231204024949-8c7145bfc161 h1:WGi4OEIoqw6NpNFGioUEBZnjK9aBa+xJqf/5WY+QyhM=
 app.yhyue.com/moapp/message v0.0.0-20231204024949-8c7145bfc161/go.mod h1:0Oj8SB4pVjdCLD28sy2zyM3hS0WHGpNuVcakLW43GmI=
 bp.jydev.jianyu360.cn/BP/jynsq v0.0.0-20220222052708-ebc43af90698/go.mod h1:ojo/AUH9Yr1wzarEjOaNMkj1Cet/9r8IgLyba64Z52E=
@@ -31,8 +31,8 @@ bp.jydev.jianyu360.cn/BaseService/gateway v0.0.0-20220419090715-88ddb32961be/go.
 bp.jydev.jianyu360.cn/BaseService/gateway v1.3.4/go.mod h1:BMLd/5wb3BIEGhnEgF9y1sJN9P5/Dw9kYsoiE9V8I9g=
 bp.jydev.jianyu360.cn/BaseService/jyMicroservices v0.0.2 h1:Qi8C7gZeR7+kjOtSl9ilR5HwbjCe8GO1RuotFb4+kFA=
 bp.jydev.jianyu360.cn/BaseService/jyMicroservices v0.0.2/go.mod h1:v8y7FCbkKEIRP4Ie9ZM8NtoRP+Fk4O3C1hnexNusYIQ=
-bp.jydev.jianyu360.cn/BaseService/powerCheckCenter v0.0.0-20231222060155-36e225b61353 h1:QnkyOQ0tHVaPmtYx0xcCKzwBrUEasWH+nQ3qVnD0XnI=
-bp.jydev.jianyu360.cn/BaseService/powerCheckCenter v0.0.0-20231222060155-36e225b61353/go.mod h1:rCCaOSWBYfQabf/yIvSVheSPtN2THnHeTl2J5/RrcuU=
+bp.jydev.jianyu360.cn/BaseService/powerCheckCenter v0.0.0-20240603091545-83ceaad11e6b h1:6f/if8nVoR89n7RbgFEniiUqt4QpqJNQX2kS2JJHDEM=
+bp.jydev.jianyu360.cn/BaseService/powerCheckCenter v0.0.0-20240603091545-83ceaad11e6b/go.mod h1:rCCaOSWBYfQabf/yIvSVheSPtN2THnHeTl2J5/RrcuU=
 bp.jydev.jianyu360.cn/BaseService/pushpkg v0.0.0-20230911091604-2faa31032743/go.mod h1:1SQIPPL5Ya5BzQdByFKtTkXrXTWBv+PDqWIhNknLnZw=
 bp.jydev.jianyu360.cn/BaseService/resourceCenter v0.0.0-20220418005748-8ba5d936dd53/go.mod h1:E5lcDI3k4FESLxiAetCfWQTq8qfpy9cv0yN1oKoEO34=
 bp.jydev.jianyu360.cn/BaseService/resourceCenter v0.0.0-20220419023723-0b32d4a41751/go.mod h1:6KL5LMEku83uRbre0W/bj5kXG2I6pJGBFtktmtp51yM=
@@ -855,12 +855,10 @@ github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk5
 github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE=
 github.com/alicebob/gopher-json v0.0.0-20200520072559-a9ecdc9d1d3a/go.mod h1:SGnFV6hVsYE877CKEZ6tDNTjaSXYUk6QqoIK6PrAtcc=
 github.com/alicebob/gopher-json v0.0.0-20230218143504-906a9b012302 h1:uvdUDbHQHO85qeSydJtItA4T55Pw6BtAejd0APRJOCE=
-github.com/alicebob/gopher-json v0.0.0-20230218143504-906a9b012302/go.mod h1:SGnFV6hVsYE877CKEZ6tDNTjaSXYUk6QqoIK6PrAtcc=
 github.com/alicebob/miniredis/v2 v2.17.0/go.mod h1:gquAfGbzn92jvtrSC69+6zZnwSODVXVpYDRaGhWaL6I=
 github.com/alicebob/miniredis/v2 v2.22.0/go.mod h1:XNqvJdQJv5mSuVMc0ynneafpnL/zv52acZ6kqeS0t88=
 github.com/alicebob/miniredis/v2 v2.30.5/go.mod h1:b25qWj4fCEsBeAAR2mlb0ufImGC6uH3VlUfb/HS5zKg=
 github.com/alicebob/miniredis/v2 v2.32.1 h1:Bz7CciDnYSaa0mX5xODh6GUITRSx+cVhjNoOR4JssBo=
-github.com/alicebob/miniredis/v2 v2.32.1/go.mod h1:AqkLNAfUm0K07J28hnAyyQKf/x0YkCY/g5DCtuL01Mw=
 github.com/aliyun/aliyun-oss-go-sdk v2.1.6+incompatible/go.mod h1:T/Aws4fEfogEE9v+HPhhw+CntffsBHJ8nXQCwKr0/g8=
 github.com/andybalholm/brotli v1.0.4/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig=
 github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
@@ -891,9 +889,7 @@ github.com/bos-hieu/mongostore v0.0.2/go.mod h1:8AbbVmDEb0yqJsBrWxZIAZOxIfv/tsP8
 github.com/bradfitz/gomemcache v0.0.0-20190913173617-a41fca850d0b/go.mod h1:H0wQNHz2YrLsuXOZozoeDmnHXkNCRmMW0gwFWDfEZDA=
 github.com/bradleypeabody/gorilla-sessions-memcache v0.0.0-20181103040241-659414f458e1/go.mod h1:dkChI7Tbtx7H1Tj7TqGSZMOeGpMP5gLHtjroHd4agiI=
 github.com/bsm/ginkgo/v2 v2.12.0 h1:Ny8MWAHyOepLGlLKYmXG4IEkioBysk6GpaRTLC8zwWs=
-github.com/bsm/ginkgo/v2 v2.12.0/go.mod h1:SwYbGRRDovPVboqFv0tPTcG1sN61LM1Z4ARdbAV9g4c=
 github.com/bsm/gomega v1.27.10 h1:yeMWxP2pV2fG3FgAODIY8EiRE3dy0aeFYt4l7wh6yKA=
-github.com/bsm/gomega v1.27.10/go.mod h1:JyEr/xRbxbtgWNi8tIEVPUYZ5Dzef52k01W3YH0H+O0=
 github.com/bufbuild/protocompile v0.4.0/go.mod h1:3v93+mbWn/v3xzN+31nwkJfrEpAUwp+BagBSZWx+TP8=
 github.com/bufbuild/protocompile v0.6.0/go.mod h1:YNP35qEYoYGme7QMtz5SBCoN4kL4g12jTtjuzRNdjpE=
 github.com/cenkalti/backoff/v4 v4.2.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE=
@@ -1005,7 +1001,6 @@ github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8
 github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g=
 github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k=
 github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE=
-github.com/frankban/quicktest v1.14.3/go.mod h1:mgiwOwqx65TmIk1wJ6Q7wvnVMocbUorkibMOrVTHZps=
 github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
 github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
 github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU=
@@ -1092,7 +1087,6 @@ github.com/go-sql-driver/mysql v1.8.1/go.mod h1:wEBSXgmK//2ZFJyE+qWnIsVGmvmEKlqw
 github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
 github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE=
 github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI=
-github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls=
 github.com/go-test/deep v1.0.7/go.mod h1:QV8Hv/iy04NyLBxAdO9njL0iVPN1S4d/A3NVv1V36o8=
 github.com/go-xorm/sqlfiddle v0.0.0-20180821085327-62ce714f951a/go.mod h1:56xuuqnHyryaerycW3BfssRdxQstACi0Epw/yC5E2xM=
 github.com/go-xorm/xorm v0.7.9/go.mod h1:XiVxrMMIhFkwSkh96BW7PACl7UhLtx2iJIHMdmjh5sQ=
@@ -1141,7 +1135,6 @@ github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0L
 github.com/golang/glog v1.1.0/go.mod h1:pfYeQZ3JWZoXTV5sFc986z3HTpwQs9At6P4ImfuP3NQ=
 github.com/golang/glog v1.1.2/go.mod h1:zR+okUeTbrL6EL3xHUDxZuEtGv04p5shwip1+mL/rLQ=
 github.com/golang/glog v1.2.0 h1:uCdmnmatrKCgMBlM4rMuJZWOkPDqdbZPnrMXDY4gI68=
-github.com/golang/glog v1.2.0/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w=
 github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
 github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
 github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
@@ -1235,7 +1228,6 @@ github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLe
 github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
 github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
 github.com/google/pprof v0.0.0-20211214055906-6f57359322fd h1:1FjCyPC+syAzJ5/2S8fqdZK1R22vvA0J7JZKcuOIQ7Y=
-github.com/google/pprof v0.0.0-20211214055906-6f57359322fd/go.mod h1:KgnwoLYCZ8IQu3XUZ8Nc/bM9CCZFOyjUNOSygVozoDg=
 github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
 github.com/google/s2a-go v0.1.0/go.mod h1:OJpEgntRZo8ugHpF9hkoLJbS5dSI20XZeXJ9JVywLlM=
 github.com/google/s2a-go v0.1.3/go.mod h1:Ej+mSEMGRnqRzjc7VtF+jdBwYG5fuJfiZ8ELkjEwM0A=
@@ -1541,7 +1533,6 @@ github.com/onsi/ginkgo/v2 v2.4.0/go.mod h1:iHkDK1fKGcBoEHT5W7YBq4RFWaQulw+caOMkA
 github.com/onsi/ginkgo/v2 v2.5.0/go.mod h1:Luc4sArBICYCS8THh8v3i3i5CuSZO+RaQRaJoeNwomw=
 github.com/onsi/ginkgo/v2 v2.7.0/go.mod h1:yjiuMwPokqY1XauOgju45q3sJt6VzQ/Fict1LFVcsAo=
 github.com/onsi/ginkgo/v2 v2.13.0 h1:0jY9lJquiL8fcf3M4LAXN5aMlS/b2BV86HFFPCPMgE4=
-github.com/onsi/ginkgo/v2 v2.13.0/go.mod h1:TE309ZR8s5FsKKpuB1YAQYBzCaAfUgatB/xlT/ETL/o=
 github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA=
 github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
 github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
@@ -1559,7 +1550,6 @@ github.com/onsi/gomega v1.24.0/go.mod h1:Z/NWtiqwBrwUt4/2loMmHL63EDLnYHmVbuBpDr2
 github.com/onsi/gomega v1.24.1/go.mod h1:3AOiACssS3/MajrniINInwbfOOtfZvplPzuRSmvt1jM=
 github.com/onsi/gomega v1.26.0/go.mod h1:r+zV744Re+DiYCIPRlYOTxn0YkOLcAnW8k1xXdMPGhM=
 github.com/onsi/gomega v1.29.0 h1:KIA/t2t5UBzoirT4H9tsML45GEbo3ouUnBHsCfD2tVg=
-github.com/onsi/gomega v1.29.0/go.mod h1:9sxs+SwGrKI0+PWe4Fxa9tFQQBG5xSsSbMXOI8PPpoQ=
 github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc=
 github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw=
 github.com/openzipkin/zipkin-go v0.3.0/go.mod h1:4c3sLeE8xjNqehmF5RpAFLPLJxXscc0R4l6Zg0P1tTQ=
@@ -1656,7 +1646,6 @@ github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFR
 github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc=
 github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs=
 github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ=
-github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog=
 github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ=
 github.com/rs/xid v1.4.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg=
 github.com/rs/zerolog v1.13.0/go.mod h1:YbFCdg8HfsridGWAh22vktObvhZbQsZXe4/zB0OKkWU=
@@ -1775,7 +1764,6 @@ github.com/yuin/gopher-lua v0.0.0-20200816102855-ee81675732da/go.mod h1:E1AXubJB
 github.com/yuin/gopher-lua v0.0.0-20210529063254-f4c35e4016d9/go.mod h1:E1AXubJBdNmFERAOucpDIxNzeGfLzg0mYh+UfMWdChA=
 github.com/yuin/gopher-lua v1.1.0/go.mod h1:GBR0iDaNXjAgGg9zfCvksxSRnQx76gclCIb7kdAd1Pw=
 github.com/yuin/gopher-lua v1.1.1 h1:kYKnWBjvbNP4XLT3+bPEwAXJx262OhaHDWDVOPjL46M=
-github.com/yuin/gopher-lua v1.1.1/go.mod h1:GBR0iDaNXjAgGg9zfCvksxSRnQx76gclCIb7kdAd1Pw=
 github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0=
 github.com/zeebo/assert v1.3.0/go.mod h1:Pq9JiuJQpG8JLJdtkwrJESF0Foym2/D9XMU5ciN/wJ0=
 github.com/zeebo/xxh3 v1.0.2/go.mod h1:5NWz9Sef7zIDm2JHfFlcQvNekmcEl9ekUZQQKCYaDcA=
@@ -2409,7 +2397,6 @@ golang.org/x/tools v0.8.0/go.mod h1:JxBZ99ISMI5ViVkT1tr6tdNmXeTrcpVSD3vZ1RsRdN4=
 golang.org/x/tools v0.9.1/go.mod h1:owI94Op576fPu3cIGQeHs3joujW/2Oc6MtlxbF5dfNc=
 golang.org/x/tools v0.10.0/go.mod h1:UJwyiVBsOA2uwvK/e5OY3GTpDUJriEd+/YlqAwLPmyM=
 golang.org/x/tools v0.16.1 h1:TLyB3WofjdOEepBHAU20JdNC1Zbg87elYofWYAY5oZA=
-golang.org/x/tools v0.16.1/go.mod h1:kYVVN6I1mBNoB1OX+noeBjbRk4IUEPa7JJ+TJMEooJ0=
 golang.org/x/xerrors v0.0.0-20190410155217-1f06c39b4373/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
 golang.org/x/xerrors v0.0.0-20190513163551-3ee3066db522/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
 golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=

+ 121 - 0
src/jfw/modules/app/src/web/templates/commonPay/docMember/orderDetail.html

@@ -0,0 +1,121 @@
+<!DOCTYPE html>
+<html lang="zh-CN">
+
+<head>
+    <!--引入公共资源头部-->
+    {{include "/big-member/meta.html"}}
+    <title>订单详情</title>
+    <!--S-当前页面的css资源-->
+    <link rel="stylesheet" href=//cdn-common.jianyu360.com/cdn/lib/reset-css/5.0.1/reset.min.css />
+    <link rel="stylesheet" href=//cdn-common.jianyu360.com/cdn/lib/vant/2.12.24/lib/index.css />
+    <link rel="stylesheet" href=//cdn-common.jianyu360.com/cdn/lib/vant/2.12.24/lib/icon/local.css />
+    <link rel="stylesheet" href='{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/big-member/css/j-icons.css?v={{Msg "seo" "version"}}'>
+    <link rel="stylesheet" href='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/order-list/css/order-detail.css?v={{Msg "seo" "version"}}' />
+</head>
+
+<body>
+    <div class="j-container transparent-header">
+        <div class="j-header jy-app-header border-line-b transparent-header">
+            <span class="header-left">
+                <span class="van-icon van-icon-arrow-left"></span>
+            </span>
+            <span class="header-title title-left">订单详情</span>
+            <span class="header-right"></span>
+        </div>
+        <div class="j-main order-detail" id="app" v-cloak>
+            <div class="j-container">
+                <div class="j-main no-scrollbar">
+                    <div class="wrapper">
+                        <div class="header-pic arc-container" :class="orderStateMap[orderInfo.state].bgcClassName">
+                            <div class="order-state">${ orderStateMap[orderInfo.state].text }</div>
+                            <div class="surplus-time" v-if="orderStateMap[orderInfo.state].surplusTimeShow && orderInfo.surplusTime > 0">
+                                <span>剩余支付时间:</span>
+                                <van-count-down @finish="onCountdownFinish" :time="orderInfo.surplusTime"></van-count-down>
+                            </div>
+                        </div>
+                        <div class="card-list">
+                            <div class="j-card report-p">
+                                <span class="rp-left" :class="'badge-' + (orderInfoFilter.badge || '')">
+                                    <img class="card-l-pic" :src="orderInfo.headerImg">
+                                </span>
+                                <span class="rp-right">
+                                    <span class="product-type">${ orderInfo.productType }</span>
+                                    <span class="pay-money">&yen; ${ orderInfo.payMoney }</span>
+                                </span>
+                            </div>
+                            <div class="j-card product-info">
+                                <div class="j-card-title">购买信息</div>
+                                <div class="j-card-items">
+                                    <div
+                                        class="j-card-item"
+                                        :class="item.className"
+                                        v-for="(item, index) in orderInfo.productInfoList"
+                                        :key="index"
+                                        v-show="item.text"
+                                    >
+                                        <span class="card-item-l">${ item.label + item.split }</span>
+                                        <span class="card-item-r" v-html="item.text"></span>
+                                    </div>
+                                </div>
+                            </div>
+                            <div class="j-card report-info">
+                                <div class="j-card-title">订单信息</div>
+                                <div class="j-card-items">
+                                    <div
+                                        class="j-card-item"
+                                        :class="item.className"
+                                        v-for="(item, index) in orderInfo.orderInfoList"
+                                        :key="index"
+                                        v-show="item.text"
+                                    >
+                                        <span class="card-item-l">${ item.label + item.split }</span>
+                                        <span class="card-item-r" v-html="item.text"></span>
+                                    </div>
+                                </div>
+                            </div>
+                        </div>
+                    </div>
+                </div>
+                <div class="j-button-group j-footer" v-show="buttonGroupShow">
+                    <button
+                        class="j-button-confirm pay"
+                        v-if="orderStateMap[orderInfo.state].bottomButtonShow.pay"
+                        @click="onConfirmPay">立即支付</button>
+                    <button
+                        class="j-button-cancel invoke"
+                        v-if="orderStateMap[orderInfo.state].bottomButtonShow.invoke"
+                        @click="lookInvoke">${ invokeButtonText }</button>
+                        <button
+                        class="j-button-cancel invoke"
+                        v-if="orderStateMap[orderInfo.state].bottomButtonShow.lookInvoice"
+                        @click="lookInvoke('look')">查看发票</button>
+                    <button
+                        class="j-button-confirm buy-again"
+                        v-if="orderStateMap[orderInfo.state].bottomButtonShow.buyAgain"
+                        @click="buyAgain">再次购买</button>
+                    <button
+                            class="j-button-confirm renew"
+                            v-if="orderStateMap[orderInfo.state].bottomButtonShow.renew"
+                            @click="renew">续费</button>
+                </div>
+            </div>
+        </div>
+    </div>
+    <!--S-当前页面的资源-->
+    <script src=//cdn-common.jianyu360.com/cdn/lib/vue/2.6.11/vue.min.js></script>
+    <script src=//cdn-common.jianyu360.com/cdn/lib/vant/2.12.24/lib/vant.min.js></script>
+    <script src=//cdn-common.jianyu360.com/cdn/lib/zepto/1.2.0/zepto.min.js></script>
+    {{include "/big-member/commonjs.html"}}
+    <script>
+        var pageInfo = {
+            platform: 'app',
+            version: {{Msg "seo" "version"}},
+        }
+    </script>
+    <script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/order-list/js/order-list-config.js?v={{Msg "seo" "version"}}'></script>
+    <script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/order-list/js/order-detail.js?v={{Msg "seo" "version"}}'></script>
+    <!--E-当前页面的资源-->
+    {{include "/common/baiducc.html"}}
+</body>
+
+</html>

+ 22 - 1
src/jfw/modules/app/src/web/templates/commonPay/paySuccess.html

@@ -153,7 +153,17 @@
                     查看订单
                 </button>
             </div>
+        {{else if eq .T.doType "docMember"}}
+        <div class="bottom_button j-button-group">
+          <button id ="order" class="j-button-cancel" onclick="window.location.href = '/jyapp/common/{{.T.doType}}/orderDetail?order_code={{.T.orderCode}}'">
+              查看订单
+          </button>
+          <button id ="get-doc" class="j-button-confirm" onclick="getDocsJumpUrl()">
+            获取文档
+          </button>
+        </div>
         {{end}}
+        
     </div>
 </div>
 </body>
@@ -170,7 +180,7 @@
 
    // 根据支付订单类型 加载广告位
     // 超级订阅、数据流量包、数据导出(线上支付方式)、课程产品
-    if (orderType === 'member' || orderType === 'subvip' || orderType === 'dataPack' || orderType === 'dataExport' || orderType === 'onlineCourse' || orderType === 'course') {
+    if (orderType === 'member' || orderType === 'subvip' || orderType === 'dataPack' || orderType === 'dataExport' || orderType === 'onlineCourse' || orderType === 'course' || orderType === 'docMember') {
         var Activedatastring = `xxx`
 
         switch (orderType) {
@@ -194,6 +204,8 @@
                 break;
             case 'member':
             Activedatastring = 'member'
+            case 'docMember':
+            Activedatastring = 'docMember'
             default:
                 break;
         }
@@ -455,6 +467,15 @@
         r = null;
         return context == null || context == "" || context == "undefined" ? "" : context;
     }
+    // 获取文档跳转逻辑
+    function getDocsJumpUrl() {
+       var url = sessionStorage.getItem('mobile-doc-buy-referrer')
+       if (url) {
+           location.replace(url)
+       } else {
+           location.replace('/page_docs_mobile/home')
+       }
+    }
 </script>
 {{include "/common/baiducc.html"}}
 </html>

+ 78 - 72
src/jfw/modules/bigmember/src/go.mod

@@ -3,67 +3,70 @@ module jy/src/jfw/modules/bigmember/src
 go 1.19
 
 require (
-	app.yhyue.com/moapp/jybase v0.0.0-20230727083622-4dfc804ea6cf
+	app.yhyue.com/moapp/jybase v0.0.0-20240226084952-7e7b38ef8a66
 	app.yhyue.com/moapp/jylog v0.0.0-20230522075550-05d7230ca545
-	app.yhyue.com/moapp/jypkg v1.0.16
-	bp.jydev.jianyu360.cn/BaseService/powerCheckCenter v0.0.0-20231219095433-7e7d4aa59822
-	bp.jydev.jianyu360.cn/BaseService/userCenter v1.2.15-0.20230925060020-8e4db0f1e13e
+	app.yhyue.com/moapp/jypkg v1.21.1
+	bp.jydev.jianyu360.cn/BaseService/powerCheckCenter v0.0.0-20240603091545-83ceaad11e6b
+	bp.jydev.jianyu360.cn/BaseService/userCenter v1.2.16
 	github.com/donnie4w/go-logger v0.0.0-20230316073421-36a48f87a69a
-	github.com/gogf/gf/v2 v2.4.2
+	github.com/gogf/gf/v2 v2.7.0
 	github.com/olivere/elastic/v7 v7.0.32
-	go.mongodb.org/mongo-driver v1.11.6
+	go.mongodb.org/mongo-driver v1.14.0
 )
 
 require (
 	app.yhyue.com/moapp/esv1 v0.0.0-20220414031211-3da4123e648d // indirect
 	app.yhyue.com/moapp/jyMarketing v0.0.2-0.20230304035551-21bb1eedf547 // indirect
-	app.yhyue.com/moapp/message v0.0.0-20221223100203-6402e389d9ae // indirect
-	bp.jydev.jianyu360.cn/BaseService/entManageApplication v0.0.0-20230214091519-89a98c01ab0e // indirect
-	bp.jydev.jianyu360.cn/BaseService/resourceCenter v0.0.8 // indirect
-	github.com/BurntSushi/toml v1.1.0 // indirect
+	app.yhyue.com/moapp/jyPoints v1.1.2-0.20231020023521-1a4b1bbf9736 // indirect
+	app.yhyue.com/moapp/message v0.0.0-20231204024949-8c7145bfc161 // indirect
+	bp.jydev.jianyu360.cn/BaseService/entManageApplication v0.0.0-20231226074509-942d80dc34eb // indirect
+	bp.jydev.jianyu360.cn/BaseService/jyMicroservices v0.0.2 // indirect
+	bp.jydev.jianyu360.cn/BaseService/resourceCenter v0.1.3 // indirect
+	filippo.io/edwards25519 v1.1.0 // indirect
+	github.com/BurntSushi/toml v1.2.0 // indirect
 	github.com/beorn7/perks v1.0.1 // indirect
 	github.com/cenkalti/backoff/v4 v4.2.1 // indirect
 	github.com/cespare/xxhash/v2 v2.2.0 // indirect
-	github.com/clbanning/mxj/v2 v2.5.5 // indirect
+	github.com/clbanning/mxj/v2 v2.7.0 // indirect
 	github.com/coreos/go-semver v0.3.1 // indirect
 	github.com/coreos/go-systemd/v22 v22.5.0 // indirect
 	github.com/davecgh/go-spew v1.1.1 // indirect
 	github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
-	github.com/emicklei/go-restful/v3 v3.9.0 // indirect
-	github.com/fatih/color v1.15.0 // indirect
-	github.com/fsnotify/fsnotify v1.6.0 // indirect
+	github.com/emicklei/go-restful/v3 v3.11.0 // indirect
+	github.com/fatih/color v1.16.0 // indirect
+	github.com/fsnotify/fsnotify v1.7.0 // indirect
 	github.com/garyburd/redigo v1.6.2 // indirect
-	github.com/go-logr/logr v1.2.4 // indirect
+	github.com/go-logr/logr v1.3.0 // indirect
 	github.com/go-logr/stdr v1.2.2 // indirect
 	github.com/go-openapi/jsonpointer v0.19.6 // indirect
-	github.com/go-openapi/jsonreference v0.20.1 // indirect
-	github.com/go-openapi/swag v0.22.3 // indirect
-	github.com/go-redis/redis/v8 v8.11.5 // indirect
-	github.com/go-sql-driver/mysql v1.7.1 // indirect
+	github.com/go-openapi/jsonreference v0.20.2 // indirect
+	github.com/go-openapi/swag v0.22.4 // indirect
+	github.com/go-sql-driver/mysql v1.8.1 // indirect
 	github.com/gogo/protobuf v1.3.2 // indirect
 	github.com/golang/mock v1.6.0 // indirect
-	github.com/golang/protobuf v1.5.3 // indirect
+	github.com/golang/protobuf v1.5.4 // indirect
 	github.com/golang/snappy v0.0.4 // indirect
 	github.com/gomodule/redigo v2.0.0+incompatible // indirect
-	github.com/google/gnostic v0.5.7-v3refs // indirect
-	github.com/google/go-cmp v0.5.9 // indirect
+	github.com/google/gnostic-models v0.6.8 // indirect
+	github.com/google/go-cmp v0.6.0 // indirect
 	github.com/google/gofuzz v1.2.0 // indirect
+	github.com/google/uuid v1.6.0 // indirect
 	github.com/gorilla/websocket v1.5.0 // indirect
 	github.com/grokify/html-strip-tags-go v0.0.1 // indirect
-	github.com/grpc-ecosystem/grpc-gateway/v2 v2.15.0 // indirect
+	github.com/grpc-ecosystem/grpc-gateway/v2 v2.18.0 // indirect
 	github.com/hashicorp/hcl v1.0.0 // indirect
 	github.com/howeyc/fsnotify v0.9.0 // indirect
 	github.com/jinzhu/inflection v1.0.0 // indirect
 	github.com/jinzhu/now v1.1.1 // indirect
 	github.com/josharian/intern v1.0.0 // indirect
 	github.com/json-iterator/go v1.1.12 // indirect
-	github.com/klauspost/compress v1.15.15 // indirect
+	github.com/klauspost/compress v1.16.7 // indirect
 	github.com/magiconair/properties v1.8.7 // indirect
 	github.com/mailru/easyjson v0.7.7 // indirect
 	github.com/mattn/go-colorable v0.1.13 // indirect
-	github.com/mattn/go-isatty v0.0.17 // indirect
-	github.com/mattn/go-runewidth v0.0.13 // indirect
-	github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
+	github.com/mattn/go-isatty v0.0.20 // indirect
+	github.com/mattn/go-runewidth v0.0.15 // indirect
+	github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect
 	github.com/mitchellh/mapstructure v1.5.0 // indirect
 	github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
 	github.com/modern-go/reflect2 v1.0.2 // indirect
@@ -72,13 +75,14 @@ require (
 	github.com/nsqio/go-nsq v1.1.0 // indirect
 	github.com/olekukonko/tablewriter v0.0.5 // indirect
 	github.com/olivere/elastic v6.2.37+incompatible // indirect
-	github.com/openzipkin/zipkin-go v0.4.1 // indirect
-	github.com/pelletier/go-toml/v2 v2.0.8 // indirect
+	github.com/openzipkin/zipkin-go v0.4.2 // indirect
+	github.com/pelletier/go-toml/v2 v2.2.0 // indirect
 	github.com/pkg/errors v0.9.1 // indirect
-	github.com/prometheus/client_golang v1.15.1 // indirect
-	github.com/prometheus/client_model v0.3.0 // indirect
-	github.com/prometheus/common v0.42.0 // indirect
-	github.com/prometheus/procfs v0.9.0 // indirect
+	github.com/prometheus/client_golang v1.18.0 // indirect
+	github.com/prometheus/client_model v0.5.0 // indirect
+	github.com/prometheus/common v0.45.0 // indirect
+	github.com/prometheus/procfs v0.12.0 // indirect
+	github.com/redis/go-redis/v9 v9.4.0 // indirect
 	github.com/rivo/uniseg v0.2.0 // indirect
 	github.com/sirupsen/logrus v1.8.3 // indirect
 	github.com/spaolacci/murmur3 v1.1.0 // indirect
@@ -91,41 +95,43 @@ require (
 	github.com/tealeg/xlsx v1.0.5 // indirect
 	github.com/thinxer/go-word2vec v0.0.0-20150917053916-5c19ec7379ed // indirect
 	github.com/xdg-go/pbkdf2 v1.0.0 // indirect
-	github.com/xdg-go/scram v1.1.1 // indirect
-	github.com/xdg-go/stringprep v1.0.3 // indirect
-	github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d // indirect
-	github.com/zeromicro/go-zero v1.5.3 // indirect
+	github.com/xdg-go/scram v1.1.2 // indirect
+	github.com/xdg-go/stringprep v1.0.4 // indirect
+	github.com/youmark/pkcs8 v0.0.0-20201027041543-1326539a0a0a // indirect
+	github.com/zeromicro/go-zero v1.6.4 // indirect
 	github.com/ziutek/blas v0.0.0-20190227122918-da4ca23e90bb // indirect
-	go.etcd.io/etcd/api/v3 v3.5.9 // indirect
-	go.etcd.io/etcd/client/pkg/v3 v3.5.9 // indirect
-	go.etcd.io/etcd/client/v3 v3.5.9 // indirect
-	go.opentelemetry.io/otel v1.15.1 // indirect
-	go.opentelemetry.io/otel/exporters/jaeger v1.15.1 // indirect
-	go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.15.1 // indirect
-	go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.15.1 // indirect
-	go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.15.1 // indirect
-	go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.15.1 // indirect
-	go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.14.0 // indirect
-	go.opentelemetry.io/otel/exporters/zipkin v1.15.1 // indirect
-	go.opentelemetry.io/otel/sdk v1.15.1 // indirect
-	go.opentelemetry.io/otel/trace v1.15.1 // indirect
-	go.opentelemetry.io/proto/otlp v0.19.0 // indirect
+	go.etcd.io/etcd/api/v3 v3.5.13 // indirect
+	go.etcd.io/etcd/client/pkg/v3 v3.5.13 // indirect
+	go.etcd.io/etcd/client/v3 v3.5.13 // indirect
+	go.opentelemetry.io/otel v1.19.0 // indirect
+	go.opentelemetry.io/otel/exporters/jaeger v1.17.0 // indirect
+	go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.19.0 // indirect
+	go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.19.0 // indirect
+	go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.19.0 // indirect
+	go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.19.0 // indirect
+	go.opentelemetry.io/otel/exporters/zipkin v1.19.0 // indirect
+	go.opentelemetry.io/otel/metric v1.19.0 // indirect
+	go.opentelemetry.io/otel/sdk v1.19.0 // indirect
+	go.opentelemetry.io/otel/trace v1.19.0 // indirect
+	go.opentelemetry.io/proto/otlp v1.0.0 // indirect
 	go.uber.org/atomic v1.10.0 // indirect
-	go.uber.org/automaxprocs v1.5.2 // indirect
+	go.uber.org/automaxprocs v1.5.3 // indirect
 	go.uber.org/multierr v1.9.0 // indirect
 	go.uber.org/zap v1.24.0 // indirect
-	golang.org/x/crypto v0.6.0 // indirect
-	golang.org/x/net v0.10.0 // indirect
-	golang.org/x/oauth2 v0.7.0 // indirect
-	golang.org/x/sync v0.1.0 // indirect
-	golang.org/x/sys v0.8.0 // indirect
-	golang.org/x/term v0.8.0 // indirect
-	golang.org/x/text v0.9.0 // indirect
-	golang.org/x/time v0.3.0 // indirect
-	google.golang.org/appengine v1.6.7 // indirect
-	google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 // indirect
-	google.golang.org/grpc v1.56.1 // indirect
-	google.golang.org/protobuf v1.31.0 // indirect
+	golang.org/x/crypto v0.22.0 // indirect
+	golang.org/x/net v0.24.0 // indirect
+	golang.org/x/oauth2 v0.17.0 // indirect
+	golang.org/x/sync v0.6.0 // indirect
+	golang.org/x/sys v0.19.0 // indirect
+	golang.org/x/term v0.19.0 // indirect
+	golang.org/x/text v0.14.0 // indirect
+	golang.org/x/time v0.5.0 // indirect
+	google.golang.org/appengine v1.6.8 // indirect
+	google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de // indirect
+	google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de // indirect
+	google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de // indirect
+	google.golang.org/grpc v1.63.2 // indirect
+	google.golang.org/protobuf v1.33.0 // indirect
 	gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc // indirect
 	gopkg.in/inf.v0 v0.9.1 // indirect
 	gopkg.in/ini.v1 v1.67.0 // indirect
@@ -134,14 +140,14 @@ require (
 	gopkg.in/yaml.v3 v3.0.1 // indirect
 	gorm.io/driver/mysql v1.0.5 // indirect
 	gorm.io/gorm v1.21.3 // indirect
-	jygit.jydev.jianyu360.cn/ApplicationCenter/publicService v0.0.0-20231017031425-45003ca9f35a // indirect
-	k8s.io/api v0.26.3 // indirect
-	k8s.io/apimachinery v0.27.0-alpha.3 // indirect
-	k8s.io/client-go v0.26.3 // indirect
-	k8s.io/klog/v2 v2.90.1 // indirect
-	k8s.io/kube-openapi v0.0.0-20230307230338-69ee2d25a840 // indirect
-	k8s.io/utils v0.0.0-20230209194617-a36077c30491 // indirect
+	jygit.jydev.jianyu360.cn/ApplicationCenter/publicService v0.0.0-20231023011746-38dc3b6aded8 // indirect
+	k8s.io/api v0.29.3 // indirect
+	k8s.io/apimachinery v0.29.3 // indirect
+	k8s.io/client-go v0.29.3 // indirect
+	k8s.io/klog/v2 v2.110.1 // indirect
+	k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 // indirect
+	k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect
 	sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
-	sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
+	sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
 	sigs.k8s.io/yaml v1.3.0 // indirect
 )

Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 867 - 48
src/jfw/modules/bigmember/src/go.sum


+ 16 - 1
src/jfw/modules/bigmember/src/service/use/use.go

@@ -723,9 +723,18 @@ type UserInfo struct {
 	VipPowerType    int64                 `json:"vipPowerType"`    ////超级订阅权益类型 0无 1个人 2企业
 	VipBefore202209 bool                  `json:"vipBefore202209"` //超级订阅:超前项目权限
 	EntSubscribe    int64                 `json:"entSubscribe"`    // 是否有企业订阅权限;0:否 1:是
+	DocsInfo        Docs                  `json:"docsInfo"`        //文库会员信息
 	IsOld           bool                  `json:"isOld"`           // 是否是老用户  注册时间在
 }
 
+// 文库会员信息
+type Docs struct {
+	DocStatus    int64 `json:"docStatus"`    //文库会员状态
+	StartDate    int64 `json:"startDate"`    //会员开始时间
+	EndDate      int64 `json:"endDate"`      //会员结束时间
+	FreeDownload int64 `json:"freeDownload"` // 免费下载次数
+}
+
 // 是否使用过首次使用
 func (u *Use) IsAdd() {
 	r := func() Result {
@@ -760,7 +769,13 @@ func (u *Use) IsAdd() {
 			FreeHasKey:      bigPower.FreeHasKey,
 			VipBefore202209: bigPower.VipStatus > 0 && bigPower.VipStartDate < config.Config.ContextOldVipLimit, //超级订阅 超前项目权限
 			EntSubscribe:    bigPower.EntSubscribe,
-			IsOld:           bigPower.Data.Free.Registedate != 0 && bigPower.Data.Free.Registedate < config.Config.BidSearchOldUserLimit, //p480  原/publicapply/bidcoll/power 接口返回值的isOld添加到isAdd接口
+			DocsInfo: Docs{
+				DocStatus:    bigPower.Data.Docs.Status,
+				StartDate:    bigPower.Data.Docs.StartDate,
+				EndDate:      bigPower.Data.Docs.EndDate,
+				FreeDownload: bigPower.Data.Docs.FreeDownload,
+			},
+			IsOld: bigPower.Data.Free.Registedate != 0 && bigPower.Data.Free.Registedate < config.Config.BidSearchOldUserLimit, //p480  原/publicapply/bidcoll/power 接口返回值的isOld添加到isAdd接口
 		}
 		var (
 			//Name string

+ 2 - 2
src/jfw/modules/publicapply/src/activityday/dao/orderInfo.go

@@ -5,7 +5,6 @@ import (
 	"app.yhyue.com/moapp/jybase/date"
 	"app.yhyue.com/moapp/jybase/redis"
 	"app.yhyue.com/moapp/jypkg/common/src/qfw/util/jy"
-	"app.yhyue.com/moapp/jypkg/public"
 	"bp.jydev.jianyu360.cn/BaseService/userCenter/rpc/pb"
 	"database/sql"
 	"encoding/json"
@@ -16,6 +15,7 @@ import (
 	autil "jy/src/jfw/modules/publicapply/src/activityday/util"
 	"jy/src/jfw/modules/publicapply/src/config"
 	"jy/src/jfw/modules/publicapply/src/db"
+	"jy/src/jfw/modules/publicapply/src/util"
 	"strings"
 	"time"
 )
@@ -67,7 +67,7 @@ func (r *RaffleInfo) InsertDataOrder(tx *sql.Tx, jyPrize string) (orderCode stri
 		err = fmt.Errorf(r.Prize.Name, "赋权限内容异常:", r.Prize.JyPrize)
 		return
 	}
-	orderCode = <-public.VarOrderCode.Pool
+	orderCode = util.GetOrderCode()
 	insertM := map[string]interface{}{
 		"order_money":          orderMoney, //订单金额 单位分
 		"order_status":         1,          //订单状态 0未支付 1已支付

+ 1 - 19
src/jfw/modules/publicapply/src/ad/service/actions.go

@@ -52,25 +52,6 @@ func (a *JyAdvertisement) GetJyAdList() {
 				IsLogin:   common.ObjToString(a.GetSession("userId")) != "",
 			}
 			return adFunc.GetAdInfos(), nil
-			//for _, sCode := range adReqMsg.AdCode {
-			//	var adInfo []entity.AdInfo
-			//	obj := redis.Get("other", "ad_"+sCode)
-			//	if obj != nil {
-			//		adInfo = entity.Handle(a.Session(), obj.([]interface{}), a.Request.Host)
-			//	} else {
-			//		res, ok := db.Mgo.FindOneByField("ad", `{"s_code":"`+sCode+`"}`, `{"a_son":1}`)
-			//		if ok && res != nil && (*res)["a_son"] != nil {
-			//			son := (*res)["a_son"].([]interface{})
-			//			if len(son) > 0 {
-			//				redis.Put("other", "ad_"+sCode, son, int(entity.GetLastTime()))
-			//			}
-			//			adInfo = entity.Handle(a.Session(), son, a.Request.Host)
-			//		}
-			//	}
-			//	if len(adInfo) > 0 {
-			//		returnData[sCode] = adInfo
-			//	}
-			//}
 		}
 		return returnData, nil
 	}()
@@ -79,6 +60,7 @@ func (a *JyAdvertisement) GetJyAdList() {
 	}
 	a.ServeJson(NewResult(rData, errMsg))
 }
+
 func (a *JyAdvertisement) GetStartAd() {
 	log.Println("http:", a.Request.Host)
 	rData, errMsg := func() (interface{}, error) {

+ 3 - 0
src/jfw/modules/publicapply/src/config/config.go

@@ -2,6 +2,7 @@ package config
 
 import (
 	qutil "app.yhyue.com/moapp/jybase/common"
+	"app.yhyue.com/moapp/jypkg/common/src/qfw/util/jy"
 	"app.yhyue.com/moapp/jypkg/compatible"
 	"app.yhyue.com/moapp/jypkg/middleground"
 	"github.com/gogf/gf/v2/frame/g"
@@ -101,4 +102,6 @@ func init() {
 		RegEntManageApplication(g.Cfg().MustGet(ctx, "entManageApplication").String()).
 		RegResourceCenter(g.Cfg().MustGet(ctx, "resourceCenterKey").String()).
 		RegJyPoints(g.Cfg().MustGet(ctx, "jyPointKey").String())
+	jy.OrderCodePoolInit()
+
 }

+ 540 - 540
src/jfw/modules/publicapply/src/detail/dao/bidding.go

@@ -1,615 +1,615 @@
 package dao
 
 import (
-    "app.yhyue.com/moapp/jybase/common"
-    "app.yhyue.com/moapp/jybase/date"
-    "app.yhyue.com/moapp/jybase/encrypt"
-    elastic "app.yhyue.com/moapp/jybase/es"
-    mg "app.yhyue.com/moapp/jybase/mongodb"
-    "app.yhyue.com/moapp/jybase/redis"
-    "app.yhyue.com/moapp/jypkg/common/src/qfw/util/jy"
-    "app.yhyue.com/moapp/jypkg/public"
-    "database/sql"
-    "fmt"
-    "github.com/gogf/gf/v2/util/gconv"
-    "jy/src/jfw/modules/publicapply/src/config"
-    "jy/src/jfw/modules/publicapply/src/db"
-    dc "jy/src/jfw/modules/publicapply/src/detail/config"
-    "jy/src/jfw/modules/publicapply/src/detail/consts"
-    "jy/src/jfw/modules/publicapply/src/detail/entity"
-    "jy/src/jfw/modules/publicapply/src/detail/util"
-    "log"
-    "regexp"
-    "strconv"
-    "strings"
-    "time"
+	"app.yhyue.com/moapp/jybase/common"
+	"app.yhyue.com/moapp/jybase/date"
+	"app.yhyue.com/moapp/jybase/encrypt"
+	elastic "app.yhyue.com/moapp/jybase/es"
+	mg "app.yhyue.com/moapp/jybase/mongodb"
+	"app.yhyue.com/moapp/jybase/redis"
+	"app.yhyue.com/moapp/jypkg/common/src/qfw/util/jy"
+	"app.yhyue.com/moapp/jypkg/public"
+	"database/sql"
+	"fmt"
+	"github.com/gogf/gf/v2/util/gconv"
+	"jy/src/jfw/modules/publicapply/src/config"
+	"jy/src/jfw/modules/publicapply/src/db"
+	dc "jy/src/jfw/modules/publicapply/src/detail/config"
+	"jy/src/jfw/modules/publicapply/src/detail/consts"
+	"jy/src/jfw/modules/publicapply/src/detail/entity"
+	"jy/src/jfw/modules/publicapply/src/detail/util"
+	"log"
+	"regexp"
+	"strconv"
+	"strings"
+	"time"
 )
 
 // userid  by openid
 func GetUserId(openid string) string {
-    data, ok := db.Mgo.FindOne(consts.UserTable, map[string]interface{}{"s_m_openid": openid})
-    if data != nil && len(*data) > 0 && ok {
-        userid := mg.BsonIdToSId((*data)["_id"])
-        return userid
-    }
-    return ""
+	data, ok := db.Mgo.FindOne(consts.UserTable, map[string]interface{}{"s_m_openid": openid})
+	if data != nil && len(*data) > 0 && ok {
+		userid := mg.BsonIdToSId((*data)["_id"])
+		return userid
+	}
+	return ""
 }
 
 // 分销--最新一条记录 2021-09-07 10:36:05
 func GetUserIdByDisWord(disWord, userId string) (belongUserId string) {
-    if disWord != "" {
-        redisDis := redis.GetStr(consts.RedisOther, "DIS_"+disWord[1:])
-        if redisDis != "" {
-            suffix := disWord[len(disWord)-3:]
-            //公告三级页处理
-            if suffix == consts.SuffixMsgT {
-                effectiveTimeStr := strings.Split(redisDis, "##")[3]
-                effectiveTime, _ := strconv.ParseInt(effectiveTimeStr, 10, 64)
-                //是否计算佣金
-                if time.Now().Unix() <= effectiveTime {
-                    belongUserId = strings.Split(redisDis, "##")[1]
-                    db.Mysql.ExecTx("口号使用", func(tx *sql.Tx) bool {
-                        //口号是否使用过
-                        wordInfo := db.Mysql.Find("dis_word", map[string]interface{}{"userId": userId, "password": disWord}, "id", "", 0, 0)
-                        if len(*wordInfo) == 0 {
-                            //新增口号使用
-                            startTime := time.Now().Format(date.Date_Full_Layout)
-                            stopTime := util.TimeProcessing(time.Now().Format(date.Date_Full_Layout), dc.Config.TermValidity).Format(date.Date_Full_Layout)
-                            insert := map[string]interface{}{
-                                "password":      disWord,
-                                "userId":        userId,
-                                "belong_userid": belongUserId,
-                                "start_time":    startTime,
-                                "stop_time":     stopTime,
-                            }
-                            insert1 := public.Mysql.InsertByTx(tx, "dis_word", insert) //口号使用表
-                            log.Println("插入口号使用表", insert1)
-                            return insert1 > 0
-                        }
-                        return true
-                    })
-                }
-            }
-        }
-    }
-    return
+	if disWord != "" {
+		redisDis := redis.GetStr(consts.RedisOther, "DIS_"+disWord[1:])
+		if redisDis != "" {
+			suffix := disWord[len(disWord)-3:]
+			//公告三级页处理
+			if suffix == consts.SuffixMsgT {
+				effectiveTimeStr := strings.Split(redisDis, "##")[3]
+				effectiveTime, _ := strconv.ParseInt(effectiveTimeStr, 10, 64)
+				//是否计算佣金
+				if time.Now().Unix() <= effectiveTime {
+					belongUserId = strings.Split(redisDis, "##")[1]
+					db.Mysql.ExecTx("口号使用", func(tx *sql.Tx) bool {
+						//口号是否使用过
+						wordInfo := db.Mysql.Find("dis_word", map[string]interface{}{"userId": userId, "password": disWord}, "id", "", 0, 0)
+						if len(*wordInfo) == 0 {
+							//新增口号使用
+							startTime := time.Now().Format(date.Date_Full_Layout)
+							stopTime := util.TimeProcessing(time.Now().Format(date.Date_Full_Layout), dc.Config.TermValidity).Format(date.Date_Full_Layout)
+							insert := map[string]interface{}{
+								"password":      disWord,
+								"userId":        userId,
+								"belong_userid": belongUserId,
+								"start_time":    startTime,
+								"stop_time":     stopTime,
+							}
+							insert1 := public.Mysql.InsertByTx(tx, "dis_word", insert) //口号使用表
+							log.Println("插入口号使用表", insert1)
+							return insert1 > 0
+						}
+						return true
+					})
+				}
+			}
+		}
+	}
+	return
 }
 
 // 检查用户是否关注
 func CheckUserIsSubscribe(openid string) bool {
-    user, ok := db.Mgo.FindOneByField("user", map[string]interface{}{
-        "i_appid":    2,
-        "s_m_openid": openid,
-        "s_unionid":  map[string]interface{}{"$ne": openid},
-    }, `{"i_ispush":1}`)
-    if ok && user != nil {
-        if (*user)["_id"] == nil || common.IntAllDef((*user)["i_ispush"], 1) == 0 {
-            return false
-        } else {
-            return true
-        }
-    }
-    return false
+	user, ok := db.Mgo.FindOneByField("user", map[string]interface{}{
+		"i_appid":    2,
+		"s_m_openid": openid,
+		"s_unionid":  map[string]interface{}{"$ne": openid},
+	}, `{"i_ispush":1}`)
+	if ok && user != nil {
+		if (*user)["_id"] == nil || common.IntAllDef((*user)["i_ispush"], 1) == 0 {
+			return false
+		} else {
+			return true
+		}
+	}
+	return false
 }
 
 // 超前信息
 func AdvancedInfo(newUserId int64, bdId string) (b bool) {
-    pushData := public.BaseMysql.FindOne("leadproject_push", map[string]interface{}{"user_id": newUserId, "info_id": bdId}, "id", "")
-    //访问次数加1
-    if pushData != nil {
-        b = public.BaseMysql.UpdateOrDeleteBySql("UPDATE leadproject_push SET  visit_count=visit_count+1 ,lastvisit_time=? WHERE id = ?", time.Now().Format("2006-01-02 15:04:05"), (*pushData)["id"]) > 0
-    }
-    return
+	pushData := public.BaseMysql.FindOne("leadproject_push", map[string]interface{}{"user_id": newUserId, "info_id": bdId}, "id", "")
+	//访问次数加1
+	if pushData != nil {
+		b = public.BaseMysql.UpdateOrDeleteBySql("UPDATE leadproject_push SET  visit_count=visit_count+1 ,lastvisit_time=? WHERE id = ?", time.Now().Format("2006-01-02 15:04:05"), (*pushData)["id"]) > 0
+	}
+	return
 }
 
 // 该节点是否留资
 func hasRetainedCapital(uid string, source []string) bool {
-    if count, err := db.Mgo.CountByErr("saleLeads", map[string]interface{}{"userid": uid, "source": map[string]interface{}{"$in": source}}); err != nil || count > 0 {
-        return true
-    }
-    return false
+	if count, err := db.Mgo.CountByErr("saleLeads", map[string]interface{}{"userid": uid, "source": map[string]interface{}{"$in": source}}); err != nil || count > 0 {
+		return true
+	}
+	return false
 }
 
 // 留资信息
 func CNode(userId string) bool {
-    if hasRetainedCapital(userId, []string{"jyarticle_see3_plus", "jyarticle_see3_plus_pc", "jyarticle_see3_plus_wx", "jyarticle_see3_plus_app", "pc_article_member_freeuse", "app_article_member_freeuse", "wx_article_member_freeuse", "h5_article_member_freeuse"}) {
-        return true
-    }
-    rM := map[string]interface{}{}
-    rdata, ok := db.Mgo.Find("saleLeads", map[string]interface{}{
-        "userid": userId,
-    }, `{"createtime":-1}`, nil, false, 0, 10)
-    if rdata != nil && len(*rdata) > 0 && ok {
-        for _, v := range *rdata {
-            for kk, vv := range v {
-                if vv == nil {
-                    continue
-                }
-                if rM[kk] != nil {
-                    continue
-                }
-                rM[kk] = vv
-            }
-        }
-        delete(rM, "_id")
-        delete(rM, "userid")
-        delete(rM, "createtime")
-        delete(rM, "client")
-    }
-    if userinfo := config.Compatible.Select(userId, `{"s_phone":1,"s_m_phone":1,"s_myemail":1,"s_company":1,"o_jy":1,"o_vipjy":1}`); userinfo != nil && len(*userinfo) > 0 {
-        s_phone := common.ObjToString((*userinfo)["s_phone"])
-        phone := common.If(s_phone == "", common.ObjToString((*userinfo)["s_m_phone"]), s_phone)
-        if rM["phone"] == nil || rM["phone"] == "" {
-            rM["phone"] = phone
-        }
-        if rM["company"] == nil || rM["company"] == "" {
-            rM["company"] = common.ObjToString((*userinfo)["s_company"])
-        }
-    }
-    if rM["name"] != nil && rM["name"] != "" && rM["phone"] != nil && rM["phone"] != "" && rM["company"] != nil && rM["company"] != "" && rM["position"] != nil && rM["position"] != "" && rM["companyType"] != "" {
+	if hasRetainedCapital(userId, []string{"jyarticle_see3_plus", "jyarticle_see3_plus_pc", "jyarticle_see3_plus_wx", "jyarticle_see3_plus_app", "pc_article_member_freeuse", "app_article_member_freeuse", "wx_article_member_freeuse", "h5_article_member_freeuse"}) {
+		return true
+	}
+	rM := map[string]interface{}{}
+	rdata, ok := db.Mgo.Find("saleLeads", map[string]interface{}{
+		"userid": userId,
+	}, `{"createtime":-1}`, nil, false, 0, 10)
+	if rdata != nil && len(*rdata) > 0 && ok {
+		for _, v := range *rdata {
+			for kk, vv := range v {
+				if vv == nil {
+					continue
+				}
+				if rM[kk] != nil {
+					continue
+				}
+				rM[kk] = vv
+			}
+		}
+		delete(rM, "_id")
+		delete(rM, "userid")
+		delete(rM, "createtime")
+		delete(rM, "client")
+	}
+	if userinfo := config.Compatible.Select(userId, `{"s_phone":1,"s_m_phone":1,"s_myemail":1,"s_company":1,"o_jy":1,"o_vipjy":1}`); userinfo != nil && len(*userinfo) > 0 {
+		s_phone := common.ObjToString((*userinfo)["s_phone"])
+		phone := common.If(s_phone == "", common.ObjToString((*userinfo)["s_m_phone"]), s_phone)
+		if rM["phone"] == nil || rM["phone"] == "" {
+			rM["phone"] = phone
+		}
+		if rM["company"] == nil || rM["company"] == "" {
+			rM["company"] = common.ObjToString((*userinfo)["s_company"])
+		}
+	}
+	if rM["name"] != nil && rM["name"] != "" && rM["phone"] != nil && rM["phone"] != "" && rM["company"] != nil && rM["company"] != "" && rM["position"] != nil && rM["position"] != "" && rM["companyType"] != "" {
 
-        if rM["position"] != "总裁" && rM["position"] != "总经理" && (rM["branch"] == nil || rM["branch"] == "") {
-            return false
-        }
-        return true
+		if rM["position"] != "总裁" && rM["position"] != "总经理" && (rM["branch"] == nil || rM["branch"] == "") {
+			return false
+		}
+		return true
 
-    }
-    return false
+	}
+	return false
 }
 
 // 查看公告详情次数限制
 func SeeDetailLimit(obj map[string]interface{}, userId, sid string) bool {
-    if obj != nil {
-        subTypeStr, _ := obj["subtype"].(string)
-        if strings.Contains(subTypeStr, "拟建") || strings.Contains(subTypeStr, "采购意向") {
-            return false
-        }
-    } else {
-        watchKey := fmt.Sprintf("article_count_%d_%s_%d_%s", time.Now().Year(), time.Now().Month(), time.Now().Day(), userId)
-        //检验是否留资
-        if CNode(userId) {
-            return true
-        }
-        if seeRes := redis.Get(consts.RedisLimitation, watchKey); seeRes != nil && seeRes != "" {
-            if resVal, _ := seeRes.(string); resVal != "" {
-                sidss := strings.Split(resVal, "_")
-                if len(sidss) < dc.Config.CanReadNotice {
-                    sidss = append(sidss, sid)
-                    arrs := util.RemoveDuplicatesAndEmpty(sidss)
-                    newVal := strings.Join(arrs, "_")
-                    redis.Put(consts.RedisLimitation, watchKey, newVal, jy.GetExpire())
-                    return true
-                } else {
-                    for _, v := range sidss {
-                        if sid == v {
-                            return true
-                        }
-                    }
-                    return false
-                }
-            }
-        } else {
-            redis.Put(consts.RedisLimitation, watchKey, sid, jy.GetExpire())
-            return true
-        }
-    }
-    return false
+	if obj != nil {
+		subTypeStr, _ := obj["subtype"].(string)
+		if strings.Contains(subTypeStr, "拟建") || strings.Contains(subTypeStr, "采购意向") {
+			return false
+		}
+	} else {
+		watchKey := fmt.Sprintf("article_count_%d_%s_%d_%s", time.Now().Year(), time.Now().Month(), time.Now().Day(), userId)
+		//检验是否留资
+		if CNode(userId) {
+			return true
+		}
+		if seeRes := redis.Get(consts.RedisLimitation, watchKey); seeRes != nil && seeRes != "" {
+			if resVal, _ := seeRes.(string); resVal != "" {
+				sidss := strings.Split(resVal, "_")
+				if len(sidss) < dc.Config.CanReadNotice {
+					sidss = append(sidss, sid)
+					arrs := util.RemoveDuplicatesAndEmpty(sidss)
+					newVal := strings.Join(arrs, "_")
+					redis.Put(consts.RedisLimitation, watchKey, newVal, jy.GetExpire())
+					return true
+				} else {
+					for _, v := range sidss {
+						if sid == v {
+							return true
+						}
+					}
+					return false
+				}
+			}
+		} else {
+			redis.Put(consts.RedisLimitation, watchKey, sid, jy.GetExpire())
+			return true
+		}
+	}
+	return false
 }
 
 // 详情页数据
 func GetBiddingData(id string) (subtype string, obj map[string]interface{}) {
-    cObj, ok := db.Mgo_Bidding.FindById(db.DbConf.Mongodb.Bidding.Collection, id, nil)
-    if ok && (cObj == nil || *cObj == nil || len(*cObj) == 0) {
-        cObj, ok = db.Mgo_Bidding.FindById(db.DbConf.Mongodb.Bidding.Collection_change, id, nil)
-    }
-    obj = *cObj
-    if ok && obj != nil && len(obj) > 0 {
-        subtype = common.ObjToString(obj["subtype"])
-        topType := common.ObjToString(obj["toptype"])
-        if topType == "" {
-            subtype = topType
-        }
-    }
-    return
+	cObj, ok := db.Mgo_Bidding.FindById(db.DbConf.Mongodb.Bidding.Collection, id, nil)
+	if ok && (cObj == nil || *cObj == nil || len(*cObj) == 0) {
+		cObj, ok = db.Mgo_Bidding.FindById(db.DbConf.Mongodb.Bidding.Collection_change, id, nil)
+	}
+	obj = *cObj
+	if ok && obj != nil && len(obj) > 0 {
+		subtype = common.ObjToString(obj["subtype"])
+		topType := common.ObjToString(obj["toptype"])
+		if topType == "" {
+			subtype = topType
+		}
+	}
+	return
 }
 
 // 没有权限招标信息处理
 func BiddingDataFormatNoPower(obj map[string]interface{}, id string) *entity.BidInfo {
-    var (
-        bi = &entity.BidInfo{
-            BaseInfo: &entity.BidBaseInfo{},
-            Abstract: &entity.Abstract{},
-            Detail:   &entity.DetailInfo{},
-            CanRead:  false,
-        }
-    )
-    //基本信息
-    bi.BaseInfo.Id = encrypt.EncodeArticleId2ByCheck(id)
-    industry := common.ObjToString(obj["s_subscopeclass"])
-    if industry != "" {
-        industry = strings.Replace(industry, "它", "他", -1)
-        industry = strings.Split(industry, ",")[0]
-    }
-    bi.BaseInfo.Industry = industry
-    title := common.ObjToString(obj["title"])
-    if len([]rune(title)) > dc.Config.TitleSize {
-        title = fmt.Sprintf("%s...", string([]rune(title)[:dc.Config.TitleSize]))
-    }
-    bi.BaseInfo.Title = title
-    bi.BaseInfo.SubType = common.ObjToString(obj["subtype"])
-    bi.BaseInfo.Area = common.ObjToString(obj["area"])
-    bi.BaseInfo.City = common.ObjToString(obj["city"])
-    bi.BaseInfo.BuyerClass = common.ObjToString(obj["buyerclass"])
-    return bi
+	var (
+		bi = &entity.BidInfo{
+			BaseInfo: &entity.BidBaseInfo{},
+			Abstract: &entity.Abstract{},
+			Detail:   &entity.DetailInfo{},
+			CanRead:  false,
+		}
+	)
+	//基本信息
+	bi.BaseInfo.Id = encrypt.EncodeArticleId2ByCheck(id)
+	industry := common.ObjToString(obj["s_subscopeclass"])
+	if industry != "" {
+		industry = strings.Replace(industry, "它", "他", -1)
+		industry = strings.Split(industry, ",")[0]
+	}
+	bi.BaseInfo.Industry = industry
+	title := common.ObjToString(obj["title"])
+	if len([]rune(title)) > dc.Config.TitleSize {
+		title = fmt.Sprintf("%s...", string([]rune(title)[:dc.Config.TitleSize]))
+	}
+	bi.BaseInfo.Title = title
+	bi.BaseInfo.SubType = common.ObjToString(obj["subtype"])
+	bi.BaseInfo.Area = common.ObjToString(obj["area"])
+	bi.BaseInfo.City = common.ObjToString(obj["city"])
+	bi.BaseInfo.BuyerClass = common.ObjToString(obj["buyerclass"])
+	return bi
 }
 
 // wx pc obj字段统一处理
 func BiddingDataFormat(obj map[string]interface{}, id string) *entity.BidInfo {
-    var (
-        bi = &entity.BidInfo{
-            BaseInfo: &entity.BidBaseInfo{},
-            Abstract: &entity.Abstract{},
-            Detail:   &entity.DetailInfo{},
-            CanRead:  true,
-        }
-    )
-    //基本信息
-    bi.BaseInfo.Id = encrypt.EncodeArticleId2ByCheck(id)
-    industry := common.ObjToString(obj["s_subscopeclass"])
-    if industry != "" {
-        industry = strings.Replace(industry, "它", "他", -1)
-        industry = strings.Split(industry, ",")[0]
-    }
-    bi.BaseInfo.Industry = industry
-    title := common.ObjToString(obj["title"])
-    if len([]rune(title)) > dc.Config.TitleSize {
-        title = fmt.Sprintf("%s...", string([]rune(title)[:dc.Config.TitleSize]))
-    }
-    bi.BaseInfo.Title = title
-    bi.BaseInfo.Area = common.ObjToString(obj["area"])
-    bi.BaseInfo.Purchasing = common.ObjToString(obj["purchasing"])
-    bi.BaseInfo.ProjectName = common.ObjToString(obj["projectname"])
-    bi.BaseInfo.ProjectCode = common.ObjToString(obj["projectcode"])
-    bi.BaseInfo.City = common.ObjToString(obj["city"])
-    bi.BaseInfo.BuyerClass = common.ObjToString(obj["buyerclass"])
-    bi.BaseInfo.District = common.ObjToString(obj["district"])
-    bi.BaseInfo.Site = common.ObjToString(obj["site"])
-    bi.BaseInfo.SubType = common.ObjToString(obj["subtype"])
-    bi.BaseInfo.TopType = common.ObjToString(obj["toptype"])
-    if bi.BaseInfo.SubType == "" {
-        bi.BaseInfo.SubType = bi.BaseInfo.TopType
-    }
-    bi.BaseInfo.BidAmount = common.Int64All(obj["bidamount"])
-    bi.BaseInfo.Budget = common.Int64All(obj["budget"])
-    bi.BaseInfo.PublishTime = common.Int64All(obj["publishtime"])
-    bi.BaseInfo.BuyerSeoId = EsSeoId(false, common.InterfaceToStr(obj["buyer"]))
-    bi.BaseInfo.RecommendedService = common.IntAll(obj["recommended_service"])
-    //摘要
-    switch bi.BaseInfo.SubType {
-    case "拟建":
-        bi.Abstract.Proposed = &entity.Proposed{}
-        bi.Abstract.Proposed.ProjectName = bi.BaseInfo.ProjectName
-        bi.Abstract.Proposed.Area = bi.BaseInfo.Area
-        bi.Abstract.Proposed.Buyer = common.ObjToString(obj["owner"])
-        if bi.Abstract.Proposed.Buyer != "" {
-            bi.Abstract.Proposed.BuyerPortraitShow = true // len(GetEntInfo(strings.Split(bi.Abstract.Proposed.Buyer, ","))) > 0
-        }
-        bi.Abstract.Proposed.BuyerClass = bi.BaseInfo.BuyerClass
-        bi.Abstract.Proposed.TotalInvestment = common.InterfaceToStr(obj["total_investment"])
-        bi.Abstract.Proposed.ProjectPeriod = common.ObjToString(obj["projectperiod"])
-        bi.Abstract.Proposed.Address = common.ObjToString(obj["projectaddr"])
-        bi.Abstract.Proposed.ApproveDept = common.ObjToString(obj["approvedept"])
-        bi.Abstract.Proposed.ApproveContent = common.ObjToString(obj["approvecontent"])
-        bi.Abstract.Proposed.ApproveCode = common.ObjToString(obj["approvecode"])
-        bi.Abstract.Proposed.ApprovalNumber = common.ObjToString(obj["approvenumber"])
-        bi.Abstract.Proposed.ApproveTime = common.ObjToString(obj["approvetime"])
-        bi.Abstract.Proposed.ApproveStatus = common.ObjToString(obj["approvestatus"])
-        bi.Abstract.Proposed.Content = common.ObjToString(obj["project_scale"])
-    default:
-        bi.Abstract.Default = &entity.Default{}
-        bi.Abstract.Default.Buyer = common.ObjToString(obj["buyer"])
-        if bi.Abstract.Default.Buyer != "" {
-            bi.Abstract.Default.BuyerPortraitShow = true // len(GetEntInfo(strings.Split(bi.Abstract.Default.Buyer, ","))) > 0
-        }
-        //判断是否公开联系人信息
-        if common.Int64All(obj["buyerhint"]) != 2 {
-            bi.Abstract.Default.BuyerPerson = common.ObjToString(obj["buyerperson"])
-            bi.Abstract.Default.BuyerTel = common.ObjToString(obj["buyertel"])
-            //ContactInfo(common.ObjToString(obj["buyerperson"]), common.ObjToString(obj["buyertel"]))
-        }
-        bi.Abstract.Default.Agency = common.ObjToString(obj["agency"])
-        bi.Abstract.Default.AgencyPerson = common.ObjToString(obj["agencyperson"])
-        bi.Abstract.Default.AgencyTel = common.ObjToString(obj["agencytel"])
-        bi.Abstract.Default.SignEndTime = common.Int64All(obj["signendtime"])
-        bi.Abstract.Default.BidEndTime = common.Int64All(obj["bidendtime"])
-        bi.Abstract.Default.BidAmount = common.Float64All(obj["bidamount"])
-        entIdList, _ := obj["entidlist"].([]interface{})
-        entIds := common.ObjArrToStringArr(entIdList)
-        if obj["winnerorder"] != nil {
-            //中标候选人
-            winnerOrders := common.ObjArrToMapArr(obj["winnerorder"].([]interface{}))
-            if len(winnerOrders) > 0 {
-                winnerOrder := winnerOrders[0]
-                bi.Abstract.Default.WinnerInfos, bi.Abstract.Default.WinnerSeoMap = WinnerInfo(common.ObjToString(winnerOrder["entname"]), entIds, true)
-            }
-        } else if obj["s_winner"] != nil || obj["winner"] != nil {
-            //中标企业
-            winners := common.InterfaceToStr(obj["s_winner"])
-            if winners == "" {
-                winners = common.InterfaceToStr(obj["winner"])
-            }
-            bi.Abstract.Default.WinnerInfos, bi.Abstract.Default.WinnerSeoMap = WinnerInfo(winners, entIds, false)
-            if len(bi.Abstract.Default.WinnerInfos) > 0 {
-                bi.Abstract.Default.WinnerInfos[0].WinnerPerson = common.ObjToString(obj["winnerperson"])
-                bi.Abstract.Default.WinnerInfos[0].WinnerTel = common.ObjToString(obj["winnertel"])
-            }
-        }
-    }
-    //详情
-    bi.Detail.Detail = DetailFormat(strings.Trim(common.ObjToString(obj["detail"]), " "))
-    // p385调整为 除了从竞品爬虫到的新数据,不展示“查看原文链接”入口,其他公告都展示“查看原文链接”入口(包含客户管理系统-结构化数据,查看的标讯详情页)
-    //competehref字段来源:
-    infoFormat := common.IntAllDef(obj["infoformat"], 1)
-    obj["infoformat"] = infoFormat //信息类型,1代表标讯,2代表拟建,3代表产权
-    //href="#"为竞品
-    href := common.ObjToString(obj["href"])
-    //竞品及剑鱼信息发布的招标信息,不显示查看原文
-    if href != "" && href != "#" && common.ObjToString(obj["site"]) != consts.JyTxt {
-        bi.Detail.OriginalShow = true
-    }
-    //附件
-    if obj["projectinfo"] != nil {
-        projectInfo := common.ObjToMap(obj["projectinfo"])
-        if projectInfo != nil && (*projectInfo)["attachments"] != nil {
-            attachments := common.ObjToMap((*projectInfo)["attachments"])
-            for _, attachment := range *attachments {
-                at := common.ObjToMap(attachment)
-                if at != nil {
-                    fid := common.ObjToString((*at)["fid"])
-                    if fid != "" {
-                        bi.Detail.Attachments = append(bi.Detail.Attachments, entity.Attachment{
-                            FileName: common.ObjToString((*at)["filename"]),
-                            FileType: common.ObjToString((*at)["ftype"]),
-                            FileSize: common.ObjToString((*at)["size"]),
-                        })
-                    }
-                }
-            }
-        }
-    }
-    return bi
+	var (
+		bi = &entity.BidInfo{
+			BaseInfo: &entity.BidBaseInfo{},
+			Abstract: &entity.Abstract{},
+			Detail:   &entity.DetailInfo{},
+			CanRead:  true,
+		}
+	)
+	//基本信息
+	bi.BaseInfo.Id = encrypt.EncodeArticleId2ByCheck(id)
+	industry := common.ObjToString(obj["s_subscopeclass"])
+	if industry != "" {
+		industry = strings.Replace(industry, "它", "他", -1)
+		industry = strings.Split(industry, ",")[0]
+	}
+	bi.BaseInfo.Industry = industry
+	title := common.ObjToString(obj["title"])
+	if len([]rune(title)) > dc.Config.TitleSize {
+		title = fmt.Sprintf("%s...", string([]rune(title)[:dc.Config.TitleSize]))
+	}
+	bi.BaseInfo.Title = title
+	bi.BaseInfo.Area = common.ObjToString(obj["area"])
+	bi.BaseInfo.Purchasing = common.ObjToString(obj["purchasing"])
+	bi.BaseInfo.ProjectName = common.ObjToString(obj["projectname"])
+	bi.BaseInfo.ProjectCode = common.ObjToString(obj["projectcode"])
+	bi.BaseInfo.City = common.ObjToString(obj["city"])
+	bi.BaseInfo.BuyerClass = common.ObjToString(obj["buyerclass"])
+	bi.BaseInfo.District = common.ObjToString(obj["district"])
+	bi.BaseInfo.Site = common.ObjToString(obj["site"])
+	bi.BaseInfo.SubType = common.ObjToString(obj["subtype"])
+	bi.BaseInfo.TopType = common.ObjToString(obj["toptype"])
+	if bi.BaseInfo.SubType == "" {
+		bi.BaseInfo.SubType = bi.BaseInfo.TopType
+	}
+	bi.BaseInfo.BidAmount = common.Int64All(obj["bidamount"])
+	bi.BaseInfo.Budget = common.Int64All(obj["budget"])
+	bi.BaseInfo.PublishTime = common.Int64All(obj["publishtime"])
+	bi.BaseInfo.BuyerSeoId = EsSeoId(false, common.InterfaceToStr(obj["buyer"]))
+	bi.BaseInfo.RecommendedService = common.IntAll(obj["recommended_service"])
+	//摘要
+	switch bi.BaseInfo.SubType {
+	case "拟建":
+		bi.Abstract.Proposed = &entity.Proposed{}
+		bi.Abstract.Proposed.ProjectName = bi.BaseInfo.ProjectName
+		bi.Abstract.Proposed.Area = bi.BaseInfo.Area
+		bi.Abstract.Proposed.Buyer = common.ObjToString(obj["owner"])
+		if bi.Abstract.Proposed.Buyer != "" {
+			bi.Abstract.Proposed.BuyerPortraitShow = true // len(GetEntInfo(strings.Split(bi.Abstract.Proposed.Buyer, ","))) > 0
+		}
+		bi.Abstract.Proposed.BuyerClass = bi.BaseInfo.BuyerClass
+		bi.Abstract.Proposed.TotalInvestment = common.InterfaceToStr(obj["total_investment"])
+		bi.Abstract.Proposed.ProjectPeriod = common.ObjToString(obj["projectperiod"])
+		bi.Abstract.Proposed.Address = common.ObjToString(obj["projectaddr"])
+		bi.Abstract.Proposed.ApproveDept = common.ObjToString(obj["approvedept"])
+		bi.Abstract.Proposed.ApproveContent = common.ObjToString(obj["approvecontent"])
+		bi.Abstract.Proposed.ApproveCode = common.ObjToString(obj["approvecode"])
+		bi.Abstract.Proposed.ApprovalNumber = common.ObjToString(obj["approvenumber"])
+		bi.Abstract.Proposed.ApproveTime = common.ObjToString(obj["approvetime"])
+		bi.Abstract.Proposed.ApproveStatus = common.ObjToString(obj["approvestatus"])
+		bi.Abstract.Proposed.Content = common.ObjToString(obj["project_scale"])
+	default:
+		bi.Abstract.Default = &entity.Default{}
+		bi.Abstract.Default.Buyer = common.ObjToString(obj["buyer"])
+		if bi.Abstract.Default.Buyer != "" {
+			bi.Abstract.Default.BuyerPortraitShow = true // len(GetEntInfo(strings.Split(bi.Abstract.Default.Buyer, ","))) > 0
+		}
+		//判断是否公开联系人信息
+		if common.Int64All(obj["buyerhint"]) != 2 {
+			bi.Abstract.Default.BuyerPerson = common.ObjToString(obj["buyerperson"])
+			bi.Abstract.Default.BuyerTel = common.ObjToString(obj["buyertel"])
+			//ContactInfo(common.ObjToString(obj["buyerperson"]), common.ObjToString(obj["buyertel"]))
+		}
+		bi.Abstract.Default.Agency = common.ObjToString(obj["agency"])
+		bi.Abstract.Default.AgencyPerson = common.ObjToString(obj["agencyperson"])
+		bi.Abstract.Default.AgencyTel = common.ObjToString(obj["agencytel"])
+		bi.Abstract.Default.SignEndTime = common.Int64All(obj["signendtime"])
+		bi.Abstract.Default.BidEndTime = common.Int64All(obj["bidendtime"])
+		bi.Abstract.Default.BidAmount = common.Float64All(obj["bidamount"])
+		entIdList, _ := obj["entidlist"].([]interface{})
+		entIds := common.ObjArrToStringArr(entIdList)
+		if obj["winnerorder"] != nil {
+			//中标候选人
+			winnerOrders := common.ObjArrToMapArr(obj["winnerorder"].([]interface{}))
+			if len(winnerOrders) > 0 {
+				winnerOrder := winnerOrders[0]
+				bi.Abstract.Default.WinnerInfos, bi.Abstract.Default.WinnerSeoMap = WinnerInfo(common.ObjToString(winnerOrder["entname"]), entIds, true)
+			}
+		} else if obj["s_winner"] != nil || obj["winner"] != nil {
+			//中标企业
+			winners := common.InterfaceToStr(obj["s_winner"])
+			if winners == "" {
+				winners = common.InterfaceToStr(obj["winner"])
+			}
+			bi.Abstract.Default.WinnerInfos, bi.Abstract.Default.WinnerSeoMap = WinnerInfo(winners, entIds, false)
+			if len(bi.Abstract.Default.WinnerInfos) > 0 {
+				bi.Abstract.Default.WinnerInfos[0].WinnerPerson = common.ObjToString(obj["winnerperson"])
+				bi.Abstract.Default.WinnerInfos[0].WinnerTel = common.ObjToString(obj["winnertel"])
+			}
+		}
+	}
+	//详情
+	bi.Detail.Detail = DetailFormat(strings.Trim(common.ObjToString(obj["detail"]), " "))
+	// p385调整为 除了从竞品爬虫到的新数据,不展示“查看原文链接”入口,其他公告都展示“查看原文链接”入口(包含客户管理系统-结构化数据,查看的标讯详情页)
+	//competehref字段来源:
+	infoFormat := common.IntAllDef(obj["infoformat"], 1)
+	obj["infoformat"] = infoFormat //信息类型,1代表标讯,2代表拟建,3代表产权
+	//href="#"为竞品
+	href := common.ObjToString(obj["href"])
+	//竞品及剑鱼信息发布的招标信息,不显示查看原文
+	if href != "" && href != "#" && common.ObjToString(obj["site"]) != consts.JyTxt {
+		bi.Detail.OriginalShow = true
+	}
+	//附件    附件可用
+	if isValidFile, _ := obj["isValidFile"].(bool); isValidFile && obj["projectinfo"] != nil {
+		projectInfo := common.ObjToMap(obj["projectinfo"])
+		if projectInfo != nil && (*projectInfo)["attachments"] != nil {
+			attachments := common.ObjToMap((*projectInfo)["attachments"])
+			for _, attachment := range *attachments {
+				at := common.ObjToMap(attachment)
+				if at != nil {
+					fid := common.ObjToString((*at)["fid"])
+					if fid != "" {
+						bi.Detail.Attachments = append(bi.Detail.Attachments, entity.Attachment{
+							FileName: common.ObjToString((*at)["filename"]),
+							FileType: common.ObjToString((*at)["ftype"]),
+							FileSize: common.ObjToString((*at)["size"]),
+						})
+					}
+				}
+			}
+		}
+	}
+	return bi
 }
 
 // 详情
 func DetailFormat(detail string) (fd string) {
-    if detail != "" {
-        //detail字段 缺少标签 处理
-        for _, v := range dc.Config.DetailElement {
-            var intOpen = strings.Count(detail, "<"+v)
-            var intClose = strings.Count(detail, "</"+v+">")
-            if intOpen >= intClose {
-                for di := 0; di < (intOpen - intClose); di++ {
-                    detail += "</" + v + ">"
-                }
-            } else {
-                for di := 0; di < (intClose - intOpen); di++ {
-                    detail = "<" + v + ">" + detail
-                }
-            }
-        }
-        fd = detail
-    }
-    return
+	if detail != "" {
+		//detail字段 缺少标签 处理
+		for _, v := range dc.Config.DetailElement {
+			var intOpen = strings.Count(detail, "<"+v)
+			var intClose = strings.Count(detail, "</"+v+">")
+			if intOpen >= intClose {
+				for di := 0; di < (intOpen - intClose); di++ {
+					detail += "</" + v + ">"
+				}
+			} else {
+				for di := 0; di < (intClose - intOpen); di++ {
+					detail = "<" + v + ">" + detail
+				}
+			}
+		}
+		fd = detail
+	}
+	return
 }
 
 // 联系人/联系方式
 func ContactInfo(name, link string) (str string) {
-    if name != "" && link != "" {
-        str = fmt.Sprintf("%s/%s", name, link)
-    } else if name == "" && link != "" {
-        str = link
-    } else if name != "" && link == "" {
-        str = name
-    }
-    return
+	if name != "" && link != "" {
+		str = fmt.Sprintf("%s/%s", name, link)
+	} else if name == "" && link != "" {
+		str = link
+	} else if name != "" && link == "" {
+		str = name
+	}
+	return
 }
 
 // 企业信息
 func WinnerInfo(winners string, winnerIds []string, candidate bool) (wis []entity.WinnerInfo, wsm map[string]interface{}) {
-    if winners == "" {
-        return
-    }
-    wsm = map[string]interface{}{}
-    winnerArr := strings.Split(winners, ",")
-    if len(winnerIds) != len(winnerArr) {
-        for _, v := range strings.Split(winners, ",") {
-            if v == "-" || v == "" {
-                continue
-            }
-            //临时更改为企业名称查询企业id
-            rData := elastic.Get("qyxy", "qyxy", fmt.Sprintf(`{"query":{"bool":{"should":[{"term":{"company_name":"%s"}},{"term":{"hname":"%s"}}],"minimum_should_match":1}},"_source":["name","_id","nseo_id","capital","company_phone"],"size":1}`, v, v))
-            if rData != nil && len(*rData) == 1 {
-                if entId := common.ObjToString((*rData)[0]["_id"]); entId != "" {
-                    wis = append(wis, entity.WinnerInfo{
-                        Winner:      v,
-                        WinnerId:    encrypt.EncodeArticleId2ByCheck(entId),
-                        IsCandidate: candidate,
-                    })
-                    wsm[v] = (*rData)[0]["nseo_id"]
-                }
-            }
-        }
-    } else {
-        for k, v := range winnerIds {
-            winnerId := common.ObjToString(v)
-            if winnerId == "-" || winnerId == "" {
-                continue
-            }
-            wis = append(wis, entity.WinnerInfo{
-                Winner:      winnerArr[k],
-                WinnerId:    encrypt.EncodeArticleId2ByCheck(winnerId),
-                IsCandidate: candidate,
-            })
-            wsm[winnerArr[k]] = EsSeoId(true, winnerId)
-        }
-    }
-    return
+	if winners == "" {
+		return
+	}
+	wsm = map[string]interface{}{}
+	winnerArr := strings.Split(winners, ",")
+	if len(winnerIds) != len(winnerArr) {
+		for _, v := range strings.Split(winners, ",") {
+			if v == "-" || v == "" {
+				continue
+			}
+			//临时更改为企业名称查询企业id
+			rData := elastic.Get("qyxy", "qyxy", fmt.Sprintf(`{"query":{"bool":{"should":[{"term":{"company_name":"%s"}},{"term":{"hname":"%s"}}],"minimum_should_match":1}},"_source":["name","_id","nseo_id","capital","company_phone"],"size":1}`, v, v))
+			if rData != nil && len(*rData) == 1 {
+				if entId := common.ObjToString((*rData)[0]["_id"]); entId != "" {
+					wis = append(wis, entity.WinnerInfo{
+						Winner:      v,
+						WinnerId:    encrypt.EncodeArticleId2ByCheck(entId),
+						IsCandidate: candidate,
+					})
+					wsm[v] = (*rData)[0]["nseo_id"]
+				}
+			}
+		}
+	} else {
+		for k, v := range winnerIds {
+			winnerId := common.ObjToString(v)
+			if winnerId == "-" || winnerId == "" {
+				continue
+			}
+			wis = append(wis, entity.WinnerInfo{
+				Winner:      winnerArr[k],
+				WinnerId:    encrypt.EncodeArticleId2ByCheck(winnerId),
+				IsCandidate: candidate,
+			})
+			wsm[winnerArr[k]] = EsSeoId(true, winnerId)
+		}
+	}
+	return
 }
 
 // 采购单位 中标企业 seo 信息
 func EsSeoId(isWinner bool, idName string) string {
-    if idName == "" {
-        return idName
-    }
-    var seoId string
-    redisKey := fmt.Sprintf("getSeoId_%v_%s", isWinner, idName)
-    seoId = redis.GetStr(consts.RedisNewOther, redisKey)
-    if seoId != "" {
-        return seoId
-    }
+	if idName == "" {
+		return idName
+	}
+	var seoId string
+	redisKey := fmt.Sprintf("getSeoId_%v_%s", isWinner, idName)
+	seoId = redis.GetStr(consts.RedisNewOther, redisKey)
+	if seoId != "" {
+		return seoId
+	}
 
-    if isWinner {
-        winnerSeo := elastic.GetById("qyxy", "qyxy", idName)
-        if winnerSeo != nil && len(*winnerSeo) > 0 {
-            seoId = common.InterfaceToStr((*winnerSeo)[0]["nseo_id"])
-        }
-    } else {
-        q := fmt.Sprintf(`{"query": {"bool": {"must": [{"match": {"buyer_name": "%s"}}]}},"from": 0,"size": 1,"_source":["seo_id"]}`, idName)
-        winnerSeo := elastic.Get("buyer", "buyer", q)
-        if winnerSeo != nil && len(*winnerSeo) > 0 {
-            seoId = common.InterfaceToStr((*winnerSeo)[0]["seo_id"])
-        }
-    }
-    if seoId != "" {
-        redis.Put("newother", redisKey, seoId, -1)
-    }
-    return seoId
+	if isWinner {
+		winnerSeo := elastic.GetById("qyxy", "qyxy", idName)
+		if winnerSeo != nil && len(*winnerSeo) > 0 {
+			seoId = common.InterfaceToStr((*winnerSeo)[0]["nseo_id"])
+		}
+	} else {
+		q := fmt.Sprintf(`{"query": {"bool": {"must": [{"match": {"buyer_name": "%s"}}]}},"from": 0,"size": 1,"_source":["seo_id"]}`, idName)
+		winnerSeo := elastic.Get("buyer", "buyer", q)
+		if winnerSeo != nil && len(*winnerSeo) > 0 {
+			seoId = common.InterfaceToStr((*winnerSeo)[0]["seo_id"])
+		}
+	}
+	if seoId != "" {
+		redis.Put("newother", redisKey, seoId, -1)
+	}
+	return seoId
 }
 
 // 手机号
 func NumberCodeFormat(bi *entity.BidInfo) {
-    //采购电话中标单位电话置空
-    if bi.Abstract.Default.BuyerPerson != "" {
-        bi.Abstract.Default.BuyerPerson = "freeView"
-        bi.Abstract.Default.BuyerTel = ""
-    }
-    if len(bi.Abstract.Default.WinnerInfos) > 0 {
-        bi.Abstract.Default.WinnerInfos[0].WinnerPerson = "freeView"
-        bi.Abstract.Default.WinnerInfos[0].WinnerTel = ""
-    }
-    //正文电话 手机号 邮箱处理
-    if bi.Detail.Detail != "" {
-        //手机号
-        detail := regexp.MustCompile("1[345789]{1}\\d{9}").ReplaceAllString(bi.Detail.Detail, `<span class="freeView">点击查看</span>`)
-        //项目代码
-        code := bi.BaseInfo.ProjectCode
-        if code != "" {
-            detail = strings.ReplaceAll(detail, code, "*********")
-        }
-        //座机
-        landlineRegexp := regexp.MustCompile("((0\\d{2,3})-)(\\d{7,8})(-(\\d{3,}))?")
-        detail = landlineRegexp.ReplaceAllString(detail, `<span class="freeView">点击查看</span>`)
-        landlineRegexp400 := regexp.MustCompile("((400)-)(\\d{3,4}-)(\\d{3,})")
-        detail = landlineRegexp400.ReplaceAllString(detail, `<span class="freeView">点击查看</span>`)
-        //邮箱
-        mailboxRegexp := 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})(\\]?)")
-        detail = mailboxRegexp.ReplaceAllString(detail, `<span class="freeView">点击查看</span>`)
-        bi.Detail.Detail = strings.ReplaceAll(strings.ReplaceAll(detail, `<span class="freeView">点击查看</span><span class="freeView">点击查看</span>`, `<span class="freeView">点击查看</span>`), "*********", code)
-    }
+	//采购电话中标单位电话置空
+	if bi.Abstract.Default.BuyerPerson != "" {
+		bi.Abstract.Default.BuyerPerson = "freeView"
+		bi.Abstract.Default.BuyerTel = ""
+	}
+	if len(bi.Abstract.Default.WinnerInfos) > 0 {
+		bi.Abstract.Default.WinnerInfos[0].WinnerPerson = "freeView"
+		bi.Abstract.Default.WinnerInfos[0].WinnerTel = ""
+	}
+	//正文电话 手机号 邮箱处理
+	if bi.Detail.Detail != "" {
+		//手机号
+		detail := regexp.MustCompile("1[345789]{1}\\d{9}").ReplaceAllString(bi.Detail.Detail, `<span class="freeView">点击查看</span>`)
+		//项目代码
+		code := bi.BaseInfo.ProjectCode
+		if code != "" {
+			detail = strings.ReplaceAll(detail, code, "*********")
+		}
+		//座机
+		landlineRegexp := regexp.MustCompile("((0\\d{2,3})-)(\\d{7,8})(-(\\d{3,}))?")
+		detail = landlineRegexp.ReplaceAllString(detail, `<span class="freeView">点击查看</span>`)
+		landlineRegexp400 := regexp.MustCompile("((400)-)(\\d{3,4}-)(\\d{3,})")
+		detail = landlineRegexp400.ReplaceAllString(detail, `<span class="freeView">点击查看</span>`)
+		//邮箱
+		mailboxRegexp := 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})(\\]?)")
+		detail = mailboxRegexp.ReplaceAllString(detail, `<span class="freeView">点击查看</span>`)
+		bi.Detail.Detail = strings.ReplaceAll(strings.ReplaceAll(detail, `<span class="freeView">点击查看</span><span class="freeView">点击查看</span>`, `<span class="freeView">点击查看</span>`), "*********", code)
+	}
 }
 
 // 关键词
 func KeyWordHandle(obj map[string]interface{}) string {
-    keywordArr := []string{}
-    owner := common.InterfaceToStr(obj["owner"])
-    buyer := common.InterfaceToStr(obj["buyer"])
-    if buyer == "" {
-        buyer = owner
-    }
-    if buyer != "" && buyer != dc.Config.DetailMosaicTxt {
-        keywordArr = append(keywordArr, buyer)
-    }
-    if common.InterfaceToStr(obj["s_winner"]) != "" && common.InterfaceToStr(obj["s_winner"]) != dc.Config.DetailMosaicTxt {
-        keywordArr = append(keywordArr, common.InterfaceToStr(obj["s_winner"]))
-    }
-    if obj["purchasinglist"] != nil && obj["purchasinglist"] != "" {
-        i := 0
-        for _, v := range gconv.SliceMap(obj["purchasinglist"]) {
-            if i == 5 {
-                break
-            }
-            if common.InterfaceToStr(v["itemname"]) != "" && common.InterfaceToStr(obj["s_winner"]) != dc.Config.DetailMosaicTxt {
-                keywordArr = append(keywordArr, common.InterfaceToStr(v["itemname"]))
-                i++
-            }
-        }
-    }
-    if common.InterfaceToStr(obj["subtype"]) != "" && common.InterfaceToStr(obj["subtype"]) != "其它" {
-        keywordArr = append(keywordArr, consts.TypeCodeMap[common.InterfaceToStr(obj["subtype"])])
-    }
-    if common.InterfaceToStr(obj["area"]) != "" {
-        keywordArr = append(keywordArr, common.InterfaceToStr(obj["area"])+"招标")
-    }
-    if common.InterfaceToStr(obj["city"]) != "" {
-        keywordArr = append(keywordArr, common.InterfaceToStr(obj["city"])+"招标")
-    }
-    keywordArr = append(keywordArr, "剑鱼标讯")
-    keyword := strings.Join(keywordArr, ",")
-    return keyword
+	keywordArr := []string{}
+	owner := common.InterfaceToStr(obj["owner"])
+	buyer := common.InterfaceToStr(obj["buyer"])
+	if buyer == "" {
+		buyer = owner
+	}
+	if buyer != "" && buyer != dc.Config.DetailMosaicTxt {
+		keywordArr = append(keywordArr, buyer)
+	}
+	if common.InterfaceToStr(obj["s_winner"]) != "" && common.InterfaceToStr(obj["s_winner"]) != dc.Config.DetailMosaicTxt {
+		keywordArr = append(keywordArr, common.InterfaceToStr(obj["s_winner"]))
+	}
+	if obj["purchasinglist"] != nil && obj["purchasinglist"] != "" {
+		i := 0
+		for _, v := range gconv.SliceMap(obj["purchasinglist"]) {
+			if i == 5 {
+				break
+			}
+			if common.InterfaceToStr(v["itemname"]) != "" && common.InterfaceToStr(obj["s_winner"]) != dc.Config.DetailMosaicTxt {
+				keywordArr = append(keywordArr, common.InterfaceToStr(v["itemname"]))
+				i++
+			}
+		}
+	}
+	if common.InterfaceToStr(obj["subtype"]) != "" && common.InterfaceToStr(obj["subtype"]) != "其它" {
+		keywordArr = append(keywordArr, consts.TypeCodeMap[common.InterfaceToStr(obj["subtype"])])
+	}
+	if common.InterfaceToStr(obj["area"]) != "" {
+		keywordArr = append(keywordArr, common.InterfaceToStr(obj["area"])+"招标")
+	}
+	if common.InterfaceToStr(obj["city"]) != "" {
+		keywordArr = append(keywordArr, common.InterfaceToStr(obj["city"])+"招标")
+	}
+	keywordArr = append(keywordArr, "剑鱼标讯")
+	keyword := strings.Join(keywordArr, ",")
+	return keyword
 }
 
 // 描述
 func DescriptionHandle(stype string, obj map[string]interface{}) string {
-    description := ""
-    publishtime := common.Int64All(obj["l_publishtime"])
-    if publishtime == 0 {
-        publishtime = common.Int64All(obj["publishtime"])
-    }
-    pushTime := time.Unix(publishtime, 0)
-    title := common.InterfaceToStr(obj["title"])
-    owner := common.InterfaceToStr(obj["owner"])
-    buyer := common.InterfaceToStr(obj["buyer"])
-    if buyer == "" {
-        buyer = owner
-    }
-    s_winner := common.InterfaceToStr(obj["s_winner"])
-    area := common.InterfaceToStr(obj["area"])
-    city := common.InterfaceToStr(obj["city"])
-    if stype == "bdprivate" {
-        //bdprivate
-        //{项目标题},采购单位:{采购单位名称},成交供应商:{中标企业名称},公告日期:{公告日期}。
-        descriptionArr := []string{}
-        if title != "" {
-            descriptionArr = append(descriptionArr, title)
-        }
-        if buyer != "" {
-            descriptionArr = append(descriptionArr, fmt.Sprintf("采购单位:%s", buyer))
-        }
-        if s_winner != "" {
-            descriptionArr = append(descriptionArr, fmt.Sprintf("成交供应商:%s", s_winner))
-        }
-        if publishtime != 0 {
-            descriptionArr = append(descriptionArr, fmt.Sprintf("公告日期:%s", pushTime.Format("2006年01月02日")))
-        }
-        descriptionArr = append(descriptionArr, "查看该项目信息详情请访问剑鱼标讯官网。")
-        description = strings.Join(descriptionArr, ",")
-    } else {
-        //descriptionStr = "%s,项目所属地区是%s%s,项目采购单位是%s,项目发布时间是%s"
-        descriptionArr := []string{}
-        if title != "" {
-            descriptionArr = append(descriptionArr, title)
-        }
-        if area != "" || city != "" {
-            descriptionArr = append(descriptionArr, fmt.Sprintf("项目所属地区是%s%s", area, city))
-        }
-        if buyer != "" {
-            descriptionArr = append(descriptionArr, fmt.Sprintf("项目采购单位是%s", buyer))
-        }
-        if publishtime != 0 {
-            descriptionArr = append(descriptionArr, fmt.Sprintf("项目发布时间是%s", pushTime.Format("2006年01月02日")))
-        }
-        descriptionArr = append(descriptionArr, "查看该项目信息详情请访问剑鱼标讯官网。")
-        description = strings.Join(descriptionArr, ",")
-    }
-    return description
+	description := ""
+	publishtime := common.Int64All(obj["l_publishtime"])
+	if publishtime == 0 {
+		publishtime = common.Int64All(obj["publishtime"])
+	}
+	pushTime := time.Unix(publishtime, 0)
+	title := common.InterfaceToStr(obj["title"])
+	owner := common.InterfaceToStr(obj["owner"])
+	buyer := common.InterfaceToStr(obj["buyer"])
+	if buyer == "" {
+		buyer = owner
+	}
+	s_winner := common.InterfaceToStr(obj["s_winner"])
+	area := common.InterfaceToStr(obj["area"])
+	city := common.InterfaceToStr(obj["city"])
+	if stype == "bdprivate" {
+		//bdprivate
+		//{项目标题},采购单位:{采购单位名称},成交供应商:{中标企业名称},公告日期:{公告日期}。
+		descriptionArr := []string{}
+		if title != "" {
+			descriptionArr = append(descriptionArr, title)
+		}
+		if buyer != "" {
+			descriptionArr = append(descriptionArr, fmt.Sprintf("采购单位:%s", buyer))
+		}
+		if s_winner != "" {
+			descriptionArr = append(descriptionArr, fmt.Sprintf("成交供应商:%s", s_winner))
+		}
+		if publishtime != 0 {
+			descriptionArr = append(descriptionArr, fmt.Sprintf("公告日期:%s", pushTime.Format("2006年01月02日")))
+		}
+		descriptionArr = append(descriptionArr, "查看该项目信息详情请访问剑鱼标讯官网。")
+		description = strings.Join(descriptionArr, ",")
+	} else {
+		//descriptionStr = "%s,项目所属地区是%s%s,项目采购单位是%s,项目发布时间是%s"
+		descriptionArr := []string{}
+		if title != "" {
+			descriptionArr = append(descriptionArr, title)
+		}
+		if area != "" || city != "" {
+			descriptionArr = append(descriptionArr, fmt.Sprintf("项目所属地区是%s%s", area, city))
+		}
+		if buyer != "" {
+			descriptionArr = append(descriptionArr, fmt.Sprintf("项目采购单位是%s", buyer))
+		}
+		if publishtime != 0 {
+			descriptionArr = append(descriptionArr, fmt.Sprintf("项目发布时间是%s", pushTime.Format("2006年01月02日")))
+		}
+		descriptionArr = append(descriptionArr, "查看该项目信息详情请访问剑鱼标讯官网。")
+		description = strings.Join(descriptionArr, ",")
+	}
+	return description
 }

+ 2 - 3
src/jfw/modules/publicapply/src/go.mod

@@ -2,13 +2,12 @@ module jy/src/jfw/modules/publicapply/src
 
 go 1.21
 
-toolchain go1.22.4
 
 require (
 	app.yhyue.com/moapp/jybase v0.0.0-20240226084952-7e7b38ef8a66
 	app.yhyue.com/moapp/jylog v0.0.0-20230522075550-05d7230ca545
-	app.yhyue.com/moapp/jypkg v1.21.6
-	bp.jydev.jianyu360.cn/BaseService/powerCheckCenter v0.0.0-20231222060155-36e225b61353
+	app.yhyue.com/moapp/jypkg v1.21.7
+	bp.jydev.jianyu360.cn/BaseService/powerCheckCenter v0.0.0-20240607062231-ae1d02891843
 	bp.jydev.jianyu360.cn/BaseService/userCenter v1.2.18
 	github.com/SKatiyar/qr v0.0.0-20151201054752-25b6bdf44e67
 	github.com/alibabacloud-go/darabonba-openapi/v2 v2.0.5

+ 4 - 4
src/jfw/modules/publicapply/src/go.sum

@@ -20,8 +20,8 @@ app.yhyue.com/moapp/jybase v0.0.0-20240226084952-7e7b38ef8a66/go.mod h1:XHNATN6t
 app.yhyue.com/moapp/jyfs v0.0.0-20231024061508-480c270480d4/go.mod h1:61hzZ3dZHXL28BNl8BOgZsvM2S5UVY5YFzOkEUPrSu4=
 app.yhyue.com/moapp/jylog v0.0.0-20230522075550-05d7230ca545 h1:+Lak4m1zgsigQloOsvp8AJ+0XeX/+PGp9QP550xlbBQ=
 app.yhyue.com/moapp/jylog v0.0.0-20230522075550-05d7230ca545/go.mod h1:uFrsdUBFbETiJlEmr4PtJWPsZlUpPj2bHQRhryu6ggk=
-app.yhyue.com/moapp/jypkg v1.21.6 h1:RKfuhZxD4IOxGqkWF9m59JgHUds/3DHZBGuFEZdrVs4=
-app.yhyue.com/moapp/jypkg v1.21.6/go.mod h1:5e4YlWE2qq2+oWnE4dQsHra+LF0WldgGs1F3e5IQQLY=
+app.yhyue.com/moapp/jypkg v1.21.7 h1:maTxUGz6djnrkvDk9S4Y7IY3a/yzuiolnQJRFZOBwgg=
+app.yhyue.com/moapp/jypkg v1.21.7/go.mod h1:LlxnGEQUJALOD85IcaPU7FlYxlILF9OL1ctRRap0Kj0=
 app.yhyue.com/moapp/message v0.0.0-20231204024949-8c7145bfc161 h1:WGi4OEIoqw6NpNFGioUEBZnjK9aBa+xJqf/5WY+QyhM=
 app.yhyue.com/moapp/message v0.0.0-20231204024949-8c7145bfc161/go.mod h1:0Oj8SB4pVjdCLD28sy2zyM3hS0WHGpNuVcakLW43GmI=
 bp.jydev.jianyu360.cn/BP/jynsq v0.0.0-20220222052708-ebc43af90698/go.mod h1:ojo/AUH9Yr1wzarEjOaNMkj1Cet/9r8IgLyba64Z52E=
@@ -31,8 +31,8 @@ bp.jydev.jianyu360.cn/BaseService/gateway v0.0.0-20220419090715-88ddb32961be/go.
 bp.jydev.jianyu360.cn/BaseService/gateway v1.3.4/go.mod h1:BMLd/5wb3BIEGhnEgF9y1sJN9P5/Dw9kYsoiE9V8I9g=
 bp.jydev.jianyu360.cn/BaseService/jyMicroservices v0.0.2 h1:Qi8C7gZeR7+kjOtSl9ilR5HwbjCe8GO1RuotFb4+kFA=
 bp.jydev.jianyu360.cn/BaseService/jyMicroservices v0.0.2/go.mod h1:v8y7FCbkKEIRP4Ie9ZM8NtoRP+Fk4O3C1hnexNusYIQ=
-bp.jydev.jianyu360.cn/BaseService/powerCheckCenter v0.0.0-20231222060155-36e225b61353 h1:QnkyOQ0tHVaPmtYx0xcCKzwBrUEasWH+nQ3qVnD0XnI=
-bp.jydev.jianyu360.cn/BaseService/powerCheckCenter v0.0.0-20231222060155-36e225b61353/go.mod h1:rCCaOSWBYfQabf/yIvSVheSPtN2THnHeTl2J5/RrcuU=
+bp.jydev.jianyu360.cn/BaseService/powerCheckCenter v0.0.0-20240607062231-ae1d02891843 h1:u+8k/T0D6EUjj9BhI5RJdRa+8v4FZbyZhaNcm66L6Vs=
+bp.jydev.jianyu360.cn/BaseService/powerCheckCenter v0.0.0-20240607062231-ae1d02891843/go.mod h1:rCCaOSWBYfQabf/yIvSVheSPtN2THnHeTl2J5/RrcuU=
 bp.jydev.jianyu360.cn/BaseService/pushpkg v0.0.0-20230911091604-2faa31032743/go.mod h1:1SQIPPL5Ya5BzQdByFKtTkXrXTWBv+PDqWIhNknLnZw=
 bp.jydev.jianyu360.cn/BaseService/resourceCenter v0.0.0-20220418005748-8ba5d936dd53/go.mod h1:E5lcDI3k4FESLxiAetCfWQTq8qfpy9cv0yN1oKoEO34=
 bp.jydev.jianyu360.cn/BaseService/resourceCenter v0.0.0-20220419023723-0b32d4a41751/go.mod h1:6KL5LMEku83uRbre0W/bj5kXG2I6pJGBFtktmtp51yM=

+ 5 - 2
src/jfw/modules/publicapply/src/oneclick/entity/entity.go

@@ -313,11 +313,12 @@ func (o *OneClickInfo) ProcessPhone(phone string) (map[string]interface{}, error
 func (o *OneClickInfo) phoneLogin(phone string) (map[string]interface{}, error) {
 	returnSign := ""
 	userInfo := map[string]interface{}{}
-	channelCode := "jy_app_phone"
+	channelCode := ""
+	loginCode := "jy_app_phone"
 	platform := "app"
 	if strings.Contains(o.Host, "h5.jianyu360.cn") {
 		platform = "h5"
-		channelCode = "jy_h5_phone"
+		loginCode = "jy_h5_phone"
 	}
 	cc, ckErr := o.R.Cookie(jy.ChannelCookieName)
 	if ckErr == nil {
@@ -366,6 +367,7 @@ func (o *OneClickInfo) phoneLogin(phone string) (map[string]interface{}, error)
 			sourceLabel := redis.GetStr("limitation", fmt.Sprintf("firstVisitTagByWX_%s", o.Session.Id()))
 			if sourceLabel != "" {
 				data["s_rsource"] = sourceLabel
+				channelCode = sourceLabel
 			}
 			// 新注册用户
 			if o.Activity != "" {
@@ -461,6 +463,7 @@ func (o *OneClickInfo) phoneLogin(phone string) (map[string]interface{}, error)
 			ChannelCode:      channelCode,
 			EncryptionUserId: encrypt.SE.EncodeString(mgoUserId),
 			CreateTime:       time.Now().Format(date.Date_Full_Layout),
+			LoginCode:        loginCode,
 			LoginWay:         4,                                                                  //登录方式;1:手机号密码;2:手机号验证码;3:微信;4:手机号一键登录
 			Platform:         common.If(strings.Contains(o.Host, "h5.jianyu360.cn"), 4, 3).(int), //登录端;1:PC;2:WX;3:APP;4:H5
 			Ip:               common.GetIp(o.R),

+ 5 - 0
src/jfw/modules/publicapply/src/util/util.go

@@ -293,3 +293,8 @@ func GetMD5(data string) string {
 	encryptedData := hex.EncodeToString(hash[:])
 	return encryptedData
 }
+
+// 创建订单号
+func GetOrderCode() string {
+	return <-jy.VarOrderCode.Pool
+}

+ 1 - 0
src/jfw/modules/subscribepay/src/a/init.go

@@ -85,4 +85,5 @@ func init() {
 	xweb.AddRouter("/jypay", &service.EquityCode{})
 	//人脉通
 	xweb.AddRouter("/subscribepay", &service.Network{})
+	xweb.AddRouter("/subscribepay", &service.DocMember{})
 }

+ 2 - 1
src/jfw/modules/subscribepay/src/config.json

@@ -132,7 +132,8 @@
     "附件下载包": true,
     "采购单位画像包": true,
     "数据报告": true,
-    "中标必听课": true
+    "中标必听课": true,
+    "剑鱼文库会员":true
   },
   "smsServiceRpc": "127.0.0.1:932",
   "nsq": "192.168.3.240:4260",

+ 9 - 7
src/jfw/modules/subscribepay/src/config/config.go

@@ -1,19 +1,18 @@
 package config
 
 import (
-	"sort"
-	"time"
-
-	"github.com/gogf/gf/v2/os/gctx"
-
 	qutil "app.yhyue.com/moapp/jybase/common"
-	. "app.yhyue.com/moapp/jybase/date"
+	"app.yhyue.com/moapp/jybase/date"
 	"app.yhyue.com/moapp/jybase/mail"
 	qrpc "app.yhyue.com/moapp/jybase/rpc"
+	"app.yhyue.com/moapp/jypkg/common/src/qfw/util/jy"
 	"app.yhyue.com/moapp/jypkg/common/src/qfw/util/middleGround"
 	"app.yhyue.com/moapp/jypkg/middleground"
 	"github.com/gogf/gf/v2/frame/g"
 	"github.com/gogf/gf/v2/os/gcfg"
+	"github.com/gogf/gf/v2/os/gctx"
+	"sort"
+	"time"
 )
 
 type config struct {
@@ -197,6 +196,7 @@ type timeTaskConfig struct {
 	UpdateDEStatus                     string          //定时更新超时订单状态-2
 	ProvinceExpire                     string          //省份订阅包
 	UpdateTimeLimitActivityOrderStatus string          //限时活动取消订单定时任务
+	CheckDocMemberIsExpire             string          `json:"checkDocMemberIsExpire"` //  剑鱼文库会员是否过期
 	SubVipTipDuring                    SubVipTipDuring //超级订阅提醒
 }
 type messageConfig struct {
@@ -442,7 +442,7 @@ func init() {
 	Wxoauthinfo = `https://api.weixin.qq.com/sns/oauth2/access_token?appid=` + Config.Appid + `&secret=` + Config.Appsecret + `&code=%s&grant_type=authorization_code`
 
 	//账户合并
-	time, err := time.ParseInLocation(Date_Full_Layout, Config.AccountMergeOnline, time.Local)
+	time, err := time.ParseInLocation(date.Date_Full_Layout, Config.AccountMergeOnline, time.Local)
 	if err != nil {
 		panic(err.(interface{}))
 	}
@@ -451,4 +451,6 @@ func init() {
 	sort.Slice(TimeTaskConfig.SubVipTipDuring, func(i, j int) bool {
 		return TimeTaskConfig.SubVipTipDuring[i].Cycle > TimeTaskConfig.SubVipTipDuring[j].Cycle
 	})
+	//订单编码
+	jy.OrderCodePoolInit()
 }

+ 5 - 0
src/jfw/modules/subscribepay/src/docMember_price.json

@@ -0,0 +1,5 @@
+{
+  "month": 3800,
+  "quarter": 10800,
+  "year": 22800
+}

+ 114 - 32
src/jfw/modules/subscribepay/src/entity/commodity.go

@@ -22,7 +22,7 @@ var JyCommodityStruct commodityStruct
 type commodityStruct struct {
 }
 
-//产品信息
+// 产品信息
 type ProductInfo struct {
 	ProductTitle string                           `json:"title"`     //产品名称(总)
 	ProductDesc  string                           `json:"desc"`      //产品名称(细)
@@ -44,9 +44,9 @@ type Sku struct {
 	Activity       []*util.Activity `json:"activity"`       //活动
 }
 
-//获取产品信息
-//productId:产品id
-//orderType:订单类型(1购买、2升级、3续费)
+// 获取产品信息
+// productId:产品id
+// orderType:订单类型(1购买、2升级、3续费)
 func (this *commodityStruct) Product(productId, orderType int64, userid string, spec *map[string]interface{}, productType, types string, sess *httpsession.Session) (productInfoList *[]ProductInfo, msg string) {
 	switch productType {
 	case "超级订阅", "VIP订阅": //超级订阅
@@ -67,6 +67,8 @@ func (this *commodityStruct) Product(productId, orderType int64, userid string,
 		productInfoList, msg = courseProduct(productId, userid, productType, spec)
 	case "数据报告": //
 		productInfoList, msg = dataReportProduct(productId, userid, productType, spec)
+	case DocMemberProductName:
+		productInfoList, msg = docMemberProduct(productId, orderType, userid, spec, productType, types, sess)
 	default:
 		productInfoList, msg = nil, "产品类型有误"
 	}
@@ -80,8 +82,8 @@ type discountInfo struct {
 	ActivityId     int64
 }
 
-//超级订阅获取产品信息
-//orderType:订单类型(1购买、2续费、3升级)
+// 超级订阅获取产品信息
+// orderType:订单类型(1购买、2续费、3升级)
 func vipProduct(productId, orderType int64, userid string, spec *map[string]interface{}, productType, types string, sess *httpsession.Session) (productInfolist *[]ProductInfo, msg string) {
 	vip := "超级订阅"
 	productInfolist = &[]ProductInfo{}
@@ -169,7 +171,7 @@ func vipProduct(productId, orderType int64, userid string, spec *map[string]inte
 	return
 }
 
-//数据流量包 1-标准 2-高级
+// 数据流量包 1-标准 2-高级
 func dataexportPackProduct(productId int64, userid string, title []string, productType string) (productInfolist *[]ProductInfo, msg string) {
 	productInfolist = &[]ProductInfo{}
 	for _, y := range title {
@@ -231,7 +233,7 @@ func dataexportPackProduct(productId int64, userid string, title []string, produ
 	return
 }
 
-//历史数据导出
+// 历史数据导出
 func dataexportProduct(productId int64, userid string, productType string, spec *map[string]interface{}) (productInfolist *[]ProductInfo, msg string) {
 	productInfolist = &[]ProductInfo{}
 	productInfo := &ProductInfo{}
@@ -290,7 +292,7 @@ func dataexportProduct(productId int64, userid string, productType string, spec
 	return
 }
 
-//大会员
+// 大会员
 func bigMemberProduct(productId int64, userid string, productType string, spec *map[string]interface{}, sess *httpsession.Session) (productInfolist *[]ProductInfo, msg string) {
 	productInfolist = &[]ProductInfo{}
 	types := "" //
@@ -350,8 +352,8 @@ func bigMemberProduct(productId int64, userid string, productType string, spec *
 	return
 }
 
-//省份订阅包获取产品信息
-//orderType:订单类型(1购买、2续费、3升级)
+// 省份订阅包获取产品信息
+// orderType:订单类型(1购买、2续费、3升级)
 func areaPackProduct(productId, orderType int64, userid string, productType string, spec *map[string]interface{}, types string, sess *httpsession.Session) (productInfolist *[]ProductInfo, msg string) {
 	productInfolist = &[]ProductInfo{}
 	productInfo := &ProductInfo{}
@@ -439,7 +441,7 @@ func areaPackProduct(productId, orderType int64, userid string, productType stri
 	return
 }
 
-//附件下载包
+// 附件下载包
 func downPackProduct(productId int64, userid string, productType string, spec *map[string]interface{}, sess *httpsession.Session) (productInfolist *[]ProductInfo, msg string) {
 	productInfolist = &[]ProductInfo{}
 	types := "" //
@@ -494,7 +496,7 @@ func downPackProduct(productId int64, userid string, productType string, spec *m
 	return
 }
 
-//采购单位画像包
+// 采购单位画像包
 func portraitPackProduct(productId int64, userid string, productType string, spec *map[string]interface{}, sess *httpsession.Session) (productInfolist *[]ProductInfo, msg string) {
 	productInfolist = &[]ProductInfo{}
 	types := "" //
@@ -549,7 +551,7 @@ func portraitPackProduct(productId int64, userid string, productType string, spe
 	return
 }
 
-//中标必听课
+// 中标必听课
 func courseProduct(productId int64, userid string, productType string, spec *map[string]interface{}) (productInfolist *[]ProductInfo, msg string) {
 	productInfolist = &[]ProductInfo{}
 	types := "" //
@@ -601,7 +603,7 @@ func courseProduct(productId int64, userid string, productType string, spec *map
 	return
 }
 
-//数据报告
+// 数据报告
 func dataReportProduct(productId int64, userid string, productType string, spec *map[string]interface{}) (productInfolist *[]ProductInfo, msg string) {
 	productInfolist = &[]ProductInfo{}
 	productInfo := &ProductInfo{}
@@ -653,7 +655,7 @@ func dataReportProduct(productId int64, userid string, productType string, spec
 	return
 }
 
-//根据产品id获取产品名称
+// 根据产品id获取产品名称
 func GetProductNameById(id interface{}) (name, unit string, num int) {
 	data := util.ActivityMysql.SelectBySql(`select a.productName,a.productCode,a.parentCode,a.describe,a.num,b.name from product a
 									inner join unit b on a.numType =b.id
@@ -666,7 +668,7 @@ func GetProductNameById(id interface{}) (name, unit string, num int) {
 	return "", "", 0
 }
 
-//获取当前商品下所有的产品
+// 获取当前商品下所有的产品
 func GetAllProduct(productId, orderType int64, productName string) []string {
 	list := []string{}
 	sql := `select subProductCode from productScene where productCode =? and  productType =?`
@@ -686,7 +688,7 @@ func GetAllProduct(productId, orderType int64, productName string) []string {
 	return list
 }
 
-//获取中标必听课商品
+// 获取中标必听课商品
 func GetCourseProduct(productId int64) []string {
 	list := []string{}
 	if data, ok := util.MQFW.Find("jy_course", map[string]interface{}{
@@ -700,7 +702,7 @@ func GetCourseProduct(productId int64) []string {
 	return list
 }
 
-//获取老的商品代码
+// 获取老的商品代码
 func GetOldCodeByProductCode(productCode int64) string {
 	productCodeStr := strconv.Itoa(int(productCode))
 	for k, v := range config.CouponConfig.Products {
@@ -711,10 +713,9 @@ func GetOldCodeByProductCode(productCode int64) string {
 	return ""
 }
 
-//价格折扣计算
-//originalPrice原价 promotionalPrice一口价  reduce减多少 types0满减、1折扣券、2满赠、3促销、4限时折扣、5限时减免    discount折扣
-//discount 计算后的折扣   discountAmount折扣金额  discountPrice优惠后的金额
-//
+// 价格折扣计算
+// originalPrice原价 promotionalPrice一口价  reduce减多少 types0满减、1折扣券、2满赠、3促销、4限时折扣、5限时减免    discount折扣
+// discount 计算后的折扣   discountAmount折扣金额  discountPrice优惠后的金额
 func PriceCalculation(originalPrice, promotionalPrice, reduce, types int64, discounts float64, productType string, time, timeType int64, set map[string]interface{}) (discount float64, discountAmount int64, discountPrice int64) {
 	newOriginalPrice := decimal.NewFromFloat(float64(originalPrice))
 	if originalPrice == 0 {
@@ -758,7 +759,7 @@ func PriceCalculation(originalPrice, promotionalPrice, reduce, types int64, disc
 	return discount, discountAmount, discountPrice
 }
 
-//productCode 当前产品
+// productCode 当前产品
 func activityHandle(activityLotteryInfo []*util.Activity, originalPrice int64, productType string, set map[string]interface{}, useProductStr string, name string) ([]*util.Activity, int64, int64, int64, int64) {
 	//折扣计算的map
 	lotteryMap := map[int64]*discountInfo{}
@@ -831,8 +832,8 @@ func activityHandle(activityLotteryInfo []*util.Activity, originalPrice int64, p
 	return activityLotteryInfo, skuDiscountPrice, skuDiscountAmount, lotterId, activityId
 }
 
-//获取下单页面额外字段
-//productCode 产品id
+// 获取下单页面额外字段
+// productCode 产品id
 func GetExtend(productCode int64, types string, id string) map[int64]map[string]interface{} {
 	data := map[string]interface{}{}
 	switch types {
@@ -879,9 +880,9 @@ func GetExtend(productCode int64, types string, id string) map[int64]map[string]
 	return retData
 }
 
-//获取活动角标、获取优惠说明
-//types0满减、1折扣券、2满赠、3促销、4限时折扣、5限时减免
-//return 活动角标,优惠说明
+// 获取活动角标、获取优惠说明
+// types0满减、1折扣券、2满赠、3促销、4限时折扣、5限时减免
+// return 活动角标,优惠说明
 func GetTagAndPreDesc(full, reduce int64, promotionalPrice int64, discount float64, types int64, time, timeType int64) (string, string) {
 	full_, _ := decimal.NewFromFloat(float64(full)).Div(decimal.NewFromFloat(100)).Round(3).Float64()
 	reduce_, _ := decimal.NewFromFloat(float64(reduce)).Div(decimal.NewFromFloat(100)).Round(3).Float64()
@@ -913,8 +914,8 @@ func GetTagAndPreDesc(full, reduce int64, promotionalPrice int64, discount float
 	return "", ""
 }
 
-//赠品计算价格
-//time次数  timeType单位 时间类型:1/天、2/月,3/年、4标准、5高级
+// 赠品计算价格
+// time次数  timeType单位 时间类型:1/天、2/月,3/年、4标准、5高级
 func GiveInfoPrice(productType string, time, timeType int64, userid string, set map[string]interface{}) int {
 	switch productType {
 	case "超级订阅":
@@ -959,7 +960,7 @@ func GiveInfoPrice(productType string, time, timeType int64, userid string, set
 	return 0
 }
 
-//数据报告详情页信息
+// 数据报告详情页信息
 func reportDetail(reportId string) (string, map[string]interface{}) {
 	key := "datareport_detail_" + reportId
 	if res := redis.Get("other", key); res != nil {
@@ -1005,3 +1006,84 @@ func isIn(i int64, arr []int64) bool {
 	}
 	return false
 }
+
+// 文库会员产品详情
+func docMemberProduct(productId, orderType int64, userid string, spec *map[string]interface{}, productType, types string, sess *httpsession.Session) (productInfolist *[]ProductInfo, msg string) {
+	vip := DocMemberProductName
+	productInfolist = &[]ProductInfo{}
+	productInfo := &ProductInfo{}
+	productInfo.ProductTitle = vip
+	productInfo.ProductDesc = vip
+	productType = vip
+	productInfo.ProductId = productId
+	if orderType == DocMemberOrderTypeR {
+		productInfo.ProductDesc = fmt.Sprintf("续费%s", vip)
+	}
+	proList := GetAllProduct(productId, orderType, "")
+	productIdStr := strconv.Itoa(int(productId))
+
+	if len(proList) == 0 {
+		proList = []string{productIdStr}
+	}
+	sku := []*Sku{}
+	//子产品
+
+	entUserId := qu.Int64All(sess.Get("entUserId"))
+	allLottery := util.UserAllLottery(0, 1, entUserId, strconv.Itoa(int(productId)), userid, config.CouponConfig.AppId)
+	for _, v_ := range proList {
+		v := qu.Int64All(v_)
+		name, unit, num := GetProductNameById(v) //商品名称
+		desc := fmt.Sprintf("%v%s", num, unit)
+		choosed := false
+		if isIn(v, config.CouponConfig.ChoosedProductId[productIdStr]) {
+			choosed = true
+		}
+		//获取需要领取优惠券的规格
+		productCode := strconv.Itoa(int(v))
+
+		// 计算所选择规格的价格
+		(*spec)["useProduct"] = v
+		//时间参数
+		if strings.Contains(desc, "月") {
+			(*spec)["time"] = fmt.Sprintf("1个月")
+		} else if strings.Contains(desc, "季") {
+			(*spec)["time"] = fmt.Sprintf("1季")
+		} else if strings.Contains(desc, "年") {
+			(*spec)["time"] = fmt.Sprintf("1年")
+		}
+		(*spec)["orderType"] = orderType
+		if orderType == 2 {
+			(*spec)["isDetail"] = true
+		}
+		(*spec)["sess"] = sess
+		productService, _ := NewProductSpec(DocMemberProductName, *spec)
+		originalPrice, msg := productService.GetSelectPrice() // 获取原价
+
+		if msg != nil {
+			log.Println("价格计算:", msg.Error())
+			return nil, msg.Error()
+		}
+		//获取用户下的奖券
+		activityLotteryInfo := allLottery[productCode]
+		//计算优惠券
+		areaSpec := map[string]interface{}{}
+		activityLotteryInfo, skuDiscountPrice, skuDiscountAmount, lotterId, activityId := activityHandle(activityLotteryInfo, int64(originalPrice), productType, areaSpec, fmt.Sprintf("%v%s", num, unit), name)
+		//获取活动信息
+		productSku := &Sku{
+			ProductId:      v,
+			Info:           desc,
+			Name:           name,
+			Choosed:        choosed,
+			Activity:       activityLotteryInfo,
+			OriginalPrice:  int64(originalPrice),
+			DiscountPrice:  skuDiscountPrice,
+			DiscountAmount: skuDiscountAmount,
+			LotterId:       lotterId,
+			ActivityId:     activityId,
+		}
+		sku = append(sku, productSku)
+	}
+	productInfo.Sku = sku
+	*productInfolist = append(*productInfolist, *productInfo)
+	return
+}

+ 6 - 0
src/jfw/modules/subscribepay/src/entity/consts.go

@@ -0,0 +1,6 @@
+package entity
+
+const (
+	TableDataexportOrder = "dataexport_order" // 订单表表名
+
+)

+ 259 - 0
src/jfw/modules/subscribepay/src/entity/docMember.go

@@ -0,0 +1,259 @@
+package entity
+
+import (
+	qutil "app.yhyue.com/moapp/jybase/common"
+	"app.yhyue.com/moapp/jybase/date"
+	"app.yhyue.com/moapp/jypkg/common/src/qfw/util/jy"
+	"bp.jydev.jianyu360.cn/BaseService/userCenter/rpc/pb"
+	"encoding/json"
+	"errors"
+	"fmt"
+	"go.mongodb.org/mongo-driver/bson"
+	"jy/src/jfw/modules/subscribepay/src/config"
+	"jy/src/jfw/modules/subscribepay/src/util"
+	"log"
+	"strconv"
+	"strings"
+	"time"
+)
+
+const (
+	// DocMemberUnitM 文库会员周期单位 同超级订阅单位:cycleunit(1:年 2:月 3:天 4:季)
+	DocMemberUnitM = 2 // 文库会员周期单位-月
+	DocMemberUnitQ = 4 // 文库会员周期单位-季
+	DocMemberUnitY = 1 // 文库会员周期单位-年
+
+	DocMemberOrderTypeB  = 1        // 文库会员订单类型: 购买
+	DocMemberOrderTypeR  = 2        // 文库会员订单类型: 续费
+	DocMemberProductName = "剑鱼文库会员" // 文库会员产品名称
+)
+
+// docMemberPrice 文库会员价格配置
+type docMemberPrice struct {
+	Month   int `json:"month"`   // 月度会员价格
+	Quarter int `json:"quarter"` // 季度会员价格
+	Year    int `json:"year"`    // 年度会员价格
+}
+
+type docMemberStruct struct{}
+
+var JyDocMember docMemberStruct
+var DocMemberPrice docMemberPrice
+
+func init() {
+	qutil.ReadConfig("./docMember_price.json", &DocMemberPrice)
+}
+
+// DocMemberSimpleMsg 文库会员订单简单信息
+type DocMemberSimpleMsg struct {
+	Cyclecount    int    `json:"cyclecount"`               //日期数量(订单详情展示使用)
+	Cycleunit     int    `json:"cycleunit"`                //日期单位(订单详情展示使用)
+	OrderType     int    `json:"ordertype"`                //1,2 类型 1:订单 2:续费
+	OriginalPrice int    `json:"original_price,omitempty"` //双十一活动原价价格
+	GiveCycle     int    `json:"give_cycle,omitempty"`     //赠送周期
+	GiveType      int    `json:"give_type,omitempty"`      //赠送周期 类型 1天 2月
+	DisCountId    int    `json:"discountId,omitempty"`     //赠送的id
+	Badge         string `json:"badge,omitempty"`          //活动标识
+	Remark        string `json:"remark"`                   //备注
+	Source        string `json:"source"`                   //来源
+}
+
+// PayCallBack 剑鱼文库会员支付完成回调
+func (d *docMemberStruct) PayCallBack(param *CallBackParam) bool {
+	now := time.Now()
+	orderdata := util.Mysql.FindOne(TableDataexportOrder, param.GetPaySuccessOrderQuery(), "saleDep,user_phone,ent_id,id,filter,order_money,order_code,order_status,user_id,vip_starttime,vip_endtime,vip_type,prepay_time,dis_word,user_id,create_time,d_relation_id,order_channel", "")
+	pay_time := date.FormatDate(&now, date.Date_Full_Layout)
+	if orderdata == nil {
+		log.Println("未找到订单")
+		return false //未找到订单
+	}
+	userid := qutil.ObjToString((*orderdata)["user_id"])
+	order_status := qutil.IntAll((*orderdata)["order_status"])
+	if order_status == 1 {
+		return true // 或已支付
+	}
+	if order_status != 0 {
+		log.Printf("%s订单状态异常%d\n", userid, order_status)
+		return false //
+	}
+	userId := qutil.ObjToString((*orderdata)["user_id"])
+	orderCode := qutil.ObjToString((*orderdata)["order_code"])
+	//计算时长
+	dmsg := DocMemberSimpleMsg{}
+	filterStr := qutil.ObjToString((*orderdata)["filter"])
+	if err := json.Unmarshal([]byte(filterStr), &dmsg); err != nil {
+		log.Printf("%s docMemberStruct PayCallBack Unmarshal 出错 [%s]\n", userid, filterStr)
+		return false
+	}
+	updateMap := map[string]interface{}{
+		"pay_money":    param.CashFee,
+		"pay_time":     pay_time,
+		"order_status": 1,
+		//支付成功后更新成支付成功的out_trade_no 避免多人支付重复刷新字段
+		"out_trade_no": param.OutTradeno,
+	}
+	var startTime time.Time
+	var endTime time.Time
+	if dmsg.OrderType == DocMemberOrderTypeB { //新订单 计算开始时间 结束时间
+		startTime = time.Now()
+		endTime = util.GetDATE(dmsg.Cycleunit, dmsg.Cyclecount, startTime.Unix())
+		if dmsg.GiveType == 1 {
+			endTime = endTime.AddDate(0, 0, dmsg.GiveCycle)
+		} else if dmsg.GiveType == 2 {
+			endTime = endTime.AddDate(0, dmsg.GiveCycle, 0)
+		}
+		updateMap["vip_starttime"] = date.FormatDate(&startTime, date.Date_Full_Layout)
+		updateMap["vip_endtime"] = date.FormatDate(&endTime, date.Date_Full_Layout)
+	} else if dmsg.OrderType == DocMemberOrderTypeR {
+		//订单是到期之前创建的,到期之后支付,结束时间往后延
+		delay_user := util.Compatible.Select(userId, `{"i_doc_status":1,"l_doc_endtime":1}`)
+		if delay_user != nil && qutil.IntAll((*delay_user)["i_doc_status"]) < 0 {
+			l_vip_endtime := time.Unix(qutil.Int64All((*delay_user)["l_doc_endtime"]), 0)
+			create_time, create_time_err := time.ParseInLocation(date.Date_Full_Layout, qutil.ObjToString((*orderdata)["create_time"]), time.Local)
+			//订单在到期之前创建的
+			if create_time_err == nil && create_time.Before(l_vip_endtime) {
+				delay := int(time.Date(now.Year(), now.Month(), now.Day(), 0, 0, 0, 0, time.Local).Sub(time.Date(l_vip_endtime.Year(), l_vip_endtime.Month(), l_vip_endtime.Day(), 0, 0, 0, 0, time.Local)).Hours() / 24)
+				if delay > 0 && delay <= 3 && (*orderdata)["vip_endtime"] != nil {
+					pil_end_time, pil_end_err := time.ParseInLocation(date.Date_Full_Layout, qutil.ObjToString((*orderdata)["vip_endtime"]), time.Local)
+					if pil_end_err == nil {
+						delay_time := pil_end_time.AddDate(0, 0, delay)
+						updateMap["vip_endtime"] = date.FormatDate(&delay_time, date.Date_Full_Layout)
+						(*orderdata)["vip_endtime"] = updateMap["vip_endtime"]
+					}
+				}
+			}
+		}
+	}
+
+	update := util.Mysql.Update("dataexport_order", map[string]interface{}{
+		"id": (*orderdata)["id"],
+	}, updateMap)
+
+	if !update {
+		log.Printf("%s更新订单状态出错%+v\n", userid, updateMap)
+		return false
+	}
+	flag := false
+	if dmsg.OrderType == DocMemberOrderTypeB { //新订单
+		flag = JyDocMember.Start(userid, startTime, endTime)
+	} else if dmsg.OrderType == DocMemberOrderTypeR { //仅续费
+		flag = JyDocMember.Renew(userid, qutil.ObjToString((*orderdata)["vip_endtime"]))
+	}
+	//支付成功后
+	if flag {
+		//支付提醒
+		util.MsgRemind.PaySuccess(qutil.IntAll((*orderdata)["id"]), qutil.ObjToString((*orderdata)["order_code"]), qutil.ObjToString((*orderdata)["user_id"]), qutil.ObjToString((*orderdata)["prepay_time"]), qutil.IntAllDef((*orderdata)["vip_type"], -1))
+		go PayCancel(userid, DocMemberProductName, "")
+		//卡卷使用
+		userLotteryId := qutil.ObjToString((*orderdata)["d_relation_id"])
+		if userLotteryId != "" {
+			go func(userId, userLotteryId, order_code string) {
+				phone, name := util.GetMyPhoneAndName(userId)
+				if !util.UpdateCouponState(userId, userLotteryId, name, phone, order_code, DocMemberProductName, "0", 1, 0) {
+					log.Println(fmt.Sprintf("单号%s-消费失败-卡卷%s", order_code, userLotteryId))
+				}
+			}(userId, userLotteryId, orderCode)
+		}
+	}
+	return flag
+}
+
+func (d *docMemberStruct) ClearCache(userId string) {
+	positionId := util.MongoIdToPositionId(userId)
+	jy.ClearBigVipUserPower(positionId)
+	config.Middleground.UserCenter.WorkDesktopClearUserInfo(pb.WorkDesktopClearUserInfoReq{
+		PositionId: positionId,
+		AppId:      "10000",
+	})
+	config.Middleground.PowerCheckCenter.DelCheckRedis("10000", qutil.Int64All(positionId))
+}
+
+// Start 开通文库会员
+func (d *docMemberStruct) Start(userId string, startTime, endTime time.Time) bool {
+	set := map[string]interface{}{}
+	set = map[string]interface{}{
+		"l_doc_starttime": startTime.Unix(), //开始时间
+		"l_doc_endtime":   endTime.Unix(),   //结束时间
+		"i_doc_status":    1,                // 剑鱼文库会员状态
+	}
+	if !util.Compatible.Update(userId,
+		bson.M{"$set": set}) {
+		return false
+	}
+	d.ClearCache(userId)
+	return true
+}
+
+// Renew 续费
+func (d *docMemberStruct) Renew(userId string, end string) bool {
+	endTime, err := time.ParseInLocation(date.Date_Full_Layout, end, time.Local)
+	if err != nil {
+		log.Printf("%s格式化日期出错%s\n", userId, end)
+		return false
+	}
+	set := map[string]interface{}{
+		"l_doc_endtime": endTime.Unix(),
+		"i_doc_status":  1,
+	}
+	if !util.Compatible.Update(userId,
+		bson.M{"$set": set}) {
+		log.Printf("%s更新结束%d日期出错\n", userId, endTime.Unix())
+		return false
+	}
+	d.ClearCache(userId)
+	return true
+}
+
+//	计算周期
+//
+// cycleunit(1:年 2:月 3:天 4:季)
+// cyclecount 数字长度  1 现在网站只有 1个月 1季 1年  没有两个月
+func (d *docMemberStruct) CheckReqDate(dateStr string) (cyclecount, cycleunit int, err error) {
+	if strings.HasSuffix(dateStr, "年") {
+		cycleunit = DocMemberUnitY
+		dateStr = strings.Replace(dateStr, "年", "", -1)
+		cyclecount, err = strconv.Atoi(strings.Trim(dateStr, " "))
+		if cyclecount > 1 && err == nil {
+			err = errors.New(fmt.Sprintf("日期%s返回超出最大值", dateStr))
+		}
+		return
+	} else if strings.HasSuffix(dateStr, "季") {
+		cycleunit = DocMemberUnitQ
+		dateStr = strings.Replace(dateStr, "季", "", -1)
+		cyclecount, err = strconv.Atoi(strings.Trim(dateStr, " "))
+		if cyclecount > 1 && err == nil {
+			err = errors.New(fmt.Sprintf("日期%s范围超出最大值", dateStr))
+		}
+		return
+	} else if strings.HasSuffix(dateStr, "月") {
+		cycleunit = DocMemberUnitM
+		dateStr = strings.Replace(dateStr, "个月", "", -1)
+		cyclecount, err = strconv.Atoi(strings.Trim(dateStr, " "))
+		if cyclecount > 1 && err == nil {
+			err = errors.New(fmt.Sprintf("日期%s范围超出最大值", dateStr))
+		}
+		return
+	}
+	return -1, -1, errors.New(fmt.Sprintf("日期%s格式化出错", dateStr))
+}
+
+// GetDetail 获取用户剑鱼文库状态
+func (d *docMemberStruct) GetDetail(id string) (*map[string]interface{}, bool, int) {
+	mData := util.Compatible.Select(id, `{"i_doc_status":1,"l_doc_endtime":1,"l_doc_starttime":1}`)
+	//是否处于剑鱼文库状态
+	vipStatus := qutil.IntAll((*mData)["i_doc_status"])
+	return mData, vipStatus > 0, vipStatus
+}
+
+// 文库会员获取价格
+func (d *docMemberStruct) GetPrice(unit int) int {
+	switch unit {
+	case DocMemberUnitM:
+		return DocMemberPrice.Month
+	case DocMemberUnitQ:
+		return DocMemberPrice.Quarter
+	case DocMemberUnitY:
+		return DocMemberPrice.Year
+	}
+	return 0
+}

+ 126 - 0
src/jfw/modules/subscribepay/src/entity/order.go

@@ -125,6 +125,8 @@ func (this *commonOrderStruct) InserMap(product, productId, userid, lotteryId, d
 		orderinfo, msg = newDataReportOrder(m, userid)
 	case "中标必听课":
 		orderinfo, msg = courseOnlineOrder(m, userid)
+	case DocMemberProductName:
+		orderinfo, msg = docMemberOrder(m, userid, session)
 	default:
 		orderinfo, msg = nil, "产品类型有误"
 	}
@@ -1361,3 +1363,127 @@ func discountPrice(discount float64, money int) (orderMoney, discountPrice int)
 	orderMoney = money - discountPrice
 	return orderMoney, discountPrice
 }
+
+// 文库会员
+func docMemberOrder(m map[string]interface{}, userId string, session *httpsession.Session) (*OrderInfo, string) {
+	types := qu.ObjToString(m["type"])
+	switch types {
+	case "firstBuy": //首次购买
+		return docMemberFirstBuy(m, userId, session)
+	case "renew": //续费
+		return docMemberRenew(m, userId, session)
+	}
+	return nil, "未知类型"
+}
+
+// 文库会员首次购买
+func docMemberFirstBuy(m map[string]interface{}, userId string, session *httpsession.Session) (*OrderInfo, string) {
+	date := qu.ObjToString(m["time"])               // 时间
+	orderType := qu.IntAll(m["orderType"])          //1
+	order_phone := qu.ObjToString(m["order_phone"]) //p19.3用户信息采集 手机号
+	now := time.Now()
+	userData, _, _ := JyDocMember.GetDetail(userId)
+	pass := func() bool { //校验订单是否合法
+		if orderType == DocMemberOrderTypeB {
+			status := qu.IntAll((*userData)["i_doc_status"])
+			if status > 1 { //仅非剑鱼文库用户购买
+				return false
+			}
+		} else {
+			return false
+		}
+		return true
+	}()
+	if !pass {
+		return nil, "非法请求"
+	}
+	date_count, date_unit, err := JyDocMember.CheckReqDate(date)
+	if err != nil {
+		return nil, err.Error()
+	}
+
+	filter := DocMemberSimpleMsg{
+		Cyclecount: date_count,
+		Cycleunit:  date_unit,
+		OrderType:  DocMemberOrderTypeB,
+		Source:     qu.ObjToString(m["source"]),
+	}
+	//计算价格
+	totalfee := JyDocMember.GetPrice(date_unit)
+	if totalfee <= 0 {
+		return nil, "价格获取失败"
+
+	}
+	//原价
+	original_price := totalfee
+	log.Printf("剑鱼文库会员:价格%d", totalfee)
+	ordercode := pay.GetOrderCode(userId)
+	filterStr, _ := json.Marshal(filter)
+	if order_phone != "" && !jy.PhoneReg.MatchString(order_phone) { //p19.3用户信息采集(仅付费可填写手机号)
+		return nil, "手机号格式异常"
+	}
+
+	return &OrderInfo{
+		OrderMoney:    totalfee,
+		OrderStatus:   0,
+		OrderCode:     ordercode,
+		ProductType:   DocMemberProductName,
+		CreateTime:    FormatDate(&now, Date_Full_Layout),
+		OriginalPrice: original_price,
+		UserId:        userId,
+		Filter:        string(filterStr),
+		UserPhone:     qu.ObjToString(m["order_phone"]),
+	}, ""
+}
+
+// 文库会员续费
+func docMemberRenew(m map[string]interface{}, userId string, session *httpsession.Session) (*OrderInfo, string) {
+
+	now := time.Now()
+	date_count, date_unit, err := JyDocMember.CheckReqDate(qu.ObjToString(m["time"]))
+	if err != nil {
+		return nil, err.Error()
+	}
+
+	rData, isDocMember, _ := JyDocMember.GetDetail(userId)
+	if !isDocMember {
+		return nil, "请求异常,非剑鱼文库会员状态"
+	}
+	endUnix := qu.Int64All((*rData)["l_doc_endtime"])
+	if time.Date(now.Year(), now.Month(), now.Day(), 23, 59, 59, 59, now.Location()).
+		AddDate(3, 0, 0).Before(util.GetDATE(date_unit, date_count, endUnix)) {
+		return nil, "订阅周期超过三年"
+	}
+
+	totalfee := JyDocMember.GetPrice(date_unit)
+	filter := DocMemberSimpleMsg{
+		Cyclecount: date_count,
+		Cycleunit:  date_unit,
+		OrderType:  DocMemberOrderTypeR,
+		Source:     qu.ObjToString(m["source"]), //来源(活动)
+	}
+
+	//原价
+	original_price := totalfee
+	filterStr, _ := json.Marshal(filter)
+	ordercode := pay.GetOrderCode(userId)
+
+	//计算开始时间和结束时间
+	startTime := time.Unix(endUnix, 0)
+	endTime := util.GetDATE(filter.Cycleunit, filter.Cyclecount, endUnix)
+	startTime = startTime.Add(1 * time.Second)
+	return &OrderInfo{
+		OrderMoney:    totalfee,
+		OrderStatus:   0,
+		OrderCode:     ordercode,
+		ProductType:   DocMemberProductName,
+		CreateTime:    FormatDate(&now, Date_Full_Layout),
+		OriginalPrice: original_price,
+		UserId:        userId,
+		Filter:        string(filterStr),
+		VipType:       1, // 续费
+		VipStartTime:  FormatDate(&startTime, Date_Full_Layout),
+		VipEndTime:    FormatDate(&endTime, Date_Full_Layout),
+		UserPhone:     qu.ObjToString(m["order_phone"]),
+	}, ""
+}

+ 53 - 0
src/jfw/modules/subscribepay/src/entity/product.go

@@ -63,6 +63,8 @@ func NewProductSpec(productType string, spec map[string]interface{}) (ProductSpe
 		return (&entnicheSpec{}).setSpec(spec), nil
 	case ProductIntegral:
 		return (&integralSpec{}).setSpec(spec), nil
+	case DocMemberProductName:
+		return (&docSpec{}).setSpec(spec), nil
 	}
 	return nil, errors.New("无效的产品类型")
 }
@@ -493,3 +495,54 @@ func (s *integralSpec) GetSelectPrice() (int, error) {
 	}
 	return orderMoney, nil
 }
+
+// / 超级订阅规格
+type docSpec struct {
+	UserId    string
+	OrderType int
+	TimeRenew string
+	IsDetail  bool // 从商品详情过来的订单需要展示价格 ,用于跳过周期计算
+	Sess      *httpsession.Session
+}
+
+// 超级订阅初始化规格
+func (p *docSpec) setSpec(spec map[string]interface{}) ProductSpec {
+	p.UserId = qutil.ObjToString(spec["userId"])
+	p.OrderType = qutil.IntAll(spec["orderType"])
+	p.TimeRenew = qutil.ObjToString(spec["time"])
+	p.IsDetail, _ = spec["isDetail"].(bool)
+	p.Sess, _ = spec["sess"].(*httpsession.Session)
+	return p
+}
+
+// GetSelectPrice 计算所选规格价格
+func (p *docSpec) GetSelectPrice() (int, error) {
+	original_price := 0
+	rData, isDocMember, _ := JyDocMember.GetDetail(p.UserId)
+	if (isDocMember && p.OrderType == DocMemberOrderTypeB) || (!isDocMember && p.OrderType == DocMemberOrderTypeR) {
+		return 0, errors.New("参数异常,请查看用户状态")
+	}
+	if !isDocMember && p.OrderType == DocMemberOrderTypeB { //购买价格
+		_, date_unit, err := JyDocMember.CheckReqDate(p.TimeRenew)
+		if err != nil {
+			return 0, err
+		}
+		//计算价格
+		original_price = JyDocMember.GetPrice(date_unit)
+	} else if isDocMember { //2:续费价格(只延长时间)
+		now := time.Now()
+		date_count, date_unit, err := JyDocMember.CheckReqDate(p.TimeRenew)
+		if err != nil {
+			return 0, err
+		}
+		endUnix := qutil.Int64All((*rData)["l_doc_endtime"])
+		if time.Date(now.Year(), now.Month(), now.Day(), 23, 59, 59, 59, now.Location()).
+			AddDate(3, 0, 0).Before(util.GetDATE(date_unit, date_count, endUnix)) && !p.IsDetail { //detail=true 从商品详情过来的订单需要展示价格
+			return 0, errors.New("订阅周期超过三年")
+		}
+		original_price = JyDocMember.GetPrice(date_unit)
+
+	}
+
+	return original_price, nil
+}

+ 2 - 2
src/jfw/modules/subscribepay/src/go.mod

@@ -7,7 +7,7 @@ toolchain go1.22.4
 require (
 	app.yhyue.com/moapp/jybase v0.0.0-20240226084952-7e7b38ef8a66
 	app.yhyue.com/moapp/jylog v0.0.0-20230522075550-05d7230ca545
-	app.yhyue.com/moapp/jypkg v1.15.8-0.20240429101401-e9a346a1e7a0
+	app.yhyue.com/moapp/jypkg v1.21.4
 	bp.jydev.jianyu360.cn/BaseService/jyMicroservices v0.0.2
 	bp.jydev.jianyu360.cn/BaseService/pushpkg v0.0.0-20230911091604-2faa31032743
 	bp.jydev.jianyu360.cn/BaseService/userCenter v1.2.16
@@ -28,7 +28,7 @@ require (
 	app.yhyue.com/moapp/jyPoints v1.1.2-0.20231020023521-1a4b1bbf9736 // indirect
 	app.yhyue.com/moapp/message v0.0.0-20231204024949-8c7145bfc161 // indirect
 	bp.jydev.jianyu360.cn/BaseService/entManageApplication v0.0.0-20231226074509-942d80dc34eb // indirect
-	bp.jydev.jianyu360.cn/BaseService/powerCheckCenter v0.0.0-20231222060155-36e225b61353 // indirect
+	bp.jydev.jianyu360.cn/BaseService/powerCheckCenter v0.0.0-20240603091545-83ceaad11e6b // indirect
 	bp.jydev.jianyu360.cn/BaseService/resourceCenter v0.1.3 // indirect
 	filippo.io/edwards25519 v1.1.0 // indirect
 	github.com/BurntSushi/toml v1.2.0 // indirect

+ 4 - 4
src/jfw/modules/subscribepay/src/go.sum

@@ -20,8 +20,8 @@ app.yhyue.com/moapp/jybase v0.0.0-20240226084952-7e7b38ef8a66/go.mod h1:XHNATN6t
 app.yhyue.com/moapp/jyfs v0.0.0-20231024061508-480c270480d4/go.mod h1:61hzZ3dZHXL28BNl8BOgZsvM2S5UVY5YFzOkEUPrSu4=
 app.yhyue.com/moapp/jylog v0.0.0-20230522075550-05d7230ca545 h1:+Lak4m1zgsigQloOsvp8AJ+0XeX/+PGp9QP550xlbBQ=
 app.yhyue.com/moapp/jylog v0.0.0-20230522075550-05d7230ca545/go.mod h1:uFrsdUBFbETiJlEmr4PtJWPsZlUpPj2bHQRhryu6ggk=
-app.yhyue.com/moapp/jypkg v1.15.8-0.20240429101401-e9a346a1e7a0 h1:a9vx1dXTwJpvMYCSvQMb6EskDRjnzpzGRMw8JfseGtw=
-app.yhyue.com/moapp/jypkg v1.15.8-0.20240429101401-e9a346a1e7a0/go.mod h1:b3+0Q50iZYNaiYn7yR9bIIvIEsPvSy5figX7riSi/n4=
+app.yhyue.com/moapp/jypkg v1.21.4 h1:NApb2EOlUkncX9yjMjKDFyOXKK66vOMJ3HprzMx8alc=
+app.yhyue.com/moapp/jypkg v1.21.4/go.mod h1:wyJeNc8I9R5799tqch7n8SEZrB0s8nmNou0brBh91w4=
 app.yhyue.com/moapp/message v0.0.0-20231204024949-8c7145bfc161 h1:WGi4OEIoqw6NpNFGioUEBZnjK9aBa+xJqf/5WY+QyhM=
 app.yhyue.com/moapp/message v0.0.0-20231204024949-8c7145bfc161/go.mod h1:0Oj8SB4pVjdCLD28sy2zyM3hS0WHGpNuVcakLW43GmI=
 bp.jydev.jianyu360.cn/BP/jynsq v0.0.0-20220222052708-ebc43af90698/go.mod h1:ojo/AUH9Yr1wzarEjOaNMkj1Cet/9r8IgLyba64Z52E=
@@ -31,8 +31,8 @@ bp.jydev.jianyu360.cn/BaseService/gateway v0.0.0-20220419090715-88ddb32961be/go.
 bp.jydev.jianyu360.cn/BaseService/gateway v1.3.4/go.mod h1:BMLd/5wb3BIEGhnEgF9y1sJN9P5/Dw9kYsoiE9V8I9g=
 bp.jydev.jianyu360.cn/BaseService/jyMicroservices v0.0.2 h1:Qi8C7gZeR7+kjOtSl9ilR5HwbjCe8GO1RuotFb4+kFA=
 bp.jydev.jianyu360.cn/BaseService/jyMicroservices v0.0.2/go.mod h1:v8y7FCbkKEIRP4Ie9ZM8NtoRP+Fk4O3C1hnexNusYIQ=
-bp.jydev.jianyu360.cn/BaseService/powerCheckCenter v0.0.0-20231222060155-36e225b61353 h1:QnkyOQ0tHVaPmtYx0xcCKzwBrUEasWH+nQ3qVnD0XnI=
-bp.jydev.jianyu360.cn/BaseService/powerCheckCenter v0.0.0-20231222060155-36e225b61353/go.mod h1:rCCaOSWBYfQabf/yIvSVheSPtN2THnHeTl2J5/RrcuU=
+bp.jydev.jianyu360.cn/BaseService/powerCheckCenter v0.0.0-20240603091545-83ceaad11e6b h1:6f/if8nVoR89n7RbgFEniiUqt4QpqJNQX2kS2JJHDEM=
+bp.jydev.jianyu360.cn/BaseService/powerCheckCenter v0.0.0-20240603091545-83ceaad11e6b/go.mod h1:rCCaOSWBYfQabf/yIvSVheSPtN2THnHeTl2J5/RrcuU=
 bp.jydev.jianyu360.cn/BaseService/pushpkg v0.0.0-20230911091604-2faa31032743 h1:7IaukyEAbMvgEv3/TiHlw7lzWPoksE4tVa1ap16RC9Q=
 bp.jydev.jianyu360.cn/BaseService/pushpkg v0.0.0-20230911091604-2faa31032743/go.mod h1:1SQIPPL5Ya5BzQdByFKtTkXrXTWBv+PDqWIhNknLnZw=
 bp.jydev.jianyu360.cn/BaseService/resourceCenter v0.0.0-20220418005748-8ba5d936dd53/go.mod h1:E5lcDI3k4FESLxiAetCfWQTq8qfpy9cv0yN1oKoEO34=

+ 0 - 1
src/jfw/modules/subscribepay/src/main.go

@@ -16,7 +16,6 @@ import (
 
 	"app.yhyue.com/moapp/jybase/go-xweb/xweb"
 	"app.yhyue.com/moapp/jylog"
-	_ "app.yhyue.com/moapp/jypkg/public"
 )
 
 func main() {

+ 14 - 6
src/jfw/modules/subscribepay/src/pay/aliPay.go

@@ -1,7 +1,7 @@
 package pay
 
 import (
-	"jy/src/jfw/modules/subscribepay/src/config"
+	qutil "app.yhyue.com/moapp/jybase/common"
 	"crypto"
 	"crypto/rsa"
 	"crypto/sha256"
@@ -9,10 +9,10 @@ import (
 	"encoding/json"
 	"fmt"
 	"io/ioutil"
+	"jy/src/jfw/modules/subscribepay/src/config"
 	"log"
 	"net/http"
 	"net/url"
-	qutil "app.yhyue.com/moapp/jybase/common"
 	"strings"
 	"time"
 )
@@ -37,6 +37,7 @@ type aliPayStruct struct {
 	Subject_areaPack          string          //省份流量包支付小标题
 	Subject_filePack          string          //附件下载包支付小标题
 	Subject_buyerPortraitPack string          //采购单位画像包支付小标题
+	Subject_docMember         string          //剑鱼文库会员支付小标题
 }
 
 var Alipay *aliPayStruct
@@ -73,6 +74,7 @@ func init() {
 		Subject_areaPack:          qutil.ObjToString(config.AliPayConf["Subject_areaPack"]),
 		Subject_filePack:          qutil.ObjToString(config.AliPayConf["Subject_filePack"]),
 		Subject_buyerPortraitPack: qutil.ObjToString(config.AliPayConf["Subject_buyerPortraitPack"]),
+		Subject_docMember:         qutil.ObjToString(config.AliPayConf["Subject_docMember"]),
 	}
 }
 
@@ -120,6 +122,10 @@ const (
 
 	ALI_BUYERPORTRAITPACK_APP    = "ALIB" //采购单位画像包 -app支付
 	ALI_BUYERPORTRAITPACK_NATIVE = "alib" //采购单位画像包 -pc支付
+
+	ALI_DOCMEMBER_APP    = "ALID" // 剑鱼文库会员-app支付
+	ALI_DOCMEMBER_NATIVE = "alid" //剑鱼文库会员 -pc支付
+
 )
 
 func (w *aliPayStruct) GetTradeno(tradenoSign string) (string, string) {
@@ -152,6 +158,8 @@ func (w *aliPayStruct) GetTradeno(tradenoSign string) (string, string) {
 		subject = w.Subject_filePack
 	} else if tradenoSign == ALI_BUYERPORTRAITPACK_APP || tradenoSign == ALI_BUYERPORTRAITPACK_NATIVE {
 		subject = w.Subject_buyerPortraitPack
+	} else if tradenoSign == ALI_DOCMEMBER_APP || tradenoSign == ALI_DOCMEMBER_NATIVE {
+		subject = w.Subject_docMember
 	}
 	lenRandom := 6 - len([]rune(tradenoSign)) //控制长度
 	tradeno = fmt.Sprintf("%s_%d%s%s", tradenoSign, time.Now().UnixNano(), qutil.GetRandom(lenRandom), qutil.GetLetterRandom(6))
@@ -159,7 +167,7 @@ func (w *aliPayStruct) GetTradeno(tradenoSign string) (string, string) {
 	return tradeno, subject
 }
 
-//获取网页支付二维码地址
+// 获取网页支付二维码地址
 func (a *aliPayStruct) GetOrderPayParam(order_money float64, tradenoSign string) (string, string, error) {
 	//测试环境,1分钱
 	if config.Config.AllPayMoney > 0 {
@@ -231,7 +239,7 @@ func (a *aliPayStruct) GetOrderPayParam(order_money float64, tradenoSign string)
 	}
 }
 
-//校验回调sign
+// 校验回调sign
 func (a *aliPayStruct) CheckCallBackSign(param, sign string) bool {
 	newHash := sha256.New()
 	newHash.Write([]byte(param))
@@ -252,7 +260,7 @@ func (a *aliPayStruct) CheckCallBackSign(param, sign string) bool {
 	return true
 }
 
-//支付宝支付统一HTTP调用接口
+// 支付宝支付统一HTTP调用接口
 func (a *aliPayStruct) DoRequest(content, tradeno, methodType string) (*map[string]interface{}, error) {
 	var data = url.Values{}
 	data.Add("app_id", Alipay.Appid)
@@ -286,7 +294,7 @@ func (a *aliPayStruct) DoRequest(content, tradeno, methodType string) (*map[stri
 	return &m, nil
 }
 
-//支付宝关闭订单(生成的订单二维码,未扫码无法关闭订单)
+// 支付宝关闭订单(生成的订单二维码,未扫码无法关闭订单)
 func (a *aliPayStruct) CloseOrder(tradeno string) bool {
 	toClose := struct {
 		OutTradeNo string `json:"out_trade_no"`

+ 11 - 3
src/jfw/modules/subscribepay/src/pay/util.go

@@ -1,7 +1,7 @@
 package pay
 
 import (
-	"app.yhyue.com/moapp/jypkg/public"
+	"app.yhyue.com/moapp/jypkg/common/src/qfw/util/jy"
 	"bytes"
 	"crypto"
 	"crypto/md5"
@@ -150,7 +150,14 @@ var (
 		"ali_app": ALI_BUYERPORTRAITPACK_APP,
 		"ali_pc":  ALI_BUYERPORTRAITPACK_NATIVE,
 	}
-
+	// 剑鱼文库会员
+	docMemberMap = map[string]string{
+		"wx_js":   WX_DOCMEMBER_JSAPI,
+		"wx_app":  WX_DOCMEMBER_APP,
+		"wx_pc":   WX_DOCMBER_NATIVE,
+		"ali_app": ALI_DOCMEMBER_APP,
+		"ali_pc":  ALI_DOCMEMBER_NATIVE,
+	}
 	PayWayAndSign = map[string]map[string]string{
 		"subvip":            vipMap,
 		"entniche":          entnicheMap,
@@ -180,6 +187,7 @@ var (
 		"省份订阅包":             areaPackMap,
 		"附件下载包":             filePackMap,
 		"采购单位画像包":           buyerPortraitPackMap,
+		"剑鱼文库会员":            docMemberMap,
 	}
 	varOrderCode *orderCode
 
@@ -342,7 +350,7 @@ func CloseOrder(tradeno, payWay string) bool {
 // 创建订单号
 func GetOrderCode(id ...string) string {
 	//2020-08-01之前的规则 fmt.Sprintf("%s%s", time.Now().Format("150405"), qutil.GetRandom(6))
-	return <-public.VarOrderCode.Pool
+	return <-jy.VarOrderCode.Pool
 }
 
 // 关闭订单

+ 17 - 9
src/jfw/modules/subscribepay/src/pay/wxPay.go

@@ -64,6 +64,10 @@ const (
 	WX_BUYERPORTRAITPACK_JSAPI  = "WJB" //采购单位画像包 微信js支付
 	WX_BUYERPORTRAITPACK_APP    = "WAB" //采购单位画像包 app微信支付
 	WX_BUYERPORTRAITPACK_NATIVE = "WPB" //采购单位画像包 微信pc支付
+
+	WX_DOCMEMBER_JSAPI = "WJD" //剑鱼文库会员 微信js支付
+	WX_DOCMEMBER_APP   = "WAD" //剑鱼文库会员 app微信支付
+	WX_DOCMBER_NATIVE  = "WPD" //剑鱼文库会员 微信pc支付
 )
 
 var WxStruct *WeixinStruct
@@ -91,6 +95,7 @@ type WeixinStruct struct {
 	AreaPack_msg          string
 	FilePack_msg          string
 	BuyerPortraitPack_msg string
+	DocMember_msg         string
 }
 
 func init() {
@@ -118,6 +123,7 @@ func init() {
 		AreaPack_msg:          util.ObjToString(payConfig["areaPack_msg"]),
 		FilePack_msg:          util.ObjToString(payConfig["filePack_msg"]),
 		BuyerPortraitPack_msg: util.ObjToString(payConfig["buyerPortraitPack_msg"]),
+		DocMember_msg:         util.ObjToString(payConfig["docMember_msg"]),
 	}
 }
 
@@ -128,7 +134,7 @@ func (w *WeixinStruct) GetTradeno(tp string) string {
 	return tradeno
 }
 
-//tradeno a:打赏 b:pc端数据导出 c:移动端微信数据导出 C:app数据导出  d:微信端数据报告 D:app端数据报告
+// tradeno a:打赏 b:pc端数据导出 c:移动端微信数据导出 C:app数据导出  d:微信端数据报告 D:app端数据报告
 func (w *WeixinStruct) CreatePrepayOrder(tradeno, ip, openid, detailmsg string, totalfee int) (string, *map[string]string) {
 	defer util.Catch()
 	//测试环境,1分钱
@@ -168,16 +174,18 @@ func (w *WeixinStruct) CreatePrepayOrder(tradeno, ip, openid, detailmsg string,
 		attachmsg, bodymsg, detailmsg = w.FilePack_msg, w.FilePack_msg, w.FilePack_msg
 	} else if tradeno == WX_BUYERPORTRAITPACK_APP || tradeno == WX_BUYERPORTRAITPACK_JSAPI || tradeno == WX_BUYERPORTRAITPACK_NATIVE {
 		attachmsg, bodymsg, detailmsg = w.BuyerPortraitPack_msg, w.BuyerPortraitPack_msg, w.BuyerPortraitPack_msg
+	} else if tradeno == WX_DOCMEMBER_APP || tradeno == WX_DOCMEMBER_JSAPI || tradeno == WX_DOCMBER_NATIVE {
+		attachmsg, bodymsg, detailmsg = w.DocMember_msg, w.DocMember_msg, w.DocMember_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 || tradeno == WX_COURSEONLINE_JSAPI || tradeno == WX_MEMBER_JSAPI || tradeno == WX_AIFORECASTPACK_JSAPI || tradeno == WX_BIDFILE_JSAPI || tradeno == WX_INTEGRAL_JSAPI || tradeno == WX_DATAPACK_JSAIP || tradeno == WX_AREAPACK_JSAPI || tradeno == WX_FILEPACK_JSAPI || tradeno == WX_BUYERPORTRAITPACK_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 || tradeno == WX_MEMBER_JSAPI || tradeno == WX_AIFORECASTPACK_JSAPI || tradeno == WX_BIDFILE_JSAPI || tradeno == WX_INTEGRAL_JSAPI || tradeno == WX_DATAPACK_JSAIP || tradeno == WX_AREAPACK_JSAPI || tradeno == WX_FILEPACK_JSAPI || tradeno == WX_BUYERPORTRAITPACK_JSAPI || tradeno == WX_DOCMEMBER_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 || tradeno == WX_COURSEONLINE_APP || tradeno == WX_MEMBER_APP || tradeno == WX_AIFORECASTPACK_APP || tradeno == WX_BIDFILE_APP || tradeno == WX_INTEGRAL_APP || tradeno == WX_DATAPACK_APP || tradeno == WX_AREAPACK_APP || tradeno == WX_FILEPACK_APP || tradeno == WX_BUYERPORTRAITPACK_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 || tradeno == WX_MEMBER_APP || tradeno == WX_AIFORECASTPACK_APP || tradeno == WX_BIDFILE_APP || tradeno == WX_INTEGRAL_APP || tradeno == WX_DATAPACK_APP || tradeno == WX_AREAPACK_APP || tradeno == WX_FILEPACK_APP || tradeno == WX_BUYERPORTRAITPACK_APP || tradeno == WX_DOCMEMBER_APP { //app支付
 		tradeType = "APP"
 		appid = w.Appid_app
-	} 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 || tradeno == WX_MEMBER_NATIVE || tradeno == WX_AIFORECASTPACK_NATIVE || tradeno == WX_BIDFILE_NATIVE || tradeno == WX_INTEGRAL_NATIVE || tradeno == WX_DATAPACK_NATIVE || tradeno == WX_AREAPACK_NATIVE || tradeno == WX_FILEPACK_NATIVE || tradeno == WX_BUYERPORTRAITPACK_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 || tradeno == WX_MEMBER_NATIVE || tradeno == WX_AIFORECASTPACK_NATIVE || tradeno == WX_BIDFILE_NATIVE || tradeno == WX_INTEGRAL_NATIVE || tradeno == WX_DATAPACK_NATIVE || tradeno == WX_AREAPACK_NATIVE || tradeno == WX_FILEPACK_NATIVE || tradeno == WX_BUYERPORTRAITPACK_NATIVE || tradeno == WX_DOCMBER_NATIVE { //扫码支付
 		tradeType = "NATIVE"
 	}
 	tradeno = w.GetTradeno(tradeno)
@@ -205,7 +213,7 @@ func (w *WeixinStruct) CreatePrepayOrder(tradeno, ip, openid, detailmsg string,
 	return tradeno, ret
 }
 
-//取得预生成订单编号,我们的系统要控制下,别订单重复了
+// 取得预生成订单编号,我们的系统要控制下,别订单重复了
 func (w *WeixinStruct) GetPrepayId(weixinrpc string, param map[string]string) (res *map[string]string, e error) {
 	util.Try(func() {
 		client, err := rpc.DialHTTP("tcp", weixinrpc)
@@ -227,7 +235,7 @@ func (w *WeixinStruct) GetPrepayId(weixinrpc string, param map[string]string) (r
 	return
 }
 
-//微信支付订单关闭
+// 微信支付订单关闭
 func (w *WeixinStruct) CloseOrder(tradeno, payWay string) (r bool) {
 	util.Try(func() {
 		client, err := rpc.DialHTTP("tcp", config.Config.Weixinrpc)
@@ -250,7 +258,7 @@ func (w *WeixinStruct) CloseOrder(tradeno, payWay string) (r bool) {
 	return r
 }
 
-//微信js支付获取支付参数
+// 微信js支付获取支付参数
 func (w *WeixinStruct) GetWxjsPaySign(prepayid string) string {
 	timestamp := time.Now().Unix()
 	nonceStr := util.GetRandom(16) + util.GetLetterRandom(16)
@@ -267,7 +275,7 @@ func (w *WeixinStruct) GetWxjsPaySign(prepayid string) string {
 	return string(byteArr)
 }
 
-//微信app支付 获取支付串
+// 微信app支付 获取支付串
 func (wx *WeixinStruct) GetAppWxPayStr(prepayid string) string {
 	data := struct {
 		XMLName    xml.Name `xml:"xml"`
@@ -296,7 +304,7 @@ func (wx *WeixinStruct) GetAppWxPayStr(prepayid string) string {
 	return string(byteArr)
 }
 
-//获取js支付参数(为方便存库返回string,前端需要转成json)
+// 获取js支付参数(为方便存库返回string,前端需要转成json)
 func GetWxJsPayStr(prepayid string) string {
 	//获取订单支付字符串
 	nonceStr := util.GetRandom(16) + util.GetLetterRandom(16)

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

@@ -22,7 +22,8 @@
       "dataPack_msg": "剑鱼标讯-数据包",
       "areaPack_msg": "剑鱼标讯-省份订阅包",
       "filePack_msg": "剑鱼标讯-附件下载包",
-      "buyerPortraitPack_msg": "剑鱼标讯-采购单位画像包"
+      "buyerPortraitPack_msg": "剑鱼标讯-采购单位画像包",
+      "docMember_msg": "剑鱼标讯-剑鱼文库会员"
     },
     "openidSwitch": {
       "oIMvJvrVXG89597EFmYiSiznbyyY": "oHwE_wEQlEBvjZJOyZeNnQcgKQMo",
@@ -55,7 +56,8 @@
     "privateKey": "-----BEGIN RSA PRIVATE KEY-----\nMIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQCaJnmz3N1Z43jxtmZJmPkInl3FbfudxjicThHj+Hkndp+muzZXlAPcWoYTFLAfVa6xg9xAc58fWTPUGOpouh0ZDEP8TGvD784AljDNwRXPI9+afjcxN8gzsNPlqA6KVkAu5u5uEI1HHQgtdyRoCEnXgQRXj6DqAs9olbx8HrTxHjZzjPd+HXv+v4na3zAvZsvPdhLB2ggpVW6uQN7ur8C+hVpB3ZO+gGVFHy3m1t08XgscljyOA9Vpk4T8TnKZqDvnI6ehWFCGeD11yoe3ipHJJdP/+u9/tXiKhm29mJvcM9C6gab6BOQABByQPb2nPFFyfPglbRYrYxgKp/eXUQTzAgMBAAECggEAO6BCVyZJoKlycNzC+Bjpy0Gmt+Vw/HheEWfJV8sW4gLqgk3MGVgxnhyN2/eWoKg96IA+w9d1Z2TTvWjd0yCafMPX0FGnJaUuo990hUH4s6UGqvXDV5BiKkxtylmVNkFilkHRXFWesDE0ppF9TZhXJ7rJ+Syfa6UmoSe6PrCKAPG4FD8MH1ODj5b42l/TRIFM948nTtTLFAFgd77P5ULBCKVfBB5V9XdKhLRdwG9RxugWwkxuCiMOtmk45DzA/PQgvkIzEViD/2NJX67/S88B0G63zdQizJrvxsLp9fThmjhlo/+CaF+a+nfIzg81TfQHlRuTjiYc7iE9n5K0sU82wQKBgQDydI9pEjkPH+ZEixEymdx8D4workBfa+GXgobJ2UwatqCJOCYqZJR0MhjTVeDJiiTGFiemNyZHT0WFQedAQ/O9mkRf0MRhzR6ZOiMnCG5pSSOKdmQXoqjOqcMzdgWBQRol0eLB/vto8M3bpt1VautR0qQOR7BrFsj57K3asofikQKBgQCiwwie5gyCAYB1gkp4QkLmQDSTJdZaTlzzx2oa2/ZB4Pg6wWWNJIxEfSwtuGVH4jGJl0Eer2YpHzaY7f2NfOWJCpNI/aRhM/RilQsFXTox/5bqlbAfspPMqSHnry2OgbZb9CRF3jH7kt65390SKde4A4JNE+jJ0Xb07Tzcr7+pQwKBgCDJ8KcWBs9r0flNEVtVgYLpm1vZDO2aqlySE2Zy0579OcK07Dxpc8YvDDpwb8DxxL1hO6V36d5U8yLtYbfIOMtYdIy8sAJF+jBgs2ZQ9pWYhYzxK+IiZk/kl3h7Ko1rX3zj4JW5xQhRIJXnACHQHtjm8rbXrR0ebLmX738XC9dxAoGAQfUDQ1E6dFyjb/syrnU7ow8VvyOwL7xd0rRW/TdyHdRLA5Rn0MCkzwRiqMx2zqCNLpLK4uJ1ZeiuOV8IRxP7+IL+mK+gs3tYZ7K6Wpwi/yvyPnIWg2Hcny1S/g5xSbSq76yKHn4ihy5Hb8+WSMwIDRvu68lLpq1ppWuWJGBcLP0CgYAnGtHlFY887zSI0aRdzV3EYm/sPnmYy0TWIUVLuGL8kkprcSIW2yRxx1GtpB+3A7cPu61WwRbiswJA6VmQHvn8f9ds81+aiO5KQLMk4MbrTwWhWLDpP4BxjWANVzPr19ZwmDJcYkh7YUI2iLqH7dXho5k62OYCM1T53xlql6HDcg==\n-----END RSA PRIVATE KEY-----",
     "callbackPublicKey": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEApSZbX3+05HWNQcl0vnJ3EQKhLvKDbUVYCgeYScVMOrFcofo28pfWwUNJ/Bzf1zmIsiMFHkhhQKWQQXRZpfs9ORNXnbmb6x/tnqKxu2sKQmictAQ2+tp0Ya1t+jA4SUCYo05x71mnoiUt0s3zDYXf7+Orgf4FQMfvsUI11L3oXc3OtgHhEbSOsQAwd7+dWMDJlNVAHnKgKqcL4+narS7v185lrnn28qIGUn2+QE3YuA5fNRl6TcL8pPjQ+SwPlSQFr7McqekH/JYvNmNirvouqSS7jyfgM8sLEhpra/plow/CXG0rAnKHL7wXzSZxK0TkwGjLt5vWX/Qb82INVk6ZSwIDAQAB",
     "Subject_filePack": "剑鱼标讯-附件下载包",
-    "Subject_buyerPortraitPack": "剑鱼标讯-采购单位画像包"
+    "Subject_buyerPortraitPack": "剑鱼标讯-采购单位画像包",
+    "Subject_docMember": "剑鱼标讯-剑鱼文库会员"
   },
   "payDebug": "1"
 }

+ 94 - 0
src/jfw/modules/subscribepay/src/service/docMember.go

@@ -0,0 +1,94 @@
+package service
+
+import (
+	qutil "app.yhyue.com/moapp/jybase/common"
+	"app.yhyue.com/moapp/jybase/go-xweb/xweb"
+	"errors"
+	"jy/src/jfw/modules/subscribepay/src/entity"
+	"jy/src/jfw/modules/subscribepay/src/util"
+	"log"
+	"time"
+)
+
+// 剑鱼文库会员
+type DocMember struct {
+	*xweb.Action
+	effectiveTime xweb.Mapper `xweb:"/docMember/effectiveTime"` //获取剑鱼文库会员有效时间
+}
+
+func init() {
+	xweb.AddAction(&DocMember{})
+}
+
+func (d *DocMember) EffectiveTime() {
+	userId := qutil.ObjToString(d.GetSession("userId"))
+	r := func() *entity.FuncResult {
+		if userId == "" {
+			return &entity.FuncResult{Err: errors.New("未登录")}
+		}
+		rData, vip, _ := entity.JyDocMember.GetDetail(userId)
+		if rData == nil || len(*rData) == 0 {
+			return &entity.FuncResult{Err: errors.New("获取信息失败")}
+		}
+		startTimeInt64 := time.Now().Unix()
+		endTimeInt64 := time.Now().Unix()
+		//续费
+		if vip {
+			if vipType := d.GetString("vipType"); vipType != "" {
+				//升级:开始日期为升级当日-结束日期为原服务结束日:"upgrade"
+				endTimeInt64 = qutil.Int64All((*rData)["l_doc_endtime"])
+				if vipType == "renew" {
+					//续费:开始日期为原服务结束日期的次日:"renew"
+					endTimeInt64 = qutil.Int64All((*rData)["l_doc_endtime"])
+					endTimeUnix := time.Unix(endTimeInt64, 0)
+					//当前服务结束次日0点开始
+					startTimeInt64 = time.Date(endTimeUnix.Year(), endTimeUnix.Month(), endTimeUnix.Day()+1, 0, 0, 0, 0, time.Local).Unix()
+					//endTimeUnix.AddDate(0, 0, 1).Unix() // qutil.Int64All((*rData)["l_vip_starttime"])
+				}
+			}
+		}
+		//startTimeStr := FormatDateByInt64(&startTimeInt64, Date_yyyyMMdd_Point)
+		endTimeUnix := time.Unix(endTimeInt64, 0)
+		//购买 、续费产品规格
+		addType, _ := d.GetInteger("addType") //时间类型;1:天;2:月;3:季度;4:年
+		addTime, _ := d.GetInteger("addTime") //时间长度
+		switch addType {
+		case 1:
+			endTimeUnix = endTimeUnix.AddDate(0, 0, addTime)
+		case 2:
+			endTimeUnix = endTimeUnix.AddDate(0, addTime, 0)
+		case 3:
+			endTimeUnix = endTimeUnix.AddDate(0, addTime*3, 0)
+		case 4:
+			endTimeUnix = endTimeUnix.AddDate(addTime, 0, 0)
+		}
+		//优惠券信息
+		lotteryId, _ := d.GetInteger("lotteryId") //卡卷信息的id
+		activityType, _ := d.GetInteger("activityType")
+		if lotteryId > 0 && activityType >= 0 {
+			//获取当前优惠券信息
+			lotteryInfo := util.LotteryInfoNew(lotteryId, activityType, userId)
+			if lotteryInfo != nil && lotteryInfo.TimeType > 0 {
+				//时间类型:1/天、2/月,3/年
+				switch lotteryInfo.TimeType {
+				case 1:
+					endTimeUnix = endTimeUnix.AddDate(0, 0, lotteryInfo.Time)
+				case 2:
+					endTimeUnix = endTimeUnix.AddDate(0, lotteryInfo.Time, 0)
+				case 3:
+					endTimeUnix = endTimeUnix.AddDate(lotteryInfo.Time, 0, 0)
+				}
+			}
+		}
+		//格式化 结束时间(改成时间戳)
+		//entTimeStr := FormatDate(&endTimeUnix, Date_yyyyMMdd_Point)
+		return &entity.FuncResult{Success: true, Data: map[string]interface{}{
+			"startTime": startTimeInt64,
+			"endTime":   endTimeUnix.Unix(),
+		}}
+	}()
+	if r.Err != nil {
+		log.Printf("%s GetSubBuyMsg err:%v\n", userId, r.Err.Error())
+	}
+	d.ServeJson(r.Format())
+}

+ 7 - 0
src/jfw/modules/subscribepay/src/service/orderListDetails.go

@@ -538,6 +538,9 @@ func (o *OrderListDetails) SetRes(res []map[string]interface{}, userId string) {
 		if pay_money != nil {
 			v["pay_money"] = float64(pay_money.(int64)) / 100
 		}
+		if v["product_type"] == entity.DocMemberProductName {
+			lastOrderMap = LastOrder(entity.DocMemberProductName, userId)
+		}
 		//最后一次够买的vip订单
 		for _, n := range lastOrderMap {
 			if n == order_code {
@@ -554,6 +557,10 @@ func (o *OrderListDetails) SetRes(res []map[string]interface{}, userId string) {
 				v["i_pp_status"] = qutil.IntAllDef((*ojy)["i_ppstatus"], 0) //i_pp_status : -1 到期  0未购买 1已购买
 			}
 		}
+		if v["pay_time"] != nil && (product_type == entity.DocMemberProductName) {
+			data := jy.GetBigVipUserBaseMsg(o.Session(), *config.Middleground)
+			v["i_doc_status"] = data.Data.Docs.Status
+		}
 		//
 		if v["pay_time"] != nil && v["product_type"] == "企业商机管理" {
 			if IsContain(ent_ordercode, qutil.ObjToString(v["order_code"])) {

+ 21 - 8
src/jfw/modules/subscribepay/src/service/payCallback.go

@@ -1,17 +1,17 @@
 package service
 
 import (
+	qutil "app.yhyue.com/moapp/jybase/common"
+	"app.yhyue.com/moapp/jybase/redis"
+	"fmt"
 	"jy/src/jfw/modules/subscribepay/src/config"
 	"jy/src/jfw/modules/subscribepay/src/entity"
-	"fmt"
+	"jy/src/jfw/modules/subscribepay/src/pay"
+	"jy/src/jfw/modules/subscribepay/src/util"
 	"log"
 	"net/url"
-	"jy/src/jfw/modules/subscribepay/src/pay"
-	qutil "app.yhyue.com/moapp/jybase/common"
-	"app.yhyue.com/moapp/jybase/redis"
 	"strings"
 	"time"
-	"jy/src/jfw/modules/subscribepay/src/util"
 
 	"app.yhyue.com/moapp/jybase/go-xweb/xweb"
 )
@@ -128,6 +128,10 @@ func (this *PayCallBackAction) TestPay() {
 		if entity.JyresoucePack.PayCallBack(thisParam) {
 			success = true
 		}
+	case entity.DocMemberProductName:
+		if entity.JyDocMember.PayCallBack(thisParam) {
+			success = true
+		}
 	default:
 		typeFlag = "未知类型"
 	}
@@ -138,14 +142,14 @@ func (this *PayCallBackAction) TestPay() {
 	}
 }
 
-//float元转分
+// float元转分
 func folat2int(f float64) int {
 	str := fmt.Sprintf("%.2f", f)
 	pos := strings.Index(str, ".")
 	return qutil.IntAll(str[:pos] + str[pos+1:])
 }
 
-//支付宝支付成功后回调
+// 支付宝支付成功后回调
 func (a *PayCallBackAction) AliPayCallback() {
 	checkSign := make(url.Values)
 	sign := a.GetForm().Get("sign") //待验证签名
@@ -244,6 +248,11 @@ func (a *PayCallBackAction) AliPayCallback() {
 				log.Printf("支付宝[附件下载|采购单位画像]包支付回调更新执行出错 %+v\n", thisParam)
 				return false
 			}
+		} else if strings.HasPrefix(outTradeno, pay.ALI_DOCMEMBER_APP) || strings.HasPrefix(outTradeno, pay.ALI_DOCMEMBER_NATIVE) { //剑鱼文库会员
+			if !entity.JyDocMember.PayCallBack(thisParam) {
+				log.Printf("支付宝剑鱼文库会员支付回调更新执行出错 %+v\n", thisParam)
+				return false
+			}
 		} else {
 			log.Printf("支付宝支付完成回调 未知订单类型%s\n", thisParam.OutTradeno)
 		}
@@ -260,7 +269,7 @@ func (a *PayCallBackAction) AliPayCallback() {
 	}
 }
 
-//微信支付成功后回调
+// 微信支付成功后回调
 func (p *PayCallBackAction) WxPayCallback() {
 	defer qutil.Catch()
 	by := p.Body()
@@ -347,6 +356,10 @@ func (p *PayCallBackAction) WxPayCallback() {
 			if update = entity.JyresoucePack.PayCallBack(thisParam); !update {
 				log.Printf("微信[附件下载|采购单位画像]包支付回调更新执行出错 %+v\n", thisParam)
 			}
+		} else if strings.HasPrefix(outTradeno, pay.WX_DOCMEMBER_APP) || strings.HasPrefix(outTradeno, pay.WX_DOCMEMBER_JSAPI) || strings.HasPrefix(outTradeno, pay.WX_DOCMBER_NATIVE) { // 剑鱼文库会员
+			if update = entity.JyDocMember.PayCallBack(thisParam); !update {
+				log.Printf("微信剑鱼文库会员支付回调更新执行出错 %+v\n", thisParam)
+			}
 		} else {
 			log.Printf("微信支付完成回调 未知订单类型%s\n", thisParam.OutTradeno)
 		}

+ 6 - 0
src/jfw/modules/subscribepay/src/test/http-client.env.json

@@ -0,0 +1,6 @@
+{
+  "dev": {
+    "addr": "http://127.0.0.1:86",
+    "session": "d6d16e5272466216cb3fb63c80f82cb2938a4e6c"
+  }
+}

+ 81 - 0
src/jfw/modules/subscribepay/src/test/p525.http

@@ -0,0 +1,81 @@
+# 获取文库会员有效日期-购买
+POST {{addr}}/subscribepay/docMember/effectiveTime
+Content-Type: application/x-www-form-urlencoded
+Cookie: SESSIONID={{session}};
+
+vipType=buy&addType=4&addTime=1
+
+###获取文库会员有效日期-续费
+POST {{addr}}/subscribepay/docMember/effectiveTime
+Content-Type: application/x-www-form-urlencoded
+Cookie: SESSIONID={{session}};
+
+vipType=renew&addType=4&addTime=1
+
+### 文库会员产品详情
+POST {{addr}}/jypay/commodity/detail
+Content-Type: application/json
+Cookie: SESSIONID={{session}};
+
+{
+  "spec": {
+    "orderType": 1
+  },
+  "id": 118,
+  "productType": "剑鱼文库会员"
+}
+
+
+### 文库会员创建订单-购买
+
+
+POST {{addr}}/jypay/common/createorder
+Content-Type: application/json
+Cookie: SESSIONID={{session}};
+
+{
+  "product": "剑鱼文库会员",
+  "productId": 1184,
+  "discountId": -1,
+  "lotteryId": -1,
+  "activityType": -1,
+  "data": {
+    "type": "firstBuy",
+    "time": "1年",
+    "orderType": 1,
+    "price": 22800,
+    "order_phone": "13938299083"
+  }
+}
+
+
+### 文库会员创建订单-续费
+POST {{addr}}/jypay/common/createorder
+Content-Type: application/json
+Cookie: SESSIONID={{session}};
+
+{
+  "product": "剑鱼文库会员",
+  "productId": 1182,
+  "activityType": 0,
+  "token": null,
+  "data": {
+    "type": "renew",
+    "time": "1个月",
+    "price": 2700,
+    "order_phone": "13938299083"
+  }
+}
+###
+POST {{addr}}/jypay/common/getPayParam?t=1716539013767
+Content-Type: application/x-www-form-urlencoded
+Cookie: SESSIONID={{session}};
+
+orderCode=261653386315&payway=wx_pc
+
+### 模拟支付
+POST  {{addr}}/jypay/callback/testPay
+Content-Type: application/x-www-form-urlencoded
+
+ordercode=261653386333
+

+ 2 - 2
src/jfw/modules/subscribepay/src/test/test.http

@@ -1,7 +1,7 @@
-POST  https://jybx-webtest.jydev.jianyu360.com/jypay/callback/testPay
+POST  http://127.0.0.1:86/jypay/callback/testPay
 Content-Type: application/x-www-form-urlencoded
 
-ordercode=261350527427
+ordercode=261688963281
 
 ###
 POST  https://jybx3-webtest.jydev.jianyu360.com/jyapi/jybx/base/checkSearchScreen

+ 21 - 20
src/jfw/modules/subscribepay/src/timetask.json

@@ -1,24 +1,25 @@
 {
-	"isRun":false,
-	"expireRemind": "10:00",
-	"syncVipUpgrade": "00:00",
-	"checkIsExpire": "00:00",
-	"unpaidRemind": {
-		"afterOrder": 7200,
-		"beforeExpire": 7200,
-		"remindDuration": 10,
-		"loadOrderDuration": 8,
-		"liveActiveAfterOrder": 3600,
-		"liveActiveAfterOrders": 86400
-	},
-	"courseTask": "00:00",
-	"memberExpire":"00:00",
-	"memberIsStart":"00:00",
-	"memberServiceIsExpire":"15:28",
-	"DataExportSendMailDuringMinute":1,
-	"updateDEStatus":"1h",
-	"provinceExpire":"00:00",
-	"updateTimeLimitActivityOrderStatus":"15s",
+  "isRun": true,
+  "expireRemind": "10:00",
+  "syncVipUpgrade": "00:00",
+  "checkIsExpire": "00:00",
+  "unpaidRemind": {
+    "afterOrder": 7200,
+    "beforeExpire": 7200,
+    "remindDuration": 10,
+    "loadOrderDuration": 8,
+    "liveActiveAfterOrder": 3600,
+    "liveActiveAfterOrders": 86400
+  },
+  "courseTask": "00:00",
+  "memberExpire": "00:00",
+  "memberIsStart": "00:00",
+  "memberServiceIsExpire": "15:28",
+  "DataExportSendMailDuringMinute": 1,
+  "updateDEStatus": "1h",
+  "provinceExpire": "00:00",
+  "updateTimeLimitActivityOrderStatus": "15s",
+  "checkDocMemberIsExpire": "00:00",
   "subVipTipDuring": [
     {"day": 7,"cycle": 90},
     {"day": 30,"cycle": 360},

+ 66 - 0
src/jfw/modules/subscribepay/src/timetask/timetask.go

@@ -36,6 +36,7 @@ func Run() {
 			go checkIsExpire(v)
 			go checkMemberIsExpire(v)
 			go updateProvincePackageStatus(v) //省份流量包
+			go checkDocMemberIsExpire(v)      // 剑鱼文库会员检查过期状态
 		}
 		go bigMemberExpireRemind()
 		go syncVipUpgrade()
@@ -1093,3 +1094,68 @@ func crontabByTicker(flag bool, c string, f func()) {
 		}
 	}(ticker)
 }
+
+func checkDocMemberIsExpire(iy Identity) {
+	crontab(true, TimeTaskConfig.CheckDocMemberIsExpire, func() {
+		defer qutil.Catch()
+		log.Println("定时任务,开始更新文库会员状态")
+		now_unix := time.Now().Unix()
+		sess := util.MQFW.GetMgoConn()
+		for {
+			if sess != nil {
+				defer util.MQFW.DestoryMongoConn(sess)
+				break
+			}
+			time.Sleep(time.Minute)
+			sess = util.MQFW.GetMgoConn()
+		}
+		query := iy.UserQuery()
+		query["i_doc_status"] = map[string]interface{}{
+			"$gt": 0,
+		}
+		query["l_doc_endtime"] = map[string]interface{}{
+			"$lte": now_unix,
+		}
+		count, err := sess.DB("qfw").C(iy.UserColl()).Find(query).Count()
+		log.Println("当前时间:", FormatDateByInt64(&now_unix, Date_Full_Layout), "数据总量:", count, "--err:", err)
+		var i int64 = 0
+		it := sess.DB("qfw").C(iy.UserColl()).Find(query).Select(iy.UserField(map[string]interface{}{"i_doc_status": 1, "l_doc_endtime": 1, "i_userid": 1, "i_entid": 1, "base_user_id": 1, "o_vipjy": 1})).Iter()
+		for m := make(map[string]interface{}); it.Next(&m); {
+			i++
+			_id := BsonIdToSId(m["_id"])
+			l_doc_endtime := qutil.Int64All(m["l_doc_endtime"])
+			i_doc_status := qutil.IntAll(m["i_doc_status"])
+			if l_doc_endtime <= now_unix {
+				ok := util.MQFW.UpdateById(iy.UserColl(), _id, map[string]interface{}{
+					"$set": map[string]interface{}{
+						"i_doc_status": -i_doc_status,
+					},
+				})
+				if !ok {
+					log.Println("用户:", _id, " 更新doc状态异常")
+				} else {
+					var (
+						identity   *pb.Identity
+						entUserId  = qutil.Int64All(m["i_userid"])
+						baseUserId = qutil.Int64All(m["base_user_id"])
+					)
+					if iy.UserColl() == CollEntUser {
+						identity = util.Compatible.Middleground.UserCenter.IdentityByEntUserId(entUserId)
+					} else {
+						identity = util.Compatible.Middleground.UserCenter.IdentityByUserId(baseUserId)
+					}
+					go config.Middleground.UserCenter.WorkDesktopClearUserInfo(pb.WorkDesktopClearUserInfoReq{
+						PositionId: strconv.Itoa(int(identity.PositionId)),
+						AppId:      "10000",
+					})
+				}
+				m = make(map[string]interface{})
+			}
+		}
+		if i != count {
+			log.Println("更新doc状态有异常,已处理:", i, "总量:", count)
+		}
+		log.Println("doc 已处理:", i, "总量:", count)
+		log.Println("定时任务,更新doc状态结束")
+	})
+}

+ 2 - 2
src/jfw/modules/weixin/src/go.mod

@@ -7,7 +7,7 @@ toolchain go1.22.4
 require (
 	app.yhyue.com/moapp/jybase v0.0.0-20240226084952-7e7b38ef8a66
 	app.yhyue.com/moapp/jylog v0.0.0-20230522075550-05d7230ca545
-	app.yhyue.com/moapp/jypkg v1.15.8-0.20240429101401-e9a346a1e7a0
+	app.yhyue.com/moapp/jypkg v1.21.5
 	bp.jydev.jianyu360.cn/BaseService/userCenter v1.2.16
 	github.com/SKatiyar/qr v0.0.0-20151201054752-25b6bdf44e67
 	github.com/gogf/gf/v2 v2.7.0
@@ -21,7 +21,7 @@ require (
 	app.yhyue.com/moapp/message v0.0.0-20231204024949-8c7145bfc161 // indirect
 	bp.jydev.jianyu360.cn/BaseService/entManageApplication v0.0.0-20231226074509-942d80dc34eb // indirect
 	bp.jydev.jianyu360.cn/BaseService/jyMicroservices v0.0.2 // indirect
-	bp.jydev.jianyu360.cn/BaseService/powerCheckCenter v0.0.0-20231222060155-36e225b61353 // indirect
+	bp.jydev.jianyu360.cn/BaseService/powerCheckCenter v0.0.0-20240603091545-83ceaad11e6b // indirect
 	bp.jydev.jianyu360.cn/BaseService/resourceCenter v0.1.3 // indirect
 	filippo.io/edwards25519 v1.1.0 // indirect
 	github.com/BurntSushi/toml v1.2.0 // indirect

+ 4 - 4
src/jfw/modules/weixin/src/go.sum

@@ -20,8 +20,8 @@ app.yhyue.com/moapp/jybase v0.0.0-20240226084952-7e7b38ef8a66/go.mod h1:XHNATN6t
 app.yhyue.com/moapp/jyfs v0.0.0-20231024061508-480c270480d4/go.mod h1:61hzZ3dZHXL28BNl8BOgZsvM2S5UVY5YFzOkEUPrSu4=
 app.yhyue.com/moapp/jylog v0.0.0-20230522075550-05d7230ca545 h1:+Lak4m1zgsigQloOsvp8AJ+0XeX/+PGp9QP550xlbBQ=
 app.yhyue.com/moapp/jylog v0.0.0-20230522075550-05d7230ca545/go.mod h1:uFrsdUBFbETiJlEmr4PtJWPsZlUpPj2bHQRhryu6ggk=
-app.yhyue.com/moapp/jypkg v1.15.8-0.20240429101401-e9a346a1e7a0 h1:a9vx1dXTwJpvMYCSvQMb6EskDRjnzpzGRMw8JfseGtw=
-app.yhyue.com/moapp/jypkg v1.15.8-0.20240429101401-e9a346a1e7a0/go.mod h1:b3+0Q50iZYNaiYn7yR9bIIvIEsPvSy5figX7riSi/n4=
+app.yhyue.com/moapp/jypkg v1.21.5 h1:maU7dRSMLAUB8GLDyQoS9BKKwiNAO+grTZwKj4sJphc=
+app.yhyue.com/moapp/jypkg v1.21.5/go.mod h1:wyJeNc8I9R5799tqch7n8SEZrB0s8nmNou0brBh91w4=
 app.yhyue.com/moapp/message v0.0.0-20231204024949-8c7145bfc161 h1:WGi4OEIoqw6NpNFGioUEBZnjK9aBa+xJqf/5WY+QyhM=
 app.yhyue.com/moapp/message v0.0.0-20231204024949-8c7145bfc161/go.mod h1:0Oj8SB4pVjdCLD28sy2zyM3hS0WHGpNuVcakLW43GmI=
 bp.jydev.jianyu360.cn/BP/jynsq v0.0.0-20220222052708-ebc43af90698/go.mod h1:ojo/AUH9Yr1wzarEjOaNMkj1Cet/9r8IgLyba64Z52E=
@@ -31,8 +31,8 @@ bp.jydev.jianyu360.cn/BaseService/gateway v0.0.0-20220419090715-88ddb32961be/go.
 bp.jydev.jianyu360.cn/BaseService/gateway v1.3.4/go.mod h1:BMLd/5wb3BIEGhnEgF9y1sJN9P5/Dw9kYsoiE9V8I9g=
 bp.jydev.jianyu360.cn/BaseService/jyMicroservices v0.0.2 h1:Qi8C7gZeR7+kjOtSl9ilR5HwbjCe8GO1RuotFb4+kFA=
 bp.jydev.jianyu360.cn/BaseService/jyMicroservices v0.0.2/go.mod h1:v8y7FCbkKEIRP4Ie9ZM8NtoRP+Fk4O3C1hnexNusYIQ=
-bp.jydev.jianyu360.cn/BaseService/powerCheckCenter v0.0.0-20231222060155-36e225b61353 h1:QnkyOQ0tHVaPmtYx0xcCKzwBrUEasWH+nQ3qVnD0XnI=
-bp.jydev.jianyu360.cn/BaseService/powerCheckCenter v0.0.0-20231222060155-36e225b61353/go.mod h1:rCCaOSWBYfQabf/yIvSVheSPtN2THnHeTl2J5/RrcuU=
+bp.jydev.jianyu360.cn/BaseService/powerCheckCenter v0.0.0-20240603091545-83ceaad11e6b h1:6f/if8nVoR89n7RbgFEniiUqt4QpqJNQX2kS2JJHDEM=
+bp.jydev.jianyu360.cn/BaseService/powerCheckCenter v0.0.0-20240603091545-83ceaad11e6b/go.mod h1:rCCaOSWBYfQabf/yIvSVheSPtN2THnHeTl2J5/RrcuU=
 bp.jydev.jianyu360.cn/BaseService/pushpkg v0.0.0-20230911091604-2faa31032743/go.mod h1:1SQIPPL5Ya5BzQdByFKtTkXrXTWBv+PDqWIhNknLnZw=
 bp.jydev.jianyu360.cn/BaseService/resourceCenter v0.0.0-20220418005748-8ba5d936dd53/go.mod h1:E5lcDI3k4FESLxiAetCfWQTq8qfpy9cv0yN1oKoEO34=
 bp.jydev.jianyu360.cn/BaseService/resourceCenter v0.0.0-20220419023723-0b32d4a41751/go.mod h1:6KL5LMEku83uRbre0W/bj5kXG2I6pJGBFtktmtp51yM=

+ 2 - 1
src/jfw/modules/weixin/src/service/usersource.go

@@ -18,9 +18,10 @@ func SaveUserSource(channelCode, userId, phone, ip string, state int, positionId
 		PositionId:       positionId,
 		Phone:            phone,
 		State:            state, //注册/登录标志 1:登录;2:注册
-		ChannelCode:      qutil.If(channelCode == "", fmt.Sprintf("%s%s", "jy_wx", qutil.If(state == 1, "_scan", "_sub")), channelCode).(string),
+		ChannelCode:      channelCode,
 		EncryptionUserId: encrypt.SE.EncodeString(userId),
 		CreateTime:       time.Now().Format(date.Date_Full_Layout),
+		LoginCode:        fmt.Sprintf("%s%s", "jy_wx", qutil.If(state == 1, "_scan", "_sub")),
 		LoginWay:         3,                                       //登录方式;1:手机号密码;2:手机号验证码;3:微信;4:手机号一键登录
 		Platform:         qutil.If(channelCode != "", 1, 2).(int), //登录端;1:PC;2:WX;3:APP;4:H5
 		Ip:               ip,

+ 18 - 25
src/jfw/modules/weixin/src/wx/wx.go

@@ -536,12 +536,18 @@ func Subscribe(w ResponseWriter, r *Request) {
 	if err != nil {
 		log.Println(fmt.Sprintf("关注结构化 err:%s", err.Error()))
 	}
-	RSource, CSource := "", ""
+	var (
+		RSource, CSource = "", ""
+		channelCode      string
+		ip               string
+	)
 	var pccodepre = ""
 	if len(infoData) > 0 && infoData["action"] != nil {
 		pccodepre = util.ObjToString(infoData["action"])
 		RSource = util.ObjToString(infoData["RSource"])
 		CSource = util.ObjToString(infoData["cookieSource"])
+		channelCode = util.ObjToString(infoData["channelCode"])
+		ip = util.ObjToString(infoData["Rip"])
 	}
 	//中转链接缓存redis
 	redisValue := redis.Get("other", fmt.Sprintf("SingleLogin_%s", openid))
@@ -693,7 +699,7 @@ func Subscribe(w ResponseWriter, r *Request) {
 	}
 	go saveSubscribe(openid, r.Event, r.EventKey, 1)
 	//P414 用注册登录资源收集
-	go SaveUserSource(source, openid, 2)
+	go SaveUserSource(channelCode, ip, openid, 2)
 	//P506
 	if text := service.KeyPhraseReply(openid, source, "sub"); text != "" {
 		w.ReplyText(text)
@@ -842,6 +848,10 @@ func ScanHandler(w ResponseWriter, r *Request) {
 		}
 		WxBind(ek, openid, w, user.UnionId)
 	}
+	var (
+		channelCode = ""
+		ip          = ""
+	)
 	//部分未关注用户通过点击菜单创建的用户 openid和unionid为空
 	m, b := tools.MQFW.FindOneByField("user", `{"s_m_openid":"`+openid+`","s_unionid":{"$ne":"`+openid+`"}}`, `{"_id":1,"s_headimage":1,"o_jy":1,"o_vipjy":1,"i_vip_status":1,"i_ts_guide":1,"s_nickname":1,"s_jyname":1}`)
 	if b {
@@ -861,6 +871,8 @@ func ScanHandler(w ResponseWriter, r *Request) {
 				pccodepre = util.ObjToString(infoData["action"])
 				RSource = util.ObjToString(infoData["RSource"])
 				CSource = util.ObjToString(infoData["cookieSource"])
+				channelCode = util.ObjToString(infoData["channelCode"])
+				ip = util.ObjToString(infoData["Rip"])
 			}
 		}
 		user, err := Mux.GetUserInfo(openid)
@@ -932,7 +944,7 @@ func ScanHandler(w ResponseWriter, r *Request) {
 		log.Println("scan-error,mongodb-conn-error")
 	}
 	//P414
-	go SaveUserSource(r.EventKey, openid, 1)
+	go SaveUserSource(channelCode, ip, openid, 1)
 	//P506
 	if text := service.KeyPhraseReply(openid, r.EventKey, "scan"); text != "" {
 		w.ReplyText(text)
@@ -940,29 +952,10 @@ func ScanHandler(w ResponseWriter, r *Request) {
 }
 
 // SaveUserSource state 1:扫码 2:关注
-func SaveUserSource(erCode, openid string, state int) {
+func SaveUserSource(channelCode, ip, openid string, state int) {
 	if openid != "" {
-		channelCode := ""
-		ip := ""
-		if erCode != "" {
-			userData := redis.Get("sso", "p_shareData_"+erCode)
-			if userData != nil {
-				infoData := map[string]interface{}{}
-				tmp, err := json.Marshal(userData)
-				if err == nil {
-					if err = json.Unmarshal(tmp, &infoData); err == nil {
-						channelCode = util.ObjToString(infoData["channelCode"])
-						ip = util.ObjToString(infoData["Rip"])
-					} else {
-						log.Println("序列化异常 infoData")
-					}
-				} else {
-					log.Println("序列化异常 userData")
-				}
-			}
-		}
-		if strings.Contains(channelCode, "JyChCoop") && state == 2 { //关注后 注册信息 更新
-			tools.MQFW.Update("user", "{'s_m_openid':'"+openid+"'}", &map[string]interface{}{"$set": &map[string]interface{}{"s_sourceid": channelCode}}, false, false)
+		if channelCode != "" && state == 2 { //关注后 注册信息 更新
+			tools.MQFW.Update("user", "{'s_m_openid':'"+openid+"'}", &map[string]interface{}{"$set": &map[string]interface{}{"s_sourceid": channelCode, "s_rsource": channelCode}}, false, false)
 		}
 		time.Sleep(userCTS)
 		userId, phone, positionId := FindUserId(openid)

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

@@ -29,7 +29,7 @@ func RedisInfo(oid, action, sione, sitwo string, i int, hsn *httpsession.Session
 	}
 	userData := make(map[string]interface{})
 	//P414
-	channelCode := "jy_pc_wx"
+	channelCode := ""
 	ccVal, ckErr := hrt.Cookie(jy.ChannelCookieName)
 	if ckErr == nil {
 		channelCode = ccVal.Value

BIN
src/web/staticres/common-module/exhibition/img/qr-code-shichang.png


BIN
src/web/staticres/common-module/order-list/image/docVip.png


+ 166 - 1
src/web/staticres/common-module/order-list/js/order-detail.js

@@ -336,6 +336,9 @@ var vm = new Vue({
         discountPrice = utils.formatMoney(order.discount_price / 100)
         discountPrice = '-¥' + discountPrice
       }
+      if (order.product_type === '剑鱼文库会员' && order.vip_type === 1) {
+        order.product_type = order.product_type + '(续费)'
+      }
 
       var infoList = [
         {
@@ -377,7 +380,7 @@ var vm = new Vue({
         {
           label: '实付金额',
           split: ':',
-          text: (order.pay_money > 0||filterObj.badge=="exchange") ? '¥' + this.moneyFormat(order.pay_money) : ''
+          text: (order.pay_money >= 0||filterObj.badge=="exchange") && order.order_status === 1 ? '¥' + this.moneyFormat(order.pay_money) : ''
         },
         {
           label: '产品类型',
@@ -531,6 +534,10 @@ var vm = new Vue({
           infoList = this.getDataFileInfo(order)
           break
         }
+        case '剑鱼文库会员': {
+          infoList = this.getDocMemberInfo(order)
+          break
+        }
         default: {
           break
         }
@@ -749,6 +756,164 @@ var vm = new Vue({
         text: filterInfo.remark
       }
       return [numInfo]
+    },
+     // 剑鱼文库会员订单卡片信息整理
+     getDocMemberInfo: function (order) {
+      var filterInfo = JSON.parse(order.filter)
+      var info = this.formatDocMemberInfo(order)
+      // var prodType = {
+      //   label: '产品类型',
+      //   split: ':',
+      //   text: order.product_type
+      // }
+      var buyCycle = {
+        label: '购买周期',
+        split: ':',
+        text: info.duration
+      }
+      var date = {
+        label: '有效日期至',
+        split: ':',
+        text: order.vip_endtime ? new Date(order.vip_endtime.replace(/(\.|-)/g, '/')).pattern('yyyy-MM-dd') : '-'
+      }
+      if(order.vip_type === 1){
+        buyCycle.label="续费周期"
+      }
+      if (filterInfo.give_cycle) {
+        buyCycle.text += this.calcGiveInfoHTML(filterInfo)
+      }
+      // 未完成订单不展示有效期
+      if (order.order_status !== 1) {
+        return [buyCycle]
+      }
+      return [buyCycle, date]
+    },
+    formatDocMemberInfo: function (order) {
+      var filter_vip = JSON.parse(order.filter)
+      var vip_type = order.vip_type
+      // 计算购买续费周期
+      var cyclecount_vip = filter_vip.cyclecount	// 时长
+      var cycleunit_vip = filter_vip.cycleunit // 单位 1:年 2:月 3:天
+
+      if (!vip_type) {
+        // 购买周期
+        var effectiveduration_vip = ''
+        if (order.vip_starttime && order.vip_endtime) {
+          var start_time_vip = order.vip_starttime
+          var end_time_vip = order.vip_endtime
+          var start_time_arr = start_time_vip.split(" ")[0].split("-")
+          var end_time_arr = end_time_vip.split(" ")[0].split("-")
+          var start_year = start_time_arr[0]
+          var start_month = start_time_arr[1]
+          var end_year = end_time_arr[0]
+          var end_month = end_time_arr[1]
+
+          var year = 0
+          var month = 0
+          if (end_year > start_year) {
+            if (end_month > start_month) {
+              year = end_year - start_year;
+              month = end_month - start_month;
+            } else {
+              year = end_year - start_year - 1
+              month = 12 + Number(end_month) - start_month;
+              if (month === 12) {
+                year = Number(year) + 1
+                month = 0
+              }
+            }
+          } else if (end_year === start_year) {
+            month = end_month - start_month;
+          }
+
+          if (year !== 0 && month !== 0) {
+            effectiveduration_vip = year + "年" + month + "个月"
+          } else if (year !== 0 && month === 0) {
+            effectiveduration_vip = year + "年"
+          } else if (year === 0 && month !== 0) {
+            effectiveduration_vip = month + "个月"
+          }
+
+          if (cycleunit_vip === 3) {
+            effectiveduration_vip = cyclecount_vip + "天"
+          } else if (cycleunit_vip === 4) {
+            effectiveduration_vip = cyclecount_vip + "季"
+          }
+        } else {
+          if (cycleunit_vip === 1) {
+            effectiveduration_vip = cyclecount_vip + "年"
+          } else if (cycleunit_vip === 2) {
+            effectiveduration_vip = cyclecount_vip + "个月"
+          } else if (cycleunit_vip === 3) {
+            effectiveduration_vip = cyclecount_vip + "天"
+          } else if (cycleunit_vip === 4) {
+            effectiveduration_vip = cyclecount_vip + "季"
+          }
+        }
+      } else if (vip_type === 1) {
+        // 续费周期
+        var effectiveduration_vip = ""
+        if (order.vip_starttime && order.vip_endtime) {
+          var start_time_vip = order.vip_starttime;
+          var end_time_vip = order.vip_endtime;
+          var start_time_arr = start_time_vip.split(" ")[0].split("-")
+          var end_time_arr = end_time_vip.split(" ")[0].split("-")
+          var start_year = start_time_arr[0];
+          var start_month = start_time_arr[1];
+          var end_year = end_time_arr[0];
+          var end_month = end_time_arr[1];
+
+          var year = 0;
+          var month = 0;
+          if (end_year > start_year) {
+            if (end_month > start_month) {
+              year = end_year - start_year;
+              month = end_month - start_month;
+            } else {
+              year = end_year - start_year - 1;
+              month = 12 + Number(end_month) - start_month;
+              if (month === 12) {
+                year = Number(year) + 1;
+                month = 0;
+              }
+            }
+          } else if (end_year === start_year) {
+            month = end_month - start_month;
+          }
+
+          if (year !== 0 && month !== 0) {
+            effectiveduration_vip = year + "年" + month + "个月";
+          } else if (year !== 0 && month === 0) {
+            effectiveduration_vip = year + "年";
+          } else if (year === 0 && month !== 0) {
+            effectiveduration_vip = month + "个月";
+          }
+          //试用用户生成订单 周期
+          if (cycleunit_vip === 1) {
+            effectiveduration_vip = cyclecount_vip + "年";
+          } else if (cycleunit_vip === 2) {
+            effectiveduration_vip = cyclecount_vip + "个月"
+          } else if (cycleunit_vip === 3) {
+            effectiveduration_vip = cyclecount_vip + "天";
+          } else if (cycleunit_vip === 4) {
+            effectiveduration_vip = cyclecount_vip + "季";
+          }
+        } else {
+          if (cycleunit_vip === 1) {
+            effectiveduration_vip = cyclecount_vip + "年";
+          } else if (cycleunit_vip === 2) {
+            effectiveduration_vip = cyclecount_vip + "个月"
+          } else if (cycleunit_vip === 3) {
+            effectiveduration_vip = cyclecount_vip + "天";
+          } else if (cycleunit_vip === 4) {
+            effectiveduration_vip = cyclecount_vip + "季";
+          }
+        }
+      }
+
+      return {
+        duration: effectiveduration_vip
+      }
     },
     goToLink: function (href) {
       location.href = href

+ 27 - 3
src/web/staticres/common-module/order-list/js/order-list-config.js

@@ -10,7 +10,8 @@ var assetsConf = {
     '附件下载包': 'filePackLink',
     '采购单位画像包': 'buyerPortraitPackLink',
     '数据文件': 'dataFileLink',
-    '医械通': 'medicalLink'
+    '医械通': 'medicalLink',
+    '剑鱼文库会员': 'docMemberLink'
   },
   // 产品集合
   productionTypeList: [
@@ -31,7 +32,8 @@ var assetsConf = {
     '附件下载包',
     '省份订阅包',
     '采购单位画像包',
-    '数据文件'
+    '数据文件',
+    '剑鱼文库会员'
   ],
   // 支持再次购买的产品集合
   canBuyAgainProductions: [
@@ -57,7 +59,8 @@ var assetsConf = {
     '数据流量包',
     '附件下载包',
     '省份订阅包',
-    '采购单位画像包'
+    '采购单位画像包',
+    '剑鱼文库会员'
   ],
   init: function () {
     // this.getPlatform()
@@ -469,6 +472,27 @@ var assetsConf = {
         app: '/common-module/order-list/image/dataFile.png'
       }
     }
+  },
+  // 剑鱼文库会员
+  docMemberLink: {
+    pay: {
+      wx: '/weixin/pay/checkout_docMember',
+      app: '/jyapp/pay/checkout_docMember'
+    },
+    renew: {
+      wx: '/jy_mobile/order/create/docsvip',
+      app: '/jy_mobile/order/create/docsvip'
+    },
+    orderDetail: {
+      wx: '/weixin/common/docMember/orderDetail',
+      app: '/jyapp/common/docMember/orderDetail'
+    },
+    imgMap: {
+      headerImg: {
+        wx: '/common-module/order-list/image/docVip.png',
+        app: '/common-module/order-list/image/docVip.png'
+      }
+    }
   }
 }
 

+ 212 - 0
src/web/staticres/common-module/order-list/js/order-list.js

@@ -790,6 +790,16 @@ var vm = new Vue({
           }
           break
         }
+        case '剑鱼文库会员': {
+          try {
+            info.contentImgUrl = assetsConf.docMemberLink.imgMap.headerImg[platform]
+            info.contentList = this.getDocMemberInfo(order)
+          } catch (error) {
+            info.contentList = []
+            console.log(error)
+          }
+          break
+        }
         default: {
           console.log('没有找到商品类型: ' + productType)
           break
@@ -981,6 +991,28 @@ var vm = new Vue({
           }
           break
         }
+        case '剑鱼文库会员': {
+          if (orderStatus === 1) {
+            // 1. 开发票的判断
+            // 2. 续费的判断(再次购买按钮值修改)
+            var vipStatus = order.i_doc_status
+            var way = order.pay_way
+            if (vipStatus === -1) {
+              // 查看发票+再次购买
+              state.bugAgainShow = true
+              state.bugAgainText = '再次购买'
+              // 按钮状态:1续费 2再次购买
+              state.buyState = 2
+            } else if (vipStatus === 1) {
+              state.bugAgainShow = true
+              state.bugAgainText = '续费'
+              state.buyState = 1
+            } else {
+              state.bugAgainShow = false
+            }
+          }
+          break
+        }
         default: {
           break
         }
@@ -1243,6 +1275,14 @@ var vm = new Vue({
           }
           break
         }
+        case '剑鱼文库会员': {
+          var vipType = order.vip_type || 0
+          var href = assetsConf.docMemberLink.pay[platform]
+          if (href) {
+            this.goToLink(`${href}?orderCode=${orderCode}&t=${vipType}`)
+          }
+          break
+        }
         default: {
           break
         }
@@ -1371,6 +1411,13 @@ var vm = new Vue({
           }
           break
         }
+        case '剑鱼文库会员': {
+          var href = assetsConf.docMemberLink.renew[platform]
+          if (href) {
+            this.goToLink(`${href}?orderCode=${orderCode}&type=renew`)
+          }
+          break
+        }
         default: {
           break
         }
@@ -1531,6 +1578,13 @@ var vm = new Vue({
           }
           break
         }
+        case '剑鱼文库会员': {
+          var href = assetsConf.docMemberLink.orderDetail[platform]
+          if (href) {
+            goToFn(`${href}?order_code=${orderCode}`)
+          }
+          break
+        }
         default: {
           break
         }
@@ -2822,6 +2876,164 @@ var vm = new Vue({
       var result = [prodType]
       return result
     },
+    // 剑鱼文库会员订单卡片信息整理
+    getDocMemberInfo: function (order) {
+      var filterInfo = JSON.parse(order.filter)
+      var info = this.formatDocMemberInfo(order)
+      var prodType = {
+        label: '产品类型',
+        split: ':',
+        text: order.vip_type === 1 ? order.product_type + '(续费)' : order.product_type
+      }
+      var buyCycle = {
+        label: '购买周期',
+        split: ':',
+        text: info.duration
+      }
+      var date = {
+        label: '有效日期至',
+        split: ':',
+        text: order.vip_endtime ? new Date(order.vip_endtime.replace(/(\.|-)/g, '/')).pattern('yyyy-MM-dd') : '-'
+      }
+      if(order.vip_type === 1){
+        buyCycle.label="续费周期"
+      }
+      if (filterInfo.give_cycle) {
+        buyCycle.text += this.calcGiveInfoHTML(filterInfo)
+      }
+      // 未完成订单不展示有效期
+      if (order.order_status !== 1) {
+        return [prodType, buyCycle]
+      }
+      return [prodType, buyCycle, date]
+    },
+    formatDocMemberInfo: function (order) {
+      var filter_vip = JSON.parse(order.filter)
+      var vip_type = order.vip_type
+      // 计算购买续费周期
+      var cyclecount_vip = filter_vip.cyclecount	// 时长
+      var cycleunit_vip = filter_vip.cycleunit // 单位 1:年 2:月 3:天
+
+      if (!vip_type) {
+        // 购买周期
+        var effectiveduration_vip = ''
+        if (order.vip_starttime && order.vip_endtime) {
+          var start_time_vip = order.vip_starttime
+          var end_time_vip = order.vip_endtime
+          var start_time_arr = start_time_vip.split(" ")[0].split("-")
+          var end_time_arr = end_time_vip.split(" ")[0].split("-")
+          var start_year = start_time_arr[0]
+          var start_month = start_time_arr[1]
+          var end_year = end_time_arr[0]
+          var end_month = end_time_arr[1]
+
+          var year = 0
+          var month = 0
+          if (end_year > start_year) {
+            if (end_month > start_month) {
+              year = end_year - start_year;
+              month = end_month - start_month;
+            } else {
+              year = end_year - start_year - 1
+              month = 12 + Number(end_month) - start_month;
+              if (month === 12) {
+                year = Number(year) + 1
+                month = 0
+              }
+            }
+          } else if (end_year === start_year) {
+            month = end_month - start_month;
+          }
+
+          if (year !== 0 && month !== 0) {
+            effectiveduration_vip = year + "年" + month + "个月"
+          } else if (year !== 0 && month === 0) {
+            effectiveduration_vip = year + "年"
+          } else if (year === 0 && month !== 0) {
+            effectiveduration_vip = month + "个月"
+          }
+
+          if (cycleunit_vip === 3) {
+            effectiveduration_vip = cyclecount_vip + "天"
+          } else if (cycleunit_vip === 4) {
+            effectiveduration_vip = cyclecount_vip + "季"
+          }
+        } else {
+          if (cycleunit_vip === 1) {
+            effectiveduration_vip = cyclecount_vip + "年"
+          } else if (cycleunit_vip === 2) {
+            effectiveduration_vip = cyclecount_vip + "个月"
+          } else if (cycleunit_vip === 3) {
+            effectiveduration_vip = cyclecount_vip + "天"
+          } else if (cycleunit_vip === 4) {
+            effectiveduration_vip = cyclecount_vip + "季"
+          }
+        }
+      } else if (vip_type === 1) {
+        // 续费周期
+        var effectiveduration_vip = ""
+        if (order.vip_starttime && order.vip_endtime) {
+          var start_time_vip = order.vip_starttime;
+          var end_time_vip = order.vip_endtime;
+          var start_time_arr = start_time_vip.split(" ")[0].split("-")
+          var end_time_arr = end_time_vip.split(" ")[0].split("-")
+          var start_year = start_time_arr[0];
+          var start_month = start_time_arr[1];
+          var end_year = end_time_arr[0];
+          var end_month = end_time_arr[1];
+
+          var year = 0;
+          var month = 0;
+          if (end_year > start_year) {
+            if (end_month > start_month) {
+              year = end_year - start_year;
+              month = end_month - start_month;
+            } else {
+              year = end_year - start_year - 1;
+              month = 12 + Number(end_month) - start_month;
+              if (month === 12) {
+                year = Number(year) + 1;
+                month = 0;
+              }
+            }
+          } else if (end_year === start_year) {
+            month = end_month - start_month;
+          }
+
+          if (year !== 0 && month !== 0) {
+            effectiveduration_vip = year + "年" + month + "个月";
+          } else if (year !== 0 && month === 0) {
+            effectiveduration_vip = year + "年";
+          } else if (year === 0 && month !== 0) {
+            effectiveduration_vip = month + "个月";
+          }
+          //试用用户生成订单 周期
+          if (cycleunit_vip === 1) {
+            effectiveduration_vip = cyclecount_vip + "年";
+          } else if (cycleunit_vip === 2) {
+            effectiveduration_vip = cyclecount_vip + "个月"
+          } else if (cycleunit_vip === 3) {
+            effectiveduration_vip = cyclecount_vip + "天";
+          } else if (cycleunit_vip === 4) {
+            effectiveduration_vip = cyclecount_vip + "季";
+          }
+        } else {
+          if (cycleunit_vip === 1) {
+            effectiveduration_vip = cyclecount_vip + "年";
+          } else if (cycleunit_vip === 2) {
+            effectiveduration_vip = cyclecount_vip + "个月"
+          } else if (cycleunit_vip === 3) {
+            effectiveduration_vip = cyclecount_vip + "天";
+          } else if (cycleunit_vip === 4) {
+            effectiveduration_vip = cyclecount_vip + "季";
+          }
+        }
+      }
+
+      return {
+        duration: effectiveduration_vip
+      }
+    },
     calcGiveInfoHTML: function (filterInfo) {
       var giveHTML = ''
       if (!filterInfo.give_cycle) return giveHTML

+ 7 - 0
src/web/staticres/common-module/pc-dialog/js/pc-collect-user-info.js

@@ -447,6 +447,7 @@ var vm = new Vue({
         'pc_briefinghomepage_dzhfxbg': '帮您透视行业,轻松把握行业核心需求',
         'pc_briefinglist_dzhfxbg': '帮您透视行业,轻松把握行业核心需求',
         'pc_briefingdetails_dzhfxbg': '帮您透视行业,轻松把握行业核心需求',
+        'pc_Library_details_free': '此文档为剑鱼文库的付费下载内容,提交资料后可免费下载。'
       },
       isRefresh: false, // 留完资是否需要刷新页面
       sourceDescMap: {
@@ -537,6 +538,9 @@ var vm = new Vue({
         if (this.source === 'pc_briefinghomepage_dzhfxbg' || this.source === 'pc_briefinglist_dzhfxbg' || this.source === 'pc_briefingdetails_dzhfxbg') {
           return '我们会快马加鞭的与您联系,请您保持电话畅通。'
         }
+        if (this.source === 'pc_Library_details_free') {
+          return '请返回文档页面免费下载,如需获取更多文档,请开通剑鱼文库会员。'
+        }
         return '我们会尽快联系您并预约演示时间,请耐心等待~<br>您将获得免费体验大会员全部功能!'
       }
     }
@@ -633,6 +637,9 @@ var vm = new Vue({
         } else if (source === 'pc_briefinghomepage_dzhfxbg' || source === 'pc_briefinglist_dzhfxbg' || source === 'pc_briefingdetails_dzhfxbg') {
           this.dialogTitle = text
           this.dialogTitleTop = '免费获取行业分析报告'
+        } else if (source === 'pc_Library_details_free') {
+          this.dialogTitle = text
+          this.dialogTitleTop = '申请免费下载文档'
         }
         // else if (source.indexOf("article_collection") > -1){
         //   this.dialogTitle = text

Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 0 - 0
src/web/staticres/common-module/pc-dialog/js/pc-collect-user-info.min.js


+ 20 - 0
src/web/staticres/common-module/perfect-info/js/perfect-info.js

@@ -163,6 +163,10 @@ var titleMap = {
   app_article_CustomerRecommend: '申请客户推荐权限',
   wx_article_CustomerRecommend: '申请客户推荐权限',
   h5_article_CustomerRecommend: '申请客户推荐权限',
+  // 文库
+  h5_library_details_free: '申请免费下载文档',
+  app_library_details_free: '申请免费下载文档',
+  wx_library_details_free: '申请免费下载文档'
 }
 
 // tip
@@ -368,6 +372,10 @@ var tipMap = {
   app_article_CustomerRecommend: '请升级大会员,为您推荐潜在业务需求客户并提供联系方式。',
   wx_article_CustomerRecommend: '请升级大会员,为您推荐潜在业务需求客户并提供联系方式。',
   h5_article_CustomerRecommend: '请升级大会员,为您推荐潜在业务需求客户并提供联系方式。',
+    // 文库
+  h5_library_details_free: '此文档为剑鱼文库的付费下载内容,提交资料后可免费下载。',
+  app_library_details_free: '此文档为剑鱼文库的付费下载内容,提交资料后可免费下载。',
+  wx_library_details_free: '此文档为剑鱼文库的付费下载内容,提交资料后可免费下载。'
 }
 
 // 留资来源(数据库新增字段,记录留资对应的来源,之前未记录的不考虑,新增的source要记录)
@@ -478,6 +486,10 @@ var sourceDescMap = {
   app_article_cqxmmore: '标讯详情页-申请查看更多超前项目',
   wx_article_cqxmmore: '标讯详情页-申请查看更多超前项目',
   h5_article_cqxmmore: '标讯详情页-申请查看更多超前项目',
+      // 文库
+  h5_library_details_free: '剑鱼文库-免费下载文档',
+  app_library_details_free: '剑鱼文库-免费下载文档',
+  wx_library_details_free: '剑鱼文库-免费下载文档'
 }
 
 var vNode = {
@@ -1660,6 +1672,14 @@ var vNode = {
                  },'提交成功')
                   break
                 }
+                case 'h5_library_details_free':
+                case 'app_library_details_free':
+                case 'wx_library_details_free':{
+                    _this.showMessage('请返回文档页面免费下载,如需获取更多文档,请开通剑鱼文库会员。', '我知道了', function () {
+                      history.back()
+                    },'提交成功')
+                    break
+              }    // 文库
               default: {
                 var biaoshu = source === 'bid_document_Introduction_page' || source.indexOf('article_BidPreparation') > -1
                 // 标书制作或者三方认证(case语句满足不了条件,放default中做更多判断)

BIN
src/web/staticres/frontRouter/pc/cooperation/img/qr.png


BIN
src/web/staticres/images/pc/doc-error.png


BIN
src/web/staticres/images/pc/excel.png


BIN
src/web/staticres/images/pc/pdf.png


BIN
src/web/staticres/images/pc/ppt.png


BIN
src/web/staticres/images/pc/txt.png


BIN
src/web/staticres/images/pc/word.png


+ 23 - 0
src/web/staticres/js/index/index_2023.12.js

@@ -166,6 +166,8 @@ var _page = {
     this.initBiddingDescTab()
     this.initImportantGovTab()
     this.initHotIndustrySearch()
+    this.initDocsDescTab()
+    this.docImgClick()
   },
   // 计算九宫格高度
   initUserInfoCard: function () {
@@ -360,6 +362,27 @@ var _page = {
       return domList[0]
     }
   },
+  initDocsDescTab: function () {
+    var tabWrapper = $('.doc-desc-module')
+    tabWrapper.find('.bidding-desc-item').on('click', function () {
+      var index = $(this).attr('data-index')
+      $(this).addClass('active').siblings().removeClass('active')
+      tabWrapper.find('.doc-content-card-list[data-index='+ index +']').show().siblings().hide()
+    })
+    tabWrapper.find('.bidding-desc-item:eq(0)').trigger('click')
+    tabWrapper.find('.doc-card-list-item-title').each(function() {
+      var text = $(this).text().replace('&#40;','(').replace('&#41;',')')
+      $(this).text(text)
+    })
+  },
+  // 处理文库图片点击也可跳转(不能用a标签包裹,搜索引擎会识别a标签内不是文字,也不能用行内onclick事件,不能绑定自定义属性)
+  docImgClick: function() {
+    var $img = $('.doc-card-list-item .doc-main-img')
+    $img.click(function() {
+      var href = $(this).parents().siblings('a').attr('href')
+      window.open(href)
+    })
+  }
 }
 
 $(function () {

+ 6 - 0
src/web/staticres/js/login.js

@@ -2177,6 +2177,12 @@ function openLoginDig(type, redirectUrl,Logincallback) {
         // if (location.pathname === '/') {
         //   return location.reload()
         // }
+        // p525 如果是豆丁过来的 跳转到工作桌面
+        let partner = getParam("partner")
+        if (partner) {
+          location.href = '/page_workDesktop/'
+          return
+        }
         if (redirectUrl === 'reload') {
           return location.reload()
         }

+ 106 - 2
src/web/staticres/pccss/index_pc.css

@@ -179,6 +179,110 @@
     color: #999;
 }
 
+
+.doc-desc-module .service-module-content-bd {
+  margin-top: 20px;
+  padding: 10px 0 16px;
+  width: 100%;
+  height: 176px;
+}
+
+.doc-desc-module .bidding-desc-content-card-list {
+  width: 100%;
+  max-width: 892px;
+}
+
+.doc-desc-module .bidding-desc-content-card-list .cms-card-list-item {
+  margin-right: 40px;
+  margin-bottom: 8px;
+  width: 30%;
+}
+
+.doc-desc-module .bidding-desc-content-card-list .cms-card-list-item:nth-of-type(3n) {
+  margin-right: 0;
+}
+
+.doc-desc-module .bidding-desc-module-content .bidding-desc-item:not(:last-of-type) {
+  margin-right: 20px;
+}
+.doc-desc-module .doc-content-card-list{
+  max-width: unset!important;
+}
+.doc-desc-module .service-module-content-bd{
+  height: unset!important;
+}
+.doc-card-list-item{
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  width: 130px;
+  margin-right: 16px;
+}
+.doc-card-list-item-img{
+  position: relative;
+  width: 100%;
+  height: 176px;
+  border: 1px solid#ececec;
+  border-radius: 4px;
+  overflow: hidden;
+  flex-shrink: 0;
+}
+.doc-card-list-item-img.free::after{
+  content: '会员免费';
+  padding: 2px 6px;
+  position: absolute;
+  left: 0;
+  top: 0;
+  border-radius: 4px 0px 9px 0;
+  background: linear-gradient(to right,rgba(255, 124, 50, 1), rgba(243, 56, 56, 1));
+  color: #FFF;
+  text-align: center;
+  font-size: 11px;
+  line-height: 14px;
+}
+.doc-card-list-item-img.good::after{
+  content: '精品';
+  padding: 2px 6px;
+  position: absolute;
+  left: 0;
+  top: 0;
+  border-radius: 4px 0px 9px 0;
+  background: linear-gradient(to right,rgba(255, 124, 50, 1), rgba(243, 56, 56, 1));
+  color: #FFF;
+  text-align: center;
+  font-size: 11px;
+  line-height: 14px;
+}
+.doc-card-list-item .doc-main-img{
+  width: 100%;
+  height: 100%;
+  background-repeat: no-repeat;
+  background-position: center center;
+  background-size: cover;
+  transform-origin: center center;
+  transition: all .3s;
+}
+.doc-card-list-item .doc-main-img:hover{
+  transform: scale(1.3);
+  cursor: pointer;
+}
+.doc-card-list-item .doc-type-img{
+  position: absolute;
+  bottom: 0;
+  right: 0;
+  width: 28px;
+  height: 28px;
+}
+.doc-card-list-item-title{
+  margin-top: 8px;
+  color:#1d1d1d!important;
+  font-size: 16px;
+  line-height: 24px;
+}
+.doc-card-list-item-title:hover{
+  color: #2ABED1!important;
+}
+
 /* ------card-list-item */
 
 .cms-card .cms-card-list-item:not(:last-of-type) {
@@ -604,10 +708,10 @@
 }
 
 .zb-module-nav .search-type-section:nth-of-type(1) {
-    min-width: 232px;
+    min-width: 220px;
 }
 .zb-module-nav .search-type-section:nth-of-type(2) {
-    min-width: 256px;
+    min-width: 248px;
 }
 .zb-module-nav .search-type-section:nth-of-type(3) {
     min-width: 160px;

+ 1 - 1
src/web/templates/frontRouter/pc/cooperation/free/index.html

@@ -33,7 +33,7 @@
       <img class="text-partner" src="{{Msg "seo" "cdn"}}/frontRouter/pc/cooperation/img/partner.png" alt="">
       <p class="text-title">聚合百万客户,共同拓展销售商机,领跑市场!</p>
       <button class="btn-join button-blink" onclick="openLink()">邀您加入</button>
-      <img style="width: 184px;margin-top: -82px;margin-left: 272px;" src='{{Msg "seo" "cdn"}}/frontRouter/pc/cooperation/img/qr.png' alt="联系我们">
+      <img style="width: 184px;margin-top: -82px;margin-left: 272px;" src='{{Msg "seo" "cdn"}}/frontRouter/pc/cooperation/img/qr.png?v={{Msg "seo" "version"}}' alt="联系我们">
     </div>
   </div>
   <main class="cooperation-page-join w">

+ 6 - 4
src/web/templates/frontRouter/pc/docs/sess/index.html

@@ -36,16 +36,16 @@
         "imports": {
           "app": "/page_docs_pc/js/app.js?v={{Msg "seo" "docs_v"}}",
           "single-spa": "https://cdn-common.jianyu360.com/cdn/lib/single-spa/4.3.7/lib/system/single-spa.min.js",
-          "vue": "https://cdn-common.jianyu360.com/cdn/lib/vue/2.6.11/vue.min.js",
+          "vue": "https://cdn-common.jianyu360.com/cdn/lib/vue/2.7.16/vue.min.js",
           "vue-router": "https://cdn-common.jianyu360.com/cdn/lib/vue-router/3.0.7/dist/vue-router.min.js"
         }
       }
     </script>
     <link rel="preload" href="https://cdn-common.jianyu360.com/cdn/lib/single-spa/4.3.7/lib/system/single-spa.min.js" as="script" crossorigin="anonymous" />
-    <link rel="preload" href="https://cdn-common.jianyu360.com/cdn/lib/vue/2.6.11/vue.min.js" as="script" crossorigin="anonymous" />
+    <link rel="preload" href="https://cdn-common.jianyu360.com/cdn/lib/vue/2.7.16/vue.min.js" as="script" crossorigin="anonymous" />
     <script src="https://cdn-common.jianyu360.com/cdn/lib/import-map-overrides/2.2.0/dist/import-map-overrides.js"></script>
-    <script src="https://cdn-common.jianyu360.com/cdn/lib/pdfjs-dist/2.1.266//build/pdf.min.js"></script>
-    <script src="https://cdn-common.jianyu360.com/cdn/lib/pdfjs-dist/2.1.266//web/pdf_viewer.js"></script>
+    <script src="https://cdn-common.jianyu360.com/cdn/lib/pdfjs-dist/2.1.266/build/pdf.min.js"></script>
+    <script src="https://cdn-common.jianyu360.com/cdn/lib/pdfjs-dist/2.1.266/web/pdf_viewer.js"></script>
     <script src="https://cdn-common.jianyu360.com/cdn/lib/systemjs/6.8.3/dist/system.min.js"></script>
     <script src="https://cdn-common.jianyu360.com/cdn/lib/systemjs/6.8.3/dist/extras/amd.min.js"></script>
     <script src="https://cdn-common.jianyu360.com/cdn/lib/systemjs/6.8.3/dist/extras/named-exports.js"></script>
@@ -74,6 +74,7 @@
 <body class="page--docs--index">
 {{include "/site/common/pc-school-head.html"}}
 <!-- S-注入  -->
+<div id="vue-collect-user-info"></div>
 <div class="w-box page-container">
     <div class="w1200">
         <div id="single-spa-app"></div>
@@ -87,6 +88,7 @@
     Promise.all([System.import('single-spa'), System.import('vue'), System.import('vue-router')]).then(function (modules) {
       var singleSpa = modules[0];
       var Vue = modules[1];
+      window.Vue = Vue
       var VueRouter = modules[2];
 
       Vue.use(VueRouter)

+ 552 - 0
src/web/templates/order/pc/docMember/detail.html

@@ -0,0 +1,552 @@
+<!DOCTYPE html>
+<html lang="zh-CN">
+
+<head>
+  <meta charset="utf-8">
+  <meta http-equiv="X-UA-Compatible" content="IE=edge">
+  <meta name="viewport" content="width=device-width, initial-scale=1">
+  <title>订单详情</title>
+  <meta content="增值服务" theme="light" name="enable-header" />
+  <script>
+      var myPageNavIsNormal = true;
+  </script>
+  <link rel="stylesheet" href="{{Msg " seo" "cdn" }}/course/css/bootstrap.min.css?v={{Msg "seo" "version" }}">
+  <link rel="stylesheet" href="{{Msg " seo" "cdn" }}/course/iconfont/iconfont.css?v={{Msg "seo" "version" }}">
+  <link rel="stylesheet" href="{{Msg " seo" "cdn" }}/course/css/reset_pc.css?v={{Msg "seo" "version" }}">
+  <link rel="stylesheet" href="{{Msg " seo" "cdn" }}/course/css/order_detail.css?v={{Msg "seo" "version" }}">
+  {{include "/common/pnc.html"}}
+  <link href="{{Msg " seo" "cdn" }}/css/pc.css?v={{Msg "seo" "version" }}" rel="stylesheet">
+  <link href="{{Msg " seo" "cdn" }}/css/dev2/reset_pc.css?v={{Msg "seo" "version" }}" rel="stylesheet">
+  <link rel="stylesheet" href="{{Msg " seo" "cdn" }}/pccss/public-nav-1200.css?v={{Msg "seo" "version"}}" />
+  <script type="text/javascript" src="{{Msg " seo" "cdn" }}/js/public-nav.js?v={{Msg "seo" "version" }}"></script>
+  <!--[if lt IE 9]>
+  <script src="https://cdn-common.jianyu360.com/cdn/lib/html5shiv/3.7.3/html5shiv.min.js"></script>
+  <script src="https://cdn-common.jianyu360.com/cdn/lib/respond-js/1.4.2/respond.min.js"></script>
+  <![endif]-->
+  <style>
+    .filter_data p {
+      font-size: 14px;
+      margin-bottom: 10px;
+    }
+    #order_detail {
+      line-height: 1;
+      padding-bottom: 0px !important;
+      background-color: #fff;
+    }
+    .qxBg {
+      border-top: 2px solid #999999;
+      background-color: #ececec;
+    }
+    .qxBgFont {
+      color: #686868;
+    }
+    .limited-time {
+      display: none;
+      margin: 8px 0 8px 0;
+      padding: 0 16px;
+      line-height: 18px;
+      font-size: 12px;
+      color: #fff;
+      background: linear-gradient(98deg, #FF7C32 0%, #F33838 100%);
+      border-radius: 11px;
+    }
+    .highlight-text {
+      color: #2cb7ca;
+    }
+    .nothing {
+      min-height: 500px;
+      padding: 40px 0;
+      display: flex;
+      align-items: center;
+      justify-content: center;
+      flex-direction: column;
+    }
+    .nothing-img {
+      width: 230px;
+    }
+  </style>
+</head>
+
+<body>
+  {{include "/common/pchead.html"}}
+  <!-- header -->
+  <!-- main  START -->
+  <div class="order_detail" id="order_detail">
+    <div class="w order_crumb">
+      <a href="#" onclick="window.location.href='/front/swordfish/toMyOrder'">我的订单</a><em> > </em>
+      <a href="#" class="active">订单详情</a>
+    </div>
+    <div class="w order_main nothing" style="display: none">
+      <img class="nothing-img" src="/common-module/public/image/jy-back.png" />
+      <div class="nothing-text">该订单记录已删除</div>
+    </div>
+    <div class="w order_main order-detail">
+      <!-- greenBg 为绿色背景及边框 redBg为红色背景及边框 -->
+      <div id="bg" class="o_m_thead greenBg">
+        <div class="order-id-box clearfix">
+          <p class="fl order_id"></p>
+          <span class="fr limited-time">限时抢购支付倒计时 <i class="limited-countdown"></i></span>
+        </div>
+        <p class="clearfix order_state">
+          <!--greenFont为绿色字体 redFont为红色字体 -->
+          <span class="greenFont hide" id="status_success">已完成</span>
+          <span class="redFont hide" id="status_wait_payfull">待付完</span>
+          <span class="redFont hide" id="status_wait_pay">待付款</span>
+          <span class="qxBgFont hide" id="status_cancelled">已取消</span>
+          <a class="go_pay payOrder" style="display: none;">去支付</a>
+          <!-- 当状态为已完成时显示开发票 或 查看发票 -->
+          <a class="openinvoice go_pay" style="display: none;">开发票</a>
+          <a class="lookinvoice go_pay" style="display: none;">查看发票</a>
+        </p>
+      </div>
+      <!-- ------订单类型展示的字段 --------->
+      <div class="o_m_tbody">
+        <div class="b_list">
+          <div class="list_thead">
+            <span class="fl">购买信息</span>
+          </div>
+          <div class="clearfix list_tbody">
+            <div class="filter_data">
+              <p>
+                <span class="pro_text">产品类型</span>:剑鱼文库会员 <span class="vip_type"></span>
+              </p>
+              <p class="gmzq_p" style="display: none;">
+                <span class="gmzq_text">购买周期</span>:<span class="gmzq"></span>
+                <span class="discount-container hide">
+                  <span>+</span>
+                  <span class="highlight-text"></span>
+                </span>
+                <span class="discount-container-seller hide">
+                    <span>+</span>
+                    <span class="highlight-text"></span>
+                </span>
+              </p>
+              <p class="yxrq_p" style="display: none;">
+                <span class="yxrq_text">有效期至</span>:<span class="yxrq"></span>
+              </p>
+            </div>
+          </div>
+        </div>
+        <div class="b_list">
+          <div class="list_thead">
+            <span class="fl">订单信息</span>
+          </div>
+          <div class="clearfix list_tbody">
+            <div class="filter_data">
+              <p>订单编号:<span class="order_code"></span></p>
+              <p>下单时间:<span class="order_time"></span></p>
+              <!-- <p>产品类型: <span class="order_product_type"></span></p> -->
+              <p class="pay_time_p" style="display:none">支付时间:<span class="pay_time"></span></p>
+              <p class="pay_way_p" style="display:none">支付方式:<span class="pay_way"></span></p>
+              <p class="pay_num_p" style="display:none">支付单号:<span class="pay_num"></span></p>
+              <p class="price_p" data-need-before-money>商品总价:<span class="price"></span>
+                &nbsp; <span class="valuationList" style="color:#2CB7CA;display:none;cursor:pointer">计费清单</span>
+              </p>
+            </div>
+          </div>
+        </div>
+      </div>
+    </div>
+    <div style="margin-top: 20px;"></div>
+    <!-- main END -->
+  </div>
+  {{include "/common/pcbottom.html"}}
+  {{include "/common/baiducc.html"}}
+  <script src="{{Msg " seo" "cdn" }}/course/js/jquery-2.1.4.min.js?v={{Msg "seo" "version" }}"></script>
+  <script src="{{Msg " seo" "cdn" }}/course/js/bootstrap.min.js?v={{Msg "seo" "version" }}"></script>
+  <!-- footer -->
+  <script>
+    haslogin({{.T.logid }});
+    var serverInitTime = null
+    var timerId = null
+    $(function () {
+      initAdjustTime()
+      $("#public-nav").css("background", "#fff");
+      $(".public-nav").css("border-bottom", "1px solid #e0e0e0");
+      var orderCode = getParam("order_code");
+      // var orderCode = {{.T.orderId}}
+
+      $(".order_id").text("订单编号:" + orderCode);
+      getOrderContent()
+      function getOrderContent() {
+          $.post("/subscribepay/orderListDetails/getOrderPayAllMsg", { "orderCode": orderCode }, function (r) {
+              if (r == '{"error":"需要登录!"}') {
+                  location.href = '/';
+              }
+              if (r.success) {
+                  //订单信息
+                  $(".order_code").text(orderCode);
+                  var filterObj = JSON.parse(r.data.order.filter);
+                  if (r.data.order.create_time) {
+                      $(".order_time").text(r.data.order.create_time.replace(/-/g, "."));
+                  }
+
+                  // 订单已删除
+                  try {
+                    if (r.data.order.del_status === 1 || r.data.order.order_status == -1) {
+                      $(".nothing").show();
+                      $('.order_main.order-detail').remove();
+                      if (r.data.order.del_status === 1) {
+                          $('.nothing-text').text('该订单已删除,如有问题请联系您的客户经理。')
+                      }
+                    }
+                  } catch (error) { }
+                  /*---S-优惠券---*/
+                  function insetMoneyItem() {
+                    // 商品总价=订单金额(order_money)+优惠金额(order.discount_price)
+                    var order_money = (r.data.order.order_money / 100)
+                    var getPayMoney = (r.data.order.pay_money / 100)
+                    var getCouponMoney = (r.data.order.discount_price / 100) || 0
+                    var prodMoney = (order_money * 100) + (getCouponMoney * 100)
+                    var insetDom = $('*[data-need-before-money]')
+
+                    $(".price").text("¥ " + formatMoney(prodMoney / 100) + "元");
+                    // 已取消和已退款订单不显示优惠信息
+                    if (r.data.order.order_status != -2 && r.data.order.order_status != -3) {
+                      if (r.data.order.order_status != 0) {
+                          insetDom.after('<p>实付金额:¥' + formatMoney(getPayMoney) + '元</p>')
+                      }
+                      // insetDom.after('<p>优惠金额:-¥' + formatMoney(prodMoney / 100) + '元</p>')
+                      if (getCouponMoney) {
+                          insetDom.after('<p>优惠金额:-¥' + formatMoney(getCouponMoney) + '元</p>')
+                      }
+                    }
+                  }
+                  insetMoneyItem()
+                  /*---E-优惠券---*/
+
+                  //优惠码
+                  if (r.data.order.isUsedActiveCode) {
+                      $(".discount-container").removeClass("hide");
+                      $(".discount-container .highlight-text").text("赠送30天");
+                  }
+                  // 活动赠
+                  var give_cycle = filterObj.give_cycle;
+                  if (give_cycle) {
+                      if (filterObj.give_type == 1) {
+                          give_cycle = give_cycle + '天';
+                      } else {
+                          give_cycle = give_cycle < 12 ? (give_cycle + '个月') : ('1年');
+                      }
+                  }
+                  if (give_cycle) {
+                      $(".discount-container").removeClass("hide");
+                      $(".discount-container .highlight-text").text("活动赠" + give_cycle);
+                  }
+                  // 销售赠
+                  var seller_give_cycle = filterObj.seller_give_cycle;
+                  if (seller_give_cycle) {
+                      if (filterObj.seller_give_type == 1) {
+                          seller_give_cycle = seller_give_cycle + '天';
+                      } else {
+                          seller_give_cycle = seller_give_cycle < 12 ? (seller_give_cycle + '个月') : ('1年');
+                      }
+                  }
+                  if (seller_give_cycle) {
+                      $(".discount-container-seller").removeClass("hide");
+                      $(".discount-container-seller .highlight-text").text("销售赠" + seller_give_cycle);
+                  }
+
+
+                  if (r.data.order.order_status === 1) {
+                      $("#status_success").removeClass("hide");
+                      // 支付时间
+                      if (r.data.order.pay_time) {
+                          $(".pay_time_p").css("display", "");
+                          $(".pay_time").text(r.data.order.pay_time.replace(/\-/g, "."));
+                      }
+                      //支付方式
+                      if (r.data.order.billingMode === 1) {
+                          if (r.data.order.pay_way) {
+                              if (r.data.order.pay_way.indexOf("wx") > -1 || r.data.order.return_type === 1) {
+                                  $(".pay_way_p").css("display", "");
+                                  $(".pay_way").text("微信支付");
+                              } else if (r.data.order.pay_way.indexOf("ali") > -1 || r.data.order.return_type === 2) {
+                                  $(".pay_way").text("支付宝支付");
+                                  $(".pay_way_p").css("display", "");
+                              } else if (r.data.order.pay_way === "transferAccounts" && (r.data.order.is_backstage_order === 1 && r.data.order.return_status > 0 || r.data.order.is_backstage_order === 0)) {
+                                  $(".pay_way").text("公对公转账");
+                                  $(".pay_way_p").css("display", "");
+                              }
+                          }
+                      }
+
+
+                      if (r.data.order.order_money == 0) {
+                          if (r.data.order.billingMode != 0) {
+                              $(".vip_type").text("(试用)");
+                          }
+                      } else {
+                          if (r.data.transaction_id) {
+                              $(".pay_num_p").css("display", "");
+                              $(".pay_num").text(r.data.transaction_id);
+                          }
+                      }
+                      //发票
+                      if (r.data.order.is_can_invoice) {
+                          $(".openinvoice").css("display", "");
+                      }
+                      if (r.data.order.invoice_show) {
+                          $(".lookinvoice").css("display", "").on("click", function () {
+                              checkinvoice(r.data.applybill_status, orderCode)
+                          })
+                      }
+                  }
+                if (r.data.order.order_status == -2 || r.data.order.order_status == -3) {
+                  $("#status_cancelled").removeClass("hide");
+                  $("#bg").addClass("qxBg").removeClass("greenBg");
+                }
+                if (r.data.order.order_status == 0) {
+                  $("#status_wait_pay").removeClass("hide");
+                  $("#bg").addClass("redBg").removeClass("greenBg");
+                  $(".payOrder").show();
+                }
+
+                //周期
+                if (r.data.order.vip_starttime && r.data.order.vip_endtime) {
+                  $('.gmzq_p').css('display', '');
+                  if (r.data.order.vip_type === 1) {
+                    $('.gmzq_text').text('续费周期')
+                  }
+                    var start_time_vip = r.data.order.vip_starttime;
+                    var end_time_vip = r.data.order.vip_endtime;
+                    var start_time_arr = start_time_vip.split(" ")[0].split("-")
+                    var end_time_arr = end_time_vip.split(" ")[0].split("-")
+                    var start_year = start_time_arr[0];
+                    var start_month = start_time_arr[1];
+                    var end_year = end_time_arr[0];
+                    var end_month = end_time_arr[1];
+                    var year = 0;
+                    var month = 0;
+                    if (end_year > start_year) {
+                        if (end_month > start_month) {
+                            year = end_year - start_year;
+                            month = end_month - start_month;
+                        } else {
+                            year = end_year - start_year - 1;
+                            month = 12 + Number(end_month) - start_month;
+                            if (month == 12) {
+                                year = Number(year) + 1;
+                                month = 0;
+                            }
+                        }
+                    } else if (end_year === start_year) {
+                        month = end_month - start_month;
+                    }
+
+                    if (year != 0 && month != 0) {
+                        $(".gmzq").text(year + "年" + month + "个月");
+                    } else if (year !== 0 && month === 0) {
+                        $(".gmzq").text(year + "年");
+                    } else if (year === 0 && month !== 0) {
+                        $(".gmzq").text(month + "个月");
+                    }
+                    if (filterObj.cycleunit == 1) {
+                        $(".gmzq").text(filterObj.cyclecount + "年")
+                    } else if (filterObj.cycleunit == 2) {
+                        $(".gmzq").text(filterObj.cyclecount + "个月")
+                    } else if (filterObj.cycleunit == 3) {
+                        $(".gmzq").text(filterObj.cyclecount + "天")
+                    } else if (filterObj.cycleunit == 4) {
+                        $(".gmzq").text(filterObj.cyclecount + "季")
+                    }
+                } else {
+                    //未支付
+                    if (filterObj.cycleunit == 1) {
+                        $(".gmzq").text(filterObj.cyclecount + "年")
+                    } else if (filterObj.cycleunit == 2) {
+                        $(".gmzq").text(filterObj.cyclecount + "个月")
+                    } else if (filterObj.cycleunit == 3) {
+                        $(".gmzq").text(filterObj.cyclecount + "天")
+                    } else if (filterObj.cycleunit == 4) {
+                        $(".gmzq").text(filterObj.cyclecount + "季")
+                    }
+                    $('.gmzq_p').css('display', '');
+                }
+                if (r.data.order.order_status == 1) {
+                  //有效周期
+                  $(".yxrq_p").css("display", "");
+                  var vip_endtime = r.data.order.vip_endtime;
+                  var vip_endtime_new = formatTime(vip_endtime);
+                  $(".yxrq").text(vip_endtime_new.replace(/\//g, "."));
+                  
+                }
+                function formatTime(t) {
+                  try {
+                    return t.substring(0, 10).replace(/\-/g, "/")
+                  } catch (e) {
+                    if (t === null) {
+                    t = "";
+                    }
+                    return t
+                  }
+                }
+                //判断是续费
+                if (r.data.order.vip_type == 1) {
+                  $(".vip_type").text("(续费)");
+                  $(".zq_text").text("续费周期");
+                }
+                //计价清单
+                var filterObj = JSON.parse(r.data.order.filter);
+                var upgradeSubtotail = filterObj.upgradeSubtotail;
+                if (upgradeSubtotail) {	//有则显示
+                  $(".valuationList").css("display", "");
+                  $(".valuationList").on("click", function () {
+                      window.location.href = "/front/order/valuationList/" + orderCode;
+                  })
+                }
+                // 优惠倒计时结束时间
+                if (r.data.order.expiration_time && r.data.order.order_status == 0) {
+                  r.data.order.expiration_time = new Date(r.data.order.expiration_time.replace(/-/g, '/')).getTime()
+                  if (serverInitTime < r.data.order.expiration_time) {
+                    diffCountdown(r.data.order.expiration_time)
+                    $('.limited-time').show()
+                  }
+                }
+              }
+          })
+      }
+
+      $(".openinvoice").on("click", function () {
+        $.post("/subscribepay/orderListDetails/isOver", { "order_code": orderCode }, function (r) {
+          if (r.status != 1) {
+            window.open("/front/order/invoicetimeOut", '_self');
+          } else {
+            window.open("/front/order/invoice/" + orderCode, '_self');
+          }
+        })
+      })
+      $(".payOrder").on("click", function () {
+        location.href = "/front/docMember/orderPay/" + orderCode;
+      })
+      function diffCountdown(endTime) {
+        timerId = setInterval(function () {
+          var nowtime = new Date().getTime()  //获取当前时间
+          var diffTime = endTime - nowtime //距离结束时间的毫秒数
+          if (diffTime <= 0) {
+            clearInterval(timerId)
+            $.ajax({
+              type: "post",
+              url: "/subscribepay/orderListDetails/deleteOrder",
+              data: {
+                "id": orderCode,
+                "pageNum": 1,
+                "type": 1,
+                "cancel": "cancel"
+              },
+              dataType: 'json',
+              success: function () {
+                $('.limited-time').hide()
+                $("#status_wait_pay").hide();
+                $(".payOrder").hide();
+                $("#status_cancelled").removeClass("hide");
+                $("#bg").addClass("qxBg").removeClass("greenBg").removeClass('redBg');
+              }
+            })
+          } else {
+            var hour = Math.floor(diffTime / (1000 * 60 * 60)),  //计算小时数
+                hour = hour < 10 ? '0' + hour : hour;
+            var minute = Math.floor(diffTime / (1000 * 60) % 60),  //计算分钟数
+                minute = minute < 10 ? '0' + minute : minute;
+            var seconds = Math.floor(diffTime / 1000 % 60);  //计算秒数
+            seconds = seconds < 10 ? '0' + seconds : seconds;
+            $(".limited-countdown").text(hour + ":" + minute + ":" + seconds)
+          }
+        }, 1000)
+      }
+  })
+
+    // 格式化金钱的函数
+    // s: 金额(number) 必传
+    // n: 保留小数的位数(int:0-100)
+    function formatMoney(s, n) {
+      if (n === undefined) {
+        n = -1
+      } else {
+        n = n > 0 && n <= 20 ? n : 2;
+      }
+      var intS = parseInt(s)
+      var point = '.'
+      var left;
+      var right;
+      s = parseFloat((s + '').replace(/[^\d\.-]/g, ''))
+      // 没传n,默认(如果为整数,则不保留小数。如果为浮点数,则保留两位小数)
+      if (n === -1) {
+        if (s === intS) {
+          n = 0
+          right = ''
+          point = ''
+        } else {
+          n = 2
+          s = s.toFixed(n);
+          right = s.split('.')[1];
+        }
+        s = s + ''
+        left = s.split('.')[0].split("").reverse();
+      } else {
+        s = parseFloat((s + '').replace(/[^\d\.-]/g, '')).toFixed(n) + '';
+        left = s.split('.')[0].split('').reverse();
+        right = s.split('.')[1];
+      }
+
+      t = "";
+      for (i = 0; i < left.length; i++) {
+        t += left[i] + ((i + 1) % 3 == 0 && (i + 1) != left.length ? ',' : '');
+      }
+
+      var money = t.split('').reverse().join('') + point + right;
+      return money;
+    }
+    /******* 获取url参数(正则)********/
+    function getParam(name) {
+      var search = document.location.search;
+      // alert(search);
+      var pattern = new RegExp("[?&]" + name + "\=([^&]+)", "g");
+      var matcher = pattern.exec(search);
+      var items = null;
+      if (null != matcher) {
+        try {
+          items = decodeURIComponent(decodeURIComponent(matcher[1]));
+        } catch (e) {
+          try {
+            items = decodeURIComponent(matcher[1]);
+          } catch (e) {
+            items = matcher[1];
+          }
+        }
+      }
+      return items;
+    };
+      //查看发票
+      function checkinvoice(flag, orderCode) {
+        if (flag === 2) {
+          var showHtml = '<div style="width: 100%;height: 100%;z-index: 999; position: absolute;top: 0;background: rgba(0, 0, 0, 0.65);">   <div style="position: fixed;z-index: 9999;width: 540px;height: 262px;left: 50%;top: 30%;margin-left: -270px;background-color: #fff;border-radius: 6px;padding: 32px;display: flex;flex-direction: column;justify-items: center;align-items: center;">       <div class="invoice_title" style="color: #1D1D1D;font-size: 18px;line-height: 28px;">提示</div>       <div class="invoice_body"            style="height: 78px;margin: 20px 0px;font-size: 14px;line-height: 24px;text-align: center;">           您已开具发票<br>           如有问题请联系客服<br>           400-108-6670       </div>       <div class="invoice_control"            style="width: 132px;height: 36px;text-align: center;background: #2CB7CA;border-radius: 6px;font-size: 16px;line-height: 36px;color: #FFFFFF;cursor: pointer;"            onclick="document.querySelector(\'#invoice_tip\').remove()"       >           我知道了       </div>   </div>\n</div>'
+          var div_invoice_tip = document.createElement('div');
+          div_invoice_tip.innerHTML = showHtml;
+          div_invoice_tip.id = "invoice_tip"
+          document.body.appendChild(div_invoice_tip)
+          return
+        }
+        window.open("/front/order/check_invoice/" + orderCode, '_self');
+      }
+      // 获取服务端时间
+      function initAdjustTime() {
+        var _this = this
+        // 接口响应时服务端的本地时间
+        $.ajax({
+          url: '/jyapi/marketing/time/now?t=' + Date.now(),
+          type: 'POST',
+          success: function (res) {
+            var data = res.data
+            if (data) {
+              serverInitTime = data.time.toString().length === 10 ? data.time * 1000 : data.time
+            } else {
+              serverInitTime = Date.now()
+            }
+          }
+        })
+      }
+  </script>
+</body>
+
+</html>

+ 16 - 2
src/web/templates/order/pc/paySuccess.html

@@ -143,6 +143,9 @@
             </p>
                 <a class="check_order sm-size" id="goBack2" style="display: none;">立即返回</a>
                 <a class="check_order sm-size default" href="/front/integral/integralDetail?order_code={{.T.orderCode}}">查看订单</a>
+            {{else if eq .T.orderType "docMember"}}
+            <a class="check_order default" href="/front/docMember/orderDetail?order_code={{.T.orderCode}}">查看订单</a>
+            <a class="check_order" href="javascript:;" onclick="getDocsJumpUrl()">获取文档</a>
             {{end}}
             </div>
             <p class="invoce-tip-text">如需发票,可点击【查看订单】前往开票</p>
@@ -169,7 +172,7 @@
     // 根据支付订单类型 加载广告位
     // 超级订阅、数据流量包、数据导出(线上支付方式)、课程产品
     // P527新增大会员支付成功广告位
-    if (orderType === 'member' || orderType === 'subvip' || orderType === 'datapackage' || orderType === 'dataexport' || orderType === 'onlineCourse' || orderType === 'course') {
+    if (orderType === 'member' || orderType === 'subvip' || orderType === 'datapackage' || orderType === 'dataexport' || orderType === 'onlineCourse' || orderType === 'course' || orderType === 'docMember') {
         var Activedatastring = `xxx`
 
         switch (orderType) {
@@ -191,6 +194,9 @@
             case 'member':
             Activedatastring = 'member'
                 break;
+           case 'docMember':
+            Activedatastring = 'docMember'
+                break;
             default:
                 break;
         }
@@ -360,7 +366,15 @@
         var Activedata= JSON.stringify({codes:[Activedata] })
         getActive.getActiveInfo(Activedata)
     }
-
+     // 获取文档跳转逻辑
+    function getDocsJumpUrl() {
+       var url = sessionStorage.getItem('pc-doc-buy-referrer')
+       if (url) {
+           location.replace(url)
+       } else {
+           location.replace('/swordfish/docs')
+       }
+    }
 </script>
 
 {{include "/common/baiducc.html"}}

+ 44 - 2
src/web/templates/pc/myOrder.html

@@ -444,6 +444,16 @@
                   <div class="fl shop_main" v-if="item.product_type === '数据文件'">
                     <p style="line-height: 24px;">@#item.filter.remark#@</p>
                   </div>
+                  <div class="fl shop_main" v-if="item.product_type === '剑鱼文库会员'">
+                    <template v-if="item.vip_type=='1'">
+                      <p style="line-height: 24px;">产品类型:@#item.product_type#@(续费)</p>
+                    </template>
+                    <template v-else>
+                      <p style="line-height: 24px;">产品类型:@#item.product_type#@</p>
+                    </template>
+                    <p style="line-height: 24px;"><span v-if="item.vip_type === 1">续费</span><span v-else>购买</span>周期:@#item.docMemberInfo.cycle#@</p>
+                    <p style="line-height: 24px;" v-if="item.order_status === 1">有效期至:@#item.docMemberInfo.endTime#@</p>
+                  </div>
                 </div>
 
                 <!-- 商品金额 -->
@@ -492,7 +502,7 @@
                     <div v-if="item.discount_price && item.order_status != -2 && item.order_status != -3">
                       优惠金额:<span>-¥@#item.discount_price | FormatNum#@</span></div>
 
-                    <div v-if="item.pay_money && item.order_status != -2 && item.order_status != -3">实付金额:<span
+                    <div v-if="(item.pay_money || item.pay_money === 0) && item.order_status != -2 && item.order_status != -3">实付金额:<span
                         class="ss">¥@#item.pay_money | FormatNum#@</span></div>
                   </div>
 
@@ -755,7 +765,7 @@
       delimiters: ['@#', '#@'],
       data: function () {
         return {
-          typeEnum: ["医械通", "VIP订阅", "中标必听课", "企业商机管理", "剑鱼币", "历史数据", "大会员", "大会员-AI中标预测包", "大会员-子账号", "大会员-招标文件解读", "大会员-补充包", "招标文件解读", "数据报告", '数据流量包', '省份订阅包', '附件下载包', '采购单位画像包', '数据文件'],
+          typeEnum: ["医械通", "VIP订阅", "中标必听课", "企业商机管理", "剑鱼币", "历史数据", "大会员", "大会员-AI中标预测包", "大会员-子账号", "大会员-招标文件解读", "大会员-补充包", "招标文件解读", "数据报告", '数据流量包', '省份订阅包', '附件下载包', '采购单位画像包', '数据文件', '剑鱼文库会员'],
           imgMap: {
             '医械通': {
               icon: '/electronic_invoice/image/med_aratus.png?v=1001'
@@ -851,6 +861,9 @@
             },
             '数据文件': {
               icon: '/common-module/order-list/image/dataFile.png'
+            },
+            '剑鱼文库会员': {
+              icon: '/common-module/order-list/image/docVip.png'
             }
           },
           bigIndexMap: {
@@ -1192,6 +1205,27 @@
                 v.memberChildInfo.endTime = formatTime(v.vip_endtime).replace(/\./g, "/");
               }
             }
+            // 剑鱼文库会员
+            if (v.product_type === '剑鱼文库会员') {
+              var docMemberInfo = {}
+              if (v.filter.cyclecount !== undefined && v.filter.cyclecount !== "" && v.filter.cycleunit !== undefined && v.filter.cycleunit !== "") {
+                if (parseInt(v.filter.cycleunit) === 1) {
+                  docMemberInfo.cycle = v.filter.cyclecount + "年"
+                } else if (parseInt(v.filter.cycleunit) === 2) {
+                  docMemberInfo.cycle = v.filter.cyclecount + "个月"
+                } else if (parseInt(v.filter.cycleunit) === 3) {
+                  docMemberInfo.cycle = v.filter.cyclecount + "天"
+                } else if (parseInt(v.filter.cycleunit) === 4) {
+                  docMemberInfo.cycle = v.filter.cyclecount + "季"
+                } else {
+                  docMemberInfo.cycle = "-"
+                }
+              }
+              if (v.vip_endtime != null) {
+                docMemberInfo.endTime = formatTime(v.vip_endtime).replace(/\./g, ".");
+              }
+              v.docMemberInfo = docMemberInfo
+            }
             return v
           })
         }
@@ -1291,6 +1325,10 @@
               href = '/front/areapack/orderPay/' + item.order_code
               break
             }
+            case '剑鱼文库会员': {
+              href = '/front/docMember/orderPay/' + item.order_code
+              break
+            }
           }
           if (goTemplateData.inIframe) {
             window.$BRACE.methods.open({
@@ -1511,6 +1549,10 @@
               href = '/swordfish/frontPage/dataFile/sess/orderDetail?order_code=' + item.order_code
               break
             }
+            case '剑鱼文库会员': {
+              href = '/front/docMember/orderDetail?order_code=' + item.order_code
+              break
+            }
           }
           window.open(href)
         },

+ 6 - 0
src/web/templates/pc/newIndex.html

@@ -174,6 +174,12 @@
         <section class="main-module swiper-module-27">
           {{include "/pc/template/index/banner-module-27.html"}}
         </section>
+        <!-- 剑鱼文库 -->
+        <section class="main-module aside-layout-container">
+          <main class="aside-layout--main">
+            {{include "/pc/template/index/doc-card-module.html"}}
+          </main>
+        </section>
         <!-- 招投标攻略 -->
         <section class="main-module aside-layout-container">
           <main class="aside-layout--main">

+ 41 - 0
src/web/templates/pc/template/index/doc-card-module.html

@@ -0,0 +1,41 @@
+<!-- 剑鱼文库 -->
+<section class="module-card-container doc-desc-module">
+  <header class="module-card-header">
+    <h3 class="module-card-title">剑鱼文库</h3>
+  </header>
+  <main class="module-card-content bidding-desc-module-content">
+    <ul class="service-module-content-hd bidding-desc-list clearfix">
+      {{range $k,$v := .T.docsClass}}
+        <li class="bidding-desc-item j-s-button plain bg" data-name="{{$v}}" data-index="{{$k}}">{{$v}}</li>
+      {{end}}
+      <li data-name=""><a class="j-s-button plain bg" href="/swordfish/docs" target="_blank">更多>></a></li>
+    </ul>
+    <ul class="service-module-content-bd clearfix">
+      {{range $k,$v := .T.docsData}}
+        <li class="bidding-desc-content-card-list doc-content-card-list" data-index="{{$k}}" style="display: none;">
+          <ul class="bidding-desc-card-column clearfix">
+            {{range $kk,$vv := $v}}
+            <li class="doc-card-list-item">
+              <div class='doc-card-list-item-img {{if not $vv.productType}}{{else if Eq $vv.productType 1}}free{{end}}'>
+                <img class="doc-main-img" src="{{$vv.previewImg}}" alt="{{$vv.docName}}" onerror="javascript:this.src='/images/pc/doc-error.png';this.οnerrοr=null">
+                {{if or (eq $vv.docFileSuffix "doc") (eq $vv.docFileSuffix "docx")}}
+                <img class="doc-type-img" src='/images/pc/word.png' alt="{{$vv.docFileSuffix}}">
+                {{else if  eq $vv.docFileSuffix "pdf"}}
+                <img class="doc-type-img" src='/images/pc/pdf.png' alt="{{$vv.docFileSuffix}}">
+                {{else if  eq $vv.docFileSuffix "ppt"}}
+                <img class="doc-type-img" src='/images/pc/ppt.png' alt="{{$vv.docFileSuffix}}">
+                {{else if  eq $vv.docFileSuffix "xls"}}
+                <img class="doc-type-img" src='/images/pc/excel.png' alt="{{$vv.docFileSuffix}}">
+                {{else if  eq $vv.docFileSuffix "txt"}}
+                <img class="doc-type-img" src='/images/pc/txt.png' alt="{{$vv.docFileSuffix}}">
+                {{end}}
+              </div>
+              <a class="doc-card-list-item-title cms-link ellipsis-2" target="_blank" href="/swordfish/docs/content/{{$vv.id}}" title="{{$vv.docName}}">{{$vv.docName}}</a>
+            </li>
+            {{end}}
+          </ul>
+        </li>
+      {{end}}
+    </ul>
+  </main>
+</section>

+ 21 - 1
src/web/templates/weixin/commonPay/paySuccess.html

@@ -134,6 +134,15 @@
                 查看订单
             </button>
         </div>
+    {{else if eq .T.doType "docMember"}}
+      <div class="bottom_button j-button-group">
+        <button id ="order" class="j-button-cancel" onclick="window.location.href = '/jyapp/common/{{.T.doType}}/orderDetail?order_code={{.T.orderCode}}'">
+            查看订单
+        </button>
+        <button id ="get-doc" class="j-button-confirm" onclick="getDocsJumpUrl()">
+          获取文档
+        </button>
+      </div>
     {{end}}
 </div>
 </body>
@@ -151,7 +160,7 @@
 //   }
   // 根据支付订单类型 加载广告位
     // 超级订阅、数据流量包、数据导出(线上支付方式)、课程产品
-    if (orderType === 'member' || orderType === 'subvip' || orderType === 'dataPack' || orderType === 'dataexport' || orderType === 'onlineCourse'|| orderType === 'course') {
+    if (orderType === 'member' || orderType === 'subvip' || orderType === 'dataPack' || orderType === 'dataexport' || orderType === 'onlineCourse'|| orderType === 'course' || orderType === 'docMember') {
         var Activedatastring = `xxx`
 
         switch (orderType) {
@@ -172,6 +181,8 @@
                 break;
             case 'member':
             Activedatastring = 'member'
+            case 'docMember':
+            Activedatastring = 'docMember'
             default:
                 break;
         }
@@ -406,6 +417,15 @@
         r = null;
         return context == null || context == "" || context == "undefined" ? "" : context;
     }
+    // 获取文档跳转逻辑
+    function getDocsJumpUrl() {
+       var url = sessionStorage.getItem('mobile-doc-buy-referrer')
+       if (url) {
+           location.replace(url)
+       } else {
+           location.replace('/page_docs_mobile/home')
+       }
+    }
 </script>
 {{include "/common/baiducc.html"}}
 </html>

Энэ ялгаанд хэт олон файл өөрчлөгдсөн тул зарим файлыг харуулаагүй болно