yuelujie 8 ماه پیش
والد
کامیت
2f4b916647
70فایلهای تغییر یافته به همراه2155 افزوده شده و 1353 حذف شده
  1. 1 1
      src/jfw/front/frontRouter.go
  2. 1 0
      src/jfw/front/login.go
  3. 1 1
      src/jfw/front/partner.go
  4. 4 1
      src/jfw/front/shorturl.go
  5. 23 6
      src/jfw/front/singleLogin.go
  6. 6 11
      src/jfw/front/swordfish.go
  7. 3 1
      src/jfw/front/tags.go
  8. 2 0
      src/jfw/modules/app/src/app/front/login.go
  9. 1 1
      src/jfw/modules/app/src/app/front/wx.go
  10. 127 0
      src/jfw/modules/app/src/web/templates/frontRouter/sunshine/free/index.html
  11. 2 1
      src/jfw/modules/bigmember/src/config.json
  12. 208 182
      src/jfw/modules/publicapply/src/attachmentdow/service/service.go
  13. 19 2
      src/jfw/modules/publicapply/src/config.json
  14. 16 1
      src/jfw/modules/publicapply/src/config/config.go
  15. 13 11
      src/jfw/modules/publicapply/src/consts/history.go
  16. 4 0
      src/jfw/modules/publicapply/src/detail/config.json
  17. 3 1
      src/jfw/modules/publicapply/src/detail/consts/consts.go
  18. 14 4
      src/jfw/modules/publicapply/src/detail/dao/advanced.go
  19. 73 37
      src/jfw/modules/publicapply/src/detail/dao/baseInfo.go
  20. 605 574
      src/jfw/modules/publicapply/src/detail/dao/bidding.go
  21. 4 0
      src/jfw/modules/publicapply/src/detail/entity/config.go
  22. 40 0
      src/jfw/modules/publicapply/src/detail/entity/entity.go
  23. 2 3
      src/jfw/modules/publicapply/src/detail/service/service.go
  24. 1 1
      src/jfw/modules/publicapply/src/history/entity/entity.go
  25. 1 1
      src/jfw/modules/publicapply/src/history/service/service.go
  26. 68 73
      src/jfw/modules/publicapply/src/oneclick/entity/entity.go
  27. 17 5
      src/jfw/modules/publicapply/src/userbase/entity/entity.go
  28. 20 17
      src/jfw/modules/publicapply/src/userbase/service/service.go
  29. 296 295
      src/jfw/modules/subscribepay/src/entity/basePack.go
  30. 8 2
      src/jfw/modules/subscribepay/src/service/basePack.go
  31. 16 35
      src/jfw/modules/subscribepay/src/service/userAccountInfo.go
  32. 2 1
      src/jfw/modules/weixin/src/config.json
  33. 23 11
      src/jfw/modules/weixin/src/config/config.go
  34. 80 0
      src/jfw/modules/weixin/src/tools/qrcode.go
  35. 3 19
      src/jfw/modules/weixin/src/wx/scanReplayStream.go
  36. 3 1
      src/jfw/modules/weixin/src/wx/wx.go
  37. 2 15
      src/jfw/modules/weixin/src/wx/wxjssdk.go
  38. 4 0
      src/seo.json
  39. 50 0
      src/web/staticres/common-module/perfect-info/js/perfect-info.js
  40. 6 0
      src/web/staticres/common-module/public/js/clipboard.min.js
  41. 129 0
      src/web/staticres/common-module/sunshine/css/index.css
  42. BIN
      src/web/staticres/common-module/sunshine/image/banner-title.png
  43. BIN
      src/web/staticres/common-module/sunshine/image/banner.png
  44. BIN
      src/web/staticres/common-module/sunshine/image/card-1.png
  45. BIN
      src/web/staticres/common-module/sunshine/image/card-2.png
  46. BIN
      src/web/staticres/common-module/sunshine/image/card-3.png
  47. 59 0
      src/web/staticres/common-module/sunshine/js/index.js
  48. 3 0
      src/web/staticres/common-module/vipsubscribe/js/vip-subscribe-set-template.js
  49. BIN
      src/web/staticres/commonFunctions/purchase-info.png
  50. BIN
      src/web/staticres/commonFunctions/purchase-manage.png
  51. BIN
      src/web/staticres/commonFunctions/purchase-release.png
  52. BIN
      src/web/staticres/commonFunctions/renmai_rmcpjs.png
  53. 22 5
      src/web/staticres/js/index/index_2023.12.js
  54. 9 10
      src/web/staticres/landingpage/css/InformationDistribution.css
  55. 3 3
      src/web/templates/frontRouter/pc/InformationDistribution/free/index.html
  56. 5 0
      src/web/templates/frontRouter/pc/declaration/free/relationship.html
  57. 1 1
      src/web/templates/frontRouter/pc/page_big_pc/sess/index.html
  58. 36 5
      src/web/templates/frontRouter/pc/serviceSystem/free/index.html
  59. 0 5
      src/web/templates/frontRouter/wx/declaration/free/relationship.html
  60. 105 0
      src/web/templates/frontRouter/wx/sunshine/free/index.html
  61. 1 1
      src/web/templates/pc/biddetail_rec.html
  62. 1 1
      src/web/templates/pc/detail/biddetail_login.html
  63. 1 1
      src/web/templates/pc/entsearchindex.html
  64. 1 1
      src/web/templates/pc/index.html
  65. 1 1
      src/web/templates/pc/index_old_23_06_16.html
  66. 1 1
      src/web/templates/pc/pursearchindex.html
  67. 1 1
      src/web/templates/pc/search/index.html
  68. 1 1
      src/web/templates/pc/supsearch.html
  69. 2 2
      src/web/templates/pc/tags/index.html
  70. 1 0
      src/web/templates/pc/template/index/search-module.html

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

@@ -230,7 +230,7 @@ func (this *CommonRouter) doPcBigPage(pageSign, types string) error {
 	//page := pageSign
 	userid, _ := this.GetSession("userId").(string)
 	//没有登录跳转登录页面(采购单位画像| 企业画像 除外)
-	if !strings.Contains(pageSign, "nzj") && !strings.Contains(pageSign, "supply") && !strings.Contains(pageSign, "unit_portrayal") && !strings.Contains(pageSign, "ent_portrait") && !strings.Contains(pageSign, "ent_ser_portrait") && userid == "" {
+	if !strings.Contains(pageSign, "nzj") && !strings.Contains(pageSign, "supply") && !strings.Contains(pageSign, "unit_portrayal") && !strings.Contains(pageSign, "ent_portrait") && !strings.Contains(pageSign, "ent_ser_portrait") && !strings.Contains(pageSign, "search/sun") && userid == "" {
 		return this.Redirect("/notin/page")
 	}
 	if userid == "" {

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

@@ -175,6 +175,7 @@ func (l *Login) Login() error {
 						"s_regsource": "pc",
 						"s_platform":  "pc",
 						"s_sourceid":  channelCode,
+						"s_rsource":   channelCode,
 					}
 					//注册邮箱
 					email := l.GetString("email")

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

@@ -41,7 +41,7 @@ func (p *Partner) PartnerInfo(source string) error {
 		loginUrl = util.ObjToString(shortInfo["url"])    //已登录用
 		noLoginUrl = util.ObjToString(shortInfo["href"]) //未登录
 		go func(source string) {
-			if ui := public.Mysql.UpdateOrDeleteBySql(`update short_url SET visits=visits+1 WHERE code = ?;`, source); ui <= 0 {
+			if ui := public.Mysql.UpdateOrDeleteBySql(`update short_url SET visits=visits+1 WHERE mold = 2 AND code = ?;`, source); ui <= 0 {
 				log.Println("update short_url visits false ,source:", source)
 			}
 		}(source)

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

@@ -1385,6 +1385,10 @@ func (s *Short) NologinCommon(userId, stype, id, sid string, isMobile bool) erro
 		s.DisableHttpCache()
 		po, bo, wo, obj := pcVRT(sid, industry, stype, false, false)
 		if obj != nil && len(obj) > 0 {
+			//阳光采购 网站的数据 未登录不能访问
+			if util.InterfaceToStr(obj["infoattribute"]) == "zc_cgxx" { //&& util.IntAll(obj["is_yg_new"]) == 1
+				return s.Redirect("/", 301)
+			}
 			// p397 未登录不能查看拟建项目
 			if !ipTrue && (obj["subtype"] == "采购意向" || obj["subtype"] == "拟建") { //未登录拟建 采购意向 遮罩
 				obj = map[string]interface{}{
@@ -1447,7 +1451,6 @@ func (s *Short) NologinCommon(userId, stype, id, sid string, isMobile bool) erro
 	} else {
 		return s.SetBody([]byte(res.(string)))
 	}
-	return nil
 }
 
 /*

+ 23 - 6
src/jfw/front/singleLogin.go

@@ -144,19 +144,36 @@ func (this *SingleLogin) KeyPhrases(key string) error {
 
 // ShortUrl
 // 短地址跳转
-func (this *SingleLogin) ShortUrl(key string) error {
+func (this *SingleLogin) ShortUrl(source string) error {
 	defer qutil.Catch()
-	var redirectUrl = "/swordfish/about"
-	if key != "" {
-		shortUrls := public.Mysql.SelectBySql(`SELECT * FROM short_url WHERE mold = 1 AND code = ?`, key)
+	var (
+		noLoginUrl = fmt.Sprintf("/swordfish/about?partner=%s", source)
+		loginUrl   = noLoginUrl
+	)
+	if source != "" {
+		shortUrls := public.Mysql.SelectBySql(`SELECT * FROM short_url WHERE mold = 1 AND code = ?`, source)
 		if shortUrls != nil && len(*shortUrls) > 0 {
 			shortUrl := (*shortUrls)[0]
 			if qutil.ObjToString(shortUrl["url"]) != "" {
-				redirectUrl = qutil.ObjToString(shortUrl["url"])
+				loginUrl = qutil.ObjToString(shortUrl["url"])
+			}
+			if qutil.ObjToString(shortUrl["href"]) != "" {
+				noLoginUrl = qutil.ObjToString(shortUrl["href"])
 			}
+			go func(source string) {
+				if ui := public.Mysql.UpdateOrDeleteBySql(`update short_url SET visits=visits+1 WHERE mold = 1 AND code = ? ;`, source); ui <= 0 {
+					log.Println("update short_url visits false ,source:", source)
+				}
+			}(source)
 		}
 	}
-	return this.Redirect(redirectUrl)
+	//未登录
+	if userId, _ := this.GetSession("userId").(string); userId == "" {
+		jy.SetCookieValue(this.ResponseWriter, jy.ChannelCookieName, source, cacheTimeOut)                      //三天
+		redis.Put("limitation", fmt.Sprintf("firstVisitTagByWX_%s", this.Session().Id()), source, cacheTimeOut) //登录注册 用户标识
+		return this.Redirect(noLoginUrl)
+	}
+	return this.Redirect(loginUrl)
 }
 
 // SingleLogin

+ 6 - 11
src/jfw/front/swordfish.go

@@ -16,13 +16,13 @@ import (
 	"strings"
 	"time"
 
-	. "app.yhyue.com/moapp/jybase/date"
-	. "app.yhyue.com/moapp/jybase/mongodb"
 	util "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"
 	"app.yhyue.com/moapp/jybase/go-xweb/httpsession"
 	"app.yhyue.com/moapp/jybase/go-xweb/xweb"
+	. "app.yhyue.com/moapp/jybase/mongodb"
 	"app.yhyue.com/moapp/jybase/redis"
 	"app.yhyue.com/moapp/jypkg/common/src/qfw/util/bidsearch"
 	"app.yhyue.com/moapp/jypkg/common/src/qfw/util/jy"
@@ -768,16 +768,11 @@ func wxvisitD(sid, userId, openId, content string, isPayUser bool) (objdata map[
 
 // wx pc obj字段统一处理
 func ObjData(isPayUser bool, sid, content string, lent int) (t bool, obj map[string]interface{}) {
-	brobj, ok := mongodb.Find("bidding_rec", bson.M{"s_id": sid}, `{"l_recoverydate":-1}`, nil, false, 0, 1)
-	if ok && (*brobj) != nil && len(*brobj) == 1 && (*brobj)[0] != nil {
-		obj = (*brobj)[0]
-	} else {
-		aobj, ok := public.Mgo_Bidding.FindById(public.DbConf.Mongodb.Bidding.Collection, sid, nil)
-		if ok && (aobj == nil || *aobj == nil || len(*aobj) == 0) {
-			aobj, ok = public.Mgo_Bidding.FindById(public.DbConf.Mongodb.Bidding.Collection_back, sid, nil)
-		}
-		obj = *aobj
+	aobj, ok := public.Mgo_Bidding.FindById(public.DbConf.Mongodb.Bidding.Collection, sid, nil)
+	if ok && (aobj == nil || *aobj == nil || len(*aobj) == 0) {
+		aobj, ok = public.Mgo_Bidding.FindById(public.DbConf.Mongodb.Bidding.Collection_back, sid, nil)
 	}
+	obj = *aobj
 	if ok && obj != nil && len(obj) > lent {
 		t = true
 		if !isPayUser && (content != "indexcontent") && (util.ObjToString(obj["subtype"]) == "拟建" || util.ObjToString(obj["subtype"]) == "采购意向") {

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

@@ -472,7 +472,9 @@ var (
 
 // 获取最新招标信息
 func (this *Tags) GetNewBidInfo() (list []map[string]interface{}) {
-	var ri int
+	var (
+		ri int
+	)
 	var newBidInfos = func() (list []map[string]interface{}) {
 		// p397 未登录详情页最新招投标信息去掉拟建
 		var (

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

@@ -303,6 +303,7 @@ func (l *Login) Login() error {
 						},
 						"s_platform": "app",
 						"s_sourceid": channelCode,
+						"s_rsource":  channelCode,
 					}
 					// 新用户注册 记录来源
 					sourceLabel := redis.GetStr("limitation", fmt.Sprintf("firstVisitTagByWX_%s", l.Session().Id()))
@@ -874,6 +875,7 @@ func (l *Login) WxLogin() {
 				"s_platform": "app",                                                               //用户注册平台 app 微信 pc
 				"s_jyname":   jy.GetUserName("newother", config.Sysconfig["namePrefix"].(string)), //剑鱼昵称
 				"s_sourceid": channelCode,
+				"s_rsource":  channelCode,
 			}
 			sourceLabel := redis.GetStr("limitation", fmt.Sprintf("firstVisitTagByWX_%s", l.Session().Id()))
 			if sourceLabel != "" {

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

@@ -69,7 +69,7 @@ func (w *WX) Index(pageLabel string) error {
 		loginUrl = util.ObjToString(shortInfo["url"])    //已登录用
 		noLoginUrl = util.ObjToString(shortInfo["href"]) //未登录
 		go func(pageLabel string) {
-			if ui := public.Mysql.UpdateOrDeleteBySql(`update short_url SET visits=visits+1 WHERE code = ?;`, pageLabel); ui <= 0 {
+			if ui := public.Mysql.UpdateOrDeleteBySql(`update short_url SET visits=visits+1 WHERE mold = 1 AND code = ?;`, pageLabel); ui <= 0 {
 				log.Println("update short_url visits false ,source:", pageLabel)
 			}
 		}(pageLabel)

+ 127 - 0
src/jfw/modules/app/src/web/templates/frontRouter/sunshine/free/index.html

@@ -0,0 +1,127 @@
+<!DOCTYPE html>
+<html lang="zh-CN">
+
+<head>
+	<meta charset="utf-8">
+  <title>阳光直采_剑鱼标讯阳光采购服务</title>
+  <meta name="keywords" content="阳光采购,采购服务,阳光直采" />
+  <meta name="description" content="剑鱼标讯阳光采购服务,简称“阳光直采”,是剑鱼标讯旗下的数字化采购服务平台,为企业提供物资采购数字化解决方案,推动企业采购更加智能、高效、透明,赋能企业经营发展降本提效。" />
+  <meta name="author" content="剑鱼标讯">
+  <meta http-equiv="X-UA-Compatible" content="IE=edge">
+  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
+  <meta name="browsermode" content="application">
+  <meta name="x5-orientation" content="portrait">
+  <meta name="screen-orientation" content="portrait">
+  <meta name="x5-page-mode" content="app">
+  <meta name="apple-mobile-web-app-capable" content="yes">
+  <meta name="apple-mobile-web-app-status-bar-style" content="black">
+  <meta name="format-detection" content="telephone=no">
+  <link rel="icon" href="/favicon.ico">
+  <script src='https://cdn-common.jianyu360.com/cdn/lib/jquery/3.6.0/jquery.min.js'></script>
+  <script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/public/head.js?v={{Msg "seo" "version"}}'></script>
+
+  <!--S-必定会使用的资源-->
+  <link rel="stylesheet" href="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/big-member/css/public.css?v={{Msg "seo" "version"}}" />
+  <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}}/jyapp/vipsubscribe/iconfont/iconfont.css?v={{Msg "seo" "version"}}" />
+  <!--S-当前页必定需要预加载的资源-->
+  <link rel="preload" as="style" href=//cdn-common.jianyu360.com/cdn/lib/reset-css/5.0.1/reset.min.css />
+
+  <!--E-当前页必定需要预加载的资源-->
+
+  <!--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='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/sunshine/css/index.css?v={{Msg "seo" "version"}}' />
+  <style>
+    .jy-app-header{
+      background-color: #fff!important;
+      color: #1d1d1d;
+    }
+    .jy-app-header.header-transparent {
+      position: absolute;
+      width: 100%;
+      background-color: transparent!important;
+      color: #fff;
+    }
+  </style>
+
+</head>
+
+<body>
+  <div class="j-container sunshine-purchase">
+    <div class="j-header jy-app-header header-transparent">
+      <span class="header-left">
+        <span class="icon-back j-icon base-icon"></span>
+        <span class="icon-back-white j-icon base-icon"></span>
+      </span>
+      <span class="header-title"></span>
+      <span class="header-right"></span>
+    </div>
+    <div class="j-main">
+       <div class="sunshine-banner">
+         <img class="banner-title" src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/sunshine/image/banner-title.png?v={{Msg "seo" "version"}}' alt="banner-title">
+         <p class="banner-text">赋能企业经营发展降本提效</p>
+       </div>
+       <div class="sunshine-doc">
+        <h1 class="sunshine-doc-h1">剑鱼标讯阳光采购服务</h1>
+        <p class="sunshine-doc-p">
+          为企业提供企业生产性及非生产性物资采购数字化解决方案,<br>
+          推动企业采购更加智能、高效、透明,赋能企业经营 发展降本提效
+        </p>
+       </div>
+       <div class="sunshine-module">
+        <div class="module-title">采购支出成本降低15%</div>
+        <div class="module-main">
+          <img src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/sunshine/image/card-1.png?v={{Msg "seo" "version"}}'>
+          <div class="j-button-common j-button-free">免费体验</div>
+        </div>
+       </div>
+       <div class="sunshine-module">
+        <div class="module-title">工作效率提升47%</div>
+        <div class="module-main">
+          <img src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/sunshine/image/card-2.png?v={{Msg "seo" "version"}}'>
+          <div class="j-button-common j-button-free">免费体验</div>
+        </div>
+       </div>
+       <div class="sunshine-module">
+        <div class="module-title">完善供应商库</div>
+        <div class="module-main">
+          <img src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/sunshine/image/card-3.png?v={{Msg "seo" "version"}}'>
+          <div class="j-button-common j-button-free">免费体验</div>
+        </div>
+       </div>
+    </div>
+    <div class="j-footer j-button-group">
+      <div class="j-button-confirm j-button-copy">去网页版发布</div>
+      <div class="j-button-common j-button-kf">联系客服发布</div>
+    </div>
+  </div>
+</body>
+<script>
+  // 登录状态
+  var loginFlag = {{if .T.loginFlag}}{{.T.loginFlag}}{{else}}false{{end}}
+</script>
+<script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/local/rem.js?v={{Msg "seo" "version"}}'></script>
+<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='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/public/js/utils.js?v={{Msg "seo" "version"}}'></script>
+<script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/local/clipboard.min.js?v={{Msg "seo" "version"}}'></script>
+<script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/sunshine/js/index.js?v={{Msg "seo" "version"}}'></script>
+<!--百度统计end-->
+{{include "/common/baiducc.html"}}
+<script>
+  utils.iosBackRefresh()
+  // 头部事件js
+  // goBack写外面方便随时解绑
+  function goBack() {
+      history.back()
+      window.afterClickBack && window.afterClickBack()
+  }
+  (function () {
+      try {
+          document.querySelector('.j-header .header-left').addEventListener('click', goBack)
+      } catch (error) {}
+  })()
+</script>
+</html>

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

@@ -188,7 +188,8 @@
   "attachmentResPower": [
     "bi_sj_sjqk",
     "bi_sf_sjqd",
-    "bi_sj_yyszs"
+    "bi_sj_yyszs",
+    "ygzc_cgxx"
   ],
   "msgMaxCount": 20000,
   "analysisPDFPhone": "13027620557",

+ 208 - 182
src/jfw/modules/publicapply/src/attachmentdow/service/service.go

@@ -1,199 +1,225 @@
 package service
 
 import (
-	"encoding/json"
-	"fmt"
-	"jy/src/jfw/modules/publicapply/src/config"
-	"jy/src/jfw/modules/publicapply/src/db"
-	"jy/src/jfw/modules/publicapply/src/util"
-	"log"
-	"time"
+    "encoding/json"
+    "fmt"
+    "jy/src/jfw/modules/publicapply/src/config"
+    "jy/src/jfw/modules/publicapply/src/db"
+    "jy/src/jfw/modules/publicapply/src/util"
+    "log"
+    "time"
 
-	. "app.yhyue.com/moapp/jybase/api"
-	qu "app.yhyue.com/moapp/jybase/common"
-	"app.yhyue.com/moapp/jybase/encrypt"
-	"app.yhyue.com/moapp/jybase/redis"
-	"app.yhyue.com/moapp/jypkg/common/src/qfw/util/jy"
+    . "app.yhyue.com/moapp/jybase/api"
+    qu "app.yhyue.com/moapp/jybase/common"
+    "app.yhyue.com/moapp/jybase/encrypt"
+    "app.yhyue.com/moapp/jybase/redis"
+    "app.yhyue.com/moapp/jypkg/common/src/qfw/util/jy"
 
-	"app.yhyue.com/moapp/jybase/go-xweb/xweb"
+    "app.yhyue.com/moapp/jybase/go-xweb/xweb"
 )
 
 type Dow struct {
-	*xweb.Action
-	subdow                 xweb.Mapper `xweb:"/attachment/get"`        //超级订阅附件下载
-	supplyInfoFileDownload xweb.Mapper `xweb:"/attachment/supplyInfo"` //供应信息附件下载
+    *xweb.Action
+    subdow                 xweb.Mapper `xweb:"/attachment/get"`        //超级订阅附件下载
+    supplyInfoFileDownload xweb.Mapper `xweb:"/attachment/supplyInfo"` //供应信息附件下载
 }
 
-//供应信息 附件下载
+// 供应信息 附件下载
 func (u *Dow) SupplyInfoFileDownload() {
-	if !R.CheckReqParam(u.ResponseWriter, u.Request, "msgId", "fileName") {
-		return
-	}
-	r := func() Result {
-		userid := qu.ObjToString(u.GetSession("userId"))
-		if userid == "" {
-			return Result{Data: nil, Error_msg: "未登录"}
-		}
-		BaseMsg := jy.GetBigVipUserBaseMsg(u.Session(), *config.Middleground)
-		vipStatus := jy.GetVipState(u.Session(), *config.Middleground, userid)
-		isPower := false
-		//大会员下载权限判断
-		if BaseMsg.Status > 0 && BaseMsg.PowerMap[3] {
-			isPower = true
-		}
-		//超级订阅用户下载
-		var viper = false
-		var mon = fmt.Sprintf(jy.VipFileUploadNumKey, userid, fmt.Sprint(time.Now().Month()))
-		var ss = redis.GetInt(jy.PowerCacheDb, mon)
-		if !isPower && BaseMsg.VipStatus > 0 && BaseMsg.Vip_BuySet.Upgrade == 1 {
-			if config.Config.File_number <= ss {
-				return Result{Data: nil, Error_msg: "您本月查看机会已经消耗完毕,如需要更多服务,请前往联系客服。"}
-			}
-			isPower = true
-			viper = true
-		}
-		if !vipStatus.IsPayedUser() {
-			//判断免费用户是否有留资下载权限
-			if _, _, freeFileNum := jy.FreeExperience(userid); freeFileNum == 1 {
-				isPower = true
-			}
-		}
-		if !isPower {
-			return Result{Data: nil, Error_msg: "该用户没有下载权限"}
-		}
-		//前端传的是加密的id 需要解密
-		msgId := encrypt.SE.DecodeString(u.GetString("msgId")) //信息id
-		if msgId == "" {
-			return Result{Data: nil, Error_msg: "信息id错误"}
-		}
-		fileName := u.GetString("fileName")
-		//查数据
-		data := db.MysqlSupplyInfo.FindOne("supply_info", map[string]interface{}{"id": msgId}, "", "")
-		if *data == nil {
-			return Result{Data: nil, Error_msg: "数据查询失败"}
-		}
-		if (*data)["attach"] == nil {
-			return Result{Data: nil, Error_msg: "暂无附件"}
-		}
-		var res map[string]interface{}
-		attach_str := qu.ObjToString((*data)["attach"])
-		var attachMap map[string]interface{}
-		err := json.Unmarshal([]byte(attach_str), &attachMap)
-		if err != nil {
-			log.Println("err:", err)
-		}
-		for _, v := range attachMap {
-			fileMap := qu.ObjToMap(v)
-			if fileName == qu.ObjToString((*fileMap)["filename"]) {
-				res = map[string]interface{}{
-					"url": (*fileMap)["ossurl"],
-					"fid": (*fileMap)["fid"],
-				}
-			}
-		}
-		//超级订阅
-		if viper {
-			//下载后自增一次 默认存储31d
-			if ss == 0 {
-				redis.Put(jy.PowerCacheDb, mon, 1, 60*60*24*31)
-			} else {
-				redis.Incr(jy.PowerCacheDb, mon)
-			}
-		} else if !vipStatus.IsPayedUser() {
-			//免费用户下载后取消下载权限
-			redis.PutKV(fmt.Sprintf(jy.PowerCacheFileKey, userid), -1)
-		}
-		return Result{Data: res}
-	}()
-	u.ServeJson(r)
+    if !R.CheckReqParam(u.ResponseWriter, u.Request, "msgId", "fileName") {
+        return
+    }
+    r := func() Result {
+        userid := qu.ObjToString(u.GetSession("userId"))
+        if userid == "" {
+            return Result{Data: nil, Error_msg: "未登录"}
+        }
+        BaseMsg := jy.GetBigVipUserBaseMsg(u.Session(), *config.Middleground)
+        vipStatus := jy.GetVipState(u.Session(), *config.Middleground, userid)
+        isPower := false
+        //大会员下载权限判断
+        if BaseMsg.Status > 0 && BaseMsg.PowerMap[3] {
+            isPower = true
+        }
+        //超级订阅用户下载
+        var viper = false
+        var mon = fmt.Sprintf(jy.VipFileUploadNumKey, userid, fmt.Sprint(time.Now().Month()))
+        var ss = redis.GetInt(jy.PowerCacheDb, mon)
+        if !isPower && BaseMsg.VipStatus > 0 && BaseMsg.Vip_BuySet.Upgrade == 1 {
+            if config.Config.File_number <= ss {
+                return Result{Data: nil, Error_msg: "您本月查看机会已经消耗完毕,如需要更多服务,请前往联系客服。"}
+            }
+            isPower = true
+            viper = true
+        }
+        if !vipStatus.IsPayedUser() {
+            //判断免费用户是否有留资下载权限
+            if _, _, freeFileNum := jy.FreeExperience(userid); freeFileNum == 1 {
+                isPower = true
+            }
+        }
+        if !isPower {
+            return Result{Data: nil, Error_msg: "该用户没有下载权限"}
+        }
+        //前端传的是加密的id 需要解密
+        msgId := encrypt.SE.DecodeString(u.GetString("msgId")) //信息id
+        if msgId == "" {
+            return Result{Data: nil, Error_msg: "信息id错误"}
+        }
+        fileName := u.GetString("fileName")
+        //查数据
+        data := db.MysqlSupplyInfo.FindOne("supply_info", map[string]interface{}{"id": msgId}, "", "")
+        if *data == nil {
+            return Result{Data: nil, Error_msg: "数据查询失败"}
+        }
+        if (*data)["attach"] == nil {
+            return Result{Data: nil, Error_msg: "暂无附件"}
+        }
+        var res map[string]interface{}
+        attach_str := qu.ObjToString((*data)["attach"])
+        var attachMap map[string]interface{}
+        err := json.Unmarshal([]byte(attach_str), &attachMap)
+        if err != nil {
+            log.Println("err:", err)
+        }
+        for _, v := range attachMap {
+            fileMap := qu.ObjToMap(v)
+            if fileName == qu.ObjToString((*fileMap)["filename"]) {
+                res = map[string]interface{}{
+                    "url": (*fileMap)["ossurl"],
+                    "fid": (*fileMap)["fid"],
+                }
+            }
+        }
+        //超级订阅
+        if viper {
+            //下载后自增一次 默认存储31d
+            if ss == 0 {
+                redis.Put(jy.PowerCacheDb, mon, 1, 60*60*24*31)
+            } else {
+                redis.Incr(jy.PowerCacheDb, mon)
+            }
+        } else if !vipStatus.IsPayedUser() {
+            //免费用户下载后取消下载权限
+            redis.PutKV(fmt.Sprintf(jy.PowerCacheFileKey, userid), -1)
+        }
+        return Result{Data: res}
+    }()
+    u.ServeJson(r)
 }
 
-//超级订阅 附件下载
+type powerInfo struct {
+    Name    string `json:"name"`
+    IsPower bool   `json:"isPower"`
+}
+
+// 超级订阅 附件下载
 func (u *Dow) Subdow() {
-	if !R.CheckReqParam(u.ResponseWriter, u.Request, "infoId") {
-		return
-	}
-	r := func() Result {
-		userid := qu.ObjToString(u.GetSession("userId"))
-		if userid == "" {
-			return Result{Data: nil, Error_msg: "未登录"}
-		}
-		BaseMsg := jy.GetBigVipUserBaseMsg(u.Session(), *config.Middleground)
-		vipStatus := jy.GetVipState(u.Session(), *config.Middleground, userid)
-		var (
-			mon string
-			ss  int
-			mg  bool
-		)
-		//前端传的是加密的id 需要解密
-		infoId := util.DecodeId(u.GetString("infoId")) //"5ddf222ce9d1f601e469e00c  5f50c37dc0145440737556d0"
-		// 调用rpc
-		req := util.JyMemberRequest{infoId}
-		rep, err := util.Attachment(&req)
-		if err != nil {
-			return Result{Data: nil, Error_msg: "rpc调用失败"}
-		}
-		if rep.Rep == nil {
-			rep.Rep = []map[string]interface{}{}
-		}
+    if !R.CheckReqParam(u.ResponseWriter, u.Request, "infoId") {
+        return
+    }
+    r := func() Result {
+        userid := qu.ObjToString(u.GetSession("userId"))
+        if userid == "" {
+            return Result{Data: nil, Error_msg: "未登录"}
+        }
+        var (
+            mon, powerCode string
+            ss             int
+            mg             bool
+        )
+        BaseMsg := jy.GetBigVipUserBaseMsg(u.Session(), *config.Middleground)
+        vipStatus := jy.GetVipState(u.Session(), *config.Middleground, userid)
+        //前端传的是加密的id 需要解密
+        infoId := util.DecodeId(u.GetString("infoId")) //"5ddf222ce9d1f601e469e00c  5f50c37dc0145440737556d0"
+        // 调用rpc
+        req := util.JyMemberRequest{infoId}
+        rep, err := util.Attachment(&req)
+        if err != nil {
+            return Result{Data: nil, Error_msg: "rpc调用失败"}
+        }
+        if rep.Rep == nil {
+            rep.Rep = []map[string]interface{}{}
+        }
+
+        m := rep.Rep
+        data := make(map[string]interface{})
+        //大会员下载权限判断
+        if BaseMsg.Status > 0 && BaseMsg.PowerMap[3] {
+            mg = true
+            data["p_type"] = "大会员用户附件下载"
+            goto env
+        } else if BaseMsg.VipStatus > 0 && BaseMsg.Vip_BuySet.Upgrade == 1 {
+            //超级订阅用户下载
+            mon = fmt.Sprintf(jy.VipFileUploadNumKey, userid, fmt.Sprint(time.Now().Month()))
+            ss = redis.GetInt(jy.PowerCacheDb, mon)
+            if config.Config.File_number <= ss {
+                return Result{Data: nil, Error_msg: "您本月查看机会已经消耗完毕,如需要更多服务,请前往联系客服。"}
+            }
+            //下载后自增一次 默认存储31d
+            if ss == 0 {
+                redis.Put(jy.PowerCacheDb, mon, 1, 60*60*24*31)
+            } else {
+                redis.Incr(jy.PowerCacheDb, mon)
+            }
+            mg = true
+            data["p_type"] = "超级订阅用户附件下载"
+        } else if !vipStatus.IsPayedUser() {
+            attachmentResPower := map[string]powerInfo{}
+            resResp := config.Middleground.ResourceCenter.Haspowers(qu.Int64All(u.GetSession("accountId")), qu.Int64All(u.GetSession("entAccountId")), qu.Int64All(u.GetSession("entId")), qu.Int64All(u.GetSession("entUserId")))
+            if resResp != nil && len(resResp.Powers) > 0 {
+                for _, v := range config.Config.AttachmentResPower {
+                    attachmentResPower[v.Code] = powerInfo{
+                        IsPower: true,
+                        Name:    v.Name,
+                    }
+                }
+                for _, v := range resResp.Powers {
+                    if attachmentResPower[v].IsPower {
+                        powerCode = v
+                        break
+                    }
+                }
 
-		m := rep.Rep
-		data := make(map[string]interface{})
-		//大会员下载权限判断
-		if BaseMsg.Status > 0 && BaseMsg.PowerMap[3] {
-			mg = true
-			data["p_type"] = "大会员用户附件下载"
-			goto env
-		}
-		//超级订阅用户下载
-		if BaseMsg.VipStatus > 0 && BaseMsg.Vip_BuySet.Upgrade == 1 {
-			mon = fmt.Sprintf(jy.VipFileUploadNumKey, userid, fmt.Sprint(time.Now().Month()))
-			ss = redis.GetInt(jy.PowerCacheDb, mon)
-			if config.Config.File_number <= ss {
-				return Result{Data: nil, Error_msg: "您本月查看机会已经消耗完毕,如需要更多服务,请前往联系客服。"}
-			}
-			//下载后自增一次 默认存储31d
-			if ss == 0 {
-				redis.Put(jy.PowerCacheDb, mon, 1, 60*60*24*31)
-			} else {
-				redis.Incr(jy.PowerCacheDb, mon)
-			}
-			mg = true
-			data["p_type"] = "超级订阅用户附件下载"
-		} else if !vipStatus.IsPayedUser() {
-			//判断免费用户是否有留资下载权限
-			if _, _, freeFileNum := jy.FreeExperience(userid); freeFileNum == 1 {
-				//免费用户下载后取消下载权限
-				redis.PutKV(fmt.Sprintf(jy.PowerCacheFileKey, userid), -1)
-			} else {
-				//免费用户下载
-				for _, v := range m {
-					for k, _ := range v {
-						if k != "filename" && k != "size" {
-							delete(v, k)
-						}
-					}
-				}
-			}
-		} else {
-			return Result{Data: nil, Error_msg: "该用户没有下载权限"}
-		}
+            }
+            if powerCode != "" && attachmentResPower[powerCode].IsPower {
+                mg = true
+                data["p_type"] = fmt.Sprintf("%s用户附件下载", attachmentResPower[powerCode].Name)
+            } else {
+                //判断免费用户是否有留资下载权限
+                if _, _, freeFileNum := jy.FreeExperience(userid); freeFileNum == 1 {
+                    //免费用户下载后取消下载权限
+                    redis.PutKV(fmt.Sprintf(jy.PowerCacheFileKey, userid), -1)
+                } else {
+                    //免费用户下载
+                    for _, v := range m {
+                        for k, _ := range v {
+                            if k != "filename" && k != "size" {
+                                delete(v, k)
+                            }
+                        }
+                    }
+                }
+            }
+        } else {
+            return Result{Data: nil, Error_msg: "该用户没有下载权限"}
+        }
 
-	env:
-		//大会员和超级订阅用户下载存库记录
-		if mg {
-			data["p_userid"] = userid
-			data["p_infoId"] = infoId
-			data["p_create_time"] = time.Now().Unix()
-			data["p_rep"] = rep
-			//存库记录
-			db.Mgo.Save("filehistroy", data)
-			log.Printf("超级订阅用户%s,%s月第%d次下载附件", userid, mon, ss+1)
-		}
-		return Result{Data: map[string]interface{}{
-			"attachment": m,
-			"len":        len(rep.Rep),
-		}}
-	}()
-	u.ServeJson(r)
+    env:
+        //大会员和超级订阅用户下载存库记录
+        if mg {
+            data["p_userid"] = userid
+            data["p_infoId"] = infoId
+            data["p_create_time"] = time.Now().Unix()
+            data["p_rep"] = rep
+            //存库记录
+            db.Mgo.Save("filehistroy", data)
+            log.Printf("超级订阅用户%s,%s月第%d次下载附件", userid, mon, ss+1)
+        }
+        return Result{Data: map[string]interface{}{
+            "attachment": m,
+            "len":        len(rep.Rep),
+        }}
+    }()
+    u.ServeJson(r)
 }

+ 19 - 2
src/jfw/modules/publicapply/src/config.json

@@ -56,8 +56,16 @@
     "free": 0
   },
   "tipInfo": {
-    "box_moving": 1670774400,
-    "box_rename": 1691978195
+    "box_moving": {
+      "registrationDate": 1670774400
+    },
+    "box_rename":  {
+      "registrationDate": 1691978195
+    },
+    "sunshine_guide": {
+      "startData": 1,
+      "endData": 1739819137
+    }
   },
   "filterReg": [
     "(项目|公告|公示)$",
@@ -72,6 +80,7 @@
   "accountMergeOnline": "2015-03-30 00:00:00",
   "criticality":2,
   "taskStartTime":1698020000,
+<<<<<<< HEAD
   "configuration": {
     "bulletFrameStart": 1698020000,
     "bulletFrameEnd": 1698020000
@@ -79,4 +88,12 @@
   "frequentContinuous": 2,
   "screenNumb": 2,
   "stayTime ": 5
+=======
+  "attachmentResPower": [
+    {
+      "name": "阳光直采",
+      "code": "ygzc_cgxx"
+    }
+  ]
+>>>>>>> master
 }

+ 16 - 1
src/jfw/modules/publicapply/src/config/config.go

@@ -42,7 +42,7 @@ type config struct {
 		Free       int //免费用户 0个
 	}
 	ExhibitionLog      string
-	TipInfo            map[string]int64
+	TipInfo            map[string]tipInfo
 	FilterReg          []string
 	EntSearchLimit     int64
 	AppPushServiceRpc  string
@@ -52,11 +52,26 @@ type config struct {
 	AccountMergeOnline string `json:"accountMergeOnline"`
 	Criticality        int    `json:"criticality"`
 	TaskStartTime      int64
+<<<<<<< HEAD
 	Configuration      map[string]interface{}
 	ScreenNumb         int64
 	FrequentContinuous int64
 	StayTime           int64
+=======
+	AttachmentResPower []struct {
+		Name string `json:"name"`
+		Code string `json:"code"`
+	} `json:"attachmentResPower"`
+>>>>>>> master
 }
+
+type tipInfo struct {
+	State            int64 `json:"state"`            //默认0:有效;1:无效
+	RegistrationDate int64 `json:"registrationDate"` //注册时间
+	StartData        int64 `json:"startData"`        //弹窗开始时间
+	EndData          int64 `json:"endData"`          //弹窗结束时间
+}
+
 type BidColl struct {
 	PayUserCollLimit      int    //付费用户收藏数量最大限制
 	FreeUserCollLimit     int    //免费用户收藏数量最大限制

+ 13 - 11
src/jfw/modules/publicapply/src/consts/history.go

@@ -1,21 +1,23 @@
 package consts
 
 const (
-	TypeSearch      = "1" // 标讯搜索历史记录
-	TypeEntSearch   = "2" // 企业历史搜索
-	TypeEntView     = "3" // 企业历史浏览
-	TypeBuyerSearch = "4" // 采购单位历史搜索
-	TypeBuyerView   = "5" // 采购单位历史浏览
-	RedisName       = "other"
+	TypeSearch         = "1" // 标讯搜索历史记录
+	TypeEntSearch      = "2" // 企业历史搜索
+	TypeEntView        = "3" // 企业历史浏览
+	TypeBuyerSearch    = "4" // 采购单位历史搜索
+	TypeBuyerView      = "5" // 采购单位历史浏览
+	TypeZXPurchaseView = "6" //直采-采购信息历史搜索
+	RedisName          = "other"
 )
 
 var (
 	// HistoryRedisKeyMap 历史记录对应的Rediskey
 	HistoryRedisKeyMap = map[string]string{
-		TypeSearch:      "s_%s",
-		TypeEntSearch:   "history_ent_s_%s",
-		TypeEntView:     "history_ent_v_%s",
-		TypeBuyerSearch: "history_buyer_s_%s",
-		TypeBuyerView:   "history_buyer_v_%s",
+		TypeSearch:         "s_%s",
+		TypeEntSearch:      "history_ent_s_%s",
+		TypeEntView:        "history_ent_v_%s",
+		TypeBuyerSearch:    "history_buyer_s_%s",
+		TypeBuyerView:      "history_buyer_v_%s",
+		TypeZXPurchaseView: "history_purchase_v_%s",
 	}
 )

+ 4 - 0
src/jfw/modules/publicapply/src/detail/config.json

@@ -156,5 +156,9 @@
   },
   "active": {
     "url": "https://mp.weixin.qq.com/s?__biz=Mzk0MjIyMzY2Nw==&mid=2247497302&idx=1&sn=a199495eae763f055a23056f66250ec7&chksm=c2c4ce0af5b3471cace36ae9922d57095f76642b828c2ba0765739e23b1893c3ccb0084c04dc#rd"
+  },
+  "purchaseInfo": {
+    "name": "阳光直采",
+    "code": "zc_cgxx"
   }
 }

+ 3 - 1
src/jfw/modules/publicapply/src/detail/consts/consts.go

@@ -46,12 +46,13 @@ var (
 	MobileReg           = regexp.MustCompile("(?i)(Android|Mobile|Phone)")
 	SuffixMsgT          = "_SX"
 	NotLoginPage        = "/notin/page"
-	CacheKey            = "jydetail_%s_%s_%s_%s"
+	CacheKey            = "jydetail_%s_%s_%s_%s_new"
 	MinCacheKey         = "jydetail_min_%s_%s"
 	AheadCacheKey       = "jyahead_%s_%s"
 	PSCacheKey          = "jydetail_project_schedule_%s"
 	QyxyEntNameCacheKey = "jydetail_qyxy_%s"
 	CustomerCacheKey    = "jydetail_customer_%s_%s_%s"
+	CacheAdvanceKey     = "jydetail_advance_%s"
 	TokenLen            = 5
 	TypeCodeMap         = map[string]string{
 		"拟建":   "拟建项目",
@@ -119,4 +120,5 @@ var (
 			}
 		}
 	}
+	NoPower = "freeView"
 )

+ 14 - 4
src/jfw/modules/publicapply/src/detail/dao/advanced.go

@@ -34,7 +34,7 @@ type Advanced struct {
 	IsMobile  bool                 //
 }
 
-func NewAdvancedInfo(id, pageType, detailKey string, ui util.SessUserInfo, sess *httpsession.Session, r *http.Request) *Advanced {
+func NewAdvancedInfo(id, pageType, detailKey string, ui util.SessUserInfo, sess *httpsession.Session, r *http.Request, token string) *Advanced {
 	ad := &Advanced{
 		Id:        id,
 		PageType:  pageType,
@@ -44,15 +44,25 @@ func NewAdvancedInfo(id, pageType, detailKey string, ui util.SessUserInfo, sess
 		UserPower: jy.GetBigVipUserBaseMsg(sess, *config.Middleground),
 		BidInfo: &entity.BidInfo{
 			BaseInfo: &entity.BidBaseInfo{},
-			Abstract: &entity.Abstract{},
+			Abstract: &entity.Abstract{
+				Default: &entity.Default{
+					WinnerInfos:    []entity.WinnerInfo{},
+					WinnerSeoMap:   map[string]interface{}{},
+					PurchasingList: []entity.PurchasingList{},
+				},
+			},
+			Detail: &entity.DetailInfo{
+				Attachments: []entity.Attachment{},
+			},
+			RightSide: map[string]interface{}{},
 		},
 		IsMobile: consts.MobileReg.MatchString(r.UserAgent()),
 	}
 	//获取第二个接口缓存的数据
 	//isMobile := consts.MobileReg.MatchString(r.UserAgent())
-	detailCacheKey := fmt.Sprintf(consts.CacheKey, detailKey, pageType, id, common.If(ad.IsMobile, "mobile", "pc"))
+	cacheAdvanceKey := fmt.Sprintf(consts.CacheAdvanceKey, token)
 	//如果缓存没有数据  说明数据异常
-	res, _ := redis.GetBytes(consts.RedisLimitation, detailCacheKey)
+	res, _ := redis.GetBytes(consts.RedisLimitation, cacheAdvanceKey)
 	if res != nil && len(*res) > 0 {
 		err := json.Unmarshal(*res, &ad.BidInfo)
 		if err != nil {

+ 73 - 37
src/jfw/modules/publicapply/src/detail/dao/baseInfo.go

@@ -47,20 +47,34 @@ func NewBaseInfo(id, pageType string, ui util.SessUserInfo, fromUserId string, s
 }
 
 // BidBaseInfo data
-func (b *BaseInfo) BidBaseInfo() (bi *entity.BidInfo, err error) {
-	bi = &entity.BidInfo{
-		BaseInfo:  &entity.BidBaseInfo{},
-		Abstract:  &entity.Abstract{},
-		Detail:    &entity.DetailInfo{},
+func (b *BaseInfo) BidBaseInfo() (bi *BidInfo, err error) {
+	bi = &BidInfo{
+		BaseInfo: &entity.BidBaseInfo{},
+		Abstract: &entity.Abstract{
+			Default: &entity.Default{
+				WinnerInfos:    []entity.WinnerInfo{},
+				WinnerSeoMap:   map[string]interface{}{},
+				PurchasingList: []entity.PurchasingList{},
+			},
+		},
+		Detail: &entity.DetailInfo{
+			Attachments: []entity.Attachment{},
+		},
 		RightSide: map[string]interface{}{},
 		CanRead:   false,
 		Topnet:    false,
 		BindPhone: false,
 	}
 	resResp := config.Middleground.ResourceCenter.Haspowers(b.UserInfo.AccountId, b.UserInfo.EntAccountId, b.UserInfo.EntId, b.UserInfo.EntUserId)
-	if resResp != nil && strings.Contains(strings.Join(resResp.Powers, ","), "bi_yx_topnet") {
-		log.Println(":--BaseInfo--:", resResp.Powers)
-		bi.Topnet = true
+	if resResp != nil && len(resResp.Powers) > 0 {
+		for _, pv := range resResp.Powers {
+			switch strings.TrimSpace(pv) {
+			case "bi_yx_topnet": //拓普
+				bi.Topnet = true
+			case "ygzc_cgxx":
+				bi.Purchase = true //阳光采购
+			}
+		}
 	}
 	//招标数据基本信息并发过滤
 	if dc.Config.RestrictionSwitch {
@@ -105,7 +119,7 @@ func (b *BaseInfo) BidBaseInfo() (bi *entity.BidInfo, err error) {
 		if bi.Topnet {
 			bi.CanRead = true
 			return "pay" //可以看全部
-		} else if (isVip && isOldVip) || isMember || isEntniche || pageTypeCheck[b.PageType] || privateData {
+		} else if (isVip && isOldVip) || isMember || isEntniche || pageTypeCheck[b.PageType] || privateData || bi.Purchase {
 			bi.CanRead = true
 			return "pay" //可以看全部
 		} else if isVip && !isOldVip {
@@ -118,15 +132,39 @@ func (b *BaseInfo) BidBaseInfo() (bi *entity.BidInfo, err error) {
 			return "free" //已经免费查看三篇招标信息,且未留资。任何信息都不能看 有遮罩
 		}
 	}()
-	detailCacheKey := fmt.Sprintf(consts.CacheKey, detailKey, b.PageType, b.Id, common.If(b.IsMobile, "mobile", "pc"))
 	//数据获取及简单处理
-	var bidInfo = func() {
-		subtype, obj := GetBiddingData(b.Id)
-		if len(obj) == 0 {
+	var GetBidInfo = func() (subtype string, obj map[string]interface{}, err error) {
+		detailCacheKey := fmt.Sprintf(consts.CacheKey, detailKey, b.PageType, b.Id, common.If(b.IsMobile, "mobile", "pc"))
+		//如果缓存没有数据 查看 是否有权限
+		res, errRids := redis.GetBytes(consts.RedisLimitation, detailCacheKey)
+		if errRids != nil || res == nil || len(*res) == 0 {
+			obj = GetBiddingData(b.Id)
+		} else {
+			err = json.Unmarshal(*res, &obj)
+			if err != nil || obj == nil {
+				obj = GetBiddingData(b.Id)
+			}
+		}
+		if obj != nil && len(obj) > 0 {
+			subtype = common.ObjToString(obj["subtype"])
+			topType := common.ObjToString(obj["toptype"])
+			if topType == "" {
+				subtype = topType
+			}
+			//存缓存
+			redis.Put(consts.RedisLimitation, detailCacheKey, obj, common.If(isPay, consts.DetailRedisByPayTimeOut, consts.DetailRedisByFreeTimeOut).(int))
+		} else {
 			err = fmt.Errorf("未查到当前招标信息")
 			log.Println("--未查到数据--:", b.Id)
 			return
 		}
+		return
+	}
+	var BidInfoFormat = func() error {
+		subtype, obj, err := GetBidInfo()
+		if err != nil {
+			return err
+		}
 		//权限判断 处理
 		if !bi.Topnet && (detailKey == "new_vip_pay" || detailKey == "saleLeads_free") { //新版超级订阅||免费用户   不能看采购意向和拟建
 			if subtype == "拟建" || subtype == "采购意向" {
@@ -135,7 +173,7 @@ func (b *BaseInfo) BidBaseInfo() (bi *entity.BidInfo, err error) {
 		}
 		if bi.CanRead {
 			//数据格式化
-			bi = BiddingDataFormat(obj, b.Id, bi.Topnet)
+			bi.BiddingDataFormat(obj, b.Id)
 			if !b.IsMobile {
 				//地址 电脑端
 				switch {
@@ -156,8 +194,8 @@ func (b *BaseInfo) BidBaseInfo() (bi *entity.BidInfo, err error) {
 				b.Sess.Set("projectname", bi.BaseInfo.ProjectName)
 			}
 			//数字打码
-			if bi.BaseInfo.Site == consts.JyTxt && !isMember {
-				NumberCodeFormat(bi)
+			if bi.BaseInfo.Site == consts.JyTxt && !(isMember || bi.Purchase) {
+				bi.NumberCodeFormat()
 			}
 			//移动端需要处理--剑鱼币
 			if b.IsMobile && b.FromUserId != "" {
@@ -167,7 +205,7 @@ func (b *BaseInfo) BidBaseInfo() (bi *entity.BidInfo, err error) {
 				}
 			}
 		} else {
-			bi = BiddingDataFormatNoPower(obj, b.Id)
+			bi.BiddingDataFormatNoPower(obj, b.Id)
 		}
 		if b.UserInfo.OpenId != "" {
 			bi.BaseInfo.UcbsId = encrypt.EncodeArticleId2ByCheck("ucbs#" + b.UserInfo.OpenId + "#" + b.Id)
@@ -182,27 +220,19 @@ func (b *BaseInfo) BidBaseInfo() (bi *entity.BidInfo, err error) {
 				//"hotLabelList":     GetHotLabel(30),
 			}
 		}
-		//存缓存
-		redis.Put(consts.RedisLimitation, detailCacheKey, bi, common.If(isPay, consts.DetailRedisByPayTimeOut, consts.DetailRedisByFreeTimeOut).(int))
-	}
-	//如果缓存没有数据 查看 是否有权限
-	res, errRids := redis.GetBytes(consts.RedisLimitation, detailCacheKey)
-	if errRids != nil || res == nil || len(*res) == 0 {
-		bidInfo()
-	} else {
-		err = json.Unmarshal(*res, &bi)
-		if err != nil {
-			bidInfo()
-		}
+		return nil
 	}
-	if bi.CanRead {
+	err = BidInfoFormat()
+	if bi.CanRead && bi.BaseInfo.InfoAttribute == "" && err == nil {
 		//token
 		token := fmt.Sprintf("%s#%s#%s#%s#%s", b.Id, b.PageType, fmt.Sprintf("%d", time.Now().Unix()), b.UserInfo.UserId, common.If(bi.CanRead, detailKey, "").(string))
 		bi.Token = encrypt.SE.EncodeString(token)
+		//存缓存
+		redis.Put(consts.RedisLimitation, fmt.Sprintf(consts.CacheAdvanceKey, bi.Token), bi, common.If(isPay, consts.DetailRedisByPayTimeOut, consts.DetailRedisByFreeTimeOut).(int))
 	}
 	return
 }
-func (b *BaseInfo) MinBidBaseInfo() (bi *entity.BidInfo, err error) {
+func (b *BaseInfo) MinBidBaseInfo() (bi *BidInfo, err error) {
 	//招标数据基本信息并发过滤
 	if dc.Config.RestrictionSwitch {
 		if err = rest.ReqCheck("baseInfo"); err != nil {
@@ -213,18 +243,24 @@ func (b *BaseInfo) MinBidBaseInfo() (bi *entity.BidInfo, err error) {
 	detailCacheKey := fmt.Sprintf(consts.MinCacheKey, b.Id, common.If(b.IsMobile, "mobile", "pc"))
 	//数据获取及简单处理
 	var bidInfo = func() {
-		_, obj := GetBiddingData(b.Id)
+		obj := GetBiddingData(b.Id)
 		if len(obj) == 0 {
 			err = fmt.Errorf("未查到当前招标信息")
 			log.Println("--未查到数据--:", b.Id)
 			return
 		}
 		//数据格式化
-		bi_ := BiddingDataFormat(obj, b.Id, false)
-		bi = &entity.BidInfo{
-			BaseInfo: bi_.BaseInfo,
-			Abstract: bi_.Abstract,
+		//bi_ := BiddingDataFormat(obj, b.Id, false)
+		//bi = &entity.BidInfo{
+		//	BaseInfo: bi_.BaseInfo,
+		//	Abstract: bi_.Abstract,
+		//}
+		bi = &BidInfo{
+			BaseInfo: &entity.BidBaseInfo{},
+			Abstract: &entity.Abstract{},
+			Detail:   &entity.DetailInfo{},
 		}
+		bi.BiddingDataFormat(obj, b.Id)
 		if !b.IsMobile {
 			//地址 电脑端
 			switch {
@@ -246,7 +282,7 @@ func (b *BaseInfo) MinBidBaseInfo() (bi *entity.BidInfo, err error) {
 		}
 		//数字打码
 		if bi.BaseInfo.Site == consts.JyTxt {
-			NumberCodeFormat(bi)
+			bi.NumberCodeFormat()
 		}
 		bi.BaseInfo.Description = DescriptionHandle(b.PageType, obj)
 		//存缓存

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

@@ -1,652 +1,683 @@
 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"
-    "sync"
-    "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"
+	"encoding/json"
+	"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"
+	"sync"
+	"time"
 )
 
+type BidInfo entity.BidInfo
+
 // 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
 }
 
 var (
-    limitLogsLock  = sync.Mutex{}
-    limitLogsChan  = make(chan struct{}, 4)
-    limitLogsCount = 30
-    limitLogsData  []map[string]interface{}
+	limitLogsLock  = sync.Mutex{}
+	limitLogsChan  = make(chan struct{}, 4)
+	limitLogsCount = 30
+	limitLogsData  []map[string]interface{}
 )
 
 // 免费未留资用户查看公告超过免费次数限制记录
 func SeeDetailLimitLogs(sessUser util.SessUserInfo, sid string) {
-    limitLogsChan <- struct{}{}
-    defer func() {
-        <-limitLogsChan
-    }()
-    //保存日志
-    limitLogsLock.Lock()
-    limitLogsData = append(limitLogsData, map[string]interface{}{
-        "mgoUserId":    sessUser.MgoUserId,
-        "phone":        sessUser.Phone,
-        "positionId":   sessUser.PositionId,
-        "positionType": sessUser.PositionType,
-        "openId":       sessUser.OpenId,
-        "biddingId":    sid,
-        "createDate":   time.Now().Unix(),
-    })
-    if len(limitLogsData) > limitLogsCount {
-        tmp := limitLogsData
-        limitLogsData = make([]map[string]interface{}, 0)
-        sb := db.Mgo_Log.SaveBulk("detail_limit_logs", tmp...)
-        if !sb {
-            log.Println("免费用户 访问 详情页 超限制日志存储 异常")
-        }
-    }
-    limitLogsLock.Unlock()
+	limitLogsChan <- struct{}{}
+	defer func() {
+		<-limitLogsChan
+	}()
+	//保存日志
+	limitLogsLock.Lock()
+	limitLogsData = append(limitLogsData, map[string]interface{}{
+		"mgoUserId":    sessUser.MgoUserId,
+		"phone":        sessUser.Phone,
+		"positionId":   sessUser.PositionId,
+		"positionType": sessUser.PositionType,
+		"openId":       sessUser.OpenId,
+		"biddingId":    sid,
+		"createDate":   time.Now().Unix(),
+	})
+	if len(limitLogsData) > limitLogsCount {
+		tmp := limitLogsData
+		limitLogsData = make([]map[string]interface{}, 0)
+		sb := db.Mgo_Log.SaveBulk("detail_limit_logs", tmp...)
+		if !sb {
+			log.Println("免费用户 访问 详情页 超限制日志存储 异常")
+		}
+	}
+	limitLogsLock.Unlock()
 }
 
 // 查看公告详情次数限制
 func SeeDetailLimit(sessUser util.SessUserInfo, sid string) bool {
-    //|| 无限制
-    if dc.Config.CanReadNotice == 0 {
-        return true
-    }
-    userId := sessUser.UserId
-    //检验是否留资
-    if CNode(userId) {
-        return true
-    }
-    watchKey := fmt.Sprintf("article_count_%d_%s_%d_%s", time.Now().Year(), time.Now().Month(), time.Now().Day(), userId)
-    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
-                    }
-                }
-                //超过限制次数 记录
-                go SeeDetailLimitLogs(sessUser, sid)
-                return false
-            }
-        }
-    } else {
-        redis.Put(consts.RedisLimitation, watchKey, sid, jy.GetExpire())
-        return true
-    }
-    return false
+	//|| 无限制
+	if dc.Config.CanReadNotice == 0 {
+		return true
+	}
+	userId := sessUser.UserId
+	//检验是否留资
+	if CNode(userId) {
+		return true
+	}
+	watchKey := fmt.Sprintf("article_count_%d_%s_%d_%s", time.Now().Year(), time.Now().Month(), time.Now().Day(), userId)
+	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
+					}
+				}
+				//超过限制次数 记录
+				go SeeDetailLimitLogs(sessUser, sid)
+				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
+func GetBiddingData(id 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
+	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
+func (bi *BidInfo) BiddingDataFormatNoPower(obj map[string]interface{}, id string) {
+	//基本信息
+	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"])
 }
 
 // wx pc obj字段统一处理
-func BiddingDataFormat(obj map[string]interface{}, id string, b bool) *entity.BidInfo {
-    var (
-        bi = &entity.BidInfo{
-            BaseInfo: &entity.BidBaseInfo{},
-            Abstract: &entity.Abstract{},
-            Detail:   &entity.DetailInfo{},
-            CanRead:  true,
-            Topnet:   b,
-        }
-    )
-    //基本信息
-    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 (bi *BidInfo) BiddingDataFormat(obj map[string]interface{}, id string) {
+	//基本信息
+	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"])
+	bi.BaseInfo.InfoAttribute = common.InterfaceToStr(obj["infoattribute"])
+	bi.BaseInfo.PublicType = common.InterfaceToStr(obj["public_type"])
+	//摘要
+	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.SignEndTime = common.Int64All(obj["signendtime"]) //报名截止时间
+		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"]))
+		}
+		var isPurchase bool
+		if bi.BaseInfo.InfoAttribute == dc.Config.PurchaseInfo.Code {
+			isPurchase = true
+			if bi.BaseInfo.PublicType == "平台发布" && common.IntAll(obj["is_yg_new"]) != 1 {
+				isPurchase = false
+				bi.BaseInfo.InfoAttribute = "" //bidding 详情页
+				bi.Purchase = isPurchase
+			}
+		}
+		if isPurchase { //阳光直采 且 是新网站
+			bi.BaseInfo.PublicType = fmt.Sprintf("%s%s", dc.Config.PurchaseInfo.Name, bi.BaseInfo.PublicType)
+			if !bi.Purchase {
+				bi.Abstract.Default.Buyer = consts.NoPower
+				bi.Abstract.Default.BuyerPerson = consts.NoPower
+				bi.Abstract.Default.BuyerTel = consts.NoPower
+				bi.Abstract.Default.BuyerPortraitShow = false
+			}
+			bi.Abstract.Default.DeliverArea = common.InterfaceToStr(obj["deliver_area"])
+			bi.Abstract.Default.DeliverCity = common.InterfaceToStr(obj["deliver_city"])
+			bi.Abstract.Default.DeliverDistrict = common.InterfaceToStr(obj["deliver_district"])
+			bi.Abstract.Default.DeliverDetail = common.InterfaceToStr(obj["deliver_detail"])
+			if obj["purchasinglist"] != nil {
+				purchasingList := common.ObjArrToMapArr(obj["purchasinglist"].([]interface{}))
+				b, err := json.Marshal(purchasingList)
+				if err == nil && len(b) > 0 {
+					var pls []entity.Purchasing
+					err = json.Unmarshal(b, &pls)
+					if err == nil && len(pls) > 0 {
+						for _, v := range pls {
+							bi.Abstract.Default.PurchasingList = append(bi.Abstract.Default.PurchasingList, entity.PurchasingList{
+								Number:      v.Number,
+								Table:       v.Table,
+								ItemName:    v.ItemName,
+								Model:       v.Model,
+								UnitPrice:   v.UnitPrice,
+								Root:        v.Root,
+								TotalPrice:  v.TotalPrice,
+								Score:       v.Score,
+								BrandName:   v.BrandName,
+								UnitName:    v.UnitName,
+								Code:        v.Code,
+								Reliability: v.Reliability,
+							})
+						}
+					}
+				}
+				if err != nil {
+					log.Println("purchasinglist json  err:", err.Error())
+				}
+			}
+		} else {
+			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.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"]),
+						})
+					}
+				}
+			}
+		}
+	}
 }
 
 // 详情
 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)
-    }
+func (bi *BidInfo) NumberCodeFormat() {
+	//采购电话中标单位电话置空
+	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
 }

+ 4 - 0
src/jfw/modules/publicapply/src/detail/entity/config.go

@@ -15,6 +15,10 @@ type Config struct {
 	Active             struct { // p583 活动
 		Url string `json:"url"` // 推文地址
 	} `json:"active"`
+	PurchaseInfo struct {
+		Name string `json:"name"`
+		Code string `json:"code"`
+	} `json:"purchaseInfo"`
 }
 
 type reqLimit struct {

+ 40 - 0
src/jfw/modules/publicapply/src/detail/entity/entity.go

@@ -9,7 +9,11 @@ type BidInfo struct {
 	CanRead   bool                   `json:"canRead"`              //是否有权限查看
 	Topnet    bool                   `json:"topnet"`               //拓普身份
 	Token     string                 `json:"token"`                //
+<<<<<<< HEAD
 	BindPhone bool                   `json:"bindPhone"`            //是否绑定手机号
+=======
+	Purchase  bool                   `json:"purchase"`             //阳光直采-采购信息
+>>>>>>> master
 }
 
 // 基本信息
@@ -38,6 +42,37 @@ type BidBaseInfo struct {
 	Keywords           string `json:"keywords"`           //关键词-seo  待处理
 	Description        string `json:"description"`        //描述-seo  待处理
 	RecommendedService int    `json:"recommendedService"` //业主发布 排名考前,默认0
+	InfoAttribute      string `json:"infoAttribute"`      //zc_cgxx --- 采购信息
+	PublicType         string `json:"publicType"`         //发布方式:个人发布 or 平台发布
+}
+type Purchasing struct {
+	Number      float64     `json:"number"`      //数量
+	Table       interface{} `json:"table"`       //
+	ItemName    string      `json:"itemname"`    //产品名称
+	Model       string      `json:"model"`       //型号
+	UnitPrice   float64     `json:"unitprice"`   //单价(预算单价)
+	Root        string      `json:"root"`        //
+	TotalPrice  float64     `json:"totalprice"`  //小计(预算)
+	Score       float64     `json:"score"`       //
+	BrandName   string      `json:"brandname"`   //品牌
+	UnitName    string      `json:"unitname"`    //单位
+	Code        string      `json:"code"`        //
+	Reliability float64     `json:"reliability"` //
+}
+
+type PurchasingList struct {
+	Number      float64     `json:"number"`      //数量
+	Table       interface{} `json:"table"`       //
+	ItemName    string      `json:"itemName"`    //产品名称
+	Model       string      `json:"model"`       //型号
+	UnitPrice   float64     `json:"unitPrice"`   //单价(预算单价)
+	Root        string      `json:"root"`        //
+	TotalPrice  float64     `json:"totalPrice"`  //小计(预算)
+	Score       float64     `json:"score"`       //
+	BrandName   string      `json:"brandName"`   //品牌
+	UnitName    string      `json:"unitName"`    //单位
+	Code        string      `json:"code"`        //
+	Reliability float64     `json:"reliability"` //
 }
 
 // 摘要
@@ -69,6 +104,11 @@ type Default struct {
 	WinnerInfos       []WinnerInfo           `json:"winnerInfos"`       //中标企业信息
 	WinnerSeoMap      map[string]interface{} `json:"winnerSeoMap"`      //中标企业seo 对应的id 我也不知道是啥
 	BidAmount         float64                `json:"bidAmount"`         //中标金额
+	PurchasingList    []PurchasingList       `json:"purchasingList"`    //采购清单
+	DeliverArea       string                 `json:"deliverArea"`       //交付省份
+	DeliverCity       string                 `json:"deliverCity"`       //交付城市
+	DeliverDistrict   string                 `json:"deliverDistrict"`   //交付地区
+	DeliverDetail     string                 `json:"deliverDetail"`     //交付地区详情
 }
 
 // 拟建

+ 2 - 3
src/jfw/modules/publicapply/src/detail/service/service.go

@@ -7,7 +7,6 @@ import (
 	"encoding/json"
 	"jy/src/jfw/modules/publicapply/src/detail/config"
 	"jy/src/jfw/modules/publicapply/src/detail/dao"
-	"jy/src/jfw/modules/publicapply/src/detail/entity"
 	"jy/src/jfw/modules/publicapply/src/detail/util"
 )
 
@@ -33,7 +32,7 @@ func (d *Detail) AdvancedInfo() {
 		if tUserId != "" && ub.UserId != tUserId {
 			return Result{Data: nil, Error_msg: Error_msg_1004}
 		}
-		advancedInfo := dao.NewAdvancedInfo(bdId, pageType, powerCheck, ub, d.Session(), d.Request)
+		advancedInfo := dao.NewAdvancedInfo(bdId, pageType, powerCheck, ub, d.Session(), d.Request, token)
 		if !util.IsNeedLogin(ub.UserId, advancedInfo.PageType) {
 			return Result{Data: nil, Error_msg: Error_msg_1001}
 		}
@@ -176,7 +175,7 @@ func (d *Detail) MinBaseInfo() {
 			return Result{Error_code: -1, Error_msg: err1.Error()}
 		}
 		rs := struct {
-			*entity.BidInfo
+			*dao.BidInfo
 			WxUrl string `json:"wxUrl"`
 		}{
 			data,

+ 1 - 1
src/jfw/modules/publicapply/src/history/entity/entity.go

@@ -23,7 +23,7 @@ func GetHistory(typeValue string, userId string) (map[string][]string, error) {
 				arrs = arrs[1:11]
 			}
 		}
-		if types[i] == consts.TypeSearch || types[i] == consts.TypeEntSearch || types[i] == consts.TypeBuyerSearch {
+		if types[i] == consts.TypeSearch || types[i] == consts.TypeEntSearch || types[i] == consts.TypeBuyerSearch || types[i] == consts.TypeZXPurchaseView {
 			rs["search"] = arrs
 		} else {
 			rs["browse"] = arrs

+ 1 - 1
src/jfw/modules/publicapply/src/history/service/service.go

@@ -20,7 +20,7 @@ func (h *History) GetHistory() {
 		if h.Method() != "POST" {
 			return Result{Data: nil, Error_msg: Error_msg_1005}
 		}
-		//接收参数 	type: 1-标讯搜索历史记录  2-企业历史搜索 3-企业历史浏览 4-采购单位历史搜索 5-采购单位历史浏览
+		//接收参数 	type: 1-标讯搜索历史记录  2-企业历史搜索 3-企业历史浏览 4-采购单位历史搜索 5-采购单位历史浏览 6-直采(采购信息)
 		typeValue := h.GetString("type")
 		return NewResult(entity.GetHistory(typeValue, userId))
 	}()

+ 68 - 73
src/jfw/modules/publicapply/src/oneclick/entity/entity.go

@@ -4,7 +4,6 @@ import (
 	"encoding/json"
 	"errors"
 	"fmt"
-	"github.com/gogf/gf/v2/util/gconv"
 	"jy/src/jfw/modules/publicapply/src/config"
 	"jy/src/jfw/modules/publicapply/src/db"
 	"jy/src/jfw/modules/publicapply/src/jyutil"
@@ -16,6 +15,8 @@ import (
 	"sync"
 	"time"
 
+	"github.com/gogf/gf/v2/util/gconv"
+
 	"app.yhyue.com/moapp/jybase/common"
 	"app.yhyue.com/moapp/jybase/date"
 	"app.yhyue.com/moapp/jybase/encrypt"
@@ -61,6 +62,10 @@ var (
 	kickedTip = "您的账号在其他设备登录,如有需要请重新登录。"
 )
 
+const (
+	PhoneHasBind = "手机号已被绑定"
+)
+
 func init() {
 	rs := &RegStruct{
 		MapR: map[string]int64{},
@@ -259,45 +264,16 @@ func GetAuthTokenWithOptions(host string) (_err error, token *authToken) {
 
 func (o *OneClickInfo) ProcessPhone(phone string) (map[string]interface{}, error) {
 	returnData := map[string]interface{}{}
-
 	// 绑定
 	if o.ActionType == "B" { // 绑定手机号
-		var (
-			mgoUserId, _ = o.Session.Get("mgoUserId").(string)
-			token        = ""
-		)
-		if mgoUserId == "" {
-			return nil, errors.New("未登录")
-		}
-		if thisPhone, _ := o.Session.Get("phone").(string); thisPhone == "" {
-			user, ok := db.Mgo.FindById("user", mgoUserId, `{"s_unionid":1}`)
-			if !ok || user == nil {
-				return nil, errors.New("账号异常")
-			}
-			unionId, _ := (*user)["s_unionid"].(string)
-			if unionId == "" {
-				return nil, errors.New("账号异常")
-			}
-			exists, relationPhoneId := jy.NewPhoneUtil(db.Mgo).BindPhoneIsOccupy(mgoUserId, unionId, phone)
-			if exists { //校验是否使用
-				return nil, errors.New("手机号已被绑定")
-			}
-			o.Session.Set("relationPhoneId", relationPhoneId)
-			var err error
-			token, err = AccountMerge(phone, "", mgoUserId, o.Session)
-
-			mgoUserId, _ = o.Session.Get("mgoUserId").(string)
-			go o.saveLog(mgoUserId, "o_bind")
-			if err != nil {
-				return nil, err
-			} else if token != "" {
-				returnData["state"] = 2
-				returnData["token"] = token
-			} else {
-				returnData["state"] = 1
-			}
+		token, err := o.bindPhone(phone, false)
+		if err != nil {
+			return nil, err
+		} else if token != "" {
+			returnData["state"] = 2
+			returnData["token"] = token
 		} else {
-			return nil, errors.New("已绑定过手机号")
+			returnData["state"] = 1
 		}
 	} else {
 		//   登录注册
@@ -310,6 +286,51 @@ func (o *OneClickInfo) ProcessPhone(phone string) (map[string]interface{}, error
 	return returnData, nil
 }
 
+// 绑定手机号
+func (o *OneClickInfo) bindPhone(phone string, isAccountMerge bool) (string, error) {
+	var (
+		mgoUserId, _ = o.Session.Get("mgoUserId").(string)
+		token        = ""
+	)
+	if mgoUserId == "" {
+		return token, errors.New("未登录")
+	}
+	if thisPhone, _ := o.Session.Get("phone").(string); thisPhone == "" {
+		user, ok := db.Mgo.FindById("user", mgoUserId, `{"s_unionid":1}`)
+		if !ok || user == nil {
+			return token, errors.New("账号异常")
+		}
+		unionId, _ := (*user)["s_unionid"].(string)
+		if unionId == "" {
+			return token, errors.New("账号异常")
+		}
+		exists, relationPhoneId := jy.NewPhoneUtil(db.Mgo).BindPhoneIsOccupy(mgoUserId, unionId, phone)
+		if exists { //校验是否使用
+			return token, errors.New(PhoneHasBind)
+		}
+		o.Session.Set("relationPhoneId", relationPhoneId)
+		var err error
+		token, err = AccountMerge(phone, "", mgoUserId, o.Session, isAccountMerge)
+		mgoUserId, _ = o.Session.Get("mgoUserId").(string)
+		go o.saveLog(mgoUserId, "o_bind")
+		if err != nil {
+			return token, err
+		} else {
+			jy.Publish(db.Mgo_Log, config.Config.Nsq, config.Config.NsqTopic, "task", mgoUserId, jy.Jyweb_node2, map[string]interface{}{
+				"code":       1007,
+				"types":      "bindPhone",
+				"num":        50,
+				"baseUserId": o.Session.Get("base_user_id"),
+				"positionId": o.Session.Get("positionId"),
+				"isOnlyBind": true,
+			})
+		}
+	} else {
+		return token, errors.New("已绑定过手机号")
+	}
+	return token, nil
+}
+
 // 登录 注册
 func (o *OneClickInfo) phoneLogin(phone string) (map[string]interface{}, error) {
 	returnSign := ""
@@ -346,25 +367,9 @@ func (o *OneClickInfo) phoneLogin(phone string) (map[string]interface{}, error)
 		userPhone := common.InterfaceToStr(o.Session.Get("phone"))
 		userId := common.InterfaceToStr(o.Session.Get("userId"))
 		if userId != "" && userPhone == "" {
-			//绑定手机号用户
-			key := "s_phone"
-			for _, m := range users {
-				s_phone := gconv.String(m["s_phone"])
-				s_m_phone := gconv.String(m["s_m_phone"])
-				openid := gconv.String(m["s_m_openid"])
-				if (s_m_phone != "" || s_phone != "") && openid != "" {
-					//已经绑定过手机号
-					return -1
-				}
-				if s_phone != "" {
-					key = "s_m_phone"
-					continue
-				}
-			}
-			if db.Mgo.UpdateById("user", mongodb.BsonIdToSId(userId), map[string]interface{}{
-				"$set": map[string]interface{}{key: phone},
-			}) {
+			if _, err := o.bindPhone(phone, true); err == nil {
 				jy.JyAppCreateSession(db.Mgo, o.Session, userId, 0, *o.ResponseWriter, true, config.Middleground, config.Config.AppPushServiceRpc, config.Config.Criticality)
+<<<<<<< HEAD
 				if c := public.Mysql.CountBySql("SELECT count(1) FROM dataexport_order WHERE (user_id = ? OR user_phone = ?) AND distribution_channel = 'x054'", userId, phone); c > 0 {
 					return -3
 				} else {
@@ -377,6 +382,11 @@ func (o *OneClickInfo) phoneLogin(phone string) (map[string]interface{}, error)
 						"isOnlyBind": true,
 					})
 				}
+=======
+			} else if err.Error() == PhoneHasBind {
+				//已经绑定过手机号
+				return -1
+>>>>>>> master
 			}
 			return 3
 		}
@@ -401,6 +411,7 @@ func (o *OneClickInfo) phoneLogin(phone string) (map[string]interface{}, error)
 				},
 				"s_platform": platform,
 				"s_sourceid": channelCode,
+				"s_rsource":  channelCode,
 			}
 			sourceLabel := redis.GetStr("limitation", fmt.Sprintf("firstVisitTagByWX_%s", o.Session.Id()))
 			if sourceLabel != "" {
@@ -531,7 +542,7 @@ func (o *OneClickInfo) phoneLogin(phone string) (map[string]interface{}, error)
 }
 
 // 绑定
-func AccountMerge(phone, email, mgoUserId string, sess *httpsession.Session) (token string, err error) {
+func AccountMerge(phone, email, mgoUserId string, sess *httpsession.Session, isAccountMerge bool) (token string, err error) {
 	if userinfo := config.Compatible.Select(mgoUserId, `{"s_unionid":1,"s_name":1,"s_nickname":1,"s_headimageurl":1,"l_registedate":1,"i_ispush":1,"i_applystatus":1,"i_sex":1,"s_country":1,"s_province":1,"s_city":1,"s_m_openid":1,"a_m_openid":1,"base_user_id":1,"s_newsource":1,"l_registedate":1}`); userinfo != nil && len(*userinfo) > 0 {
 		//新用户时间
 		onLineTime, _ := time.ParseInLocation(date.Date_Full_Layout, config.Config.AccountMergeOnline, time.Local)
@@ -563,7 +574,7 @@ func AccountMerge(phone, email, mgoUserId string, sess *httpsession.Session) (to
 				//用户中台存储  结束
 				jy.CreateUserMerge(db.Mgo, db.Mysql, sess, config.Middleground).FlushSession(mgoUserId) //刷新session
 			}
-		} else if onLineTime.Before(reg) { //新微信用户直接绑定
+		} else if isAccountMerge || onLineTime.Before(reg) { //新微信用户直接绑定
 			data := map[string]interface{}{
 				"s_unionid":      (*userinfo)["s_unionid"],
 				"s_name":         (*userinfo)["s_name"],
@@ -610,22 +621,6 @@ func AccountMerge(phone, email, mgoUserId string, sess *httpsession.Session) (to
 						backData[k] = v
 					}
 					if db.Mgo.Save("user_merge", backData) != "" {
-						//给另外一个用户发站内信
-						userData := db.BaseMysql.FindOne("base_position", map[string]interface{}{
-							"user_id": gconv.Int64(sess.Get("base_user_id")),
-							"type":    0,
-						}, "id", "")
-						log.Println("绑定日志打印", userData)
-						if userData != nil && len(*userData) > 0 {
-							jy.Publish(db.Mgo_Log, config.Config.Nsq, config.Config.NsqTopic, "task", relationPhoneId, jy.Jyweb_node2, map[string]interface{}{
-								"code":       1007,
-								"types":      "bindPhone",
-								"num":        50,
-								"baseUserId": gconv.Int64(sess.Get("base_user_id")),
-								"positionId": gconv.Int64(sess.Get("positionId")),
-								"isOnlyBind": true,
-							})
-						}
 						db.Mgo.Del("user", map[string]interface{}{"_id": mongodb.StringTOBsonId(mgoUserId)})
 						jy.CreateUserMerge(db.Mgo, db.Mysql, sess, config.Middleground).FlushSession(relationPhoneId)
 						redis.Put("session", fmt.Sprintf("usermerge_delete_%s", mgoUserId), relationPhoneId, 7*24*60*60)

+ 17 - 5
src/jfw/modules/publicapply/src/userbase/entity/entity.go

@@ -318,25 +318,37 @@ func (this *TipInfoStruct) GetTipInfo() (flag int) {
 		}, true, false) {
 			return 1
 		}
-	} else { //查询是否提示弹框
+	} else if config.Config.TipInfo[this.TipName].State == 0 { //查询是否提示弹框
+		tipInfo := config.Config.TipInfo[this.TipName]
+		if tipInfo.StartData > 0 || tipInfo.EndData > 0 {
+			now := time.Now()
+			if tipInfo.StartData > 0 && tipInfo.StartData > now.Unix() {
+				return 2
+			}
+			if tipInfo.EndData > 0 && tipInfo.EndData < now.Unix() {
+				return 2
+			}
+		}
 		//判断是否严重用户注册时间
-		if config.Config.TipInfo[this.TipName] > 0 {
+		if tipInfo.RegistrationDate > 0 {
 			userBase := jy.GetBigVipUserBaseMsg(this.Session, *config.Middleground)
 			//此时间点后注册的新用户
-			if userBase.Registedate > config.Config.TipInfo[this.TipName] {
+			if userBase.Registedate > tipInfo.RegistrationDate {
 				return 2
 			}
 		}
 		result, ok := db.Mgo.FindOneByField("tip_info", queryMap, map[string]interface{}{this.TipName: 1})
 		if ok {
+			var tip int
 			if result != nil && len(*result) > 0 {
-				return util.IntAll((*result)[this.TipName])
+				tip = util.IntAll((*result)[this.TipName])
 			}
+			return tip
 		} else {
 			return 2
 		}
 	}
-	return 0
+	return 2
 }
 
 var (

+ 20 - 17
src/jfw/modules/publicapply/src/userbase/service/service.go

@@ -220,25 +220,28 @@ func (this *ServiceStruct) GetOriginalText() {
 	}
 	// 查询拓普权限,直接返回原文连接
 	resResp := config.Middleground.ResourceCenter.Haspowers(sessUser.AccountId, sessUser.EntAccountId, sessUser.EntId, sessUser.EntUserId)
-	if resResp != nil && strings.Contains(strings.Join(resResp.Powers, ","), "bi_yx_topnet") {
-		url = entity.GetOriginalTextUrl(biddingId)
-		if url == "" {
-			this.ServeJson(Result{
-				Data: map[string]interface{}{
-					"url":     "",
-					"status":  OriginalStatus5,
-					"surplus": 0,
-				},
-			})
+	if resResp != nil && len(resResp.Powers) > 0 {
+		//ygzc_cgxx 阳光直采
+		if strings.Contains(strings.Join(resResp.Powers, ","), "bi_yx_topnet") || strings.Contains(strings.Join(resResp.Powers, ","), "ygzc_cgxx") {
+			url = entity.GetOriginalTextUrl(biddingId)
+			if url == "" {
+				this.ServeJson(Result{
+					Data: map[string]interface{}{
+						"url":     "",
+						"status":  OriginalStatus5,
+						"surplus": 0,
+					},
+				})
+				return
+			}
+			//存记录
+			op.SavePowerRecord(url)
+			this.ServeJson(Result{Data: map[string]interface{}{
+				"url":     url,
+				"surplus": 0,
+			}})
 			return
 		}
-		//存记录
-		op.SavePowerRecord(url)
-		this.ServeJson(Result{Data: map[string]interface{}{
-			"url":     url,
-			"surplus": 0,
-		}})
-		return
 	}
 	// 2. 获取用户类型对应的条数
 	// a. 查看过返回地址

+ 296 - 295
src/jfw/modules/subscribepay/src/entity/basePack.go

@@ -1,350 +1,351 @@
 package entity
 
 import (
-	"app.yhyue.com/moapp/jybase/go-xweb/httpsession"
-	"app.yhyue.com/moapp/jybase/redis"
-	"encoding/json"
-	"fmt"
-	"github.com/gogf/gf/v2/util/gconv"
-	"jy/src/jfw/modules/subscribepay/src/config"
-	"jy/src/jfw/modules/subscribepay/src/util"
-	"log"
-	"strconv"
-	"time"
+    "app.yhyue.com/moapp/jybase/go-xweb/httpsession"
+    "app.yhyue.com/moapp/jybase/redis"
+    "encoding/json"
+    "fmt"
+    "github.com/gogf/gf/v2/util/gconv"
+    "jy/src/jfw/modules/subscribepay/src/config"
+    "jy/src/jfw/modules/subscribepay/src/util"
+    "log"
+    "strconv"
+    "time"
 
-	qutil "app.yhyue.com/moapp/jybase/common"
-	. "app.yhyue.com/moapp/jybase/date"
-	"app.yhyue.com/moapp/jybase/encrypt"
-	. "app.yhyue.com/moapp/jybase/mongodb"
-	"app.yhyue.com/moapp/jypkg/common/src/qfw/util/jy"
+    qutil "app.yhyue.com/moapp/jybase/common"
+    . "app.yhyue.com/moapp/jybase/date"
+    "app.yhyue.com/moapp/jybase/encrypt"
+    . "app.yhyue.com/moapp/jybase/mongodb"
+    "app.yhyue.com/moapp/jypkg/common/src/qfw/util/jy"
 )
 
 // 默认消费
 func (this *UseBalanceStruct) defaultConsume() (r map[string]interface{}, m string, c int) {
-	r, rerr := this.UseBalance()
-	if rerr != nil {
-		m = fmt.Sprintf("消费异常:%s", rerr.Error())
-	}
-	return
+    r, rerr := this.UseBalance()
+    if rerr != nil {
+        m = fmt.Sprintf("消费异常:%s", rerr.Error())
+    }
+    return
 }
 
-// KeyAccountConsume 大客户平台 无权限限制
+// KeyAccountConsume 大客户平台  || 资源中台  无权限限制
 func (this *UseBalanceStruct) KeyAccountConsume() (r map[string]interface{}, m string, c int) {
-	_fileName := this.Remarks["fileName"].(string)
-	_id := this.Remarks["id"].(string)
-	if this.Remarks["infoType"] != nil && this.Remarks["infoType"].(string) == "S" {
-		r = SupplyInfoFile(_fileName, _id)
-	} else {
-		r = fileAttachRpc(_fileName, _id)
-	}
-	return
+    log.Println(this.Name, "-------附件下载记录------", this.Remarks)
+    _fileName := this.Remarks["fileName"].(string)
+    _id := this.Remarks["id"].(string)
+    if this.Remarks["infoType"] != nil && this.Remarks["infoType"].(string) == "S" {
+        r = SupplyInfoFile(_fileName, _id)
+    } else {
+        r = fileAttachRpc(_fileName, _id)
+    }
+    return
 }
 
 // 附件下载消费 fui:免费赠送已使用次数;pui:付费权限已使用次数
 func (this *UseBalanceStruct) fileConsume() (r map[string]interface{}, m string, c int) {
-	_fileName := this.Remarks["fileName"].(string)
-	_id := this.Remarks["id"].(string)
-	log.Println("附件下载包。。。。。")
-	BaseMsg := jy.GetBigVipUserBaseMsg(this.Session, *config.Middleground)
-	log.Println("---:", this.Remarks)
-	//P450 v4.8.85
-	var freeFileCacheUpdate = func() {
-		//免费用户 更新留资附件缓存
-		if BaseMsg.Status <= 0 && BaseMsg.VipStatus <= 0 && BaseMsg.EntnicheStatus <= 0 {
-			sess := this.Session.GetMultiple()
-			userId := this.UserId
-			if qutil.IntAll(sess["positionId"]) == 1 {
-				userId = strconv.Itoa(qutil.IntAll(sess["positionId"]))
-			}
-			//已留资
-			if c := qutil.Int64All(redis.GetInt("other", fmt.Sprintf("free_article_attach_%s", userId))); c > 0 {
-				if ok := redis.PutKV(fmt.Sprintf("free_article_attach_%s", userId), -1); !ok {
-					log.Println("free user update file  download power  false:", userId)
-				}
-			}
-		}
-	}
-	//获取余额数量
-	dbs := &FindBalanceStruct{
-		AccountId:    this.UserId,
-		ResourceType: "附件下载包",
-		VipState:     BaseMsg.VipStatus,
-	}
-	this.VipState = BaseMsg.VipStatus
-	data, err := dbs.FindBalance()
-	if data == nil || err != nil {
-		c = -1
-		m = "余额不足"
-		go freeFileCacheUpdate()
-		return
-	}
-	number := 0
-	if data != nil {
-		dataArr := gconv.SliceAny(data["data"])
-		if len(dataArr) > 0 {
-			dataMap := gconv.MapStrStr(dataArr[0])
-			number = gconv.Int(dataMap["number"])
-		}
-	}
-	isExists := false
-	id := this.FindJyConsumePackRecord()
-	if id != "" && this.Remarks["downUrl"] != nil {
-		if util.MQFW.UpdateById(jyCC, id, map[string]interface{}{
-			"$set": map[string]interface{}{
-				"l_updateDate": time.Now().Unix(),
-			},
-		}) {
-			delete(this.Remarks, "id")
-			delete(this.Remarks, "title")
-			r = this.Remarks
-			r["isExists"] = true
-			isExists = true
-		}
-	}
-	go freeFileCacheUpdate()
-	if BaseMsg.Status > 0 && BaseMsg.PowerMap[3] {
-		if this.Remarks["infoType"] != nil && this.Remarks["infoType"].(string) == "S" {
-			r = SupplyInfoFile(_fileName, _id)
-		} else {
-			r = fileAttachRpc(_fileName, _id)
-		}
-		/*go func(this *UseBalanceStruct, r map[string]interface{}) {
-			data := make(map[string]interface{})
-			data["p_type"] = "大会员用户附件下载"
-			data["p_userid"] = this.UserId
-			data["p_infoId"] = this.Remarks["id"].(string)
-			data["s_platform"] = this.Platform
-			data["p_create_time"] = time.Now().Unix()
-			data["p_rep"] = r
-			//存库记录
-			if util.MQFW.Save("filehistroy", data) == "" {
-				log.Println("大会员附件下载-历史记录异常:" + this.UserId)
-			}
-		}(this, r)*/
-		if r["downUrl"] != nil {
-			this.Remarks["downUrl"] = r["downUrl"]
-			this.Remarks["size"] = r["size"]
-		}
-		if !isExists {
-			this.saveJyConsumePackList()
-		}
-	} else {
-		//查询当月附件下载历史记录-如是已下载过的附件不再扣除次数
-		// log.Println(this.Remarks, "++++++", this.AccountId, id, "-------------", isExists)
-		//当月未有消费记录
-		if !isExists {
-			//免费赠送已使用次数
-			if number > 0 {
-				if this.Remarks["infoType"] != nil && this.Remarks["infoType"].(string) == "S" {
-					r = SupplyInfoFile(_fileName, _id)
-				} else {
-					r = fileAttachRpc(_fileName, _id)
-				}
-				if r["downUrl"] != nil {
-					this.Remarks["downUrl"] = r["downUrl"]
-					this.Remarks["size"] = r["size"]
-					if this.saveJyConsumePackList() {
-						//中台消费记录
-						rb, err := this.UseBalance()
-						if err != nil || (rb != nil && qutil.IntAll(rb["code"]) == 0) {
-							m = fmt.Sprintf("消费记录保存异常:%s", qutil.ObjToString(rb["message"]))
-						}
-					}
-				} else {
-					m = "获取附件异常"
-				}
-			} else {
-				c = -1
-				m = "该用户下载权限已用完"
-			}
-		}
-	}
-	return
+    _fileName := this.Remarks["fileName"].(string)
+    _id := this.Remarks["id"].(string)
+    log.Println("附件下载包。。。。。")
+    BaseMsg := jy.GetBigVipUserBaseMsg(this.Session, *config.Middleground)
+    log.Println("---:", this.Remarks)
+    //P450 v4.8.85
+    var freeFileCacheUpdate = func() {
+        //免费用户 更新留资附件缓存
+        if BaseMsg.Status <= 0 && BaseMsg.VipStatus <= 0 && BaseMsg.EntnicheStatus <= 0 {
+            sess := this.Session.GetMultiple()
+            userId := this.UserId
+            if qutil.IntAll(sess["positionId"]) == 1 {
+                userId = strconv.Itoa(qutil.IntAll(sess["positionId"]))
+            }
+            //已留资
+            if c := qutil.Int64All(redis.GetInt("other", fmt.Sprintf("free_article_attach_%s", userId))); c > 0 {
+                if ok := redis.PutKV(fmt.Sprintf("free_article_attach_%s", userId), -1); !ok {
+                    log.Println("free user update file  download power  false:", userId)
+                }
+            }
+        }
+    }
+    //获取余额数量
+    dbs := &FindBalanceStruct{
+        AccountId:    this.UserId,
+        ResourceType: "附件下载包",
+        VipState:     BaseMsg.VipStatus,
+    }
+    this.VipState = BaseMsg.VipStatus
+    data, err := dbs.FindBalance()
+    if data == nil || err != nil {
+        c = -1
+        m = "余额不足"
+        go freeFileCacheUpdate()
+        return
+    }
+    number := 0
+    if data != nil {
+        dataArr := gconv.SliceAny(data["data"])
+        if len(dataArr) > 0 {
+            dataMap := gconv.MapStrStr(dataArr[0])
+            number = gconv.Int(dataMap["number"])
+        }
+    }
+    isExists := false
+    id := this.FindJyConsumePackRecord()
+    if id != "" && this.Remarks["downUrl"] != nil {
+        if util.MQFW.UpdateById(jyCC, id, map[string]interface{}{
+            "$set": map[string]interface{}{
+                "l_updateDate": time.Now().Unix(),
+            },
+        }) {
+            delete(this.Remarks, "id")
+            delete(this.Remarks, "title")
+            r = this.Remarks
+            r["isExists"] = true
+            isExists = true
+        }
+    }
+    go freeFileCacheUpdate()
+    if BaseMsg.Status > 0 && BaseMsg.PowerMap[3] {
+        if this.Remarks["infoType"] != nil && this.Remarks["infoType"].(string) == "S" {
+            r = SupplyInfoFile(_fileName, _id)
+        } else {
+            r = fileAttachRpc(_fileName, _id)
+        }
+        /*go func(this *UseBalanceStruct, r map[string]interface{}) {
+        	data := make(map[string]interface{})
+        	data["p_type"] = "大会员用户附件下载"
+        	data["p_userid"] = this.UserId
+        	data["p_infoId"] = this.Remarks["id"].(string)
+        	data["s_platform"] = this.Platform
+        	data["p_create_time"] = time.Now().Unix()
+        	data["p_rep"] = r
+        	//存库记录
+        	if util.MQFW.Save("filehistroy", data) == "" {
+        		log.Println("大会员附件下载-历史记录异常:" + this.UserId)
+        	}
+        }(this, r)*/
+        if r["downUrl"] != nil {
+            this.Remarks["downUrl"] = r["downUrl"]
+            this.Remarks["size"] = r["size"]
+        }
+        if !isExists {
+            this.saveJyConsumePackList()
+        }
+    } else {
+        //查询当月附件下载历史记录-如是已下载过的附件不再扣除次数
+        // log.Println(this.Remarks, "++++++", this.AccountId, id, "-------------", isExists)
+        //当月未有消费记录
+        if !isExists {
+            //免费赠送已使用次数
+            if number > 0 {
+                if this.Remarks["infoType"] != nil && this.Remarks["infoType"].(string) == "S" {
+                    r = SupplyInfoFile(_fileName, _id)
+                } else {
+                    r = fileAttachRpc(_fileName, _id)
+                }
+                if r["downUrl"] != nil {
+                    this.Remarks["downUrl"] = r["downUrl"]
+                    this.Remarks["size"] = r["size"]
+                    if this.saveJyConsumePackList() {
+                        //中台消费记录
+                        rb, err := this.UseBalance()
+                        if err != nil || (rb != nil && qutil.IntAll(rb["code"]) == 0) {
+                            m = fmt.Sprintf("消费记录保存异常:%s", qutil.ObjToString(rb["message"]))
+                        }
+                    }
+                } else {
+                    m = "获取附件异常"
+                }
+            } else {
+                c = -1
+                m = "该用户下载权限已用完"
+            }
+        }
+    }
+    return
 }
 
 var jyCC = "jy_consumepack"
 
 // 查询jy 消费日志记录
 func (this *UseBalanceStruct) FindJyConsumePackRecord() string {
-	query := map[string]interface{}{
-		"s_id":       this.Remarks["id"].(string),
-		"s_userId":   this.UserId,
-		"s_product":  this.Name,
-		"s_month":    time.Now().Format("2006-01"),
-		"s_fileName": this.Remarks["fileName"].(string),
-	}
-	res, ok := util.MQFW.FindOne(jyCC, query)
-	if ok && res != nil {
-		if (*res)["s_downUrl"] != nil {
-			this.Remarks["downUrl"] = (*res)["s_downUrl"]
-			this.Remarks["size"] = (*res)["s_fileSize"]
-		}
-	} else {
-		log.Println("查询附件下载日志异常:", this.UserId)
-	}
-	return BsonIdToSId((*res)["_id"])
+    query := map[string]interface{}{
+        "s_id":       this.Remarks["id"].(string),
+        "s_userId":   this.UserId,
+        "s_product":  this.Name,
+        "s_month":    time.Now().Format("2006-01"),
+        "s_fileName": this.Remarks["fileName"].(string),
+    }
+    res, ok := util.MQFW.FindOne(jyCC, query)
+    if ok && res != nil {
+        if (*res)["s_downUrl"] != nil {
+            this.Remarks["downUrl"] = (*res)["s_downUrl"]
+            this.Remarks["size"] = (*res)["s_fileSize"]
+        }
+    } else {
+        log.Println("查询附件下载日志异常:", this.UserId)
+    }
+    return BsonIdToSId((*res)["_id"])
 }
 
 // 保存日志
 func (this *UseBalanceStruct) saveJyConsumePackList() (b bool) {
-	saveMap := map[string]interface{}{
-		"s_id":         this.Remarks["id"],
-		"s_userId":     this.UserId,
-		"s_product":    this.Name,
-		"l_date":       time.Now().Unix(),
-		"l_updateDate": time.Now().Unix(), //更新时间
-		"s_month":      time.Now().Format("2006-01"),
-		"s_fileName":   this.Remarks["fileName"],
-		"s_downUrl":    this.Remarks["downUrl"],
-		"s_fileSize":   this.Remarks["size"],
-		"s_title":      this.Remarks["title"],
-		"b_isPay":      b,
-		"s_platform":   this.Platform,
-	}
-	b = util.MQFW.Save(jyCC, saveMap) != ""
-	if !b {
-		log.Println("保存附件下载日志异常:", this.UserId)
-	}
-	return
+    saveMap := map[string]interface{}{
+        "s_id":         this.Remarks["id"],
+        "s_userId":     this.UserId,
+        "s_product":    this.Name,
+        "l_date":       time.Now().Unix(),
+        "l_updateDate": time.Now().Unix(), //更新时间
+        "s_month":      time.Now().Format("2006-01"),
+        "s_fileName":   this.Remarks["fileName"],
+        "s_downUrl":    this.Remarks["downUrl"],
+        "s_fileSize":   this.Remarks["size"],
+        "s_title":      this.Remarks["title"],
+        "b_isPay":      b,
+        "s_platform":   this.Platform,
+    }
+    b = util.MQFW.Save(jyCC, saveMap) != ""
+    if !b {
+        log.Println("保存附件下载日志异常:", this.UserId)
+    }
+    return
 }
 
 // 调rpc 获取附件信息
 func fileAttachRpc(fileName, id string) (r map[string]interface{}) {
-	r = make(map[string]interface{})
-	// 调用rpc 获取附件信息
-	req := util.JyFileRequest{id}
-	rep, err := util.Attachment(&req)
-	if err != nil {
-		log.Println("attachment  rpc调用失败")
-	} else {
-		if rep.Rep != nil && len(rep.Rep) > 0 {
-			//获取当前附件下载地址
-			for _, v := range rep.Rep {
-				if qutil.ObjToString(v["filename"]) == fileName {
-					r = map[string]interface{}{
-						"downUrl":  qutil.ObjToString(v["downurl"]),
-						"fileName": qutil.ObjToString(v["filename"]),
-						"size":     qutil.ObjToString(v["size"]),
-					}
-					break
-				}
-			}
-		}
-	}
-	return
+    r = make(map[string]interface{})
+    // 调用rpc 获取附件信息
+    req := util.JyFileRequest{id}
+    rep, err := util.Attachment(&req)
+    if err != nil {
+        log.Println("attachment  rpc调用失败")
+    } else {
+        if rep.Rep != nil && len(rep.Rep) > 0 {
+            //获取当前附件下载地址
+            for _, v := range rep.Rep {
+                if qutil.ObjToString(v["filename"]) == fileName {
+                    r = map[string]interface{}{
+                        "downUrl":  qutil.ObjToString(v["downurl"]),
+                        "fileName": qutil.ObjToString(v["filename"]),
+                        "size":     qutil.ObjToString(v["size"]),
+                    }
+                    break
+                }
+            }
+        }
+    }
+    return
 }
 
 // 供应信息附件
 func SupplyInfoFile(fileName, msgId string) (r map[string]interface{}) {
-	//查数据
-	data := util.InfoMysql.FindOne("supply_info", map[string]interface{}{"id": msgId}, "", "")
-	if *data != nil && (*data)["attach"] != nil {
-		attach_str := qutil.ObjToString((*data)["attach"])
-		var attachMap map[string]interface{}
-		err := json.Unmarshal([]byte(attach_str), &attachMap)
-		if err != nil {
-			log.Println("err:", err)
-		}
-		for _, v := range attachMap {
-			fileMap := qutil.ObjToMap(v)
-			if fileName == qutil.ObjToString((*fileMap)["filename"]) {
-				r = map[string]interface{}{
-					"downUrl":  fmt.Sprintf("%s/%s", qutil.ObjToString((*fileMap)["ossurl"]), qutil.ObjToString((*fileMap)["fid"])),
-					"fileName": qutil.ObjToString((*fileMap)["filename"]),
-					"size":     qutil.ObjToString((*fileMap)["size"]),
-				}
-				break
-			}
-		}
-	}
-	return
+    //查数据
+    data := util.InfoMysql.FindOne("supply_info", map[string]interface{}{"id": msgId}, "", "")
+    if *data != nil && (*data)["attach"] != nil {
+        attach_str := qutil.ObjToString((*data)["attach"])
+        var attachMap map[string]interface{}
+        err := json.Unmarshal([]byte(attach_str), &attachMap)
+        if err != nil {
+            log.Println("err:", err)
+        }
+        for _, v := range attachMap {
+            fileMap := qutil.ObjToMap(v)
+            if fileName == qutil.ObjToString((*fileMap)["filename"]) {
+                r = map[string]interface{}{
+                    "downUrl":  fmt.Sprintf("%s/%s", qutil.ObjToString((*fileMap)["ossurl"]), qutil.ObjToString((*fileMap)["fid"])),
+                    "fileName": qutil.ObjToString((*fileMap)["filename"]),
+                    "size":     qutil.ObjToString((*fileMap)["size"]),
+                }
+                break
+            }
+        }
+    }
+    return
 }
 
 // 兑换作废
 func JyexchangeCance(userId, product, platform, queryTime string, pageSize, pageNum int) (list []map[string]interface{}, total int, err error) {
-	RStruct := InitFindRecord(userId, userId, product, queryTime, platform, pageSize, pageNum, 2)
-	list, total = RStruct.DefaultData()
-	return list, total, nil
+    RStruct := InitFindRecord(userId, userId, product, queryTime, platform, pageSize, pageNum, 2)
+    list, total = RStruct.DefaultData()
+    return list, total, nil
 }
 
 // 消费
 func JyConsumePack(userId, product, platform string, remarks map[string]interface{}, session *httpsession.Session) (r map[string]interface{}, m string, c int) {
-	CStruct := InitUseBalance(userId, product, product, "", "", nil, remarks, 1, platform, session)
-	switch product {
-	case "附件下载包":
-		r, m, c = CStruct.fileConsume()
-	case "大客户平台":
-		r, m, c = CStruct.KeyAccountConsume()
-	case "拓普情报权益":
-		r, m, c = CStruct.KeyAccountConsume()
-	default:
-		r, m, c = CStruct.defaultConsume()
-	}
-	return
+    CStruct := InitUseBalance(userId, product, product, "", "", nil, remarks, 1, platform, session)
+    switch product {
+    case "附件下载包":
+        r, m, c = CStruct.fileConsume()
+    case "大客户平台":
+        r, m, c = CStruct.KeyAccountConsume()
+    case "资源平台":
+        r, m, c = CStruct.KeyAccountConsume()
+    default:
+        r, m, c = CStruct.defaultConsume()
+    }
+    return
 }
 
 // 流水
 func JyFindRecordPack(userId, productName, queryTime, platform string, pageSize, pageNum int) (list []map[string]interface{}, total int, err error) {
-	RStruct := InitFindRecord(userId, userId, productName, queryTime, platform, pageSize, pageNum, 0)
-	switch productName {
-	case "附件下载包":
-		list, total = RStruct.FindJyConsumePackAllRecord()
-	default:
-		list, total = RStruct.DefaultData()
-	}
-	return list, total, nil
+    RStruct := InitFindRecord(userId, userId, productName, queryTime, platform, pageSize, pageNum, 0)
+    switch productName {
+    case "附件下载包":
+        list, total = RStruct.FindJyConsumePackAllRecord()
+    default:
+        list, total = RStruct.DefaultData()
+    }
+    return list, total, nil
 }
 
 // 数据处理-附件下载包
 func (this *FindRecordStruct) FindJyConsumePackAllRecord() ([]map[string]interface{}, int) {
-	var articleAddMap = map[string]string{
-		"PC":  "/article/content/%s.html",
-		"WX":  "/article/content/%s.html",
-		"APP": "/jyapp/article/content/%s.html",
-	}
-	query := map[string]interface{}{
-		"s_userId":  this.UserId,
-		"s_product": this.Name,
-		"s_month":   this.QueryTime,
-	}
-	// log.Println("query:", query, "---", this.Page, this.PageSize)
-	//当月
-	total := util.MQFW.Count(jyCC, query)
-	// query["s_month"] = this.QueryTime
-	list, ok := util.MQFW.Find(jyCC, query, `{"l_updateDate":-1,"l_date":-1}`, `{"s_id":1,"s_fileName":1,"s_downUrl":1,"l_date":1,"s_title":1,"l_updateDate":1}`, false, (this.Page-1)*this.PageSize, this.PageSize)
-	if ok && list != nil {
-		if len(*list) >= 1 {
-			for _, item := range *list {
-				itemData := qutil.ObjToMap(item)
-				if itemData == nil || len(*itemData) == 0 {
-					continue
-				}
-				l_date := qutil.If((*itemData)["l_updateDate"] != nil, (*itemData)["l_updateDate"], (*itemData)["l_date"])
-				(*itemData)["l_date"] = FormatDateWithObj(&l_date, "2006/01/02")
-				(*itemData)["articleUrl"] = fmt.Sprintf(articleAddMap[this.Platform], encrypt.EncodeArticleId2ByCheck((*itemData)["s_id"].(string)))
-				(*itemData)["s_id"] = encrypt.EncodeArticleId2ByCheck((*itemData)["s_id"].(string))
-				delete((*itemData), "s_downUrl")
-				delete((*itemData), "_id")
-			}
-		} else {
-			log.Println("暂无附件下载记录:", this.UserId)
-		}
-	} else {
-		log.Println("查询附件下载记录异常:", this.UserId)
-	}
+    var articleAddMap = map[string]string{
+        "PC":  "/article/content/%s.html",
+        "WX":  "/article/content/%s.html",
+        "APP": "/jyapp/article/content/%s.html",
+    }
+    query := map[string]interface{}{
+        "s_userId":  this.UserId,
+        "s_product": this.Name,
+        "s_month":   this.QueryTime,
+    }
+    // log.Println("query:", query, "---", this.Page, this.PageSize)
+    //当月
+    total := util.MQFW.Count(jyCC, query)
+    // query["s_month"] = this.QueryTime
+    list, ok := util.MQFW.Find(jyCC, query, `{"l_updateDate":-1,"l_date":-1}`, `{"s_id":1,"s_fileName":1,"s_downUrl":1,"l_date":1,"s_title":1,"l_updateDate":1}`, false, (this.Page-1)*this.PageSize, this.PageSize)
+    if ok && list != nil {
+        if len(*list) >= 1 {
+            for _, item := range *list {
+                itemData := qutil.ObjToMap(item)
+                if itemData == nil || len(*itemData) == 0 {
+                    continue
+                }
+                l_date := qutil.If((*itemData)["l_updateDate"] != nil, (*itemData)["l_updateDate"], (*itemData)["l_date"])
+                (*itemData)["l_date"] = FormatDateWithObj(&l_date, "2006/01/02")
+                (*itemData)["articleUrl"] = fmt.Sprintf(articleAddMap[this.Platform], encrypt.EncodeArticleId2ByCheck((*itemData)["s_id"].(string)))
+                (*itemData)["s_id"] = encrypt.EncodeArticleId2ByCheck((*itemData)["s_id"].(string))
+                delete((*itemData), "s_downUrl")
+                delete((*itemData), "_id")
+            }
+        } else {
+            log.Println("暂无附件下载记录:", this.UserId)
+        }
+    } else {
+        log.Println("查询附件下载记录异常:", this.UserId)
+    }
 
-	return *list, total
+    return *list, total
 }
 
 // 数据处理-default
 func (this *FindRecordStruct) DefaultData() ([]map[string]interface{}, int) {
-	returnList, total, err := this.FindRecord()
-	if err != nil {
-		log.Println("默认资源包流水异常:", err)
-		return nil, 0
-	}
-	if total == 0 {
-		log.Println(fmt.Sprintf("暂无%s资源包流水", this.Name))
-	}
-	return qutil.ObjArrToMapArr(returnList), total
+    returnList, total, err := this.FindRecord()
+    if err != nil {
+        log.Println("默认资源包流水异常:", err)
+        return nil, 0
+    }
+    if total == 0 {
+        log.Println(fmt.Sprintf("暂无%s资源包流水", this.Name))
+    }
+    return qutil.ObjArrToMapArr(returnList), total
 }

+ 8 - 2
src/jfw/modules/subscribepay/src/service/basePack.go

@@ -63,8 +63,14 @@ func (this *ResourcePack) ConsumePack() {
 		}
 		resResp := config.Middleground.ResourceCenter.Haspowers(qutil.Int64All(this.GetSession("accountId")), qutil.Int64All(this.GetSession("entAccountId")),
 			qutil.Int64All(this.GetSession("entId")), qutil.Int64All(this.GetSession("entUserId")))
-		if resResp != nil && strings.Contains(strings.Join(resResp.Powers, ","), "bi_yx_topnet") {
-			productName = "拓普情报权益"
+		if resResp != nil && len(resResp.Powers) > 0 {
+			if strings.Contains(strings.Join(resResp.Powers, ","), "bi_yx_topnet") {
+				productName = "资源平台"
+				remarks["source"] = "拓普情报权益"
+			} else if strings.Contains(strings.Join(resResp.Powers, ","), "ygzc_cgxx") {
+				productName = "资源平台"
+				remarks["source"] = "阳光直采"
+			}
 		}
 		log.Println("----ConsumePack----", infoType, remarks, productName)
 		Ret, Msg, Code := entity.JyConsumePack(userId, productName, platform, remarks, this.Session())

+ 16 - 35
src/jfw/modules/subscribepay/src/service/userAccountInfo.go

@@ -6,8 +6,6 @@ import (
 	"database/sql"
 	"encoding/base64"
 	"fmt"
-	"github.com/gogf/gf/v2/frame/g"
-	"github.com/gogf/gf/v2/util/gconv"
 	"jy/src/jfw/modules/subscribepay/src/config"
 	"jy/src/jfw/modules/subscribepay/src/entity"
 	"jy/src/jfw/modules/subscribepay/src/util"
@@ -17,6 +15,9 @@ import (
 	"strings"
 	"time"
 
+	"github.com/gogf/gf/v2/frame/g"
+	"github.com/gogf/gf/v2/util/gconv"
+
 	. "app.yhyue.com/moapp/jybase/api"
 	qutil "app.yhyue.com/moapp/jybase/common"
 	. "app.yhyue.com/moapp/jybase/date"
@@ -580,12 +581,10 @@ func (this *UserAccount) Authentication(doType string) {
 //       A账户已绑定微信,此微信必须与当前账户绑定的微信一致
 
 func (this *UserAccount) PhoneBind() {
-	log.Println("绑定开始")
-	fmt.Println("绑定开始")
 	sessVal := this.Session().GetMultiple()
 	userId, _ := sessVal["mgoUserId"].(string)
+	step, _ := this.GetInteger("step")
 	rData, errMsg := func() (interface{}, error) {
-		step, _ := this.GetInteger("step")
 		phone := this.GetString("phone")
 		code := this.GetString("code")
 		mode := this.GetString("mode")
@@ -617,7 +616,7 @@ func (this *UserAccount) PhoneBind() {
 			if unionid == "" {
 				return "", fmt.Errorf("获取账户信息异常")
 			}
-			exists, relationPhoneId, baseUserId := jy.NewPhoneUtil(util.MQFW).BindPhoneIsOccupy(userId, unionid, phoneVerify)
+			exists, relationPhoneId, _ := jy.NewPhoneUtil(util.MQFW).BindPhoneIsOccupy(userId, unionid, phoneVerify)
 			if exists { //再次校验是否使用
 				return nil, fmt.Errorf("手机号已被绑定")
 			}
@@ -636,16 +635,7 @@ func (this *UserAccount) PhoneBind() {
 							redis.Del(config.Config.ShareRedisName, shareKey)
 						}
 					}(qutil.ObjToString((*uData)["s_m_openid"]))
-
 					//绑定手机号和关注公众号
-					jy.Publish(util.Mgo_log, config.Config.Nsq, config.Config.Nsq_Topic, "task", userId, jy.Jyweb_node2, map[string]interface{}{
-						"code":       1007,
-						"types":      "bindPhone",
-						"num":        50,
-						"baseUserId": sessVal["base_user_id"],
-						"positionId": sessVal["positionId"],
-						"isOnlyBind": true,
-					})
 					jy.Publish(util.Mgo_log, config.Config.Nsq, config.Config.Nsq_Topic, "task", userId, jy.Jyweb_node2, map[string]interface{}{
 						"code":       1008,
 						"types":      "followWx",
@@ -722,27 +712,7 @@ func (this *UserAccount) PhoneBind() {
 								}
 								backData[k] = v
 							}
-							log.Println("绑定日志打印1", backData, baseUserId)
-							fmt.Println("绑定日志打印1", backData, baseUserId)
 							if util.MQFW.Save("user_merge", backData) != "" {
-								log.Println("绑定日志打印", backData, baseUserId)
-								fmt.Println("绑定日志打印", backData, baseUserId)
-								//给另外一个用户发站内信
-								userData := util.BaseMysql.FindOne("base_position", map[string]interface{}{
-									"user_id": baseUserId,
-									"type":    0,
-								}, "id", "")
-								log.Println("绑定日志打印", userData)
-								if userData != nil && len(*userData) > 0 {
-									jy.Publish(util.Mgo_log, config.Config.Nsq, config.Config.Nsq_Topic, "task", relationPhoneId, jy.Jyweb_node2, map[string]interface{}{
-										"code":       1007,
-										"types":      "bindPhone",
-										"num":        50,
-										"baseUserId": baseUserId,
-										"positionId": (*userData)["id"],
-										"isOnlyBind": true,
-									})
-								}
 								util.MQFW.Del("user", map[string]interface{}{"_id": mongodb.StringTOBsonId(userId)})
 								jy.CreateUserMerge(util.MQFW, util.Mysql, this.Session(), config.Middleground).FlushSession(relationPhoneId)
 								redis.Put("session", fmt.Sprintf("usermerge_delete_%s", userId), relationPhoneId, 7*24*60*60)
@@ -763,6 +733,17 @@ func (this *UserAccount) PhoneBind() {
 	}()
 	if errMsg != nil {
 		log.Printf("%s UserAccount PhoneBind 绑定手机号异常:%s\n", userId, errMsg.Error())
+	} else if step == 2 {
+		newSessVal := this.Session().GetMultiple()
+		newUserId, _ := newSessVal["mgoUserId"].(string)
+		jy.Publish(util.Mgo_log, config.Config.Nsq, config.Config.Nsq_Topic, "task", newUserId, jy.Jyweb_node2, map[string]interface{}{
+			"code":       1007,
+			"types":      "bindPhone",
+			"num":        50,
+			"baseUserId": newSessVal["base_user_id"],
+			"positionId": newSessVal["positionId"],
+			"isOnlyBind": true,
+		})
 	}
 	this.ServeJson(NewResult(rData, errMsg))
 }

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

@@ -165,5 +165,6 @@
   "merge": "<a href='%s'>系统检测到您有2个剑鱼标讯账号,为保证您的正常使用,请进行账号合并。</a>",
   "phrasesReplyText": "%s %s行业专属购买链接:<a href='%s'>点击</a>",
   "miniProgramActivateReplyText": "%s %s 点此查看:<a href='%s'>%s</a>",
-  "subKFReplyText": "⚠重要提醒⚠\n因微信服务号消息折叠(隐藏)到一起,使您无法第一时间收到重要消息推送,为避免遗漏重要商机,3步将公众号置顶\n\n第1步:点击右上角“ ”\n第2步:点击右上角“…”\n第3步:点击“置顶公众号”"
+  "subKFReplyText": "⚠重要提醒⚠\n因微信服务号消息折叠(隐藏)到一起,使您无法第一时间收到重要消息推送,为避免遗漏重要商机,3步将公众号置顶\n\n第1步:点击右上角“ ”\n第2步:点击右上角“…”\n第3步:点击“置顶公众号”",
+  "replySwitch": false
 }

+ 23 - 11
src/jfw/modules/weixin/src/config/config.go

@@ -1,20 +1,32 @@
 package config
 
 import (
-	util "app.yhyue.com/moapp/jybase/common"
-	"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"
+    util "app.yhyue.com/moapp/jybase/common"
+    "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"
+    "math/rand"
+    "time"
 )
 
-var Sysconfig map[string]interface{}
-var Middleground *middleground.Middleground
+var (
+    Sysconfig    map[string]interface{}
+    Middleground *middleground.Middleground
+    RAND         *rand.Rand
+    Appid        string
+)
 
 func init() {
-	util.ReadConfig(&Sysconfig)
+    util.ReadConfig(&Sysconfig)
+
+    RAND = rand.New(rand.NewSource(time.Now().UnixNano()))
+    Appid = Sysconfig["appid"].(string)
+    g.Cfg().GetAdapter().(*gcfg.AdapterFile).SetFileName("config.yaml")
+    var ctx = gctx.New()
+    Middleground = middleground.NewMiddleground(g.Cfg().MustGet(ctx, "etcd.hosts").Strings()).RegUserCenter(g.Cfg().MustGet(ctx, "userCenterKey").String())
+}
 
-	g.Cfg().GetAdapter().(*gcfg.AdapterFile).SetFileName("config.yaml")
-	var ctx = gctx.New()
-	Middleground = middleground.NewMiddleground(g.Cfg().MustGet(ctx, "etcd.hosts").Strings()).RegUserCenter(g.Cfg().MustGet(ctx, "userCenterKey").String())
+func GetRand() int {
+    return RAND.Intn(99999999)
 }

+ 80 - 0
src/jfw/modules/weixin/src/tools/qrcode.go

@@ -0,0 +1,80 @@
+package tools
+
+import (
+	util "app.yhyue.com/moapp/jybase/common"
+	"context"
+	"fmt"
+	"github.com/gogf/gf/v2/frame/g"
+	"jy/src/jfw/modules/weixin/src/config"
+	"log"
+)
+
+type ReplyTask struct {
+	Type    string `json:"type" doc:"Img(图片)、Text(文字)、News(图文)"`
+	EwmCode string `json:"ewmCode" doc:"扫指定二维码出发"`
+	Action  int    `json:"action" doc:"1:关注 2:扫码"`
+	Wait    int    `json:"wait" doc:"Wait-ms(等待ms毫秒);默认1秒"`
+	Desc    string `json:"desc" doc:"文字内容、图片Id、图文描述"`
+	Title   string `json:"title" doc:"图文标题"`
+	Url     string `json:"url" doc:"图文链接"`
+	ImgUrl  string `json:"imgUrl" doc:"图文图片地址"`
+	Start   int64  `json:"start"` //开始时间
+	End     int64  `json:"end"`   //结束时间
+}
+
+// 管理后台二维码统计
+// code 二维码code
+// action 1:关注 2:扫码
+func QRCodeRecord(code string, action int) {
+	if code != "" {
+		var (
+			updateSql, msg string
+		)
+		switch action {
+		case 1:
+			msg = "关注"
+			updateSql = `UPDATE jianyu.wx_code_manage  SET scan_num = scan_num +1 WHERE appid = ? AND code = ? `
+		case 2:
+			msg = "扫码"
+			updateSql = `UPDATE jianyu.wx_code_manage  SET sub_num = sub_num +1 WHERE appid = ? AND code = ? `
+		}
+		if updateSql != "" {
+			i := Mysql.UpdateOrDeleteBySql(updateSql, config.Appid, code)
+			if i <= 0 {
+				log.Println(fmt.Sprintf("%s,二维码code:%s,动作:%s 更新异常", config.Appid, code, msg))
+			}
+		}
+	}
+}
+
+// 获取二维码回复内容
+func QRCodeContent(code string) (rt []ReplyTask) {
+	//1、数据库配置
+	if code != "" {
+		if replySwitch, ok := config.Sysconfig["replySwitch"].(bool); ok && replySwitch {
+			data := Mysql.SelectBySql(`SELECT * FROM jianyu.wx_code_reply wcr WHERE wcr.appid = ? AND wcr.code  = ? AND wcr.state  = 0`, config.Appid, code)
+			if data != nil && len(*data) > 0 {
+				for _, v := range *data {
+					rt = append(rt, ReplyTask{
+						Type:    util.InterfaceToStr(v["type"]),
+						EwmCode: util.InterfaceToStr(v["code"]),
+						Action:  util.IntAll(v["action"]),
+						Wait:    util.IntAll(v["wait"]),
+						Desc:    util.InterfaceToStr(v["desc"]),
+						Title:   util.InterfaceToStr(v["title"]),
+						Url:     util.InterfaceToStr(v["url"]),
+						ImgUrl:  util.InterfaceToStr(v["img_url"]),
+						Start:   util.Int64All(v["start"]),
+						End:     util.Int64All(v["end"]),
+					})
+				}
+			}
+		}
+	}
+	//2、文件配置
+	var reply []ReplyTask
+	if err := g.Cfg("reply").MustGet(context.TODO(), "stream").Struct(&reply); err == nil && len(reply) > 0 {
+		rt = append(rt, reply...)
+	}
+	return
+}

+ 3 - 19
src/jfw/modules/weixin/src/wx/scanReplayStream.go

@@ -2,12 +2,11 @@ package wx
 
 import (
 	"app.yhyue.com/moapp/jybase/redis"
-	"context"
 	"crypto/md5"
 	"encoding/hex"
 	"fmt"
-	"github.com/gogf/gf/v2/frame/g"
 	. "jy/src/jfw/modules/weixin/src/github.com/wizjin/weixin"
+	"jy/src/jfw/modules/weixin/src/tools"
 	"log"
 	"strings"
 	"time"
@@ -22,27 +21,12 @@ const (
 	name = iota
 )
 
-type ReplyTask struct {
-	Type    string `json:"type" doc:"Img(图片)、Text(文字)、News(图文)"`
-	EwmCode string `json:"ewmCode" doc:"扫指定二维码出发"`
-	Action  int    `json:"action" doc:"1:关注 2:扫码"`
-	Wait    int    `json:"wait" doc:"Wait-ms(等待ms毫秒);默认1秒"`
-	Desc    string `json:"desc" doc:"文字内容、图片Id、图文描述"`
-	Title   string `json:"title" doc:"图文标题"`
-	Url     string `json:"url" doc:"图文链接"`
-	ImgUrl  string `json:"imgUrl" doc:"图文图片地址"`
-	Start   int64  `json:"start"` //开始时间
-	End     int64  `json:"end"`   //结束时间
-}
-
 // ScanReplayStream 扫码回复公共方法处理
 // code 二维码code
 // action 1:关注 2:扫码
 func ScanReplayStream(w ResponseWriter, openId, code string, action int) error {
-	//defer util.Catch()
-	var arr []ReplyTask
-	if err := g.Cfg("reply").MustGet(context.TODO(), "stream").Struct(&arr); err != nil {
-		return err
+	var arr = tools.QRCodeContent(code)
+	if len(arr) > 0 {
 	}
 	for _, task := range arr {
 		//校验类型

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

@@ -361,6 +361,7 @@ func saveUser(u *UserInfo, source, pre, RSource, CSource string) (bool, string,
 		}
 		_id := tools.MQFW.Save("user", newUser)
 		if _id != "" {
+			go tools.QRCodeRecord(source, ACTION_SUB)
 			//用户中台存储  开始
 			// formdata := map[string]interface{}{
 			// 	"appid":    "10000",
@@ -618,7 +619,7 @@ func Subscribe(w ResponseWriter, r *Request) {
 		}
 	}
 	//扫码关注公共回复逻辑
-	ScanReplayStream(w, openid, r.EventKey, ACTION_SUB)
+	ScanReplayStream(w, openid, source, ACTION_SUB)
 	// 存储来源
 	if source != "" && len(source) > 5 {
 		go saveUserLog(source, openid, activeName, shareflag)
@@ -706,6 +707,7 @@ func ScanHandler(w ResponseWriter, r *Request) {
 	}
 	log.Println("openid======", openid, r.EventKey)
 	go saveFixedCode(openid, r.Event, r.EventKey)
+	go tools.QRCodeRecord(r.EventKey, ACTION_SCAN)
 
 	if strings.Contains(r.EventKey, "Bind_") { //微信绑定处理
 		ek := strings.SplitN(r.EventKey, "_", 2)[1]

+ 2 - 15
src/jfw/modules/weixin/src/wx/wxjssdk.go

@@ -5,24 +5,11 @@ import (
 	"fmt"
 	"jy/src/jfw/modules/weixin/src/config"
 	"log"
-	"math/rand"
 	"time"
 
 	"app.yhyue.com/moapp/jybase/redis"
 )
 
-var RAND *rand.Rand
-var appid string
-
-func init() {
-	RAND = rand.New(rand.NewSource(time.Now().UnixNano()))
-	appid = config.Sysconfig["appid"].(string)
-}
-
-func GetRand() int {
-	return RAND.Intn(99999999)
-}
-
 func SignJSSDK(url string) []string {
 	var signature []string
 	var key = "wxsignature_" + url
@@ -33,13 +20,13 @@ func SignJSSDK(url string) []string {
 	}
 	if len(signature) == 0 {
 		timestamp := time.Now().Unix()
-		noncestr := fmt.Sprintf("%d", GetRand())
+		noncestr := fmt.Sprintf("%d", config.GetRand())
 		sign, err := Mux.JsSignature(url, timestamp, noncestr)
 		if err != nil {
 			log.Println(err)
 			signature = []string{"", "", "", ""}
 		} else {
-			signature = []string{appid, fmt.Sprintf("%d", timestamp), noncestr, sign}
+			signature = []string{config.Appid, fmt.Sprintf("%d", timestamp), noncestr, sign}
 			redis.Put("other", key, signature, 90*60)
 		}
 	}

+ 4 - 0
src/seo.json

@@ -612,6 +612,10 @@
         "jianyu360.cn": "网站扫码"
     },
     "source": {
+        "pcbaiduSEM2": "百度SEM非品牌词",
+        "360SEM2": "360SEM非品牌词",
+        "tengxun1": "腾讯SEM品牌词",
+        "tengxun2": "腾讯SEM非品牌词",
         "pcbaiduSEM": "百度SEM",
         "360SEM": "360SEM",
         "sogouSEM": "搜狗SEM",

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

@@ -191,6 +191,16 @@ var titleMap = {
   wx_connections_landingpage: '业绩倍增体验',
   app_connections_landingpage: '业绩倍增体验',
   h5_connections_landingpage: '业绩倍增体验',
+  // 阳光直采
+  app_sunlight_publish: '降本增效体验申请',
+  h5_sunlight_publish: '降本增效体验申请',
+  wx_sunlight_publish: '降本增效体验申请',
+  app_sunlightlist_viewdetails: '采购人联系方式等关键信息无权限查看',
+  h5_sunlightlist_viewdetails: '采购人联系方式等关键信息无权限查看',
+  wx_sunlightlist_viewdetails: '采购人联系方式等关键信息无权限查看',
+  app_sunlight_viewdetails: '采购人联系方式等关键信息无权限查看',
+  h5_sunlight_viewdetails: '采购人联系方式等关键信息无权限查看',
+  wx_sunlight_viewdetails: '采购人联系方式等关键信息无权限查看',
 }
 
 // tip
@@ -424,6 +434,16 @@ var tipMap = {
   wx_connections_landingpage: '请留下您的体验企业信息,我们会尽快协调人员给您做体验对接!',
   app_connections_landingpage: '请留下您的体验企业信息,我们会尽快协调人员给您做体验对接!',
   h5_connections_landingpage: '请留下您的体验企业信息,我们会尽快协调人员给您做体验对接!',
+  // 阳光直采
+  app_sunlight_publish: '采购发布成功后,可收到至少5家供应商参与报价',
+  h5_sunlight_publish: '采购发布成功后,可收到至少5家供应商参与报价',
+  wx_sunlight_publish: '采购发布成功后,可收到至少5家供应商参与报价',
+  app_sunlightlist_viewdetails: '每天前10名开通权限的用户可免费开通',
+  h5_sunlightlist_viewdetails: '每天前10名开通权限的用户可免费开通',
+  wx_sunlightlist_viewdetails: '每天前10名开通权限的用户可免费开通',
+  app_sunlight_viewdetails: '每天前10名开通权限的用户可免费开通',
+  h5_sunlight_viewdetails: '每天前10名开通权限的用户可免费开通',
+  wx_sunlight_viewdetails: '每天前10名开通权限的用户可免费开通',
 }
 
 // 留资来源(数据库新增字段,记录留资对应的来源,之前未记录的不考虑,新增的source要记录)
@@ -562,6 +582,16 @@ var sourceDescMap = {
   wx_connections_landingpage: '人脉落地页',
   app_connections_landingpage: '人脉落地页',
   h5_connections_landingpage: '人脉落地页',
+  // 阳光直采
+  app_sunlight_publish: '采购发布落地页-申请发布信息',
+  h5_sunlight_publish: '采购发布落地页-申请发布信息',
+  wx_sunlight_publish: '采购发布落地页-申请发布信息',
+  app_sunlightlist_viewdetails: '阳光直采采购信息列表-查看采购信息详情',
+  h5_sunlightlist_viewdetails: '阳光直采采购信息列表-查看采购信息详情',
+  wx_sunlightlist_viewdetails: '阳光直采采购信息列表-查看采购信息详情',
+  app_sunlight_viewdetails: '阳光直采-查看采购信息详情',
+  h5_sunlight_viewdetails: '阳光直采-查看采购信息详情',
+  wx_sunlight_viewdetails: '阳光直采-查看采购信息详情',
 }
 
 var vNode = {
@@ -1822,6 +1852,26 @@ var vNode = {
                   },'提交成功')
                   break
               }
+              // 阳光直采
+              case 'app_sunlight_publish':
+              case 'h5_sunlight_publish':
+              case 'wx_sunlight_publish':{
+                  _this.showMessage('后续会有采购支撑人员与您致电,请注意接听电话。', '我知道了', function () {
+                    history.back()
+                  },'提交成功')
+                  break
+              }
+              case 'app_sunlightlist_viewdetails':
+              case 'h5_sunlightlist_viewdetails':
+              case 'wx_sunlightlist_viewdetails':
+              case 'app_sunlight_viewdetails':
+              case 'h5_sunlight_viewdetails':
+              case 'wx_sunlight_viewdetails':{
+                _this.showMessage('后续会有客服与您致电,并告知您获取结果!', '我知道了', function () {
+                  history.back()
+                },'提交成功')
+                break
+              }
               default: {
                 var biaoshu = source === 'bid_document_Introduction_page' || source.indexOf('article_BidPreparation') > -1
                 // 标书制作或者三方认证(case语句满足不了条件,放default中做更多判断)

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 6 - 0
src/web/staticres/common-module/public/js/clipboard.min.js


+ 129 - 0
src/web/staticres/common-module/sunshine/css/index.css

@@ -0,0 +1,129 @@
+.sunshine-purchase{
+  background: #fff;
+}
+.sunshine-purchase .j-main{
+  padding-bottom: .32rem;
+}
+.sunshine-purchase .sunshine-banner{
+  width: 100%;
+  height: 3.2rem;
+  padding: 1rem .66rem;
+  background: url(/common-module/sunshine/image/banner.png) no-repeat center center;
+  background-size: 100% 100%;
+}
+.sunshine-purchase .banner-title{
+  width: 2.24rem;
+  object-fit: contain;
+}
+.sunshine-purchase .banner-text{
+  font-size: .28rem;
+  line-height: .4rem;
+  color: #383838;
+  letter-spacing: 2px;
+}
+.sunshine-purchase .sunshine-doc{
+  padding: .32rem 0;
+  text-align: center;
+}
+.sunshine-purchase .sunshine-doc-h1{
+  font-size: .4rem;
+  line-height: .56rem;
+  color: #171826;
+  font-weight: bold;
+}
+.sunshine-purchase .sunshine-doc-p{
+  padding-top: .12rem;
+  font-size: .2rem;
+  line-height: .32rem;
+  color: #5F5E64;
+}
+.sunshine-purchase .sunshine-module{}
+.sunshine-purchase .module-title{
+  position: relative;
+  text-align: center;
+  font-size: .32rem;
+  line-height: .44rem;
+  color: #171826;
+}
+.sunshine-purchase .module-title::before{
+  position: absolute;
+  content: '';
+  left: .75rem;
+  top: 50%;
+  width: 1rem;
+  height: 1px;
+  background: #2ABED1;
+}
+.sunshine-purchase .module-title::after{
+  position: absolute;
+  content: '';
+  right: .75rem;
+  top: 50%;
+  width: 1rem;
+  height: 1px;
+  background: #2ABED1;
+}
+.sunshine-purchase .module-main{
+  position: relative;
+  padding: 0 .28rem;
+}
+.sunshine-purchase .module-main > img{
+  width: 100%;
+  height: auto;
+  object-fit: fill;
+}
+.sunshine-purchase .j-button-common{
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  width: 3rem;
+  height: .72rem;
+  background: -moz-linear-gradient(to left, #3687FF, #2ABED1);
+  background: -webkit-gradient(to left, #3687FF, #2ABED1);
+  background: -webkit-linear-gradient(to left, #3687FF, #2ABED1);
+  background: -o-linear-gradient(to left, #3687FF, #2ABED1);
+  background: -ms-linear-gradient(to left, #3687FF, #2ABED1);
+  background: linear-gradient(to left, #3687FF, #2ABED1);
+  border-radius: 6px;
+  font-size: .32rem;
+  color: #fff;
+}
+.sunshine-purchase .j-button-common.j-button-free{
+  position: absolute;
+  bottom: .68rem;
+  left: 50%;
+  transform: translateX(-50%);
+}
+.j-button-group{
+  padding: .44rem .52rem;
+}
+.j-button-confirm{
+  flex: unset;
+  width: 3rem;
+  height: .72rem;
+  border-radius: 6px;
+}
+.copy-dialog{
+  width: 6.06rem;
+  border-radius: 8px;
+}
+.copy-dialog .van-dialog__header{
+  padding-top: 24px;
+  color: #171826;
+  font-size: .36rem;
+  line-height: .52rem;
+}
+.copy-dialog .van-dialog__message{
+  padding-bottom: 24px;
+  font-size: .3rem;
+  color: #5F5E64;
+}
+.copy-dialog .van-button{
+  font-size: .36rem;
+}
+.sunshine-purchase .j-footer{
+  border-radius: 16px 16px 0 0;
+  background: linear-gradient(#EAFAFF, #FFFFFF);
+  filter: drop-shadow(0 -6px 24px 0 #0234801A);
+  box-shadow: 0 2px 2px 0 #fff inset;
+}

BIN
src/web/staticres/common-module/sunshine/image/banner-title.png


BIN
src/web/staticres/common-module/sunshine/image/banner.png


BIN
src/web/staticres/common-module/sunshine/image/card-1.png


BIN
src/web/staticres/common-module/sunshine/image/card-2.png


BIN
src/web/staticres/common-module/sunshine/image/card-3.png


+ 59 - 0
src/web/staticres/common-module/sunshine/js/index.js

@@ -0,0 +1,59 @@
+var sunshine = {
+  init: function() {
+    this.freeExp()
+    this.copyText()
+    this.openCustomer()
+  },
+  // 免费体验(去留资)
+  freeExp: function() {
+    $('.j-button-free').click(function() {
+      console.log(utils.$envs.inWX);
+      if(utils.$envs.inWX){
+        location.href = '/weixin/frontPage/bigmember/free/perfect_info?source=wx_sunlight_publish'
+      } else {
+        var source = utils.$envs.inH5 ? 'h5_sunlight_publish' : 'app_sunlight_publish'
+        if (loginFlag) {
+          location.href = '/jyapp/frontPage/bigmember/free/perfect_info?source=' + source
+        } else {
+          var url = '/jyapp/frontPage/bigmember/free/perfect_info?source=' + source
+          window.location.href = "/jyapp/free/login?url=" + encodeURIComponent(url)
+        }
+      }
+    })
+  },
+  // 复制文本
+  copyText: function() {
+    var clipboard = new ClipboardJS('.j-button-copy', {
+      text: function() {
+        // /page_workDesktop/work-bench/page?link=https%3A%2F%2Fjybx2-webtest.jydev.jianyu360.com%2Fswordfish%2Fpage_web_pc%2Fpurchase%2Finfo
+        return "https://jianyu360.cn/page_workDesktop/work-bench/page?link=https://jianyu360.cn/swordfish/page_web_pc/purchase/info";
+      }
+    })
+    clipboard.on('success', function(e) {
+      vant.Dialog({
+        className:'copy-dialog',
+        title: '网页版链接已复制',
+        message: '请您前往网页端进行发布',
+        confirmButtonText:'我知道了',
+        confirmButtonColor: '#2cb7ca'
+      }).then(function () {
+      })
+    })
+    clipboard.on('error', function(e) {
+      console.log(e)
+    })
+  },
+  // 联系客服
+  openCustomer: function() {
+    $('.j-button-kf').click(function() {
+      if(utils.$envs.inWX){
+        window.location.href = '/big/wx/page/customer'
+      } else{
+        window.location.href = '/jyapp/free/customer'
+      }
+    })
+  }
+}
+$(function(){
+  sunshine.init()
+})

+ 3 - 0
src/web/staticres/common-module/vipsubscribe/js/vip-subscribe-set-template.js

@@ -625,9 +625,12 @@ var subComponent = {
     },
     setMoneyList: function () {
       return this.moneyList.filter((item, i) => i !== 0)
+<<<<<<< HEAD
     },
     isWX: function () {
       return location.href.indexOf('front') !== -1
+=======
+>>>>>>> master
     }
   },
   watch: {

BIN
src/web/staticres/commonFunctions/purchase-info.png


BIN
src/web/staticres/commonFunctions/purchase-manage.png


BIN
src/web/staticres/commonFunctions/purchase-release.png


BIN
src/web/staticres/commonFunctions/renmai_rmcpjs.png


+ 22 - 5
src/web/staticres/js/index/index_2023.12.js

@@ -185,6 +185,8 @@ var searchHistory = {
         type = 2
       } else if (_this.isBuyerSearch()) {
         type = 4
+      } else if (_this.isSunSearch()) {
+        type = 6
       }
       _this.removeSearchHistory(type)
     })
@@ -207,8 +209,8 @@ var searchHistory = {
       type = '2,3'
     } else if (this.isBuyerSearch()) {
       type = '4,5'
-    } else {
-      type = ''
+    } else if (this.isSunSearch()) {
+      type = '6'
     }
     return type
   },
@@ -221,8 +223,11 @@ var searchHistory = {
   isBuyerSearch: function () {
     return $('.index-search-module .search-type-list .active').text().indexOf('采购单位搜索') !== -1
   },
+  isSunSearch: function() {
+    return $('.index-search-module .search-type-list .active').text().indexOf('阳光') !== -1
+  },
   checkListShow: function () {
-    var pass = this.isBidSearch() || this.isEntSearch() || this.isBuyerSearch()
+    var pass = this.isBidSearch() || this.isEntSearch() || this.isBuyerSearch() || this.isSunSearch()
     var show = $('#keywords').val() === '' && this.preSearch.focus && (this.searchList.length || this.browseList.length) && pass
     this.listShow(show)
   },
@@ -265,7 +270,7 @@ var searchHistory = {
   },
   // 获取搜索历史记录
   getSearchHistory: function () {
-    // type: 1-标讯搜索历史记录  2-企业历史搜索 3-企业历史浏览 4-采购单位历史搜索 5-采购单位历史浏览
+    // type: 1-标讯搜索历史记录  2-企业历史搜索 3-企业历史浏览 4-采购单位历史搜索 5-采购单位历史浏览 6-阳光采购搜索
     var type = this.getType();
     console.log(type, loginflag);
     if(!type) return
@@ -311,6 +316,7 @@ var searchHistory = {
       var biddingSearch = _this.isBidSearch()
       var entSearch = _this.isEntSearch()
       var buyerSearch = _this.isBuyerSearch()
+      var sunSearch = _this.isSunSearch()
       var name = item.target.dataset.name
       if (biddingSearch) {
         window.location.href = '/jylab/supsearch/index.html?keywords=' + name
@@ -318,6 +324,8 @@ var searchHistory = {
         window.location.href = '/jylab/entSearch/index.html?searchvalue=' + name
       } else if (buyerSearch) {
         window.location.href = '/jylab/purSearch/index.html?searchvalue=' + name
+      } else if (sunSearch) {
+        window.location.href = '/swordfish/page_big_pc/search/sun?keywords=' + name
       }
     })
     $('.browse-list-container').click('.browse-history-item', function(item){
@@ -379,6 +387,10 @@ var _page = {
       placeholder: '请输入采购单位名称',
       target: '/jylab/purSearch/index.html',
     },
+    ygzc: {
+      placeholder: '请输入产品或业务名称关键词,例如:钢板',
+      target: '/swordfish/page_big_pc/search/sun'
+    },
     gy: {
       placeholder: '请输入您想要查询的供应信息,多个关键词用空格隔开',
       target: '/swordfish/page_big_pc/search/supply',
@@ -443,7 +455,7 @@ var _page = {
         entAssoc.getAssocList()
       } else if (dataId == 'gy') {
         searchInput.attr('placeholder', conf.placeholder)
-      } else if (dataId == 'wd') {
+      } else if (dataId == 'wd' || dataId == 'ygzc') {
         searchInput.attr('placeholder', conf.placeholder)
       }
       searchHistory.getSearchHistory()
@@ -475,6 +487,11 @@ var _page = {
           } else {
             targetUrl = url
           }
+        } else if (dataId === 'ygzc') {
+          // if (loginflag) {
+          //   url = '/page_workDesktop/work-bench/app/big/search/sun'
+          // }
+          targetUrl = url + '?keywords=' + searchValue
         }
         if (targetUrl) {
           location.href = targetUrl

+ 9 - 10
src/web/staticres/landingpage/css/InformationDistribution.css

@@ -213,19 +213,18 @@ margin-top: 20px;
   margin-top: 82px;
   box-sizing: border-box;
   display: flex;
-  /* justify-content: space-between; */
+  justify-content: space-between;
 }
 .Information-middle .content .item{
   width: 224px;
-height: 288px;
-border-radius: 16px;
-background: linear-gradient(180deg, #EAFAFF 0%, #FFFFFF 61.46%);
-box-shadow: 0px 6px 24px 0px #0234801A;
-box-sizing: border-box;
-border-top: 2px solid #ffff;
-padding-top: 80px;
-position: relative;
-margin-right: 20px;
+  height: 288px;
+  border-radius: 16px;
+  background: linear-gradient(180deg, #EAFAFF 0%, #FFFFFF 61.46%);
+  box-shadow: 0px 6px 24px 0px #0234801A;
+  box-sizing: border-box;
+  border-top: 2px solid #ffff;
+  padding-top: 80px;
+  position: relative;
 }
 .Information-middle .content .item:last-child{
 margin-right: 0px;

+ 3 - 3
src/web/templates/frontRouter/pc/InformationDistribution/free/index.html

@@ -31,7 +31,7 @@
         <img src="{{Msg "seo" "cdn"}}/landingpage/image/InformationDistribution/ssgx.png?v={{Msg "seo" "version"}}" alt="" class="img1">
         <img src="{{Msg "seo" "cdn"}}/landingpage/image/InformationDistribution/xxfb.png?v={{Msg "seo" "version"}}" alt="" class="img2">
       </div>
-      <p class="text_desc">海量供应商资源为您精准匹配推荐</p>
+      <p class="text_desc">赋能企业经营发展降本提效</p>
       <div class="head_btn" onclick="onlinekf()">立即咨询</div>
     </div>
 
@@ -39,12 +39,12 @@
   <section class="Information-middle CfadeInUp">
     <h2>信息发布</h2>
     <div class="content clearfix">
-      <div class="item">
+      <!-- <div class="item">
         <img src="{{Msg "seo" "cdn"}}/landingpage/image/InformationDistribution/cgxx.png?v={{Msg "seo" "version"}}" alt="" class="Information-middle-img">
         <p class="title">采购信息</p>
         <p class="desc">供采双方直接对接<br>节省成本采购更高效</p>
         <div class="middle_btn" onclick="goInformationDistribution('cgxx')">发布信息</div>
-      </div>
+      </div> -->
       <div class="item">
         <img src="{{Msg "seo" "cdn"}}/landingpage/image/InformationDistribution/gyxx.png?v={{Msg "seo" "version"}}" alt="" class="Information-middle-img">
         <p class="title">供应信息</p>

+ 5 - 0
src/web/templates/frontRouter/pc/declaration/free/relationship.html

@@ -21,6 +21,11 @@
     <link href='{{Msg "seo" "cdn"}}/css/swiper.min.css?v={{Msg "seo" "version"}}' rel="stylesheet" type="text/css"/>
   <link href='{{Msg "seo" "cdn"}}/css/collect-user-info.css?v={{Msg "seo" "version"}}' rel="stylesheet">
   <link href='{{Msg "seo" "cdn"}}/frontRouter/pc/declaration/css/relationship.css?v={{Msg "seo" "version"}}' rel="stylesheet" type="text/css" />
+  <style>
+    .in-iframe .intro-leave-banner {
+      padding: 0 100px;
+    }
+  </style>
 </head>
 <body>
 {{include "/common/pchead.html"}}

+ 1 - 1
src/web/templates/frontRouter/pc/page_big_pc/sess/index.html

@@ -14,7 +14,7 @@
     <link href='{{Msg "seo" "cdn"}}/css/pc.css?v={{Msg "seo" "version"}}' rel="stylesheet"/>
     <link href='{{Msg "seo" "cdn"}}/pccss/public-nav-1200.css?v={{Msg "seo" "version"}}' rel="stylesheet" type="text/css"/>
     <script src='{{Msg "seo" "cdn"}}/antiRes/js/mainHook.js?v={{Msg "seo" "version"}}'></script>
-  <link rel="stylesheet" href="https://cdn-common.jianyu360.com/cdn/assets/iconfont/pc/24.5.6/iconfont.css">
+  <link rel="stylesheet" href="https://cdn-common.jianyu360.com/cdn/assets/iconfont/pc/24.11.7/iconfont.css">
     <!-- 高级语法兼容性处理  -->
     <script>
         if (String.prototype.startsWith === 'undefined') {

+ 36 - 5
src/web/templates/frontRouter/pc/serviceSystem/free/index.html

@@ -453,7 +453,7 @@
                                         <span class="text">招标采购信息发布</span>
                                     </div>
                                     <div class="table_content_longcell">
-                                        <span class="text">认证后的企业,支持发布采购信息、招标预告、招标公告等招标采购信息。</span>
+                                        <span class="text">认证后的企业,支持发布招标预告、招标公告等招标采购信息。</span>
                                     </div>
                                     <div class="table_content_sortcell"><i class="right"></i></div>
                                     <div class="table_content_sortcell"><i class="right"></i></div>
@@ -486,6 +486,37 @@
                                 </div>
                             </div>
                         </div>
+                        <div class="table_content">
+                          <div class="table_content_l">
+                              <span>阳光直采</span>
+                          </div>
+                          <div class="table_content_r">
+                              <div class="table_content_r_item">
+                                  <div class="table_content_sortcell">
+                                      <span class="text">采购信息</span>
+                                  </div>
+                                  <div class="table_content_longcell">
+                                      <span class="text">企业公开直采信息,直接对接采购人。</span>
+                                  </div>
+                                  <div class="table_content_sortcell"><span class="tit">议价</span></div>
+                                  <div class="table_content_sortcell"><span class="tit">议价</span></div>
+                                  <div class="table_content_sortcell"><span class="tit">议价</span></div>
+                                  <div class="table_content_sortcell"><span class="tit">议价</span></div>
+                              </div>
+                              <div class="table_content_r_item ">
+                                  <div class="table_content_sortcell">
+                                      <span class="text">采购发布</span>
+                                  </div>
+                                  <div class="table_content_longcell">
+                                      <span class="text">采购发布成功后,可收到至少5家供应商参与报价。</span>
+                                  </div>
+                                  <div class="table_content_sortcell"><span class="tit">限时免费</span></div>
+                                  <div class="table_content_sortcell"><span class="tit">限时免费</span></div>
+                                  <div class="table_content_sortcell"><span class="tit">限时免费</span></div>
+                                  <div class="table_content_sortcell"><span class="tit">限时免费</span></div>
+                              </div>
+                          </div>
+                        </div>
                         <div class="table_content">
                             <div class="table_content_l">
                                 <span>人脉管理</span>
@@ -503,7 +534,7 @@
                                     <div class="table_content_sortcell"><i class="free"></i></div>
                                     <div class="table_content_sortcell"><i class="free"></i></div>
                                     <div class="table_content_sortcell"><i class="free"></i></div>
-                                    <div class="table_content_sortcell"><span class="tit">议</span></div>
+                                    <div class="table_content_sortcell"><span class="tit">议</span></div>
                                 </div>
                                 <div class="table_content_r_item ">
                                   <div class="table_content_sortcell">
@@ -517,7 +548,7 @@
                                   <div class="table_content_sortcell"><i class="free"></i></div>
                                   <div class="table_content_sortcell"><i class="free"></i></div>
                                   <div class="table_content_sortcell"><i class="free"></i></div>
-                                  <div class="table_content_sortcell"><span class="tit">议</span></div>
+                                  <div class="table_content_sortcell"><span class="tit">议</span></div>
                                 </div>
                                 <div class="table_content_r_item">
                                     <div class="table_content_sortcell">
@@ -529,7 +560,7 @@
                                     <div class="table_content_sortcell"><i class="free"></i></div>
                                     <div class="table_content_sortcell"><i class="free"></i></div>
                                     <div class="table_content_sortcell"><i class="free"></i></div>
-                                    <div class="table_content_sortcell"><span class="tit">议</span></div>
+                                    <div class="table_content_sortcell"><span class="tit">议</span></div>
                                 </div>
                                 <div class="table_content_r_item ">
                                     <div class="table_content_sortcell">
@@ -541,7 +572,7 @@
                                     <div class="table_content_sortcell"><i class="free"></i></div>
                                     <div class="table_content_sortcell"><i class="free"></i></div>
                                     <div class="table_content_sortcell"><i class="free"></i></div>
-                                    <div class="table_content_sortcell"><span class="tit">议</span></div>
+                                    <div class="table_content_sortcell"><span class="tit">议</span></div>
                                 </div>
                             </div>
                         </div>

+ 0 - 5
src/web/templates/frontRouter/wx/declaration/free/relationship.html

@@ -12,11 +12,6 @@
     <link rel="stylesheet" href=//cdn-common.jianyu360.com/cdn/lib/vant/2.12.24/lib/icon/local.css />
     <link rel="stylesheet" href='{{Msg "seo" "cdn"}}/common-module/bidedoc/css/relationship.css?v={{Msg "seo" "version"}}' />
     <script src='{{Msg "seo" "cdn"}}/big-member/js/rem.js?v={{Msg "seo" "version"}}'></script>
-    <style>
-        .header-banner {
-            /* margin-top: -0.6rem; */
-        }
-    </style>
 </head>
 
 <body>

+ 105 - 0
src/web/templates/frontRouter/wx/sunshine/free/index.html

@@ -0,0 +1,105 @@
+<!DOCTYPE html>
+<html lang="zh-CN">
+
+<head>
+	<meta charset="utf-8">
+  <title>阳光直采_剑鱼标讯阳光采购服务</title>
+  <meta name="keywords" content="阳光采购,采购服务,阳光直采" />
+  <meta name="description" content="剑鱼标讯阳光采购服务,简称“阳光直采”,是剑鱼标讯旗下的数字化采购服务平台,为企业提供物资采购数字化解决方案,推动企业采购更加智能、高效、透明,赋能企业经营发展降本提效。" />
+  <meta name="author" content="剑鱼标讯">
+  <meta http-equiv="X-UA-Compatible" content="IE=edge">
+  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
+  <meta name="browsermode" content="application">
+  <meta name="x5-orientation" content="portrait">
+  <meta name="screen-orientation" content="portrait">
+  <meta name="x5-page-mode" content="app">
+  <meta name="apple-mobile-web-app-capable" content="yes">
+  <meta name="apple-mobile-web-app-status-bar-style" content="black">
+  <meta name="format-detection" content="telephone=no">
+  <link rel="icon" href="/favicon.ico">
+  <script src='https://cdn-common.jianyu360.com/cdn/lib/jquery/3.6.0/jquery.min.js'></script>
+  <script src='{{Msg "seo" "cdn"}}/common-module/public/head.js?v={{Msg "seo" "version"}}'></script>
+
+  <!--S-必定会使用的资源-->
+  <link rel="stylesheet" href='{{Msg "seo" "cdn"}}/big-member/weixin/css/public.css?v={{Msg "seo" "version"}}' />
+  <link rel="stylesheet" href='{{Msg "seo" "cdn"}}/big-member/weixin/css/j-icons.css?v={{Msg "seo" "version"}}' />
+  <!-- <link rel="stylesheet" href='{{Msg "seo" "cdn"}}/jyapp/vipsubscribe/iconfont/iconfont.css?v={{Msg "seo" "version"}}' /> -->
+  <!--S-当前页必定需要预加载的资源-->
+  <link rel="preload" as="style" href=//cdn-common.jianyu360.com/cdn/lib/reset-css/5.0.1/reset.min.css />
+
+  <!--E-当前页必定需要预加载的资源-->
+
+  <!--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='{{Msg "seo" "cdn"}}/common-module/sunshine/css/index.css?v={{Msg "seo" "version"}}' />
+  <style>
+    .jy-app-header{
+      background-color: #fff!important;
+      color: #1d1d1d;
+    }
+    .jy-app-header.header-transparent {
+      position: absolute;
+      width: 100%;
+      background-color: transparent!important;
+      color: #fff;
+    }
+  </style>
+
+</head>
+
+<body>
+  <div class="j-container sunshine-purchase">
+    <div class="j-main">
+       <div class="sunshine-banner">
+         <img class="banner-title" src='{{Msg "seo" "cdn"}}/common-module/sunshine/image/banner-title.png' alt="banner-title">
+         <p class="banner-text">赋能企业经营发展降本提效</p>
+       </div>
+       <div class="sunshine-doc">
+        <h1 class="sunshine-doc-h1">剑鱼标讯阳光采购服务</h1>
+        <p class="sunshine-doc-p">
+          为企业提供企业生产性及非生产性物资采购数字化解决方案,<br>
+          推动企业采购更加智能、高效、透明,赋能企业经营 发展降本提效
+        </p>
+       </div>
+       <div class="sunshine-module">
+        <div class="module-title">采购支出成本降低15%</div>
+        <div class="module-main">
+          <img src='{{Msg "seo" "cdn"}}/common-module/sunshine/image/card-1.png'>
+          <div class="j-button-common j-button-free">免费体验</div>
+        </div>
+       </div>
+       <div class="sunshine-module">
+        <div class="module-title">工作效率提升47%</div>
+        <div class="module-main">
+          <img src='{{Msg "seo" "cdn"}}/common-module/sunshine/image/card-2.png'>
+          <div class="j-button-common j-button-free">免费体验</div>
+        </div>
+       </div>
+       <div class="sunshine-module">
+        <div class="module-title">完善供应商库</div>
+        <div class="module-main">
+          <img src='{{Msg "seo" "cdn"}}/common-module/sunshine/image/card-3.png'>
+          <div class="j-button-common j-button-free">免费体验</div>
+        </div>
+       </div>
+    </div>
+    <div class="j-footer j-button-group">
+      <div class="j-button-confirm j-button-copy">去网页版发布</div>
+      <div class="j-button-common j-button-kf">联系客服发布</div>
+    </div>
+  </div>
+</body>
+
+<script src='{{Msg "seo" "cdn"}}/big-member/js/rem.js'></script>
+<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='{{Msg "seo" "cdn"}}/common-module/public/js/clipboard.min.js?v={{Msg "seo" "version"}}'></script>
+<script src='{{Msg "seo" "cdn"}}/common-module/public/js/utils.js?v={{Msg "seo" "version"}}'></script>
+<script src='{{Msg "seo" "cdn"}}/common-module/sunshine/js/index.js?v={{Msg "seo" "version"}}'></script>
+<!--百度统计end-->
+{{include "/common/baiducc.html"}}
+<script>
+  utils.iosBackRefresh()
+</script>
+</html>

+ 1 - 1
src/web/templates/pc/biddetail_rec.html

@@ -12,7 +12,7 @@
   <script src="{{Msg "seo" "cdn"}}/js/jquery.cookie.js"></script>
   <link rel="stylesheet" type="text/css" href="{{Msg "seo" "cdn"}}/pccss/public-nav-1200.css?v={{Msg "seo" "version"}}" />
   <link href="//cdn-common.jianyu360.com/cdn/lib/element-ui/2.15.7/lib/theme-chalk/index.css" rel="stylesheet" />
-  <link href="//cdn-common.jianyu360.com/cdn/assets/iconfont/pc/23.8.30/iconfont.css" rel="stylesheet" />
+  <link href="//cdn-common.jianyu360.com/cdn/assets/iconfont/pc/24.11.7/iconfont.css" rel="stylesheet" />
   <link href='{{Msg "seo" "cdn"}}/css/collect-user-info.css?v={{Msg "seo" "version"}}' rel="stylesheet">
   <link href='{{Msg "seo" "cdn"}}/BI-module/css/crm-action.css?v={{Msg "seo" "version"}}' rel="stylesheet">
   <link href='{{Msg "seo" "cdn"}}/common-module/nps-common/css/nps.css?v={{Msg "seo" "version"}}' rel="stylesheet">

+ 1 - 1
src/web/templates/pc/detail/biddetail_login.html

@@ -15,7 +15,7 @@
   <link href="{{Msg "seo" "cdn"}}/pccss/pc-detail.css?v={{Msg "seo" "version"}}" rel="stylesheet">
   <link href='{{Msg "seo" "cdn"}}/pccss/public-nav-1200.css?v={{Msg "seo" "version"}}' rel="stylesheet" type="text/css"/>
   <script src='{{Msg "seo" "cdn"}}/antiRes/js/mainHook.js?v={{Msg "seo" "version"}}'></script>
-  <link rel="stylesheet" href="https://cdn-common.jianyu360.com/cdn/assets/iconfont/pc/24.10.15/iconfont.css">
+  <link rel="stylesheet" href="https://cdn-common.jianyu360.com/cdn/assets/iconfont/pc/24.11.7/iconfont.css">
   <!-- 高级语法兼容性处理  -->
   <script>
     if (String.prototype.startsWith === 'undefined') {

+ 1 - 1
src/web/templates/pc/entsearchindex.html

@@ -11,7 +11,7 @@
 		<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 href="{{Msg "seo" "cdn"}}/pccss/public-nav-1200.css?v={{Msg "seo" "version"}}" rel="stylesheet" />
-    <link href="//cdn-common.jianyu360.com/cdn/assets/iconfont/pc/23.8.30/iconfont.css" rel="stylesheet" />
+    <link href="//cdn-common.jianyu360.com/cdn/assets/iconfont/pc/24.11.7/iconfont.css" rel="stylesheet" />
         <script src="{{Msg "seo" "cdn"}}/js/jquery.cookie.js"></script>
 		<script src="{{Msg "seo" "cdn"}}/js/public-nav.js?v={{Msg "seo" "version"}}"></script>
 

+ 1 - 1
src/web/templates/pc/index.html

@@ -23,7 +23,7 @@
   <link href='{{Msg "seo" "cdn"}}/css/pc.css?v={{Msg "seo" "version"}}' rel="stylesheet">
   <link href="//cdn-common.jianyu360.com/cdn/lib/element-ui/2.15.7/lib/theme-chalk/index.css" rel="stylesheet" />
   <link href='{{Msg "seo" "cdn"}}/css/collect-user-info.css?v={{Msg "seo" "version"}}' rel="stylesheet">
-  <link href='//cdn-common.jianyu360.com/cdn/assets/iconfont/pc/23.6.9/iconfont.css' rel="stylesheet" />
+  <link href='//cdn-common.jianyu360.com/cdn/assets/iconfont/pc/24.11.7/iconfont.css' rel="stylesheet" />
   <script src="//cdn-common.jianyu360.com/cdn/lib/vue/2.7.14/vue.min.js"></script>
   </head>
 	<body>

+ 1 - 1
src/web/templates/pc/index_old_23_06_16.html

@@ -22,7 +22,7 @@
   <link href='{{Msg "seo" "cdn"}}/css/pc.css?v={{Msg "seo" "version"}}' rel="stylesheet">
   <link href="//cdn-common.jianyu360.com/cdn/lib/element-ui/2.15.7/lib/theme-chalk/index.css" rel="stylesheet" />
   <link href='{{Msg "seo" "cdn"}}/css/collect-user-info.css?v={{Msg "seo" "version"}}' rel="stylesheet">
-  <link href='//cdn-common.jianyu360.com/cdn/assets/iconfont/pc/23.5.23/iconfont.css' rel="stylesheet" />
+  <link href='//cdn-common.jianyu360.com/cdn/assets/iconfont/pc/24.11.7/iconfont.css' rel="stylesheet" />
   <script src="//cdn-common.jianyu360.com/cdn/lib/vue/2.7.14/vue.min.js"></script>
   </head>
 	<body>

+ 1 - 1
src/web/templates/pc/pursearchindex.html

@@ -16,7 +16,7 @@
 		<script src="{{Msg "seo" "cdn"}}/js/public-nav.js?v={{Msg "seo" "version"}}"></script>
 
         <link href="//cdn-common.jianyu360.com/cdn/lib/element-ui/2.15.13-rc/lib/theme-chalk/index.css" rel="stylesheet" />
-        <link href="//cdn-common.jianyu360.com/cdn/assets/iconfont/pc/23.8.30/iconfont.css" rel="stylesheet" />
+        <link href="//cdn-common.jianyu360.com/cdn/assets/iconfont/pc/24.11.7/iconfont.css" rel="stylesheet" />
         <link rel="stylesheet" href='{{Msg "seo" "cdn"}}/css/ele-reset.css?v={{Msg "seo" "version"}}'>
         <!-- <link href='{{Msg "seo" "cdn"}}/css/dev2/newBidSearch.css?v={{Msg "seo" "version"}}' rel="stylesheet"> -->
         <link rel="stylesheet" href='{{Msg "seo" "cdn"}}/css/selector/selector.css?v={{Msg "seo" "version"}}'>

+ 1 - 1
src/web/templates/pc/search/index.html

@@ -13,7 +13,7 @@
     <link href='{{Msg "seo" "cdn"}}/pccss/reset_pc.css' rel="stylesheet" type="text/css"/>
     <link href='{{Msg "seo" "cdn"}}/css/pc.css?v={{Msg "seo" "version"}}' rel="stylesheet"/>
     <link href='{{Msg "seo" "cdn"}}/pccss/public-nav-1200.css?v={{Msg "seo" "version"}}' rel="stylesheet" type="text/css"/>
-    <link rel="stylesheet" href="https://cdn-common.jianyu360.com/cdn/assets/iconfont/pc/24.5.6/iconfont.css">
+    <link rel="stylesheet" href="https://cdn-common.jianyu360.com/cdn/assets/iconfont/pc/24.11.7/iconfont.css">
     <script src='{{Msg "seo" "cdn"}}/antiRes/js/mainHook.js?v={{Msg "seo" "version"}}'></script>
     <!-- 高级语法兼容性处理  -->
     <script>

+ 1 - 1
src/web/templates/pc/supsearch.html

@@ -22,7 +22,7 @@
   <script src='{{Msg "seo" "cdn"}}/js/jquery.cookie.js'></script>
   <link href="https://cdn-common.jianyu360.com/cdn/lib/element-ui/2.15.13-rc/lib/theme-chalk/index.css" rel="stylesheet" />
   <link rel="stylesheet" href='{{Msg "seo" "cdn"}}/css/selector/selector.css?v={{Msg "seo" "version"}}'>
-  <link href="https://cdn-common.jianyu360.com/cdn/assets/iconfont/pc/23.8.30/iconfont.css" rel="stylesheet" />
+  <link href="https://cdn-common.jianyu360.com/cdn/assets/iconfont/pc/24.11.7/iconfont.css" rel="stylesheet" />
   <link href='{{Msg "seo" "cdn"}}/css/collect-user-info.css?v={{Msg "seo" "version"}}' rel="stylesheet">
   <link href='{{Msg "seo" "cdn"}}/css/ele-reset.css?v={{Msg "seo" "version"}}' rel="stylesheet">
   <link rel="stylesheet" href='{{Msg "seo" "cdn"}}/css/selector/selector.css?v={{Msg "seo" "version"}}'>

+ 2 - 2
src/web/templates/pc/tags/index.html

@@ -16,7 +16,7 @@
     <link href='{{Msg "seo" "cdn"}}/tags/css/tags-lib-selector.css?v={{Msg "seo" "version"}}' rel="stylesheet" />
     <link href='{{Msg "seo" "cdn"}}/tags/css/tags-card.css?v={{Msg "seo" "version"}}' rel="stylesheet" />
     <link href='{{Msg "seo" "cdn"}}/tags/css/tags-lib.css?v={{Msg "seo" "version"}}' rel="stylesheet" />
-    <link href='//cdn-common.jianyu360.com/cdn/assets/iconfont/pc/22.10.20/iconfont.css' rel="stylesheet" />
+    <link href='//cdn-common.jianyu360.com/cdn/assets/iconfont/pc/24.11.7/iconfont.css' rel="stylesheet" />
     <link href='//cdn-common.jianyu360.com/cdn/lib/element-ui/2.15.13-rc/lib/theme-chalk/index.css' rel="stylesheet" />
     <!-- <link href='//cdn-common.jianyu360.com/cdn/lib/element-ui/2.15.7/lib/theme-chalk/index.css' rel="stylesheet" /> -->
 </head>
@@ -97,7 +97,7 @@
     </script>
     <script src='//cdn-common.jianyu360.com/cdn/lib/vue/2.6.11/vue.min.js'> </script>
     <script src='//cdn-common.jianyu360.com/cdn/lib/element-ui/2.15.13-rc/lib/index.js'></script>
-    <script src='//cdn-common.jianyu360.com/cdn/assets/iconfont/pc/22.10.20/iconfont.js'></script>
+    <script src='//cdn-common.jianyu360.com/cdn/assets/iconfont/pc/24.11.7/iconfont.js'></script>
     <!-- <script src=//cdn-common.jianyu360.com/cdn/lib/element-ui/2.15.7/lib/index.js></script> -->
     <script src='{{Msg "seo" "cdn"}}/js/index_content.js?v={{Msg "seo" "version"}}'></script>
     <script src='{{Msg "seo" "cdn"}}/tags/js/area-selector.js?v={{Msg "seo" "version"}}'></script>

+ 1 - 0
src/web/templates/pc/template/index/search-module.html

@@ -22,6 +22,7 @@
         <li class="search-type-item active" data-id="zb">招标采购搜索</li>
         <li class="search-type-item" data-id="qy">企业搜索</li>
         <li class="search-type-item" data-id="cg">采购单位搜索</li>
+        <li class="search-type-item" data-id="ygzc">阳光直采</li>
         <li class="search-type-item" data-id="wd">文档搜索</li>
         <li class="search-type-item" data-id="gy">供应搜索</li>
       </ul>

برخی فایل ها در این مقایسه diff نمایش داده نمی شوند زیرا تعداد فایل ها بسیار زیاد است