feat: 购油方案功能 #28
@@ -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