Browse Source

更新

master
huangjiajun 1 year ago
parent
commit
a4f0d4364d
2 changed files with 34 additions and 0 deletions
  1. +23
    -0
      md/tik_tok_goods.go
  2. +11
    -0
      tik_tok/svc_tik_tok_goods.go

+ 23
- 0
md/tik_tok_goods.go View File

@@ -0,0 +1,23 @@
package md

type PicturesData struct {
BigPicture string `json:"big_picture"`
LittlePicture string `json:"little_picture"`
}
type SkusData struct {
EffectivePrice int `json:"effective_price"`
SkuId int64 `json:"sku_id"`
StockNum int `json:"stock_num"`
}
type SpecsData struct {
Name string `json:"name"`
SpecItems []struct {
Id string `json:"id"`
Name string `json:"name"`
} `json:"spec_items"`
}
type SkuData struct {
Pictures map[string]PicturesData `json:"pictures"`
Skus map[string]SkusData `json:"skus"`
Specs []SpecsData `json:"specs"`
}

+ 11
- 0
tik_tok/svc_tik_tok_goods.go View File

@@ -1,6 +1,7 @@
package tik_tok

import (
"code.fnuoos.com/go_rely_warehouse/zyos_go_third_party_api.git/md"
zhios_third_party_utils "code.fnuoos.com/go_rely_warehouse/zyos_go_third_party_api.git/utils"
"encoding/json"
"fmt"
@@ -109,6 +110,16 @@ func GetDetail(args map[string]string) TikTokGoods {
//
return goodsList
}
func GetDetailSku(args map[string]string, id int64) md.SpecsData {
params := map[string]interface{}{"product_id": id}
send, err := Send(args["appkey"], args["appSecret"], "buyin.productSkus", params, args["acctoken"])
var goodsList = md.SpecsData{}
product := gjson.Get(send, "data.data").String()
if err != nil || product == "" {
return goodsList
}
return goodsList
}

//详情
func GetDetailMore(args map[string]string) *[]TikTokGoods {


Loading…
Cancel
Save