Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
杨树贤
/
search_server
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
d9bd172e
authored
Dec 16, 2020
by
huangchengyi
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
1.0
parent
82be365a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
service/ly/sourcengine.go
service/ly/sourcengine.go
View file @
d9bd172e
...
...
@@ -6,7 +6,6 @@ import (
"github.com/gogf/gf/util/gconv"
"github.com/iancoleman/orderedmap"
"github.com/imroc/req"
"github.com/syyongx/php2go"
"github.com/tidwall/gjson"
"search_server/model"
"search_server/pkg/common"
...
...
@@ -90,7 +89,7 @@ func OutLinkSource(ctx *gin.Context,goodsName *string) *orderedmap.OrderedMap {
desc
:=
a
.
Get
(
"description"
)
.
String
()
//描述
go
func
()
{
fmt
.
Println
(
php2go
.
Time
())
//
fmt.Println(php2go.Time())
B
:=
orderedmap
.
New
()
B
.
Set
(
"goods_sn"
,
goods_sn
)
B
.
Set
(
"goods_name"
,
goods_name
)
...
...
@@ -131,7 +130,7 @@ func GetSourceInfo(ctx *gin.Context,B *orderedmap.OrderedMap) bool {
goods_sn
,
_
:=
B
.
Get
(
"goods_sn"
)
skuInfo
:=
GetSourceGineData
(
ctx
,
fmt
.
Sprintf
(
SourceSkuPriceUrl
,
goods_sn
))
fmt
.
Println
(
"请求价格开始:"
,
php2go
.
Time
(),
fmt
.
Sprintf
(
SourceSkuPriceUrl
,
goods_sn
))
//
fmt.Println("请求价格开始:",php2go.Time(),fmt.Sprintf(SourceSkuPriceUrl,goods_sn))
//$skuPriceRes = `{"total":3,"results":[{"offerPlatformId":"8718009643","mpq":1,"quantity":2277626,"priceTiers":[{"moq":807,"price":"0.06820"}],"deliveryDays":5,"vendor":{"type":"factory_direct"},"dateCode":null,"isDateCodeWithin2Years":true,"availabilityType":"stock","packagingType":"tube","packagingCondition":"full"},{"offerPlatformId":"8715417520","mpq":1,"quantity":1520,"priceTiers":[{"moq":709,"price":"0.07768"}],"deliveryDays":7,"vendor":{"type":"authorised_distributor"},"dateCode":null,"isDateCodeWithin2Years":true,"availabilityType":"stock","packagingType":"tape_reel","packagingCondition":"full"},{"offerPlatformId":"8715417522","mpq":1,"quantity":283206,"priceTiers":[{"moq":709,"price":"0.07768"}],"deliveryDays":167,"vendor":{"type":"authorised_distributor"},"dateCode":null,"isDateCodeWithin2Years":true,"availabilityType":"lead_time","packagingType":"tape_reel","packagingCondition":"full"}],"facets":{"vendorTypes":[{"value":"authorised_distributor","label":"authorised_distributor","count":2},{"value":"factory_direct","label":"factory_direct","count":1}],"availabilityTypes":[{"value":"lead_time","label":"lead_time","count":1},{"value":"stock","label":"stock","count":2}],"packagingConditions":[{"value":"full","label":"full","count":3}],"packagingTypes":[{"value":"tape_reel","label":"tape_reel","count":2},{"value":"tube","label":"tube","count":1}]},"_links":{"schema":{"href":"/api/schemas/part-offer-search.json"}}}`;
priceGoodsList
:=
gjson
.
Get
(
skuInfo
,
"results"
)
.
Array
()
common
.
PrintDebugHtml
(
ctx
,
priceGoodsList
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment