更新密码找回uniapp
This commit is contained in:
1 parent
7f9a66da0f
commit
3fdda89833
1304 files changed
+3503
-26132
No files matched your search
@@ -23,7 +23,6 @@ type AppReminderController struct {
|
||||
beego.Controller
|
||||
}
|
||||
|
||||
// 放行移动端、租户端与游客令牌:游客调用时不进业务表,分流到 gueststore。
|
||||
func (c *AppReminderController) appClaims() (*jwtutil.Claims, error) {
|
||||
return identity.Claims(c.Ctx.Request.Header.Get("Authorization"), identity.EndApp, identity.EndBackend, identity.EndGuest)
|
||||
}
|
||||
@@ -56,7 +55,6 @@ type appSchedulePayload struct {
|
||||
MaxSendCount int `json:"max_send_count"`
|
||||
}
|
||||
|
||||
// GetList GET /app/schedule/list
|
||||
func (c *AppReminderController) GetList() {
|
||||
claims, err := c.appClaims()
|
||||
if err != nil {
|
||||
@@ -122,7 +120,6 @@ func (c *AppReminderController) GetList() {
|
||||
}
|
||||
}
|
||||
|
||||
// status filter
|
||||
if status == "pending" && isFinished {
|
||||
continue
|
||||
}
|
||||
@@ -162,7 +159,6 @@ func (c *AppReminderController) GetList() {
|
||||
})
|
||||
}
|
||||
|
||||
// GetDetail GET /app/schedule/:id
|
||||
func (c *AppReminderController) GetDetail() {
|
||||
claims, err := c.appClaims()
|
||||
if err != nil {
|
||||
@@ -240,7 +236,6 @@ func (c *AppReminderController) GetDetail() {
|
||||
c.ok(data)
|
||||
}
|
||||
|
||||
// Create POST /app/schedule
|
||||
func (c *AppReminderController) Create() {
|
||||
claims, err := c.appClaims()
|
||||
if err != nil {
|
||||
@@ -347,7 +342,6 @@ func (c *AppReminderController) Create() {
|
||||
c.ok(map[string]interface{}{"id": schedID})
|
||||
}
|
||||
|
||||
// Update PUT /app/schedule/:id
|
||||
func (c *AppReminderController) Update() {
|
||||
claims, err := c.appClaims()
|
||||
if err != nil {
|
||||
@@ -434,7 +428,6 @@ func (c *AppReminderController) Update() {
|
||||
return
|
||||
}
|
||||
|
||||
// 软删除旧提醒,重建
|
||||
_, _ = models.Orm.QueryTable(new(models.BackendScheduleReminder)).
|
||||
Filter("schedule_id", id).
|
||||
Update(map[string]interface{}{
|
||||
@@ -488,7 +481,6 @@ func (c *AppReminderController) Update() {
|
||||
c.ok(nil)
|
||||
}
|
||||
|
||||
// Delete DELETE /app/schedule/:id
|
||||
func (c *AppReminderController) Delete() {
|
||||
claims, err := c.appClaims()
|
||||
if err != nil {
|
||||
@@ -554,7 +546,6 @@ func (c *AppReminderController) Delete() {
|
||||
c.ok(nil)
|
||||
}
|
||||
|
||||
// ToggleComplete POST /app/schedule/:id/toggle
|
||||
func (c *AppReminderController) ToggleComplete() {
|
||||
claims, err := c.appClaims()
|
||||
if err != nil {
|
||||
@@ -591,7 +582,6 @@ func (c *AppReminderController) ToggleComplete() {
|
||||
Filter("is_deleted", 0).
|
||||
All(&reminders)
|
||||
|
||||
// Toggle: if all finished -> set to pending; else -> set to finished
|
||||
allFinished := len(reminders) > 0
|
||||
for _, r := range reminders {
|
||||
if r.RemindStatus != 2 {
|
||||
@@ -602,9 +592,9 @@ func (c *AppReminderController) ToggleComplete() {
|
||||
|
||||
var newStatus int8
|
||||
if allFinished {
|
||||
newStatus = 0 // reopen
|
||||
newStatus = 0
|
||||
} else {
|
||||
newStatus = 2 // mark done
|
||||
newStatus = 2
|
||||
}
|
||||
|
||||
now := time.Now()
|
||||
@@ -619,9 +609,6 @@ func (c *AppReminderController) ToggleComplete() {
|
||||
})
|
||||
}
|
||||
|
||||
// ---------- 游客分支(免登录态):数据存 yz_guest_data,响应结构与登录态一致。
|
||||
// 游客日程不接提醒发送链路(无短信/邮件推送),仅作待办记录;转正合并时重建提醒。 ----------
|
||||
|
||||
func guestScheduleItemMap(it guestScheduleItem) map[string]interface{} {
|
||||
return map[string]interface{}{
|
||||
"id": it.ID,
|
||||
|
||||
Reference in new issue
Block a user