增强和平小店账号管理

This commit is contained in:
yml2213
2026-08-09 09:18:41 +08:00
parent dde2b43d82
commit c6f16dfbee
15 changed files with 1085 additions and 45 deletions
+5 -1
View File
@@ -147,7 +147,7 @@ func TestProductsAutomaticallyResolvesXiaodianRoleAndPaginates(t *testing.T) {
if got := r.URL.Query().Get("_act_id"); got != "46195" {
t.Errorf("_act_id = %q", got)
}
_, _ = w.Write([]byte(`var info = {"gameOpenId":"openid","roleId":1192083858,"type":"qq","area":1};`))
_, _ = w.Write([]byte(`var info = {"gameOpenId":"openid","roleId":1192083858,"roleName":"测试角色","type":"qq","area":1};`))
case "/role/":
switch r.URL.Query().Get("_jsvar") {
case "banlanceInfo":
@@ -232,6 +232,10 @@ func TestProductsAutomaticallyResolvesXiaodianRoleAndPaginates(t *testing.T) {
if assets.Coupons != 8800 || assets.Fragments != 36 {
t.Fatalf("资产 = %#v", assets)
}
role, err := cli.XiaodianRole("acf_uid=uid; acf_stk=stk; acf_ltkid=ltkid")
if err != nil || role.RoleName != "测试角色" || role.AreaID != 2 {
t.Fatalf("角色 = %#v, err=%v", role, err)
}
}
func TestXiaodianExchangeProductUsesLiveBuyPayTypes(t *testing.T) {