瀏覽代碼

更新

master
huangjiajun 1 年之前
父節點
當前提交
a4f0d4364d
共有 2 個檔案被更改,包括 34 行新增0 行删除
  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 查看文件

@@ -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 查看文件

@@ -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…
取消
儲存