|
|
@@ -7,7 +7,7 @@ import ( |
|
|
|
"time" |
|
|
|
) |
|
|
|
|
|
|
|
//第一次授权 |
|
|
|
// 第一次授权 |
|
|
|
func OpenFirstAuth(args map[string]string) map[string]string { |
|
|
|
params := map[string]string{"code": args["code"], "grant_type": args["grantType"]} |
|
|
|
send, err := OpenSend(args["appkey"], args["appSecret"], "oauth/access_token", params, args["acctoken"]) |
|
|
@@ -68,8 +68,16 @@ func GetBuyinId(args map[string]interface{}) (string, error) { |
|
|
|
fmt.Println(err) |
|
|
|
return send, err |
|
|
|
} |
|
|
|
func GetProductsDetails(args map[string]interface{}) (string, error) { |
|
|
|
fmt.Println(args) |
|
|
|
params := map[string]interface{}{"product_ids": args["product_ids"], "with_detail_brief": true} |
|
|
|
send, err := OpenSendApi("alliance/kol/materials/products/details/?open_id="+zhios_third_party_utils.AnyToString(args["open_id"]), params, zhios_third_party_utils.AnyToString(args["acctoken"])) |
|
|
|
fmt.Println(send) |
|
|
|
fmt.Println(err) |
|
|
|
return send, err |
|
|
|
} |
|
|
|
|
|
|
|
//商品加橱窗 |
|
|
|
// 商品加橱窗 |
|
|
|
func OpenStoreAdd(args map[string]interface{}) (string, error) { |
|
|
|
/** |
|
|
|
products []AddStoreProductInfo |
|
|
@@ -86,7 +94,7 @@ func OpenStoreAdd(args map[string]interface{}) (string, error) { |
|
|
|
return send, err |
|
|
|
} |
|
|
|
|
|
|
|
//达人订单 |
|
|
|
// 达人订单 |
|
|
|
func OpenKolOrders(args map[string]interface{}) (string, error) { |
|
|
|
/** |
|
|
|
size int64 是 10 每页订单数目,取值区间: [1, 20] |
|
|
@@ -108,7 +116,7 @@ func OpenKolOrders(args map[string]interface{}) (string, error) { |
|
|
|
return send, err |
|
|
|
} |
|
|
|
|
|
|
|
//达人带货口碑分和橱窗销量查询 |
|
|
|
// 达人带货口碑分和橱窗销量查询 |
|
|
|
func OpenKolReputation(args map[string]interface{}) (string, error) { |
|
|
|
/** |
|
|
|
|
|
|
@@ -121,7 +129,7 @@ func OpenKolReputation(args map[string]interface{}) (string, error) { |
|
|
|
return send, err |
|
|
|
} |
|
|
|
|
|
|
|
//橱窗商品隐藏/显示接口 |
|
|
|
// 橱窗商品隐藏/显示接口 |
|
|
|
func OpenStoreHideStatus(args map[string]interface{}) (string, error) { |
|
|
|
/** |
|
|
|
products []BatchHideEditProductInfo |
|
|
@@ -138,7 +146,7 @@ func OpenStoreHideStatus(args map[string]interface{}) (string, error) { |
|
|
|
return send, err |
|
|
|
} |
|
|
|
|
|
|
|
//达人橱窗商品列表 |
|
|
|
// 达人橱窗商品列表 |
|
|
|
func OpenKolStoreList(args map[string]interface{}) (string, error) { |
|
|
|
/** |
|
|
|
page int64 1 分页[1,20] |
|
|
@@ -152,7 +160,7 @@ func OpenKolStoreList(args map[string]interface{}) (string, error) { |
|
|
|
return send, err |
|
|
|
} |
|
|
|
|
|
|
|
//达人橱窗商品删除 |
|
|
|
// 达人橱窗商品删除 |
|
|
|
func OpenKolStoreRemove(args map[string]interface{}) (string, error) { |
|
|
|
/** |
|
|
|
product_id int64 3450632721376902816 商品ID |
|
|
@@ -166,7 +174,7 @@ func OpenKolStoreRemove(args map[string]interface{}) (string, error) { |
|
|
|
return send, err |
|
|
|
} |
|
|
|
|
|
|
|
//获取用户数据 |
|
|
|
// 获取用户数据 |
|
|
|
func OpenKolUserInfo(args map[string]string) (string, error) { |
|
|
|
fmt.Println(args) |
|
|
|
params := map[string]string{"open_id": args["open_id"]} |
|
|
|