23 lines
630 B
Go
23 lines
630 B
Go
package lib
|
|
|
|
import (
|
|
"github.com/silenceper/wechat/v2/cache"
|
|
"testing"
|
|
)
|
|
|
|
func TestWechatOffical_SendTemplateMessage(t *testing.T) {
|
|
memory := cache.NewMemory()
|
|
offical := NewWechatOffical("wx302b154e07c1b830", "1642b9e3ec4db1ea082f27ef32380ab8", "taoshihan", memory)
|
|
messages := []map[string]string{
|
|
{"key": "thing4", "value": "我想购买客服系统"},
|
|
{"key": "thing13", "value": "老狼"},
|
|
{"key": "time14", "value": "2023-07-27 10:10:10"},
|
|
}
|
|
offical.SendTemplateMessage(
|
|
[]string{"ox8mo6F3XddfkoJvkykxIp64gg4M"},
|
|
"OGrBfbpZWbpNDh8Z61MzzboPqldXbe2aqNT1BmIOkP8",
|
|
"https://gofly.v1kf.com",
|
|
messages,
|
|
)
|
|
}
|