浏览代码

小说

master
huangjiajun 8 个月前
父节点
当前提交
3d1f55387b
共有 2 个文件被更改,包括 44 次插入0 次删除
  1. +32
    -0
      playlet_kujiang/api.go
  2. +12
    -0
      playlet_kujiang/playlet_kujiang.go

+ 32
- 0
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))
}

+ 12
- 0
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
}

正在加载...
取消
保存