From 3d1f55387b6b5c9f4a7dc5f612ee799f2f19ceba Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Fri, 23 Feb 2024 18:14:11 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=8F=E8=AF=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- playlet_kujiang/api.go | 32 ++++++++++++++++++++++++++++++ playlet_kujiang/playlet_kujiang.go | 12 +++++++++++ 2 files changed, 44 insertions(+) create mode 100644 playlet_kujiang/api.go create mode 100644 playlet_kujiang/playlet_kujiang.go diff --git a/playlet_kujiang/api.go b/playlet_kujiang/api.go new file mode 100644 index 0000000..178e810 --- /dev/null +++ b/playlet_kujiang/api.go @@ -0,0 +1,32 @@ +package playlet_bihai + +import ( + "code.fnuoos.com/go_rely_warehouse/zyos_go_third_party_api.git/comm" + zhios_third_party_utils "code.fnuoos.com/go_rely_warehouse/zyos_go_third_party_api.git/utils" + "fmt" + "github.com/syyongx/php2go" + "strings" +) + +func SendPost(method string, token string, param map[string]string) (string, error) { + url := "https://api.dpxkjw.com/" + method + arr := map[string]string{ + "timestamp": param["timestamp"], + "apiKey": param["apiKey"], + } + param["sign"] = GetSign(arr, token) + get, err := zhios_third_party_utils.CurlPost(url, param, nil) + fmt.Println(string(get)) + fmt.Println(err) + return string(get), err +} +func GetSign(param map[string]string, signSecret string) string { + str := "" + keys := comm.KsortToStr(param) + for _, k := range keys { + str += param[k] + + } + str += signSecret + return strings.ToUpper(php2go.Md5(str)) +} diff --git a/playlet_kujiang/playlet_kujiang.go b/playlet_kujiang/playlet_kujiang.go new file mode 100644 index 0000000..ffe15a7 --- /dev/null +++ b/playlet_kujiang/playlet_kujiang.go @@ -0,0 +1,12 @@ +package playlet_bihai + +//https://talent.lanyuexing.com//#/apiJoggle + +func VideoList(token string, args map[string]string) (string, error) { + post, err := SendPost("api/get-mcn-drama-list", token, args) + return post, err +} +func VideoUrl(token string, args map[string]string) (string, error) { + post, err := SendPost("api/save-mcn-spread-data", token, args) + return post, err +}