Compare commits
No commits in common. "5a8de98af3bc947ec453539de5b2f201b2510cf3" and "b29010cac6fd9c87092a4e2999fc865b8d879659" have entirely different histories.
5a8de98af3
...
b29010cac6
@ -2,7 +2,6 @@ package sms
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/requests"
|
||||
"testing"
|
||||
)
|
||||
|
||||
@ -38,9 +37,9 @@ func TestClient_SendEmail(t *testing.T) {
|
||||
|
||||
func TestClient_SendFeiShuWebHook(t *testing.T) {
|
||||
//req := CreateSendFeiShuWebHookRequest(SendFeiShuWebHookParam{
|
||||
// Do: FeiShuWebHookDoTypeSendRichText,
|
||||
// Do: "sendCardText",
|
||||
// Token: "b762f80c-fe4f-4182-b48e-5c78041592bc",
|
||||
// Content: "[[{\"tag\":\"text\",\"text\":\"富文本信息: \"},{\"tag\":\"a\",\"text\":\"请查看\",\"href\":\"http://www.example.com/\"},{\"tag\":\"at\",\"user_id\":\"ou_18eac8********17ad4f02e8bbbb\"}]]",
|
||||
// Content: "[{\"tag\":\"div\",\"text\":{\"tag\":\"plain_text\",\"content\":\"请完成以下任务:\"}},{\"tag\":\"action\",\"actions\":[{\"tag\":\"button\",\"text\":{\"tag\":\"plain_text\",\"content\":\"查看详情\"},\"type\":\"primary\",\"url\":\"https:\\\\\\\\/\\\\\\\\/example.com\\\\\\\\/task\"}]}]",
|
||||
// Title: "卡片主标题",
|
||||
// TitleColor: "purple",
|
||||
//})
|
||||
@ -49,10 +48,10 @@ func TestClient_SendFeiShuWebHook(t *testing.T) {
|
||||
//if err != nil {
|
||||
// panic(err)
|
||||
//}
|
||||
//fmt.Println(resp.Msg)
|
||||
|
||||
//fmt.Println(resp)
|
||||
//
|
||||
//req2 := CreateSendFeiShuWebHookRequest(SendFeiShuWebHookParam{
|
||||
// Do: FeiShuWebHookDoTypeSendSimpleText,
|
||||
// Do: "sendSimpleText",
|
||||
// Token: "b762f80c-fe4f-4182-b48e-5c78041592bc",
|
||||
// Content: " - 苹果ID:XXXX\n - 游戏ID:XXXX\n - bundleID:XXXX\n - 应用名:XXX\n - 下架时间:2025-04-18 12:36:52\n - IP:XX(城市A省份)、XX(城市B省份);说明:XX为具体的IP,括号内为IP对应的城市;",
|
||||
//})
|
||||
@ -81,7 +80,7 @@ func TestClient_SendFeiShuWebHook(t *testing.T) {
|
||||
req3 := CreateSendFeiShuWebHookRequest(SendFeiShuWebHookParam{
|
||||
TitleColor: "purple",
|
||||
Title: "监控报警",
|
||||
Do: FeiShuWebHookDoTypeSendCardText,
|
||||
Do: "sendCardText",
|
||||
Token: "b762f80c-fe4f-4182-b48e-5c78041592bc",
|
||||
Content: "[{\"tag\":\"div\",\"text\":{\"tag\":\"plain_text\",\"content\":\"苹果ID:XXXX\"}},{\"tag\":\"div\",\"text\":{\"tag\":\"plain_text\",\"content\":\"游戏ID:XXXX\"}}]",
|
||||
})
|
||||
@ -97,15 +96,11 @@ func TestClient_SendFeiShuWebHook(t *testing.T) {
|
||||
func TestClient_SendSms(t *testing.T) {
|
||||
req := CreateSendSmsRequest(SendSmsParam{
|
||||
Mobile: "18320021439",
|
||||
Type: SmsTypeBindPhone,
|
||||
Type: SmsTypeRegister,
|
||||
Code: 123456,
|
||||
Expired: 5,
|
||||
})
|
||||
|
||||
req.Domain = requests.Host{
|
||||
Default: "127.0.0.1:8804",
|
||||
}
|
||||
|
||||
sms, err := client.SendSms(req)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
|
@ -19,16 +19,8 @@ type SendFeiShuWebHookResponse struct {
|
||||
FeishuData string `json:"feishu_data"`
|
||||
}
|
||||
|
||||
type FeiShuWebHookDoType = string
|
||||
|
||||
const (
|
||||
FeiShuWebHookDoTypeSendSimpleText FeiShuWebHookDoType = "sendSimpleText"
|
||||
FeiShuWebHookDoTypeSendRichText FeiShuWebHookDoType = "sendRichText"
|
||||
FeiShuWebHookDoTypeSendCardText FeiShuWebHookDoType = "sendCardText"
|
||||
)
|
||||
|
||||
type SendFeiShuWebHookParam struct {
|
||||
Do FeiShuWebHookDoType
|
||||
Do string
|
||||
Token string
|
||||
Content string
|
||||
Title string
|
||||
|
@ -21,7 +21,6 @@ type SmsType = string
|
||||
|
||||
const (
|
||||
SmsTypeRegister SmsType = "reg" // 注册
|
||||
SmsTypeBindPhone SmsType = "bind_phone" // 绑定手机号
|
||||
)
|
||||
|
||||
type SendSmsParam struct {
|
||||
|
Loading…
Reference in New Issue
Block a user