1 Star 1 Fork 1

xiaoyutab / xgotool

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
get-result-simple.go 820 Bytes
一键复制 编辑 原始数据 按行查看 历史
xiaoyutab 提交于 2024-04-30 10:16 . 调整目录结构和依赖位置
package xfaceprint
import (
"gitee.com/xiaoyutab/xgotool/https"
"gitee.com/xiaoyutab/xgotool/individual/xlog"
)
// 获取认证图片
//
// verify_token 识别token
func GetResultSimple(verify_token string) (string, error) {
type results struct {
Image string `json:"image" form:"image"`
}
type temp_struct struct {
Success bool `json:"success" form:"success"`
Result results `json:"result" form:"result"`
LogId string `json:"log_id" form:"log_id"`
}
temp := temp_struct{}
err := https.New(_default.Domain + "rpc/2.0/brain/solution/faceprint/result/simple?access_token=" + GetAccessToken()).
ParamJson(map[string]any{
"verify_token": verify_token,
}).
PostJson().
Json(&temp)
if err != nil {
return "", xlog.AE("认证图片获取失败", err)
}
return temp.Result.Image, nil
}
Go
1
https://gitee.com/xiaoyutab/xgotool.git
git@gitee.com:xiaoyutab/xgotool.git
xiaoyutab
xgotool
xgotool
v0.3.9

搜索帮助