mirror of
https://shylinux.com/x/community
synced 2025-04-25 17:48:06 +08:00
add some
This commit is contained in:
parent
8cda9be1b6
commit
5de7c6a3a2
@ -2,7 +2,7 @@ package gonganxitong
|
||||
|
||||
import (
|
||||
"shylinux.com/x/ice"
|
||||
"shylinux.com/x/toolkits"
|
||||
kit "shylinux.com/x/toolkits"
|
||||
|
||||
"shylinux.com/x/community/src/gonganxitong/model"
|
||||
)
|
||||
@ -10,6 +10,7 @@ import (
|
||||
type paymentlist struct {
|
||||
Table
|
||||
order string `data:"91"`
|
||||
auth_uid string `data:""`
|
||||
fields string `data:"user_uid,paymentlist_status,amount,title,content"`
|
||||
create string `name:"create amount* title* content" role:"leader"`
|
||||
payfor string `name:"payfor" help:"支付" style:"notice" role:"void"`
|
||||
|
@ -5,7 +5,7 @@ import (
|
||||
|
||||
"shylinux.com/x/ice"
|
||||
"shylinux.com/x/icebergs/base/mdb"
|
||||
"shylinux.com/x/toolkits"
|
||||
kit "shylinux.com/x/toolkits"
|
||||
|
||||
"shylinux.com/x/community/src/renzhengshouquan/model"
|
||||
)
|
||||
@ -53,21 +53,20 @@ func (s cert) List(m *ice.Message, arg ...string) {
|
||||
case CertVerify:
|
||||
m.PushButton(s.Check)
|
||||
default:
|
||||
m.PushButton(s.Verify)
|
||||
// m.PushButton()
|
||||
m.PushButton()
|
||||
}
|
||||
}).Action(s.Upload).Display("").DisplayCSS("")
|
||||
s.Button(m, "", s.Upload)
|
||||
}
|
||||
}
|
||||
func (s cert) Verify(m *ice.Message, arg ...string) {
|
||||
if m.Option(model.VERIFY) == "000" {
|
||||
msg := s.Select(m.Spawn(), m.OptionSimple(model.AUTH_UID)...)
|
||||
if msg.Append(model.VERIFY) == "" {
|
||||
verify := kit.Format("%06d", rand.Intn(10000))
|
||||
s.Update(m, kit.Dict(model.VERIFY, verify), m.OptionSimple(model.AUTH_UID, model.UID)...)
|
||||
s.Update(m, kit.Dict(model.MOBILE, m.Option(model.MOBILE), model.VERIFY, verify), m.OptionSimple(model.AUTH_UID)...)
|
||||
m.Cmd(SmsVendor, SmsVendor.Send, m.Option(model.MOBILE), verify)
|
||||
} else {
|
||||
msg := s.Select(m.Spawn(), m.OptionSimple(model.AUTH_UID, model.UID)...)
|
||||
if msg.Append(model.VERIFY) == m.Option(model.VERIFY) {
|
||||
if !m.WarnNotValid(m.Option(model.VERIFY) != msg.Append(model.VERIFY)) {
|
||||
s.Check(m)
|
||||
}
|
||||
}
|
||||
|
@ -5,8 +5,10 @@ import (
|
||||
|
||||
"shylinux.com/x/ice"
|
||||
"shylinux.com/x/icebergs/base/aaa"
|
||||
"shylinux.com/x/icebergs/base/ctx"
|
||||
kit "shylinux.com/x/toolkits"
|
||||
|
||||
"shylinux.com/x/community/src/api"
|
||||
"shylinux.com/x/community/src/renzhengshouquan/model"
|
||||
"shylinux.com/x/enterprise/src/guanlixitong"
|
||||
)
|
||||
@ -53,7 +55,9 @@ func (s Table) RewriteAppend(m *ice.Message, arg ...string) *ice.Message {
|
||||
}
|
||||
|
||||
func (s Table) GetAuthUID(m *ice.Message, arg ...string) string {
|
||||
return "4c6a8ccf186816b332ad9dc5655255dd"
|
||||
auth_uid := m.Cmdx(ctx.CONFIG, api.RENZHENGSHOUQUAN_PORTAL, kit.Keym(model.AUTH_UID))
|
||||
m.Info("default auth_uid %v", auth_uid)
|
||||
return auth_uid
|
||||
}
|
||||
|
||||
type Tables struct{ Table }
|
||||
|
@ -18,7 +18,7 @@ import (
|
||||
|
||||
type realname struct {
|
||||
renzhengshouquan.Table
|
||||
order string `data:"16"`
|
||||
order string `data:"17"`
|
||||
fields string `data:"auth_uid,user_uid,source_id,secret_id,secret_key"`
|
||||
create string `name:"create source_id* secret_id* secret_key*" role:"leader"`
|
||||
remove string `name:"remove" role:"leader"`
|
||||
@ -33,7 +33,7 @@ func init() { ice.TeamCtxCmd(realname{}) }
|
||||
func init() { renzhengshouquan.RealnameVendor = realname{} }
|
||||
|
||||
func (s realname) Check(m *ice.Message, arg ...string) {
|
||||
msg := s.Select(m.Spawn(), model.AUTH_UID, "4c6a8ccf186816b332ad9dc5655255dd")
|
||||
msg := s.Select(m.Spawn(), model.AUTH_UID, s.GetAuthUID(m))
|
||||
source := msg.Append("source_id")
|
||||
secretId := msg.Append("secret_id")
|
||||
secretKey := msg.Append("secret_key")
|
||||
|
@ -15,7 +15,7 @@ import (
|
||||
type sms struct {
|
||||
renzhengshouquan.Table
|
||||
tencentcloud.Tencentcloud
|
||||
order string `data:"17"`
|
||||
order string `data:"16"`
|
||||
fields string `data:"auth_uid,user_uid,sign_name AS sign_name,template_id,app_id"`
|
||||
create string `name:"create app_id* sign_name* template_id*" role:"leader"`
|
||||
remove string `name:"remove" role:"leader"`
|
||||
@ -36,6 +36,7 @@ func (s sms) Send(m *ice.Message, arg ...string) {
|
||||
request.PhoneNumberSet = common.StringPtrs([]string{m.Option(model.MOBILE)})
|
||||
request.TemplateParamSet = common.StringPtrs([]string{m.Option(model.VERIFY)})
|
||||
response, err := s.newClient(m).SendSms(request)
|
||||
m.Info("send sms %v %v %v", kit.Format(request), kit.Format(response), err)
|
||||
s.ParseResponse(m, response, err)
|
||||
}
|
||||
|
||||
|
@ -34,7 +34,7 @@ type Tencentcloud struct{ tencentcloud }
|
||||
func init() { ice.TeamCtxCmd(Tencentcloud{}) }
|
||||
|
||||
func (s Tencentcloud) NewCredential(m *ice.Message, arg ...string) *common.Credential {
|
||||
msg := m.Cmd(s, "4c6a8ccf186816b332ad9dc5655255dd")
|
||||
msg := m.Cmd(s, s.GetAuthUID(m))
|
||||
return common.NewCredential(msg.Append(model.SECRET_ID), msg.Append(model.SECRET_KEY))
|
||||
}
|
||||
func (s Tencentcloud) NewProfile(m *ice.Message, arg ...string) *profile.ClientProfile {
|
||||
|
@ -37,8 +37,7 @@ func (s weixinpayment) List(m *ice.Message, arg ...string) {
|
||||
kit.If(m.Length() > 0, func() { m.Action() })
|
||||
}
|
||||
func (s weixinpayment) Request(m *ice.Message, arg ...string) {
|
||||
m.Option("auth_uid", "308a1ca57c40e2a46f6568e017269cdd")
|
||||
msg := s.Select(m.Spawn(), m.OptionSimple(model.AUTH_UID)...)
|
||||
msg := s.Select(m.Spawn(), model.AUTH_UID, s.GetAuthUID(m))
|
||||
svc := jsapi.JsapiApiService{Client: s.newClient(m, msg)}
|
||||
resp, result, err := svc.PrepayWithRequestPayment(m, jsapi.PrepayRequest{
|
||||
Appid: core.String(msg.Append("app_id")),
|
||||
|
@ -18,7 +18,7 @@ type Portal struct {
|
||||
func (s Portal) List(m *ice.Message, arg ...string) {
|
||||
s.Portal.List(m, arg...)
|
||||
kit.If(len(arg) == 0 && m.Length() > 0, func() { m.PushAction(s.PlaceRemove).Action() })
|
||||
m.Sort("auth_status,auth_type,created_at", []string{"2"}, []string{"personal", "root", "city", "street", "school", "company", "service"}, ice.STR_R)
|
||||
m.Sort("auth_status,auth_type,created_at", []string{"issued"}, []string{"personal", "root", "city", "street", "school", "company", "service"}, ice.STR_R)
|
||||
}
|
||||
func (s Portal) PlaceCreate(m *ice.Message, arg ...string) {
|
||||
switch AuthType(kit.Int(m.Option(model.AUTH_TYPE))) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user