Merge pull request 'hotfix' (#54) from hotfix into main
All checks were successful
BuildImage / build-image (push) Successful in 2m9s
All checks were successful
BuildImage / build-image (push) Successful in 2m9s
Reviewed-on: #54
This commit is contained in:
commit
74f19e9d03
@ -4,6 +4,7 @@ import (
|
|||||||
"github.com/go-resty/resty/v2"
|
"github.com/go-resty/resty/v2"
|
||||||
"go-wechat/utils"
|
"go-wechat/utils"
|
||||||
"log"
|
"log"
|
||||||
|
"net/http"
|
||||||
)
|
)
|
||||||
|
|
||||||
// KfcCrazyThursdayCmd
|
// KfcCrazyThursdayCmd
|
||||||
@ -33,8 +34,9 @@ func kfcApi1() string {
|
|||||||
res := resty.New()
|
res := resty.New()
|
||||||
resp, err := res.R().
|
resp, err := res.R().
|
||||||
Post("https://api.jixs.cc/api/wenan-fkxqs/index.php")
|
Post("https://api.jixs.cc/api/wenan-fkxqs/index.php")
|
||||||
if err != nil {
|
if err != nil || resp.StatusCode() != http.StatusOK {
|
||||||
log.Panicf("KFC接口1文案获取失败: %s", err.Error())
|
log.Printf("KFC接口1文案获取失败: %v", err)
|
||||||
|
return ""
|
||||||
}
|
}
|
||||||
log.Printf("KFC接口1文案获取结果: %s", resp.String())
|
log.Printf("KFC接口1文案获取结果: %s", resp.String())
|
||||||
return resp.String()
|
return resp.String()
|
||||||
@ -58,8 +60,9 @@ func kfcApi2() string {
|
|||||||
resp, err := res.R().
|
resp, err := res.R().
|
||||||
SetResult(&resData).
|
SetResult(&resData).
|
||||||
Post("https://api.jixs.cc/api/wenan-fkxqs/index.php")
|
Post("https://api.jixs.cc/api/wenan-fkxqs/index.php")
|
||||||
if err != nil {
|
if err != nil || resp.StatusCode() != http.StatusOK {
|
||||||
log.Panicf("KFC接口2文案获取失败: %s", err.Error())
|
log.Printf("KFC接口2文案获取失败: %v", err)
|
||||||
|
return ""
|
||||||
}
|
}
|
||||||
log.Printf("KFC接口2文案获取结果: %s", resp.String())
|
log.Printf("KFC接口2文案获取结果: %s", resp.String())
|
||||||
if resData.Data.Msg != "" {
|
if resData.Data.Msg != "" {
|
||||||
@ -84,8 +87,9 @@ func kfcApi3() string {
|
|||||||
resp, err := res.R().
|
resp, err := res.R().
|
||||||
SetResult(&resData).
|
SetResult(&resData).
|
||||||
Post("https://api.pearktrue.cn/api/kfc")
|
Post("https://api.pearktrue.cn/api/kfc")
|
||||||
if err != nil {
|
if err != nil || resp.StatusCode() != http.StatusOK {
|
||||||
log.Panicf("KFC接口3文案获取失败: %s", err.Error())
|
log.Printf("KFC接口3文案获取失败: %v", err)
|
||||||
|
return ""
|
||||||
}
|
}
|
||||||
log.Printf("KFC接口3文案获取结果: %s", resp.String())
|
log.Printf("KFC接口3文案获取结果: %s", resp.String())
|
||||||
if resData.Text != "" {
|
if resData.Text != "" {
|
||||||
|
Loading…
Reference in New Issue
Block a user