更新密码找回uniapp
This commit is contained in:
1 parent
7f9a66da0f
commit
3fdda89833
1304 files changed
+3503
-26132
No files matched your search
@@ -17,17 +17,10 @@ import (
|
||||
beego "github.com/beego/beego/v2/server/web"
|
||||
)
|
||||
|
||||
// ==================== 移动端 PasswordStore ====================
|
||||
//
|
||||
// 移动端「账号管理」(密码库)接口。与 Web 端 /backend/passwordStore 同一套数据
|
||||
// (yz_backend_password_store,一个平台下挂多个账号),按 JWT 中的 tid + user_id
|
||||
// 隔离,小程序「账号管理」页面调用。
|
||||
|
||||
type AppPasswordStoreController struct {
|
||||
beego.Controller
|
||||
}
|
||||
|
||||
// 放行移动端、租户端与游客令牌:游客 tid=0 合法,数据进 gueststore 而非业务表。
|
||||
func (c *AppPasswordStoreController) appPwdClaims() (*jwtutil.Claims, error) {
|
||||
claims, err := identity.Claims(c.Ctx.Request.Header.Get("Authorization"), identity.EndApp, identity.EndBackend, identity.EndGuest)
|
||||
if err != nil {
|
||||
@@ -45,7 +38,6 @@ func (c *AppPasswordStoreController) appPwdClaims() (*jwtutil.Claims, error) {
|
||||
return claims, nil
|
||||
}
|
||||
|
||||
// GetList GET /api/passwordStore/list?keyword=
|
||||
func (c *AppPasswordStoreController) GetList() {
|
||||
cl, e := c.appPwdClaims()
|
||||
if e != nil {
|
||||
@@ -83,7 +75,6 @@ func (c *AppPasswordStoreController) GetList() {
|
||||
passwordReply(&c.Controller, 200, "success", map[string]interface{}{"list": res, "total": len(res)})
|
||||
}
|
||||
|
||||
// GetDetail GET /api/passwordStore/detail/:id
|
||||
func (c *AppPasswordStoreController) GetDetail() {
|
||||
cl, e := c.appPwdClaims()
|
||||
if e != nil {
|
||||
@@ -118,7 +109,6 @@ func (c *AppPasswordStoreController) GetDetail() {
|
||||
})
|
||||
}
|
||||
|
||||
// Create POST /api/passwordStore/create
|
||||
func (c *AppPasswordStoreController) Create() {
|
||||
cl, e := c.appPwdClaims()
|
||||
if e != nil {
|
||||
@@ -168,7 +158,6 @@ func (c *AppPasswordStoreController) Create() {
|
||||
})
|
||||
}
|
||||
|
||||
// Update POST /api/passwordStore/update/:id
|
||||
func (c *AppPasswordStoreController) Update() {
|
||||
cl, e := c.appPwdClaims()
|
||||
if e != nil {
|
||||
@@ -234,7 +223,6 @@ func (c *AppPasswordStoreController) Update() {
|
||||
})
|
||||
}
|
||||
|
||||
// Delete DELETE /api/passwordStore/delete/:id
|
||||
func (c *AppPasswordStoreController) Delete() {
|
||||
cl, e := c.appPwdClaims()
|
||||
if e != nil {
|
||||
@@ -279,8 +267,6 @@ func (c *AppPasswordStoreController) Delete() {
|
||||
passwordReply(&c.Controller, 200, "success", nil)
|
||||
}
|
||||
|
||||
// ---------- 游客分支(免登录态):数据存 yz_guest_data,响应结构与登录态一致 ----------
|
||||
|
||||
func guestPwdFull(r gueststore.Row) PasswordStoreItemDTO {
|
||||
var it PasswordStoreItemDTO
|
||||
if json.Unmarshal(r.Payload, &it) != nil {
|
||||
@@ -297,7 +283,6 @@ func guestPwdFull(r gueststore.Row) PasswordStoreItemDTO {
|
||||
return it
|
||||
}
|
||||
|
||||
// guestPwdSamePlatform 与登录态 findSamePlatformRecord 同语义:平台+网址重复。
|
||||
func guestPwdSamePlatform(it PasswordStoreItemDTO, platform, url string, excludeID uint64) bool {
|
||||
if it.ID == excludeID {
|
||||
return false
|
||||
|
||||
Reference in new issue
Block a user