mirror of
https://shylinux.com/x/community
synced 2025-04-25 17:48:06 +08:00
add some
This commit is contained in:
parent
973c7c024c
commit
261e445908
@ -22,7 +22,9 @@ func (s photo) Config(m *ice.Message, arg ...string) {
|
|||||||
func (s photo) List(m *ice.Message, arg ...string) {
|
func (s photo) List(m *ice.Message, arg ...string) {
|
||||||
s.cmdy(m, PhotoVendor.Folder, kit.Slice(arg, 1)...)
|
s.cmdy(m, PhotoVendor.Folder, kit.Slice(arg, 1)...)
|
||||||
m.PushAction(s.Trash).Action(s.Upload).Display("")
|
m.PushAction(s.Trash).Action(s.Upload).Display("")
|
||||||
s.Button(m, "请上传文件", s.Upload)
|
if m.Result() == "" {
|
||||||
|
s.Button(m, "请上传文件", s.Upload)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
func (s photo) Upload(m *ice.Message, arg ...string) { s.cmdy(m, "") }
|
func (s photo) Upload(m *ice.Message, arg ...string) { s.cmdy(m, "") }
|
||||||
func (s photo) Trash(m *ice.Message, arg ...string) { s.cmdy(m, "") }
|
func (s photo) Trash(m *ice.Message, arg ...string) { s.cmdy(m, "") }
|
||||||
|
4
src/renzhengshouquan/external/external.shy
vendored
Normal file
4
src/renzhengshouquan/external/external.shy
vendored
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
source weixinpayment/weixinpayment.shy
|
||||||
|
source tencentmeeting/tencentmeeting.shy
|
||||||
|
source tencentdocument/tencentdocument.shy
|
||||||
|
source tencentcloud/tencentcloud.shy
|
@ -16,24 +16,24 @@ type ocr struct {
|
|||||||
|
|
||||||
func (s ocr) List(m *ice.Message, arg ...string) {}
|
func (s ocr) List(m *ice.Message, arg ...string) {}
|
||||||
|
|
||||||
func (s ocr) BizLicense(m *ice.Message, arg ...string) {
|
|
||||||
request := sdk.NewBizLicenseOCRRequest()
|
|
||||||
request.ImageBase64 = common.StringPtr(s.ImageData(m, arg...))
|
|
||||||
response, err := s.newClient(m).BizLicenseOCR(request)
|
|
||||||
s.ParseResponse(m, response, err)
|
|
||||||
}
|
|
||||||
func (s ocr) IDCard(m *ice.Message, arg ...string) {
|
func (s ocr) IDCard(m *ice.Message, arg ...string) {
|
||||||
request := sdk.NewIDCardOCRRequest()
|
request := sdk.NewIDCardOCRRequest()
|
||||||
request.ImageBase64 = common.StringPtr(s.ImageData(m, arg...))
|
request.ImageBase64 = common.StringPtr(s.ImageData(m, arg...))
|
||||||
response, err := s.newClient(m).IDCardOCR(request)
|
response, err := s.newClient(m).IDCardOCR(request)
|
||||||
s.ParseResponse(m, response, err)
|
s.ParseResponse(m, response, err)
|
||||||
}
|
}
|
||||||
|
func (s ocr) BizLicense(m *ice.Message, arg ...string) {
|
||||||
|
request := sdk.NewBizLicenseOCRRequest()
|
||||||
|
request.ImageBase64 = common.StringPtr(s.ImageData(m, arg...))
|
||||||
|
response, err := s.newClient(m).BizLicenseOCR(request)
|
||||||
|
s.ParseResponse(m, response, err)
|
||||||
|
}
|
||||||
|
|
||||||
func init() { ice.TeamCtxCmd(ocr{}) }
|
func init() { ice.TeamCtxCmd(ocr{}) }
|
||||||
|
|
||||||
|
func init() { renzhengshouquan.OcrVendor = ocr{} }
|
||||||
|
|
||||||
func (s ocr) newClient(m *ice.Message, arg ...string) *sdk.Client {
|
func (s ocr) newClient(m *ice.Message, arg ...string) *sdk.Client {
|
||||||
c, _ := sdk.NewClient(s.NewCredential(m), "", s.NewProfile(m))
|
c, _ := sdk.NewClient(s.NewCredential(m), "", s.NewProfile(m))
|
||||||
return c
|
return c
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() { renzhengshouquan.OcrVendor = ocr{} }
|
|
||||||
|
@ -18,7 +18,7 @@ import (
|
|||||||
|
|
||||||
type realname struct {
|
type realname struct {
|
||||||
renzhengshouquan.Table
|
renzhengshouquan.Table
|
||||||
order string `data:"17"`
|
order string `data:"18"`
|
||||||
fields string `data:"auth_uid,user_uid,source_id,secret_id,secret_key"`
|
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"`
|
create string `name:"create source_id* secret_id* secret_key*" role:"leader"`
|
||||||
remove string `name:"remove" role:"leader"`
|
remove string `name:"remove" role:"leader"`
|
||||||
@ -38,21 +38,11 @@ func (s realname) Check(m *ice.Message, arg ...string) {
|
|||||||
secretId := msg.Append("secret_id")
|
secretId := msg.Append("secret_id")
|
||||||
secretKey := msg.Append("secret_key")
|
secretKey := msg.Append("secret_key")
|
||||||
|
|
||||||
// source := "market-2qkoxdj5i"
|
|
||||||
// secretId := "AKIDfjSG99M0m5gqr0aiyN4Ho0rfut22jybmlrj1"
|
|
||||||
// secretKey := "3oga413JEe58di8k2NkVim5s79Qmuw17DWVV6spD"
|
|
||||||
|
|
||||||
// source := "market-dw3yg5tm8"
|
|
||||||
// secretId := "AKIDHFZ1EdTz3D7Y4nMYESfSKdv1RTpkbKe7LjpU"
|
|
||||||
// secretKey := "cpcts0905vj0wm2qw6l8az5dermgvp8m7op4wzgw"
|
|
||||||
|
|
||||||
auth, datetime := calcAuthorization(source, secretId, secretKey)
|
auth, datetime := calcAuthorization(source, secretId, secretKey)
|
||||||
m.Option(web.SPIDE_HEADER, map[string]string{"X-Source": source, "Authorization": auth, "X-Date": datetime})
|
m.Option(web.SPIDE_HEADER, map[string]string{"X-Source": source, "Authorization": auth, "X-Date": datetime})
|
||||||
res := m.Cmdx(web.SPIDE, ice.DEV, web.SPIDE_RAW, http.MethodPost, "https://service-rbgpp2hy-1305308687.gz.apigw.tencentcs.com/release/release/mobile/3-realnameauth",
|
res := m.Cmdx(web.SPIDE, ice.DEV, web.SPIDE_RAW, http.MethodPost, "https://service-rbgpp2hy-1305308687.gz.apigw.tencentcs.com/release/release/mobile/3-realnameauth",
|
||||||
web.SPIDE_FORM, "mobile_number", arg[0], "idcard_number", arg[1], "name", arg[2])
|
web.SPIDE_FORM, "mobile_number", arg[0], "idcard_number", arg[1], "name", arg[2])
|
||||||
m.WarnNotRight(kit.Value(kit.UnMarshal(res), "data.result") != "0")
|
m.WarnNotRight(kit.Value(kit.UnMarshal(res), "data.result") != "0")
|
||||||
// m.Cmdy(web.SPIDE, ice.DEV, web.SPIDE_RAW, http.MethodPost, "https://service-91ii7z5b-1300755093.ap-beijing.apigateway.myqcloud.com/release/phone3element",
|
|
||||||
// web.SPIDE_FORM, "mobile", arg[0], "idCard", arg[1], "realName", arg[2])
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func calcAuthorization(source string, secretId string, secretKey string) (auth string, datetime string) {
|
func calcAuthorization(source string, secretId string, secretKey string) (auth string, datetime string) {
|
||||||
|
@ -25,7 +25,7 @@ import (
|
|||||||
type smh struct {
|
type smh struct {
|
||||||
renzhengshouquan.Table
|
renzhengshouquan.Table
|
||||||
tencentcloud.Tencentcloud
|
tencentcloud.Tencentcloud
|
||||||
order string `data:"18"`
|
order string `data:"16"`
|
||||||
fields string `data:"name,info,library_id,library_secret,access_token,expire_time,user_uid"`
|
fields string `data:"name,info,library_id,library_secret,access_token,expire_time,user_uid"`
|
||||||
libraryCreate string `name:"libraryCreate" role:"leader"`
|
libraryCreate string `name:"libraryCreate" role:"leader"`
|
||||||
libraryRemove string `name:"libraryRemove" role:"leader"`
|
libraryRemove string `name:"libraryRemove" role:"leader"`
|
||||||
|
@ -12,9 +12,5 @@
|
|||||||
},
|
},
|
||||||
"icons": {
|
"icons": {
|
||||||
"smh": "https://img.icons8.com/officel/80/stack-of-photos.png"
|
"smh": "https://img.icons8.com/officel/80/stack-of-photos.png"
|
||||||
},
|
|
||||||
"input": {
|
|
||||||
"secret_id": "SecretID",
|
|
||||||
"secret_key": "SecretKey"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,4 +1,4 @@
|
|||||||
chapter "智能媒资"
|
section "智能媒资托管"
|
||||||
refer `
|
refer `
|
||||||
后台 https://console.cloud.tencent.com/smh/overview
|
后台 https://console.cloud.tencent.com/smh/overview
|
||||||
文档 https://cloud.tencent.com/document/product/1339
|
文档 https://cloud.tencent.com/document/product/1339
|
||||||
|
@ -15,16 +15,15 @@ import (
|
|||||||
type sms struct {
|
type sms struct {
|
||||||
renzhengshouquan.Table
|
renzhengshouquan.Table
|
||||||
tencentcloud.Tencentcloud
|
tencentcloud.Tencentcloud
|
||||||
order string `data:"16"`
|
order string `data:"17"`
|
||||||
fields string `data:"auth_uid,user_uid,sign_name AS sign_name,template_id,app_id"`
|
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"`
|
create string `name:"create sign_name* template_id* app_id*" role:"leader"`
|
||||||
remove string `name:"remove" role:"leader"`
|
remove string `name:"remove" role:"leader"`
|
||||||
send string `name:"send mobile verify" role:"leader"`
|
send string `name:"send mobile verify" role:"leader"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s sms) List(m *ice.Message, arg ...string) {
|
func (s sms) List(m *ice.Message, arg ...string) {
|
||||||
s.ValueList(m, arg).Display("")
|
s.ValueList(m, arg).Display("")
|
||||||
m.PushAction(s.Send, s.Remove)
|
|
||||||
kit.If(m.Length() > 0, func() { m.Action() })
|
kit.If(m.Length() > 0, func() { m.Action() })
|
||||||
}
|
}
|
||||||
func (s sms) Send(m *ice.Message, arg ...string) {
|
func (s sms) Send(m *ice.Message, arg ...string) {
|
||||||
@ -36,7 +35,6 @@ func (s sms) Send(m *ice.Message, arg ...string) {
|
|||||||
request.PhoneNumberSet = common.StringPtrs([]string{m.Option(model.MOBILE)})
|
request.PhoneNumberSet = common.StringPtrs([]string{m.Option(model.MOBILE)})
|
||||||
request.TemplateParamSet = common.StringPtrs([]string{m.Option(model.VERIFY)})
|
request.TemplateParamSet = common.StringPtrs([]string{m.Option(model.VERIFY)})
|
||||||
response, err := s.newClient(m).SendSms(request)
|
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)
|
s.ParseResponse(m, response, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
"sms": "https://img.icons8.com/officel/80/sms.png"
|
"sms": "https://img.icons8.com/officel/80/sms.png"
|
||||||
},
|
},
|
||||||
"input": {
|
"input": {
|
||||||
"app_id": "AppID",
|
|
||||||
"sign_name": "SignName",
|
"sign_name": "SignName",
|
||||||
"template_id": "TemplateID"
|
"template_id": "TemplateID",
|
||||||
|
"app_id": "AppID"
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,4 +1,4 @@
|
|||||||
chapter "短信"
|
section "发送短信"
|
||||||
refer `
|
refer `
|
||||||
后台 https://console.cloud.tencent.com/smsv2
|
后台 https://console.cloud.tencent.com/smsv2
|
||||||
调试 https://console.cloud.tencent.com/api/explorer?Product=sms&Version=2021-01-11&Action=SendSms
|
调试 https://console.cloud.tencent.com/api/explorer?Product=sms&Version=2021-01-11&Action=SendSms
|
||||||
|
@ -1,4 +1,8 @@
|
|||||||
chapter "腾讯云"
|
chapter "腾讯云"
|
||||||
refer `
|
refer `
|
||||||
后台 https://console.cloud.tencent.com/
|
后台 https://console.cloud.tencent.com/
|
||||||
`
|
`
|
||||||
|
source smh/smh.shy
|
||||||
|
source ocr/ocr.shy
|
||||||
|
source sms/sms.shy
|
||||||
|
source realname/realname.shy
|
Loading…
x
Reference in New Issue
Block a user