fix: username_changed字段加入认证查询,改名后铅笔和通知按钮正确隐藏
Some checks failed
PR Preview / teardown-preview (pull_request) Has been skipped
Test / unit-test (push) Successful in 5s
Test / build-check (push) Failing after 4s
PR Preview / test (pull_request) Successful in 5s
PR Preview / deploy-preview (pull_request) Failing after 8s
Test / e2e-test (push) Successful in 49s
Some checks failed
PR Preview / teardown-preview (pull_request) Has been skipped
Test / unit-test (push) Successful in 5s
Test / build-check (push) Failing after 4s
PR Preview / test (pull_request) Successful in 5s
PR Preview / deploy-preview (pull_request) Failing after 8s
Test / e2e-test (push) Successful in 49s
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -63,7 +63,7 @@ def get_current_user(request: Request):
|
||||
if not token:
|
||||
return ANON_USER
|
||||
conn = get_db()
|
||||
user = conn.execute("SELECT id, username, role, display_name, password, business_verified FROM users WHERE token = ?", (token,)).fetchone()
|
||||
user = conn.execute("SELECT id, username, role, display_name, password, business_verified, username_changed FROM users WHERE token = ?", (token,)).fetchone()
|
||||
conn.close()
|
||||
if not user:
|
||||
return ANON_USER
|
||||
|
||||
@@ -41,8 +41,9 @@
|
||||
<div v-if="!n.is_read" class="notif-actions">
|
||||
<!-- 搜索未收录通知:已添加按钮 -->
|
||||
<button v-if="isSearchMissing(n)" class="notif-action-btn notif-btn-added" @click="markAdded(n)">已添加</button>
|
||||
<!-- 用户名更新通知:去修改按钮 -->
|
||||
<button v-else-if="isUsernameNotice(n)" class="notif-action-btn notif-btn-plan" @click="goRename(n)">去修改</button>
|
||||
<!-- 用户名更新通知:去修改按钮(已改过则显示已读) -->
|
||||
<button v-else-if="isUsernameNotice(n) && !auth.user.username_changed" class="notif-action-btn notif-btn-plan" @click="goRename(n)">去修改</button>
|
||||
<button v-else-if="isUsernameNotice(n) && auth.user.username_changed" class="notif-mark-one" @click="markOneRead(n)">已读</button>
|
||||
<!-- 方案请求通知:去定制按钮 -->
|
||||
<button v-else-if="isPlanRequest(n)" class="notif-action-btn notif-btn-plan" @click="goPlanDesign(n)">去定制</button>
|
||||
<!-- 审核类通知:去审核按钮 -->
|
||||
|
||||
Reference in New Issue
Block a user