fix: 移除所有权限身份显示,QR上传布局还原为initial commit样式
Some checks failed
PR Preview / teardown-preview (pull_request) Has been skipped
Test / unit-test (push) Successful in 5s
Test / build-check (push) Successful in 4s
PR Preview / test (pull_request) Successful in 5s
PR Preview / deploy-preview (pull_request) Successful in 13s
Test / e2e-test (push) Failing after 1m19s

This commit is contained in:
2026-04-08 19:47:20 +00:00
committed by Hera Zhao
parent c8de1ad229
commit dcf516f2de
3 changed files with 22 additions and 75 deletions

View File

@@ -130,14 +130,12 @@
<div class="form-group">
<label>我的二维码图片</label>
<div class="qr-preview">
<div class="upload-area qr-upload-area" @click="triggerUpload('qr')">
<img v-if="brandQrImage" :src="brandQrImage" class="qr-img" />
<span v-else class="upload-hint">📲 点击上传</span>
</div>
<div class="upload-area" @click="triggerUpload('qr')">
<img v-if="brandQrImage" :src="brandQrImage" class="upload-preview qr-upload-preview" />
<span v-else class="upload-hint">📲 点击上传二维码图片</span>
</div>
<input ref="qrInput" type="file" accept="image/*" style="display:none" @change="handleUpload('qr', $event)" />
<div class="field-hint" style="text-align:center">上传后将显示在配方卡片右下角</div>
<div class="field-hint">上传后将显示在配方卡片右下角</div>
</div>
<div class="form-group">
@@ -176,10 +174,6 @@
<div class="form-static">{{ auth.user.username }}</div>
</div>
<div class="form-group">
<label>角色</label>
<div class="role-badge-display">{{ roleLabel }}</div>
</div>
</div>
<div class="section-card">
@@ -218,7 +212,7 @@
</template>
<script setup>
import { ref, computed, onMounted, watch } from 'vue'
import { ref, onMounted, watch } from 'vue'
import { useRouter } from 'vue-router'
import { useAuthStore } from '../stores/auth'
import { useOilsStore } from '../stores/oils'
@@ -258,16 +252,6 @@ const newPassword = ref('')
const confirmPassword = ref('')
const businessReason = ref('')
const roleLabel = computed(() => {
const roles = {
admin: '管理员',
senior_editor: '高级编辑',
editor: '编辑',
viewer: '查看者',
}
return roles[auth.user.role] || auth.user.role
})
onMounted(async () => {
await diaryStore.loadDiary()
displayName.value = auth.user.display_name || ''
@@ -812,28 +796,6 @@ async function applyBusiness() {
color: #6b6375;
}
.role-badge-display {
display: inline-block;
font-size: 12px;
padding: 3px 12px;
border-radius: 8px;
background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
color: #4a9d7e;
font-weight: 500;
}
.qr-preview {
margin-top: 10px;
text-align: center;
}
.qr-img {
width: 120px;
height: 120px;
border-radius: 8px;
border: 1.5px solid #e5e4e7;
}
.upload-area {
width: 100%;
min-height: 80px;
@@ -851,6 +813,18 @@ async function applyBusiness() {
border-color: #7ec6a4;
}
.qr-preview {
margin-top: 10px;
text-align: center;
}
.qr-img {
width: 120px;
height: 120px;
border-radius: 8px;
border: 1.5px solid #e5e4e7;
}
.upload-preview {
max-width: 80px;
max-height: 80px;
@@ -862,11 +836,9 @@ async function applyBusiness() {
max-height: 100px;
}
.qr-upload-area {
width: 120px;
height: 120px;
min-height: unset;
border-radius: 8px;
.qr-upload-preview {
max-width: 120px;
max-height: 120px;
}
.field-hint {