Commit d9bd172e by huangchengyi

1.0

parent 82be365a
Showing with 2 additions and 3 deletions
...@@ -6,7 +6,6 @@ import ( ...@@ -6,7 +6,6 @@ import (
"github.com/gogf/gf/util/gconv" "github.com/gogf/gf/util/gconv"
"github.com/iancoleman/orderedmap" "github.com/iancoleman/orderedmap"
"github.com/imroc/req" "github.com/imroc/req"
"github.com/syyongx/php2go"
"github.com/tidwall/gjson" "github.com/tidwall/gjson"
"search_server/model" "search_server/model"
"search_server/pkg/common" "search_server/pkg/common"
...@@ -90,7 +89,7 @@ func OutLinkSource(ctx *gin.Context,goodsName *string) *orderedmap.OrderedMap { ...@@ -90,7 +89,7 @@ func OutLinkSource(ctx *gin.Context,goodsName *string) *orderedmap.OrderedMap {
desc := a.Get("description").String() //描述 desc := a.Get("description").String() //描述
go func() { go func() {
fmt.Println(php2go.Time()) //fmt.Println(php2go.Time())
B := orderedmap.New() B := orderedmap.New()
B.Set("goods_sn",goods_sn) B.Set("goods_sn",goods_sn)
B.Set("goods_name",goods_name) B.Set("goods_name",goods_name)
...@@ -131,7 +130,7 @@ func GetSourceInfo(ctx *gin.Context,B *orderedmap.OrderedMap) bool { ...@@ -131,7 +130,7 @@ func GetSourceInfo(ctx *gin.Context,B *orderedmap.OrderedMap) bool {
goods_sn,_ := B.Get("goods_sn") goods_sn,_ := B.Get("goods_sn")
skuInfo := GetSourceGineData(ctx,fmt.Sprintf(SourceSkuPriceUrl,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"}}}`; //$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() priceGoodsList := gjson.Get(skuInfo,"results").Array()
common.PrintDebugHtml(ctx,priceGoodsList) common.PrintDebugHtml(ctx,priceGoodsList)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment