2ed5dfa6a1
iotlcm-app:小程序端 + 用户端服务。 - app/:uni-app 小程序前端(基于 unibest,MIT) - 微信 AppID → YOUR_WX_APPID,uni-app AppID → __UNI__YOURAPPID - 内网后端地址 → admin.iotlcm.example.com - 应用标题与 unibest 模板 README 重写(保留上游致谢与 MIT 声明) - server/:GoFrame 用户端服务(基于 XiuAdmin,Apache-2.0) - module xiuadmin → git.5iot.com/iotlcm-public/iotlcm-app(360 文件) - 支付回调地址 → app.iotlcm.example.com,商户名与应用名泛化 - 真实手机号 → 合法 11 位编造号(保留号段前 3 位 + 后 4 位) - 依赖号码尾部的断言同步更新 - 补 server/LICENSE(Apache-2.0) - 移除内部资产:CI 触发器 - 补根 README,LF 行尾 + .gitattributes 已知:TestSysDept_RefreshDeptAncestors 在源仓同一提交上同样失败,属既有缺陷。
84 lines
4.4 KiB
Go
84 lines
4.4 KiB
Go
package model
|
|
|
|
type AppPhoneRegisterParam struct {
|
|
TenantId string `json:"tenantId" v:"required#租户ID不能为空" dc:"租户ID"`
|
|
Phone string `json:"phone" v:"required|phone#手机号不能为空|手机号格式不正确" dc:"手机号"`
|
|
Password string `json:"password" v:"required|length:6,32#密码不能为空|密码长度应为6到32位" dc:"密码"`
|
|
NickName string `json:"nickName" dc:"昵称"`
|
|
SmsCode string `json:"smsCode" dc:"短信验证码,当前注册未接入短信时可为空"`
|
|
}
|
|
|
|
type AppPhoneLoginParam struct {
|
|
TenantId string `json:"tenantId" v:"required#租户ID不能为空" dc:"租户ID"`
|
|
Account string `json:"account" dc:"手机号或用户名"`
|
|
Username string `json:"username" dc:"兼容管理平台用户名登录字段"`
|
|
Phone string `json:"phone" dc:"兼容旧版手机号登录字段"`
|
|
Password string `json:"password" v:"required|length:6,32#密码不能为空|密码长度应为6到32位" dc:"密码"`
|
|
SelectedUserId int64 `json:"selectedUserId" dc:"手机号多账号登录时选中的用户ID"`
|
|
WxCode string `json:"wxCode" dc:"微信小程序登录临时凭证,用于后端绑定openid"`
|
|
}
|
|
|
|
type AppWechatLoginParam struct {
|
|
TenantId string `json:"tenantId" v:"required#租户ID不能为空" dc:"租户ID"`
|
|
WxCode string `json:"wxCode" v:"required#微信登录凭证不能为空" dc:"微信小程序登录临时凭证"`
|
|
}
|
|
|
|
type AppWechatBindPhoneParam struct {
|
|
TenantId string `json:"tenantId" v:"required#租户ID不能为空" dc:"租户ID"`
|
|
BindTicket string `json:"bindTicket" v:"required#微信绑定凭证不能为空" dc:"微信绑定临时凭证"`
|
|
Phone string `json:"phone" v:"required|phone#手机号不能为空|手机号格式不正确" dc:"手机号"`
|
|
CaptchaKey string `json:"captchaKey" dc:"图形验证码Key"`
|
|
CaptchaPoint string `json:"captchaPoint" dc:"图形验证码坐标"`
|
|
SelectedUserId int64 `json:"selectedUserId" dc:"手机号多账号绑定时选中的用户ID"`
|
|
}
|
|
|
|
type AppForgotPasswordParam struct {
|
|
TenantId string `json:"tenantId" v:"required#租户ID不能为空" dc:"租户ID"`
|
|
Phone string `json:"phone" v:"required|phone#手机号不能为空|手机号格式不正确" dc:"手机号"`
|
|
Password string `json:"password" v:"required|length:6,32#新密码不能为空|新密码长度应为6到32位" dc:"新密码"`
|
|
SmsCode string `json:"smsCode" v:"required#短信验证码不能为空" dc:"短信验证码"`
|
|
}
|
|
|
|
type AppSendSmsParam struct {
|
|
TenantId string `json:"tenantId" v:"required#租户ID不能为空" dc:"租户ID"`
|
|
Phone string `json:"phone" v:"required|phone#手机号不能为空|手机号格式不正确" dc:"手机号"`
|
|
Scene string `json:"scene" v:"required|in:register,forgotPassword#短信场景不能为空|短信场景不正确" dc:"短信场景"`
|
|
}
|
|
|
|
type AppSendSmsModel struct {
|
|
Success bool `json:"success" dc:"是否成功"`
|
|
SmsCode string `json:"smsCode,omitempty" dc:"开发环境验证码"`
|
|
}
|
|
|
|
type AppAuthTokenModel struct {
|
|
Token string `json:"token,omitempty" dc:"访问令牌"`
|
|
ExpiresIn int64 `json:"expiresIn,omitempty" dc:"有效期秒数"`
|
|
UserInfo *AppUserInfoModel `json:"userInfo,omitempty" dc:"用户信息"`
|
|
NeedSelect bool `json:"needSelect,omitempty" dc:"是否需要选择登录账号"`
|
|
Candidates []*AppLoginCandidateModel `json:"candidates,omitempty" dc:"可选择登录账号列表"`
|
|
}
|
|
|
|
type AppWechatLoginModel struct {
|
|
AppAuthTokenModel
|
|
NeedBindPhone bool `json:"needBindPhone,omitempty" dc:"是否需要绑定手机号"`
|
|
BindTicket string `json:"bindTicket,omitempty" dc:"微信绑定临时凭证"`
|
|
BindExpireIn int64 `json:"bindExpireIn,omitempty" dc:"绑定凭证有效期秒数"`
|
|
}
|
|
|
|
type AppWechatBindPhoneModel struct {
|
|
AppAuthTokenModel
|
|
NeedBindPhone bool `json:"needBindPhone,omitempty" dc:"是否仍需完成手机号绑定"`
|
|
BindTicket string `json:"bindTicket,omitempty" dc:"微信绑定临时凭证"`
|
|
}
|
|
|
|
type AppLoginCandidateModel struct {
|
|
UserId int64 `json:"userId" dc:"用户ID"`
|
|
Username string `json:"username" dc:"用户名"`
|
|
NickName string `json:"nickName" dc:"昵称"`
|
|
Phone string `json:"phone" dc:"手机号"`
|
|
DeptId int64 `json:"-" dc:"部门ID"`
|
|
DeptName string `json:"deptName" dc:"部门名称"`
|
|
UserType string `json:"userType" dc:"用户类型"`
|
|
Role string `json:"role" dc:"账号类型"`
|
|
}
|