feat(api): 接入微信登录并原生实现咨询域(ECR-049/050)

小程序可在 Go 上完成微信手机号登录、测评、预约和下单,不再反代 Java。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
jackyu66git
2026-09-15 00:26:29 +08:00
co-authored by Cursor
parent db4d118f9a
commit 7155b8b53a
45 changed files with 3013 additions and 27 deletions
+17
View File
@@ -0,0 +1,17 @@
package wechatpay
import (
"crypto/md5"
"encoding/hex"
"strings"
"testing"
)
func TestSignMD5(t *testing.T) {
got := SignMD5(map[string]string{"appid": "wx123", "mch_id": "foo", "sign": "x"}, "k")
sum := md5.Sum([]byte("appid=wx123&mch_id=foo&key=k"))
want := strings.ToUpper(hex.EncodeToString(sum[:]))
if got != want {
t.Fatalf("got %s want %s", got, want)
}
}