Browse Source

Merge branch 'master' into feature/v4.8.40

lianbingjie 2 years ago
parent
commit
37204bebb8
100 changed files with 7712 additions and 1552 deletions
  1. 0 11
      src/config.json
  2. 1 0
      src/config.yaml
  3. 63 70
      src/db.json
  4. 3 3
      src/go.mod
  5. 6 6
      src/go.sum
  6. 2 1
      src/jfw/config/config.go
  7. 5 2
      src/jfw/front/dataMarket.go
  8. 140 0
      src/jfw/front/datasmt.go
  9. 4 1
      src/jfw/front/shorturl.go
  10. 0 1
      src/jfw/front/supsearch.go
  11. 1 0
      src/jfw/modules/app/src/app/filter/loginfilter.go
  12. 1 1
      src/jfw/modules/app/src/config.yaml
  13. 1 1
      src/jfw/modules/app/src/db.json
  14. 3 3
      src/jfw/modules/app/src/go.mod
  15. 6 6
      src/jfw/modules/app/src/go.sum
  16. 2 1
      src/jfw/modules/app/src/jfw/config/config.go
  17. 5 5
      src/jfw/modules/app/src/web/staticres/jyapp/me/js/phone_bind.js
  18. BIN
      src/jfw/modules/app/src/web/staticres/jyapp/wxswordfish/images/share-icon.png
  19. BIN
      src/jfw/modules/app/src/web/staticres/jyapp/wxswordfish/images/share-page.png
  20. 6 0
      src/jfw/modules/app/src/web/templates/me/account/phone_bind.html
  21. 1 0
      src/jfw/modules/bigmember/src/config.json
  22. 238 238
      src/jfw/modules/bigmember/src/entity/analysisEntName.go
  23. 1 1
      src/jfw/modules/bigmember/src/go.mod
  24. 944 944
      src/jfw/modules/bigmember/src/service/analysis/decision.go
  25. 15 0
      src/jfw/modules/distribution/.idea/git_toolbox_prj.xml
  26. 26 10
      src/jfw/modules/publicapply/src/db.json
  27. 2 2
      src/jfw/modules/subscribepay/src/config.yaml
  28. 5 5
      src/jfw/modules/subscribepay/src/service/orderListDetails.go
  29. BIN
      src/jfw/modules/subscribepay/src/web/staticres/res/dataexport/20201130152650_250672091720_bjINh.xlsx
  30. BIN
      src/jfw/modules/subscribepay/src/web/staticres/res/dataexport/20201130153115_250672151862_QBYIm.xlsx
  31. 3 3
      src/jfw/modules/wxtoken/src/config.json
  32. 4 4
      src/jfw/modules/wxtoken/src/main.go
  33. 10 8
      src/web/staticres/common-module/pc-dialog/css/leave-info-dialog.css
  34. BIN
      src/web/staticres/common-module/pc-dialog/image/data-supermarket-buy.png
  35. BIN
      src/web/staticres/common-module/pc-dialog/image/data-supermarket-contact.png
  36. 91 22
      src/web/staticres/common-module/pc-dialog/js/leave-info-dialog.js
  37. 1 0
      src/web/staticres/common-module/perfect-info/index.css
  38. 66 2
      src/web/staticres/common-module/perfect-info/js/perfect-info.js
  39. 456 0
      src/web/staticres/common-module/viewer/viewer.css
  40. 3597 0
      src/web/staticres/common-module/viewer/viewer.js
  41. BIN
      src/web/staticres/commonFunctions/pc-data-supermarket.png
  42. 468 0
      src/web/staticres/css/dataSmt/dataMart.css
  43. 258 0
      src/web/staticres/css/dataSmt/dataMart_detail.css
  44. 7 5
      src/web/staticres/css/pc/index.css
  45. 447 0
      src/web/staticres/dataSmt/css/index.css
  46. BIN
      src/web/staticres/dataSmt/images/case-ccscc.png
  47. BIN
      src/web/staticres/dataSmt/images/case-cec.png
  48. BIN
      src/web/staticres/dataSmt/images/case-langchao.png
  49. BIN
      src/web/staticres/dataSmt/images/case-liantong.png
  50. BIN
      src/web/staticres/dataSmt/images/case-minsheng.png
  51. BIN
      src/web/staticres/dataSmt/images/case-ruijie.png
  52. BIN
      src/web/staticres/dataSmt/images/case-siemens.png
  53. BIN
      src/web/staticres/dataSmt/images/case-soft.png
  54. BIN
      src/web/staticres/dataSmt/images/data-application-bg.png
  55. BIN
      src/web/staticres/dataSmt/images/data-download-bg.png
  56. BIN
      src/web/staticres/dataSmt/images/data-item-1.png
  57. BIN
      src/web/staticres/dataSmt/images/data-item-2.png
  58. BIN
      src/web/staticres/dataSmt/images/data-item-3.png
  59. BIN
      src/web/staticres/dataSmt/images/data-item-4.png
  60. BIN
      src/web/staticres/dataSmt/images/download-1.png
  61. BIN
      src/web/staticres/dataSmt/images/download-2.png
  62. BIN
      src/web/staticres/dataSmt/images/download-3.png
  63. BIN
      src/web/staticres/dataSmt/images/download-4.png
  64. BIN
      src/web/staticres/dataSmt/images/export-item-1.png
  65. BIN
      src/web/staticres/dataSmt/images/export-item-2.png
  66. BIN
      src/web/staticres/dataSmt/images/export-item-3.png
  67. BIN
      src/web/staticres/dataSmt/images/land-page-banner.png
  68. BIN
      src/web/staticres/dataSmt/images/scene-item-1.png
  69. BIN
      src/web/staticres/dataSmt/images/scene-item-2.png
  70. BIN
      src/web/staticres/dataSmt/images/scene-item-3.png
  71. BIN
      src/web/staticres/dataSmt/images/scene-item-4.png
  72. BIN
      src/web/staticres/dataSmt/images/supermarket-left-bg.png
  73. BIN
      src/web/staticres/dataSmt/images/supermarket-right-bg.png
  74. 2 1
      src/web/staticres/frontRouter/pc/mesgCenter/js/index-pc.js
  75. BIN
      src/web/staticres/images/dataSmt/bg_.png
  76. BIN
      src/web/staticres/images/dataSmt/close.png
  77. BIN
      src/web/staticres/images/dataSmt/close_w.png
  78. BIN
      src/web/staticres/images/dataSmt/coverage.png
  79. BIN
      src/web/staticres/images/dataSmt/data.png
  80. BIN
      src/web/staticres/images/dataSmt/foot_bg.png
  81. 6 0
      src/web/staticres/images/dataSmt/header.svg
  82. BIN
      src/web/staticres/images/dataSmt/hot_icon.png
  83. BIN
      src/web/staticres/images/dataSmt/nodata.png
  84. BIN
      src/web/staticres/images/dataSmt/search.png
  85. BIN
      src/web/staticres/images/dataSmt/service.png
  86. BIN
      src/web/staticres/images/dataSmt/table.png
  87. BIN
      src/web/staticres/images/dataSmt/team.png
  88. 30 5
      src/web/staticres/js/index/index.js
  89. 1 1
      src/web/staticres/js/login.js
  90. 3 0
      src/web/staticres/public-pc/css/pc-bottom.css
  91. 5 3
      src/web/staticres/public-pc/js/article-content.js
  92. 1 1
      src/web/staticres/public-pc/js/pc-bottom.js
  93. 1 1
      src/web/staticres/tags/css/no-login-detail.css
  94. 1 1
      src/web/templates/common/pcbottom.html
  95. 315 179
      src/web/templates/dataMarket/index.html
  96. 2 1
      src/web/templates/frontRouter/pc/enterpriseCertificatio/free/index.html
  97. 185 0
      src/web/templates/pc/dataSmt/detail.html
  98. 262 0
      src/web/templates/pc/dataSmt/list.html
  99. 1 1
      src/web/templates/pc/index.html
  100. 8 2
      src/web/templates/pc/supsearch.html

+ 0 - 11
src/config.json

@@ -389,17 +389,6 @@
     "expurasingtime": true,
     "winnerMap": true
   },
-  "detailMosaic":"免费注册即可查看",
-  "detailNeedMosaic":{
-    "buyerperson":true,
-    "buyertel":true,
-    "winnerperson":true,
-    "winnertel":true,
-    "agencyperson":true,
-    "agencytel":true,
-    "budget":true,
-    "bidamount":true
-  },
   "keywordsLimitNologin": 25,
   "messageCenter": {
     "appid": "10000",

+ 1 - 0
src/config.yaml

@@ -6,3 +6,4 @@ powerCheckCenterKey: "powercheck.rpc" #权益校验中台
 resourceCenterKey: "resource.rpc" #资源中台
 entManageApplication: "entmanageapplication.rpc" #企业管理中台
 activityKey: "activity.rpc" #营销中台rpc
+publicserviceKey: "publicservice.rpc"

+ 63 - 70
src/db.json

@@ -1,75 +1,68 @@
 {
-	"mongodb": {
-		"main": {
-			"address": "192.168.3.206:27080",
-	 		"size": 5,
-	 		"dbName": "qfw",
-			"replSet": ""
-		},
-		"log": {
-			"address": "192.168.3.206:27090",
-	 		"size": 5,
-	 		"dbName": "qfw",
-			"replSet": "",
-			"userName": "admin",
-			"password": "123456"
-		},
-		"ent": {
-			"address": "192.168.3.206:27002",
-	 		"size": 5,
-	 		"dbName": "mixdata",
-			"userName": "jyDevGroup",
-			"password": "jy@DevGroup"
-		},
-		"qyfw": {
-			"address": "192.168.3.206:27080",
-	 		"size": 5,
-	 		"dbName": "jyqyfw"
-		},
-		"bidding": {
-			"address": "192.168.3.206:27002",
-	 		"size": 5,
-	 		"dbName": "qfw_data",
-			"replSet": "",
-			"collection": "bidding",
-			"collection_back": "bidding_back",
-			"userName": "jyDevGroup",
-			"password": "jy@DevGroup"
-		}
-	},
-	"elasticsearch": {
-		"main": {
-			"address": "http://192.168.3.241:9205,http://192.168.3.149:9200",
-	    	"size": 5,
-			"version": "v7",
-			"userName": "",
-			"password": ""
-		}
+  "mongodb": {
+    "main": {
+      "address": "192.168.3.206:27080",
+      "size": 10,
+      "dbName": "qfw"
     },
-    "redis": {
-    	"main":{
-			"address": "other=192.168.3.149:1712,push=192.168.3.149:1712,sso=192.168.3.149:1712,session=192.168.3.11:1713,recovery=192.168.3.149:1712,merge=192.168.3.149:1712,newother=192.168.3.149:1712,poly=192.168.3.149:1713"
-		},
-		"login": {
-			"address": "login=192.168.3.149:1713"
-		}
+    "log": {
+      "address": "192.168.3.206:27090",
+      "size": 5,
+      "dbName": "qfw",
+      "userName": "admin",
+      "password": "123456"
     },
-    "mysql": {
-	    "main": {
-	        "dbName": "jianyu",
-	        "address": "192.168.3.11:3366",
-	        "userName": "root",
-	        "passWord": "Topnet123",
-			"maxOpenConns": 5,
-			"maxIdleConns": 5
-	    },
-		"base": {
-	        "dbName": "base_service",
-	        "address": "192.168.3.217:4000",
-	        "userName": "root",
-	        "passWord": "=PDT49#80Z!RVv52_z",
-			"maxOpenConns": 5,
-			"maxIdleConns": 5
-	    }
+    "ent": {
+      "address": "192.168.3.206:27002",
+      "size": 5,
+      "dbName": "mixdata",
+      "userName": "jyDevGroup",
+      "password": "jy@DevGroup"
+    },
+    "bidding": {
+      "address": "192.168.3.206:27002",
+      "size": 5,
+      "dbName": "qfw_data",
+      "replSet": "",
+      "collection": "bidding",
+      "collection_back": "bidding_back",
+      "userName": "jyDevGroup",
+      "password": "jy@DevGroup"
+    }
+  },
+  "elasticsearch": {
+    "main": {
+      "address": "http://192.168.3.241:9205,http://192.168.3.149:9200",
+      "size": 30,
+      "version": "v7",
+      "userName":"",
+      "password":""
+    }
+  },
+  "redis": {
+    "main":{
+      "address": "other=192.168.3.149:1712,sso=192.168.3.149:1713,push=192.168.3.149:1711,session=192.168.3.149:1713,recovery=192.168.3.149:1715,merge=192.168.3.206:2711,newother=192.168.3.149:1712,poly=192.168.3.149:1713"
+    },
+    "login": {
+      "address": "login=192.168.3.149:1712"
+    }
+  },
+  "mysql": {
+    "main": {
+      "dbName": "jianyu",
+      "address": "192.168.3.149:3306",
+      "userName": "root",
+      "passWord": "Topnet123",
+      "maxOpenConns": 10,
+      "maxIdleConns": 5
+    },
+    "base": {
+      "dBName": "base_service",
+      "address" : "192.168.3.14:4000",
+      "userName": "root",
+      "passWord": "=PDT49#80Z!RVv52_z",
+      "maxOpenConns": 5,
+      "maxIdleConns": 5
     }
+  }
 }

+ 3 - 3
src/go.mod

@@ -6,7 +6,7 @@ require (
 	app.yhyue.com/moapp/jyMarketing v0.0.2-0.20230308011651-df591d32df88
 	app.yhyue.com/moapp/jybase v0.0.0-20230614085041-f8f20842d5cb
 	app.yhyue.com/moapp/jylog v0.0.0-20230522075550-05d7230ca545
-	app.yhyue.com/moapp/jypkg v0.0.0-20230627060822-53aa53e4d064
+	app.yhyue.com/moapp/jypkg v0.0.0-20230630032557-eac72f240f41
 	bp.jydev.jianyu360.cn/BaseService/userCenter v1.2.13
 	github.com/SKatiyar/qr v0.0.0-20151201054752-25b6bdf44e67
 	github.com/fsnotify/fsnotify v1.6.0
@@ -126,7 +126,7 @@ require (
 	google.golang.org/appengine v1.6.7 // indirect
 	google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 // indirect
 	google.golang.org/grpc v1.56.1 // indirect
-	google.golang.org/protobuf v1.30.0 // indirect
+	google.golang.org/protobuf v1.31.0 // indirect
 	gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc // indirect
 	gopkg.in/inf.v0 v0.9.1 // indirect
 	gopkg.in/ini.v1 v1.67.0 // indirect
@@ -135,7 +135,7 @@ require (
 	gopkg.in/yaml.v3 v3.0.1 // indirect
 	gorm.io/driver/mysql v1.0.5 // indirect
 	gorm.io/gorm v1.21.3 // indirect
-	jygit.jydev.jianyu360.cn/ApplicationCenter/publicService v0.0.0-20230626055559-2b719f6c6602 // indirect
+	jygit.jydev.jianyu360.cn/ApplicationCenter/publicService v0.0.0-20230630032508-eefb06a4588e // indirect
 	k8s.io/api v0.26.3 // indirect
 	k8s.io/apimachinery v0.27.0-alpha.3 // indirect
 	k8s.io/client-go v0.26.3 // indirect

+ 6 - 6
src/go.sum

@@ -9,8 +9,8 @@ app.yhyue.com/moapp/jybase v0.0.0-20230614085041-f8f20842d5cb h1:fT7FIKElKjkRHTm
 app.yhyue.com/moapp/jybase v0.0.0-20230614085041-f8f20842d5cb/go.mod h1:D40Ae0rQilH8Hc5o2Vtt04Tjh/DNEFpcS3/WkJMPJb8=
 app.yhyue.com/moapp/jylog v0.0.0-20230522075550-05d7230ca545 h1:+Lak4m1zgsigQloOsvp8AJ+0XeX/+PGp9QP550xlbBQ=
 app.yhyue.com/moapp/jylog v0.0.0-20230522075550-05d7230ca545/go.mod h1:uFrsdUBFbETiJlEmr4PtJWPsZlUpPj2bHQRhryu6ggk=
-app.yhyue.com/moapp/jypkg v0.0.0-20230627060822-53aa53e4d064 h1:iHqmyjzumVbeWeN1f4l+cpuRBizCO/VZvOUyGD5b/EM=
-app.yhyue.com/moapp/jypkg v0.0.0-20230627060822-53aa53e4d064/go.mod h1:JBkMSnaOQbfV80laTPwjzjfP6nLXOQpJBaNUdvKV2tw=
+app.yhyue.com/moapp/jypkg v0.0.0-20230630032557-eac72f240f41 h1:AQUCZbYnB6lddbJGvOsWwWKkJnQGh4atRtYHqXT0Kdc=
+app.yhyue.com/moapp/jypkg v0.0.0-20230630032557-eac72f240f41/go.mod h1:wbDWBpLODtGhkQw4dCShvmRr6G8CazuW8kWq42paQOM=
 app.yhyue.com/moapp/message v0.0.0-20221223100203-6402e389d9ae h1:6rDDaz6yxvE8viTSzEBwKYOFWq14TMfuBivSazUZMz4=
 app.yhyue.com/moapp/message v0.0.0-20221223100203-6402e389d9ae/go.mod h1:b0zZHev3gmJao1Fo+2Z2KPVjsuLOJVvVxf+kCnu9WkA=
 bp.jydev.jianyu360.cn/BaseService/entManageApplication v0.0.0-20230214091519-89a98c01ab0e h1:h+VEI3o1qC0jeCzkFGTrLI4f27cfa/W/y+0sXokWMgE=
@@ -1358,8 +1358,8 @@ google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp0
 google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
 google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
 google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
-google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng=
-google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
+google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8=
+google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
 gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
 gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc h1:2gGKlE2+asNV9m7xrywl36YYNnBG5ZQ0r/BOOxqPpmk=
 gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc/go.mod h1:m7x9LTH6d71AHyAX77c9yqWCCa3UKHcVEj9y7hAtKDk=
@@ -1420,8 +1420,8 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh
 honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
 honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
 honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
-jygit.jydev.jianyu360.cn/ApplicationCenter/publicService v0.0.0-20230626055559-2b719f6c6602 h1:lZ0XCzRDSOBaoJczQudZ3KZhRs4zm5sjboDpwuYZUVM=
-jygit.jydev.jianyu360.cn/ApplicationCenter/publicService v0.0.0-20230626055559-2b719f6c6602/go.mod h1:Jjhym3U0MFdSgeafHPm758NefCPZpekg2sWPh6Gy6Jk=
+jygit.jydev.jianyu360.cn/ApplicationCenter/publicService v0.0.0-20230630032508-eefb06a4588e h1:1O11hFuKvLD3Ls+9wxssUpMV3fG9qD4EfeeAy92dsWY=
+jygit.jydev.jianyu360.cn/ApplicationCenter/publicService v0.0.0-20230630032508-eefb06a4588e/go.mod h1:wBxeFODhYtGenkxXJGThN/VrFaxPvvHMxzpS09pxApM=
 k8s.io/api v0.22.9/go.mod h1:rcjO/FPOuvc3x7nQWx29UcDrFJMx82RxDob71ntNH4A=
 k8s.io/api v0.26.3 h1:emf74GIQMTik01Aum9dPP0gAypL8JTLl/lHa4V9RFSU=
 k8s.io/api v0.26.3/go.mod h1:PXsqwPMXBSBcL1lJ9CYDKy7kIReUydukS5JiRlxC3qE=

+ 2 - 1
src/jfw/config/config.go

@@ -56,5 +56,6 @@ func init() {
 		RegUserCenter(g.Cfg().MustGet(ctx, "userCenterKey").String()).
 		RegPowerCheckCenter(g.Cfg().MustGet(ctx, "powerCheckCenterKey").String()).
 		RegResourceCenter(g.Cfg().MustGet(ctx, "resourceCenterKey").String()).
-		RegEntManageApplication(g.Cfg().MustGet(ctx, "entManageApplication").String())
+		RegEntManageApplication(g.Cfg().MustGet(ctx, "entManageApplication").String()).
+		RegPublicservice(g.Cfg().MustGet(ctx, "publicserviceKey").String())
 }

+ 5 - 2
src/jfw/front/dataMarket.go

@@ -1,10 +1,11 @@
 package front
 
 import (
-	"app.yhyue.com/moapp/jybase/common"
-	"app.yhyue.com/moapp/jybase/go-xweb/xweb"
 	"fmt"
 	"jy/src/jfw/config"
+
+	"app.yhyue.com/moapp/jybase/common"
+	"app.yhyue.com/moapp/jybase/go-xweb/xweb"
 )
 
 // DataMarket 数据市场
@@ -21,6 +22,8 @@ func init() {
 
 // Index 数据市场首页
 func (this *DataMarket) Index() {
+	data := config.Middleground.Publicservice.List("", "", 1, 8)
+	this.T["list"] = data["list"]
 	this.Render("/dataMarket/index.html")
 }
 

+ 140 - 0
src/jfw/front/datasmt.go

@@ -0,0 +1,140 @@
+package front
+
+import (
+	"fmt"
+	"jy/src/jfw/config"
+	"jy/src/jfw/paging"
+	"strings"
+
+	"app.yhyue.com/moapp/jybase/common"
+	"app.yhyue.com/moapp/jybase/go-xweb/xweb"
+)
+
+var classTDKMap = map[string]map[string]string{
+	"采购意向": map[string]string{
+		"title":       "采购意向_数据超市-剑鱼标讯",
+		"keyWord":     "数据超市,采购意向数据,政府采购意向,剑鱼标讯",
+		"description": "剑鱼标讯数据超市提供不同行业领域的政府采购意向数据批量下载服务,成品数据安全合规,助力企业高效挖掘商机。",
+	},
+	"拟建项目": map[string]string{
+		"title":       "拟建项目_数据超市-剑鱼标讯",
+		"keyWord":     "数据超市,拟建项目数据,拟在建项目数据,剑鱼标讯",
+		"description": "剑鱼标讯数据超市提供不同行业领域的拟建项目数据批量下载服务,成品数据安全合规,助力企业高效挖掘商机。",
+	},
+	"招标数据": map[string]string{
+		"title":       "招标采购数据超市-剑鱼标讯",
+		"keyWord":     "数据超市,招标数据,招标采购数据,剑鱼标讯",
+		"description": "剑鱼标讯数据超市提供全国不同行业领域的招标、采购数据批量下载服务,成品数据安全合规,海量招投标大数据助力企业进行统计、分析和决策服务。",
+	},
+	"中标数据": map[string]string{
+		"title":       "招标中标数据超市-剑鱼标讯",
+		"keyWord":     "数据超市,中标数据,中标成交数据,剑鱼标讯",
+		"description": "剑鱼标讯数据超市提供全国不同行业领域的中标、成交数据批量下载服务,成品数据安全合规,对企业做好市场行情监测、销售策略制定、中标单位或竞争对手等相关数据的分析,提供有力支持。",
+	},
+	"中标单位数据": map[string]string{
+		"title":       "中标单位数据超市-剑鱼标讯",
+		"keyWord":     "中标单位信息,中标单位数据,中标企业数据,剑鱼标讯",
+		"description": "剑鱼标讯数据超市提供全国中标单位、中标企业数据批量下载服务,数据类型覆盖中标单位企业工商信息、招标信息通讯录、中标项目规模及数量、业务覆盖区域、客户群体等多个字段,助力您全面了解中标单位详情。",
+	},
+	"采购单位数据": map[string]string{
+		"title":       "采购单位数据超市-剑鱼标讯",
+		"keyWord":     "采购单位信息,采购单位数据,采购商数据,业主采购数据,剑鱼标讯",
+		"description": "剑鱼标讯数据超市提供全国企业采购单位、业主数据批量下载服务,数据类型覆盖采购单位机构工商信息、招标信息通讯录、招标采购项目规模及数量、TOP5中标单位信息等多个字段,助力您全面了解采购单位详情。",
+	},
+	"企业工商数据": map[string]string{
+		"title":       "企业工商数据超市-剑鱼标讯",
+		"keyWord":     "工商数据,企业工商数据包,工商数据库,剑鱼标讯",
+		"description": "剑鱼标讯数据超市提供全国企业工商数据批量下载服务,基于精准的全国企业信息公司名录库,辅助您进行销售线索挖掘、商机触达、客户管理等全链路销售服务。",
+	},
+}
+var searchTDKMap = map[string]string{
+	"title":       "%s相关搜索结果_数据超市 - 剑鱼标讯",
+	"keyWord":     "%s,%s招投标数据,%s中标数据,%s招标采购数据,剑鱼标讯",
+	"description": "剑鱼标讯数据超市提供%s相关搜索结果,您可以搜索、查看%s相关的全部招投标数据、中标数据、采购数据,全部数据支持批量下载,了解更多%s相关招投标数据服务就上剑鱼标讯官网!",
+}
+var searchClassTDKMap = map[string]string{
+	"title":       "%s相关搜索结果_%s数据超市 - 剑鱼标讯",
+	"keyWord":     "%s,%s%s,%s招投标数据,%s招标采购数据,剑鱼标讯",
+	"description": "剑鱼标讯数据超市提供%s相关搜索结果,在这里您可以查询%s相关的%s信息,并支持数据批量下载服务,了解更多%s相关招投标数据服务就上剑鱼标讯官网!",
+}
+
+type Datasmt struct {
+	*xweb.Action
+	index  xweb.Mapper `xweb:"/datasmt"`            //首页
+	list   xweb.Mapper `xweb:"/datasmt/([^/]+$)"`   //列表
+	detail xweb.Mapper `xweb:"/datasmt/(.+?)/(.+)"` //详情页面
+}
+
+func init() {
+	xweb.AddAction(&Datasmt{})
+}
+func (this *Datasmt) Index() error {
+	return this.List("")
+}
+func (this *Datasmt) List(query string) error {
+	dataType := ""
+	var pageNum int64 = 1
+	if queryArr := strings.Split(query, "_"); len(queryArr) == 2 {
+		pageNum = common.Int64All(queryArr[1])
+		dataType = queryArr[0]
+		if dataType == "index" {
+			dataType = ""
+		}
+	}
+	pageSize := int64(40)
+	searchValue := this.GetString("searchValue")
+	data := config.Middleground.Publicservice.List(searchValue, dataType, pageNum, pageSize)
+	dataType = common.InterfaceToStr(common.If(dataType == "", "index", dataType))
+	this.T["dataType"] = dataType
+	if common.IntAll(data["PageCount"]) > 0 {
+		this.T["pagingMap"] = paging.GetLetterPaging(common.IntAll(pageNum), common.IntAll(pageSize), common.IntAll(data["PageCount"]), fmt.Sprintf("/datasmt/%s%s", fmt.Sprintf("%s_%v", dataType, "%d"), common.InterfaceToStr(common.If(searchValue != "", "?searchValue="+searchValue, ""))))
+	}
+	//数据清洗
+	this.T["list"] = data["list"]
+	this.T["hotKeys"] = data["hotKeys"]
+	this.T["fieldIllustrate"] = data["fieldIllustrate"]
+	this.T["searchValue"] = data["searchValue"]
+	this.T["dataTypeStr"] = data["dataTypeStr"]
+	if dataType == "index" {
+		dataType = ""
+	}
+	title := "剑鱼标讯数据超市-分享全行业招标采购数据"
+	keywords := "数据超市,采购意向数据,拟建项目数据,招标数据,中标数据,企业工商数据,中标单位数据,采购单位数据,剑鱼标讯"
+	description := "剑鱼标讯数据超市,提供全行业招标采购数据批量下载服务,覆盖采购意向数据、拟建项目数据、招标数据、中标数据、企业工商数据、中标单位数据、采购单位数据等多种数据维度,海量热门行业数据,专业安全合规,成品数据一键下载。"
+	if searchValue == "" && dataType != "" {
+		//只有分类
+		title = classTDKMap[common.InterfaceToStr(data["dataTypeStr"])]["title"]
+		keywords = classTDKMap[common.InterfaceToStr(data["dataTypeStr"])]["keyWord"]
+		description = classTDKMap[common.InterfaceToStr(data["dataTypeStr"])]["description"]
+	} else if searchValue != "" && dataType != "" {
+		//词、分类都有
+		title = fmt.Sprintf(searchClassTDKMap["title"], searchValue, common.InterfaceToStr(data["dataTypeStr"]))
+		keywords = fmt.Sprintf(searchClassTDKMap["keyWord"], searchValue, searchValue, common.InterfaceToStr(data["dataTypeStr"]), searchValue, searchValue)
+		description = fmt.Sprintf(searchClassTDKMap["description"], searchValue, searchValue, common.InterfaceToStr(data["dataTypeStr"]), searchValue)
+	} else if searchValue != "" && dataType == "" {
+		//只有词
+		title = fmt.Sprintf(searchTDKMap["title"], searchValue)
+		keywords = fmt.Sprintf(searchTDKMap["keyWord"], searchValue, searchValue, searchValue, searchValue)
+		description = fmt.Sprintf(searchTDKMap["description"], searchValue, searchValue, searchValue)
+	}
+	this.T["title"] = title
+	this.T["keywords"] = keywords
+	this.T["description"] = description
+	return this.Render("/pc/dataSmt/list.html")
+}
+
+func (this *Datasmt) Detail(dataType, id string) error {
+	this.T["dataType"] = dataType
+	data := config.Middleground.Publicservice.Detail(id)
+	this.T["data"] = data
+	//标题处理
+	title := fmt.Sprintf("%s- 剑鱼标讯", data["name"])
+	//关键词处理
+	keywords := fmt.Sprintf("%s%s,%s招投标数据,%s招标采购数据,%s,剑鱼标讯", data["keyword"], data["dataType"], data["keyword"], data["keyword"], data["dataType"])
+	//描述处理
+	description := fmt.Sprintf("%s,%s", data["name"], data["introduce"])
+	this.T["title"] = title
+	this.T["keywords"] = keywords
+	this.T["description"] = description
+	return this.Render("/pc/dataSmt/detail.html")
+}

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

@@ -84,7 +84,8 @@ var (
 
 func (s *Short) Article(stype, id string) error {
 	userId, _ := s.GetSession("userId").(string)
-	if (stype == "content" || stype == "indexcontent") && userId == "" {
+	//PC端未登录用户程序走此逻辑  WX端走原来逻辑
+	if !mobileReg.MatchString(s.Header("User-Agent")) && (stype == "content" || stype == "indexcontent") && userId == "" {
 		if seoAgentReg.MatchString(s.UserAgent()) {
 			sids := encrypt.CommonDecodeArticle(stype, id)
 			return s.NologinCommon("", stype, id, sids[0])
@@ -147,6 +148,8 @@ func (s *Short) LoginCommon(userId, stype, id string) error {
 					if openid := jyutil.Getopenid(code); openid != "" {
 						if CheckUserIsSubscribe(openid) {
 							FindUserAndCreateSess(openid, s.Session(), "wx", false, true)
+							//生session后 重新获取一下
+							userId, _ = s.GetSession("userId").(string)
 						}
 					}
 				}

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

@@ -560,7 +560,6 @@ func (p *Pcsearch) PcSearchIndex(module string) error {
 			"searchvalue":     keywords,
 			"additionalWords": additionalWords,
 			"listLength":      util.If(list != nil, len(list), 0),
-			"list":            p.T["list"],
 		}
 	}
 	return p.Render("/pc/supsearch.html", &p.T)

+ 1 - 0
src/jfw/modules/app/src/app/filter/loginfilter.go

@@ -25,6 +25,7 @@ var urls = []*regexp.Regexp{
 	regexp.MustCompile("^/jyapp/structed/index"),
 	regexp.MustCompile("^/jyapp/exhibition/.*"),
 	regexp.MustCompile("^/jyapp/bank/scheme"),
+	regexp.MustCompile("^/jyapp/datasmt"),
 	regexp.MustCompile("^/jyapp/big/page/unit_portrayal"),
 	regexp.MustCompile("^/jyapp/big/page/free_high_set"),
 }

+ 1 - 1
src/jfw/modules/app/src/config.yaml

@@ -1,6 +1,6 @@
 etcd:
   hosts:
-  - 192.168.3.149:2379
+  - 127.0.0.1:2379
 userCenterKey: "usercenter.rpc" #用户中台rpc
 powerCheckCenterKey: "powercheck.rpc" #权益校验中台
 entManageApplication: "entmanageapplication.rpc" #企业管理中台

+ 1 - 1
src/jfw/modules/app/src/db.json

@@ -20,7 +20,7 @@
 			"password": "jy@DevGroup"
 		},
 		"bidding": {
-			"address": "192.168.3.206:27002",
+			"address": "192.168.3.206:27001,192.168.3.206:27002",
 	 		"size": 5,
 	 		"dbName": "qfw_data",
 			"collection": "bidding",

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

@@ -5,7 +5,7 @@ go 1.18
 require (
 	app.yhyue.com/moapp/jybase v0.0.0-20230614085041-f8f20842d5cb
 	app.yhyue.com/moapp/jylog v0.0.0-20230522075550-05d7230ca545
-	app.yhyue.com/moapp/jypkg v0.0.0-20230627060822-53aa53e4d064
+	app.yhyue.com/moapp/jypkg v0.0.0-20230630032557-eac72f240f41
 	bp.jydev.jianyu360.cn/BaseService/userCenter v1.2.13
 	github.com/SKatiyar/qr v0.0.0-20151201054752-25b6bdf44e67
 	github.com/gogf/gf/v2 v2.3.1
@@ -126,7 +126,7 @@ require (
 	google.golang.org/appengine v1.6.7 // indirect
 	google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 // indirect
 	google.golang.org/grpc v1.56.1 // indirect
-	google.golang.org/protobuf v1.30.0 // indirect
+	google.golang.org/protobuf v1.31.0 // indirect
 	gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc // indirect
 	gopkg.in/inf.v0 v0.9.1 // indirect
 	gopkg.in/ini.v1 v1.67.0 // indirect
@@ -135,7 +135,7 @@ require (
 	gopkg.in/yaml.v3 v3.0.1 // indirect
 	gorm.io/driver/mysql v1.0.5 // indirect
 	gorm.io/gorm v1.21.3 // indirect
-	jygit.jydev.jianyu360.cn/ApplicationCenter/publicService v0.0.0-20230626055559-2b719f6c6602 // indirect
+	jygit.jydev.jianyu360.cn/ApplicationCenter/publicService v0.0.0-20230630032508-eefb06a4588e // indirect
 	k8s.io/api v0.26.3 // indirect
 	k8s.io/apimachinery v0.27.0-alpha.3 // indirect
 	k8s.io/client-go v0.26.3 // indirect

+ 6 - 6
src/jfw/modules/app/src/go.sum

@@ -9,8 +9,8 @@ app.yhyue.com/moapp/jybase v0.0.0-20230614085041-f8f20842d5cb h1:fT7FIKElKjkRHTm
 app.yhyue.com/moapp/jybase v0.0.0-20230614085041-f8f20842d5cb/go.mod h1:D40Ae0rQilH8Hc5o2Vtt04Tjh/DNEFpcS3/WkJMPJb8=
 app.yhyue.com/moapp/jylog v0.0.0-20230522075550-05d7230ca545 h1:+Lak4m1zgsigQloOsvp8AJ+0XeX/+PGp9QP550xlbBQ=
 app.yhyue.com/moapp/jylog v0.0.0-20230522075550-05d7230ca545/go.mod h1:uFrsdUBFbETiJlEmr4PtJWPsZlUpPj2bHQRhryu6ggk=
-app.yhyue.com/moapp/jypkg v0.0.0-20230627060822-53aa53e4d064 h1:iHqmyjzumVbeWeN1f4l+cpuRBizCO/VZvOUyGD5b/EM=
-app.yhyue.com/moapp/jypkg v0.0.0-20230627060822-53aa53e4d064/go.mod h1:JBkMSnaOQbfV80laTPwjzjfP6nLXOQpJBaNUdvKV2tw=
+app.yhyue.com/moapp/jypkg v0.0.0-20230630032557-eac72f240f41 h1:AQUCZbYnB6lddbJGvOsWwWKkJnQGh4atRtYHqXT0Kdc=
+app.yhyue.com/moapp/jypkg v0.0.0-20230630032557-eac72f240f41/go.mod h1:wbDWBpLODtGhkQw4dCShvmRr6G8CazuW8kWq42paQOM=
 app.yhyue.com/moapp/message v0.0.0-20221223100203-6402e389d9ae h1:6rDDaz6yxvE8viTSzEBwKYOFWq14TMfuBivSazUZMz4=
 app.yhyue.com/moapp/message v0.0.0-20221223100203-6402e389d9ae/go.mod h1:b0zZHev3gmJao1Fo+2Z2KPVjsuLOJVvVxf+kCnu9WkA=
 bp.jydev.jianyu360.cn/BaseService/entManageApplication v0.0.0-20230214091519-89a98c01ab0e h1:h+VEI3o1qC0jeCzkFGTrLI4f27cfa/W/y+0sXokWMgE=
@@ -1359,8 +1359,8 @@ google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp0
 google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
 google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
 google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
-google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng=
-google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
+google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8=
+google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
 gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
 gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc h1:2gGKlE2+asNV9m7xrywl36YYNnBG5ZQ0r/BOOxqPpmk=
 gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc/go.mod h1:m7x9LTH6d71AHyAX77c9yqWCCa3UKHcVEj9y7hAtKDk=
@@ -1421,8 +1421,8 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh
 honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
 honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
 honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
-jygit.jydev.jianyu360.cn/ApplicationCenter/publicService v0.0.0-20230626055559-2b719f6c6602 h1:lZ0XCzRDSOBaoJczQudZ3KZhRs4zm5sjboDpwuYZUVM=
-jygit.jydev.jianyu360.cn/ApplicationCenter/publicService v0.0.0-20230626055559-2b719f6c6602/go.mod h1:Jjhym3U0MFdSgeafHPm758NefCPZpekg2sWPh6Gy6Jk=
+jygit.jydev.jianyu360.cn/ApplicationCenter/publicService v0.0.0-20230630032508-eefb06a4588e h1:1O11hFuKvLD3Ls+9wxssUpMV3fG9qD4EfeeAy92dsWY=
+jygit.jydev.jianyu360.cn/ApplicationCenter/publicService v0.0.0-20230630032508-eefb06a4588e/go.mod h1:wBxeFODhYtGenkxXJGThN/VrFaxPvvHMxzpS09pxApM=
 k8s.io/api v0.22.9/go.mod h1:rcjO/FPOuvc3x7nQWx29UcDrFJMx82RxDob71ntNH4A=
 k8s.io/api v0.26.3 h1:emf74GIQMTik01Aum9dPP0gAypL8JTLl/lHa4V9RFSU=
 k8s.io/api v0.26.3/go.mod h1:PXsqwPMXBSBcL1lJ9CYDKy7kIReUydukS5JiRlxC3qE=

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

@@ -42,5 +42,6 @@ func init() {
 	Middleground = middleground.NewMiddleground(g.Cfg().MustGet(ctx, "etcd.hosts").Strings()).
 		RegUserCenter(g.Cfg().MustGet(ctx, "userCenterKey").String()).
 		RegPowerCheckCenter(g.Cfg().MustGet(ctx, "powerCheckCenterKey").String()).
-		RegEntManageApplication(g.Cfg().MustGet(ctx, "entManageApplication").String())
+		RegEntManageApplication(g.Cfg().MustGet(ctx, "entManageApplication").String()).
+		RegPublicservice(g.Cfg().MustGet(ctx, "publicserviceKey").String())
 }

+ 5 - 5
src/jfw/modules/app/src/web/staticres/jyapp/me/js/phone_bind.js

@@ -421,11 +421,11 @@ var vm = new Vue({
         setHistory: function () {
             var _this = this
             // act=logout,返回则退出登录,绑定成功则回到首页
-            if (this.act == 'logout') {
-                setTimeout(function () {
-                    history.pushState({ act: _this.act }, '', '#act')
-                    _this.onPopstate()
-                }, 300)
+			if (this.from == 'treasurebox') {
+				document.querySelector('.j-header .header-left').removeEventListener('click', goBack)
+				$('.j-header .header-left').on('click', function(){
+					JyObj.skipAppointTab('search');
+				})
             }
         },
         removePopstate: function () {

BIN
src/jfw/modules/app/src/web/staticres/jyapp/wxswordfish/images/share-icon.png


BIN
src/jfw/modules/app/src/web/staticres/jyapp/wxswordfish/images/share-page.png


+ 6 - 0
src/jfw/modules/app/src/web/templates/me/account/phone_bind.html

@@ -225,6 +225,12 @@
       } catch (e) {
         console.warn(e)
       }
+      function afterClickBack(){
+        if (utils.getParam('from') == "treasurebox"){
+					JyObj.refreshAppointTab('search', 1)
+					JyObj.skipAppointTab('search');
+        }
+      }
     </script>
     {{include "/common/baiducc.html"}}
 </body>

File diff suppressed because it is too large
+ 1 - 0
src/jfw/modules/bigmember/src/config.json


+ 238 - 238
src/jfw/modules/bigmember/src/entity/analysisEntName.go

@@ -2,17 +2,17 @@
 package entity
 
 import (
-    qutil "app.yhyue.com/moapp/jybase/common"
-    elastic "app.yhyue.com/moapp/jybase/es"
-    "app.yhyue.com/moapp/jybase/go-xweb/httpsession"
-    "fmt"
-    "jy/src/jfw/modules/bigmember/src/db"
-    "jy/src/jfw/modules/bigmember/src/util"
-    "log"
-    "regexp"
-    "strings"
-    "sync"
-    "time"
+	qutil "app.yhyue.com/moapp/jybase/common"
+	elastic "app.yhyue.com/moapp/jybase/es"
+	"app.yhyue.com/moapp/jybase/go-xweb/httpsession"
+	"fmt"
+	"jy/src/jfw/modules/bigmember/src/db"
+	"jy/src/jfw/modules/bigmember/src/util"
+	"log"
+	"regexp"
+	"strings"
+	"sync"
+	"time"
 )
 
 /*
@@ -23,35 +23,35 @@ limit 取几条
 var pnquery = `{"query": {"bool": {"must": [{"match": {"%s": "%s"}}]}},"_source": ["projectname","_id","buyer","firsttime","area","city","sourceinfoid"],"from": 0,"size": %d}`
 
 func GetProNameImmediate(sType, name string, limit int) []map[string]interface{} {
-    var queryName string
-    if sType == "1" {
-        var list []map[string]interface{}
-        r := elastic.Get("buyer", "buyer", fmt.Sprintf(`{"query": {"match_phrase": {"name": "%s"}},"_source": ["name"],"size": %d}`, name, limit))
-        if r != nil {
-            for _, v := range *r {
-                list = append(list, map[string]interface{}{"buyer": qutil.InterfaceToStr(v["name"])})
-            }
-        }
-        return list
-    } else {
-        queryName = fmt.Sprintf(pnquery, "projectname.pname", name, limit)
-    }
+	var queryName string
+	if sType == "1" {
+		var list []map[string]interface{}
+		r := elastic.Get("buyer", "buyer", fmt.Sprintf(`{"query": {"match_phrase": {"name": "%s"}},"_source": ["name"],"size": %d}`, name, limit))
+		if r != nil {
+			for _, v := range *r {
+				list = append(list, map[string]interface{}{"buyer": qutil.InterfaceToStr(v["name"])})
+			}
+		}
+		return list
+	} else {
+		queryName = fmt.Sprintf(pnquery, "projectname.pname", name, limit)
+	}
 
-    list := elastic.Get("projectset", "projectset", queryName)
-    if list == nil {
-        return nil
-    }
-    return *list
+	list := elastic.Get("projectset", "projectset", queryName)
+	if list == nil {
+		return nil
+	}
+	return *list
 }
 
 // 根据项目名称查询项目信息
 func GetProInfoById(ids, sourceinfoids []string) []map[string]interface{} {
-    var res []map[string]interface{}
-    if len(ids) > 0 {
-        res = *elastic.GetById("projectset", "projectset", ids[0])
-    }
-    if (res == nil || len(res) == 0) && len(sourceinfoids) > 0 {
-        query := `{"query": {
+	var res []map[string]interface{}
+	if len(ids) > 0 {
+		res = *elastic.GetById("projectset", "projectset", ids[0])
+	}
+	if (res == nil || len(res) == 0) && len(sourceinfoids) > 0 {
+		query := `{"query": {
 					"bool": {
 						"must": [{
 							"term": {
@@ -71,9 +71,9 @@ func GetProInfoById(ids, sourceinfoids []string) []map[string]interface{} {
 			 	"from": 0,
 				"size": 1
 			}`
-        res = *elastic.Get("projectset", "projectset", query)
-    }
-    return res
+		res = *elastic.Get("projectset", "projectset", query)
+	}
+	return res
 }
 
 var pcquery = `{"query": {"bool": {"must": [{"terms": {"%s": [%s]}}],"must_not": [],"should": []}},"from": 0,"size": 20,"sort": []}`
@@ -81,128 +81,128 @@ var qurySql = `{"query": {"bool": {"must": [],"must_not": [],"should": [%s]}},"f
 
 // 采购单位模糊
 func GetEntBlur(entName []string) []map[string]interface{} {
-    var data []string
-    for _, v := range entName {
-        data = append(data, fmt.Sprintf(`{"query_string": {"default_field": "buyer_name","query": "*%s*"}}`, v))
-    }
-    query := fmt.Sprintf(qurySql, strings.Join(data, ","))
-    list := elastic.Get("buyer", "buyer", query)
-    if list == nil {
-        return nil
-    }
-    return *list
+	var data []string
+	for _, v := range entName {
+		data = append(data, fmt.Sprintf(`{"query_string": {"default_field": "buyer_name","query": "*%s*"}}`, v))
+	}
+	query := fmt.Sprintf(qurySql, strings.Join(data, ","))
+	list := elastic.Get("buyer", "buyer", query)
+	if list == nil {
+		return nil
+	}
+	return *list
 }
 
 func GetEntPC(entName []string) []map[string]interface{} {
-    query := fmt.Sprintf(pcquery, "buyer_name", `"`+strings.Join(entName, `","`)+`"`)
-    list := elastic.Get("buyer", "buyer", query)
-    if list == nil {
-        return nil
-    }
-    return *list
+	query := fmt.Sprintf(pcquery, "buyer_name", `"`+strings.Join(entName, `","`)+`"`)
+	list := elastic.Get("buyer", "buyer", query)
+	if list == nil {
+		return nil
+	}
+	return *list
 }
 
 type EnterQYXYInfo struct {
-    Name string
-    Id   string
-    Area string
-    City string
+	Name string
+	Id   string
+	Area string
+	City string
 }
 
 // 企业库是否有此企业信息
 func GetEntInfo(entName []string, p string) (entName_r []*EnterQYXYInfo) {
-    if len(entName) > 0 {
-        query := map[string]interface{}{}
-        if p == "C" {
-            query["company_name"] = map[string]interface{}{
-                "$in": entName,
-            }
-        } else {
-            query["_id"] = map[string]interface{}{
-                "$in": entName,
-            }
-        }
-        sess := db.Mgo_Ent.GetMgoConn()
-        defer db.Mgo_Ent.DestoryMongoConn(sess)
-        it := sess.DB(db.Mgo_Ent.DbName).C("qyxy_std").Find(query).Select(map[string]interface{}{"company_name": 1, "_id": 1, "company_area": 1, "company_city": 1}).Iter()
-        for m := make(map[string]interface{}); it.Next(&m); {
-            if m["company_name"] != nil && m["company_name"].(string) != "" {
-                entName_r = append(entName_r, &EnterQYXYInfo{
-                    Id:   m["_id"].(string),
-                    Name: qutil.ObjToString(m["company_name"]),
-                    Area: qutil.ObjToString(m["company_area"]),
-                    City: qutil.ObjToString(m["company_city"]),
-                })
-            }
-        }
-    }
-    return entName_r
+	if len(entName) > 0 {
+		query := map[string]interface{}{}
+		if p == "C" {
+			query["company_name"] = map[string]interface{}{
+				"$in": entName,
+			}
+		} else {
+			query["_id"] = map[string]interface{}{
+				"$in": entName,
+			}
+		}
+		sess := db.Mgo_Ent.GetMgoConn()
+		defer db.Mgo_Ent.DestoryMongoConn(sess)
+		it := sess.DB(db.Mgo_Ent.DbName).C("qyxy_std").Find(query).Select(map[string]interface{}{"company_name": 1, "_id": 1, "company_area": 1, "company_city": 1}).Iter()
+		for m := make(map[string]interface{}); it.Next(&m); {
+			if m["company_name"] != nil && m["company_name"].(string) != "" {
+				entName_r = append(entName_r, &EnterQYXYInfo{
+					Id:   m["_id"].(string),
+					Name: qutil.ObjToString(m["company_name"]),
+					Area: qutil.ObjToString(m["company_area"]),
+					City: qutil.ObjToString(m["company_city"]),
+				})
+			}
+		}
+	}
+	return entName_r
 }
 
 // 企业库是否有此企业信息
 func GetEntInfoByQYXY(entName []string, p string) []*EnterQYXYInfo {
-    entName_r := []*EnterQYXYInfo{}
-    if len(entName) > 0 {
-        query := map[string]interface{}{}
-        if p == "C" {
-            query["company_name"] = map[string]interface{}{
-                "$in": entName,
-            }
-        } else {
-            query["_id"] = map[string]interface{}{
-                "$in": entName,
-            }
-        }
-        sess := db.Mgo_Ent.GetMgoConn()
-        defer db.Mgo_Ent.DestoryMongoConn(sess)
-        it := sess.DB(db.Mgo_Ent.DbName).C("qyxy_std").Find(query).Select(map[string]interface{}{"company_name": 1, "_id": 1, "company_area": 1, "company_city": 1}).Iter()
-        for m := make(map[string]interface{}); it.Next(&m); {
-            if m["company_name"] != nil && m["company_name"].(string) != "" {
-                entName_r = append(entName_r, &EnterQYXYInfo{
-                    Id:   m["_id"].(string),
-                    Name: qutil.ObjToString(m["company_name"]),
-                    Area: qutil.ObjToString(m["company_area"]),
-                    City: qutil.ObjToString(m["company_city"]),
-                })
-            }
-        }
-    }
-    return entName_r
+	entName_r := []*EnterQYXYInfo{}
+	if len(entName) > 0 {
+		query := map[string]interface{}{}
+		if p == "C" {
+			query["company_name"] = map[string]interface{}{
+				"$in": entName,
+			}
+		} else {
+			query["_id"] = map[string]interface{}{
+				"$in": entName,
+			}
+		}
+		sess := db.Mgo_Ent.GetMgoConn()
+		defer db.Mgo_Ent.DestoryMongoConn(sess)
+		it := sess.DB(db.Mgo_Ent.DbName).C("qyxy_std").Find(query).Select(map[string]interface{}{"company_name": 1, "_id": 1, "company_area": 1, "company_city": 1}).Iter()
+		for m := make(map[string]interface{}); it.Next(&m); {
+			if m["company_name"] != nil && m["company_name"].(string) != "" {
+				entName_r = append(entName_r, &EnterQYXYInfo{
+					Id:   m["_id"].(string),
+					Name: qutil.ObjToString(m["company_name"]),
+					Area: qutil.ObjToString(m["company_area"]),
+					City: qutil.ObjToString(m["company_city"]),
+				})
+			}
+		}
+	}
+	return entName_r
 }
 
 // 企业库是否有此企业信息 并返回加密后id
 func GetEntIdByQYXY(entName string) string {
-    var entId = ""
-    if entName != "" {
-        query := map[string]interface{}{
-            "company_name": entName,
-        }
-        sess := db.Mgo_Ent.GetMgoConn()
-        defer db.Mgo_Ent.DestoryMongoConn(sess)
-        it := sess.DB(db.Mgo_Ent.DbName).C("qyxy_std").Find(query).Select(map[string]interface{}{"company_name": 1, "_id": 1}).Iter()
-        for m := make(map[string]interface{}); it.Next(&m); {
-            if m["company_name"] != nil && m["company_name"].(string) != "" {
-                entId = m["_id"].(string)
-            }
-        }
-    }
-    return entId
+	var entId = ""
+	if entName != "" {
+		query := map[string]interface{}{
+			"company_name": entName,
+		}
+		sess := db.Mgo_Ent.GetMgoConn()
+		defer db.Mgo_Ent.DestoryMongoConn(sess)
+		it := sess.DB(db.Mgo_Ent.DbName).C("qyxy_std").Find(query).Select(map[string]interface{}{"company_name": 1, "_id": 1}).Iter()
+		for m := make(map[string]interface{}); it.Next(&m); {
+			if m["company_name"] != nil && m["company_name"].(string) != "" {
+				entId = m["_id"].(string)
+			}
+		}
+	}
+	return entId
 }
 
 // 中标企业库是否有此企业注册金额
 func GetWinnerCapitals(entName []string) map[string]int64 {
-    esSql := `{"query": {"bool": {"must": [{"terms": {"id": [%s]}}],"must_not": [],"should": []}},"_source":["id","capital"],"from": 0,"size": %d,"sort": [],"aggs": {}}`
-    querySql := fmt.Sprintf(esSql, strings.Join(entName, ","), len(entName))
-    r := elastic.Get("qyxy", "qyxy", querySql)
-    if r == nil || len(*r) == 0 {
-        return nil
-    }
-    entName_capitals := map[string]int64{}
-    for _, v := range *r {
-        id := util.EncodeId(qutil.InterfaceToStr(v["id"]))
-        entName_capitals[id] = qutil.Int64All(v["capital"])
-    }
-    return entName_capitals
+	esSql := `{"query": {"bool": {"must": [{"terms": {"id": [%s]}}],"must_not": [],"should": []}},"_source":["id","capital"],"from": 0,"size": %d,"sort": [],"aggs": {}}`
+	querySql := fmt.Sprintf(esSql, strings.Join(entName, ","), len(entName))
+	r := elastic.Get("qyxy", "qyxy", querySql)
+	if r == nil || len(*r) == 0 {
+		return nil
+	}
+	entName_capitals := map[string]int64{}
+	for _, v := range *r {
+		id := util.EncodeId(qutil.InterfaceToStr(v["id"]))
+		entName_capitals[id] = qutil.Int64All(v["capital"])
+	}
+	return entName_capitals
 }
 
 var P_Starttime = "1514736000" //2018.01.01
@@ -210,131 +210,131 @@ var P_Starttime = "1514736000" //2018.01.01
 var RegWinner = regexp.MustCompile(".+[司院厂所心处普学]$")
 
 type UserInfoLock struct {
-    sync.Mutex
-    DecLock  map[string]*sync.Mutex
-    ForWLock map[string]*sync.Mutex
+	sync.Mutex
+	DecLock  map[string]*sync.Mutex
+	ForWLock map[string]*sync.Mutex
 }
 
 var UIL *UserInfoLock
 
 func NewUserInfoLock() *UserInfoLock {
-    return &UserInfoLock{
-        DecLock:  make(map[string]*sync.Mutex),
-        ForWLock: make(map[string]*sync.Mutex),
-    }
+	return &UserInfoLock{
+		DecLock:  make(map[string]*sync.Mutex),
+		ForWLock: make(map[string]*sync.Mutex),
+	}
 }
 
 // 决策分析-中标企业和采购单位 其他项目明细
 type AnalysisDec struct {
-    Area             map[string]interface{} //地区
-    BuyerContent     []ViewKeyWord          //采购内容
-    BuyerClass       []string               //采购单位类型
-    Sid              string                 //项目招标信息id
-    Pname            string                 //项目名称
-    Industry         string                 //招标行业
-    MinPrice         int                    //最小价格
-    MaxPrice         int                    //最大价格
-    Buyer            string                 //采购单位
-    ServiceId        int                    //大会员服务id
-    MobileModel      string                 //手机型号
-    AppVersion       string                 //app版本号
-    Winner           string                 //中标企业
-    SearchType       int                    //默认0:中标企业||采购单位||(中标企业&&采购单位)-类似项目明细;1:中标企业和采购单位其他项目明细 2:分析项目明细 3:专家项目明细
-    UserId           string                 //用户id
-    IsPower          bool                   //是否有权限
-    UserLock         sync.Mutex             //用户锁
-    Buyer_BuyerClass string                 //当前采购单位的采购单位类型
-    ExpertName       string                 //专家名字
-    ProjectScope     int                    //0 同类项目(默认搜索) 1 全部项目
-    LimitTime        string
-    SearchItem       int
-    Page             int //页码
-    PageSize         int //数量
+	Area             map[string]interface{} //地区
+	BuyerContent     []ViewKeyWord          //采购内容
+	BuyerClass       []string               //采购单位类型
+	Sid              string                 //项目招标信息id
+	Pname            string                 //项目名称
+	Industry         string                 //招标行业
+	MinPrice         int                    //最小价格
+	MaxPrice         int                    //最大价格
+	Buyer            string                 //采购单位
+	ServiceId        int                    //大会员服务id
+	MobileModel      string                 //手机型号
+	AppVersion       string                 //app版本号
+	Winner           string                 //中标企业
+	SearchType       int                    //默认0:中标企业||采购单位||(中标企业&&采购单位)-类似项目明细;1:中标企业和采购单位其他项目明细 2:分析项目明细 3:专家项目明细
+	UserId           string                 //用户id
+	IsPower          bool                   //是否有权限
+	UserLock         sync.Mutex             //用户锁
+	Buyer_BuyerClass string                 //当前采购单位的采购单位类型
+	ExpertName       string                 //专家名字
+	ProjectScope     int                    //0 同类项目(默认搜索) 1 全部项目
+	LimitTime        string
+	SearchItem       int
+	Page             int //页码
+	PageSize         int //数量
 }
 
 /*已选条件--关键词*/
 type ViewKeyWord struct {
-    Keyword  []string `json:"key"`       //关键词
-    Appended []string `json:"appendkey"` //附加词
-    Exclude  []string `json:"notkey"`    //排除词
-    MatchWay int      `json:"matchway"`  //匹配模式
+	Keyword  []string `json:"key"`       //关键词
+	Appended []string `json:"appendkey"` //附加词
+	Exclude  []string `json:"notkey"`    //排除词
+	MatchWay int      `json:"matchway"`  //匹配模式
 }
 
 func CheckPower(session *httpsession.Session) (string, bool) {
-    main_userId, _, member_status := util.MainUserId(session)
-    return main_userId, member_status > 0
+	main_userId, _, member_status := util.MainUserId(session)
+	return main_userId, member_status > 0
 }
 
 func (this *AnalysisDec) GetProjectInfoByBW() (count int64, res []map[string]interface{}) {
-    //this.UserLock.Lock()
-    //defer this.UserLock.Unlock()
-    //采购单位的采购类型
-    //if this.Buyer != "" {
-    //	buyerData := GetEntPC(strings.Split(this.Buyer, ","))
-    //	if buyerData != nil && len(buyerData) > 0 {
-    //		buyer_one := *qutil.ObjToMap(buyerData[0])
-    //		if buyer_one["buyerclass"] != nil {
-    //			this.Buyer_BuyerClass = buyer_one["buyerclass"].(string)
-    //		}
-    //	}
-    //}
-    this.ParameterCheck()
-    //this.BuyerContent = BuyerContentStruct(this.BuyerContent)
-    //中标企业和采购单位类似项目明细
-    decQuery := this.DecQueryNewSimilarMsgByBW()
-    tm := time.Now()
-    //其他项目明细
-    switch this.SearchType {
-    case 0: //分析项目明细||中标单位项目明细
-        _, count, res = elastic.GetAggs("projectset", "projectset", decQuery)
-    case 1:
-        _, _idMap := this.GetAllMsgByBW(decQuery)
-        //中标企业和采购单位 所有项目明细
-        allQuery := this.GetAllBWQueryByBW()
-        allMsg, _ := this.GetAllMsgByBW(allQuery)
-        if len(allMsg) > 0 {
-            for _, v := range allMsg {
-                id := qutil.ObjToString(v["_id"])
-                if _idMap[id] {
-                    continue
-                }
-                res = append(res, v)
-            }
-        }
-    case 2: //中标单位top10项目明细
-        _, count, res = elastic.GetAggs("projectset", "projectset", decQuery)
-    case 3: // 专家明细
-        decQuery := GetReviewExpertsProjects(this.ExpertName, this.Area, this.BuyerContent, this.Buyer, this.LimitTime, this.SearchItem, this.ProjectScope, this.Page, this.PageSize)
-        _, count, res = elastic.GetAggs("projectset", "projectset", decQuery)
-        log.Println("各类项目明细耗时:", time.Since(tm))
+	//this.UserLock.Lock()
+	//defer this.UserLock.Unlock()
+	//采购单位的采购类型
+	//if this.Buyer != "" {
+	//	buyerData := GetEntPC(strings.Split(this.Buyer, ","))
+	//	if buyerData != nil && len(buyerData) > 0 {
+	//		buyer_one := *qutil.ObjToMap(buyerData[0])
+	//		if buyer_one["buyerclass"] != nil {
+	//			this.Buyer_BuyerClass = buyer_one["buyerclass"].(string)
+	//		}
+	//	}
+	//}
+	this.ParameterCheck()
+	//this.BuyerContent = BuyerContentStruct(this.BuyerContent)
+	//中标企业和采购单位类似项目明细
+	decQuery := this.DecQueryNewSimilarMsgByBW()
+	tm := time.Now()
+	//其他项目明细
+	switch this.SearchType {
+	case 0: //分析项目明细||中标单位项目明细
+		_, count, res = elastic.GetAggs("projectset", "projectset", decQuery)
+	case 1:
+		_, _idMap := this.GetAllMsgByBW(decQuery)
+		//中标企业和采购单位 所有项目明细
+		allQuery := this.GetAllBWQueryByBW()
+		allMsg, _ := this.GetAllMsgByBW(allQuery)
+		if len(allMsg) > 0 {
+			for _, v := range allMsg {
+				id := qutil.ObjToString(v["_id"])
+				if _idMap[id] {
+					continue
+				}
+				res = append(res, v)
+			}
+		}
+	case 2: //中标单位top10项目明细
+		_, count, res = elastic.GetAggs("projectset", "projectset", decQuery)
+	case 3: // 专家明细
+		decQuery := GetReviewExpertsProjects(this.ExpertName, this.Area, this.BuyerContent, this.Buyer, this.LimitTime, this.SearchItem, this.ProjectScope, this.Page, this.PageSize)
+		_, count, res = elastic.GetAggs("projectset", "projectset", decQuery)
+		log.Println("各类项目明细耗时:", time.Since(tm))
 
-    }
-    log.Println("各类项目明细耗时:", time.Since(tm))
-    return count, NewSequence(res)
+	}
+	log.Println("各类项目明细耗时:", time.Since(tm))
+	return count, NewSequence(res)
 }
 
 func (this *AnalysisDec) ParameterCheck() {
-    this.BuyerContent = BuyerContentStruct(this.BuyerContent)
-    switch this.SearchType {
-    case 0: //类似项目 过滤无用字段
-        this.Winner = ""
-        this.ExpertName = ""
-    case 2: //中标top10项目明细 过滤无用字段
-        this.ExpertName = ""
-    case 3: //专家项目明细 过滤无用字段
-        this.Winner = ""
-    }
+	this.BuyerContent = BuyerContentStruct(this.BuyerContent)
+	switch this.SearchType {
+	case 0: //类似项目 过滤无用字段
+		this.Winner = ""
+		this.ExpertName = ""
+	case 2: //中标top10项目明细 过滤无用字段
+		this.ExpertName = ""
+	case 3: //专家项目明细 过滤无用字段
+		this.Winner = ""
+	}
 }
 
 // 获取数据
 func (this *AnalysisDec) GetAllMsgByBW(decQuery string) (res []map[string]interface{}, idMap map[string]bool) {
-    newRes := elastic.Get("projectset", "projectset", decQuery)
-    if newRes != nil {
-        idMap = map[string]bool{}
-        res = *newRes
-        for _, v := range *newRes {
-            idMap[qutil.ObjToString(v["_id"])] = true
-        }
-    }
-    return res, idMap
+	newRes := elastic.Get("projectset", "projectset", decQuery)
+	if newRes != nil {
+		idMap = map[string]bool{}
+		res = *newRes
+		for _, v := range *newRes {
+			idMap[qutil.ObjToString(v["_id"])] = true
+		}
+	}
+	return res, idMap
 }

+ 1 - 1
src/jfw/modules/bigmember/src/go.mod

@@ -1,6 +1,6 @@
 module jy/src/jfw/modules/bigmember/src
 
-go 1.20
+go 1.19
 
 require (
 	app.yhyue.com/moapp/jybase v0.0.0-20230614085041-f8f20842d5cb

+ 944 - 944
src/jfw/modules/bigmember/src/service/analysis/decision.go

@@ -2,60 +2,60 @@
 package analysis
 
 import (
-    elastic "app.yhyue.com/moapp/jybase/es"
-    "encoding/json"
-    "fmt"
-    "jy/src/jfw/modules/bigmember/src/config"
-    "jy/src/jfw/modules/bigmember/src/entity"
-    "jy/src/jfw/modules/bigmember/src/util"
-    "log"
-    "strconv"
-    "sync"
-    "time"
+	elastic "app.yhyue.com/moapp/jybase/es"
+	"encoding/json"
+	"fmt"
+	"jy/src/jfw/modules/bigmember/src/config"
+	"jy/src/jfw/modules/bigmember/src/entity"
+	"jy/src/jfw/modules/bigmember/src/util"
+	"log"
+	"strconv"
+	"sync"
+	"time"
 
-    . "app.yhyue.com/moapp/jybase/api"
-    qutil "app.yhyue.com/moapp/jybase/common"
-    "app.yhyue.com/moapp/jypkg/common/src/qfw/util/jy"
+	. "app.yhyue.com/moapp/jybase/api"
+	qutil "app.yhyue.com/moapp/jybase/common"
+	"app.yhyue.com/moapp/jypkg/common/src/qfw/util/jy"
 )
 
 type DecParam struct {
-    SearchItem    int
-    Area          map[string]interface{} //地区
-    BuyerContent  []ViewKeyWord          //采购内容
-    BuyerClass    []string               //采购单位行业
-    Sid           string                 //项目招标信息id
-    Pname         string                 //项目名称
-    Industry      string                 //招标行业
-    MinPrice      int                    //最小价格
-    MaxPrice      int                    //最大价格
-    Buyer         string                 //采购单位
-    ServiceId     int                    //大会员服务id
-    MobileModel   string                 //手机型号
-    AppVersion    string                 //app版本号
-    LimitTime     string                 //检索日期
-    ProjectScope  int                    //0 同类项目(默认搜索) 1 全部项目
-    HotWinnerType int                    // 热门中标企业top10 排序 0 默认金额排序 1:数量
+	SearchItem    int
+	Area          map[string]interface{} //地区
+	BuyerContent  []ViewKeyWord          //采购内容
+	BuyerClass    []string               //采购单位行业
+	Sid           string                 //项目招标信息id
+	Pname         string                 //项目名称
+	Industry      string                 //招标行业
+	MinPrice      int                    //最小价格
+	MaxPrice      int                    //最大价格
+	Buyer         string                 //采购单位
+	ServiceId     int                    //大会员服务id
+	MobileModel   string                 //手机型号
+	AppVersion    string                 //app版本号
+	LimitTime     string                 //检索日期
+	ProjectScope  int                    //0 同类项目(默认搜索) 1 全部项目
+	HotWinnerType int                    // 热门中标企业top10 排序 0 默认金额排序 1:数量
 }
 
 /*已选条件--关键词*/
 type ViewKeyWord struct {
-    Keyword  []string `json:"key"`       //关键词
-    Appended []string `json:"appendkey"` //附加词
-    Exclude  []string `json:"notkey"`    //排除词
-    MatchWay int      `json:"matchway"`  //匹配模式
+	Keyword  []string `json:"key"`       //关键词
+	Appended []string `json:"appendkey"` //附加词
+	Exclude  []string `json:"notkey"`    //排除词
+	MatchWay int      `json:"matchway"`  //匹配模式
 }
 
 type GetProParam struct {
-    ExpertName   string //专家名字
-    LimitTime    string //检索日期
-    ProjectScope int    //0 同类项目(默认搜索) 1 全部项目
-    SearchItem   int
-    Area         map[string]interface{} //地区
-    Buyer        string                 //采购单位
-    ServiceId    int                    //大会员服务id
-    BuyerContent []ViewKeyWord          //采购内容
-    Page         int
-    PageSize     int
+	ExpertName   string //专家名字
+	LimitTime    string //检索日期
+	ProjectScope int    //0 同类项目(默认搜索) 1 全部项目
+	SearchItem   int
+	Area         map[string]interface{} //地区
+	Buyer        string                 //采购单位
+	ServiceId    int                    //大会员服务id
+	BuyerContent []ViewKeyWord          //采购内容
+	Page         int
+	PageSize     int
 }
 
 // 投标决策分析id
@@ -63,946 +63,946 @@ var ServiceId = 6
 
 // 采购单位和中标企业 其他项目明细/类似项目明细
 func (this *Analysis) ProjectInfoByBW() {
-    defer qutil.Catch()
-    r := func() Result {
-        if this.Method() != "POST" {
-            return Result{Data: nil, Error_msg: Error_msg_1005}
-        }
-        if string(this.Body()) == "" {
-            return Result{Data: nil, Error_msg: Error_msg_1003}
-        }
-        EAD := entity.AnalysisDec{}
-        //接收参数
-        json.Unmarshal(this.Body(), &EAD)
-        if len(EAD.BuyerContent) == 0 {
-            return Result{Data: nil, Error_msg: Error_msg_1003}
-        }
-        //是否是大会员用户
-        if EAD.UserId, EAD.IsPower = entity.CheckPower(this.Session()); !EAD.IsPower {
-            return Result{Data: nil, Error_msg: Error_msg_1004}
-        }
-        EAD.ServiceId = ServiceId
-        //EAD.UserLock = *entity.ThisLock(EAD.UserId)
+	defer qutil.Catch()
+	r := func() Result {
+		if this.Method() != "POST" {
+			return Result{Data: nil, Error_msg: Error_msg_1005}
+		}
+		if string(this.Body()) == "" {
+			return Result{Data: nil, Error_msg: Error_msg_1003}
+		}
+		EAD := entity.AnalysisDec{}
+		//接收参数
+		json.Unmarshal(this.Body(), &EAD)
+		if len(EAD.BuyerContent) == 0 {
+			return Result{Data: nil, Error_msg: Error_msg_1003}
+		}
+		//是否是大会员用户
+		if EAD.UserId, EAD.IsPower = entity.CheckPower(this.Session()); !EAD.IsPower {
+			return Result{Data: nil, Error_msg: Error_msg_1004}
+		}
+		EAD.ServiceId = ServiceId
+		//EAD.UserLock = *entity.ThisLock(EAD.UserId)
 
-        count, res := EAD.GetProjectInfoByBW()
-        return Result{Data: map[string]interface{}{"count": count, "res": res}}
-    }()
-    this.ServeJson(r)
+		count, res := EAD.GetProjectInfoByBW()
+		return Result{Data: map[string]interface{}{"count": count, "res": res}}
+	}()
+	this.ServeJson(r)
 }
 
 // 试用用户分析
 func (this *Analysis) TrialInfo() {
-    defer qutil.Catch()
-    userId, _ := this.GetSession("userId").(string)
-    rData, errMsg := func() (interface{}, error) {
-        baseMsg := jy.GetBigVipUserBaseMsg(this.Session(), *config.Middleground)
-        if baseMsg == nil {
-            return -2, nil
-        }
-        //试用用户
-        var isTrialBool = false
-        if baseMsg.Status == 4 {
-            isTrialBool = true
-        }
-        //非试用用户 不做统计
-        if !isTrialBool {
-            return 1, nil
-        }
-        //是否是已预测过得项目
-        pname := this.GetString("pname")
-        sid := this.GetString("sid")
-        serviceId, _ := this.GetInteger("serviceid")
-        if pname == "" || sid == "" {
-            return -2, nil
-        }
-        if serviceId == 0 {
-            serviceId = 6
-        }
-        ai, _, decision_count := AnalysisPower("P", userId, pname, sid, serviceId)
-        if ai == 1 {
-            return 1, nil
-        }
-        if decision_count >= 0 {
-            return decision_count, nil
-        }
-        return 0, nil
-    }()
-    if errMsg != nil {
-        log.Printf("%s 获取此用户试用信息出错-%s", userId, errMsg)
-    }
-    this.ServeJson(NewResult(rData, errMsg))
+	defer qutil.Catch()
+	userId, _ := this.GetSession("userId").(string)
+	rData, errMsg := func() (interface{}, error) {
+		baseMsg := jy.GetBigVipUserBaseMsg(this.Session(), *config.Middleground)
+		if baseMsg == nil {
+			return -2, nil
+		}
+		//试用用户
+		var isTrialBool = false
+		if baseMsg.Status == 4 {
+			isTrialBool = true
+		}
+		//非试用用户 不做统计
+		if !isTrialBool {
+			return 1, nil
+		}
+		//是否是已预测过得项目
+		pname := this.GetString("pname")
+		sid := this.GetString("sid")
+		serviceId, _ := this.GetInteger("serviceid")
+		if pname == "" || sid == "" {
+			return -2, nil
+		}
+		if serviceId == 0 {
+			serviceId = 6
+		}
+		ai, _, decision_count := AnalysisPower("P", userId, pname, sid, serviceId)
+		if ai == 1 {
+			return 1, nil
+		}
+		if decision_count >= 0 {
+			return decision_count, nil
+		}
+		return 0, nil
+	}()
+	if errMsg != nil {
+		log.Printf("%s 获取此用户试用信息出错-%s", userId, errMsg)
+	}
+	this.ServeJson(NewResult(rData, errMsg))
 }
 
 // 决策分析内容-普通用户
 func (this *Analysis) FreeDecInfo() {
-    defer qutil.Catch()
-    var regMap = Result{
-        Data:       []map[string]interface{}{},
-        Error_code: Error_code,
-        Error_msg:  "",
-    }
-    if this.Method() == METHOD {
-        //接受前端参数
-        getRes := new(DecParam)
-        if string(this.Body()) != "" {
-            //接收参数
-            json.Unmarshal(this.Body(), &getRes)
-        }
+	defer qutil.Catch()
+	var regMap = Result{
+		Data:       []map[string]interface{}{},
+		Error_code: Error_code,
+		Error_msg:  "",
+	}
+	if this.Method() == METHOD {
+		//接受前端参数
+		getRes := new(DecParam)
+		if string(this.Body()) != "" {
+			//接收参数
+			json.Unmarshal(this.Body(), &getRes)
+		}
 
-        if getRes.Area != nil && getRes.Buyer != "" && len(getRes.BuyerContent) > 0 {
-            userId, _ := this.GetSession("userId").(string)
-            bigMsg := jy.GetBigVipUserBaseMsg(this.Session(), *config.Middleground)
-            mainUserid, phone := qutil.If(bigMsg.Data.Member.Pid != "", bigMsg.Data.Member.Pid, userId).(string), bigMsg.Data.Free.Phone
-            entity.UIL.Lock()
-            if entity.UIL.DecLock[mainUserid] == nil {
-                entity.UIL.DecLock[mainUserid] = &sync.Mutex{}
-            }
-            entity.UIL.Unlock()
-            entity.UIL.DecLock[mainUserid].Lock()
-            defer entity.UIL.DecLock[mainUserid].Unlock()
-            if getRes.ServiceId == 0 {
-                getRes.ServiceId = 6
-            }
-            //采购单位的采购类型
-            buyer_buyerClass := ""
-            getRes.BuyerContent = BuyerContentStruct(getRes.BuyerContent)
-            decQuery := DecQueryFree(getRes.Area, getRes.BuyerContent, getRes.LimitTime, getRes.Buyer, getRes.SearchItem)
-            regMap.Data = getDecInfoFree(decQuery, buyer_buyerClass, getRes)
-            //投标决策分析历史记录
-            go SaveDecHistortList(getRes, userId, mainUserid, phone, "", 0, this.Request, "free")
-        } else {
-            regMap.Error_code = Error_code_1002
-            regMap.Error_msg = Error_msg_1002
-        }
-    } else {
-        regMap.Error_code = Error_code_1005
-        regMap.Error_msg = Error_msg_1005
-    }
-    this.ServeJson(regMap)
+		if getRes.Area != nil && getRes.Buyer != "" && len(getRes.BuyerContent) > 0 {
+			userId, _ := this.GetSession("userId").(string)
+			bigMsg := jy.GetBigVipUserBaseMsg(this.Session(), *config.Middleground)
+			mainUserid, phone := qutil.If(bigMsg.Data.Member.Pid != "", bigMsg.Data.Member.Pid, userId).(string), bigMsg.Data.Free.Phone
+			entity.UIL.Lock()
+			if entity.UIL.DecLock[mainUserid] == nil {
+				entity.UIL.DecLock[mainUserid] = &sync.Mutex{}
+			}
+			entity.UIL.Unlock()
+			entity.UIL.DecLock[mainUserid].Lock()
+			defer entity.UIL.DecLock[mainUserid].Unlock()
+			if getRes.ServiceId == 0 {
+				getRes.ServiceId = 6
+			}
+			//采购单位的采购类型
+			buyer_buyerClass := ""
+			getRes.BuyerContent = BuyerContentStruct(getRes.BuyerContent)
+			decQuery := DecQueryFree(getRes.Area, getRes.BuyerContent, getRes.LimitTime, getRes.Buyer, getRes.SearchItem)
+			regMap.Data = getDecInfoFree(decQuery, buyer_buyerClass, getRes)
+			//投标决策分析历史记录
+			go SaveDecHistortList(getRes, userId, mainUserid, phone, "", 0, this.Request, "free")
+		} else {
+			regMap.Error_code = Error_code_1002
+			regMap.Error_msg = Error_msg_1002
+		}
+	} else {
+		regMap.Error_code = Error_code_1005
+		regMap.Error_msg = Error_msg_1005
+	}
+	this.ServeJson(regMap)
 }
 
 // 决策分析内容
 func (this *Analysis) DecInfo() {
-    defer qutil.Catch()
-    var regMap = Result{
-        Data:       []map[string]interface{}{},
-        Error_code: Error_code,
-        Error_msg:  "",
-    }
-    if this.Method() == METHOD {
-        //接受前端参数
-        getRes := new(DecParam)
-        if string(this.Body()) != "" {
-            //接收参数
-            json.Unmarshal(this.Body(), &getRes)
-        }
+	defer qutil.Catch()
+	var regMap = Result{
+		Data:       []map[string]interface{}{},
+		Error_code: Error_code,
+		Error_msg:  "",
+	}
+	if this.Method() == METHOD {
+		//接受前端参数
+		getRes := new(DecParam)
+		if string(this.Body()) != "" {
+			//接收参数
+			json.Unmarshal(this.Body(), &getRes)
+		}
 
-        if getRes.Area != nil && getRes.Buyer != "" && len(getRes.BuyerContent) > 0 {
-            var decCount = 0   //功能剩余次数
-            var base64Key = "" //加密串
-            userId, _ := this.GetSession("userId").(string)
-            //是否是子账号
-            //main_userId, phone, member_status := util.MainUserId(this.Session())
-            bigMsg := jy.GetBigVipUserBaseMsg(this.Session(), *config.Middleground)
-            mainUserid, phone := qutil.If(bigMsg.Data.Member.Pid != "", bigMsg.Data.Member.Pid, userId).(string), bigMsg.Data.Free.Phone
-            isAble := false
-            if len(bigMsg.Data.Member.MemberPowerList) > 0 {
-                for _, v := range bigMsg.Data.Member.MemberPowerList {
-                    if v == 6 {
-                        isAble = true
-                    }
-                }
-            }
-            if !isAble {
-                regMap.Error_code = Error_code_1004
-                regMap.Error_msg = Error_msg_1004
-            } else {
-                entity.UIL.Lock()
-                if entity.UIL.DecLock[mainUserid] == nil {
-                    entity.UIL.DecLock[mainUserid] = &sync.Mutex{}
-                }
-                entity.UIL.Unlock()
-                entity.UIL.DecLock[mainUserid].Lock()
-                defer entity.UIL.DecLock[mainUserid].Unlock()
-                if getRes.ServiceId == 0 {
-                    getRes.ServiceId = 6
-                }
-                var buyer_buyerClass string
-                //采购单位的采购类型
-                /*
-                   if getRes.Buyer != "" {
-                   	buyerData := entity.GetEntBlur(strings.Split(getRes.Buyer, ","))
-                   	if buyerData != nil && len(buyerData) > 0 {
-                   		buyer_one := *qutil.ObjToMap(buyerData[0])
-                   		if buyer_one["buyerclass"] != nil {
-                   			buyer_buyerClass = buyer_one["buyerclass"].(string)
-                   		}
-                   	}
-                   }*/
-                getRes.BuyerContent = BuyerContentStruct(getRes.BuyerContent)
-                //各维度项目数量
-                all_count, area_count, buyer_count := AnalyzeNumber(getRes.Area, getRes.BuyerContent, getRes.Buyer, getRes.LimitTime)
-                var isAnalyze bool
-                if all_count == 0 || (getRes.SearchItem == 1 && buyer_count == 0) ||
-                    (getRes.SearchItem == 2 && area_count == 0) {
-                    isAnalyze = true
-                }
-                if isAnalyze {
-                    regMap.Data = map[string]interface{}{
-                        "PAnalysis":  nil,
-                        "PCount":     all_count,
-                        "AreaCount":  area_count,
-                        "BuyerCount": buyer_count,
-                    }
-                    this.ServeJson(regMap)
-                    return
-                }
+		if getRes.Area != nil && getRes.Buyer != "" && len(getRes.BuyerContent) > 0 {
+			var decCount = 0   //功能剩余次数
+			var base64Key = "" //加密串
+			userId, _ := this.GetSession("userId").(string)
+			//是否是子账号
+			//main_userId, phone, member_status := util.MainUserId(this.Session())
+			bigMsg := jy.GetBigVipUserBaseMsg(this.Session(), *config.Middleground)
+			mainUserid, phone := qutil.If(bigMsg.Data.Member.Pid != "", bigMsg.Data.Member.Pid, userId).(string), bigMsg.Data.Free.Phone
+			isAble := false
+			if len(bigMsg.Data.Member.MemberPowerList) > 0 {
+				for _, v := range bigMsg.Data.Member.MemberPowerList {
+					if v == 6 {
+						isAble = true
+					}
+				}
+			}
+			if !isAble {
+				regMap.Error_code = Error_code_1004
+				regMap.Error_msg = Error_msg_1004
+			} else {
+				entity.UIL.Lock()
+				if entity.UIL.DecLock[mainUserid] == nil {
+					entity.UIL.DecLock[mainUserid] = &sync.Mutex{}
+				}
+				entity.UIL.Unlock()
+				entity.UIL.DecLock[mainUserid].Lock()
+				defer entity.UIL.DecLock[mainUserid].Unlock()
+				if getRes.ServiceId == 0 {
+					getRes.ServiceId = 6
+				}
+				var buyer_buyerClass string
+				//采购单位的采购类型
+				/*
+				   if getRes.Buyer != "" {
+				   	buyerData := entity.GetEntBlur(strings.Split(getRes.Buyer, ","))
+				   	if buyerData != nil && len(buyerData) > 0 {
+				   		buyer_one := *qutil.ObjToMap(buyerData[0])
+				   		if buyer_one["buyerclass"] != nil {
+				   			buyer_buyerClass = buyer_one["buyerclass"].(string)
+				   		}
+				   	}
+				   }*/
+				getRes.BuyerContent = BuyerContentStruct(getRes.BuyerContent)
+				//各维度项目数量
+				all_count, area_count, buyer_count := AnalyzeNumber(getRes.Area, getRes.BuyerContent, getRes.Buyer, getRes.LimitTime)
+				var isAnalyze bool
+				if all_count == 0 || (getRes.SearchItem == 1 && buyer_count == 0) ||
+					(getRes.SearchItem == 2 && area_count == 0) {
+					isAnalyze = true
+				}
+				if isAnalyze {
+					regMap.Data = map[string]interface{}{
+						"PAnalysis":  nil,
+						"PCount":     all_count,
+						"AreaCount":  area_count,
+						"BuyerCount": buyer_count,
+					}
+					this.ServeJson(regMap)
+					return
+				}
 
-                var rMap = sync.Map{}
-                sy := sync.WaitGroup{}
-                for _, v := range []int{1, 2, 3} {
-                    sy.Add(1)
-                    go func(stype int) {
-                        defer sy.Done()
-                        decQuery := DecQuery(getRes.Area, getRes.BuyerContent, getRes.Buyer, getRes.LimitTime, getRes.SearchItem, stype)
-                        aggsArr := getDecInfo(decQuery, buyer_buyerClass, getRes, stype)
-                        for k, v1 := range aggsArr {
-                            rMap.Store(k, v1)
-                        }
-                    }(v)
-                }
-                sy.Wait()
-                rMaps := make(map[string]interface{})
-                rMap.Range(func(key, value interface{}) bool {
-                    rMaps[qutil.InterfaceToStr(key)] = value
-                    return true
-                })
-                regMap.Data = map[string]interface{}{
-                    "PAnalysis":  rMaps,
-                    "PCount":     all_count,
-                    "AreaCount":  area_count,
-                    "BuyerCount": buyer_count,
-                }
-                //投标决策分析历史记录
-                go SaveDecHistortList(getRes, userId, mainUserid, phone, base64Key, decCount, this.Request, "pay")
-            }
-        } else {
-            regMap.Error_code = Error_code_1002
-            regMap.Error_msg = Error_msg_1002
-        }
-    } else {
-        regMap.Error_code = Error_code_1005
-        regMap.Error_msg = Error_msg_1005
-    }
-    this.ServeJson(regMap)
+				var rMap = sync.Map{}
+				sy := sync.WaitGroup{}
+				for _, v := range []int{1, 2, 3} {
+					sy.Add(1)
+					go func(stype int) {
+						defer sy.Done()
+						decQuery := DecQuery(getRes.Area, getRes.BuyerContent, getRes.Buyer, getRes.LimitTime, getRes.SearchItem, stype)
+						aggsArr := getDecInfo(decQuery, buyer_buyerClass, getRes, stype)
+						for k, v1 := range aggsArr {
+							rMap.Store(k, v1)
+						}
+					}(v)
+				}
+				sy.Wait()
+				rMaps := make(map[string]interface{})
+				rMap.Range(func(key, value interface{}) bool {
+					rMaps[qutil.InterfaceToStr(key)] = value
+					return true
+				})
+				regMap.Data = map[string]interface{}{
+					"PAnalysis":  rMaps,
+					"PCount":     all_count,
+					"AreaCount":  area_count,
+					"BuyerCount": buyer_count,
+				}
+				//投标决策分析历史记录
+				go SaveDecHistortList(getRes, userId, mainUserid, phone, base64Key, decCount, this.Request, "pay")
+			}
+		} else {
+			regMap.Error_code = Error_code_1002
+			regMap.Error_msg = Error_msg_1002
+		}
+	} else {
+		regMap.Error_code = Error_code_1005
+		regMap.Error_msg = Error_msg_1005
+	}
+	this.ServeJson(regMap)
 }
 
 func (this *Analysis) HotWinnerTop() {
-    defer qutil.Catch()
-    var regMap = Result{
-        Data:       []map[string]interface{}{},
-        Error_code: Error_code,
-        Error_msg:  "",
-    }
-    if this.Method() == METHOD {
-        //接受前端参数
-        getRes := new(DecParam)
-        if string(this.Body()) != "" {
-            //接收参数
-            json.Unmarshal(this.Body(), &getRes)
-        }
+	defer qutil.Catch()
+	var regMap = Result{
+		Data:       []map[string]interface{}{},
+		Error_code: Error_code,
+		Error_msg:  "",
+	}
+	if this.Method() == METHOD {
+		//接受前端参数
+		getRes := new(DecParam)
+		if string(this.Body()) != "" {
+			//接收参数
+			json.Unmarshal(this.Body(), &getRes)
+		}
 
-        if getRes.Area != nil && getRes.Buyer != "" && len(getRes.BuyerContent) > 0 {
-            //是否是子账号
-            //main_userId, phone, member_status := util.MainUserId(this.Session())
-            bigMsg := jy.GetBigVipUserBaseMsg(this.Session(), *config.Middleground)
-            isAble := false
-            if len(bigMsg.Data.Member.MemberPowerList) > 0 {
-                for _, v := range bigMsg.Data.Member.MemberPowerList {
-                    if v == 6 {
-                        isAble = true
-                    }
-                }
-            }
-            if !isAble {
-                regMap.Error_code = Error_code_1004
-                regMap.Error_msg = Error_msg_1004
-            } else {
-                if getRes.ServiceId == 0 {
-                    getRes.ServiceId = 6
-                }
-                //采购单位的采购类型
-                buyer_buyerClass := ""
-                getRes.BuyerContent = BuyerContentStruct(getRes.BuyerContent)
-                decQuery := DecWinnerQuery(getRes.Area, getRes.BuyerContent, getRes.Buyer, getRes.LimitTime, getRes.SearchItem, getRes.HotWinnerType)
-                aggsArr := getDecInfo(decQuery, buyer_buyerClass, getRes, 0)
-                //top明细数量错误问题特殊处理 数量重新查询
-                var rMap = sync.Map{}
-                sy := sync.WaitGroup{}
-                winnerAmount, _ := aggsArr["winnerAmount"].([]*DecWinnerInfo)
-                if len(winnerAmount) > 0 {
-                    for _, v := range winnerAmount {
-                        sy.Add(1)
-                        go func(winner string) {
-                            defer sy.Done()
-                            winnerSql := DecQueryNewSimilarMsgByBW(winner, getRes, 0)
-                            _, count, _ := elastic.GetAggs(P_INDEX, P_TYPE, winnerSql)
-                            rMap.Store(winner, count)
-                        }(v.Key)
-                    }
-                    sy.Wait()
-                    for _, v := range winnerAmount {
-                        if v1, ok := rMap.Load(v.Key); ok {
-                            v.Doc_count = qutil.Float64All(v1)
-                        }
-                    }
-                    sortkey := "doc_count" //默认金额
-                    if getRes.HotWinnerType == 0 {
-                        sortkey = "total_project"
-                    }
-                    util.SortData(&winnerAmount, sortkey, true) //排序
-                    aggsArr["winnerAmount"] = winnerAmount
-                }
+		if getRes.Area != nil && getRes.Buyer != "" && len(getRes.BuyerContent) > 0 {
+			//是否是子账号
+			//main_userId, phone, member_status := util.MainUserId(this.Session())
+			bigMsg := jy.GetBigVipUserBaseMsg(this.Session(), *config.Middleground)
+			isAble := false
+			if len(bigMsg.Data.Member.MemberPowerList) > 0 {
+				for _, v := range bigMsg.Data.Member.MemberPowerList {
+					if v == 6 {
+						isAble = true
+					}
+				}
+			}
+			if !isAble {
+				regMap.Error_code = Error_code_1004
+				regMap.Error_msg = Error_msg_1004
+			} else {
+				if getRes.ServiceId == 0 {
+					getRes.ServiceId = 6
+				}
+				//采购单位的采购类型
+				buyer_buyerClass := ""
+				getRes.BuyerContent = BuyerContentStruct(getRes.BuyerContent)
+				decQuery := DecWinnerQuery(getRes.Area, getRes.BuyerContent, getRes.Buyer, getRes.LimitTime, getRes.SearchItem, getRes.HotWinnerType)
+				aggsArr := getDecInfo(decQuery, buyer_buyerClass, getRes, 0)
+				//top明细数量错误问题特殊处理 数量重新查询
+				var rMap = sync.Map{}
+				sy := sync.WaitGroup{}
+				winnerAmount, _ := aggsArr["winnerAmount"].([]*DecWinnerInfo)
+				if len(winnerAmount) > 0 {
+					for _, v := range winnerAmount {
+						sy.Add(1)
+						go func(winner string) {
+							defer sy.Done()
+							winnerSql := DecQueryNewSimilarMsgByBW(winner, getRes, 0)
+							_, count, _ := elastic.GetAggs(P_INDEX, P_TYPE, winnerSql)
+							rMap.Store(winner, count)
+						}(v.Key)
+					}
+					sy.Wait()
+					for _, v := range winnerAmount {
+						if v1, ok := rMap.Load(v.Key); ok {
+							v.Doc_count = qutil.Float64All(v1)
+						}
+					}
+					sortkey := "doc_count" //默认金额
+					if getRes.HotWinnerType == 0 {
+						sortkey = "total_project"
+					}
+					util.SortData(&winnerAmount, sortkey, true) //排序
+					aggsArr["winnerAmount"] = winnerAmount
+				}
 
-                regMap.Data = map[string]interface{}{
-                    "PAnalysis": aggsArr,
-                }
-            }
-        } else {
-            regMap.Error_code = Error_code_1002
-            regMap.Error_msg = Error_msg_1002
-        }
-    } else {
-        regMap.Error_code = Error_code_1005
-        regMap.Error_msg = Error_msg_1005
-    }
-    this.ServeJson(regMap)
+				regMap.Data = map[string]interface{}{
+					"PAnalysis": aggsArr,
+				}
+			}
+		} else {
+			regMap.Error_code = Error_code_1002
+			regMap.Error_msg = Error_msg_1002
+		}
+	} else {
+		regMap.Error_code = Error_code_1005
+		regMap.Error_msg = Error_msg_1005
+	}
+	this.ServeJson(regMap)
 }
 
 // 决策分析内容-评标专家top十
 func (this *Analysis) DecReviewExperts() {
-    defer qutil.Catch()
-    var regMap = Result{
-        Data:       []map[string]interface{}{},
-        Error_code: Error_code,
-        Error_msg:  "",
-    }
-    if this.Method() == METHOD {
-        //接受前端参数
-        getRes := new(DecParam)
-        if string(this.Body()) != "" {
-            //接收参数
-            json.Unmarshal(this.Body(), &getRes)
-        }
+	defer qutil.Catch()
+	var regMap = Result{
+		Data:       []map[string]interface{}{},
+		Error_code: Error_code,
+		Error_msg:  "",
+	}
+	if this.Method() == METHOD {
+		//接受前端参数
+		getRes := new(DecParam)
+		if string(this.Body()) != "" {
+			//接收参数
+			json.Unmarshal(this.Body(), &getRes)
+		}
 
-        if getRes.Area != nil && getRes.Buyer != "" && len(getRes.BuyerContent) > 0 {
-            //是否是子账号
-            //main_userId, phone, member_status := util.MainUserId(this.Session())
-            bigMsg := jy.GetBigVipUserBaseMsg(this.Session(), *config.Middleground)
-            isAble := false
-            if len(bigMsg.Data.Member.MemberPowerList) > 0 {
-                for _, v := range bigMsg.Data.Member.MemberPowerList {
-                    if v == 6 {
-                        isAble = true
-                    }
-                }
-            }
-            if !isAble {
-                regMap.Error_code = Error_code_1004
-                regMap.Error_msg = Error_msg_1004
-            } else {
-                if getRes.ServiceId == 0 {
-                    getRes.ServiceId = 6
-                }
-                //各维度项目数量
-                all_count, area_count, buyer_count := AnalyzeNumber(getRes.Area, getRes.BuyerContent, getRes.Buyer, getRes.LimitTime)
-                var isAnalyze bool
-                if all_count == 0 || (getRes.SearchItem == 1 && buyer_count == 0) ||
-                    (getRes.SearchItem == 2 && area_count == 0) {
-                    isAnalyze = true
-                }
-                if isAnalyze {
-                    regMap.Data = map[string]interface{}{
-                        "PAnalysis": nil,
-                    }
-                    this.ServeJson(regMap)
-                    return
-                }
-                // getRes.Buyer = "北京市交通委员会密云公路分局"
-                //采购单位的采购类型
-                buyer_buyerClass := ""
-                getRes.BuyerContent = BuyerContentStruct(getRes.BuyerContent)
-                decQuery := DecReviewExpertsQuery(getRes.Area, getRes.BuyerContent, getRes.Buyer, buyer_buyerClass, getRes.LimitTime, getRes.SearchItem, getRes.ProjectScope)
-                aggsArr := getDecInfo(decQuery, buyer_buyerClass, getRes, 0)
-                //log.Println("专家top10", aggsArr["reviewExperts"])
-                var expertlist []map[string]interface{}
-                if reviewExperts, ok := aggsArr["reviewExperts"].([]map[string]interface{}); ok {
-                    for k, v := range reviewExperts {
-                        if k < 10 {
-                            expertName := qutil.ObjToString(v["key"])
-                            decQuery := ExpertsCooperationProjectCount(expertName, getRes.Area, getRes.BuyerContent, getRes.Buyer, getRes.LimitTime, getRes.SearchItem, getRes.ProjectScope)
-                            _, count, _ := elastic.GetAggs("projectset", "projectset", decQuery)
-                            v["doc_count"] = count
-                            expertlist = append(expertlist, v)
-                        } else {
-                            break
-                        }
-                    }
-                    util.SortData(&expertlist, "doc_count", true)
-                    aggsArr["reviewExperts"] = expertlist
-                }
+		if getRes.Area != nil && getRes.Buyer != "" && len(getRes.BuyerContent) > 0 {
+			//是否是子账号
+			//main_userId, phone, member_status := util.MainUserId(this.Session())
+			bigMsg := jy.GetBigVipUserBaseMsg(this.Session(), *config.Middleground)
+			isAble := false
+			if len(bigMsg.Data.Member.MemberPowerList) > 0 {
+				for _, v := range bigMsg.Data.Member.MemberPowerList {
+					if v == 6 {
+						isAble = true
+					}
+				}
+			}
+			if !isAble {
+				regMap.Error_code = Error_code_1004
+				regMap.Error_msg = Error_msg_1004
+			} else {
+				if getRes.ServiceId == 0 {
+					getRes.ServiceId = 6
+				}
+				//各维度项目数量
+				all_count, area_count, buyer_count := AnalyzeNumber(getRes.Area, getRes.BuyerContent, getRes.Buyer, getRes.LimitTime)
+				var isAnalyze bool
+				if all_count == 0 || (getRes.SearchItem == 1 && buyer_count == 0) ||
+					(getRes.SearchItem == 2 && area_count == 0) {
+					isAnalyze = true
+				}
+				if isAnalyze {
+					regMap.Data = map[string]interface{}{
+						"PAnalysis": nil,
+					}
+					this.ServeJson(regMap)
+					return
+				}
+				// getRes.Buyer = "北京市交通委员会密云公路分局"
+				//采购单位的采购类型
+				buyer_buyerClass := ""
+				getRes.BuyerContent = BuyerContentStruct(getRes.BuyerContent)
+				decQuery := DecReviewExpertsQuery(getRes.Area, getRes.BuyerContent, getRes.Buyer, buyer_buyerClass, getRes.LimitTime, getRes.SearchItem, getRes.ProjectScope)
+				aggsArr := getDecInfo(decQuery, buyer_buyerClass, getRes, 0)
+				//log.Println("专家top10", aggsArr["reviewExperts"])
+				var expertlist []map[string]interface{}
+				if reviewExperts, ok := aggsArr["reviewExperts"].([]map[string]interface{}); ok {
+					for k, v := range reviewExperts {
+						if k < 10 {
+							expertName := qutil.ObjToString(v["key"])
+							decQuery := ExpertsCooperationProjectCount(expertName, getRes.Area, getRes.BuyerContent, getRes.Buyer, getRes.LimitTime, getRes.SearchItem, getRes.ProjectScope)
+							_, count, _ := elastic.GetAggs("projectset", "projectset", decQuery)
+							v["doc_count"] = count
+							expertlist = append(expertlist, v)
+						} else {
+							break
+						}
+					}
+					util.SortData(&expertlist, "doc_count", true)
+					aggsArr["reviewExperts"] = expertlist
+				}
 
-                regMap.Data = map[string]interface{}{
-                    "PAnalysis": aggsArr,
-                }
-                //投标决策分析历史记录
-                //go SaveDecHistortList(getRes, userId, mainUserid, phone, base64Key, decCount, this.Request, "pay")
-            }
-        } else {
-            regMap.Error_code = Error_code_1002
-            regMap.Error_msg = Error_msg_1002
-        }
-    } else {
-        regMap.Error_code = Error_code_1005
-        regMap.Error_msg = Error_msg_1005
-    }
-    this.ServeJson(regMap)
+				regMap.Data = map[string]interface{}{
+					"PAnalysis": aggsArr,
+				}
+				//投标决策分析历史记录
+				//go SaveDecHistortList(getRes, userId, mainUserid, phone, base64Key, decCount, this.Request, "pay")
+			}
+		} else {
+			regMap.Error_code = Error_code_1002
+			regMap.Error_msg = Error_msg_1002
+		}
+	} else {
+		regMap.Error_code = Error_code_1005
+		regMap.Error_msg = Error_msg_1005
+	}
+	this.ServeJson(regMap)
 }
 
 type TRecentProject struct {
-    //RecentProject struct {
-    Hits struct {
-        Total struct {
-            Value    int    `json:"value"`
-            Relation string `json:"relation"`
-        } `json:"total"`
-        MaxScore interface{} `json:"max_score"`
-        Hits     []struct {
-            Index  string      `json:"_index"`
-            Type   string      `json:"_type"`
-            Id     string      `json:"_id"`
-            Score  interface{} `json:"_score"`
-            Source struct {
-                Bidamount   float64 `json:"bidamount"`
-                Projectname string  `json:"projectname"`
-                Jgtime      int     `json:"jgtime"`
-                Id          string  `json:"id"`
-            } `json:"_source"`
-            Sort []int `json:"sort"`
-        } `json:"hits"`
-    } `json:"hits"`
-    //} `json:"recent_project"`
+	//RecentProject struct {
+	Hits struct {
+		Total struct {
+			Value    int    `json:"value"`
+			Relation string `json:"relation"`
+		} `json:"total"`
+		MaxScore interface{} `json:"max_score"`
+		Hits     []struct {
+			Index  string      `json:"_index"`
+			Type   string      `json:"_type"`
+			Id     string      `json:"_id"`
+			Score  interface{} `json:"_score"`
+			Source struct {
+				Bidamount   float64 `json:"bidamount"`
+				Projectname string  `json:"projectname"`
+				Jgtime      int     `json:"jgtime"`
+				Id          string  `json:"id"`
+			} `json:"_source"`
+			Sort []int `json:"sort"`
+		} `json:"hits"`
+	} `json:"hits"`
+	//} `json:"recent_project"`
 }
 
 // 投标决策分析
 func getDecInfoFree(decQuery, buyer_buyerClass string, dec *DecParam) map[string]interface{} {
-    t1 := time.Now()
-    //
-    var aggsArr = map[string]interface{}{}
-    //聚合
-    aggs, _ := GetAggs(P_INDEX, P_TYPE, decQuery)
-    if aggs != nil {
-        //项目数量
-        if all_counts, ok := aggs.Children("all_counts"); ok {
-            all_counts_val, _ := all_counts.Aggregations["value"].MarshalJSON()
-            aggsArr["all_counts"] = string(all_counts_val)
-        }
-        //项目涉及中标企业
-        if all_winners, ok := aggs.Children("all_winners"); ok {
-            all_winners_val, _ := all_winners.Aggregations["value"].MarshalJSON()
-            aggsArr["all_winners"] = string(all_winners_val)
-        }
-        //项目金额
-        if all_money, ok := aggs.Children("all_money"); ok {
-            all_money_val, _ := all_money.Aggregations["value"].MarshalJSON()
-            all_money_float, _ := strconv.ParseFloat(string(all_money_val), 64)
-            aggsArr["all_money"] = all_money_float
-        }
-        //项目专家
-        if all_review_experts, ok := aggs.Children("all_review_experts"); ok {
-            all_review_experts_val, _ := all_review_experts.Aggregations["value"].MarshalJSON()
-            aggsArr["all_review_experts"] = string(all_review_experts_val)
-        }
-        //标书编制周期
-        if bidcycle_ranges, ok := aggs.Children("bidcycle_ranges"); ok {
-            var aggsMap []map[string]interface{}
-            bs, _ := bidcycle_ranges.Aggregations["buckets"].MarshalJSON()
-            if len(bs) > 0 {
-                json.Unmarshal(bs, &aggsMap)
-                if len(aggsMap) > 0 {
-                    var buckets = []map[string]interface{}{}
-                    for _, v := range aggsMap {
-                        buckets = append(buckets, map[string]interface{}{
-                            "key":       v["key"],
-                            "doc_count": v["doc_count"],
-                        })
-                    }
-                    aggsArr["bidcycle_ranges"] = buckets
-                }
-            }
-        }
-    }
-    log.Println("运行时间:", time.Since(t1))
-    return aggsArr
+	t1 := time.Now()
+	//
+	var aggsArr = map[string]interface{}{}
+	//聚合
+	aggs, _ := GetAggs(P_INDEX, P_TYPE, decQuery)
+	if aggs != nil {
+		//项目数量
+		if all_counts, ok := aggs.Children("all_counts"); ok {
+			all_counts_val, _ := all_counts.Aggregations["value"].MarshalJSON()
+			aggsArr["all_counts"] = string(all_counts_val)
+		}
+		//项目涉及中标企业
+		if all_winners, ok := aggs.Children("all_winners"); ok {
+			all_winners_val, _ := all_winners.Aggregations["value"].MarshalJSON()
+			aggsArr["all_winners"] = string(all_winners_val)
+		}
+		//项目金额
+		if all_money, ok := aggs.Children("all_money"); ok {
+			all_money_val, _ := all_money.Aggregations["value"].MarshalJSON()
+			all_money_float, _ := strconv.ParseFloat(string(all_money_val), 64)
+			aggsArr["all_money"] = all_money_float
+		}
+		//项目专家
+		if all_review_experts, ok := aggs.Children("all_review_experts"); ok {
+			all_review_experts_val, _ := all_review_experts.Aggregations["value"].MarshalJSON()
+			aggsArr["all_review_experts"] = string(all_review_experts_val)
+		}
+		//标书编制周期
+		if bidcycle_ranges, ok := aggs.Children("bidcycle_ranges"); ok {
+			var aggsMap []map[string]interface{}
+			bs, _ := bidcycle_ranges.Aggregations["buckets"].MarshalJSON()
+			if len(bs) > 0 {
+				json.Unmarshal(bs, &aggsMap)
+				if len(aggsMap) > 0 {
+					var buckets = []map[string]interface{}{}
+					for _, v := range aggsMap {
+						buckets = append(buckets, map[string]interface{}{
+							"key":       v["key"],
+							"doc_count": v["doc_count"],
+						})
+					}
+					aggsArr["bidcycle_ranges"] = buckets
+				}
+			}
+		}
+	}
+	log.Println("运行时间:", time.Since(t1))
+	return aggsArr
 }
 
 // 投标决策分析
 func getDecInfo(decQuery, buyer_buyerClass string, dec *DecParam, buyerSty int) map[string]interface{} {
-    t1 := time.Now()
-    //
-    var aggsArr = map[string]interface{}{}
-    /*
-    	//类似项目采购单位采购历史
-    	var buyerHistroyList = []map[string]interface{}{}
-    	  if dec.Buyer != "" && buyerSty == 1 {
-    	  	list := GetListByBuyer(dec)
-    	  	if list != nil && len(list) > 0 {
-    	  		for _, v := range list {
-    	  			var firsttime = v["firsttime"]
-    	  			infoid := ""
-    	  			if v["ids"] != nil {
-    	  				ids := qutil.ObjArrToStringArr(v["ids"].([]interface{}))
-    	  				if len(ids) > 0 {
-    	  					infoid = util.EncodeId(ids[0])
-    	  				}
-    	  			}
-    	  			var projectMap = map[string]interface{}{
-    	  				"projectname": v["projectname"],
-    	  				"_id":         util.EncodeId(v["_id"].(string)),
-    	  				"area":        v["area"],
-    	  				"bidstatus":   v["bidstatus"],
-    	  				"firsttime":   FormatDateWithObj(&firsttime, Date_Short_Layout),
-    	  				"infoid":      infoid,
-    	  			}
-    	  			buyerHistroyList = append(buyerHistroyList, projectMap)
-    	  		}
-    	  	}
-    	  	aggsArr["buyerHistroyList"] = buyerHistroyList
-    	  }*/
-    //聚合
-    aggs, _ := GetAggs(P_INDEX, P_TYPE, decQuery)
+	t1 := time.Now()
+	//
+	var aggsArr = map[string]interface{}{}
+	/*
+		//类似项目采购单位采购历史
+		var buyerHistroyList = []map[string]interface{}{}
+		  if dec.Buyer != "" && buyerSty == 1 {
+		  	list := GetListByBuyer(dec)
+		  	if list != nil && len(list) > 0 {
+		  		for _, v := range list {
+		  			var firsttime = v["firsttime"]
+		  			infoid := ""
+		  			if v["ids"] != nil {
+		  				ids := qutil.ObjArrToStringArr(v["ids"].([]interface{}))
+		  				if len(ids) > 0 {
+		  					infoid = util.EncodeId(ids[0])
+		  				}
+		  			}
+		  			var projectMap = map[string]interface{}{
+		  				"projectname": v["projectname"],
+		  				"_id":         util.EncodeId(v["_id"].(string)),
+		  				"area":        v["area"],
+		  				"bidstatus":   v["bidstatus"],
+		  				"firsttime":   FormatDateWithObj(&firsttime, Date_Short_Layout),
+		  				"infoid":      infoid,
+		  			}
+		  			buyerHistroyList = append(buyerHistroyList, projectMap)
+		  		}
+		  	}
+		  	aggsArr["buyerHistroyList"] = buyerHistroyList
+		  }*/
+	//聚合
+	aggs, _ := GetAggs(P_INDEX, P_TYPE, decQuery)
 
-    log.Println("-请求数据时间-:", time.Since(t1))
-    if aggs != nil {
-        //标书编制周期
-        if bidcycle_ranges, ok := aggs.Children("bidcycle_ranges"); ok {
-            var aggsMap []map[string]interface{}
-            bs, _ := bidcycle_ranges.Aggregations["buckets"].MarshalJSON()
-            if len(bs) > 0 {
-                json.Unmarshal(bs, &aggsMap)
-                if len(aggsMap) > 0 {
-                    var buckets = []map[string]interface{}{}
-                    for _, v := range aggsMap {
-                        buckets = append(buckets, map[string]interface{}{
-                            "key":       v["key"],
-                            "doc_count": v["doc_count"],
-                        })
-                    }
-                    aggsArr["bidcycle_ranges"] = buckets
-                }
-            }
-        }
-        //类似项目预算统计分析
-        if aggs_budget, ok := aggs.Children("budget_ranges"); ok {
-            var aggsMap []map[string]interface{}
-            bs, _ := aggs_budget.Aggregations["buckets"].MarshalJSON()
-            if len(bs) > 0 {
-                json.Unmarshal(bs, &aggsMap)
-                if len(aggsMap) > 0 {
-                    var buckets = []map[string]interface{}{}
-                    for _, v := range aggsMap {
-                        var avg_rate_map = *qutil.ObjToMap(v["avg_rate"].(map[string]interface{}))
-                        var avg_rate = avg_rate_map["avg_rate"].(map[string]interface{})
-                        var avg interface{} = nil
-                        if avg_rate["value"] != nil {
-                            // avg = avg_rate["value"].(interface{})
-                        }
-                        var sum_budget_map = avg_rate_map["sum_budget"].(map[string]interface{})
-                        var sum_bidamount_map = avg_rate_map["sum_bidamount"].(map[string]interface{})
-                        if sum_budget_map["value"] != nil && sum_bidamount_map["value"] != nil {
-                            var sum_budget float64 = qutil.RetainDecimal(qutil.Float64All(sum_budget_map["value"].(interface{})), 4)       //预算总额
-                            var sum_bidamount float64 = qutil.RetainDecimal(qutil.Float64All(sum_bidamount_map["value"].(interface{})), 4) //中标总额
-                            if sum_bidamount > 0 && sum_budget > 0 && sum_bidamount <= sum_budget {
-                                avg = (sum_budget - sum_bidamount) / sum_budget
-                            }
-                        }
-                        buckets = append(buckets, map[string]interface{}{
-                            "key":       v["key"],
-                            "doc_count": v["doc_count"],
-                            "avg":       avg,
-                        })
-                    }
-                    aggsArr["budgetAnalysis"] = buckets
-                }
-            }
-        }
-        //类似项目地区分布分析
-        if aggs_area, ok := aggs.Children("group_area"); ok {
-            var aggsMap []map[string]interface{}
-            bs, _ := aggs_area.Aggregations["buckets"].MarshalJSON()
-            if len(bs) > 0 {
-                json.Unmarshal(bs, &aggsMap)
-                if len(aggsMap) > 0 {
-                    var buckets = []map[string]interface{}{}
-                    for _, v := range aggsMap {
-                        //类似项目数量
-                        var group_counts_map = *qutil.ObjToMap(v["group_counts"].(map[string]interface{}))
-                        var doc_count = 0
-                        if group_counts_map["value"] != nil {
-                            doc_count = qutil.IntAll(group_counts_map["value"])
-                        }
-                        //类似项目规模
-                        var sum_bidamount_map = *qutil.ObjToMap(v["sum_bidamount"].(map[string]interface{}))
-                        var bidamount_sum_map = sum_bidamount_map["bidamount_sum"].(map[string]interface{})
-                        var bidamount_sum float64 = 0
-                        if bidamount_sum_map["value"] != nil {
-                            bidamount_sum = qutil.RetainDecimal(qutil.Float64All(bidamount_sum_map["value"].(interface{})), 2)
-                        }
-                        buckets = append(buckets, map[string]interface{}{
-                            "key":           v["key"],
-                            "doc_count":     doc_count,
-                            "bidamount_sum": bidamount_sum,
-                        })
-                    }
-                    aggsArr["group_area"] = buckets
-                }
-            }
-        }
-        var buyer_buyerClass_bool = false
-        //类似项目采购单位类型分析
-        if group_buyerclass, ok := aggs.Children("group_buyerclass"); ok {
-            if group_buyerclass_c, ok := group_buyerclass.Children("group_buyerclass_c"); ok {
-                var aggsMap []map[string]interface{}
-                bs, _ := group_buyerclass_c.Aggregations["buckets"].MarshalJSON()
-                if len(bs) > 0 {
-                    json.Unmarshal(bs, &aggsMap)
-                    if len(aggsMap) > 0 {
-                        // log.Println(aggsMap)
-                        var buckets = []map[string]interface{}{}
-                        for _, v := range aggsMap {
-                            if v["key"].(string) == "" {
-                                continue
-                            }
-                            var this_bool = false
-                            if buyer_buyerClass != "" && buyer_buyerClass == v["key"].(string) {
-                                buyer_buyerClass_bool = true
-                                this_bool = true
-                            }
-                            //类似项目数量
-                            var group_counts_map = *qutil.ObjToMap(v["group_counts"].(map[string]interface{}))
-                            var doc_count = 0
-                            if group_counts_map["value"] != nil {
-                                doc_count = qutil.IntAll(group_counts_map["value"])
-                            }
-                            //类似项目规模
-                            var group_money_map = *qutil.ObjToMap(v["group_money"].(map[string]interface{}))
-                            var group_money float64 = 0
-                            if group_money_map["value"] != nil {
-                                group_money = qutil.RetainDecimal(qutil.Float64All(group_money_map["value"].(interface{})), 4)
-                            }
-                            //平均折扣率
-                            var avg_rate_map = *qutil.ObjToMap(v["avg_rate"].(map[string]interface{}))
-                            var avg_rate = avg_rate_map["avg_rate"].(map[string]interface{})
-                            var avg interface{} = nil
-                            if avg_rate["value"] != nil {
-                                // avg = avg_rate["value"].(interface{})
-                            }
-                            var sum_budget_map = avg_rate_map["sum_budget"].(map[string]interface{})
-                            var sum_bidamount_map = avg_rate_map["sum_bidamount"].(map[string]interface{})
-                            if sum_budget_map["value"] != nil && sum_bidamount_map["value"] != nil {
-                                var sum_budget float64 = qutil.RetainDecimal(qutil.Float64All(sum_budget_map["value"].(interface{})), 4)       //预算总额
-                                var sum_bidamount float64 = qutil.RetainDecimal(qutil.Float64All(sum_bidamount_map["value"].(interface{})), 4) //中标总额
-                                if sum_bidamount > 0 && sum_budget > 0 && sum_bidamount <= sum_budget {
-                                    avg = (sum_budget - sum_bidamount) / sum_budget
-                                }
-                            }
-                            buckets = append(buckets, map[string]interface{}{
-                                "key":       v["key"],    //采购单位类型名称
-                                "doc_count": doc_count,   //类似项目总数
-                                "doc_money": group_money, //类似项目规模
-                                "avg":       avg,         //平均折扣率
-                                "main":      this_bool,   //当前采购单位得采购单位类型
-                            })
-                        }
-                        aggsArr["group_buyerclass"] = buckets
-                    }
-                }
-            }
-        }
-        //此采购单位得采购类型 buyer_buyerclass
-        if group_buyer_buyerclass, ok := aggs.Children("group_buyer_buyerclass"); ok && !buyer_buyerClass_bool {
-            var buyer_buyerclass_map map[string]interface{}
-            if group_buyerclass_c, ok := group_buyer_buyerclass.Children("group_buyerclass_c"); ok {
-                var aggsMap []map[string]interface{}
-                bs, _ := group_buyerclass_c.Aggregations["buckets"].MarshalJSON()
-                if len(bs) > 0 {
-                    json.Unmarshal(bs, &aggsMap)
-                    if len(aggsMap) > 0 {
-                        for _, v := range aggsMap {
-                            //类似项目数量
-                            var group_counts_map = *qutil.ObjToMap(v["group_counts"].(map[string]interface{}))
-                            var doc_count = 0
-                            if group_counts_map["value"] != nil {
-                                doc_count = qutil.IntAll(group_counts_map["value"])
-                            }
-                            //类似项目规模
-                            var group_money_map = *qutil.ObjToMap(v["group_money"].(map[string]interface{}))
-                            var group_money float64 = 0
-                            if group_money_map["value"] != nil {
-                                group_money = qutil.RetainDecimal(qutil.Float64All(group_money_map["value"].(interface{})), 4)
-                            }
-                            //平均折扣率
-                            var avg_rate_map = *qutil.ObjToMap(v["avg_rate"].(map[string]interface{}))
-                            var avg_rate = avg_rate_map["avg_rate"].(map[string]interface{})
-                            var avg interface{} = nil
-                            if avg_rate["value"] != nil {
-                                // avg = avg_rate["value"].(interface{})
-                            }
-                            var sum_budget_map = avg_rate_map["sum_budget"].(map[string]interface{})
-                            var sum_bidamount_map = avg_rate_map["sum_bidamount"].(map[string]interface{})
-                            if sum_budget_map["value"] != nil && sum_bidamount_map["value"] != nil {
-                                var sum_budget float64 = qutil.RetainDecimal(qutil.Float64All(sum_budget_map["value"].(interface{})), 4)       //预算总额
-                                var sum_bidamount float64 = qutil.RetainDecimal(qutil.Float64All(sum_bidamount_map["value"].(interface{})), 4) //中标总额
-                                if sum_bidamount > 0 && sum_budget > 0 && sum_bidamount <= sum_budget {
-                                    avg = (sum_budget - sum_bidamount) / sum_budget
-                                }
-                            }
-                            buyer_buyerclass_map = map[string]interface{}{
-                                "key":       v["key"],    //采购单位类型名称
-                                "doc_count": doc_count,   //类似项目总数
-                                "doc_money": group_money, //类似项目规模
-                                "avg":       avg,         //平均折扣率
-                                "main":      true,        //当前采购单位得采购单位类型
-                            }
-                        }
-                    }
-                }
-            }
-            if aggsArr["group_buyerclass"] != nil && buyer_buyerclass_map != nil {
-                group_buyerclass_buyers := aggsArr["group_buyerclass"].([]map[string]interface{})
-                buyers_len := len(group_buyerclass_buyers)
-                if buyers_len < 10 {
-                    group_buyerclass_buyers = append(group_buyerclass_buyers, buyer_buyerclass_map)
-                } else {
-                    group_buyerclass_buyers = append(group_buyerclass_buyers[:buyers_len-1], buyer_buyerclass_map)
-                }
-                aggsArr["group_buyerclass"] = group_buyerclass_buyers
-            }
-        }
-        //专家评审
-        if aggs_review_experts, ok := aggs.Children("group_review_experts"); ok {
-            var aggsMap []map[string]interface{}
-            bs, _ := aggs_review_experts.Aggregations["buckets"].MarshalJSON()
-            if len(bs) > 0 {
-                json.Unmarshal(bs, &aggsMap)
-                if len(aggsMap) > 0 {
-                    if len(aggsMap) > 10 {
-                        aggsMap = aggsMap[:10]
-                    }
-                    var _aggsMap = []map[string]interface{}{}
-                    for k, v := range aggsMap {
-                        if !entity.RegExperts.MatchString(qutil.ObjToString(v["key"])) {
-                            continue
-                        }
-                        var recentProject TRecentProject
-                        rp, err := json.Marshal(v["recent_project"])
-                        if err == nil {
-                            err = json.Unmarshal(rp, &recentProject)
-                            if err == nil && len(recentProject.Hits.Hits) > 0 {
-                                data := recentProject.Hits.Hits[0]
-                                v["jgtime"] = data.Source.Jgtime //成交时间
-                            }
-                        }
-                        delete(aggsMap[k], "recent_project")
-                        _aggsMap = append(_aggsMap, aggsMap[k])
-                    }
-                    aggsArr["reviewExperts"] = _aggsMap
-                }
-            }
-        }
-        //项目数量
-        if all_counts, ok := aggs.Children("all_counts"); ok {
-            all_counts_val, _ := all_counts.Aggregations["value"].MarshalJSON()
-            aggsArr["all_counts"] = string(all_counts_val)
-        }
-        //项目金额
-        if all_money, ok := aggs.Children("all_money"); ok {
-            all_money_val, _ := all_money.Aggregations["value"].MarshalJSON()
-            all_money_float, _ := strconv.ParseFloat(string(all_money_val), 64)
-            aggsArr["all_money"] = all_money_float
-        }
-        //项目涉及中标企业
-        if all_winners, ok := aggs.Children("all_winners"); ok {
-            all_winners_val, _ := all_winners.Aggregations["value"].MarshalJSON()
-            aggsArr["all_winners"] = string(all_winners_val)
-        }
-        //项目专家
-        if all_review_experts, ok := aggs.Children("all_review_experts"); ok {
-            all_review_experts_val, _ := all_review_experts.Aggregations["value"].MarshalJSON()
-            aggsArr["all_review_experts"] = string(all_review_experts_val)
-        }
-        //中标企业
-        if aggs_winner, ok := aggs.Children("group_winner"); ok {
-            var aggsMap []map[string]interface{}
-            bs, _ := aggs_winner.Aggregations["buckets"].MarshalJSON()
-            if len(bs) > 0 {
-                var winners = []string{}
-                json.Unmarshal(bs, &aggsMap)
-                if len(aggsMap) > 0 {
-                    if len(aggsMap) > 10 {
-                        aggsMap = aggsMap[:10]
-                    }
-                    var buckets = []*DecWinnerInfo{}
-                    for _, v := range aggsMap {
-                        //if !entity.RegWinner.MatchString(qutil.ObjToString(v["key"])) {
-                        //	continue
-                        //}
-                        //类似项目金额
-                        var total_map = *qutil.ObjToMap(v["total"].(map[string]interface{}))
-                        var total_project = 0
-                        if total_map["value"] != nil {
-                            total_project = qutil.IntAll(total_map["value"])
-                        }
+	log.Println("-请求数据时间-:", time.Since(t1))
+	if aggs != nil {
+		//标书编制周期
+		if bidcycle_ranges, ok := aggs.Children("bidcycle_ranges"); ok {
+			var aggsMap []map[string]interface{}
+			bs, _ := bidcycle_ranges.Aggregations["buckets"].MarshalJSON()
+			if len(bs) > 0 {
+				json.Unmarshal(bs, &aggsMap)
+				if len(aggsMap) > 0 {
+					var buckets = []map[string]interface{}{}
+					for _, v := range aggsMap {
+						buckets = append(buckets, map[string]interface{}{
+							"key":       v["key"],
+							"doc_count": v["doc_count"],
+						})
+					}
+					aggsArr["bidcycle_ranges"] = buckets
+				}
+			}
+		}
+		//类似项目预算统计分析
+		if aggs_budget, ok := aggs.Children("budget_ranges"); ok {
+			var aggsMap []map[string]interface{}
+			bs, _ := aggs_budget.Aggregations["buckets"].MarshalJSON()
+			if len(bs) > 0 {
+				json.Unmarshal(bs, &aggsMap)
+				if len(aggsMap) > 0 {
+					var buckets = []map[string]interface{}{}
+					for _, v := range aggsMap {
+						var avg_rate_map = *qutil.ObjToMap(v["avg_rate"].(map[string]interface{}))
+						var avg_rate = avg_rate_map["avg_rate"].(map[string]interface{})
+						var avg interface{} = nil
+						if avg_rate["value"] != nil {
+							// avg = avg_rate["value"].(interface{})
+						}
+						var sum_budget_map = avg_rate_map["sum_budget"].(map[string]interface{})
+						var sum_bidamount_map = avg_rate_map["sum_bidamount"].(map[string]interface{})
+						if sum_budget_map["value"] != nil && sum_bidamount_map["value"] != nil {
+							var sum_budget float64 = qutil.RetainDecimal(qutil.Float64All(sum_budget_map["value"].(interface{})), 4)       //预算总额
+							var sum_bidamount float64 = qutil.RetainDecimal(qutil.Float64All(sum_bidamount_map["value"].(interface{})), 4) //中标总额
+							if sum_bidamount > 0 && sum_budget > 0 && sum_bidamount <= sum_budget {
+								avg = (sum_budget - sum_bidamount) / sum_budget
+							}
+						}
+						buckets = append(buckets, map[string]interface{}{
+							"key":       v["key"],
+							"doc_count": v["doc_count"],
+							"avg":       avg,
+						})
+					}
+					aggsArr["budgetAnalysis"] = buckets
+				}
+			}
+		}
+		//类似项目地区分布分析
+		if aggs_area, ok := aggs.Children("group_area"); ok {
+			var aggsMap []map[string]interface{}
+			bs, _ := aggs_area.Aggregations["buckets"].MarshalJSON()
+			if len(bs) > 0 {
+				json.Unmarshal(bs, &aggsMap)
+				if len(aggsMap) > 0 {
+					var buckets = []map[string]interface{}{}
+					for _, v := range aggsMap {
+						//类似项目数量
+						var group_counts_map = *qutil.ObjToMap(v["group_counts"].(map[string]interface{}))
+						var doc_count = 0
+						if group_counts_map["value"] != nil {
+							doc_count = qutil.IntAll(group_counts_map["value"])
+						}
+						//类似项目规模
+						var sum_bidamount_map = *qutil.ObjToMap(v["sum_bidamount"].(map[string]interface{}))
+						var bidamount_sum_map = sum_bidamount_map["bidamount_sum"].(map[string]interface{})
+						var bidamount_sum float64 = 0
+						if bidamount_sum_map["value"] != nil {
+							bidamount_sum = qutil.RetainDecimal(qutil.Float64All(bidamount_sum_map["value"].(interface{})), 2)
+						}
+						buckets = append(buckets, map[string]interface{}{
+							"key":           v["key"],
+							"doc_count":     doc_count,
+							"bidamount_sum": bidamount_sum,
+						})
+					}
+					aggsArr["group_area"] = buckets
+				}
+			}
+		}
+		var buyer_buyerClass_bool = false
+		//类似项目采购单位类型分析
+		if group_buyerclass, ok := aggs.Children("group_buyerclass"); ok {
+			if group_buyerclass_c, ok := group_buyerclass.Children("group_buyerclass_c"); ok {
+				var aggsMap []map[string]interface{}
+				bs, _ := group_buyerclass_c.Aggregations["buckets"].MarshalJSON()
+				if len(bs) > 0 {
+					json.Unmarshal(bs, &aggsMap)
+					if len(aggsMap) > 0 {
+						// log.Println(aggsMap)
+						var buckets = []map[string]interface{}{}
+						for _, v := range aggsMap {
+							if v["key"].(string) == "" {
+								continue
+							}
+							var this_bool = false
+							if buyer_buyerClass != "" && buyer_buyerClass == v["key"].(string) {
+								buyer_buyerClass_bool = true
+								this_bool = true
+							}
+							//类似项目数量
+							var group_counts_map = *qutil.ObjToMap(v["group_counts"].(map[string]interface{}))
+							var doc_count = 0
+							if group_counts_map["value"] != nil {
+								doc_count = qutil.IntAll(group_counts_map["value"])
+							}
+							//类似项目规模
+							var group_money_map = *qutil.ObjToMap(v["group_money"].(map[string]interface{}))
+							var group_money float64 = 0
+							if group_money_map["value"] != nil {
+								group_money = qutil.RetainDecimal(qutil.Float64All(group_money_map["value"].(interface{})), 4)
+							}
+							//平均折扣率
+							var avg_rate_map = *qutil.ObjToMap(v["avg_rate"].(map[string]interface{}))
+							var avg_rate = avg_rate_map["avg_rate"].(map[string]interface{})
+							var avg interface{} = nil
+							if avg_rate["value"] != nil {
+								// avg = avg_rate["value"].(interface{})
+							}
+							var sum_budget_map = avg_rate_map["sum_budget"].(map[string]interface{})
+							var sum_bidamount_map = avg_rate_map["sum_bidamount"].(map[string]interface{})
+							if sum_budget_map["value"] != nil && sum_bidamount_map["value"] != nil {
+								var sum_budget float64 = qutil.RetainDecimal(qutil.Float64All(sum_budget_map["value"].(interface{})), 4)       //预算总额
+								var sum_bidamount float64 = qutil.RetainDecimal(qutil.Float64All(sum_bidamount_map["value"].(interface{})), 4) //中标总额
+								if sum_bidamount > 0 && sum_budget > 0 && sum_bidamount <= sum_budget {
+									avg = (sum_budget - sum_bidamount) / sum_budget
+								}
+							}
+							buckets = append(buckets, map[string]interface{}{
+								"key":       v["key"],    //采购单位类型名称
+								"doc_count": doc_count,   //类似项目总数
+								"doc_money": group_money, //类似项目规模
+								"avg":       avg,         //平均折扣率
+								"main":      this_bool,   //当前采购单位得采购单位类型
+							})
+						}
+						aggsArr["group_buyerclass"] = buckets
+					}
+				}
+			}
+		}
+		//此采购单位得采购类型 buyer_buyerclass
+		if group_buyer_buyerclass, ok := aggs.Children("group_buyer_buyerclass"); ok && !buyer_buyerClass_bool {
+			var buyer_buyerclass_map map[string]interface{}
+			if group_buyerclass_c, ok := group_buyer_buyerclass.Children("group_buyerclass_c"); ok {
+				var aggsMap []map[string]interface{}
+				bs, _ := group_buyerclass_c.Aggregations["buckets"].MarshalJSON()
+				if len(bs) > 0 {
+					json.Unmarshal(bs, &aggsMap)
+					if len(aggsMap) > 0 {
+						for _, v := range aggsMap {
+							//类似项目数量
+							var group_counts_map = *qutil.ObjToMap(v["group_counts"].(map[string]interface{}))
+							var doc_count = 0
+							if group_counts_map["value"] != nil {
+								doc_count = qutil.IntAll(group_counts_map["value"])
+							}
+							//类似项目规模
+							var group_money_map = *qutil.ObjToMap(v["group_money"].(map[string]interface{}))
+							var group_money float64 = 0
+							if group_money_map["value"] != nil {
+								group_money = qutil.RetainDecimal(qutil.Float64All(group_money_map["value"].(interface{})), 4)
+							}
+							//平均折扣率
+							var avg_rate_map = *qutil.ObjToMap(v["avg_rate"].(map[string]interface{}))
+							var avg_rate = avg_rate_map["avg_rate"].(map[string]interface{})
+							var avg interface{} = nil
+							if avg_rate["value"] != nil {
+								// avg = avg_rate["value"].(interface{})
+							}
+							var sum_budget_map = avg_rate_map["sum_budget"].(map[string]interface{})
+							var sum_bidamount_map = avg_rate_map["sum_bidamount"].(map[string]interface{})
+							if sum_budget_map["value"] != nil && sum_bidamount_map["value"] != nil {
+								var sum_budget float64 = qutil.RetainDecimal(qutil.Float64All(sum_budget_map["value"].(interface{})), 4)       //预算总额
+								var sum_bidamount float64 = qutil.RetainDecimal(qutil.Float64All(sum_bidamount_map["value"].(interface{})), 4) //中标总额
+								if sum_bidamount > 0 && sum_budget > 0 && sum_bidamount <= sum_budget {
+									avg = (sum_budget - sum_bidamount) / sum_budget
+								}
+							}
+							buyer_buyerclass_map = map[string]interface{}{
+								"key":       v["key"],    //采购单位类型名称
+								"doc_count": doc_count,   //类似项目总数
+								"doc_money": group_money, //类似项目规模
+								"avg":       avg,         //平均折扣率
+								"main":      true,        //当前采购单位得采购单位类型
+							}
+						}
+					}
+				}
+			}
+			if aggsArr["group_buyerclass"] != nil && buyer_buyerclass_map != nil {
+				group_buyerclass_buyers := aggsArr["group_buyerclass"].([]map[string]interface{})
+				buyers_len := len(group_buyerclass_buyers)
+				if buyers_len < 10 {
+					group_buyerclass_buyers = append(group_buyerclass_buyers, buyer_buyerclass_map)
+				} else {
+					group_buyerclass_buyers = append(group_buyerclass_buyers[:buyers_len-1], buyer_buyerclass_map)
+				}
+				aggsArr["group_buyerclass"] = group_buyerclass_buyers
+			}
+		}
+		//专家评审
+		if aggs_review_experts, ok := aggs.Children("group_review_experts"); ok {
+			var aggsMap []map[string]interface{}
+			bs, _ := aggs_review_experts.Aggregations["buckets"].MarshalJSON()
+			if len(bs) > 0 {
+				json.Unmarshal(bs, &aggsMap)
+				if len(aggsMap) > 0 {
+					if len(aggsMap) > 10 {
+						aggsMap = aggsMap[:10]
+					}
+					var _aggsMap = []map[string]interface{}{}
+					for k, v := range aggsMap {
+						if !entity.RegExperts.MatchString(qutil.ObjToString(v["key"])) {
+							continue
+						}
+						var recentProject TRecentProject
+						rp, err := json.Marshal(v["recent_project"])
+						if err == nil {
+							err = json.Unmarshal(rp, &recentProject)
+							if err == nil && len(recentProject.Hits.Hits) > 0 {
+								data := recentProject.Hits.Hits[0]
+								v["jgtime"] = data.Source.Jgtime //成交时间
+							}
+						}
+						delete(aggsMap[k], "recent_project")
+						_aggsMap = append(_aggsMap, aggsMap[k])
+					}
+					aggsArr["reviewExperts"] = _aggsMap
+				}
+			}
+		}
+		//项目数量
+		if all_counts, ok := aggs.Children("all_counts"); ok {
+			all_counts_val, _ := all_counts.Aggregations["value"].MarshalJSON()
+			aggsArr["all_counts"] = string(all_counts_val)
+		}
+		//项目金额
+		if all_money, ok := aggs.Children("all_money"); ok {
+			all_money_val, _ := all_money.Aggregations["value"].MarshalJSON()
+			all_money_float, _ := strconv.ParseFloat(string(all_money_val), 64)
+			aggsArr["all_money"] = all_money_float
+		}
+		//项目涉及中标企业
+		if all_winners, ok := aggs.Children("all_winners"); ok {
+			all_winners_val, _ := all_winners.Aggregations["value"].MarshalJSON()
+			aggsArr["all_winners"] = string(all_winners_val)
+		}
+		//项目专家
+		if all_review_experts, ok := aggs.Children("all_review_experts"); ok {
+			all_review_experts_val, _ := all_review_experts.Aggregations["value"].MarshalJSON()
+			aggsArr["all_review_experts"] = string(all_review_experts_val)
+		}
+		//中标企业
+		if aggs_winner, ok := aggs.Children("group_winner"); ok {
+			var aggsMap []map[string]interface{}
+			bs, _ := aggs_winner.Aggregations["buckets"].MarshalJSON()
+			if len(bs) > 0 {
+				var winners = []string{}
+				json.Unmarshal(bs, &aggsMap)
+				if len(aggsMap) > 0 {
+					if len(aggsMap) > 10 {
+						aggsMap = aggsMap[:10]
+					}
+					var buckets = []*DecWinnerInfo{}
+					for _, v := range aggsMap {
+						//if !entity.RegWinner.MatchString(qutil.ObjToString(v["key"])) {
+						//	continue
+						//}
+						//类似项目金额
+						var total_map = *qutil.ObjToMap(v["total"].(map[string]interface{}))
+						var total_project = 0
+						if total_map["value"] != nil {
+							total_project = qutil.IntAll(total_map["value"])
+						}
 
-                        //中标企业最近合作项目
-                        var recentProject TRecentProject
-                        latestProject := make(map[string]interface{})
-                        rp, err := json.Marshal(v["recent_project"])
-                        if err == nil {
-                            err = json.Unmarshal(rp, &recentProject)
-                            if err == nil && len(recentProject.Hits.Hits) > 0 {
-                                latestProject["_id"] = recentProject.Hits.Hits[0].Id
-                                data := recentProject.Hits.Hits[0]
-                                latestProject["_id"] = util.EncodeId(data.Id)
-                                latestProject["bidamount"] = data.Source.Bidamount     //金额
-                                latestProject["projectname"] = data.Source.Projectname //项目名称
-                                latestProject["jgtime"] = data.Source.Jgtime           //成交时间
-                            }
-                        }
+						//中标企业最近合作项目
+						var recentProject TRecentProject
+						latestProject := make(map[string]interface{})
+						rp, err := json.Marshal(v["recent_project"])
+						if err == nil {
+							err = json.Unmarshal(rp, &recentProject)
+							if err == nil && len(recentProject.Hits.Hits) > 0 {
+								latestProject["_id"] = recentProject.Hits.Hits[0].Id
+								data := recentProject.Hits.Hits[0]
+								latestProject["_id"] = util.EncodeId(data.Id)
+								latestProject["bidamount"] = data.Source.Bidamount     //金额
+								latestProject["projectname"] = data.Source.Projectname //项目名称
+								latestProject["jgtime"] = data.Source.Jgtime           //成交时间
+							}
+						}
 
-                        var max_jytime_map = *qutil.ObjToMap(v["max_jytime"].(map[string]interface{}))
-                        var max_jytime int64 = 0
-                        if max_jytime_map["value"] != nil {
-                            max_jytime = qutil.Int64All(max_jytime_map["value"])
-                        }
-                        //中标企业id
-                        var group_entidlist = *qutil.ObjToMap(v["group_entidlist"].(map[string]interface{}))
-                        var entId = ""
-                        if group_entidlist != nil && group_entidlist["buckets"] != nil {
-                            buckets := qutil.ObjArrToMapArr(group_entidlist["buckets"].([]interface{}))
-                            if buckets == nil || len(buckets) == 0 || (buckets[0]["key"] != nil && len(qutil.ObjToString(buckets[0]["key"])) < 10) {
-                                continue
-                            }
-                            ent_id := qutil.ObjToString(buckets[0]["key"])
-                            winners = append(winners, fmt.Sprintf(`"%s"`, ent_id))
-                            entId = util.EncodeId(ent_id)
-                        }
-                        //此中标企业与采购单位类似项目采购历史
-                        var buyer_similar_list = BuyerSOOL{}
-                        //此中标企业与采购单位其它项目采购历史
-                        var buyer_other_list = BuyerSOOL{}
-                        /*if dec.Buyer != "" {
-                        	var buyer_map = *qutil.ObjToMap(v["this_buyer"].(map[string]interface{}))
-                        	var buyer_map_count = buyer_map["doc_count"] //类似项目数量
-                        	var buyer_map_tatil_map = *qutil.ObjToMap(buyer_map["total"].(map[string]interface{}))
-                        	var buyer_map_tatil = qutil.RetainDecimal(qutil.Float64All(buyer_map_tatil_map["value"].(interface{})), 4)
-                        	var my_top_hits_map = *qutil.ObjToMap(buyer_map["my_top_hits"].(map[string]interface{}))
-                        	var buyer_hits_map = *qutil.ObjToMap(my_top_hits_map["hits"].(map[string]interface{}))
-                        	var hits_map = qutil.ObjArrToMapArr(buyer_hits_map["hits"].([]interface{}))
-                        	var bid_winner_time = ""
-                        	var buyer_winner_map = map[string]interface{}{} //类似项目 采购单位 和 中标企业
-                        	if hits_map != nil && len(hits_map) > 0 {
-                        		for _, v := range hits_map {
-                        			if v["_source"] != nil {
-                        				var hits_source_map = *qutil.ObjToMap(v["_source"].(map[string]interface{}))
-                        				jgtime := hits_source_map["jgtime"]
-                        				if jgtime != nil && bid_winner_time == "" {
-                        					bid_winner_time = FormatDateWithObj(&jgtime, "2006/01/02")
-                        				}
-                        				buyer_winner_map[qutil.InterfaceToStr(hits_source_map["id"])] = hits_source_map["jgtime"]
-                        			}
-                        		}
-                        	}
-                        	//查询此中标企业 和 此采购单位 所有合作的项目
-                        	buyer_winner_all_query := GetAllBWQuery(v["key"].(string), dec.Buyer)
-                        	buyer_winner_all_aggs, buyer_winner_all_res := GetAggs("projectset", "projectset", buyer_winner_all_query)
-                        	var bid_winner_other_time = ""
-                        	if buyer_winner_all_res != nil && len(buyer_winner_all_res) > 0 {
-                        		for _, v := range buyer_winner_all_res {
-                        			if buyer_winner_map[v["_id"].(string)] == nil && bid_winner_other_time == "" {
-                        				jgtime := v["jgtime"]
-                        				bid_winner_other_time = FormatDateWithObj(&jgtime, "2006/01/02")
-                        				break
-                        			}
-                        		}
-                        		//此中标企业 和 此采购单位 合作项目总金额
-                        		var sum_project_val_float float64 = 0
-                        		if buyer_winner_all_aggs != nil {
-                        			if sum_project, ok := buyer_winner_all_aggs.Children("sum_project"); ok {
-                        				sum_project_val, _ := sum_project.Aggregations["value"].MarshalJSON()
-                        				sum_project_val_float, _ = strconv.ParseFloat(string(sum_project_val), 64)
-                        			}
-                        		}
-                        		if sum_project_val_float > 0 {
-                        			buyer_other_list = BuyerSOOL{
-                        				dec.Buyer,
-                        				len(buyer_winner_all_res) - qutil.IntAll(buyer_map_count),
-                        				sum_project_val_float - buyer_map_tatil,
-                        				bid_winner_other_time,
-                        			}
-                        		}
-                        	}
-                        	if buyer_map_count != nil {
-                        		buyer_similar_list = BuyerSOOL{
-                        			dec.Buyer,
-                        			qutil.IntAll(buyer_map_count),
-                        			buyer_map_tatil,
-                        			bid_winner_time,
-                        		}
-                        	}
-                        }*/
-                        //中标企业名称
-                        buckets = append(buckets, &DecWinnerInfo{
-                            v["key"].(string),        //中标企业名称
-                            v["doc_count"].(float64), //类似项目总数
-                            total_project,            //项目金额
-                            buyer_similar_list,       //中标企业与采购单位类似项目合作历史
-                            buyer_other_list,         //中标企业和采购单位其它项目合作历史
-                            0,                        //中标企业注册资本
-                            entId,                    //中标企业加密id
-                            max_jytime,               //类似项目中标时间
-                            latestProject,            //中标企业最近合作项目
-                        })
-                    }
-                    //获取中标企业注资金信息
-                    /*capitals := entity.GetWinnerCapitals(winners)
-                      log.Println("查询获取中标企业注资金信息消耗时间", time.Since(t1))
-                      var isSortBool = false
-                      var bvdoc_count float64 = -1
-                      var bvtotal_project = -1
-                      for _, v := range buckets {
-                      	//类似项目或者其它项目
-                      	if k > 0 && (v.Buyer_other_list.Doc_count > 0 || v.Buyer_similar_list.Doc_count > 0) {
-                      	   isSortBool = true
-                      	}
-                      	//项目数相同 且 此中标企业金额大于前一个中标企业金额 允许再次排序
-                      	if bvdoc_count == v.Doc_count && bvtotal_project < v.Total_project {
-                      	   isSortBool = true
-                      	}
-                      	bvdoc_count = v.Doc_count
-                      	bvtotal_project = v.Total_project
-                      	v.Capital = capitals[v.EntId]
-                      }
-                      //根据金额二次排序
-                      fmt.Println("isSortBool:", isSortBool)
-                      if isSortBool {
-                         sort.Sort(DWIArray(buckets))
-                      }*/
-                    aggsArr["winnerAmount"] = buckets
-                }
-            }
-        }
-    }
-    log.Println("运行时间:", time.Since(t1))
-    return aggsArr
+						var max_jytime_map = *qutil.ObjToMap(v["max_jytime"].(map[string]interface{}))
+						var max_jytime int64 = 0
+						if max_jytime_map["value"] != nil {
+							max_jytime = qutil.Int64All(max_jytime_map["value"])
+						}
+						//中标企业id
+						var group_entidlist = *qutil.ObjToMap(v["group_entidlist"].(map[string]interface{}))
+						var entId = ""
+						if group_entidlist != nil && group_entidlist["buckets"] != nil {
+							buckets := qutil.ObjArrToMapArr(group_entidlist["buckets"].([]interface{}))
+							if buckets == nil || len(buckets) == 0 || (buckets[0]["key"] != nil && len(qutil.ObjToString(buckets[0]["key"])) < 10) {
+								continue
+							}
+							ent_id := qutil.ObjToString(buckets[0]["key"])
+							winners = append(winners, fmt.Sprintf(`"%s"`, ent_id))
+							entId = util.EncodeId(ent_id)
+						}
+						//此中标企业与采购单位类似项目采购历史
+						var buyer_similar_list = BuyerSOOL{}
+						//此中标企业与采购单位其它项目采购历史
+						var buyer_other_list = BuyerSOOL{}
+						/*if dec.Buyer != "" {
+							var buyer_map = *qutil.ObjToMap(v["this_buyer"].(map[string]interface{}))
+							var buyer_map_count = buyer_map["doc_count"] //类似项目数量
+							var buyer_map_tatil_map = *qutil.ObjToMap(buyer_map["total"].(map[string]interface{}))
+							var buyer_map_tatil = qutil.RetainDecimal(qutil.Float64All(buyer_map_tatil_map["value"].(interface{})), 4)
+							var my_top_hits_map = *qutil.ObjToMap(buyer_map["my_top_hits"].(map[string]interface{}))
+							var buyer_hits_map = *qutil.ObjToMap(my_top_hits_map["hits"].(map[string]interface{}))
+							var hits_map = qutil.ObjArrToMapArr(buyer_hits_map["hits"].([]interface{}))
+							var bid_winner_time = ""
+							var buyer_winner_map = map[string]interface{}{} //类似项目 采购单位 和 中标企业
+							if hits_map != nil && len(hits_map) > 0 {
+								for _, v := range hits_map {
+									if v["_source"] != nil {
+										var hits_source_map = *qutil.ObjToMap(v["_source"].(map[string]interface{}))
+										jgtime := hits_source_map["jgtime"]
+										if jgtime != nil && bid_winner_time == "" {
+											bid_winner_time = FormatDateWithObj(&jgtime, "2006/01/02")
+										}
+										buyer_winner_map[qutil.InterfaceToStr(hits_source_map["id"])] = hits_source_map["jgtime"]
+									}
+								}
+							}
+							//查询此中标企业 和 此采购单位 所有合作的项目
+							buyer_winner_all_query := GetAllBWQuery(v["key"].(string), dec.Buyer)
+							buyer_winner_all_aggs, buyer_winner_all_res := GetAggs("projectset", "projectset", buyer_winner_all_query)
+							var bid_winner_other_time = ""
+							if buyer_winner_all_res != nil && len(buyer_winner_all_res) > 0 {
+								for _, v := range buyer_winner_all_res {
+									if buyer_winner_map[v["_id"].(string)] == nil && bid_winner_other_time == "" {
+										jgtime := v["jgtime"]
+										bid_winner_other_time = FormatDateWithObj(&jgtime, "2006/01/02")
+										break
+									}
+								}
+								//此中标企业 和 此采购单位 合作项目总金额
+								var sum_project_val_float float64 = 0
+								if buyer_winner_all_aggs != nil {
+									if sum_project, ok := buyer_winner_all_aggs.Children("sum_project"); ok {
+										sum_project_val, _ := sum_project.Aggregations["value"].MarshalJSON()
+										sum_project_val_float, _ = strconv.ParseFloat(string(sum_project_val), 64)
+									}
+								}
+								if sum_project_val_float > 0 {
+									buyer_other_list = BuyerSOOL{
+										dec.Buyer,
+										len(buyer_winner_all_res) - qutil.IntAll(buyer_map_count),
+										sum_project_val_float - buyer_map_tatil,
+										bid_winner_other_time,
+									}
+								}
+							}
+							if buyer_map_count != nil {
+								buyer_similar_list = BuyerSOOL{
+									dec.Buyer,
+									qutil.IntAll(buyer_map_count),
+									buyer_map_tatil,
+									bid_winner_time,
+								}
+							}
+						}*/
+						//中标企业名称
+						buckets = append(buckets, &DecWinnerInfo{
+							v["key"].(string),        //中标企业名称
+							v["doc_count"].(float64), //类似项目总数
+							total_project,            //项目金额
+							buyer_similar_list,       //中标企业与采购单位类似项目合作历史
+							buyer_other_list,         //中标企业和采购单位其它项目合作历史
+							0,                        //中标企业注册资本
+							entId,                    //中标企业加密id
+							max_jytime,               //类似项目中标时间
+							latestProject,            //中标企业最近合作项目
+						})
+					}
+					//获取中标企业注资金信息
+					/*capitals := entity.GetWinnerCapitals(winners)
+					  log.Println("查询获取中标企业注资金信息消耗时间", time.Since(t1))
+					  var isSortBool = false
+					  var bvdoc_count float64 = -1
+					  var bvtotal_project = -1
+					  for _, v := range buckets {
+					  	//类似项目或者其它项目
+					  	if k > 0 && (v.Buyer_other_list.Doc_count > 0 || v.Buyer_similar_list.Doc_count > 0) {
+					  	   isSortBool = true
+					  	}
+					  	//项目数相同 且 此中标企业金额大于前一个中标企业金额 允许再次排序
+					  	if bvdoc_count == v.Doc_count && bvtotal_project < v.Total_project {
+					  	   isSortBool = true
+					  	}
+					  	bvdoc_count = v.Doc_count
+					  	bvtotal_project = v.Total_project
+					  	v.Capital = capitals[v.EntId]
+					  }
+					  //根据金额二次排序
+					  fmt.Println("isSortBool:", isSortBool)
+					  if isSortBool {
+					     sort.Sort(DWIArray(buckets))
+					  }*/
+					aggsArr["winnerAmount"] = buckets
+				}
+			}
+		}
+	}
+	log.Println("运行时间:", time.Since(t1))
+	return aggsArr
 }

+ 15 - 0
src/jfw/modules/distribution/.idea/git_toolbox_prj.xml

@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="GitToolBoxProjectSettings">
+    <option name="commitMessageIssueKeyValidationOverride">
+      <BoolValueOverride>
+        <option name="enabled" value="true" />
+      </BoolValueOverride>
+    </option>
+    <option name="commitMessageValidationEnabledOverride">
+      <BoolValueOverride>
+        <option name="enabled" value="true" />
+      </BoolValueOverride>
+    </option>
+  </component>
+</project>

+ 26 - 10
src/jfw/modules/publicapply/src/db.json

@@ -15,7 +15,7 @@
       "password": "123456"
     },
     "bidding": {
-      "address": "192.168.3.207:27001,192.168.3.206:27002",
+      "address": "192.168.3.206:27002",
       "size": 5,
       "dbName": "qfw_data",
       "collection": "bidding",
@@ -24,7 +24,7 @@
       "password": "jy@DevGroup"
     },
     "ent": {
-      "address": "192.168.3.207:27001,192.168.3.206:27002",
+      "address": "192.168.3.206:27002",
       "size": 5,
       "dbName": "mixdata",
       "replSet": "",
@@ -36,30 +36,38 @@
   },
   "elasticsearch": {
     "main": {
-      "address": "http://192.168.3.206:9800,http://192.168.3.206:9801",
+      "address": "http://192.168.3.241:9205,http://192.168.3.149:9200",
       "size": 30,
-	  "version": "v7",
-	  "userName": "",
-	  "password": ""
+      "version": "v7",
+      "userName":"",
+      "password":""
     }
   },
   "redis": {
     "main":{
-      "address": "other=192.168.3.206:1712,session=192.168.3.149:1713,newother=192.168.3.206:1712,poly=192.168.3.149:1713"
+      "address": "other=192.168.3.149:1712,session=192.168.3.149:1713,newother=192.168.3.149:1712,poly=192.168.3.149:1713"
     }
   },
   "mysql": {
     "main": {
       "dbName": "jianyu",
-      "address": "192.168.3.11:3366",
+      "address": "192.168.3.149:3306",
       "userName": "root",
       "passWord": "Topnet123",
       "maxOpenConns": 5,
       "maxIdleConns": 5
     },
+    "medical": {
+      "dBName": "medical_field_data",
+      "address": "192.168.3.14:4000",
+      "userName": "root",
+      "passWord": "=PDT49#80Z!RVv52_z",
+      "maxOpenConns": 5,
+      "maxIdleConns": 5
+    },
     "supplyInfo": {
       "dbName": "base_service",
-      "address": "192.168.3.11:3366",
+      "address": "192.168.3.149:3306",
       "userName": "root",
       "passWord": "Topnet123",
       "maxOpenConns": 5,
@@ -75,5 +83,13 @@
     }
   },
   "bdcollection":"bdcollection",
-  "bdlabel":"bdlabel"
+  "bdlabel":"bdlabel",
+  "base": {
+    "dBName": "base_service",
+    "address": "192.168.3.217:4000",
+    "userName": "root",
+    "passWord": "=PDT49#80Z!RVv52_z",
+    "maxOpenConns": 5,
+    "maxIdleConns": 5
+  }
 }

+ 2 - 2
src/jfw/modules/subscribepay/src/config.yaml

@@ -1,6 +1,6 @@
 etcd:
   hosts:
-  - 192.168.3.206:2379
+  - 192.168.3.149:2379
 userCenterKey: "usercenter.rpc" #用户中台rpc
 powerCheckCenterKey: "powercheck.rpc" #权益校验中台
-activityKey: "activity.rpc" #营销平台rpc
+activityKey: "activity.rpc" #营销平台rpc

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

@@ -1024,11 +1024,11 @@ func deleteRepeat(slice []int) []int {
 	return slice_repeat
 }
 
-//获取订单列表sql语句拼接
-//userId 用户id
-//fromPage 来源地址
-//typ 类型
-//@return sql语句 countsql语句
+// 获取订单列表sql语句拼接
+// userId 用户id
+// fromPage 来源地址
+// typ 类型
+// @return sql语句 countsql语句
 func getOrderSql(userId, fromPage, typ string) (string, string) {
 	sql := fmt.Sprintf(`select id,order_code,order_channel,filter_publishtime,create_time,data_spec,filter_id,filter_keys,order_money,pay_money,data_count,order_status,pay_way,product_type,filter,pay_time,vip_starttime,vip_endtime,applybill_status,applybill_type,applybill_taxnum,applybill_company,vip_type,course_status,discount_price,d_relation_id,billingMode,is_backstage_order,return_status,expiration_time,buy_subject,buy_count from dataexport_order
 		where del_status=0 and audit_status=3 AND ((is_backstage_order =0 AND user_id ='%s')`, userId)

BIN
src/jfw/modules/subscribepay/src/web/staticres/res/dataexport/20201130152650_250672091720_bjINh.xlsx


BIN
src/jfw/modules/subscribepay/src/web/staticres/res/dataexport/20201130153115_250672151862_QBYIm.xlsx


+ 3 - 3
src/jfw/modules/wxtoken/src/config.json

@@ -1,9 +1,9 @@
 {
 	"wxs":[
 		{
-			"appid":"wx6bb62470ce51e432",
-			"appsecret":"b9374cd43f677a6792ff7b1a23301ac3"
+			"appid":"wx5b1c6e7cc4dac0e4",
+			"appsecret":"b026103ffebd2291b3edb7a269612112"
 		}
 	],
 	"redis":"wxtoken=192.168.3.206:1712"
-}
+}

+ 4 - 4
src/jfw/modules/wxtoken/src/main.go

@@ -1,14 +1,14 @@
 package main
 
 import (
+	util "app.yhyue.com/moapp/jybase/common"
+	"app.yhyue.com/moapp/jybase/redis"
 	"encoding/json"
 	"errors"
 	"fmt"
 	"io/ioutil"
 	"log"
 	"net/http"
-	util "app.yhyue.com/moapp/jybase/common"
-	"app.yhyue.com/moapp/jybase/redis"
 	"strings"
 	"time"
 
@@ -155,7 +155,7 @@ func main() {
 func createAccessToken(appid string) {
 	lt := int64(0)
 	token := accessToken{"", time.Now(), &lt}
-	AllWxs[appid].TokenChan <- token
+	//	AllWxs[appid].TokenChan <- token
 	tokenKey := fmt.Sprintf("WxToken_%s", appid)
 	for {
 		ret, err := redis.GetNewBytes(RedisCode, tokenKey)
@@ -214,7 +214,7 @@ func createAccessToken(appid string) {
 	}
 }
 
-//刷新token
+// 刷新token
 func refreshAccessToken(appid string) {
 	redis.Del(RedisCode, fmt.Sprintf(WxTokenKey, appid))
 	<-AllWxs[appid].TokenChan

+ 10 - 8
src/web/staticres/common-module/pc-dialog/css/leave-info-dialog.css

@@ -87,22 +87,22 @@
   left: 50%;
   top: 50%;
   width: 752px;
-  max-height: 680px;
-  margin: 34px auto 0;
-  background: #fff;
+  /* max-height: 680px; */
+  margin: -30px auto 0;
+  background: transparent;
   border-radius: 8px;
-  transform: translate(-50%,-45%);
+  transform: translate(-50%,-50%);
   z-index: 1000;
   box-sizing: border-box;
   /* overflow-y: auto; */
 }
-@media screen and (min-width: 800px) and (max-width: 1366px) {
+/* @media screen and (min-width: 800px) and (max-width: 1366px) {
   #collectUserInfoDialog .dialog-container {
     top: 65%;
   }
-}
+} */
 #collectUserInfoDialog .dialog-header{
-  margin-top: -114px;
+  /* margin-top: -114px; */
   height: 250px;
   color: #1D1D1D;
   font-size: 18px;
@@ -114,8 +114,10 @@
   background-size: 100% 250px;
 }
 #collectUserInfoDialog .dialog-content{
-  /* margin-top: 20px; */
+  margin-top: -1px;
   padding: 0 32px 32px;
+  border-radius: 0 0 8px 8px;
+  background-color: #fff;
 }
 #collectUserInfoDialog .form-title{
   font-size: 14px;

BIN
src/web/staticres/common-module/pc-dialog/image/data-supermarket-buy.png


BIN
src/web/staticres/common-module/pc-dialog/image/data-supermarket-contact.png


+ 91 - 22
src/web/staticres/common-module/pc-dialog/js/leave-info-dialog.js

@@ -11,18 +11,18 @@ var temp = `
             <div class="basic clearfix">
               <div class="form-title">基本信息</div>
               <div class="form-main clearfix">
-                <div class="short-control fl">
+                <div class="short-control fl" v-if="moduleShow.name">
                   <el-form-item label="姓名 :" prop="name">
                     <el-input v-model.trim="form.name"  class="item-input" placeholder="请输入姓名" @focus="nameFocus" required>
                     </el-input>
                   </el-form-item>
                 </div>
-                <div class="short-control fr">
+                <div class="short-control fr" v-if="moduleShow.mail">
                   <el-form-item label="邮箱 :" prop="mail">
                     <el-input v-model.trim="form.mail"  class="item-input" placeholder="请输入邮箱" @focus="mailFocus"></el-input>
                   </el-form-item>
                 </div>
-                <div class="short-control fl">
+                <div class="short-control fl" v-if="moduleShow.phone">
                   <el-form-item label="手机号 :" prop="phone">
                     <el-input v-model.trim="form.phone" maxlength="11" @input="inputPhone"  class="item-input" placeholder="请输入准确的手机号" @focus="phoneFocus"></el-input>
                   </el-form-item>
@@ -39,7 +39,7 @@ var temp = `
             <div class="company clearfix">
               <div class="form-title">公司信息</div>
               <div class="form-main">
-                <div class="long-control" style="position: relative;">
+                <div class="long-control" style="position: relative;" v-if="moduleShow.companyName">
                   <el-form-item label="公司名称 :" prop="companyName">
                     <el-input
                     v-model.trim="form.companyName"
@@ -54,7 +54,7 @@ var temp = `
                     <div class="company-list" v-for="item in companyList" :key="item" @click="selectCompany(item)" v-html="item"></div>
                   </div>
                 </div>
-                <div class="long-control" >
+                <div class="long-control" v-if="moduleShow.companyType">
                   <el-form-item label="公司类型 :" class="company-type" prop="companyType">
                     <el-checkbox-group v-model="form.companyType">
                       <el-checkbox label="投标企业"></el-checkbox>
@@ -67,7 +67,7 @@ var temp = `
                     </el-checkbox-group>
                   </el-form-item>
                 </div>
-                <div class="short-control fl">
+                <div class="short-control fl" v-if="moduleShow.job">
                   <el-form-item label="职位 :" prop="job">
                     <el-select v-model="form.job" placeholder="请选择职位"  class="item-input" clearable>
                       <el-option v-for="item in jobData" :key="item.value" :label="item.label" :value="item.value">
@@ -249,6 +249,13 @@ var vm = new Vue({
         }
       }
     }
+    var validBranch = function(rule,value,callback) {
+      if(value === '') {
+        return callback(new Error('请选择部门'));
+      } else {
+        callback();
+      }
+    }
     return {
       dialogTitle: '为给您匹配精准的推荐信息,请完善个人信息',
       jobData: jobData, // 职位数据
@@ -324,7 +331,8 @@ var vm = new Vue({
           {
             required: true,
             trigger: 'blur',
-            message: '请选择部门'
+            validator: validBranch,
+            message: ''
           }
         ],
       },
@@ -334,7 +342,18 @@ var vm = new Vue({
       showSuccess: false, // 显示提交成功弹框
       showExport: false,
       isForce: false, // 是否强制
-      source: '' // 来源模块
+      source: '', // 来源模块
+      interest: '', // 感兴趣内容
+      moduleShow: {
+        name: true,
+        phone: true,
+        mail: true,
+        code: false,
+        companyName: true,
+        companyType: true,
+        job: true,
+        branch: false
+      }
     }
   },
   computed: {
@@ -370,21 +389,45 @@ var vm = new Vue({
         }
       }
     })
-    $(window).on('resize', this.changeTop)
+    // $(window).on('resize', this.changeTop)
   },
   beforeDestroy() {
     $(document).off('click')
   },
   methods: {
-    changeTop: function () {
-      this.$nextTick(function () {
-        var dialogDom = $('#collectUserInfoDialog .dialog-container')
-        var diffHeight = window.innerHeight - dialogDom.height() - 240
-        if (diffHeight < 0) {
-          dialogDom.css('margin-top', diffHeight.toString() + 'px')
+    getModules: function () {
+      var source = this.source
+      switch (source) {
+        case 'pc_supermarket_Noresults_customization':
+        case 'pc_market_ApplicationScenario': 
+        case 'pc_supermarket_details_customization': 
+        case 'pc_supermarket_details_buy': {
+          this.hideModule(['mail'])
+          break;
         }
-      })
+        default:
+          this.hideModule()
+          break;
+      }
+    },
+    hideModule: function (keys) {
+      if (!keys) return
+      var hideType = keys
+      for (var k in this.moduleShow) {
+        if (hideType.indexOf(k) !== -1) {
+          this.moduleShow[k] = false
+        }
+      }
     },
+    // changeTop: function () {
+    //   this.$nextTick(function () {
+    //     var dialogDom = $('#collectUserInfoDialog .dialog-container')
+    //     var diffHeight = window.innerHeight - dialogDom.height() - 240
+    //     if (diffHeight < 0) {
+    //       dialogDom.css('margin-top', diffHeight.toString() + 'px')
+    //     }
+    //   })
+    // },
     nameFocus:function(){
       this.$refs['ruleForm'].clearValidate(['name']);
     },
@@ -468,12 +511,13 @@ var vm = new Vue({
       })
     },
     // 是否留资
-    isNeedSubmit: function(source, callback, dom) {
+    isNeedSubmit: function(source, callback, interest) {
       if (!loginflag) {
         openLoginDig()
         return
       }
       this.source = source
+      this.interest = interest
       this.logAjax(source)
       var _this = this
       $.ajax({
@@ -484,8 +528,15 @@ var vm = new Vue({
         },
         success:function (res) {
           // 判断当前信息否在其他页面留资  如果全部留资 直接弹窗提交成功
-          var checkKeys = ['name', 'phone', 'company', 'mail', 'branch', 'position', 'companyType']
+          var checkKeys = []
+          var requireMail = ['structedData', 'pc_data_custom_export', 'pc_data_custom_data']
+          if (requireMail.indexOf(_this.source) > -1) {
+            checkKeys = ['name', 'phone', 'company', 'mail', 'branch', 'position', 'companyType']
+          } else {
+            checkKeys = ['name', 'phone', 'company', 'branch', 'position', 'companyType']
+          }
           var result = checkRequiredKeys(checkKeys, res.info)
+          res.info.interest = interest
           if (result) {
             callback && callback()
             _this.formAjax(_this.source, res.info)
@@ -495,7 +546,7 @@ var vm = new Vue({
               _this.showForm = true
             // 当前头部背景图
               _this.isSelfHeader()
-              _this.changeTop()
+              // _this.changeTop()
               if (res.info) {
                 echoRequiredValues(_this.form, res.info, ['name', 'phone', 'mail', 'branch'])
                 // 原有赋值回显逻辑
@@ -517,6 +568,9 @@ var vm = new Vue({
               }
             } else {
               callback && callback()
+              // 缺陷出现场景为:在其他页面留过资,但没有邮箱信息(user表也没有存邮箱字段),当前source也已留过资(是否需要留资字段返回为false)
+              // 如出现改场景 则会一直提交(更新)不了留资信息, 引次此处也需要再次提交 
+              // _this.formAjax(_this.source, res.info)
             }
           }
         }
@@ -525,11 +579,24 @@ var vm = new Vue({
     // 自定义弹窗头部
     isSelfHeader: function(){
       var imgUrl = '/common-module/pc-dialog/image/structed-title.png'
-      if (this.source.indexOf('custom_export') > -1 || this.source.indexOf('custom_data') > -1) {
+      var custom_export = this.source.indexOf('custom_export') > -1
+      var custom_data = this.source.indexOf('custom_data') > -1
+      var api_interface = this.source.indexOf('api_interface') > -1
+      // 数据超市source
+      var marketNoResult = this.source.indexOf('pc_supermarket_Noresults_customization') > -1 // 数据超市列表无数据-申请定制
+      var marketApplicationScenario = this.source.indexOf('pc_market_ApplicationScenario') > -1 // 数据市场落地页-大数据服务应用场景-立即咨询
+      var marketBuy = this.source.indexOf('pc_supermarket_details_buy') > -1 // 数据超市详情页-申请购买
+      var marketDetailCustom = this.source.indexOf('pc_supermarket_details_customization') > -1 // 数据超市详情页-申请定制
+      if (custom_export || custom_data || marketNoResult || marketDetailCustom) {
         imgUrl =  '/common-module/pc-dialog/image/leave-title-custom.png'
-      } else if (this.source.indexOf('api_interface') > -1) {
+      } else if (api_interface) {
         imgUrl =  '/common-module/pc-dialog/image/leave-title-api.png'
+      } else if (marketApplicationScenario) {
+        imgUrl =  '/common-module/pc-dialog/image/data-supermarket-contact.png'
+      } else if (marketBuy) {
+        imgUrl =  '/common-module/pc-dialog/image/data-supermarket-buy.png'
       }
+      this.getModules()
       this.$nextTick(function(){
         $('#collectUserInfoDialog .dialog-header').css('background-image', 'url(' + imgUrl + ')')
       })
@@ -558,11 +625,13 @@ var vm = new Vue({
         position: this.form.job == '其他' ?  this.form.job + '/' + this.form.otherJob : this.form.job,
         code: this.form.code,
         agree: true, // 原来留资模块的同意协议字段,,,默认传一个true 方便后端处理
-        branch: this.form.branch.indexOf('总裁') > -1 || this.form.branch.indexOf('总经理') > -1 || !this.form.job ? '' : this.form.branch
+        branch: this.form.branch.indexOf('总裁') > -1 || this.form.branch.indexOf('总经理') > -1 || !this.form.job ? '' : this.form.branch,
+        interest: this.interest 
       }
       if (info) {
         params = info
         params.source = source
+        params.interest = info.interest // 感兴趣内容
       }
       var _this = this
       $.ajax({

+ 1 - 0
src/web/staticres/common-module/perfect-info/index.css

@@ -158,6 +158,7 @@
    background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAAXNSR0IArs4c6QAAAIpQTFRFAAAA/39A/59A/5lE/59A/5lA/5VA/59A/6FC/5tA/5dA/59A/6BC/5xA/5lA/5xA/51B/5pA/51A/55B/5tA/6BB/55B/55B/5xA/6BB/55A/59A/55A/6BA/59A/59A/59A/55A/59A/55A/59A/55A/59A/59A/55A/59A/55A/59A/55A/59APNDUigAAAC10Uk5TAAQIDxAUGBgbHCAgIyQoLC8wND9AQ0dPUFNnh4uLn6e/y8/T19vf5+vv8/f7lQuEQAAAAO9JREFUGBmtwd1WgkAYBdCjhURFkg4gkmDKT9ic93+9FgwzfGjeuTcebLVN062HO96/ag6aPMKtl0JzUq5wJe440yaYyTSN7zMNnUFINI1qsaho6BiO33J0BI4cdQGsktYJONEqMIro1EBDS4cwcjo/QEvnAKOhcwEudGoMPAoABR89ReHpmYJCb0cheKWQorejsP6gkKKnKGw2FBR6KwpKUfAwqDnZ7zlpYBx4Rw4j1PxfhFFBp6rolLCCjtZbSKv14cSahl4uf2noBEKmaZzPNHSGmaTlTBfjil9yoosAtz7zhoP6EOIOT6Wp8vFYf66NXoaTXnrSAAAAAElFTkSuQmCC) no-repeat;
    background-size: contain;
    margin-top: 0.07rem;
+   flex-shrink: 0;
    }
  .j-main  .warm-text{
  font-size: 0.24rem;

+ 66 - 2
src/web/staticres/common-module/perfect-info/js/perfect-info.js

@@ -45,6 +45,19 @@ var titleMap = {
   wx_search_dzhfxbg: '欢迎体验剑鱼大会员',
   app_analysis_ProjectDetails: '欢迎体验剑鱼大会员',
   wx_analysis_ProjectDetails: '欢迎体验剑鱼大会员',
+ 
+  // 数据超市列表-申请数据定制
+  app_DataSupermarket_Customization: '量身定制数据解决方案',
+  wx_DataSupermarket_Customization: '量身定制数据解决方案',
+  h5_DataSupermarket_Customization: '量身定制数据解决方案',
+  // 数据超市详情-申请购买
+  app_supermarket_details_buy: '购买申请',
+  wx_supermarket_details_buy: '购买申请',
+  h5_supermarket_details_buy: '购买申请',
+  // 数据超市详情-申请数据定制
+  app_supermarket_details_customization: '量身定制数据解决方案',
+  wx_supermarket_details_customization: '量身定制数据解决方案',
+  h5_supermarket_details_customization: '量身定制数据解决方案'
 }
 
 // tip
@@ -135,7 +148,20 @@ var tipMap = {
   wx_subscribe_dzhfxbg: '请完善个人信息,我们将尽快与您联系,为您量身定制报告,做市场复盘数据支持。',
   wx_search_dzhfxbg: '请完善个人信息,我们将尽快与您联系,为您量身定制报告,做市场复盘数据支持。',
   wx_analysis_ProjectDetails: '请完善个人信息,我们将尽快与您联系,为您量身定制报告,做市场复盘数据支持。',
-  app_analysis_ProjectDetails: '请完善个人信息,我们将尽快与您联系,为您量身定制报告,做市场复盘数据支持。'
+  app_analysis_ProjectDetails: '请完善个人信息,我们将尽快与您联系,为您量身定制报告,做市场复盘数据支持。',
+
+  // 数据超市列表-申请数据定制
+  app_DataSupermarket_Customization: '专业数据团队,支持私有化部署。请完善个人信息,获取定制化数据解决方案。',
+  wx_DataSupermarket_Customization: '专业数据团队,支持私有化部署。请完善个人信息,获取定制化数据解决方案。',
+  h5_DataSupermarket_Customization: '专业数据团队,支持私有化部署。请完善个人信息,获取定制化数据解决方案。',
+  // 数据超市详情-申请购买
+  app_supermarket_details_buy: '请留下联系方式,我们会尽快让数据经理与您联系,为您提供高效可靠的数据服务方案!',
+  wx_supermarket_details_buy: '请留下联系方式,我们会尽快让数据经理与您联系,为您提供高效可靠的数据服务方案!',
+  h5_supermarket_details_buy: '请留下联系方式,我们会尽快让数据经理与您联系,为您提供高效可靠的数据服务方案!',
+  // 数据超市详情-申请数据定制
+  app_supermarket_details_customization: '专业数据团队,支持私有化部署。请完善个人信息,获取定制化数据解决方案。',
+  wx_supermarket_details_customization: '专业数据团队,支持私有化部署。请完善个人信息,获取定制化数据解决方案。',
+  h5_supermarket_details_customization: '专业数据团队,支持私有化部署。请完善个人信息,获取定制化数据解决方案。'
 }
 
 var vNode = {
@@ -203,7 +229,8 @@ var vNode = {
       workScope: '',
       partnerNeeds: '',
       branch: '',
-      origin: location.origin
+      origin: location.origin,
+      interest: ''
     },
     // 默认为隐藏,需要展示则需判断
     moduleShow: {
@@ -242,6 +269,9 @@ var vNode = {
     if (utils.getParam('source')) {
       this.ajaxParams.source = utils.getParam('source')
     }
+    if (utils.getParam('interest')) {
+      this.ajaxParams.interest = decodeURIComponent(utils.getParam('interest'))
+    }
     this.sourceLogAjax(this.ajaxParams.source)
   },
   mounted: function () {
@@ -355,6 +385,22 @@ var vNode = {
           hideLabel()
           break
         }
+
+        case 'app_supermarket_Noresults_customization':
+        case 'wx_DataSupermarket_Noresults_Customization':
+        case 'h5_supermarket_Noresults_customization':
+        case 'app_DataSupermarket_Customization':
+        case 'wx_DataSupermarket_Customization':
+        case 'h5_DataSupermarket_Customization':
+        case 'app_supermarket_details_buy':
+        case 'wx_supermarket_details_buy':
+        case 'h5_supermarket_details_buy':
+        case 'app_supermarket_details_customization':
+        case 'wx_supermarket_details_customization':
+        case 'h5_supermarket_details_customization':{
+          hideLabel(['email', 'area', 'class',  'workScope', 'partnerNeeds', 'agree'])
+          break
+        }
         default: {
           // 标书制作或者三方认证(case语句满足不了条件,放default中做更多判断)
           if (source === 'bid_document_Introduction_page' || source.indexOf('certificateServices') > -1) {
@@ -989,6 +1035,24 @@ var vNode = {
                 })
                 break
               }
+              // 数据超市相关source
+              case 'app_supermarket_Noresults_customization':
+              case 'wx_DataSupermarket_Noresults_Customization':
+              case 'h5_supermarket_Noresults_customization':
+              case 'app_DataSupermarket_Customization':
+              case 'wx_DataSupermarket_Customization':
+              case 'h5_DataSupermarket_Customization':
+              case 'app_supermarket_details_buy':
+              case 'wx_supermarket_details_buy':
+              case 'h5_supermarket_details_buy':
+              case 'app_supermarket_details_customization':
+              case 'wx_supermarket_details_customization':
+              case 'h5_supermarket_details_customization': {
+                _this.showMessage('我们的客户经理会在24小时内尽快与您联系。', '我知道了', function () {
+                  history.back()
+                })
+                break
+              }
               default: {
                 // 标书制作或者三方认证(case语句满足不了条件,放default中做更多判断)
                 if (source === 'bid_document_Introduction_page' || source.indexOf('certificateServices') > -1) {

+ 456 - 0
src/web/staticres/common-module/viewer/viewer.css

@@ -0,0 +1,456 @@
+/*!
+ * Viewer.js v1.10.4
+ * https://fengyuanchen.github.io/viewerjs
+ *
+ * Copyright 2015-present Chen Fengyuan
+ * Released under the MIT license
+ *
+ * Date: 2022-02-13T08:39:57.620Z
+ */
+
+.viewer-zoom-in::before, .viewer-zoom-out::before, .viewer-one-to-one::before, .viewer-reset::before, .viewer-prev::before, .viewer-play::before, .viewer-next::before, .viewer-rotate-left::before, .viewer-rotate-right::before, .viewer-flip-horizontal::before, .viewer-flip-vertical::before, .viewer-fullscreen::before, .viewer-fullscreen-exit::before, .viewer-close::before {
+    background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAARgAAAAUCAYAAABWOyJDAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTNui8sowAAAQPSURBVHic7Zs/iFxVFMa/0U2UaJGksUgnIVhYxVhpjDbZCBmLdAYECxsRFBTUamcXUiSNncgKQbSxsxH8gzAP3FU2jY0kKKJNiiiIghFlccnP4p3nPCdv3p9778vsLOcHB2bfveeb7955c3jvvNkBIMdxnD64a94GHMfZu3iBcRynN7zAOI7TG15gHCeeNUkr8zaxG2lbYDYsdgMbktBsP03jdQwljSXdtBhLOmtjowC9Mg9L+knSlcD8TNKpSA9lBpK2JF2VdDSR5n5J64m0qli399hNFMUlpshQii5jbXTbHGviB0nLNeNDSd9VO4A2UdB2fp+x0eCnaXxWXGA2X0au/3HgN9P4LFCjIANOJdrLr0zzZ+BEpNYDwKbpnQMeAw4m8HjQtM6Z9qa917zPQwFr3M5KgA6J5rTJCdFZJj9/lyvGhsDvwFNVuV2MhhjrK6b9bFiE+j1r87eBl4HDwCF7/U/k+ofAX5b/EXBv5JoLMuILzf3Ap6Z3EzgdqHMCuF7hcQf4HDgeoHnccncqdK/TvSDWffFXI/exICY/xZyqc6XLWF1UFZna4gJ7q8BsRvgd2/xXpo6P+D9dfT7PpECtA3cnWPM0GXGFZh/wgWltA+cDNC7X+AP4GzjZQe+k5dRxuYPeiuXU7e1qwLpDz7dFjXKRaSwuMLvAlG8zZlG+YmiK1HoFqT7wP2z+4Q45TfEGcMt01xLoNZEBTwRqD4BLpnMLeC1A41UmVxsXgXeBayV/Wx20rpTyrpnWRft7p6O/FdqzGrDukPNtkaMoMo3FBdBSQMOnYBCReyf05s126fU9ytfX98+mY54Kxnp7S9K3kj6U9KYdG0h6UdLbkh7poFXMfUnSOyVvL0h6VtIXHbS6nOP+s/Zm9mvyXW1uuC9ohZ72E9uDmXWLJOB1GxsH+DxPftsB8B6wlGDN02TAkxG6+4D3TWsbeC5CS8CDFce+AW500LhhOW2020TRjK3b21HEmgti9m0RonxbdMZeVzV+/4tF3cBpP7E9mKHNL5q8h5g0eYsCMQz0epq8gQrwMXAgcs0FGXGFRcB9wCemF9PkbYqM/Bas7fxLwNeJPdTdpo4itQti8lPMqTpXuozVRVXPpbHI3KkNTB1NfkL81j2mvhDp91HgV9MKuRIqrykj3WPq4rHyL+axj8/qGPmTqi6F9YDlHOvJU6oYcTsh/TYSzWmTE6JT19CtLTJt32D6CmHe0eQn1O8z5AXgT4sx4Vcu0/EQecMydB8z0hUWkTd2t4CrwNEePqMBcAR4mrBbwyXLPWJa8zrXmmLEhNBmfpkuY2102xxrih+pb+ieAb6vGhuA97UcJ5KR8gZ77K+99xxeYBzH6Q3/Z0fHcXrDC4zjOL3hBcZxnN74F+zlvXFWXF9PAAAAAElFTkSuQmCC");
+    background-repeat: no-repeat;
+    background-size: 280px;
+    color: transparent;
+    display: block;
+    font-size: 0;
+    height: 20px;
+    line-height: 0;
+    width: 20px;
+  }
+
+.viewer-zoom-in::before {
+  background-position: 0 0;
+  content: "Zoom In";
+}
+
+.viewer-zoom-out::before {
+  background-position: -20px 0;
+  content: "Zoom Out";
+}
+
+.viewer-one-to-one::before {
+  background-position: -40px 0;
+  content: "One to One";
+}
+
+.viewer-reset::before {
+  background-position: -60px 0;
+  content: "Reset";
+}
+
+.viewer-prev::before {
+  background-position: -80px 0;
+  content: "Previous";
+}
+
+.viewer-play::before {
+  background-position: -100px 0;
+  content: "Play";
+}
+
+.viewer-next::before {
+  background-position: -120px 0;
+  content: "Next";
+}
+
+.viewer-rotate-left::before {
+  background-position: -140px 0;
+  content: "Rotate Left";
+}
+
+.viewer-rotate-right::before {
+  background-position: -160px 0;
+  content: "Rotate Right";
+}
+
+.viewer-flip-horizontal::before {
+  background-position: -180px 0;
+  content: "Flip Horizontal";
+}
+
+.viewer-flip-vertical::before {
+  background-position: -200px 0;
+  content: "Flip Vertical";
+}
+
+.viewer-fullscreen::before {
+  background-position: -220px 0;
+  content: "Enter Full Screen";
+}
+
+.viewer-fullscreen-exit::before {
+  background-position: -240px 0;
+  content: "Exit Full Screen";
+}
+
+.viewer-close::before {
+  background-position: -260px 0;
+  content: "Close";
+}
+
+.viewer-container {
+  bottom: 0;
+  direction: ltr;
+  font-size: 0;
+  left: 0;
+  line-height: 0;
+  overflow: hidden;
+  position: absolute;
+  right: 0;
+  -webkit-tap-highlight-color: transparent;
+  top: 0;
+  -ms-touch-action: none;
+      touch-action: none;
+  -webkit-touch-callout: none;
+  -webkit-user-select: none;
+     -moz-user-select: none;
+      -ms-user-select: none;
+          user-select: none
+}
+
+.viewer-container::-moz-selection, .viewer-container *::-moz-selection {
+    background-color: transparent;
+  }
+
+.viewer-container::selection,
+  .viewer-container *::selection {
+    background-color: transparent;
+  }
+
+.viewer-container:focus {
+    outline: 0;
+  }
+
+.viewer-container img {
+    display: block;
+    height: auto;
+    max-height: none !important;
+    max-width: none !important;
+    min-height: 0 !important;
+    min-width: 0 !important;
+    width: 100%;
+  }
+
+.viewer-canvas {
+  bottom: 0;
+  left: 0;
+  overflow: hidden;
+  position: absolute;
+  right: 0;
+  top: 0
+}
+
+.viewer-canvas > img {
+    height: auto;
+    margin: 15px auto;
+    max-width: 90% !important;
+    width: auto;
+  }
+
+.viewer-footer {
+  bottom: 0;
+  left: 0;
+  overflow: hidden;
+  position: absolute;
+  right: 0;
+  text-align: center;
+}
+
+.viewer-navbar {
+  background-color: rgba(0, 0, 0, 50%);
+  overflow: hidden;
+}
+
+.viewer-list {
+  box-sizing: content-box;
+  height: 50px;
+  margin: 0;
+  overflow: hidden;
+  padding: 1px 0
+}
+
+.viewer-list > li {
+    color: transparent;
+    cursor: pointer;
+    float: left;
+    font-size: 0;
+    height: 50px;
+    line-height: 0;
+    opacity: 0.5;
+    overflow: hidden;
+    transition: opacity 0.15s;
+    width: 30px
+  }
+
+.viewer-list > li:focus,
+    .viewer-list > li:hover {
+      opacity: 0.75;
+    }
+
+.viewer-list > li:focus {
+      outline: 0;
+    }
+
+.viewer-list > li + li {
+      margin-left: 1px;
+    }
+
+.viewer-list > .viewer-loading {
+    position: relative
+  }
+
+.viewer-list > .viewer-loading::after {
+      border-width: 2px;
+      height: 20px;
+      margin-left: -10px;
+      margin-top: -10px;
+      width: 20px;
+    }
+
+.viewer-list > .viewer-active,
+  .viewer-list > .viewer-active:focus,
+  .viewer-list > .viewer-active:hover {
+    opacity: 1;
+  }
+
+.viewer-player {
+  background-color: #000;
+  bottom: 0;
+  cursor: none;
+  display: none;
+  left: 0;
+  position: absolute;
+  right: 0;
+  top: 0;
+  z-index: 1
+}
+
+.viewer-player > img {
+    left: 0;
+    position: absolute;
+    top: 0;
+  }
+
+.viewer-toolbar > ul {
+    display: inline-block;
+    margin: 0 auto 5px;
+    overflow: hidden;
+    padding: 6px 3px
+  }
+
+.viewer-toolbar > ul > li {
+      background-color: rgba(0, 0, 0, 50%);
+      border-radius: 50%;
+      cursor: pointer;
+      float: left;
+      height: 24px;
+      overflow: hidden;
+      transition: background-color 0.15s;
+      width: 24px
+    }
+
+.viewer-toolbar > ul > li:focus,
+      .viewer-toolbar > ul > li:hover {
+        background-color: rgba(0, 0, 0, 80%);
+      }
+
+.viewer-toolbar > ul > li:focus {
+        box-shadow: 0 0 3px #fff;
+        outline: 0;
+        position: relative;
+        z-index: 1;
+      }
+
+.viewer-toolbar > ul > li::before {
+        margin: 2px;
+      }
+
+.viewer-toolbar > ul > li + li {
+        margin-left: 1px;
+      }
+
+.viewer-toolbar > ul > .viewer-small {
+      height: 18px;
+      margin-bottom: 3px;
+      margin-top: 3px;
+      width: 18px
+    }
+
+.viewer-toolbar > ul > .viewer-small::before {
+        margin: -1px;
+      }
+
+.viewer-toolbar > ul > .viewer-large {
+      height: 30px;
+      margin-bottom: -3px;
+      margin-top: -3px;
+      width: 30px
+    }
+
+.viewer-toolbar > ul > .viewer-large::before {
+        margin: 5px;
+      }
+
+.viewer-tooltip {
+  background-color: rgba(0, 0, 0, 80%);
+  border-radius: 10px;
+  color: #fff;
+  display: none;
+  font-size: 12px;
+  height: 20px;
+  left: 50%;
+  line-height: 20px;
+  margin-left: -25px;
+  margin-top: -10px;
+  position: absolute;
+  text-align: center;
+  top: 50%;
+  width: 50px;
+}
+
+.viewer-title {
+  color: #ccc;
+  display: inline-block;
+  font-size: 12px;
+  line-height: 1.2;
+  margin: 0 5% 5px;
+  max-width: 90%;
+  opacity: 0.8;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  transition: opacity 0.15s;
+  white-space: nowrap
+}
+
+.viewer-title:hover {
+    opacity: 1;
+  }
+
+.viewer-button {
+  background-color: rgba(0, 0, 0, 50%);
+  border-radius: 50%;
+  cursor: pointer;
+  height: 80px;
+  overflow: hidden;
+  position: absolute;
+  right: -40px;
+  top: -40px;
+  transition: background-color 0.15s;
+  width: 80px
+}
+
+.viewer-button:focus,
+  .viewer-button:hover {
+    background-color: rgba(0, 0, 0, 80%);
+  }
+
+.viewer-button:focus {
+    box-shadow: 0 0 3px #fff;
+    outline: 0;
+  }
+
+.viewer-button::before {
+    bottom: 15px;
+    left: 15px;
+    position: absolute;
+  }
+
+.viewer-fixed {
+  position: fixed;
+}
+
+.viewer-open {
+  overflow: hidden;
+}
+
+.viewer-show {
+  display: block;
+}
+
+.viewer-hide {
+  display: none;
+}
+
+.viewer-backdrop {
+  background-color: rgba(0, 0, 0, 50%);
+}
+
+.viewer-invisible {
+  visibility: hidden;
+}
+
+.viewer-move {
+  cursor: move;
+  cursor: -webkit-grab;
+  cursor: grab;
+}
+
+.viewer-fade {
+  opacity: 0;
+}
+
+.viewer-in {
+  opacity: 1;
+}
+
+.viewer-transition {
+  transition: all 0.3s;
+}
+
+@-webkit-keyframes viewer-spinner {
+  0% {
+    transform: rotate(0deg);
+  }
+
+  100% {
+    transform: rotate(360deg);
+  }
+}
+
+@keyframes viewer-spinner {
+  0% {
+    transform: rotate(0deg);
+  }
+
+  100% {
+    transform: rotate(360deg);
+  }
+}
+
+.viewer-loading::after {
+    -webkit-animation: viewer-spinner 1s linear infinite;
+            animation: viewer-spinner 1s linear infinite;
+    border: 4px solid rgba(255, 255, 255, 10%);
+    border-left-color: rgba(255, 255, 255, 50%);
+    border-radius: 50%;
+    content: "";
+    display: inline-block;
+    height: 40px;
+    left: 50%;
+    margin-left: -20px;
+    margin-top: -20px;
+    position: absolute;
+    top: 50%;
+    width: 40px;
+    z-index: 1;
+  }
+
+@media (max-width: 767px) {
+  .viewer-hide-xs-down {
+    display: none;
+  }
+}
+
+@media (max-width: 991px) {
+  .viewer-hide-sm-down {
+    display: none;
+  }
+}
+
+@media (max-width: 1199px) {
+  .viewer-hide-md-down {
+    display: none;
+  }
+}

+ 3597 - 0
src/web/staticres/common-module/viewer/viewer.js

@@ -0,0 +1,3597 @@
+/*!
+ * Viewer.js v1.10.5
+ * https://fengyuanchen.github.io/viewerjs
+ *
+ * Copyright 2015-present Chen Fengyuan
+ * Released under the MIT license
+ *
+ * Date: 2022-04-05T08:21:02.491Z
+ */
+
+(function (global, factory) {
+  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
+  typeof define === 'function' && define.amd ? define(factory) :
+  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Viewer = factory());
+})(this, (function () { 'use strict';
+
+  function ownKeys(object, enumerableOnly) {
+    var keys = Object.keys(object);
+
+    if (Object.getOwnPropertySymbols) {
+      var symbols = Object.getOwnPropertySymbols(object);
+      enumerableOnly && (symbols = symbols.filter(function (sym) {
+        return Object.getOwnPropertyDescriptor(object, sym).enumerable;
+      })), keys.push.apply(keys, symbols);
+    }
+
+    return keys;
+  }
+
+  function _objectSpread2(target) {
+    for (var i = 1; i < arguments.length; i++) {
+      var source = null != arguments[i] ? arguments[i] : {};
+      i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
+        _defineProperty(target, key, source[key]);
+      }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
+        Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
+      });
+    }
+
+    return target;
+  }
+
+  function _typeof(obj) {
+    "@babel/helpers - typeof";
+
+    return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
+      return typeof obj;
+    } : function (obj) {
+      return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
+    }, _typeof(obj);
+  }
+
+  function _classCallCheck(instance, Constructor) {
+    if (!(instance instanceof Constructor)) {
+      throw new TypeError("Cannot call a class as a function");
+    }
+  }
+
+  function _defineProperties(target, props) {
+    for (var i = 0; i < props.length; i++) {
+      var descriptor = props[i];
+      descriptor.enumerable = descriptor.enumerable || false;
+      descriptor.configurable = true;
+      if ("value" in descriptor) descriptor.writable = true;
+      Object.defineProperty(target, descriptor.key, descriptor);
+    }
+  }
+
+  function _createClass(Constructor, protoProps, staticProps) {
+    if (protoProps) _defineProperties(Constructor.prototype, protoProps);
+    if (staticProps) _defineProperties(Constructor, staticProps);
+    Object.defineProperty(Constructor, "prototype", {
+      writable: false
+    });
+    return Constructor;
+  }
+
+  function _defineProperty(obj, key, value) {
+    if (key in obj) {
+      Object.defineProperty(obj, key, {
+        value: value,
+        enumerable: true,
+        configurable: true,
+        writable: true
+      });
+    } else {
+      obj[key] = value;
+    }
+
+    return obj;
+  }
+
+  var DEFAULTS = {
+    /**
+     * Enable a modal backdrop, specify `static` for a backdrop
+     * which doesn't close the modal on click.
+     * @type {boolean}
+     */
+    backdrop: true,
+
+    /**
+     * Show the button on the top-right of the viewer.
+     * @type {boolean}
+     */
+    button: true,
+
+    /**
+     * Show the navbar.
+     * @type {boolean | number}
+     */
+    navbar: true,
+
+    /**
+     * Specify the visibility and the content of the title.
+     * @type {boolean | number | Function | Array}
+     */
+    title: true,
+
+    /**
+     * Show the toolbar.
+     * @type {boolean | number | Object}
+     */
+    toolbar: true,
+
+    /**
+     * Custom class name(s) to add to the viewer's root element.
+     * @type {string}
+     */
+    className: '',
+
+    /**
+     * Define where to put the viewer in modal mode.
+     * @type {string | Element}
+     */
+    container: 'body',
+
+    /**
+     * Filter the images for viewing. Return true if the image is viewable.
+     * @type {Function}
+     */
+    filter: null,
+
+    /**
+     * Enable to request fullscreen when play.
+     * {@link https://developer.mozilla.org/en-US/docs/Web/API/FullscreenOptions}
+     * @type {boolean|FullscreenOptions}
+     */
+    fullscreen: true,
+
+    /**
+     * Define the extra attributes to inherit from the original image.
+     * @type {Array}
+     */
+    inheritedAttributes: ['crossOrigin', 'decoding', 'isMap', 'loading', 'referrerPolicy', 'sizes', 'srcset', 'useMap'],
+
+    /**
+     * Define the initial index of image for viewing.
+     * @type {number}
+     */
+    initialViewIndex: 0,
+
+    /**
+     * Enable inline mode.
+     * @type {boolean}
+     */
+    inline: false,
+
+    /**
+     * The amount of time to delay between automatically cycling an image when playing.
+     * @type {number}
+     */
+    interval: 5000,
+
+    /**
+     * Enable keyboard support.
+     * @type {boolean}
+     */
+    keyboard: true,
+
+    /**
+     * Focus the viewer when initialized.
+     * @type {boolean}
+     */
+    focus: true,
+
+    /**
+     * Indicate if show a loading spinner when load image or not.
+     * @type {boolean}
+     */
+    loading: true,
+
+    /**
+     * Indicate if enable loop viewing or not.
+     * @type {boolean}
+     */
+    loop: true,
+
+    /**
+     * Min width of the viewer in inline mode.
+     * @type {number}
+     */
+    minWidth: 200,
+
+    /**
+     * Min height of the viewer in inline mode.
+     * @type {number}
+     */
+    minHeight: 100,
+
+    /**
+     * Enable to move the image.
+     * @type {boolean}
+     */
+    movable: true,
+
+    /**
+     * Enable to rotate the image.
+     * @type {boolean}
+     */
+    rotatable: true,
+
+    /**
+     * Enable to scale the image.
+     * @type {boolean}
+     */
+    scalable: true,
+
+    /**
+     * Enable to zoom the image.
+     * @type {boolean}
+     */
+    zoomable: true,
+
+    /**
+     * Enable to zoom the current image by dragging on the touch screen.
+     * @type {boolean}
+     */
+    zoomOnTouch: true,
+
+    /**
+     * Enable to zoom the image by wheeling mouse.
+     * @type {boolean}
+     */
+    zoomOnWheel: true,
+
+    /**
+     * Enable to slide to the next or previous image by swiping on the touch screen.
+     * @type {boolean}
+     */
+    slideOnTouch: true,
+
+    /**
+     * Indicate if toggle the image size between its natural size
+     * and initial size when double click on the image or not.
+     * @type {boolean}
+     */
+    toggleOnDblclick: true,
+
+    /**
+     * Show the tooltip with image ratio (percentage) when zoom in or zoom out.
+     * @type {boolean}
+     */
+    tooltip: true,
+
+    /**
+     * Enable CSS3 Transition for some special elements.
+     * @type {boolean}
+     */
+    transition: true,
+
+    /**
+     * Define the CSS `z-index` value of viewer in modal mode.
+     * @type {number}
+     */
+    zIndex: 2015,
+
+    /**
+     * Define the CSS `z-index` value of viewer in inline mode.
+     * @type {number}
+     */
+    zIndexInline: 0,
+
+    /**
+     * Define the ratio when zoom the image by wheeling mouse.
+     * @type {number}
+     */
+    zoomRatio: 0.1,
+
+    /**
+     * Define the min ratio of the image when zoom out.
+     * @type {number}
+     */
+    minZoomRatio: 0.01,
+
+    /**
+     * Define the max ratio of the image when zoom in.
+     * @type {number}
+     */
+    maxZoomRatio: 100,
+
+    /**
+     * Define where to get the original image URL for viewing.
+     * @type {string | Function}
+     */
+    url: 'src',
+
+    /**
+     * Event shortcuts.
+     * @type {Function}
+     */
+    ready: null,
+    show: null,
+    shown: null,
+    hide: null,
+    hidden: null,
+    view: null,
+    viewed: null,
+    move: null,
+    moved: null,
+    rotate: null,
+    rotated: null,
+    scale: null,
+    scaled: null,
+    zoom: null,
+    zoomed: null,
+    play: null,
+    stop: null
+  };
+
+  var TEMPLATE = '<div class="viewer-container" tabindex="-1" touch-action="none">' + '<div class="viewer-canvas"></div>' + '<div class="viewer-footer">' + '<div class="viewer-title"></div>' + '<div class="viewer-toolbar"></div>' + '<div class="viewer-navbar">' + '<ul class="viewer-list" role="navigation"></ul>' + '</div>' + '</div>' + '<div class="viewer-tooltip" role="alert" aria-hidden="true"></div>' + '<div class="viewer-button" data-viewer-action="mix" role="button"></div>' + '<div class="viewer-player"></div>' + '</div>';
+
+  var IS_BROWSER = typeof window !== 'undefined' && typeof window.document !== 'undefined';
+  var WINDOW = IS_BROWSER ? window : {};
+  var IS_TOUCH_DEVICE = IS_BROWSER && WINDOW.document.documentElement ? 'ontouchstart' in WINDOW.document.documentElement : false;
+  var HAS_POINTER_EVENT = IS_BROWSER ? 'PointerEvent' in WINDOW : false;
+  var NAMESPACE = 'viewer'; // Actions
+
+  var ACTION_MOVE = 'move';
+  var ACTION_SWITCH = 'switch';
+  var ACTION_ZOOM = 'zoom'; // Classes
+
+  var CLASS_ACTIVE = "".concat(NAMESPACE, "-active");
+  var CLASS_CLOSE = "".concat(NAMESPACE, "-close");
+  var CLASS_FADE = "".concat(NAMESPACE, "-fade");
+  var CLASS_FIXED = "".concat(NAMESPACE, "-fixed");
+  var CLASS_FULLSCREEN = "".concat(NAMESPACE, "-fullscreen");
+  var CLASS_FULLSCREEN_EXIT = "".concat(NAMESPACE, "-fullscreen-exit");
+  var CLASS_HIDE = "".concat(NAMESPACE, "-hide");
+  var CLASS_HIDE_MD_DOWN = "".concat(NAMESPACE, "-hide-md-down");
+  var CLASS_HIDE_SM_DOWN = "".concat(NAMESPACE, "-hide-sm-down");
+  var CLASS_HIDE_XS_DOWN = "".concat(NAMESPACE, "-hide-xs-down");
+  var CLASS_IN = "".concat(NAMESPACE, "-in");
+  var CLASS_INVISIBLE = "".concat(NAMESPACE, "-invisible");
+  var CLASS_LOADING = "".concat(NAMESPACE, "-loading");
+  var CLASS_MOVE = "".concat(NAMESPACE, "-move");
+  var CLASS_OPEN = "".concat(NAMESPACE, "-open");
+  var CLASS_SHOW = "".concat(NAMESPACE, "-show");
+  var CLASS_TRANSITION = "".concat(NAMESPACE, "-transition"); // Native events
+
+  var EVENT_CLICK = 'click';
+  var EVENT_DBLCLICK = 'dblclick';
+  var EVENT_DRAG_START = 'dragstart';
+  var EVENT_FOCUSIN = 'focusin';
+  var EVENT_KEY_DOWN = 'keydown';
+  var EVENT_LOAD = 'load';
+  var EVENT_ERROR = 'error';
+  var EVENT_TOUCH_END = IS_TOUCH_DEVICE ? 'touchend touchcancel' : 'mouseup';
+  var EVENT_TOUCH_MOVE = IS_TOUCH_DEVICE ? 'touchmove' : 'mousemove';
+  var EVENT_TOUCH_START = IS_TOUCH_DEVICE ? 'touchstart' : 'mousedown';
+  var EVENT_POINTER_DOWN = HAS_POINTER_EVENT ? 'pointerdown' : EVENT_TOUCH_START;
+  var EVENT_POINTER_MOVE = HAS_POINTER_EVENT ? 'pointermove' : EVENT_TOUCH_MOVE;
+  var EVENT_POINTER_UP = HAS_POINTER_EVENT ? 'pointerup pointercancel' : EVENT_TOUCH_END;
+  var EVENT_RESIZE = 'resize';
+  var EVENT_TRANSITION_END = 'transitionend';
+  var EVENT_WHEEL = 'wheel'; // Custom events
+
+  var EVENT_READY = 'ready';
+  var EVENT_SHOW = 'show';
+  var EVENT_SHOWN = 'shown';
+  var EVENT_HIDE = 'hide';
+  var EVENT_HIDDEN = 'hidden';
+  var EVENT_VIEW = 'view';
+  var EVENT_VIEWED = 'viewed';
+  var EVENT_MOVE = 'move';
+  var EVENT_MOVED = 'moved';
+  var EVENT_ROTATE = 'rotate';
+  var EVENT_ROTATED = 'rotated';
+  var EVENT_SCALE = 'scale';
+  var EVENT_SCALED = 'scaled';
+  var EVENT_ZOOM = 'zoom';
+  var EVENT_ZOOMED = 'zoomed';
+  var EVENT_PLAY = 'play';
+  var EVENT_STOP = 'stop'; // Data keys
+
+  var DATA_ACTION = "".concat(NAMESPACE, "Action"); // RegExps
+
+  var REGEXP_SPACES = /\s\s*/; // Misc
+
+  var BUTTONS = ['zoom-in', 'zoom-out', 'one-to-one', 'reset', 'prev', 'play', 'next', 'rotate-left', 'rotate-right', 'flip-horizontal', 'flip-vertical'];
+
+  /**
+   * Check if the given value is a string.
+   * @param {*} value - The value to check.
+   * @returns {boolean} Returns `true` if the given value is a string, else `false`.
+   */
+
+  function isString(value) {
+    return typeof value === 'string';
+  }
+  /**
+   * Check if the given value is not a number.
+   */
+
+  var isNaN = Number.isNaN || WINDOW.isNaN;
+  /**
+   * Check if the given value is a number.
+   * @param {*} value - The value to check.
+   * @returns {boolean} Returns `true` if the given value is a number, else `false`.
+   */
+
+  function isNumber(value) {
+    return typeof value === 'number' && !isNaN(value);
+  }
+  /**
+   * Check if the given value is undefined.
+   * @param {*} value - The value to check.
+   * @returns {boolean} Returns `true` if the given value is undefined, else `false`.
+   */
+
+  function isUndefined(value) {
+    return typeof value === 'undefined';
+  }
+  /**
+   * Check if the given value is an object.
+   * @param {*} value - The value to check.
+   * @returns {boolean} Returns `true` if the given value is an object, else `false`.
+   */
+
+  function isObject(value) {
+    return _typeof(value) === 'object' && value !== null;
+  }
+  var hasOwnProperty = Object.prototype.hasOwnProperty;
+  /**
+   * Check if the given value is a plain object.
+   * @param {*} value - The value to check.
+   * @returns {boolean} Returns `true` if the given value is a plain object, else `false`.
+   */
+
+  function isPlainObject(value) {
+    if (!isObject(value)) {
+      return false;
+    }
+
+    try {
+      var _constructor = value.constructor;
+      var prototype = _constructor.prototype;
+      return _constructor && prototype && hasOwnProperty.call(prototype, 'isPrototypeOf');
+    } catch (error) {
+      return false;
+    }
+  }
+  /**
+   * Check if the given value is a function.
+   * @param {*} value - The value to check.
+   * @returns {boolean} Returns `true` if the given value is a function, else `false`.
+   */
+
+  function isFunction(value) {
+    return typeof value === 'function';
+  }
+  /**
+   * Iterate the given data.
+   * @param {*} data - The data to iterate.
+   * @param {Function} callback - The process function for each element.
+   * @returns {*} The original data.
+   */
+
+  function forEach(data, callback) {
+    if (data && isFunction(callback)) {
+      if (Array.isArray(data) || isNumber(data.length)
+      /* array-like */
+      ) {
+        var length = data.length;
+        var i;
+
+        for (i = 0; i < length; i += 1) {
+          if (callback.call(data, data[i], i, data) === false) {
+            break;
+          }
+        }
+      } else if (isObject(data)) {
+        Object.keys(data).forEach(function (key) {
+          callback.call(data, data[key], key, data);
+        });
+      }
+    }
+
+    return data;
+  }
+  /**
+   * Extend the given object.
+   * @param {*} obj - The object to be extended.
+   * @param {*} args - The rest objects which will be merged to the first object.
+   * @returns {Object} The extended object.
+   */
+
+  var assign = Object.assign || function assign(obj) {
+    for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
+      args[_key - 1] = arguments[_key];
+    }
+
+    if (isObject(obj) && args.length > 0) {
+      args.forEach(function (arg) {
+        if (isObject(arg)) {
+          Object.keys(arg).forEach(function (key) {
+            obj[key] = arg[key];
+          });
+        }
+      });
+    }
+
+    return obj;
+  };
+  var REGEXP_SUFFIX = /^(?:width|height|left|top|marginLeft|marginTop)$/;
+  /**
+   * Apply styles to the given element.
+   * @param {Element} element - The target element.
+   * @param {Object} styles - The styles for applying.
+   */
+
+  function setStyle(element, styles) {
+    var style = element.style;
+    forEach(styles, function (value, property) {
+      if (REGEXP_SUFFIX.test(property) && isNumber(value)) {
+        value += 'px';
+      }
+
+      style[property] = value;
+    });
+  }
+  /**
+   * Escape a string for using in HTML.
+   * @param {String} value - The string to escape.
+   * @returns {String} Returns the escaped string.
+   */
+
+  function escapeHTMLEntities(value) {
+    return isString(value) ? value.replace(/&(?!amp;|quot;|#39;|lt;|gt;)/g, '&amp;').replace(/"/g, '&quot;').replace(/'/g, '&#39;').replace(/</g, '&lt;').replace(/>/g, '&gt;') : value;
+  }
+  /**
+   * Check if the given element has a special class.
+   * @param {Element} element - The element to check.
+   * @param {string} value - The class to search.
+   * @returns {boolean} Returns `true` if the special class was found.
+   */
+
+  function hasClass(element, value) {
+    if (!element || !value) {
+      return false;
+    }
+
+    return element.classList ? element.classList.contains(value) : element.className.indexOf(value) > -1;
+  }
+  /**
+   * Add classes to the given element.
+   * @param {Element} element - The target element.
+   * @param {string} value - The classes to be added.
+   */
+
+  function addClass(element, value) {
+    if (!element || !value) {
+      return;
+    }
+
+    if (isNumber(element.length)) {
+      forEach(element, function (elem) {
+        addClass(elem, value);
+      });
+      return;
+    }
+
+    if (element.classList) {
+      element.classList.add(value);
+      return;
+    }
+
+    var className = element.className.trim();
+
+    if (!className) {
+      element.className = value;
+    } else if (className.indexOf(value) < 0) {
+      element.className = "".concat(className, " ").concat(value);
+    }
+  }
+  /**
+   * Remove classes from the given element.
+   * @param {Element} element - The target element.
+   * @param {string} value - The classes to be removed.
+   */
+
+  function removeClass(element, value) {
+    if (!element || !value) {
+      return;
+    }
+
+    if (isNumber(element.length)) {
+      forEach(element, function (elem) {
+        removeClass(elem, value);
+      });
+      return;
+    }
+
+    if (element.classList) {
+      element.classList.remove(value);
+      return;
+    }
+
+    if (element.className.indexOf(value) >= 0) {
+      element.className = element.className.replace(value, '');
+    }
+  }
+  /**
+   * Add or remove classes from the given element.
+   * @param {Element} element - The target element.
+   * @param {string} value - The classes to be toggled.
+   * @param {boolean} added - Add only.
+   */
+
+  function toggleClass(element, value, added) {
+    if (!value) {
+      return;
+    }
+
+    if (isNumber(element.length)) {
+      forEach(element, function (elem) {
+        toggleClass(elem, value, added);
+      });
+      return;
+    } // IE10-11 doesn't support the second parameter of `classList.toggle`
+
+
+    if (added) {
+      addClass(element, value);
+    } else {
+      removeClass(element, value);
+    }
+  }
+  var REGEXP_HYPHENATE = /([a-z\d])([A-Z])/g;
+  /**
+   * Transform the given string from camelCase to kebab-case
+   * @param {string} value - The value to transform.
+   * @returns {string} The transformed value.
+   */
+
+  function hyphenate(value) {
+    return value.replace(REGEXP_HYPHENATE, '$1-$2').toLowerCase();
+  }
+  /**
+   * Get data from the given element.
+   * @param {Element} element - The target element.
+   * @param {string} name - The data key to get.
+   * @returns {string} The data value.
+   */
+
+  function getData(element, name) {
+    if (isObject(element[name])) {
+      return element[name];
+    }
+
+    if (element.dataset) {
+      return element.dataset[name];
+    }
+
+    return element.getAttribute("data-".concat(hyphenate(name)));
+  }
+  /**
+   * Set data to the given element.
+   * @param {Element} element - The target element.
+   * @param {string} name - The data key to set.
+   * @param {string} data - The data value.
+   */
+
+  function setData(element, name, data) {
+    if (isObject(data)) {
+      element[name] = data;
+    } else if (element.dataset) {
+      element.dataset[name] = data;
+    } else {
+      element.setAttribute("data-".concat(hyphenate(name)), data);
+    }
+  }
+
+  var onceSupported = function () {
+    var supported = false;
+
+    if (IS_BROWSER) {
+      var once = false;
+
+      var listener = function listener() {};
+
+      var options = Object.defineProperty({}, 'once', {
+        get: function get() {
+          supported = true;
+          return once;
+        },
+
+        /**
+         * This setter can fix a `TypeError` in strict mode
+         * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Getter_only}
+         * @param {boolean} value - The value to set
+         */
+        set: function set(value) {
+          once = value;
+        }
+      });
+      WINDOW.addEventListener('test', listener, options);
+      WINDOW.removeEventListener('test', listener, options);
+    }
+
+    return supported;
+  }();
+  /**
+   * Remove event listener from the target element.
+   * @param {Element} element - The event target.
+   * @param {string} type - The event type(s).
+   * @param {Function} listener - The event listener.
+   * @param {Object} options - The event options.
+   */
+
+
+  function removeListener(element, type, listener) {
+    var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
+    var handler = listener;
+    type.trim().split(REGEXP_SPACES).forEach(function (event) {
+      if (!onceSupported) {
+        var listeners = element.listeners;
+
+        if (listeners && listeners[event] && listeners[event][listener]) {
+          handler = listeners[event][listener];
+          delete listeners[event][listener];
+
+          if (Object.keys(listeners[event]).length === 0) {
+            delete listeners[event];
+          }
+
+          if (Object.keys(listeners).length === 0) {
+            delete element.listeners;
+          }
+        }
+      }
+
+      element.removeEventListener(event, handler, options);
+    });
+  }
+  /**
+   * Add event listener to the target element.
+   * @param {Element} element - The event target.
+   * @param {string} type - The event type(s).
+   * @param {Function} listener - The event listener.
+   * @param {Object} options - The event options.
+   */
+
+  function addListener(element, type, listener) {
+    var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
+    var _handler = listener;
+    type.trim().split(REGEXP_SPACES).forEach(function (event) {
+      if (options.once && !onceSupported) {
+        var _element$listeners = element.listeners,
+            listeners = _element$listeners === void 0 ? {} : _element$listeners;
+
+        _handler = function handler() {
+          delete listeners[event][listener];
+          element.removeEventListener(event, _handler, options);
+
+          for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
+            args[_key2] = arguments[_key2];
+          }
+
+          listener.apply(element, args);
+        };
+
+        if (!listeners[event]) {
+          listeners[event] = {};
+        }
+
+        if (listeners[event][listener]) {
+          element.removeEventListener(event, listeners[event][listener], options);
+        }
+
+        listeners[event][listener] = _handler;
+        element.listeners = listeners;
+      }
+
+      element.addEventListener(event, _handler, options);
+    });
+  }
+  /**
+   * Dispatch event on the target element.
+   * @param {Element} element - The event target.
+   * @param {string} type - The event type(s).
+   * @param {Object} data - The additional event data.
+   * @param {Object} options - The additional event options.
+   * @returns {boolean} Indicate if the event is default prevented or not.
+   */
+
+  function dispatchEvent(element, type, data, options) {
+    var event; // Event and CustomEvent on IE9-11 are global objects, not constructors
+
+    if (isFunction(Event) && isFunction(CustomEvent)) {
+      event = new CustomEvent(type, _objectSpread2({
+        bubbles: true,
+        cancelable: true,
+        detail: data
+      }, options));
+    } else {
+      event = document.createEvent('CustomEvent');
+      event.initCustomEvent(type, true, true, data);
+    }
+
+    return element.dispatchEvent(event);
+  }
+  /**
+   * Get the offset base on the document.
+   * @param {Element} element - The target element.
+   * @returns {Object} The offset data.
+   */
+
+  function getOffset(element) {
+    var box = element.getBoundingClientRect();
+    return {
+      left: box.left + (window.pageXOffset - document.documentElement.clientLeft),
+      top: box.top + (window.pageYOffset - document.documentElement.clientTop)
+    };
+  }
+  /**
+   * Get transforms base on the given object.
+   * @param {Object} obj - The target object.
+   * @returns {string} A string contains transform values.
+   */
+
+  function getTransforms(_ref) {
+    var rotate = _ref.rotate,
+        scaleX = _ref.scaleX,
+        scaleY = _ref.scaleY,
+        translateX = _ref.translateX,
+        translateY = _ref.translateY;
+    var values = [];
+
+    if (isNumber(translateX) && translateX !== 0) {
+      values.push("translateX(".concat(translateX, "px)"));
+    }
+
+    if (isNumber(translateY) && translateY !== 0) {
+      values.push("translateY(".concat(translateY, "px)"));
+    } // Rotate should come first before scale to match orientation transform
+
+
+    if (isNumber(rotate) && rotate !== 0) {
+      values.push("rotate(".concat(rotate, "deg)"));
+    }
+
+    if (isNumber(scaleX) && scaleX !== 1) {
+      values.push("scaleX(".concat(scaleX, ")"));
+    }
+
+    if (isNumber(scaleY) && scaleY !== 1) {
+      values.push("scaleY(".concat(scaleY, ")"));
+    }
+
+    var transform = values.length ? values.join(' ') : 'none';
+    return {
+      WebkitTransform: transform,
+      msTransform: transform,
+      transform: transform
+    };
+  }
+  /**
+   * Get an image name from an image url.
+   * @param {string} url - The target url.
+   * @example
+   * // picture.jpg
+   * getImageNameFromURL('https://domain.com/path/to/picture.jpg?size=1280×960')
+   * @returns {string} A string contains the image name.
+   */
+
+  function getImageNameFromURL(url) {
+    return isString(url) ? decodeURIComponent(url.replace(/^.*\//, '').replace(/[?&#].*$/, '')) : '';
+  }
+  var IS_SAFARI = WINDOW.navigator && /(Macintosh|iPhone|iPod|iPad).*AppleWebKit/i.test(WINDOW.navigator.userAgent);
+  /**
+   * Get an image's natural sizes.
+   * @param {string} image - The target image.
+   * @param {Object} options - The viewer options.
+   * @param {Function} callback - The callback function.
+   * @returns {HTMLImageElement} The new image.
+   */
+
+  function getImageNaturalSizes(image, options, callback) {
+    var newImage = document.createElement('img'); // Modern browsers (except Safari)
+
+    if (image.naturalWidth && !IS_SAFARI) {
+      callback(image.naturalWidth, image.naturalHeight);
+      return newImage;
+    }
+
+    var body = document.body || document.documentElement;
+
+    newImage.onload = function () {
+      callback(newImage.width, newImage.height);
+
+      if (!IS_SAFARI) {
+        body.removeChild(newImage);
+      }
+    };
+
+    forEach(options.inheritedAttributes, function (name) {
+      var value = image.getAttribute(name);
+
+      if (value !== null) {
+        newImage.setAttribute(name, value);
+      }
+    });
+    newImage.src = image.src; // iOS Safari will convert the image automatically
+    // with its orientation once append it into DOM
+
+    if (!IS_SAFARI) {
+      newImage.style.cssText = 'left:0;' + 'max-height:none!important;' + 'max-width:none!important;' + 'min-height:0!important;' + 'min-width:0!important;' + 'opacity:0;' + 'position:absolute;' + 'top:0;' + 'z-index:-1;';
+      body.appendChild(newImage);
+    }
+
+    return newImage;
+  }
+  /**
+   * Get the related class name of a responsive type number.
+   * @param {string} type - The responsive type.
+   * @returns {string} The related class name.
+   */
+
+  function getResponsiveClass(type) {
+    switch (type) {
+      case 2:
+        return CLASS_HIDE_XS_DOWN;
+
+      case 3:
+        return CLASS_HIDE_SM_DOWN;
+
+      case 4:
+        return CLASS_HIDE_MD_DOWN;
+
+      default:
+        return '';
+    }
+  }
+  /**
+   * Get the max ratio of a group of pointers.
+   * @param {string} pointers - The target pointers.
+   * @returns {number} The result ratio.
+   */
+
+  function getMaxZoomRatio(pointers) {
+    var pointers2 = _objectSpread2({}, pointers);
+
+    var ratios = [];
+    forEach(pointers, function (pointer, pointerId) {
+      delete pointers2[pointerId];
+      forEach(pointers2, function (pointer2) {
+        var x1 = Math.abs(pointer.startX - pointer2.startX);
+        var y1 = Math.abs(pointer.startY - pointer2.startY);
+        var x2 = Math.abs(pointer.endX - pointer2.endX);
+        var y2 = Math.abs(pointer.endY - pointer2.endY);
+        var z1 = Math.sqrt(x1 * x1 + y1 * y1);
+        var z2 = Math.sqrt(x2 * x2 + y2 * y2);
+        var ratio = (z2 - z1) / z1;
+        ratios.push(ratio);
+      });
+    });
+    ratios.sort(function (a, b) {
+      return Math.abs(a) < Math.abs(b);
+    });
+    return ratios[0];
+  }
+  /**
+   * Get a pointer from an event object.
+   * @param {Object} event - The target event object.
+   * @param {boolean} endOnly - Indicates if only returns the end point coordinate or not.
+   * @returns {Object} The result pointer contains start and/or end point coordinates.
+   */
+
+  function getPointer(_ref2, endOnly) {
+    var pageX = _ref2.pageX,
+        pageY = _ref2.pageY;
+    var end = {
+      endX: pageX,
+      endY: pageY
+    };
+    return endOnly ? end : _objectSpread2({
+      timeStamp: Date.now(),
+      startX: pageX,
+      startY: pageY
+    }, end);
+  }
+  /**
+   * Get the center point coordinate of a group of pointers.
+   * @param {Object} pointers - The target pointers.
+   * @returns {Object} The center point coordinate.
+   */
+
+  function getPointersCenter(pointers) {
+    var pageX = 0;
+    var pageY = 0;
+    var count = 0;
+    forEach(pointers, function (_ref3) {
+      var startX = _ref3.startX,
+          startY = _ref3.startY;
+      pageX += startX;
+      pageY += startY;
+      count += 1;
+    });
+    pageX /= count;
+    pageY /= count;
+    return {
+      pageX: pageX,
+      pageY: pageY
+    };
+  }
+
+  var render = {
+    render: function render() {
+      this.initContainer();
+      this.initViewer();
+      this.initList();
+      this.renderViewer();
+    },
+    initBody: function initBody() {
+      var ownerDocument = this.element.ownerDocument;
+      var body = ownerDocument.body || ownerDocument.documentElement;
+      this.body = body;
+      this.scrollbarWidth = window.innerWidth - ownerDocument.documentElement.clientWidth;
+      this.initialBodyPaddingRight = body.style.paddingRight;
+      this.initialBodyComputedPaddingRight = window.getComputedStyle(body).paddingRight;
+    },
+    initContainer: function initContainer() {
+      this.containerData = {
+        width: window.innerWidth,
+        height: window.innerHeight
+      };
+    },
+    initViewer: function initViewer() {
+      var options = this.options,
+          parent = this.parent;
+      var viewerData;
+
+      if (options.inline) {
+        viewerData = {
+          width: Math.max(parent.offsetWidth, options.minWidth),
+          height: Math.max(parent.offsetHeight, options.minHeight)
+        };
+        this.parentData = viewerData;
+      }
+
+      if (this.fulled || !viewerData) {
+        viewerData = this.containerData;
+      }
+
+      this.viewerData = assign({}, viewerData);
+    },
+    renderViewer: function renderViewer() {
+      if (this.options.inline && !this.fulled) {
+        setStyle(this.viewer, this.viewerData);
+      }
+    },
+    initList: function initList() {
+      var _this = this;
+
+      var element = this.element,
+          options = this.options,
+          list = this.list;
+      var items = []; // initList may be called in this.update, so should keep idempotent
+
+      list.innerHTML = '';
+      forEach(this.images, function (image, index) {
+        var src = image.src;
+        var alt = image.alt || getImageNameFromURL(src);
+
+        var url = _this.getImageURL(image);
+
+        if (src || url) {
+          var item = document.createElement('li');
+          var img = document.createElement('img');
+          forEach(options.inheritedAttributes, function (name) {
+            var value = image.getAttribute(name);
+
+            if (value !== null) {
+              img.setAttribute(name, value);
+            }
+          });
+          img.src = src || url;
+          img.alt = alt;
+          img.setAttribute('data-original-url', url || src);
+          item.setAttribute('data-index', index);
+          item.setAttribute('data-viewer-action', 'view');
+          item.setAttribute('role', 'button');
+
+          if (options.keyboard) {
+            item.setAttribute('tabindex', 0);
+          }
+
+          item.appendChild(img);
+          list.appendChild(item);
+          items.push(item);
+        }
+      });
+      this.items = items;
+      forEach(items, function (item) {
+        var image = item.firstElementChild;
+        var onLoad;
+        var onError;
+        setData(image, 'filled', true);
+
+        if (options.loading) {
+          addClass(item, CLASS_LOADING);
+        }
+
+        addListener(image, EVENT_LOAD, onLoad = function onLoad(event) {
+          removeListener(image, EVENT_ERROR, onError);
+
+          if (options.loading) {
+            removeClass(item, CLASS_LOADING);
+          }
+
+          _this.loadImage(event);
+        }, {
+          once: true
+        });
+        addListener(image, EVENT_ERROR, onError = function onError() {
+          removeListener(image, EVENT_LOAD, onLoad);
+
+          if (options.loading) {
+            removeClass(item, CLASS_LOADING);
+          }
+        }, {
+          once: true
+        });
+      });
+
+      if (options.transition) {
+        addListener(element, EVENT_VIEWED, function () {
+          addClass(list, CLASS_TRANSITION);
+        }, {
+          once: true
+        });
+      }
+    },
+    renderList: function renderList() {
+      var index = this.index;
+      var item = this.items[index];
+
+      if (!item) {
+        return;
+      }
+
+      var next = item.nextElementSibling;
+      var gutter = parseInt(window.getComputedStyle(next || item).marginLeft, 10);
+      var offsetWidth = item.offsetWidth;
+      var outerWidth = offsetWidth + gutter; // Place the active item in the center of the screen
+
+      setStyle(this.list, assign({
+        width: outerWidth * this.length - gutter
+      }, getTransforms({
+        translateX: (this.viewerData.width - offsetWidth) / 2 - outerWidth * index
+      })));
+    },
+    resetList: function resetList() {
+      var list = this.list;
+      list.innerHTML = '';
+      removeClass(list, CLASS_TRANSITION);
+      setStyle(list, getTransforms({
+        translateX: 0
+      }));
+    },
+    initImage: function initImage(done) {
+      var _this2 = this;
+
+      var options = this.options,
+          image = this.image,
+          viewerData = this.viewerData;
+      var footerHeight = this.footer.offsetHeight;
+      var viewerWidth = viewerData.width;
+      var viewerHeight = Math.max(viewerData.height - footerHeight, footerHeight);
+      var oldImageData = this.imageData || {};
+      var sizingImage;
+      this.imageInitializing = {
+        abort: function abort() {
+          sizingImage.onload = null;
+        }
+      };
+      sizingImage = getImageNaturalSizes(image, options, function (naturalWidth, naturalHeight) {
+        var aspectRatio = naturalWidth / naturalHeight;
+        var width = viewerWidth;
+        var height = viewerHeight;
+        _this2.imageInitializing = false;
+
+        if (viewerHeight * aspectRatio > viewerWidth) {
+          height = viewerWidth / aspectRatio;
+        } else {
+          width = viewerHeight * aspectRatio;
+        }
+
+        width = Math.min(width * 0.9, naturalWidth);
+        height = Math.min(height * 0.9, naturalHeight);
+        var left = (viewerWidth - width) / 2;
+        var top = (viewerHeight - height) / 2;
+        var imageData = {
+          left: left,
+          top: top,
+          x: left,
+          y: top,
+          width: width,
+          height: height,
+          oldRatio: 1,
+          ratio: width / naturalWidth,
+          aspectRatio: aspectRatio,
+          naturalWidth: naturalWidth,
+          naturalHeight: naturalHeight
+        };
+        var initialImageData = assign({}, imageData);
+
+        if (options.rotatable) {
+          imageData.rotate = oldImageData.rotate || 0;
+          initialImageData.rotate = 0;
+        }
+
+        if (options.scalable) {
+          imageData.scaleX = oldImageData.scaleX || 1;
+          imageData.scaleY = oldImageData.scaleY || 1;
+          initialImageData.scaleX = 1;
+          initialImageData.scaleY = 1;
+        }
+
+        _this2.imageData = imageData;
+        _this2.initialImageData = initialImageData;
+
+        if (done) {
+          done();
+        }
+      });
+    },
+    renderImage: function renderImage(done) {
+      var _this3 = this;
+
+      var image = this.image,
+          imageData = this.imageData;
+      setStyle(image, assign({
+        width: imageData.width,
+        height: imageData.height,
+        // XXX: Not to use translateX/Y to avoid image shaking when zooming
+        marginLeft: imageData.x,
+        marginTop: imageData.y
+      }, getTransforms(imageData)));
+
+      if (done) {
+        if ((this.viewing || this.moving || this.rotating || this.scaling || this.zooming) && this.options.transition && hasClass(image, CLASS_TRANSITION)) {
+          var onTransitionEnd = function onTransitionEnd() {
+            _this3.imageRendering = false;
+            done();
+          };
+
+          this.imageRendering = {
+            abort: function abort() {
+              removeListener(image, EVENT_TRANSITION_END, onTransitionEnd);
+            }
+          };
+          addListener(image, EVENT_TRANSITION_END, onTransitionEnd, {
+            once: true
+          });
+        } else {
+          done();
+        }
+      }
+    },
+    resetImage: function resetImage() {
+      // this.image only defined after viewed
+      if (this.viewing || this.viewed) {
+        var image = this.image;
+
+        if (this.viewing) {
+          this.viewing.abort();
+        }
+
+        image.parentNode.removeChild(image);
+        this.image = null;
+      }
+    }
+  };
+
+  var events = {
+    bind: function bind() {
+      var options = this.options,
+          viewer = this.viewer,
+          canvas = this.canvas;
+      var document = this.element.ownerDocument;
+      addListener(viewer, EVENT_CLICK, this.onClick = this.click.bind(this));
+      addListener(viewer, EVENT_DRAG_START, this.onDragStart = this.dragstart.bind(this));
+      addListener(canvas, EVENT_POINTER_DOWN, this.onPointerDown = this.pointerdown.bind(this));
+      addListener(document, EVENT_POINTER_MOVE, this.onPointerMove = this.pointermove.bind(this));
+      addListener(document, EVENT_POINTER_UP, this.onPointerUp = this.pointerup.bind(this));
+      addListener(document, EVENT_KEY_DOWN, this.onKeyDown = this.keydown.bind(this));
+      addListener(window, EVENT_RESIZE, this.onResize = this.resize.bind(this));
+
+      if (options.zoomable && options.zoomOnWheel) {
+        addListener(viewer, EVENT_WHEEL, this.onWheel = this.wheel.bind(this), {
+          passive: false,
+          capture: true
+        });
+      }
+
+      if (options.toggleOnDblclick) {
+        addListener(canvas, EVENT_DBLCLICK, this.onDblclick = this.dblclick.bind(this));
+      }
+    },
+    unbind: function unbind() {
+      var options = this.options,
+          viewer = this.viewer,
+          canvas = this.canvas;
+      var document = this.element.ownerDocument;
+      removeListener(viewer, EVENT_CLICK, this.onClick);
+      removeListener(viewer, EVENT_DRAG_START, this.onDragStart);
+      removeListener(canvas, EVENT_POINTER_DOWN, this.onPointerDown);
+      removeListener(document, EVENT_POINTER_MOVE, this.onPointerMove);
+      removeListener(document, EVENT_POINTER_UP, this.onPointerUp);
+      removeListener(document, EVENT_KEY_DOWN, this.onKeyDown);
+      removeListener(window, EVENT_RESIZE, this.onResize);
+
+      if (options.zoomable && options.zoomOnWheel) {
+        removeListener(viewer, EVENT_WHEEL, this.onWheel, {
+          passive: false,
+          capture: true
+        });
+      }
+
+      if (options.toggleOnDblclick) {
+        removeListener(canvas, EVENT_DBLCLICK, this.onDblclick);
+      }
+    }
+  };
+
+  var handlers = {
+    click: function click(event) {
+      var options = this.options,
+          imageData = this.imageData;
+      var target = event.target;
+      var action = getData(target, DATA_ACTION);
+
+      if (!action && target.localName === 'img' && target.parentElement.localName === 'li') {
+        target = target.parentElement;
+        action = getData(target, DATA_ACTION);
+      } // Cancel the emulated click when the native click event was triggered.
+
+
+      if (IS_TOUCH_DEVICE && event.isTrusted && target === this.canvas) {
+        clearTimeout(this.clickCanvasTimeout);
+      }
+
+      switch (action) {
+        case 'mix':
+          if (this.played) {
+            this.stop();
+          } else if (options.inline) {
+            if (this.fulled) {
+              this.exit();
+            } else {
+              this.full();
+            }
+          } else {
+            this.hide();
+          }
+
+          break;
+
+        case 'hide':
+          this.hide();
+          break;
+
+        case 'view':
+          this.view(getData(target, 'index'));
+          break;
+
+        case 'zoom-in':
+          this.zoom(0.1, true);
+          break;
+
+        case 'zoom-out':
+          this.zoom(-0.1, true);
+          break;
+
+        case 'one-to-one':
+          this.toggle();
+          break;
+
+        case 'reset':
+          this.reset();
+          break;
+
+        case 'prev':
+          this.prev(options.loop);
+          break;
+
+        case 'play':
+          this.play(options.fullscreen);
+          break;
+
+        case 'next':
+          this.next(options.loop);
+          break;
+
+        case 'rotate-left':
+          this.rotate(-90);
+          break;
+
+        case 'rotate-right':
+          this.rotate(90);
+          break;
+
+        case 'flip-horizontal':
+          this.scaleX(-imageData.scaleX || -1);
+          break;
+
+        case 'flip-vertical':
+          this.scaleY(-imageData.scaleY || -1);
+          break;
+
+        default:
+          if (this.played) {
+            this.stop();
+          }
+
+      }
+    },
+    dblclick: function dblclick(event) {
+      event.preventDefault();
+
+      if (this.viewed && event.target === this.image) {
+        // Cancel the emulated double click when the native dblclick event was triggered.
+        if (IS_TOUCH_DEVICE && event.isTrusted) {
+          clearTimeout(this.doubleClickImageTimeout);
+        } // XXX: No pageX/Y properties in custom event, fallback to the original event.
+
+
+        this.toggle(event.isTrusted ? event : event.detail && event.detail.originalEvent);
+      }
+    },
+    load: function load() {
+      var _this = this;
+
+      if (this.timeout) {
+        clearTimeout(this.timeout);
+        this.timeout = false;
+      }
+
+      var element = this.element,
+          options = this.options,
+          image = this.image,
+          index = this.index,
+          viewerData = this.viewerData;
+      removeClass(image, CLASS_INVISIBLE);
+
+      if (options.loading) {
+        removeClass(this.canvas, CLASS_LOADING);
+      }
+
+      image.style.cssText = 'height:0;' + "margin-left:".concat(viewerData.width / 2, "px;") + "margin-top:".concat(viewerData.height / 2, "px;") + 'max-width:none!important;' + 'position:relative;' + 'width:0;';
+      this.initImage(function () {
+        toggleClass(image, CLASS_MOVE, options.movable);
+        toggleClass(image, CLASS_TRANSITION, options.transition);
+
+        _this.renderImage(function () {
+          _this.viewed = true;
+          _this.viewing = false;
+
+          if (isFunction(options.viewed)) {
+            addListener(element, EVENT_VIEWED, options.viewed, {
+              once: true
+            });
+          }
+
+          dispatchEvent(element, EVENT_VIEWED, {
+            originalImage: _this.images[index],
+            index: index,
+            image: image
+          }, {
+            cancelable: false
+          });
+        });
+      });
+    },
+    loadImage: function loadImage(event) {
+      var image = event.target;
+      var parent = image.parentNode;
+      var parentWidth = parent.offsetWidth || 30;
+      var parentHeight = parent.offsetHeight || 50;
+      var filled = !!getData(image, 'filled');
+      getImageNaturalSizes(image, this.options, function (naturalWidth, naturalHeight) {
+        var aspectRatio = naturalWidth / naturalHeight;
+        var width = parentWidth;
+        var height = parentHeight;
+
+        if (parentHeight * aspectRatio > parentWidth) {
+          if (filled) {
+            width = parentHeight * aspectRatio;
+          } else {
+            height = parentWidth / aspectRatio;
+          }
+        } else if (filled) {
+          height = parentWidth / aspectRatio;
+        } else {
+          width = parentHeight * aspectRatio;
+        }
+
+        setStyle(image, assign({
+          width: width,
+          height: height
+        }, getTransforms({
+          translateX: (parentWidth - width) / 2,
+          translateY: (parentHeight - height) / 2
+        })));
+      });
+    },
+    keydown: function keydown(event) {
+      var options = this.options;
+
+      if (!options.keyboard) {
+        return;
+      }
+
+      var keyCode = event.keyCode || event.which || event.charCode;
+
+      switch (keyCode) {
+        // Enter
+        case 13:
+          if (this.viewer.contains(event.target)) {
+            this.click(event);
+          }
+
+          break;
+      }
+
+      if (!this.fulled) {
+        return;
+      }
+
+      switch (keyCode) {
+        // Escape
+        case 27:
+          if (this.played) {
+            this.stop();
+          } else if (options.inline) {
+            if (this.fulled) {
+              this.exit();
+            }
+          } else {
+            this.hide();
+          }
+
+          break;
+        // Space
+
+        case 32:
+          if (this.played) {
+            this.stop();
+          }
+
+          break;
+        // ArrowLeft
+
+        case 37:
+          this.prev(options.loop);
+          break;
+        // ArrowUp
+
+        case 38:
+          // Prevent scroll on Firefox
+          event.preventDefault(); // Zoom in
+
+          this.zoom(options.zoomRatio, true);
+          break;
+        // ArrowRight
+
+        case 39:
+          this.next(options.loop);
+          break;
+        // ArrowDown
+
+        case 40:
+          // Prevent scroll on Firefox
+          event.preventDefault(); // Zoom out
+
+          this.zoom(-options.zoomRatio, true);
+          break;
+        // Ctrl + 0
+
+        case 48: // Fall through
+        // Ctrl + 1
+        // eslint-disable-next-line no-fallthrough
+
+        case 49:
+          if (event.ctrlKey) {
+            event.preventDefault();
+            this.toggle();
+          }
+
+          break;
+      }
+    },
+    dragstart: function dragstart(event) {
+      if (event.target.localName === 'img') {
+        event.preventDefault();
+      }
+    },
+    pointerdown: function pointerdown(event) {
+      var options = this.options,
+          pointers = this.pointers;
+      var buttons = event.buttons,
+          button = event.button;
+
+      if (!this.viewed || this.showing || this.viewing || this.hiding // Handle mouse event and pointer event and ignore touch event
+      || (event.type === 'mousedown' || event.type === 'pointerdown' && event.pointerType === 'mouse') && ( // No primary button (Usually the left button)
+      isNumber(buttons) && buttons !== 1 || isNumber(button) && button !== 0 // Open context menu
+      || event.ctrlKey)) {
+        return;
+      } // Prevent default behaviours as page zooming in touch devices.
+
+
+      event.preventDefault();
+
+      if (event.changedTouches) {
+        forEach(event.changedTouches, function (touch) {
+          pointers[touch.identifier] = getPointer(touch);
+        });
+      } else {
+        pointers[event.pointerId || 0] = getPointer(event);
+      }
+
+      var action = options.movable ? ACTION_MOVE : false;
+
+      if (options.zoomOnTouch && options.zoomable && Object.keys(pointers).length > 1) {
+        action = ACTION_ZOOM;
+      } else if (options.slideOnTouch && (event.pointerType === 'touch' || event.type === 'touchstart') && this.isSwitchable()) {
+        action = ACTION_SWITCH;
+      }
+
+      if (options.transition && (action === ACTION_MOVE || action === ACTION_ZOOM)) {
+        removeClass(this.image, CLASS_TRANSITION);
+      }
+
+      this.action = action;
+    },
+    pointermove: function pointermove(event) {
+      var pointers = this.pointers,
+          action = this.action;
+
+      if (!this.viewed || !action) {
+        return;
+      }
+
+      event.preventDefault();
+
+      if (event.changedTouches) {
+        forEach(event.changedTouches, function (touch) {
+          assign(pointers[touch.identifier] || {}, getPointer(touch, true));
+        });
+      } else {
+        assign(pointers[event.pointerId || 0] || {}, getPointer(event, true));
+      }
+
+      this.change(event);
+    },
+    pointerup: function pointerup(event) {
+      var _this2 = this;
+
+      var options = this.options,
+          action = this.action,
+          pointers = this.pointers;
+      var pointer;
+
+      if (event.changedTouches) {
+        forEach(event.changedTouches, function (touch) {
+          pointer = pointers[touch.identifier];
+          delete pointers[touch.identifier];
+        });
+      } else {
+        pointer = pointers[event.pointerId || 0];
+        delete pointers[event.pointerId || 0];
+      }
+
+      if (!action) {
+        return;
+      }
+
+      event.preventDefault();
+
+      if (options.transition && (action === ACTION_MOVE || action === ACTION_ZOOM)) {
+        addClass(this.image, CLASS_TRANSITION);
+      }
+
+      this.action = false; // Emulate click and double click in touch devices to support backdrop and image zooming (#210).
+
+      if (IS_TOUCH_DEVICE && action !== ACTION_ZOOM && pointer && Date.now() - pointer.timeStamp < 500) {
+        clearTimeout(this.clickCanvasTimeout);
+        clearTimeout(this.doubleClickImageTimeout);
+
+        if (options.toggleOnDblclick && this.viewed && event.target === this.image) {
+          if (this.imageClicked) {
+            this.imageClicked = false; // This timeout will be cleared later when a native dblclick event is triggering
+
+            this.doubleClickImageTimeout = setTimeout(function () {
+              dispatchEvent(_this2.image, EVENT_DBLCLICK, {
+                originalEvent: event
+              });
+            }, 50);
+          } else {
+            this.imageClicked = true; // The default timing of a double click in Windows is 500 ms
+
+            this.doubleClickImageTimeout = setTimeout(function () {
+              _this2.imageClicked = false;
+            }, 500);
+          }
+        } else {
+          this.imageClicked = false;
+
+          if (options.backdrop && options.backdrop !== 'static' && event.target === this.canvas) {
+            // This timeout will be cleared later when a native click event is triggering
+            this.clickCanvasTimeout = setTimeout(function () {
+              dispatchEvent(_this2.canvas, EVENT_CLICK, {
+                originalEvent: event
+              });
+            }, 50);
+          }
+        }
+      }
+    },
+    resize: function resize() {
+      var _this3 = this;
+
+      if (!this.isShown || this.hiding) {
+        return;
+      }
+
+      if (this.fulled) {
+        this.close();
+        this.initBody();
+        this.open();
+      }
+
+      this.initContainer();
+      this.initViewer();
+      this.renderViewer();
+      this.renderList();
+
+      if (this.viewed) {
+        this.initImage(function () {
+          _this3.renderImage();
+        });
+      }
+
+      if (this.played) {
+        if (this.options.fullscreen && this.fulled && !(document.fullscreenElement || document.webkitFullscreenElement || document.mozFullScreenElement || document.msFullscreenElement)) {
+          this.stop();
+          return;
+        }
+
+        forEach(this.player.getElementsByTagName('img'), function (image) {
+          addListener(image, EVENT_LOAD, _this3.loadImage.bind(_this3), {
+            once: true
+          });
+          dispatchEvent(image, EVENT_LOAD);
+        });
+      }
+    },
+    wheel: function wheel(event) {
+      var _this4 = this;
+
+      if (!this.viewed) {
+        return;
+      }
+
+      event.preventDefault(); // Limit wheel speed to prevent zoom too fast
+
+      if (this.wheeling) {
+        return;
+      }
+
+      this.wheeling = true;
+      setTimeout(function () {
+        _this4.wheeling = false;
+      }, 50);
+      var ratio = Number(this.options.zoomRatio) || 0.1;
+      var delta = 1;
+
+      if (event.deltaY) {
+        delta = event.deltaY > 0 ? 1 : -1;
+      } else if (event.wheelDelta) {
+        delta = -event.wheelDelta / 120;
+      } else if (event.detail) {
+        delta = event.detail > 0 ? 1 : -1;
+      }
+
+      this.zoom(-delta * ratio, true, event);
+    }
+  };
+
+  var methods = {
+    /** Show the viewer (only available in modal mode)
+     * @param {boolean} [immediate=false] - Indicates if show the viewer immediately or not.
+     * @returns {Viewer} this
+     */
+    show: function show() {
+      var immediate = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
+      var element = this.element,
+          options = this.options;
+
+      if (options.inline || this.showing || this.isShown || this.showing) {
+        return this;
+      }
+
+      if (!this.ready) {
+        this.build();
+
+        if (this.ready) {
+          this.show(immediate);
+        }
+
+        return this;
+      }
+
+      if (isFunction(options.show)) {
+        addListener(element, EVENT_SHOW, options.show, {
+          once: true
+        });
+      }
+
+      if (dispatchEvent(element, EVENT_SHOW) === false || !this.ready) {
+        return this;
+      }
+
+      if (this.hiding) {
+        this.transitioning.abort();
+      }
+
+      this.showing = true;
+      this.open();
+      var viewer = this.viewer;
+      removeClass(viewer, CLASS_HIDE);
+      viewer.setAttribute('role', 'dialog');
+      viewer.setAttribute('aria-labelledby', this.title.id);
+      viewer.setAttribute('aria-modal', true);
+      viewer.removeAttribute('aria-hidden');
+
+      if (options.transition && !immediate) {
+        var shown = this.shown.bind(this);
+        this.transitioning = {
+          abort: function abort() {
+            removeListener(viewer, EVENT_TRANSITION_END, shown);
+            removeClass(viewer, CLASS_IN);
+          }
+        };
+        addClass(viewer, CLASS_TRANSITION); // Force reflow to enable CSS3 transition
+
+        viewer.initialOffsetWidth = viewer.offsetWidth;
+        addListener(viewer, EVENT_TRANSITION_END, shown, {
+          once: true
+        });
+        addClass(viewer, CLASS_IN);
+      } else {
+        addClass(viewer, CLASS_IN);
+        this.shown();
+      }
+
+      return this;
+    },
+
+    /**
+     * Hide the viewer (only available in modal mode)
+     * @param {boolean} [immediate=false] - Indicates if hide the viewer immediately or not.
+     * @returns {Viewer} this
+     */
+    hide: function hide() {
+      var _this = this;
+
+      var immediate = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
+      var element = this.element,
+          options = this.options;
+
+      if (options.inline || this.hiding || !(this.isShown || this.showing)) {
+        return this;
+      }
+
+      if (isFunction(options.hide)) {
+        addListener(element, EVENT_HIDE, options.hide, {
+          once: true
+        });
+      }
+
+      if (dispatchEvent(element, EVENT_HIDE) === false) {
+        return this;
+      }
+
+      if (this.showing) {
+        this.transitioning.abort();
+      }
+
+      this.hiding = true;
+
+      if (this.played) {
+        this.stop();
+      } else if (this.viewing) {
+        this.viewing.abort();
+      }
+
+      var viewer = this.viewer,
+          image = this.image;
+
+      var hideImmediately = function hideImmediately() {
+        removeClass(viewer, CLASS_IN);
+
+        _this.hidden();
+      };
+
+      if (options.transition && !immediate) {
+        var onViewerTransitionEnd = function onViewerTransitionEnd(event) {
+          // Ignore all propagating `transitionend` events (#275).
+          if (event && event.target === viewer) {
+            removeListener(viewer, EVENT_TRANSITION_END, onViewerTransitionEnd);
+
+            _this.hidden();
+          }
+        };
+
+        var onImageTransitionEnd = function onImageTransitionEnd() {
+          // In case of show the viewer by `viewer.show(true)` previously (#407).
+          if (hasClass(viewer, CLASS_TRANSITION)) {
+            addListener(viewer, EVENT_TRANSITION_END, onViewerTransitionEnd);
+            removeClass(viewer, CLASS_IN);
+          } else {
+            hideImmediately();
+          }
+        };
+
+        this.transitioning = {
+          abort: function abort() {
+            if (_this.viewed && hasClass(image, CLASS_TRANSITION)) {
+              removeListener(image, EVENT_TRANSITION_END, onImageTransitionEnd);
+            } else if (hasClass(viewer, CLASS_TRANSITION)) {
+              removeListener(viewer, EVENT_TRANSITION_END, onViewerTransitionEnd);
+            }
+          }
+        }; // In case of hiding the viewer when holding on the image (#255),
+        // note that the `CLASS_TRANSITION` class will be removed on pointer down.
+
+        if (this.viewed && hasClass(image, CLASS_TRANSITION)) {
+          addListener(image, EVENT_TRANSITION_END, onImageTransitionEnd, {
+            once: true
+          });
+          this.zoomTo(0, false, null, true);
+        } else {
+          onImageTransitionEnd();
+        }
+      } else {
+        hideImmediately();
+      }
+
+      return this;
+    },
+
+    /**
+     * View one of the images with image's index
+     * @param {number} index - The index of the image to view.
+     * @returns {Viewer} this
+     */
+    view: function view() {
+      var _this2 = this;
+
+      var index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.options.initialViewIndex;
+      index = Number(index) || 0;
+
+      if (this.hiding || this.played || index < 0 || index >= this.length || this.viewed && index === this.index) {
+        return this;
+      }
+
+      if (!this.isShown) {
+        this.index = index;
+        return this.show();
+      }
+
+      if (this.viewing) {
+        this.viewing.abort();
+      }
+
+      var element = this.element,
+          options = this.options,
+          title = this.title,
+          canvas = this.canvas;
+      var item = this.items[index];
+      var img = item.querySelector('img');
+      var url = getData(img, 'originalUrl');
+      var alt = img.getAttribute('alt');
+      var image = document.createElement('img');
+      forEach(options.inheritedAttributes, function (name) {
+        var value = img.getAttribute(name);
+
+        if (value !== null) {
+          image.setAttribute(name, value);
+        }
+      });
+      image.src = url;
+      image.alt = alt;
+
+      if (isFunction(options.view)) {
+        addListener(element, EVENT_VIEW, options.view, {
+          once: true
+        });
+      }
+
+      if (dispatchEvent(element, EVENT_VIEW, {
+        originalImage: this.images[index],
+        index: index,
+        image: image
+      }) === false || !this.isShown || this.hiding || this.played) {
+        return this;
+      }
+
+      var activeItem = this.items[this.index];
+
+      if (activeItem) {
+        removeClass(activeItem, CLASS_ACTIVE);
+        activeItem.removeAttribute('aria-selected');
+      }
+
+      addClass(item, CLASS_ACTIVE);
+      item.setAttribute('aria-selected', true);
+
+      if (options.focus) {
+        item.focus();
+      }
+
+      this.image = image;
+      this.viewed = false;
+      this.index = index;
+      this.imageData = {};
+      addClass(image, CLASS_INVISIBLE);
+
+      if (options.loading) {
+        addClass(canvas, CLASS_LOADING);
+      }
+
+      canvas.innerHTML = '';
+      canvas.appendChild(image); // Center current item
+
+      this.renderList(); // Clear title
+
+      title.innerHTML = ''; // Generate title after viewed
+
+      var onViewed = function onViewed() {
+        var imageData = _this2.imageData;
+        var render = Array.isArray(options.title) ? options.title[1] : options.title;
+        title.innerHTML = escapeHTMLEntities(isFunction(render) ? render.call(_this2, image, imageData) : "".concat(alt, " (").concat(imageData.naturalWidth, " \xD7 ").concat(imageData.naturalHeight, ")"));
+      };
+
+      var onLoad;
+      var onError;
+      addListener(element, EVENT_VIEWED, onViewed, {
+        once: true
+      });
+      this.viewing = {
+        abort: function abort() {
+          removeListener(element, EVENT_VIEWED, onViewed);
+
+          if (image.complete) {
+            if (_this2.imageRendering) {
+              _this2.imageRendering.abort();
+            } else if (_this2.imageInitializing) {
+              _this2.imageInitializing.abort();
+            }
+          } else {
+            // Cancel download to save bandwidth.
+            image.src = '';
+            removeListener(image, EVENT_LOAD, onLoad);
+
+            if (_this2.timeout) {
+              clearTimeout(_this2.timeout);
+            }
+          }
+        }
+      };
+
+      if (image.complete) {
+        this.load();
+      } else {
+        addListener(image, EVENT_LOAD, onLoad = function onLoad() {
+          removeListener(image, EVENT_ERROR, onError);
+
+          _this2.load();
+        }, {
+          once: true
+        });
+        addListener(image, EVENT_ERROR, onError = function onError() {
+          removeListener(image, EVENT_LOAD, onLoad);
+
+          if (_this2.timeout) {
+            clearTimeout(_this2.timeout);
+            _this2.timeout = false;
+          }
+
+          removeClass(image, CLASS_INVISIBLE);
+
+          if (options.loading) {
+            removeClass(_this2.canvas, CLASS_LOADING);
+          }
+        }, {
+          once: true
+        });
+
+        if (this.timeout) {
+          clearTimeout(this.timeout);
+        } // Make the image visible if it fails to load within 1s
+
+
+        this.timeout = setTimeout(function () {
+          removeClass(image, CLASS_INVISIBLE);
+          _this2.timeout = false;
+        }, 1000);
+      }
+
+      return this;
+    },
+
+    /**
+     * View the previous image
+     * @param {boolean} [loop=false] - Indicate if view the last one
+     * when it is the first one at present.
+     * @returns {Viewer} this
+     */
+    prev: function prev() {
+      var loop = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
+      var index = this.index - 1;
+
+      if (index < 0) {
+        index = loop ? this.length - 1 : 0;
+      }
+
+      this.view(index);
+      return this;
+    },
+
+    /**
+     * View the next image
+     * @param {boolean} [loop=false] - Indicate if view the first one
+     * when it is the last one at present.
+     * @returns {Viewer} this
+     */
+    next: function next() {
+      var loop = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
+      var maxIndex = this.length - 1;
+      var index = this.index + 1;
+
+      if (index > maxIndex) {
+        index = loop ? 0 : maxIndex;
+      }
+
+      this.view(index);
+      return this;
+    },
+
+    /**
+     * Move the image with relative offsets.
+     * @param {number} x - The moving distance in the horizontal direction.
+     * @param {number} [y=x] The moving distance in the vertical direction.
+     * @returns {Viewer} this
+     */
+    move: function move(x) {
+      var y = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : x;
+      var imageData = this.imageData;
+      this.moveTo(isUndefined(x) ? x : imageData.x + Number(x), isUndefined(y) ? y : imageData.y + Number(y));
+      return this;
+    },
+
+    /**
+     * Move the image to an absolute point.
+     * @param {number} x - The new position in the horizontal direction.
+     * @param {number} [y=x] - The new position in the vertical direction.
+     * @param {Event} [_originalEvent=null] - The original event if any.
+     * @returns {Viewer} this
+     */
+    moveTo: function moveTo(x) {
+      var _this3 = this;
+
+      var y = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : x;
+
+      var _originalEvent = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
+
+      var element = this.element,
+          options = this.options,
+          imageData = this.imageData;
+      x = Number(x);
+      y = Number(y);
+
+      if (this.viewed && !this.played && options.movable) {
+        var oldX = imageData.x;
+        var oldY = imageData.y;
+        var changed = false;
+
+        if (isNumber(x)) {
+          changed = true;
+        } else {
+          x = oldX;
+        }
+
+        if (isNumber(y)) {
+          changed = true;
+        } else {
+          y = oldY;
+        }
+
+        if (changed) {
+          if (isFunction(options.move)) {
+            addListener(element, EVENT_MOVE, options.move, {
+              once: true
+            });
+          }
+
+          if (dispatchEvent(element, EVENT_MOVE, {
+            x: x,
+            y: y,
+            oldX: oldX,
+            oldY: oldY,
+            originalEvent: _originalEvent
+          }) === false) {
+            return this;
+          }
+
+          imageData.x = x;
+          imageData.y = y;
+          imageData.left = x;
+          imageData.top = y;
+          this.moving = true;
+          this.renderImage(function () {
+            _this3.moving = false;
+
+            if (isFunction(options.moved)) {
+              addListener(element, EVENT_MOVED, options.moved, {
+                once: true
+              });
+            }
+
+            dispatchEvent(element, EVENT_MOVED, {
+              x: x,
+              y: y,
+              oldX: oldX,
+              oldY: oldY,
+              originalEvent: _originalEvent
+            }, {
+              cancelable: false
+            });
+          });
+        }
+      }
+
+      return this;
+    },
+
+    /**
+     * Rotate the image with a relative degree.
+     * @param {number} degree - The rotate degree.
+     * @returns {Viewer} this
+     */
+    rotate: function rotate(degree) {
+      this.rotateTo((this.imageData.rotate || 0) + Number(degree));
+      return this;
+    },
+
+    /**
+     * Rotate the image to an absolute degree.
+     * @param {number} degree - The rotate degree.
+     * @returns {Viewer} this
+     */
+    rotateTo: function rotateTo(degree) {
+      var _this4 = this;
+
+      var element = this.element,
+          options = this.options,
+          imageData = this.imageData;
+      degree = Number(degree);
+
+      if (isNumber(degree) && this.viewed && !this.played && options.rotatable) {
+        var oldDegree = imageData.rotate;
+
+        if (isFunction(options.rotate)) {
+          addListener(element, EVENT_ROTATE, options.rotate, {
+            once: true
+          });
+        }
+
+        if (dispatchEvent(element, EVENT_ROTATE, {
+          degree: degree,
+          oldDegree: oldDegree
+        }) === false) {
+          return this;
+        }
+
+        imageData.rotate = degree;
+        this.rotating = true;
+        this.renderImage(function () {
+          _this4.rotating = false;
+
+          if (isFunction(options.rotated)) {
+            addListener(element, EVENT_ROTATED, options.rotated, {
+              once: true
+            });
+          }
+
+          dispatchEvent(element, EVENT_ROTATED, {
+            degree: degree,
+            oldDegree: oldDegree
+          }, {
+            cancelable: false
+          });
+        });
+      }
+
+      return this;
+    },
+
+    /**
+     * Scale the image on the x-axis.
+     * @param {number} scaleX - The scale ratio on the x-axis.
+     * @returns {Viewer} this
+     */
+    scaleX: function scaleX(_scaleX) {
+      this.scale(_scaleX, this.imageData.scaleY);
+      return this;
+    },
+
+    /**
+     * Scale the image on the y-axis.
+     * @param {number} scaleY - The scale ratio on the y-axis.
+     * @returns {Viewer} this
+     */
+    scaleY: function scaleY(_scaleY) {
+      this.scale(this.imageData.scaleX, _scaleY);
+      return this;
+    },
+
+    /**
+     * Scale the image.
+     * @param {number} scaleX - The scale ratio on the x-axis.
+     * @param {number} [scaleY=scaleX] - The scale ratio on the y-axis.
+     * @returns {Viewer} this
+     */
+    scale: function scale(scaleX) {
+      var _this5 = this;
+
+      var scaleY = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : scaleX;
+      var element = this.element,
+          options = this.options,
+          imageData = this.imageData;
+      scaleX = Number(scaleX);
+      scaleY = Number(scaleY);
+
+      if (this.viewed && !this.played && options.scalable) {
+        var oldScaleX = imageData.scaleX;
+        var oldScaleY = imageData.scaleY;
+        var changed = false;
+
+        if (isNumber(scaleX)) {
+          changed = true;
+        } else {
+          scaleX = oldScaleX;
+        }
+
+        if (isNumber(scaleY)) {
+          changed = true;
+        } else {
+          scaleY = oldScaleY;
+        }
+
+        if (changed) {
+          if (isFunction(options.scale)) {
+            addListener(element, EVENT_SCALE, options.scale, {
+              once: true
+            });
+          }
+
+          if (dispatchEvent(element, EVENT_SCALE, {
+            scaleX: scaleX,
+            scaleY: scaleY,
+            oldScaleX: oldScaleX,
+            oldScaleY: oldScaleY
+          }) === false) {
+            return this;
+          }
+
+          imageData.scaleX = scaleX;
+          imageData.scaleY = scaleY;
+          this.scaling = true;
+          this.renderImage(function () {
+            _this5.scaling = false;
+
+            if (isFunction(options.scaled)) {
+              addListener(element, EVENT_SCALED, options.scaled, {
+                once: true
+              });
+            }
+
+            dispatchEvent(element, EVENT_SCALED, {
+              scaleX: scaleX,
+              scaleY: scaleY,
+              oldScaleX: oldScaleX,
+              oldScaleY: oldScaleY
+            }, {
+              cancelable: false
+            });
+          });
+        }
+      }
+
+      return this;
+    },
+
+    /**
+     * Zoom the image with a relative ratio.
+     * @param {number} ratio - The target ratio.
+     * @param {boolean} [hasTooltip=false] - Indicates if it has a tooltip or not.
+     * @param {Event} [_originalEvent=null] - The original event if any.
+     * @returns {Viewer} this
+     */
+    zoom: function zoom(ratio) {
+      var hasTooltip = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
+
+      var _originalEvent = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
+
+      var imageData = this.imageData;
+      ratio = Number(ratio);
+
+      if (ratio < 0) {
+        ratio = 1 / (1 - ratio);
+      } else {
+        ratio = 1 + ratio;
+      }
+
+      this.zoomTo(imageData.width * ratio / imageData.naturalWidth, hasTooltip, _originalEvent);
+      return this;
+    },
+
+    /**
+     * Zoom the image to an absolute ratio.
+     * @param {number} ratio - The target ratio.
+     * @param {boolean} [hasTooltip=false] - Indicates if it has a tooltip or not.
+     * @param {Event} [_originalEvent=null] - The original event if any.
+     * @param {Event} [_zoomable=false] - Indicates if the current zoom is available or not.
+     * @returns {Viewer} this
+     */
+    zoomTo: function zoomTo(ratio) {
+      var _this6 = this;
+
+      var hasTooltip = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
+
+      var _originalEvent = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
+
+      var _zoomable = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
+
+      var element = this.element,
+          options = this.options,
+          pointers = this.pointers,
+          imageData = this.imageData;
+      var x = imageData.x,
+          y = imageData.y,
+          width = imageData.width,
+          height = imageData.height,
+          naturalWidth = imageData.naturalWidth,
+          naturalHeight = imageData.naturalHeight;
+      ratio = Math.max(0, ratio);
+
+      if (isNumber(ratio) && this.viewed && !this.played && (_zoomable || options.zoomable)) {
+        if (!_zoomable) {
+          var minZoomRatio = Math.max(0.01, options.minZoomRatio);
+          var maxZoomRatio = Math.min(100, options.maxZoomRatio);
+          ratio = Math.min(Math.max(ratio, minZoomRatio), maxZoomRatio);
+        }
+
+        if (_originalEvent) {
+          switch (_originalEvent.type) {
+            case 'wheel':
+              if (options.zoomRatio >= 0.055 && ratio > 0.95 && ratio < 1.05) {
+                ratio = 1;
+              }
+
+              break;
+
+            case 'pointermove':
+            case 'touchmove':
+            case 'mousemove':
+              if (ratio > 0.99 && ratio < 1.01) {
+                ratio = 1;
+              }
+
+              break;
+          }
+        }
+
+        var newWidth = naturalWidth * ratio;
+        var newHeight = naturalHeight * ratio;
+        var offsetWidth = newWidth - width;
+        var offsetHeight = newHeight - height;
+        var oldRatio = imageData.ratio;
+
+        if (isFunction(options.zoom)) {
+          addListener(element, EVENT_ZOOM, options.zoom, {
+            once: true
+          });
+        }
+
+        if (dispatchEvent(element, EVENT_ZOOM, {
+          ratio: ratio,
+          oldRatio: oldRatio,
+          originalEvent: _originalEvent
+        }) === false) {
+          return this;
+        }
+
+        this.zooming = true;
+
+        if (_originalEvent) {
+          var offset = getOffset(this.viewer);
+          var center = pointers && Object.keys(pointers).length > 0 ? getPointersCenter(pointers) : {
+            pageX: _originalEvent.pageX,
+            pageY: _originalEvent.pageY
+          }; // Zoom from the triggering point of the event
+
+          imageData.x -= offsetWidth * ((center.pageX - offset.left - x) / width);
+          imageData.y -= offsetHeight * ((center.pageY - offset.top - y) / height);
+        } else {
+          // Zoom from the center of the image
+          imageData.x -= offsetWidth / 2;
+          imageData.y -= offsetHeight / 2;
+        }
+
+        imageData.left = imageData.x;
+        imageData.top = imageData.y;
+        imageData.width = newWidth;
+        imageData.height = newHeight;
+        imageData.oldRatio = oldRatio;
+        imageData.ratio = ratio;
+        this.renderImage(function () {
+          _this6.zooming = false;
+
+          if (isFunction(options.zoomed)) {
+            addListener(element, EVENT_ZOOMED, options.zoomed, {
+              once: true
+            });
+          }
+
+          dispatchEvent(element, EVENT_ZOOMED, {
+            ratio: ratio,
+            oldRatio: oldRatio,
+            originalEvent: _originalEvent
+          }, {
+            cancelable: false
+          });
+        });
+
+        if (hasTooltip) {
+          this.tooltip();
+        }
+      }
+
+      return this;
+    },
+
+    /**
+     * Play the images
+     * @param {boolean|FullscreenOptions} [fullscreen=false] - Indicate if request fullscreen or not.
+     * @returns {Viewer} this
+     */
+    play: function play() {
+      var _this7 = this;
+
+      var fullscreen = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
+
+      if (!this.isShown || this.played) {
+        return this;
+      }
+
+      var element = this.element,
+          options = this.options;
+
+      if (isFunction(options.play)) {
+        addListener(element, EVENT_PLAY, options.play, {
+          once: true
+        });
+      }
+
+      if (dispatchEvent(element, EVENT_PLAY) === false) {
+        return this;
+      }
+
+      var player = this.player;
+      var onLoad = this.loadImage.bind(this);
+      var list = [];
+      var total = 0;
+      var index = 0;
+      this.played = true;
+      this.onLoadWhenPlay = onLoad;
+
+      if (fullscreen) {
+        this.requestFullscreen(fullscreen);
+      }
+
+      addClass(player, CLASS_SHOW);
+      forEach(this.items, function (item, i) {
+        var img = item.querySelector('img');
+        var image = document.createElement('img');
+        image.src = getData(img, 'originalUrl');
+        image.alt = img.getAttribute('alt');
+        image.referrerPolicy = img.referrerPolicy;
+        total += 1;
+        addClass(image, CLASS_FADE);
+        toggleClass(image, CLASS_TRANSITION, options.transition);
+
+        if (hasClass(item, CLASS_ACTIVE)) {
+          addClass(image, CLASS_IN);
+          index = i;
+        }
+
+        list.push(image);
+        addListener(image, EVENT_LOAD, onLoad, {
+          once: true
+        });
+        player.appendChild(image);
+      });
+
+      if (isNumber(options.interval) && options.interval > 0) {
+        var play = function play() {
+          _this7.playing = setTimeout(function () {
+            removeClass(list[index], CLASS_IN);
+            index += 1;
+            index = index < total ? index : 0;
+            addClass(list[index], CLASS_IN);
+            play();
+          }, options.interval);
+        };
+
+        if (total > 1) {
+          play();
+        }
+      }
+
+      return this;
+    },
+    // Stop play
+    stop: function stop() {
+      var _this8 = this;
+
+      if (!this.played) {
+        return this;
+      }
+
+      var element = this.element,
+          options = this.options;
+
+      if (isFunction(options.stop)) {
+        addListener(element, EVENT_STOP, options.stop, {
+          once: true
+        });
+      }
+
+      if (dispatchEvent(element, EVENT_STOP) === false) {
+        return this;
+      }
+
+      var player = this.player;
+      this.played = false;
+      clearTimeout(this.playing);
+      forEach(player.getElementsByTagName('img'), function (image) {
+        removeListener(image, EVENT_LOAD, _this8.onLoadWhenPlay);
+      });
+      removeClass(player, CLASS_SHOW);
+      player.innerHTML = '';
+      this.exitFullscreen();
+      return this;
+    },
+    // Enter modal mode (only available in inline mode)
+    full: function full() {
+      var _this9 = this;
+
+      var options = this.options,
+          viewer = this.viewer,
+          image = this.image,
+          list = this.list;
+
+      if (!this.isShown || this.played || this.fulled || !options.inline) {
+        return this;
+      }
+
+      this.fulled = true;
+      this.open();
+      addClass(this.button, CLASS_FULLSCREEN_EXIT);
+
+      if (options.transition) {
+        removeClass(list, CLASS_TRANSITION);
+
+        if (this.viewed) {
+          removeClass(image, CLASS_TRANSITION);
+        }
+      }
+
+      addClass(viewer, CLASS_FIXED);
+      viewer.setAttribute('role', 'dialog');
+      viewer.setAttribute('aria-labelledby', this.title.id);
+      viewer.setAttribute('aria-modal', true);
+      viewer.removeAttribute('style');
+      setStyle(viewer, {
+        zIndex: options.zIndex
+      });
+
+      if (options.focus) {
+        this.enforceFocus();
+      }
+
+      this.initContainer();
+      this.viewerData = assign({}, this.containerData);
+      this.renderList();
+
+      if (this.viewed) {
+        this.initImage(function () {
+          _this9.renderImage(function () {
+            if (options.transition) {
+              setTimeout(function () {
+                addClass(image, CLASS_TRANSITION);
+                addClass(list, CLASS_TRANSITION);
+              }, 0);
+            }
+          });
+        });
+      }
+
+      return this;
+    },
+    // Exit modal mode (only available in inline mode)
+    exit: function exit() {
+      var _this10 = this;
+
+      var options = this.options,
+          viewer = this.viewer,
+          image = this.image,
+          list = this.list;
+
+      if (!this.isShown || this.played || !this.fulled || !options.inline) {
+        return this;
+      }
+
+      this.fulled = false;
+      this.close();
+      removeClass(this.button, CLASS_FULLSCREEN_EXIT);
+
+      if (options.transition) {
+        removeClass(list, CLASS_TRANSITION);
+
+        if (this.viewed) {
+          removeClass(image, CLASS_TRANSITION);
+        }
+      }
+
+      if (options.focus) {
+        this.clearEnforceFocus();
+      }
+
+      viewer.removeAttribute('role');
+      viewer.removeAttribute('aria-labelledby');
+      viewer.removeAttribute('aria-modal');
+      removeClass(viewer, CLASS_FIXED);
+      setStyle(viewer, {
+        zIndex: options.zIndexInline
+      });
+      this.viewerData = assign({}, this.parentData);
+      this.renderViewer();
+      this.renderList();
+
+      if (this.viewed) {
+        this.initImage(function () {
+          _this10.renderImage(function () {
+            if (options.transition) {
+              setTimeout(function () {
+                addClass(image, CLASS_TRANSITION);
+                addClass(list, CLASS_TRANSITION);
+              }, 0);
+            }
+          });
+        });
+      }
+
+      return this;
+    },
+    // Show the current ratio of the image with percentage
+    tooltip: function tooltip() {
+      var _this11 = this;
+
+      var options = this.options,
+          tooltipBox = this.tooltipBox,
+          imageData = this.imageData;
+
+      if (!this.viewed || this.played || !options.tooltip) {
+        return this;
+      }
+
+      tooltipBox.textContent = "".concat(Math.round(imageData.ratio * 100), "%");
+
+      if (!this.tooltipping) {
+        if (options.transition) {
+          if (this.fading) {
+            dispatchEvent(tooltipBox, EVENT_TRANSITION_END);
+          }
+
+          addClass(tooltipBox, CLASS_SHOW);
+          addClass(tooltipBox, CLASS_FADE);
+          addClass(tooltipBox, CLASS_TRANSITION);
+          tooltipBox.removeAttribute('aria-hidden'); // Force reflow to enable CSS3 transition
+
+          tooltipBox.initialOffsetWidth = tooltipBox.offsetWidth;
+          addClass(tooltipBox, CLASS_IN);
+        } else {
+          addClass(tooltipBox, CLASS_SHOW);
+          tooltipBox.removeAttribute('aria-hidden');
+        }
+      } else {
+        clearTimeout(this.tooltipping);
+      }
+
+      this.tooltipping = setTimeout(function () {
+        if (options.transition) {
+          addListener(tooltipBox, EVENT_TRANSITION_END, function () {
+            removeClass(tooltipBox, CLASS_SHOW);
+            removeClass(tooltipBox, CLASS_FADE);
+            removeClass(tooltipBox, CLASS_TRANSITION);
+            tooltipBox.setAttribute('aria-hidden', true);
+            _this11.fading = false;
+          }, {
+            once: true
+          });
+          removeClass(tooltipBox, CLASS_IN);
+          _this11.fading = true;
+        } else {
+          removeClass(tooltipBox, CLASS_SHOW);
+          tooltipBox.setAttribute('aria-hidden', true);
+        }
+
+        _this11.tooltipping = false;
+      }, 1000);
+      return this;
+    },
+
+    /**
+     * Toggle the image size between its current size and natural size
+     * @param {Event} [_originalEvent=null] - The original event if any.
+     * @returns {Viewer} this
+     */
+    toggle: function toggle() {
+      var _originalEvent = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
+
+      if (this.imageData.ratio === 1) {
+        this.zoomTo(this.imageData.oldRatio, true, _originalEvent);
+      } else {
+        this.zoomTo(1, true, _originalEvent);
+      }
+
+      return this;
+    },
+    // Reset the image to its initial state
+    reset: function reset() {
+      if (this.viewed && !this.played) {
+        this.imageData = assign({}, this.initialImageData);
+        this.renderImage();
+      }
+
+      return this;
+    },
+    // Update viewer when images changed
+    update: function update() {
+      var _this12 = this;
+
+      var element = this.element,
+          options = this.options,
+          isImg = this.isImg; // Destroy viewer if the target image was deleted
+
+      if (isImg && !element.parentNode) {
+        return this.destroy();
+      }
+
+      var images = [];
+      forEach(isImg ? [element] : element.querySelectorAll('img'), function (image) {
+        if (isFunction(options.filter)) {
+          if (options.filter.call(_this12, image)) {
+            images.push(image);
+          }
+        } else if (_this12.getImageURL(image)) {
+          images.push(image);
+        }
+      });
+
+      if (!images.length) {
+        return this;
+      }
+
+      this.images = images;
+      this.length = images.length;
+
+      if (this.ready) {
+        var changedIndexes = [];
+        forEach(this.items, function (item, i) {
+          var img = item.querySelector('img');
+          var image = images[i];
+
+          if (image && img) {
+            if (image.src !== img.src // Title changed (#408)
+            || image.alt !== img.alt) {
+              changedIndexes.push(i);
+            }
+          } else {
+            changedIndexes.push(i);
+          }
+        });
+        setStyle(this.list, {
+          width: 'auto'
+        });
+        this.initList();
+
+        if (this.isShown) {
+          if (this.length) {
+            if (this.viewed) {
+              var changedIndex = changedIndexes.indexOf(this.index);
+
+              if (changedIndex >= 0) {
+                this.viewed = false;
+                this.view(Math.max(Math.min(this.index - changedIndex, this.length - 1), 0));
+              } else {
+                var activeItem = this.items[this.index]; // Reactivate the current viewing item after reset the list.
+
+                addClass(activeItem, CLASS_ACTIVE);
+                activeItem.setAttribute('aria-selected', true);
+              }
+            }
+          } else {
+            this.image = null;
+            this.viewed = false;
+            this.index = 0;
+            this.imageData = {};
+            this.canvas.innerHTML = '';
+            this.title.innerHTML = '';
+          }
+        }
+      } else {
+        this.build();
+      }
+
+      return this;
+    },
+    // Destroy the viewer
+    destroy: function destroy() {
+      var element = this.element,
+          options = this.options;
+
+      if (!element[NAMESPACE]) {
+        return this;
+      }
+
+      this.destroyed = true;
+
+      if (this.ready) {
+        if (this.played) {
+          this.stop();
+        }
+
+        if (options.inline) {
+          if (this.fulled) {
+            this.exit();
+          }
+
+          this.unbind();
+        } else if (this.isShown) {
+          if (this.viewing) {
+            if (this.imageRendering) {
+              this.imageRendering.abort();
+            } else if (this.imageInitializing) {
+              this.imageInitializing.abort();
+            }
+          }
+
+          if (this.hiding) {
+            this.transitioning.abort();
+          }
+
+          this.hidden();
+        } else if (this.showing) {
+          this.transitioning.abort();
+          this.hidden();
+        }
+
+        this.ready = false;
+        this.viewer.parentNode.removeChild(this.viewer);
+      } else if (options.inline) {
+        if (this.delaying) {
+          this.delaying.abort();
+        } else if (this.initializing) {
+          this.initializing.abort();
+        }
+      }
+
+      if (!options.inline) {
+        removeListener(element, EVENT_CLICK, this.onStart);
+      }
+
+      element[NAMESPACE] = undefined;
+      return this;
+    }
+  };
+
+  var others = {
+    getImageURL: function getImageURL(image) {
+      var url = this.options.url;
+
+      if (isString(url)) {
+        url = image.getAttribute(url);
+      } else if (isFunction(url)) {
+        url = url.call(this, image);
+      } else {
+        url = '';
+      }
+
+      return url;
+    },
+    enforceFocus: function enforceFocus() {
+      var _this = this;
+
+      this.clearEnforceFocus();
+      addListener(document, EVENT_FOCUSIN, this.onFocusin = function (event) {
+        var viewer = _this.viewer;
+        var target = event.target;
+
+        if (target === document || target === viewer || viewer.contains(target)) {
+          return;
+        }
+
+        while (target) {
+          // Avoid conflicts with other modals (#474, #540)
+          if (target.getAttribute('tabindex') !== null || target.getAttribute('aria-modal') === 'true') {
+            return;
+          }
+
+          target = target.parentElement;
+        }
+
+        viewer.focus();
+      });
+    },
+    clearEnforceFocus: function clearEnforceFocus() {
+      if (this.onFocusin) {
+        removeListener(document, EVENT_FOCUSIN, this.onFocusin);
+        this.onFocusin = null;
+      }
+    },
+    open: function open() {
+      var body = this.body;
+      addClass(body, CLASS_OPEN);
+      body.style.paddingRight = "".concat(this.scrollbarWidth + (parseFloat(this.initialBodyComputedPaddingRight) || 0), "px");
+    },
+    close: function close() {
+      var body = this.body;
+      removeClass(body, CLASS_OPEN);
+      body.style.paddingRight = this.initialBodyPaddingRight;
+    },
+    shown: function shown() {
+      var element = this.element,
+          options = this.options,
+          viewer = this.viewer;
+      this.fulled = true;
+      this.isShown = true;
+      this.render();
+      this.bind();
+      this.showing = false;
+
+      if (options.focus) {
+        viewer.focus();
+        this.enforceFocus();
+      }
+
+      if (isFunction(options.shown)) {
+        addListener(element, EVENT_SHOWN, options.shown, {
+          once: true
+        });
+      }
+
+      if (dispatchEvent(element, EVENT_SHOWN) === false) {
+        return;
+      }
+
+      if (this.ready && this.isShown && !this.hiding) {
+        this.view(this.index);
+      }
+    },
+    hidden: function hidden() {
+      var element = this.element,
+          options = this.options,
+          viewer = this.viewer;
+
+      if (options.fucus) {
+        this.clearEnforceFocus();
+      }
+
+      this.fulled = false;
+      this.viewed = false;
+      this.isShown = false;
+      this.close();
+      this.unbind();
+      addClass(viewer, CLASS_HIDE);
+      viewer.removeAttribute('role');
+      viewer.removeAttribute('aria-labelledby');
+      viewer.removeAttribute('aria-modal');
+      viewer.setAttribute('aria-hidden', true);
+      this.resetList();
+      this.resetImage();
+      this.hiding = false;
+
+      if (!this.destroyed) {
+        if (isFunction(options.hidden)) {
+          addListener(element, EVENT_HIDDEN, options.hidden, {
+            once: true
+          });
+        }
+
+        dispatchEvent(element, EVENT_HIDDEN, null, {
+          cancelable: false
+        });
+      }
+    },
+    requestFullscreen: function requestFullscreen(options) {
+      var document = this.element.ownerDocument;
+
+      if (this.fulled && !(document.fullscreenElement || document.webkitFullscreenElement || document.mozFullScreenElement || document.msFullscreenElement)) {
+        var documentElement = document.documentElement; // Element.requestFullscreen()
+
+        if (documentElement.requestFullscreen) {
+          // Avoid TypeError when convert `options` to dictionary
+          if (isPlainObject(options)) {
+            documentElement.requestFullscreen(options);
+          } else {
+            documentElement.requestFullscreen();
+          }
+        } else if (documentElement.webkitRequestFullscreen) {
+          documentElement.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT);
+        } else if (documentElement.mozRequestFullScreen) {
+          documentElement.mozRequestFullScreen();
+        } else if (documentElement.msRequestFullscreen) {
+          documentElement.msRequestFullscreen();
+        }
+      }
+    },
+    exitFullscreen: function exitFullscreen() {
+      var document = this.element.ownerDocument;
+
+      if (this.fulled && (document.fullscreenElement || document.webkitFullscreenElement || document.mozFullScreenElement || document.msFullscreenElement)) {
+        // Document.exitFullscreen()
+        if (document.exitFullscreen) {
+          document.exitFullscreen();
+        } else if (document.webkitExitFullscreen) {
+          document.webkitExitFullscreen();
+        } else if (document.mozCancelFullScreen) {
+          document.mozCancelFullScreen();
+        } else if (document.msExitFullscreen) {
+          document.msExitFullscreen();
+        }
+      }
+    },
+    change: function change(event) {
+      var options = this.options,
+          pointers = this.pointers;
+      var pointer = pointers[Object.keys(pointers)[0]]; // In the case of the `pointers` object is empty (#421)
+
+      if (!pointer) {
+        return;
+      }
+
+      var offsetX = pointer.endX - pointer.startX;
+      var offsetY = pointer.endY - pointer.startY;
+
+      switch (this.action) {
+        // Move the current image
+        case ACTION_MOVE:
+          this.move(offsetX, offsetY, event);
+          break;
+        // Zoom the current image
+
+        case ACTION_ZOOM:
+          this.zoom(getMaxZoomRatio(pointers), false, event);
+          break;
+
+        case ACTION_SWITCH:
+          {
+            this.action = 'switched';
+            var absoluteOffsetX = Math.abs(offsetX);
+
+            if (absoluteOffsetX > 1 && absoluteOffsetX > Math.abs(offsetY)) {
+              // Empty `pointers` as `touchend` event will not be fired after swiped in iOS browsers.
+              this.pointers = {};
+
+              if (offsetX > 1) {
+                this.prev(options.loop);
+              } else if (offsetX < -1) {
+                this.next(options.loop);
+              }
+            }
+
+            break;
+          }
+      } // Override
+
+
+      forEach(pointers, function (p) {
+        p.startX = p.endX;
+        p.startY = p.endY;
+      });
+    },
+    isSwitchable: function isSwitchable() {
+      var imageData = this.imageData,
+          viewerData = this.viewerData;
+      return this.length > 1 && imageData.x >= 0 && imageData.y >= 0 && imageData.width <= viewerData.width && imageData.height <= viewerData.height;
+    }
+  };
+
+  var AnotherViewer = WINDOW.Viewer;
+
+  var getUniqueID = function (id) {
+    return function () {
+      id += 1;
+      return id;
+    };
+  }(-1);
+
+  var Viewer = /*#__PURE__*/function () {
+    /**
+     * Create a new Viewer.
+     * @param {Element} element - The target element for viewing.
+     * @param {Object} [options={}] - The configuration options.
+     */
+    function Viewer(element) {
+      var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
+
+      _classCallCheck(this, Viewer);
+
+      if (!element || element.nodeType !== 1) {
+        throw new Error('The first argument is required and must be an element.');
+      }
+
+      this.element = element;
+      this.options = assign({}, DEFAULTS, isPlainObject(options) && options);
+      this.action = false;
+      this.fading = false;
+      this.fulled = false;
+      this.hiding = false;
+      this.imageClicked = false;
+      this.imageData = {};
+      this.index = this.options.initialViewIndex;
+      this.isImg = false;
+      this.isShown = false;
+      this.length = 0;
+      this.moving = false;
+      this.played = false;
+      this.playing = false;
+      this.pointers = {};
+      this.ready = false;
+      this.rotating = false;
+      this.scaling = false;
+      this.showing = false;
+      this.timeout = false;
+      this.tooltipping = false;
+      this.viewed = false;
+      this.viewing = false;
+      this.wheeling = false;
+      this.zooming = false;
+      this.id = getUniqueID();
+      this.init();
+    }
+
+    _createClass(Viewer, [{
+      key: "init",
+      value: function init() {
+        var _this = this;
+
+        var element = this.element,
+            options = this.options;
+
+        if (element[NAMESPACE]) {
+          return;
+        }
+
+        element[NAMESPACE] = this; // The `focus` option requires the `keyboard` option set to `true`.
+
+        if (options.focus && !options.keyboard) {
+          options.focus = false;
+        }
+
+        var isImg = element.localName === 'img';
+        var images = [];
+        forEach(isImg ? [element] : element.querySelectorAll('img'), function (image) {
+          if (isFunction(options.filter)) {
+            if (options.filter.call(_this, image)) {
+              images.push(image);
+            }
+          } else if (_this.getImageURL(image)) {
+            images.push(image);
+          }
+        });
+        this.isImg = isImg;
+        this.length = images.length;
+        this.images = images;
+        this.initBody(); // Override `transition` option if it is not supported
+
+        if (isUndefined(document.createElement(NAMESPACE).style.transition)) {
+          options.transition = false;
+        }
+
+        if (options.inline) {
+          var count = 0;
+
+          var progress = function progress() {
+            count += 1;
+
+            if (count === _this.length) {
+              var timeout;
+              _this.initializing = false;
+              _this.delaying = {
+                abort: function abort() {
+                  clearTimeout(timeout);
+                }
+              }; // build asynchronously to keep `this.viewer` is accessible in `ready` event handler.
+
+              timeout = setTimeout(function () {
+                _this.delaying = false;
+
+                _this.build();
+              }, 0);
+            }
+          };
+
+          this.initializing = {
+            abort: function abort() {
+              forEach(images, function (image) {
+                if (!image.complete) {
+                  removeListener(image, EVENT_LOAD, progress);
+                  removeListener(image, EVENT_ERROR, progress);
+                }
+              });
+            }
+          };
+          forEach(images, function (image) {
+            if (image.complete) {
+              progress();
+            } else {
+              var onLoad;
+              var onError;
+              addListener(image, EVENT_LOAD, onLoad = function onLoad() {
+                removeListener(image, EVENT_ERROR, onError);
+                progress();
+              }, {
+                once: true
+              });
+              addListener(image, EVENT_ERROR, onError = function onError() {
+                removeListener(image, EVENT_LOAD, onLoad);
+                progress();
+              }, {
+                once: true
+              });
+            }
+          });
+        } else {
+          addListener(element, EVENT_CLICK, this.onStart = function (_ref) {
+            var target = _ref.target;
+
+            if (target.localName === 'img' && (!isFunction(options.filter) || options.filter.call(_this, target))) {
+              _this.view(_this.images.indexOf(target));
+            }
+          });
+        }
+      }
+    }, {
+      key: "build",
+      value: function build() {
+        if (this.ready) {
+          return;
+        }
+
+        var element = this.element,
+            options = this.options;
+        var parent = element.parentNode;
+        var template = document.createElement('div');
+        template.innerHTML = TEMPLATE;
+        var viewer = template.querySelector(".".concat(NAMESPACE, "-container"));
+        var title = viewer.querySelector(".".concat(NAMESPACE, "-title"));
+        var toolbar = viewer.querySelector(".".concat(NAMESPACE, "-toolbar"));
+        var navbar = viewer.querySelector(".".concat(NAMESPACE, "-navbar"));
+        var button = viewer.querySelector(".".concat(NAMESPACE, "-button"));
+        var canvas = viewer.querySelector(".".concat(NAMESPACE, "-canvas"));
+        this.parent = parent;
+        this.viewer = viewer;
+        this.title = title;
+        this.toolbar = toolbar;
+        this.navbar = navbar;
+        this.button = button;
+        this.canvas = canvas;
+        this.footer = viewer.querySelector(".".concat(NAMESPACE, "-footer"));
+        this.tooltipBox = viewer.querySelector(".".concat(NAMESPACE, "-tooltip"));
+        this.player = viewer.querySelector(".".concat(NAMESPACE, "-player"));
+        this.list = viewer.querySelector(".".concat(NAMESPACE, "-list"));
+        viewer.id = "".concat(NAMESPACE).concat(this.id);
+        title.id = "".concat(NAMESPACE, "Title").concat(this.id);
+        addClass(title, !options.title ? CLASS_HIDE : getResponsiveClass(Array.isArray(options.title) ? options.title[0] : options.title));
+        addClass(navbar, !options.navbar ? CLASS_HIDE : getResponsiveClass(options.navbar));
+        toggleClass(button, CLASS_HIDE, !options.button);
+
+        if (options.keyboard) {
+          button.setAttribute('tabindex', 0);
+        }
+
+        if (options.backdrop) {
+          addClass(viewer, "".concat(NAMESPACE, "-backdrop"));
+
+          if (!options.inline && options.backdrop !== 'static') {
+            setData(canvas, DATA_ACTION, 'hide');
+          }
+        }
+
+        if (isString(options.className) && options.className) {
+          // In case there are multiple class names
+          options.className.split(REGEXP_SPACES).forEach(function (className) {
+            addClass(viewer, className);
+          });
+        }
+
+        if (options.toolbar) {
+          var list = document.createElement('ul');
+          var custom = isPlainObject(options.toolbar);
+          var zoomButtons = BUTTONS.slice(0, 3);
+          var rotateButtons = BUTTONS.slice(7, 9);
+          var scaleButtons = BUTTONS.slice(9);
+
+          if (!custom) {
+            addClass(toolbar, getResponsiveClass(options.toolbar));
+          }
+
+          forEach(custom ? options.toolbar : BUTTONS, function (value, index) {
+            var deep = custom && isPlainObject(value);
+            var name = custom ? hyphenate(index) : value;
+            var show = deep && !isUndefined(value.show) ? value.show : value;
+
+            if (!show || !options.zoomable && zoomButtons.indexOf(name) !== -1 || !options.rotatable && rotateButtons.indexOf(name) !== -1 || !options.scalable && scaleButtons.indexOf(name) !== -1) {
+              return;
+            }
+
+            var size = deep && !isUndefined(value.size) ? value.size : value;
+            var click = deep && !isUndefined(value.click) ? value.click : value;
+            var item = document.createElement('li');
+
+            if (options.keyboard) {
+              item.setAttribute('tabindex', 0);
+            }
+
+            item.setAttribute('role', 'button');
+            addClass(item, "".concat(NAMESPACE, "-").concat(name));
+
+            if (!isFunction(click)) {
+              setData(item, DATA_ACTION, name);
+            }
+
+            if (isNumber(show)) {
+              addClass(item, getResponsiveClass(show));
+            }
+
+            if (['small', 'large'].indexOf(size) !== -1) {
+              addClass(item, "".concat(NAMESPACE, "-").concat(size));
+            } else if (name === 'play') {
+              addClass(item, "".concat(NAMESPACE, "-large"));
+            }
+
+            if (isFunction(click)) {
+              addListener(item, EVENT_CLICK, click);
+            }
+
+            list.appendChild(item);
+          });
+          toolbar.appendChild(list);
+        } else {
+          addClass(toolbar, CLASS_HIDE);
+        }
+
+        if (!options.rotatable) {
+          var rotates = toolbar.querySelectorAll('li[class*="rotate"]');
+          addClass(rotates, CLASS_INVISIBLE);
+          forEach(rotates, function (rotate) {
+            toolbar.appendChild(rotate);
+          });
+        }
+
+        if (options.inline) {
+          addClass(button, CLASS_FULLSCREEN);
+          setStyle(viewer, {
+            zIndex: options.zIndexInline
+          });
+
+          if (window.getComputedStyle(parent).position === 'static') {
+            setStyle(parent, {
+              position: 'relative'
+            });
+          }
+
+          parent.insertBefore(viewer, element.nextSibling);
+        } else {
+          addClass(button, CLASS_CLOSE);
+          addClass(viewer, CLASS_FIXED);
+          addClass(viewer, CLASS_FADE);
+          addClass(viewer, CLASS_HIDE);
+          setStyle(viewer, {
+            zIndex: options.zIndex
+          });
+          var container = options.container;
+
+          if (isString(container)) {
+            container = element.ownerDocument.querySelector(container);
+          }
+
+          if (!container) {
+            container = this.body;
+          }
+
+          container.appendChild(viewer);
+        }
+
+        if (options.inline) {
+          this.render();
+          this.bind();
+          this.isShown = true;
+        }
+
+        this.ready = true;
+
+        if (isFunction(options.ready)) {
+          addListener(element, EVENT_READY, options.ready, {
+            once: true
+          });
+        }
+
+        if (dispatchEvent(element, EVENT_READY) === false) {
+          this.ready = false;
+          return;
+        }
+
+        if (this.ready && options.inline) {
+          this.view(this.index);
+        }
+      }
+      /**
+       * Get the no conflict viewer class.
+       * @returns {Viewer} The viewer class.
+       */
+
+    }], [{
+      key: "noConflict",
+      value: function noConflict() {
+        window.Viewer = AnotherViewer;
+        return Viewer;
+      }
+      /**
+       * Change the default options.
+       * @param {Object} options - The new default options.
+       */
+
+    }, {
+      key: "setDefaults",
+      value: function setDefaults(options) {
+        assign(DEFAULTS, isPlainObject(options) && options);
+      }
+    }]);
+
+    return Viewer;
+  }();
+
+  assign(Viewer.prototype, render, events, handlers, methods, others);
+
+  return Viewer;
+
+}));

BIN
src/web/staticres/commonFunctions/pc-data-supermarket.png


+ 468 - 0
src/web/staticres/css/dataSmt/dataMart.css

@@ -0,0 +1,468 @@
+.dataMart {
+  padding-top: 72px;
+
+}
+
+.dataMart .header {
+  position: relative;
+  width: 100%;
+}
+
+.dataMart .header img {
+  width: 100%;
+}
+.dataMart a{
+  text-decoration: none;
+}
+.dataMart a:hover{
+  text-decoration: none;
+}
+/* 搜索 */
+.jy-dataMart-search {
+  position: absolute;
+  width: 1200px;
+  left: 50%;
+  transform: translateX(-50%);
+  bottom: -33px;
+  background: transparent;
+  z-index: 1;
+}
+
+.jy-dataMart-search .form-search {
+  position: relative;
+  display: flex;
+  align-items: center;
+  width: 960px;
+  margin: 0 auto;
+}
+
+.jy-dataMart-search .search {
+  width: 960px;
+  position: relative;
+  text-align: center;
+  position: relative;
+  margin: 0 auto;
+}
+
+.jy-dataMart-search .ser {
+  width: 888px;
+  height: 52px;
+  padding: 0 24px;
+  border: 1px solid #2ABED1;
+  border-radius: 8px 0 0 8px;
+  color: #1d1d1d;
+  box-sizing: border-box;
+  font-size: 14px;
+}
+
+.jy-dataMart-search .btn {
+  width: 72px;
+  height: 52px;
+  border-radius: 0 8px 8px 0;
+  border: none;
+  background: #2CB7CA url(/images/dataSmt/search.png) center center no-repeat;
+  background-size: 24px 24px;
+  cursor: pointer;
+}
+
+.jy-dataMart-search .ser::-webkit-input-placeholder {
+  color: #999;
+  font-size: 14px;
+}
+
+.jy-dataMart-search .ser::-moz-placeholder {
+  color: #999;
+  font-size: 14px;
+}
+
+.jy-dataMart-search .ser:-ms-input-placeholder {
+  color: #999;
+  font-size: 14px;
+}
+
+.jy-dataMart-search .ser::-ms-input-placeholder {
+  color: #999;
+  font-size: 14px;
+}
+
+.jy-dataMart-search .ser::placeholder {
+  color: #999;
+  font-size: 14px;
+}
+
+.dataMart .hotkeywords {
+  width: 960px;
+  display: flex;
+  margin: auto;
+  margin-top: 41px;
+}
+
+.dataMart .hotkeywords p {
+  font-size: 14px;
+  line-height: 22px;
+  color: #686868;
+  display: flex;
+  align-items: center;
+}
+
+.dataMart .hotkeywords p img {
+  width: 16px;
+  margin-right: 8px;
+}
+
+.dataMart .hotkeywords .content {
+  margin-left: 16px;
+}
+
+.dataMart .hotkeywords .content a {
+  margin-right: 32px;
+  line-height: 22px;
+  font-size: 14px;
+  color: #686868;
+}
+.dataMart .hotkeywords .content a:hover {
+  text-decoration: none;
+}
+.dataMart .middle {
+  margin-top: 78px;
+
+}
+
+.dataMart .tabs_box {
+  width: 1200px;
+  margin: auto;
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+}
+
+.dataMart .tabs_box h1 {
+  font-size: 22px;
+  line-height: 32px;
+  color: #1D1D1D;
+}
+
+.dataMart .tabs_box div {
+  width: 952px;
+  display: flex;
+  justify-content: space-between;
+}
+
+.dataMart .tabs_box div a {
+  font-size: 14px;
+  line-height: 20px;
+  color: #1D1D1D;
+  padding: 8px 20px;
+  border-radius: 8px;
+  box-sizing: border-box;
+  cursor: pointer;
+  display: block;
+}
+
+.dataMart .tabs_box div a:hover {
+  text-decoration: none;
+}
+
+.dataMart .tabs_box div .active {
+  background-color: #2ABED1;
+  color: #fff;
+}
+
+.dataMart .tabs_box .keys_desc {
+  font-size: 14px;
+  line-height: 32px;
+  color: #2ABED1;
+  margin-top: 2px;
+  text-decoration: underline;
+}
+
+.dataMart .list_container {
+  background: linear-gradient(91.63deg, #E8FCFF 16.29%, #EDF2FE 78.49%);
+  padding: 40px 0 80px 0;
+  margin-top: 20px;
+}
+
+.dataMart .list_container .list_content {
+  width: 1224px;
+  margin: auto;
+  transform: translateX(12px);
+}
+
+.dataMart .list_container .list_content .noData img {
+  width: 260px;
+  display: block;
+  margin: auto;
+}
+
+.dataMart .list_container .list_content .noData .desc {
+  color: #999;
+  line-height: 22px;
+  font-size: 14px;
+  width: 484px;
+  margin: auto;
+  text-align: center;
+}
+
+.dataMart .list_container .dataCustomization {
+  width: 180px;
+  height: 46px;
+  line-height: 46px;
+  text-align: center;
+  background-color: #2ABED1;
+  border-radius: 6px;
+  color: #fff;
+  font-size: 16px;
+  cursor: pointer;
+  margin: auto;
+  box-sizing: border-box;
+  display: block;
+  margin-top: 32px;
+}
+
+.list_container .list {
+  width: 100%;
+  display: flex;
+  /* justify-content: space-between; */
+  flex-wrap: wrap;
+}
+
+.list_container .list .item {
+  width: 282px;
+  min-height: 204px;
+  border-radius: 16px;
+  background: #FFFFFF;
+  position: relative;
+  box-sizing: border-box;
+  padding: 42px 24px 24px 24px;
+  margin-bottom: 24px;
+  margin-right: 24px;
+}
+
+.list_container .list .item:hover {
+  box-shadow: 0px 4px 24px 0px #02348033;
+}
+
+.list_container .cornerMark {
+  position: absolute;
+  left: 0;
+  top: 0;
+  min-width: 80px;
+  min-height: 23px;
+  border-radius: 16px 0px 16px 0px;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  padding: 1px 11px;
+  box-sizing: border-box;
+}
+
+.list_container .yellow {
+  background: linear-gradient(93.58deg, #FF9F40 0%, #FFCC66 100%);
+}
+
+.list_container .blue {
+  background: linear-gradient(272.12deg, #00D1FF 0%, #3399FF 100%);
+}
+
+.list_container .green {
+  background: linear-gradient(93.58deg, #00B031 0%, #0BD991 100%);
+}
+
+.list_container .blueBlack {
+  background: linear-gradient(274.07deg, #2ABED1 0%, #1DB5E6 99%, #1DB5E6 100%);
+}
+
+.list_container .cornerMark p {
+  font-size: 14px;
+  font-weight: 700;
+  line-height: 22px;
+  text-align: center;
+  /* box-shadow: 0px 2px 2px 0px #00000026; */
+  color: #fff;
+}
+
+.list_container .list .item .title {
+  width: 100%;
+  height: 49px;
+  font-size: 16px;
+  font-weight: 400;
+  line-height: 24px;
+  text-align: left;
+  color: #1D1D1D;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  display: -webkit-box;
+  -webkit-line-clamp: 2;
+  /*行数*/
+  -webkit-box-orient: vertical;
+}
+
+.dataMart .list .title .highlight {
+  color: rgba(42, 190, 209, 1);
+}
+
+.dataMart .list .title .bold {
+  font-weight: 700;
+}
+
+.list_container .list .item .tag_box {
+  width: 100%;
+  display: flex;
+  flex-wrap: wrap;
+  margin-top: 8px;
+}
+
+.list_container .list .item .tag_box .tag {
+  font-size: 12px;
+  line-height: 18px;
+  padding: 1px 8px;
+  margin-right: 8px;
+  border-radius: 4px;
+  box-sizing: border-box;
+}
+
+.list_container .list .item .tag_box .yellow {
+  color: #C98F37;
+  background: rgba(241, 208, 144, 0.16);
+}
+
+.list_container .list .item .tag_box .grayness {
+  color: rgba(104, 104, 104, 1);
+  background: #F5F5FB;
+  border: 1px solid rgba(236, 236, 236, 1)
+}
+
+.list_container .list .item .seeDetail {
+  width: 233px;
+  height: 36px;
+  border-radius: 6px;
+  background: linear-gradient(270deg, #3687FF 0%, #2ABED1 100%);
+  line-height: 36px;
+  color: rgba(255, 255, 255, 1);
+  font-size: 16px;
+  text-align: center;
+  margin: auto;
+  margin-top: 24px;
+  display: block;
+}
+
+.list_container .list .item .seeDetail:hover {
+  text-decoration: none;
+}
+
+.dataMart .dataMart_advertising {
+  margin: 0;
+  width: 100%;
+  position: relative;
+}
+.dataMart .dataMart_advertising .advertising{
+  width: 100%;
+  display: block;
+}
+.dataMart .dataMart_advertising .advertising_close{
+  width: 20px;
+  height: 20px;
+  position:absolute;
+  right: 40px;
+  top: 50%;
+  transform: translateY(-50%);
+  cursor: pointer;
+ 
+}
+.dataMart .fixed_bottom{
+  position: fixed;
+  left: 0;
+  bottom: 0;
+  z-index:99;
+  
+}
+.dataMart .dataMart_dialog {
+  position: fixed;
+  z-index: 999;
+  left: 0;
+  top: 0;
+  bottom: 0;
+  right: 0;
+  background-color: rgba(0, 0, 0, 0.5);
+  display: none;
+  overflow: hidden;
+}
+.dataMart .dataMart_dialog .content{
+  width: 750px;
+  height: 674px;
+  border-radius: 8px;
+  position: absolute;
+  left: 50%;
+  top: 50%;
+  transform: translate(-50%,-50%); 
+  background-color: #fff;
+  padding: 32px 0;
+  box-sizing: border-box;
+}
+.dataMart .dataMart_dialog .content .table_box{
+  width: calc(100% - 3px);
+  margin: auto;
+  margin-top: 16px;
+  height: 560px;
+  overflow-y:auto;
+  padding: 0 4px;
+}
+.dataMart .dataMart_dialog .content .table_box::-webkit-scrollbar, ::-webkit-scrollbar {
+  width: 4px;
+  height: 8px;
+}
+.dataMart .dataMart_dialog .content .table_box::-webkit-scrollbar-thumb, ::-webkit-scrollbar-thumb {
+  border-radius: 3px;
+  background-color: #E0E0E0 !important;
+  opacity: 1;
+}
+.dataMart .dataMart_dialog .content .close_{
+  width: 20px;
+  height: 20px;
+  position: absolute;
+  right: 16px;
+  top: 16px;
+  cursor: pointer;
+}
+.dataMart .dataMart_dialog .content h1{
+font-size: 18px;
+font-weight: 400;
+line-height: 28px;
+text-align: center;
+color: #1D1D1D;
+}
+.dataMart_dialog table{
+  width: 686px;
+  border-collapse: collapse;
+  box-sizing: border-box;
+  margin: auto;
+  /* border: 1px solid #E5E5E5; */
+}
+.dataMart_dialog table th{ 
+ background-color: #F5F6F7;
+ border: 1px solid #E5E5E5;
+ padding:11px 16px ;
+ box-sizing: border-box;
+ line-height: 22px;
+ color:#999999; 
+ font-size: 14px;
+ vertical-align: middle
+}
+.dataMart_dialog table td{ 
+  border: 1px solid #E5E5E5;
+  padding:11px 16px ;
+  box-sizing: border-box;
+  line-height: 22px;
+  color: #1D1D1D; 
+  font-size: 14px;
+  vertical-align: middle
+ }
+ .dataMart_dialog table .keys{
+  text-align: center;
+  width: 140px;
+
+ }
+ .dataMart_dialog table .values{
+  width: calc(100% - 140px);
+  text-align: left;
+ }

+ 258 - 0
src/web/staticres/css/dataSmt/dataMart_detail.css

@@ -0,0 +1,258 @@
+.dataMart_detail {
+  padding-top: 72px;
+  background-color: #F5F5FB;
+  overflow: hidden;
+}
+.dataMart_detail .detail_header{
+  width: 1200px;
+  box-sizing: border-box;
+  margin: auto;
+  background-color: #fff;
+  padding: 32px 36px 22px 36px;
+  border-radius: 4px;
+  position: relative;
+  margin-top: 20px;
+}
+.dataMart_detail .cornerMark {
+  position: absolute;
+  left: 0;
+  top: 0;
+  min-width: 80px;
+  min-height: 23px;
+  border-radius: 4px 0px 16px 0px;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  padding: 1px 11px;
+  box-sizing: border-box;
+}
+.dataMart_detail .cornerMark p {
+  font-size: 14px;
+  font-weight: 700;
+  line-height: 22px;
+  text-align: center;
+  /* box-shadow: 0px 2px 2px 0px #00000026; */
+  color: #fff;
+}
+.dataMart_detail .detail_header .yellow {
+  background: linear-gradient(93.58deg, #FF9F40 0%, #FFCC66 100%);
+}
+
+.dataMart_detail .detail_header .blue {
+  background: linear-gradient(272.12deg, #00D1FF 0%, #3399FF 100%);
+}
+
+.dataMart_detail .detail_header .green {
+  background: linear-gradient(93.58deg, #00B031 0%, #0BD991 100%);
+}
+
+.dataMart_detail .detail_header .blueBlack {
+  background: linear-gradient(274.07deg, #2ABED1 0%, #1DB5E6 99%, #1DB5E6 100%);
+}
+.dataMart_detail .detail_header .title{
+  font-size: 24px;
+  line-height: 36px;
+  color: #252627;
+}
+.dataMart_detail .detail_header .highlight {
+  color: rgba(42, 190, 209, 1);
+}
+
+.dataMart_detail .detail_header .bold {
+  font-weight: 700;
+
+}
+.dataMart_detail .detail_header .tag_box {
+  width: 100%;
+  display: flex;
+  flex-wrap: wrap;
+  margin-top: 12px;
+}
+
+.dataMart_detail .detail_header .tag_box .tag {
+  font-size: 12px;
+  line-height: 18px;
+  padding: 1px 8px;
+  margin-right: 8px;
+  border-radius: 4px;
+  box-sizing: border-box;
+}
+
+.dataMart_detail .detail_header .tag_box .yellow {
+  color: #C98F37;
+  background: rgba(241, 208, 144, 0.16);
+}
+
+.dataMart_detail .detail_header .tag_box .grayness {
+  color: rgba(104, 104, 104, 1);
+  background: #F5F5FB;
+  border: 1px solid rgba(236, 236, 236, 1)
+}
+.dataMart_detail .detail_header .desc{
+  color: #5F5E64;
+  font-size: 14px;
+  line-height: 22px;
+  margin-top: 12px;
+}
+.dataMart_detail .detail_header .button_box{
+  display: flex;
+  margin-top: 24px;
+  align-items: end;
+}
+.detail_header .button_box button{
+  width: 132px;
+  height: 36px;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  box-sizing: border-box;
+  font-size: 16px;
+  border-radius: 6px;
+}
+.detail_header .button_box .consult{
+  background-color: #fff;
+  border: 1px solid #E0E0E0;
+  color: #1d1d1d;
+}
+.detail_header .button_box .purchase{
+  background-color: #2ABED1;
+  color: #fff;
+  margin-left: 32px;
+}
+.detail_header .dataCustomization{
+  line-height: 22px;
+  font-size: 14px;
+  color: #5F5E64;
+  margin-left: 16px;
+}
+.detail_header .dataCustomization a{
+  line-height: 22px;
+  font-size: 14px;
+}
+.detail_header .dataCustomization a:hover{
+  text-decoration: none;
+}
+.dataMart_detail .middle{
+  width: 1200px;
+  margin: auto;
+  background-color: #fff;
+  margin-bottom: 80px;
+  padding: 32px 0;
+  margin-top: 16px;
+  border-radius: 4px;
+}
+.dataMart_detail .middle .title{
+  line-height: 24px;
+  height: 24px;
+  font-size: 20px;
+  color: #1D1D1D;
+  position: relative;
+  padding-left: 40px;
+}
+.dataMart_detail .middle .title::after{
+  width: 3px;
+  height: 24px;
+  content: '';
+  background-color: #2ABED1;
+  border-radius: 0 2px 2px 0;
+  display: block;
+  position:absolute;
+  left: 0;
+  top: 0;
+}
+.dataMart_detail .middle .coreAdvantage{
+  margin-top: 16px;
+  padding: 0 40px;
+  width: 100%;
+  display: flex;
+  justify-content:space-between;
+  box-sizing: border-box;
+  margin-bottom: 64px;
+}
+.dataMart_detail .middle .coreAdvantage .item{
+  width: 268px;
+  height: 231px;
+  border-radius: 16px;
+  background-size: 100% 100%;
+  box-sizing: border-box;
+  padding-top: 54px;
+  position: relative;
+}
+.dataMart_detail .middle .coreAdvantage .item:hover .box{
+  box-shadow: 0px 4px 20px 0px #001A411F;
+
+}
+.dataMart_detail .middle .coreAdvantage .item .box{
+  width: 100%;
+  height: 100%;
+  border-radius: 16px;
+  overflow: hidden;
+  background-size: 100% 100%;
+  background-image: url(/images/dataSmt/bg_.png);
+}
+.dataMart_detail .middle .coreAdvantage .pos-img{
+  width: 140px;
+  height: 140px;
+  background-size: 100% 100%;
+  position: absolute;
+  left: 50%;
+  transform: translateX(-50%);
+  top: 0;
+}
+.dataResource{
+  background-image: url(/images/dataSmt/data.png);
+}
+.coverageArea{
+  background-image: url(/images/dataSmt/coverage.png);
+}
+.service{
+  background-image: url(/images/dataSmt/service.png);
+}
+.professionalTeam{
+  background-image: url(/images/dataSmt/team.png);
+}
+.dataMart_detail .middle .coreAdvantage .item .box h1{
+ font-size: 20px;
+ line-height: 32px;
+ color: #1D1D1D;
+ text-align: center;
+ margin-top: 69px;
+}
+.dataMart_detail .middle .coreAdvantage .item .box p{
+  width: 212px;
+  font-size: 14px;
+  line-height: 22px;
+  color: #686868;
+  text-align: center;
+  margin: auto;
+  margin-top: 9px;
+ }
+.dataMart_detail .middle .table_content{
+  margin-top: 16px;
+  padding: 0 40px;
+  width: 100%;
+  box-sizing: border-box;
+}
+.table_content .tableDescriptions{
+  color: #999999;
+  font-size: 14px;
+  line-height: 22px;
+}
+.table_content .table_img{
+  width: 100%;
+  margin-top: 16px;
+}
+.table_content .table_img img{
+  width: 100%;
+  cursor: pointer;
+}
+.dataMart_detail .foot_{
+  width: 100%;
+  margin: 0;
+
+}
+.dataMart_detail .foot_ img{
+  width: 100%;
+  display: block;
+
+}

+ 7 - 5
src/web/staticres/css/pc/index.css

@@ -170,7 +170,7 @@
 .jy-index-banner {
   width: 100%;
   height: 500px;
-  overflow: hidden;
+  /* overflow: hidden; */
 }
 
 .jy-index-banner>.content {
@@ -178,7 +178,9 @@
   height: 100%;
   background-image: url(/images/index/new/banner.png);
   background-size: cover;
-  overflow: hidden;
+  /* overflow: hidden; */
+  box-sizing: border-box;
+  padding-top: 1px;
 }
 
 .jy-index-banner>.content .title {
@@ -187,7 +189,7 @@
   color: #FFFFFF;
   text-shadow: 0px 2px 2px #0E6FC5;
   text-align: center;
-  margin-top: 120px;
+  margin-top: 119px;
 }
 
 /* 搜索 */
@@ -375,9 +377,9 @@
   position: absolute;
   padding: 20px 0;
   z-index: 6;
-  top: 100px;
+  top: 116px;
   left: 0;
-  width: 788px;
+  width: 780px;
   background: #fff;
   box-shadow: 0 0 20px rgb(0, 0, 0, 0.1);
   border-radius: 8px;

+ 447 - 0
src/web/staticres/dataSmt/css/index.css

@@ -0,0 +1,447 @@
+a:hover,
+a:visited,
+a:active,
+a:focus{
+  text-decoration: none;
+}
+.page--datamarket-index{
+  padding-top: 72px;
+}
+.page--datamarket-index .market-banner{
+  width: 100%;
+  height: 480px;
+  background: url(/dataSmt/images/land-page-banner.png) no-repeat center center;
+  background-size: 100% 480px;
+}
+.page--datamarket-index .banner-title {
+  padding: 128px 0 22px;
+  font-size: 54px;
+  line-height: 72px;
+  color: #1D1D1D;
+  font-weight: 200;
+  letter-spacing: 12px;
+}
+.page--datamarket-index .banner-subtitle {
+  font-size: 20px;
+  line-height: 32px;
+  color: #686868;
+}
+
+.page--datamarket-index .market-modules{
+  position: relative;
+  margin-top: -75px;
+  background: transparent;
+  z-index: 10;
+}
+.page--datamarket-index .market-modules-container{
+  position: relative;
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+  height: 150px;
+  background: linear-gradient(#DCFBFF, #FFFFFF);
+  box-shadow: 0 2px 2px 0 #fff inset, 0 6px 24px 0px rgba(2, 52, 128, 0.1);
+  z-index: 1;
+  border-radius: 16px;
+}
+.page--datamarket-index .item-module{
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  width: 25%;
+  flex: 1;
+  flex-shrink: 0;
+  text-align: center;
+  font-size: 16px;
+  line-height: 20px;
+}
+.page--datamarket-index .item-module:not(:last-child){
+  border-right: 1px solid #ECECEC;
+}
+.page--datamarket-index .item-module > img{
+  width: 96px;
+  height: 96px;
+  margin-right: 20px;
+  flex-shrink: 0;
+}
+
+.page--datamarket-index .d-header{
+  padding-top: 80px;
+}
+
+.page--datamarket-index .h-title{
+  color: #1D1D1D;
+  font-size: 32px;
+  line-height: 32px;
+  text-align: center;
+}
+.page--datamarket-index .h-desc{
+  margin-top: 12px;
+  color: #686868;
+  font-size: 18px;
+  line-height: 28px;
+  text-align: center;
+}
+
+.page--datamarket-index .data-download{
+  width: 100%;
+  /* height: 638px; */
+  background: url(/dataSmt/images/data-download-bg.png) no-repeat bottom center #fff;
+  background-size: 100% 340px;
+}
+
+.page--datamarket-index .download-pro-container {
+  display: flex;
+  align-items: center;
+  margin-top: 56px;
+  border-radius: 16px;
+  overflow: hidden;
+  box-shadow: 0 10px 18px 0px rgba(4, 35, 82, 0.1); 
+}
+.page--datamarket-index .item-pro{
+  flex: 1;
+  width: 25%;
+  padding: 28px 0 24px;
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  background: linear-gradient(to left, #C5F4FA, #EAFEFF);
+}
+.page--datamarket-index .item-pro.disabled{
+  background: linear-gradient(to left,#EBF2F6, #F3F8FC);
+}
+
+.page--datamarket-index  .item-pro > img{
+  width: 80px;
+  height: 80px;
+}
+
+.page--datamarket-index .item-pro > p{
+  margin-top: 8px;
+  font-size: 18px;
+  line-height: 28px;
+  color: #1D1D1D;
+}
+
+.page--datamarket-index .item-pro .btn-light.no-click{
+  background: #95AFC8!important;
+  cursor: default!important;
+}
+.page--datamarket-index .download-info-container {
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  margin-top: 48px;
+}
+.page--datamarket-index .item-info{
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  min-width: 200px;
+  font-size: 16px;
+  line-height: 24px;
+  color: #1D1D1D;
+  text-align: center;
+}
+.page--datamarket-index  .item-info:not(:last-child){
+  margin-right: 140px;
+}
+.page--datamarket-index .item-info strong{
+  font-weight: 700;
+  font-size: 24px;
+  line-height: 22px;
+}
+.page--datamarket-index .item-info > p{
+  margin-top: 6px;
+}
+.download-footer{
+  padding: 32px 0 48px;
+  text-align: center;
+}
+.learn-more{
+  color: #2ABED1;
+  font-size: 18px;
+  line-height: 28px;
+  text-decoration: none;
+}
+.learn-more:active,
+.learn-more:hover,
+.learn-more:visited,
+.learn-more:focus{
+  color: #2ABED1;
+  text-decoration: none;
+}
+
+.page--datamarket-index .data-supermarket{}
+
+.page--datamarket-index .super-container{
+  display: flex;
+  justify-content: space-between;
+  margin-top: 56px;
+}
+.page--datamarket-index .super-container .super-left{
+  width: 688px;
+  height: 354px;
+  padding: 32px 40px;
+  background: url(/dataSmt/images/supermarket-left-bg.png) no-repeat center center;
+  background-size: 100% 100%;
+  border-radius: 16px;
+}
+.super-left .data-list{
+  margin-bottom: 10px;
+}
+.super-left .data-list > h4{
+  font-weight: bold;
+  font-size: 18px;
+  line-height: 28px;
+  color: #fff;
+}
+.super-left .data-list > p{
+  font-size: 14px;
+  line-height: 22px;
+  color: #fff;
+}
+.super-left .data-list-more{
+  margin-left: 120px;
+}
+.super-left .data-list-more:hover{
+  color: #fff;
+}
+.page--datamarket-index .super-container .super-right{
+  width: 488px;
+  height: 354px;
+  padding: 32px 40px;
+  background: linear-gradient(#E8FCFF,#EDF2FE), url(/dataSmt/images/supermarket-right-bg.png) no-repeat;
+  background-position: center center;
+  background-blend-mode: color-burn;
+  background-size: 100% 100%;
+  border-radius: 16px;
+}
+.page--datamarket-index .hot-title{
+  font-size: 20px;
+  line-height: 32px;
+  color: #1D1D1D;
+}
+.page--datamarket-index .hot-icon{
+  color: #FF3A20;
+  font-size: 16px;
+  line-height: 24px;
+}
+.page--datamarket-index .hot-data-container{
+  margin-top: 12px;
+}
+.page--datamarket-index .hot-data-item{
+  display: block;
+  text-decoration: none;
+  color: #1D1D1D;
+  font-size: 16px;
+  line-height: 24px;
+  overflow: hidden;
+  max-width: 210px;
+  white-space: nowrap;
+  text-overflow: ellipsis;
+}
+.page--datamarket-index .hot-data-item:hover{
+  color: #2ABED1;
+  text-decoration: none;
+}
+
+.page--datamarket-index .data-export{
+  padding-bottom: 80px;
+}
+.data-export .export-content{
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+  padding: 48px 125px 40px;
+}
+.data-export .export-item{
+  display: flex;
+  align-items: center;
+}
+.data-export .export-item > img{
+  width: 80px;
+  height: 80px;
+  margin-right: 12px;
+}
+.data-export .export-item > span{
+  color: #1D1D1D;
+  font-size: 18px;
+  line-height: 28px;
+}
+.data-export .learn-more-container{
+  padding-bottom: 56px;
+  text-align: center;
+}
+
+.data-export .export-case{
+  width: 100%;
+  height: 480px;
+  background: #fff;
+  border-radius: 16px;
+  box-shadow: 0 4px 24px 0px rgba(2, 52, 128, 0.1); 
+}
+.data-export .export-case .case-title{
+  padding: 28px 0 32px;
+  color: #1D1D1D;
+  font-size: 20px;
+  line-height: 32px;
+  text-align: center;
+}
+.data-export .export-case .case-container{
+  display: flex;
+  flex-wrap: wrap;
+  align-items: center;
+}
+.data-export .case-container .case-item{
+  flex: 1;
+  display: flex;
+  padding: 32px 32px 28px;
+  flex-direction: column;
+  align-items: center;
+  border-right: 1px solid #ECECEC;
+  border-bottom: 1px solid #ECECEC;
+}
+.data-export .case-container .case-item:nth-child(n+5) {
+  border-bottom: 0;
+}
+.data-export .case-container .case-item:nth-child(4n) {
+  border-right: 0;
+}
+.data-export .case-item > img{
+  width: 180px;
+  height: 50px;
+}
+.data-export .case-item > p{
+  margin-top: 8px;
+  font-size: 16px;
+  line-height: 24px;
+  color: #1D1D1D;
+}
+
+.page--datamarket-index .data-scene{
+  width: 100%;
+  height: 554px;
+  background: url(/dataSmt/images/data-application-bg.png) no-repeat center center;
+  background-size: cover;
+}
+
+.data-scene .scene-title{
+  padding-top: 72px;
+  font-size: 32px;
+  line-height: 42px;
+  color: #fff;
+  text-align: center;
+}
+.data-scene .scene-container{
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+  margin-top: 56px;
+}
+.data-scene .scene-item{
+  width: 282px;
+  height: 208px;
+  padding: 32px;
+  border-radius: 12px;
+  background-position: center center;
+  background-repeat: no-repeat;
+  background-size: 100% 100%;
+}
+.data-scene .scene-item > h4{
+  color: #1D1D1D;
+  font-size: 20px;
+  line-height: 32px;
+}
+.data-scene .scene-item > p{
+  margin-top: 16px;
+  color: #686868;
+  font-size: 14px;
+  line-height: 22px;
+}
+.data-scene .scene-item:nth-child(1){
+  background-image: url(/dataSmt/images/scene-item-1.png);
+}
+.data-scene .scene-item:nth-child(2){
+  background-image: url(/dataSmt/images/scene-item-2.png);
+}
+.data-scene .scene-item:nth-child(3){
+  background-image: url(/dataSmt/images/scene-item-3.png);
+}
+.data-scene .scene-item:nth-child(4){
+  background-image: url(/dataSmt/images/scene-item-4.png);
+}
+.data-scene .scene-btn{
+  width: 240px;
+  height: 48px;
+  line-height: 48px;
+  margin: 48px auto 0;
+  background-color: #fff;
+  border-radius: 8px;
+  text-align: center;
+  cursor: pointer;
+}
+
+.data-scene .scene-btn > span{
+  background-image: linear-gradient(#33CCCC, #3399FF);
+  -webkit-background-clip: text;
+  color: transparent;
+  font-size: 20px;
+}
+
+.btn-light{
+  position: relative;
+  display: inline-block;
+  width: 132px;
+  height: 36px;
+  margin-top: 16px;
+  line-height: 36px;
+  background: linear-gradient(to right,#2ABED1, #3687FF);
+  border-radius: 6px;
+  color: #fff;
+  font-size: 16px;
+  text-align: center;
+  text-decoration: none;
+  overflow: hidden;
+  cursor: pointer;
+}
+.btn-light:hover,
+.btn-light:active,
+.btn-light:visited,
+.btn-light:focus{
+  color: #fff;
+  text-decoration: none;
+}
+.btn-light::after {
+  content: '';
+  display: block;
+  position: absolute;
+  top: -120px;
+  left: -80px;
+  width: 36px;
+  height: 360px;
+  background: #fff;
+  opacity: 0.16;
+  transform: rotate(-45deg);
+  transition: all 800ms ease-out;
+}
+
+.btn-light:hover::after {
+  left: 200%;
+}
+
+@keyframes CfadeInUp {
+  from {
+    transform: translateY(50px);
+  }
+
+  to {
+    transform: translateY(0px);
+    opacity: 1;
+  }
+}
+
+.CfadeInUp {
+  /* opacity: 0; */
+  animation: 1s ease forwards alternate;
+}

BIN
src/web/staticres/dataSmt/images/case-ccscc.png


BIN
src/web/staticres/dataSmt/images/case-cec.png


BIN
src/web/staticres/dataSmt/images/case-langchao.png


BIN
src/web/staticres/dataSmt/images/case-liantong.png


BIN
src/web/staticres/dataSmt/images/case-minsheng.png


BIN
src/web/staticres/dataSmt/images/case-ruijie.png


BIN
src/web/staticres/dataSmt/images/case-siemens.png


BIN
src/web/staticres/dataSmt/images/case-soft.png


BIN
src/web/staticres/dataSmt/images/data-application-bg.png


BIN
src/web/staticres/dataSmt/images/data-download-bg.png


BIN
src/web/staticres/dataSmt/images/data-item-1.png


BIN
src/web/staticres/dataSmt/images/data-item-2.png


BIN
src/web/staticres/dataSmt/images/data-item-3.png


BIN
src/web/staticres/dataSmt/images/data-item-4.png


BIN
src/web/staticres/dataSmt/images/download-1.png


BIN
src/web/staticres/dataSmt/images/download-2.png


BIN
src/web/staticres/dataSmt/images/download-3.png


BIN
src/web/staticres/dataSmt/images/download-4.png


BIN
src/web/staticres/dataSmt/images/export-item-1.png


BIN
src/web/staticres/dataSmt/images/export-item-2.png


BIN
src/web/staticres/dataSmt/images/export-item-3.png


BIN
src/web/staticres/dataSmt/images/land-page-banner.png


BIN
src/web/staticres/dataSmt/images/scene-item-1.png


BIN
src/web/staticres/dataSmt/images/scene-item-2.png


BIN
src/web/staticres/dataSmt/images/scene-item-3.png


BIN
src/web/staticres/dataSmt/images/scene-item-4.png


BIN
src/web/staticres/dataSmt/images/supermarket-left-bg.png


BIN
src/web/staticres/dataSmt/images/supermarket-right-bg.png


+ 2 - 1
src/web/staticres/frontRouter/pc/mesgCenter/js/index-pc.js

@@ -65,7 +65,8 @@ var vm = new Vue({
       location.href = '/page_pc_social/customer?mini=1'
     },
     kfClick() {
-      $('.help-slide-zx.open-customer').trigger('click')
+      // $('.help-slide-zx.open-customer').trigger('click')
+      goCustomerUrl({ openNewWindow: true })
     },
     tabClick(val) {
       console.log(val)

BIN
src/web/staticres/images/dataSmt/bg_.png


BIN
src/web/staticres/images/dataSmt/close.png


BIN
src/web/staticres/images/dataSmt/close_w.png


BIN
src/web/staticres/images/dataSmt/coverage.png


BIN
src/web/staticres/images/dataSmt/data.png


BIN
src/web/staticres/images/dataSmt/foot_bg.png


File diff suppressed because it is too large
+ 6 - 0
src/web/staticres/images/dataSmt/header.svg


BIN
src/web/staticres/images/dataSmt/hot_icon.png


BIN
src/web/staticres/images/dataSmt/nodata.png


BIN
src/web/staticres/images/dataSmt/search.png


BIN
src/web/staticres/images/dataSmt/service.png


BIN
src/web/staticres/images/dataSmt/table.png


BIN
src/web/staticres/images/dataSmt/team.png


+ 30 - 5
src/web/staticres/js/index/index.js

@@ -109,10 +109,12 @@ $(function () {
       $("#zbIndex").attr("action", '/jylab/entSearch/index.html');
       $("#zbIndex .ser").attr("name", 'searchvalue')
       $("#zbIndex input").attr('placeholder', '请输入企业名称')
+      entAssoc.getAssocList()
     } else if (dataId == 'cg') {
       $("#zbIndex").attr("action", '/jylab/purSearch/index.html');
       $("#zbIndex .ser").attr("name", 'searchvalue')
       $("#zbIndex input").attr('placeholder', '请输入采购单位名称')
+      entAssoc.getAssocList()
     } else if (dataId == 'gy') {
       $("#zbIndex").attr("action", '/swordfish/page_web_pc/search/issued');
       $("#zbIndex .ser").attr("name", 'keywords')
@@ -224,14 +226,21 @@ var entAssoc = {
     var _this = this
     $('#keywords').on('input', this.debounce(function () {
       var isEntSearch = $('.search .tips .active').text().indexOf('企业搜索') !== -1
-      if (isEntSearch) {
+      var isBuyerSearch = $('.search .tips .active').text().indexOf('采购单位搜索') !== -1
+      if (isEntSearch || isBuyerSearch) {
         _this.getAssocList()
         _this.checkListShow()
       }
     }, 300))
     $('.pre-search-list').on('click', '.pre-search-item', function () {
+      var type = $(this).attr('data-type')
       var id = $(this).attr('data-id')
-      window.open('/swordfish/page_big_pc/svip/ent_ser_portrait/' + id)
+      var name = $(this).attr('data-name')
+      if (type === 'ent') {
+        window.open('/swordfish/page_big_pc/svip/ent_ser_portrait/' + id)
+      } else {
+        window.open('/swordfish/page_big_pc/free/loading/buyer/' + name)
+      }
     })
     // 控制list显示隐藏
     $('#keywords').on('focus', function () {
@@ -251,17 +260,28 @@ var entAssoc = {
   },
   checkListShow: function () {
     var isEntSearch = $('.search .tips .active').text().indexOf('企业搜索') !== -1
-    var show = $('#keywords').val().length >= 2 && this.list.length && (this.preSearch.focus || this.preSearch.hover) && isEntSearch
+    var isBuyerSearch = $('.search .tips .active').text().indexOf('采购单位搜索') !== -1
+    var show = $('#keywords').val().length >= 2 && this.list.length && (this.preSearch.focus || this.preSearch.hover) && (isEntSearch || isBuyerSearch)
     this.listShow(show)
   },
   getAssocList: function () {
     var _this = this
+    var url = ''
+    var isEntSearch = $('.search .tips .active').text().indexOf('企业搜索') !== -1
+    var isBuyerSearch = $('.search .tips .active').text().indexOf('采购单位搜索') !== -1
+    if (isEntSearch) {
+      url = '/bigmember/search/ent/association'
+    } else if (isBuyerSearch) {
+      url = '/bigmember/search/buyer/association'
+    } else {
+      return
+    }
     var data = {
       name: $('#keywords').val()
     }
     if (data.name.length < 2) return
     $.ajax({
-      url: '/bigmember/search/ent/association',
+      url: url,
       method: 'POST',
       data: data,
       success: function (res) {
@@ -280,8 +300,13 @@ var entAssoc = {
   render: function () {
     var container = $('.pre-search-list')
     var html = ''
+    var isEntSearch = $('.search .tips .active').text().indexOf('企业搜索') !== -1
     this.list.forEach(function (item) {
-      html += ('<div class="pre-search-item ellipsis" data-id=' + item.entId + '>' + item.name + '</div>')
+      if (isEntSearch) {
+        html += ('<div class="pre-search-item ellipsis" data-type="ent" data-id=' + item.entId + '>' + item.name + '</div>')
+      } else {
+        html += ('<div class="pre-search-item ellipsis" data-type="buyer" data-name=' + item + '>' + item + '</div>')
+      }
     })
     container.html(html)
   },

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

@@ -828,7 +828,7 @@ var haslogin = function(num,kyorpn,url){
 			loginBtnType();
 			//pc限制登陆
 			var nosess = getParam("nol");
-			if (nosess!=null && (!loginflag)){
+			if (nosess && (!loginflag)){
 			    openLoginDig();
 			}
             window.localStorage.setItem('noMesg', 0)

+ 3 - 0
src/web/staticres/public-pc/css/pc-bottom.css

@@ -766,3 +766,6 @@
 
 }
 
+.right-side-box {
+  display: none;
+}

+ 5 - 3
src/web/staticres/public-pc/js/article-content.js

@@ -99,10 +99,11 @@ var bidNode = {
         [goTemplateData.params.obj.area]: [goTemplateData.params.obj.city]
       }
       let params = {
+        buyer: goTemplateData.params.obj.buyer,
         buyerContent: keyArr,
         sid: goTemplateData.params.obj._id,
-      pname: goTemplateData.params.obj.projectname,
-      area: bidarea,
+        pname: goTemplateData.params.obj.projectname,
+        area: bidarea,
         industry: goTemplateData.params.obj.s_subscopeclass
       // buyerClass:goTemplateData.params.obj.buyerclass
     }
@@ -166,7 +167,8 @@ var bidNode = {
       })
     },
     onlineQue: function() {
-      $('.help-slide-zx.open-customer').trigger('click')
+      // $('.help-slide-zx.open-customer').trigger('click')
+      goCustomerUrl({ openNewWindow: true })
       this.sourceLogAjax('pc_analysis_detail_kf')
     },
     getQueryVariable(variable){

+ 1 - 1
src/web/staticres/public-pc/js/pc-bottom.js

@@ -197,7 +197,7 @@ $(function () {
     var scrollDisBottom = hHeight - getDomScreenHeight() - $(window).scrollTop()
     if (scrollDisBottom <= goBackTop_disBottom) {
       sideDom.css({
-        bottom: (goBackTop_disBottom - scrollDisBottom) + 'px'
+        bottom: (goBackTop_disBottom - scrollDisBottom) + 100 + 'px'
       })
     } else {
       sideDom.css({

+ 1 - 1
src/web/staticres/tags/css/no-login-detail.css

@@ -416,7 +416,7 @@
 	margin-right: 10px;
 }
 .no-login-detail .otherinfo li .com-title{
-	width: 520px;
+	width: 470px;
 	overflow: hidden;
 	white-space: nowrap;
 	text-overflow: ellipsis;

+ 1 - 1
src/web/templates/common/pcbottom.html

@@ -129,7 +129,7 @@
 </div>
 
 <!--S-侧边栏-->
-<div class="right-side-box" data-backside>
+<div class="right-side-box right-side-box-only" data-backside>
 <!--      <div id="shareslider" style="width: 88px"></div>-->
     <div id="sideIcon" class="" style="right: 1px;width: 88px;height: 88px;">
 <!--        <a href="/swordfish/frontPage/share/sess/index"><img src="{{Msg "seo" "cdn"}}/share/img/active-icon.png"  alt="" style="width: 88px;"></a>-->

+ 315 - 179
src/web/templates/dataMarket/index.html

@@ -1,207 +1,343 @@
-<!doctype html>
-<html lang="en">
+<!DOCTYPE html>
+<html lang="zh">
 <head>
-  <meta charset="UTF-8">
-  <meta name="viewport"
-        content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
-  <meta http-equiv="X-UA-Compatible" content="ie=edge">
-  <title>数据市场-剑鱼标讯</title>
-  <meta name="Keywords" content="招标数据,中标数据,采购数据,结构化数据"/>
-  <meta name="Description" content="剑鱼标讯提供完整的结构化数据导出和定制化合作,提供招标信息相关的项目名称、项目编号、项目范围等多达30个字段,帮助企业通过数据分析市场、获取商机、辅助企业战略决策。。"/>
+  <meta charset="UTF-8"/>
+  <title>招投标数据自助下载|数据超市|数据定制导出_数据市场-剑鱼标讯</title>
+  <meta name="Keywords" content='招投标数据,采购数据,中标数据,企业公示数据,业主数据,中标单位数据,数据市场,剑鱼标讯'/>
+  <meta name="Description" content='剑鱼标讯数据市场提供招投标数据自助下载、数据超市、数据定制导出等一系列招标采购大数据服务,覆盖招投标数据、采购数据,中标数据、企业公示数据、业主数据、中标单位数据等不同类型,海量行业数据安全合规,助力企业精准布局市场,制定商业发展战略。'/>
+  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
+  <meta name="format-detection" content="tephone=no"/>
   <meta content="数据市场" theme="light" name="enable-header"/>
+  <meta http-equiv="X-UA-Compatible" content="ie=edge"/>
   {{include "/common/pnc.html"}}
-  <link href='{{Msg "seo" "cdn"}}/css/swiper.min.css?v={{Msg "seo" "version"}}' rel="stylesheet" type="text/css"/>
-  <link rel="stylesheet" type="text/css" href='{{Msg "seo" "cdn"}}/pccss/reset_pc.css?v={{Msg "seo" "version"}}' />
-  <link rel="stylesheet" type="text/css" href='{{Msg "seo" "cdn"}}/pccss/public-nav-1200.css?v={{Msg "seo" "version"}}' />
-  <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"}}/common-module/pc-dialog/css/leave-info-dialog.css?v={{Msg "seo" "version"}}' rel="stylesheet">
-  <link rel="stylesheet" href='{{Msg "seo" "cdn"}}/frontRouter/pc/dataMarket/css/index.css?v={{Msg "seo" "version"}}'/>
+  <link rel="stylesheet" type="text/css" href='{{Msg "seo" "cdn"}}/pccss/reset_pc.css?v={{Msg "seo" "version"}}'/>
+  <link rel="stylesheet" type="text/css"
+        href='{{Msg "seo" "cdn"}}/pccss/public-nav-1200.css?v={{Msg "seo" "version"}}'/>
+  <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"}}/common-module/pc-dialog/css/leave-info-dialog.css?v={{Msg "seo" "version"}}'
+        rel="stylesheet">
+  <link href='{{Msg "seo" "cdn"}}/dataSmt/css/index.css?v={{Msg "seo" "version"}}' rel="stylesheet">
 </head>
 <body>
 {{include "/common/pchead.html"}}
-<!-- 用户留资 -->
-<div id="vue-collect-user-info"></div>
-<div class="data-market-index">
-  <section class="banner-top CfadeInUp">
-    <div class="w1200">
-      <h1></h1>
-      <p class="self-sub-title">数据开放共享与交易流通平台,为企业提供全面数据支持!</p>
-      <div class="content">
-        <div class="con-row">
-          <img src='{{Msg "seo" "cdn"}}/frontRouter/pc/dataMarket/images/banner-icon1.png?v={{Msg "seo" "version"}}' alt="海量数据">
-          <p>海量数据</p>
-        </div>
-        <div class="con-row">
-          <img src='{{Msg "seo" "cdn"}}/frontRouter/pc/dataMarket/images/banner-icon2.png?v={{Msg "seo" "version"}}' alt="数据安全合规">
-          <p>数据安全合规</p>
-        </div>
-        <div class="con-row">
-          <img src='{{Msg "seo" "cdn"}}/frontRouter/pc/dataMarket/images/banner-icon3.png?v={{Msg "seo" "version"}}' alt="多样化交易模式">
-          <p>多样化交易模式</p>
+
+<section class="page--datamarket-index">
+  <div class="market-banner CfadeInUp">
+    <!-- <img src='{{Msg "seo" "cdn"}}/dataSmt/images/land-page-banner.png' alt="banner"> -->
+    <div class="w">
+      <h1 class="banner-title">数据市场</h1>
+      <p class="banner-subtitle">数据开放共享与交易流通平台,为企业提供全面数据支持!</p>
+    </div>
+  </div>
+  <div class="market-modules CfadeInUp">
+    <div class="w">
+      <ul class="market-modules-container">
+        <li class="item-module">
+          <img src='{{Msg "seo" "cdn"}}/dataSmt/images/data-item-1.png' alt="海量数据">
+          <span>海量数据</span>
+        </li>
+        <li class="item-module">
+          <img src='{{Msg "seo" "cdn"}}/dataSmt/images/data-item-2.png' alt="数据安全合规">
+          <span>数据安全合规</span>
+        </li>
+        <li class="item-module">
+          <img src='{{Msg "seo" "cdn"}}/dataSmt/images/data-item-3.png' alt="多样化交易模式">
+          <span>多样化交易模式</span>
+        </li>
+        <li class="item-module">
+          <img src='{{Msg "seo" "cdn"}}/dataSmt/images/data-item-4.png' alt="成熟的数据服务">
+          <span>成熟的数据服务</span>
+        </li>
+      </ul>
+    </div>
+  </div>
+  <!-- 数据自助下载 -->
+  <div class="data-download CfadeInUp">
+    <div class="w">
+      <div class="d-header">
+        <h2 class="h-title">数据自助下载</h2>
+        <p class="h-desc">自己动手,丰衣足食</p>
+      </div>
+      <ul class="download-pro-container">
+        <li class="item-pro">
+          <img src='{{Msg "seo" "cdn"}}/dataSmt/images/download-1.png' alt="">
+          <p>标讯数据</p>
+          <a id="bid-data-use" class="btn-light" href="/front/dataExport/toSieve" title="标讯数据"
+             onClick="goUseHandle(); return false;">立即使用</a>
+        </li>
+        <li class="item-pro disabled">
+          <img src='{{Msg "seo" "cdn"}}/dataSmt/images/download-2.png' alt="">
+          <p>企业数据</p>
+          <a class="btn-light no-click" href="javascript:;" title="企业数据">即将上线</a>
+        </li>
+        <li class="item-pro disabled">
+          <img src='{{Msg "seo" "cdn"}}/dataSmt/images/download-3.png' alt="">
+          <p>采购单位数据</p>
+          <a class="btn-light no-click" href="javascript:;" title="采购单位数据">即将上线</a>
+        </li>
+        <li class="item-pro disabled">
+          <img src='{{Msg "seo" "cdn"}}/dataSmt/images/download-4.png' alt="">
+          <p>中标单位数据</p>
+          <a class="btn-light no-click" href="javascript:;" title="中标单位数据">即将上线</a>
+        </li>
+      </ul>
+      <ul class="download-info-container">
+        <li class="item-info">
+          <h3><strong>1.5亿+</strong> 招标数据</h3>
+          <p>寻找可跟进项目</p>
+        </li>
+        <li class="item-info">
+          <h3><strong>自由选择</strong>数据</h3>
+          <p>Excel表格一键导出</p>
+        </li>
+        <li class="item-info">
+          <h3><strong>40+</strong>字段包</h3>
+          <p>完全满足企业数据分析需求</p>
+        </li>
+      </ul>
+      <div class="download-footer">
+        <a id="learn-more-download" href="/front/dataExport/toSieve" title="数据自助下载,了解更多"
+           onClick="goUseHandle(); return false;" class="learn-more">了解更多></a>
+      </div>
+    </div>
+  </div>
+  <!-- 数据超市 -->
+  <div class="data-supermarket CfadeInUp">
+    <div class="w">
+      <div class="d-header">
+        <h2 class="h-title">数据超市</h2>
+        <p class="h-desc">热门成品数据,直接下载</p>
+      </div>
+      <div class="super-container">
+        <div class="super-left">
+          <div class="data-list">
+            <h4>招标数据</h4>
+            <p>
+              <span>热门项目丨采购意向丨拟建项目</span>
+            </p>
+          </div>
+          <div class="data-list">
+            <h4>中标数据</h4>
+            <p>
+              <span>医械丨服务采购丨信息技术</span>
+            </p>
+          </div>
+          <div class="data-list">
+            <h4>企业数据</h4>
+            <p>
+              <span>工商数据丨中标项目</span>
+            </p>
+          </div>
+          <div class="data-list">
+            <h4>中标单位数据</h4>
+            <p>
+              <span>ICT丨教育丨银行丨医械丨物业</span>
+            </p>
+          </div>
+          <div class="data-list">
+            <h4>采购单位数据</h4>
+            <p>
+              <span>政府丨电力丨医疗丨通讯</span>
+              <a class="data-list-more" href="/datasmt/index" title="数据超市,热门成品数据,直接下载">了解更多></a>
+            </p>
+          </div>
         </div>
-        <div class="con-row">
-          <img src='{{Msg "seo" "cdn"}}/frontRouter/pc/dataMarket/images/banner-icon4.png?v={{Msg "seo" "version"}}' alt="成熟的数据产品和服务">
-          <p>成熟的数据产品和服务</p>
+        <div class="super-right">
+          <h3 class="hot-title">热门采购数据 <i class="hot-icon">#HOT</i></h3>
+          <div class="hot-data-container">
+            {{range $k,$v := .T.list}}
+                <a class="hot-data-item" href="/datasmt/all/{{$v.id}}" title="{{$v.name}}" target="_blank">{{$v.name}}</a>
+            {{end}}
+          </div>
+          <p>
+            <a class="btn-light" href="/datasmt/index" title="热门采购数据购买">申请购买</a>
+          </p>
         </div>
       </div>
     </div>
-  </section>
-  <section class="card-container">
-    <div class="w1200">
-      <div class="card-content CfadeInUp">
-        <div class="con-card card1">
-          <img src='{{Msg "seo" "cdn"}}/frontRouter/pc/dataMarket/images/text1.png?v={{Msg "seo" "version"}}' alt="">
-          <p class="card-sub-title">自己动手,丰衣足食</p>
-          <div class="content">
-            <div class="c-row">
-              <span class="self-icon icon1"></span>
-              <p>标讯数据</p>
-              <div class="common-btn self-btn" onClick="dataExport()">立即使用</div>
-            </div>
-            <div class="c-row">
-              <span class="self-icon icon2"></span>
-              <p>企业数据</p>
-              <div class="common-btn self-btn" onClick="dataExport()">立即使用</div>
-            </div>
-            <div class="c-row">
-              <span class="self-icon icon3"></span>
-              <p>业主数据</p>
-              <div class="common-btn self-btn unuse">即将上线</div>
+  </div>
+  <!-- 数据定制导出 -->
+  <div class="data-export CfadeInUp">
+    <div class="w">
+      <div class="d-header">
+        <h2 class="h-title">数据定制导出</h2>
+        <p class="h-desc">专属顾问,数据定制,快速交付</p>
+      </div>
+      <div class="export-container">
+        <ul class="export-content">
+          <li class="export-item">
+            <img src='{{Msg "seo" "cdn"}}/dataSmt/images/export-item-1.png' alt="">
+            <span>数据条件可定制</span>
+          </li>
+          <li class="export-item">
+            <img src='{{Msg "seo" "cdn"}}/dataSmt/images/export-item-2.png' alt="">
+            <span>导出内容可定制</span>
+          </li>
+          <li class="export-item">
+            <img src='{{Msg "seo" "cdn"}}/dataSmt/images/export-item-3.png' alt="">
+            <span>人机校验可选择</span>
+          </li>
+        </ul>
+        <p class="learn-more-container">
+          <a id="learn-more-data-export" class="learn-more" href="/front/dataMarket/customExport">了解更多></a>
+        </p>
+      </div>
+      <div class="export-case CfadeInUp">
+        <div class="case-title">500+企业数据定制案例</div>
+        <ul class="case-container">
+          <li class="case-item">
+            <img src='{{Msg "seo" "cdn"}}/dataSmt/images/case-langchao.png' alt="浪潮软件科技">
+            <p>浪潮软件科技</p>
+            <div id="consult-lc" class="btn-light" onClick="needSubmitHandle('pc_data_custom_data', '浪潮软件科技')">立即咨询
             </div>
-            <div class="c-row">
-              <span class="self-icon icon4"></span>
-              <p>中标单位</p>
-              <div class="common-btn self-btn unuse">即将上线</div>
+          </li>
+          <li class="case-item">
+            <img src='{{Msg "seo" "cdn"}}/dataSmt/images/case-ruijie.png' alt="锐捷网络">
+            <p>锐捷网络</p>
+            <div id="consult-rj" class="btn-light" onClick="needSubmitHandle('pc_data_custom_data', '锐捷网络')">立即咨询</div>
+          </li>
+          <li class="case-item">
+            <img src='{{Msg "seo" "cdn"}}/dataSmt/images/case-ccscc.png' alt="中通服">
+            <p>中通服</p>
+            <div id="consult-ztf" class="btn-light" onClick="needSubmitHandle('pc_data_custom_data', '中通服')">立即咨询</div>
+          </li>
+          <li class="case-item">
+            <img src='{{Msg "seo" "cdn"}}/dataSmt/images/case-cec.png' alt="中国电子">
+            <p>中国电子</p>
+            <div id="consult-zgdz" class="btn-light" onClick="needSubmitHandle('pc_data_custom_data', '中国电子')">立即咨询
             </div>
-          </div>
-          <div class="know-more" onClick="dataExport()"><em>&gt;</em>了解更多<em>&lt;</em></div>
-        </div>
-        <div class="con-card card2">
-          <img src='{{Msg "seo" "cdn"}}/frontRouter/pc/dataMarket/images/text2.png?v={{Msg "seo" "version"}}' alt="">
-          <p class="card-sub-title">打包成品,触手可得</p>
-          <div class="content">
-            <div class="c-row">
-              <span class="self-icon icon1"></span>
-              <div>
-                <p>招标数据</p>
-                <p>热门项目丨采购意向丨在建项目...</p>
-              </div>
+          </li>
+          <li class="case-item">
+            <img src='{{Msg "seo" "cdn"}}/dataSmt/images/case-soft.png' alt="东软集团">
+            <p>东软集团</p>
+            <div id="consult-drjt" class="btn-light" onClick="needSubmitHandle('pc_data_custom_data', '东软集团')">立即咨询
             </div>
-            <div class="c-row">
-              <span class="self-icon icon3"></span>
-              <div>
-                <p>企业数据</p>
-                <p>农林牧渔丨建筑业丨交通运输丨制造业...</p>
-              </div>
+          </li>
+          <li class="case-item">
+            <img src='{{Msg "seo" "cdn"}}/dataSmt/images/case-minsheng.png' alt="中国民生银行">
+            <p>中国民生银行</p>
+            <div id="consult-msyh" class="btn-light" onClick="needSubmitHandle('pc_data_custom_data', '中国民生银行')">立即咨询
             </div>
-            <div class="c-row">
-              <span class="self-icon icon4"></span>
-              <div>
-                <p>中标单位</p>
-                <p>政府丨教育丨工程丨医疗...</p>
-              </div>
+          </li>
+          <li class="case-item">
+            <img src='{{Msg "seo" "cdn"}}/dataSmt/images/case-siemens.png' alt="西门子医疗">
+            <p>西门子医疗</p>
+            <div id="consult-smz" class="btn-light" onClick="needSubmitHandle('pc_data_custom_data', '西门子医疗')">立即咨询
             </div>
-          </div>
-          <div class="common-btn long-btn" onClick="onlinekf()">立即咨询</div>
-          <div class="know-more" onClick="onlinekf()"><em>&gt;</em>了解更多<em>&lt;</em></div>
-        </div>
-        <div class="con-card card3">
-          <img src='{{Msg "seo" "cdn"}}/frontRouter/pc/dataMarket/images/text3.png?v={{Msg "seo" "version"}}' alt="">
-          <p class="card-sub-title">专属顾问,随心所欲</p>
-          <div class="content">
-            <img src='{{Msg "seo" "cdn"}}/frontRouter/pc/dataMarket/images/ring.png?v={{Msg "seo" "version"}}' alt="">
-            <div>
-              <span>数据筛选可定制</span>
-              <span>导出内容可定制</span>
-              <span>人机校验可选择</span>
+          </li>
+          <li class="case-item">
+            <img src='{{Msg "seo" "cdn"}}/dataSmt/images/case-liantong.png' alt="中国联通">
+            <p>中国联通</p>
+            <div id="consult-zglt" class="btn-light" onClick="needSubmitHandle('pc_data_custom_data', '中国联通')">立即咨询
             </div>
-          </div>
-          <div class="common-btn long-btn" onClick="leaveInfoHandle()">申请定制</div>
-          <div class="know-more" onClick="jumpCustomExport()"><em>&gt;</em>了解更多<em>&lt;</em></div>
-        </div>
+          </li>
+        </ul>
       </div>
     </div>
-  </section>
-
-</div>
-
-{{include "/common/pcbottom.html"}}
-<script src=//cdn-common.jianyu360.com/cdn/lib/vue/2.6.11/vue.min.js></script>
+  </div>
+  <!-- 大数据服务应用场景 -->
+  <div class="data-scene CfadeInUp">
+    <div class="w">
+      <h2 class="scene-title">大数据服务应用场景</h2>
+      <ul class="scene-container">
+        <li class="scene-item">
+          <h4>市场统计</h4>
+          <p>市场行情调研、市场占比分析、<br>市场容量预测</p>
+        </li>
+        <li class="scene-item">
+          <h4>对手分析</h4>
+          <p>对手市场范围、合作关系透视、<br>中标项目分析、企业工商信息、<br>企业综合实力评估</p>
+        </li>
+        <li class="scene-item">
+          <h4>投资决策</h4>
+          <p>行业热度趋势、市场区域分布、<br>重大项目</p>
+        </li>
+        <li class="scene-item">
+          <h4>商机超前预测</h4>
+          <p>超前商机项目、<br>下一阶段采购项目预测</p>
+        </li>
+      </ul>
+      <div class="scene-btn" onClick="needSubmitHandle('pc_market_ApplicationScenario')">
+        <span id="consult-scene-btn">立即咨询</span>
+      </div>
+    </div>
+  </div>
+  {{include "/common/pcbottom.html"}}
+</section>
+<div id="vue-collect-user-info"></div>
+</body>
+<script type="text/javascript" src='{{Msg "seo" "cdn"}}/js/public-nav.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/element-ui/2.15.7/lib/index.js"></script>
-<script src='{{Msg "seo" "cdn"}}/js/swiper.min.js'></script>
 <script src='{{Msg "seo" "cdn"}}/common-module/pc-dialog/js/leave-info-dialog.js?v={{Msg "seo" "version"}}'></script>
-<script type="text/javascript" >
-  $(function(){
-    haslogin({{.T.logid }});
-    // 模块文案上浮
-    animateUp();
-  });
-  // 留资
-  function leaveInfoHandle (source){
-    // 调用组件是否留资方法 传入一个来源对应模块 弹出弹框
-    vm.isNeedSubmit('pc_data_custom_data', function(){
-      vm.showSuccess = true
-    })
-    vm.isSelfHeader('leave-title-api.png')
-  }
-  function onlinekf () {
-    $('.help-slide-zx.open-customer').trigger('click')
-  }
-  function animateUp () {
-    var obj = $('.CfadeInUp');
-    var objH = $('.CfadeInUp').outerHeight();
-    var num = [];
-    var wH = $(window).height();
-    var wScrollTop = $(window).scrollTop();
-
-    // 获取页面所有obj的top位置,存入数组
-    for (var i = 0; i < obj.length; i++) {
-      num.push(obj.eq(i).offset().top + (objH / 3));
-    }
-    // 循环数组,判断obj的位置是否在可视区中
-    function judgeTop () {
-      for (var j = 0; j < num.length; j++) {
-        if (num[j] >= wScrollTop && num[j] < (wScrollTop + wH - 50)) {
-          if (j == 0) {
-            obj.eq(j).css({
-              'animation-name': 'CfadeInUp',
-              'animation-duration': 0.8 + 's',
-              'opacity': '1'
-            });
-          } else {
-            obj.eq(j).css({
-              'animation-name': 'CfadeInUp',
-              'animation-duration': 1.4 + 's',
-              'opacity': '1'
-            });
-          }
-        }
-      }
-    };
-    // 页面初始化时先调用一次
-    judgeTop();
-    // 触发滚动事件调用判断函数
-    $(window).scroll(function (event) {
-      wH = $(window).height();
-      wScrollTop = $(window).scrollTop();
-      judgeTop();
-    });
-  };
-  // 数据导出
-  function dataExport () {
+<script>
+  haslogin({{.T.logid}});
+  function goUseHandle(e) {
     if (!loginflag) {
-      openLoginDig(true, '/front/dataExport/toSieve')
+      openLoginDig()
+      return false
     } else {
-      location.href = "/front/dataExport/toSieve"
+      location.href = '/front/dataExport/toSieve'
     }
   }
-  //跳转到数据定制导出营销落地页
-  function jumpCustomExport () {
-    location.href = "/front/dataMarket/customExport"
+
+  /**
+   * name为立即咨询的企业名称(留资提交感兴趣内容字段)
+   * */
+  function needSubmitHandle(source, name) {
+    // 调用组件是否留资方法
+    vm.isNeedSubmit(source, function () {
+      vm.showSuccess = true
+    }, name)
   }
+
+  $(function () {
+    (function animateUp() {
+      var obj = $('.CfadeInUp');
+      var objH = $('.CfadeInUp').outerHeight();
+      var num = [];
+      var wH = $(window).height();
+      var wScrollTop = $(window).scrollTop();
+
+      // 获取页面所有obj的top位置,存入数组
+      for (var i = 0; i < obj.length; i++) {
+        num.push(obj.eq(i).offset().top + (objH / 3));
+      }
+
+      // 循环数组,判断obj的位置是否在可视区中
+      function judgeTop() {
+        for (var j = 0; j < num.length; j++) {
+          if (num[j] >= wScrollTop && num[j] < (wScrollTop + wH - 50)) {
+            if (j == 0) {
+              obj.eq(j).css({
+                'animation-name': 'CfadeInUp',
+                'animation-duration': 0.8 + 's',
+                'opacity': '1'
+              });
+            } else {
+              obj.eq(j).css({
+                'animation-name': 'CfadeInUp',
+                'animation-duration': 1.4 + 's',
+                'opacity': '1'
+              })
+            }
+          }
+        }
+      };
+      // 页面初始化时先调用一次
+      judgeTop()
+      docScroll()
+      // 触发滚动事件调用判断函数
+      $(window).scroll(function (event) {
+        wH = $(window).height()
+        wScrollTop = $(window).scrollTop();
+        judgeTop()
+        docScroll()
+      })
+    })()
+  })
 </script>
-<!--百度统计-->
 {{include "/common/baiducc.html"}}
-</body>
+
 </html>

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

@@ -563,7 +563,8 @@
             }
         }
   function onlinekf () {
-      $('.help-slide-zx.open-customer').trigger('click')
+      // $('.help-slide-zx.open-customer').trigger('click')
+      goCustomerUrl({ openNewWindow: true })
     }
 </script>
 {{include "/common/bidLeaveInfo.html"}}

+ 185 - 0
src/web/templates/pc/dataSmt/detail.html

@@ -0,0 +1,185 @@
+<!DOCTYPE html>
+<html>
+<head>
+  <title>{{.T.title}}</title>
+  <meta content="IE=edge,Chrome=1" http-equiv="X-UA-Compatible" />
+  <meta name="Keywords" content="{{.T.keywords}}"/>
+  <meta name="Description" content="{{.T.description}}" />
+  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
+  <meta name="renderer" content="webkit" >
+  <meta name="format-detection" content="telephone=no"/>
+  <meta name="enable-header" theme="light" content="数据超市"/>
+  {{include "/common/pnc.html"}}
+  <link href='{{Msg "seo" "cdn"}}/css/reset.css?v={{Msg "seo" "version"}}' rel="stylesheet" type="text/css" />
+  <link href='{{Msg "seo" "cdn"}}/css/subscribe.css?v={{Msg "seo" "version"}}' rel="stylesheet" type="text/css" />
+  <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 href="//cdn-common.jianyu360.com/cdn/lib/element-ui/2.15.7/lib/theme-chalk/index.css" rel="stylesheet">
+  <link href='{{Msg "seo" "cdn"}}/common-module/pc-dialog/css/leave-info-dialog.css?v={{Msg "seo" "version"}}' rel="stylesheet">
+  <link href='{{Msg "seo" "cdn"}}/css/dataSmt/dataMart_detail.css?v={{Msg "seo" "version"}}' rel="stylesheet" type="text/css" />
+  <link href='{{Msg "seo" "cdn"}}/common-module/viewer/viewer.css?v={{Msg "seo" "version"}}' rel="stylesheet"type="text/css" />
+  <style>
+  </style>
+</head>
+<body>
+{{include "/common/pchead.html"}}
+<div class="dataMart_detail">
+  <!-- 头部卡片 -->
+  <header class="detail_header">
+    <div  {{if eq .T.data.dataType "采购意向"}} class="cornerMark yellow"{{end}}
+    {{if eq .T.data.dataType "拟建项目"}} class="cornerMark blue"{{end}}
+    {{if eq .T.data.dataType "招标数据"}} class="cornerMark green"{{end}}
+    {{if eq .T.data.dataType "中标数据"}} class="cornerMark blueBlack"{{end}}
+    {{if eq .T.data.dataType "企业工商数据"}} class="cornerMark blue"{{end}}
+    {{if eq .T.data.dataType "中标单位数据"}} class="cornerMark blueBlack"{{end}}
+    {{if eq .T.data.dataType "采购单位数据"}} class="cornerMark yellow"{{end}}
+    ><p>{{.T.data.dataType}}</p></div>
+    <h1 class="title">{{.T.data.name}}</h1>
+    <div class="tag_box">
+      <p class="tag grayness">格式:{{.T.data.format}}</p>
+      {{if .T.data.clearStatusStr}}<p class="tag yellow">{{.T.data.clearStatusStr}}</p>{{end}}
+    </div>
+    <p class="desc">产品概述:{{.T.data.introduce}}</p>
+    <div class="button_box">
+      <button class="consult" id="consult_">立即咨询</button>
+      <button class="purchase" id="purchase_">申请购买</button>
+      <p class="dataCustomization">如不满足您的需求,您可<a class="highlight" id="dataCustomization_">申请数据定制></a></p>
+    </div>
+  </header>
+  <!-- 中间卡片 -->
+  <section class="middle">
+    <h1 class="title">核心优势</h1>
+    <div class="coreAdvantage">
+      <div class="item">
+        <div class="pos-img dataResource"></div>
+        <div class="box">
+          <h1>数据资源多</h1>
+          <p>专注招投标大数据行业8年,拥有千亿级招投标数据库。</p>
+        </div>
+      </div>
+      <div class="item">
+        <div class="pos-img coverageArea"></div>
+        <div class="box">
+          <h1>覆盖范围广</h1>
+          <p>招标信息实时更新,100%行业和地区覆盖。</p>
+        </div>
+      </div>
+      <div class="item">
+        <div class="pos-img service"></div>
+        <div class="box">
+          <h1>服务更全面</h1>
+          <p>7*24小时全面售后,专属客户经理对接,享优质服务。</p>
+        </div>
+      </div>
+      <div class="item">
+        <div class="pos-img professionalTeam"></div>
+        <div class="box">
+          <h1>团队更专业</h1>
+          <p>拥有专业资深数据服务团队、成熟的数据模型可快速交付。</p>
+        </div>
+      </div>
+    </div>
+    <h1 class="title">数据示例</h1>
+    <div class="table_content">
+      <p class="tableDescriptions">{{.T.data.describe}}</p>
+      <div class="table_img" id="galley">
+        <!-- 表格图片 -->
+        <img data-original="{{.T.data.dataExample}}?v={{Msg "seo" "version"}}" src="{{.T.data.dataExample}}?v={{Msg "seo" "version"}}" alt="表格">
+      </div>
+    </div>
+  </section>
+  <!-- 底部广告位 -->
+  <footer class="foot_">
+    <!-- <a href=""> -->
+      <img class="advertising" src="{{Msg "seo" "cdn"}}/images/dataSmt/foot_bg.png?v={{Msg "seo" "version"}}" alt="底部广告">
+    <!-- </a> -->
+  </footer>
+</div>
+<!-- 留资组件 -->
+<div id="vue-collect-user-info"></div>
+<script src='{{Msg "seo" "cdn"}}/js/public-nav.js?v={{Msg "seo" "version"}}' type="text/javascript"></script>
+<script src='{{Msg "seo" "cdn"}}/js/jquery.cookie.js?v={{Msg "seo" "version"}}' type="text/javascript"></script>
+<script src="//cdn-common.jianyu360.com/cdn/lib/countup/2.0.8/dist/countUp.js"></script>
+<script src='{{Msg "seo" "cdn"}}/common-module/viewer/viewer.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/element-ui/2.15.7/lib/index.js"></script>
+<script src='{{Msg "seo" "cdn"}}/common-module/pc-dialog/js/leave-info-dialog.js?v={{Msg "seo" "version"}}'></script>
+<script>
+  setNavTheme(firstTheme = 'light')
+  haslogin({{.T.logid}});
+  $(function(){
+    $('.dataMart_detail .purchase').on('click',function(){ // 购买
+      needSubmitHandle('pc_supermarket_details_buy', {{.T.data.name}}) // 此处第二个参数添加模板变量产品名称
+    })
+
+    $('.dataMart_detail .dataCustomization a').on('click',function(){ // 数据定制
+      needSubmitHandle('pc_supermarket_details_customization', {{.T.data.name}}) // 此处第二个参数添加模板变量产品名称
+    })
+    $('.dataMart_detail .consult').on('click',function(){
+       if (!loginflag) {
+        return openLoginDig()
+       }
+       goCustomerUrl({ openNewWindow: true })
+    })
+    // 首页底部广告位
+    {{$bottom:=(Ad "pc-datasmt-detail-bottom" -1 .Host)}}
+    console.log({{$bottom}})
+    var bottom_img = ({{$bottom}})
+    $('.advertising').attr('src', bottom_img[0].s_pic)
+    console.log(bottom_img[0].s_pic)
+    bright_title()
+  })
+  function needSubmitHandle (source, name){
+      // 调用组件是否留资方法
+      vm.isNeedSubmit(source, function(){
+        vm.showSuccess = true
+      }, name)
+    }
+function bright_title () {
+      var name = getParam('searchwords')
+      var liArr=$(".detail_header > .title")
+      var value= $(liArr).text()
+      if (value.indexOf(name) !== -1) {
+        $(liArr).html(replace_all(value, name, '<span class=\"highlight\">'+name+'</span>'))
+      }else{
+        name = decodeURIComponent(getParam('searchwords'))
+        if (value.indexOf(name) !== -1) {
+        $(liArr).html(replace_all(value, name, '<span class=\"highlight\">'+name+'</span>'))
+        }
+      }
+  }
+  function replace_all(str, find, replace) {
+    return str.replace(new RegExp(find, 'g'), replace);
+  }
+    function getParam (name) {
+        var reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)', 'i');
+        var r = window.location.search.substr(1).match(reg); //获取url中'?'符后的字符串并正则匹配
+
+        var context = '';
+        if (r != null) context = r[2];
+        // 释放变量
+        reg = null;
+        r = null;
+        return context == null || context == '' || context == 'undefined' ? '' : context;
+    }
+    window.addEventListener('DOMContentLoaded', function () {
+      var galley = document.getElementById('galley');
+      var viewer = new Viewer(galley, {
+        url: 'data-original',
+        // title: function (image) {
+        //   return  ' (' + (this.index + 1) + '/' + this.length + ')';
+        // },
+        title:false,
+        toolbar:false,
+        navbar:true
+      });
+    });
+
+</script>
+<!--S-百度统计-->
+{{include "/common/pcbottom.html"}}
+{{include "/common/baiducc.html"}}
+<!--E-百度统计-->
+</body>
+</html>

+ 262 - 0
src/web/templates/pc/dataSmt/list.html

@@ -0,0 +1,262 @@
+<!DOCTYPE html>
+<html>
+
+<head>
+  <title>{{.T.title}}</title>
+  <meta content="IE=edge,Chrome=1" http-equiv="X-UA-Compatible" />
+  <meta name="Keywords" content="{{.T.keywords}}"/>
+  <meta name="Description" content="{{.T.description}}" />
+  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
+  <meta name="renderer" content="webkit">
+  <meta name="format-detection" content="telephone=no"/>
+  <meta name="enable-header" theme="light" content="数据超市"/>
+  {{include "/common/pnc.html"}}
+  <link href='{{Msg "seo" "cdn"}}/css/reset.css?v={{Msg "seo" "version"}}' rel="stylesheet" type="text/css" />
+  <link href='{{Msg "seo" "cdn"}}/css/subscribe.css?v={{Msg "seo" "version"}}' rel="stylesheet" type="text/css" />
+  <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 href="//cdn-common.jianyu360.com/cdn/lib/element-ui/2.15.7/lib/theme-chalk/index.css" rel="stylesheet">
+  <link href='{{Msg "seo" "cdn"}}/common-module/pc-dialog/css/leave-info-dialog.css?v={{Msg "seo" "version"}}' rel="stylesheet">
+  <link href='{{Msg "seo" "cdn"}}/css/dataSmt/dataMart.css?v={{Msg "seo" "version"}}' rel="stylesheet" type="text/css" />
+  <style>
+  </style>
+</head>
+<body>
+{{include "/common/pchead.html"}}
+
+<div class="dataMart">
+  <header class="header">
+    <img src="{{Msg "seo" "cdn"}}/images/dataSmt/header.svg?v={{Msg "seo" "version"}}" alt="数据超市,提供海量热门行业数据,专业安全合规,成品数据一键下载。">
+    <!-- 搜索 -->
+    <div class="jy-dataMart-search">
+      <div class="search">
+        <form method="get" action="/datasmt/{{.T.dataType}}_1" class="form-search" id="dataMartForm"  onsubmit="return false;">
+          <input class="ser" onkeydown="onkeydowndataMart()" autocomplete="off"  type="text" name="searchValue" placeholder="请输入业务范围,如:物业管理" value="{{.T.searchValue}}"/>
+          <button class="btn" onclick="dataMartSearch()"></button>
+        </form>
+      </div>
+    </div>
+    <!-- 搜索结束 -->
+  </header>
+  {{$dataType := .T.dataType}}
+  <!-- 热搜词 -->
+  <section class="hotkeywords">
+    <p><img src="{{Msg "seo" "cdn"}}/images/dataSmt/hot_icon.png?v={{Msg "seo" "version"}}" alt="热搜icon">热搜:</p>
+    <div class="content">
+      {{range $k,$v := .T.hotKeys}}
+      <a href="/datasmt/{{$dataType}}_1?searchValue={{$v}}">{{$v}}</a>
+      {{end}}
+    </div>
+  </section>
+  <!-- 热搜词结束 -->
+  <section class="middle">
+    <!-- tab部分 -->
+    <div class="tabs_box">
+      <h1>数据类型</h1>
+      {{$searchValue := .T.searchValue}}
+      <div>
+        <a class=" {{if eq .T.dataType "index"}} active {{end}}"  href="/datasmt/index{{if $searchValue}}?searchValue={{$searchValue}}{{end}}">全部</a>
+        {{range $k,$v := .T.fieldIllustrate}}
+        <a {{if eq $dataType  $v.Code}} class="active" {{end}}  href="/datasmt/{{$v.Code}}_1{{if $searchValue}}?searchValue={{$searchValue}}{{end}}">{{$v.Name}}</a>
+        {{end}}
+      </div>
+      <a class="keys_desc">包含字段说明?</a>
+    </div>
+    <!-- tab结束 -->
+    <div class="list_container">
+      <div class="list_content">
+        <!-- 列表 -->
+        <ul class="list {{if eq (len .T.list) 0}} hide{{end}}">
+          {{range $k,$v := .T.list}}
+          <li class="item">
+            <div {{if eq $v.dataType "采购意向"}} class="cornerMark yellow"{{end}}
+            {{if eq $v.dataType "拟建项目"}} class="cornerMark blue"{{end}}
+            {{if eq $v.dataType "招标数据"}} class="cornerMark green"{{end}}
+            {{if eq $v.dataType "中标数据"}} class="cornerMark blueBlack"{{end}}
+            {{if eq $v.dataType "企业工商数据"}} class="cornerMark blue"{{end}}
+            {{if eq $v.dataType "中标单位数据"}} class="cornerMark blueBlack"{{end}}
+            {{if eq $v.dataType "采购单位数据"}} class="cornerMark yellow"{{end}}
+            ><p>{{$v.dataType}}</p>
+      </div>
+      <h1 class="title name" title="{{$v.name}}">{{$v.name}}</h1>
+      <div class="tag_box">
+        <p class="tag grayness">格式:{{$v.format}}</p>
+        {{if $v.clearStatusStr}}<p class="tag yellow">{{$v.clearStatusStr}}</p>{{end}}
+      </div>
+      <a class="seeDetail" onclick="dataSmtdetail({{$v.id}})">查看详情</a>
+      </li>
+      {{end}}
+      </ul>
+      <!-- 分页组件 -->
+      <div class="dataMart_pagination {{if eq (len .T.list) 0}} hide{{end}}">
+        {{include "/common/seo-pagination.html"}}
+      </div>
+      <!-- 无数据占位部分 -->
+      <div class="noData {{if gt (len .T.list) 0}} hide{{end}}">
+        <img src="{{Msg "seo" "cdn"}}/images/dataSmt/nodata.png?v={{Msg "seo" "version"}}" alt="暂无数据">
+        <p class="desc">对不起,未匹配到相关数据,为您推荐个性化数据定制,资深团队为您量身打造数据服务方案,可快速交付!</p>
+        <button class="dataCustomization" id="dataCustomization_">申请数据定制</button>
+      </div>
+      <!-- 无数据占位部分结束 -->
+    </div>
+</div>
+</section>
+<div class="recordPosition_advertising"></div>
+<!-- 底部广告位 -->
+<footer class="dataMart_advertising">
+  <!-- <a href=""> -->
+    <img class="advertising" src="{{Msg "seo" "cdn"}}/images/dataSmt/foot_bg.png?v={{Msg "seo" "version"}}" alt="底部广告">
+  <!-- </a> -->
+  <!-- 关闭按钮 -->
+  <img class="advertising_close" src="{{Msg "seo" "cdn"}}/images/dataSmt/close_w.png?v={{Msg "seo" "version"}}" alt="close">
+</footer>
+<!--  弹出表格框部分 -->
+<div class="dataMart_dialog">
+  <div class="content">
+    <img src="{{Msg "seo" "cdn"}}/images/dataSmt/close.png?v={{Msg "seo" "version"}}" alt="close" class="close_">
+    <h1>包含字段说明</h1>
+    <div class="table_box">
+      <table>
+        <thead>
+        <tr>
+          <th class="keys">数据类型</th>
+          <th class="values">包含字段</th>
+        </tr>
+        </thead>
+        <tbody>
+        {{range $k,$v := .T.fieldIllustrate}}
+        <tr>
+          <td class="keys">{{$v.Name}}</td>
+          <td class="values">{{$v.Describe}}</td>
+        </tr>
+        {{end}}
+        </tbody>
+      </table>
+    </div>
+  </div>
+</div>
+</div>
+<!-- 留资组件 -->
+<div id="vue-collect-user-info"></div>
+<script src='{{Msg "seo" "cdn"}}/js/public-nav.js?v={{Msg "seo" "version"}}' type="text/javascript"></script>
+<script src='{{Msg "seo" "cdn"}}/js/jquery.cookie.js?v={{Msg "seo" "version"}}' type="text/javascript"></script>
+<script src="//cdn-common.jianyu360.com/cdn/lib/countup/2.0.8/dist/countUp.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/element-ui/2.15.7/lib/index.js"></script>
+<script src='{{Msg "seo" "cdn"}}/common-module/pc-dialog/js/leave-info-dialog.js?v={{Msg "seo" "version"}}'></script>
+<script>
+  haslogin({{.T.logid}});
+  $(function(){
+    // initAdvertising()
+    brightKeyword()
+    // $(window).scroll(function() {
+    //   initAdvertising()
+    // });
+    $('.tabs_box>div a').on('click',function(){
+      $(this).addClass('active').siblings().removeClass('active')
+    })
+    $('.dataMart .dataCustomization').on('click',function(){
+      needSubmitHandle('pc_supermarket_Noresults_customization')
+    })
+    $('.dataMart .keys_desc').on('click',function(){
+      document.body.style.overflow = 'hidden';
+      $('.dataMart .dataMart_dialog').fadeIn()
+    })
+    $('.dataMart  .close_').on('click',function(){
+      document.body.style.overflow = 'visible';
+      $('.dataMart .dataMart_dialog').fadeOut()
+    })
+    $('.dataMart  .advertising_close').on('click',function(){
+      $('.dataMart .dataMart_advertising').hide()
+    })
+  })
+  function initAdvertising(){
+    var windowHeight = $(window).height(); // 可视窗口的高度
+    var scrollTop = $(window).scrollTop(); // 滚动条的位置
+    var elementTop = $('.dataMart .recordPosition_advertising').offset().top; // 元素距离文档顶部的位置
+    var elementHeight = $('.dataMart .recordPosition_advertising').height(); // 元素的高度
+
+    if (elementTop < scrollTop + windowHeight && elementTop + elementHeight > scrollTop) {
+      // 元素在可视窗口内
+      $('.dataMart .dataMart_advertising').removeClass('fixed_bottom')
+    } else {
+      // 元素不在可视窗口内
+      $('.dataMart .dataMart_advertising').addClass('fixed_bottom')
+    }
+
+  }
+  function onkeydowndataMart () {
+    if (window.event.keyCode == 13) {
+      dataMartSearch()
+      return
+    }
+  }
+  var  isNull =  {{.T.dataType}}=="index"
+  function dataMartSearch(){
+    var val_ = $('#dataMartForm .ser').val().replace(/\s+/g, "")
+    $('#dataMartForm .ser').val(val_)
+    if(!val_){
+      if (isNull) {
+        window.location.replace("/datasmt/index")
+      }else{
+        window.location.replace("/datasmt/{{.T.dataType}}_1")
+      }
+    }else{
+      window.location.replace("/datasmt/{{.T.dataType}}_1?searchValue=" + val_)
+    }
+  }
+  function dataSmtdetail (id){
+    if (getParam('searchValue')==""){
+      window.open('/datasmt/all/'+id)
+    }else {
+      window.open('/datasmt/all/' + id + '?searchwords=' + getParam('searchValue'))
+    }
+  }
+  function needSubmitHandle (source, name){
+    // 调用组件是否留资方法
+    vm.isNeedSubmit(source, function(){
+      vm.showSuccess = true
+    }, name)
+  }
+  function brightKeyword () {
+    //获取输入的词
+    var name = $('#dataMartForm .ser').val().replace(/\s+/g, "")
+    //获取框里边的值
+    var liArr=$(".list_content ul  li.item  h1")
+    for (let i = 0; i <liArr.length ; i++) {
+      var value= $(liArr[i]).text()
+      if (value.indexOf(name) !== -1) {
+        $(liArr[i]).html(replace_all(value, name, '<span class=\"highlight\">'+name+'</span>'))
+      }
+    }
+  }
+  function replace_all(str, find, replace) {
+    return str.replace(new RegExp(find, 'g'), replace);
+  }
+  function getParam (name) {
+        var reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)', 'i');
+        var r = window.location.search.substr(1).match(reg); //获取url中'?'符后的字符串并正则匹配
+
+        var context = '';
+        if (r != null) context = r[2];
+        // 释放变量
+        reg = null;
+        r = null;
+        return context == null || context == '' || context == 'undefined' ? '' : context;
+    }
+  // 首页底部广告位
+  {{$bottom:=(Ad "pc-datasmt-index-bottom" -1 .Host)}}
+  var bottom_img = ({{$bottom}})
+  $('.advertising').attr('src', bottom_img[0].s_pic)
+
+</script>
+<!--S-百度统计-->
+{{include "/common/pcbottom.html"}}
+{{include "/common/baiducc.html"}}
+<!--E-百度统计-->
+<script>
+</script>
+</body>
+</html>
+

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

@@ -114,9 +114,9 @@
               <div class="left violet">数据市场</div>
               <div class="right">
                 <a href="/front/dataExport/toSieve">自助数据导出</a>
-                <!-- <a href="/front/dataMarket/index">数据超市</a> -->
                 <a href="/front/dataMarket/customExport">数据定制</a>
                 <a href="/front/dataMarket/dataInterface">数据API</a>
+                <a href="/datasmt/list">数据超市</a>
               </div>
             </div>
           </div>

+ 8 - 2
src/web/templates/pc/supsearch.html

@@ -1619,7 +1619,7 @@
     if (goTemplateData && goTemplateData.params) {
       // P260需求精准搜索无结果时 自动切换到模糊搜索(查询) 模糊搜索也无结果时再切回精准(不查询)
       // 条件:1.精准搜索模式 2.返回无数据 3.有主关键词或附加词
-      var jzModel = goTemplateData.params.searchMode == 0 && (goTemplateData.params.searchvalue || goTemplateData.params.additionalWords) && goTemplateData.params.list == null
+      var jzModel = goTemplateData.params.searchMode == 0 && (goTemplateData.params.searchvalue || goTemplateData.params.additionalWords) && goTemplateData.params.listLength == 0
       var mhModel = goTemplateData.params.searchMode == 1 && (goTemplateData.params.searchvalue || goTemplateData.params.additionalWords)
       console.log(jzModel, autoSwitchModel);
       if (jzModel && !autoSwitchModel) {
@@ -1628,17 +1628,23 @@
         searchInnerVue.keywordSearchType = 1
         beforeSubmit('filter-mode')
       }
+          console.log(111)
       if (mhModel && autoSwitchModel) {
-        if (goTemplateData.params.list) {
+          console.log("bbb")
+        if (goTemplateData.params.listLength>0) {
+          console.log("ccc")
           toastFn('精准搜索无结果,已为您自动切换到模糊搜索', 5000)
           autoSwitchModel = false
         } else {
+          console.log("ddd")
           // 模糊搜索无结果时 再切回精准
           $("#zbSeatchT [name='searchMode']").val(0)
           searchInnerVue.keywordSearchType = 0
           autoSwitchModel = false
         }
       }
+      console.log(mhModel)
+      console.log( autoSwitchModel)
     }
     if(!loginflag){//未登录隐藏
       $('#go-customer-4').addClass('hide')

Some files were not shown because too many files changed in this diff