feat(avatar): optimize embedded H5 management flow
This commit is contained in:
@@ -1,15 +1,11 @@
|
||||
<template>
|
||||
<div class="avatar-manage-page">
|
||||
<!-- 顶部导航 -->
|
||||
<header class="page-header">
|
||||
<header v-if="!isEmbedded" class="page-header">
|
||||
<div class="header-left">
|
||||
<button class="back-btn" @click="goBack">‹</button>
|
||||
<h1 class="page-title">数字分身管理</h1>
|
||||
</div>
|
||||
<!-- 右上角创建入口 -->
|
||||
<div class="header-right">
|
||||
<button class="icon-btn" @click="goCreate" title="创建数字分身">➕</button>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<!-- 用户资料头(会会登录账号的头像 / 昵称) -->
|
||||
@@ -39,8 +35,13 @@
|
||||
<!-- 数字分身列表(只放分身相关) -->
|
||||
<section class="avatar-list-section">
|
||||
<div class="section-head">
|
||||
<h3 class="section-title">我的数字分身</h3>
|
||||
<span class="count-badge">{{ avatars.length }}</span>
|
||||
<div class="section-heading-copy">
|
||||
<h3 class="section-title">我的数字分身</h3>
|
||||
<span class="count-badge">{{ avatars.length }}</span>
|
||||
</div>
|
||||
<button class="section-create-btn" type="button" @click="goCreate">
|
||||
<span aria-hidden="true">+</span> 添加分身
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div v-if="avatars.length" class="avatar-list">
|
||||
@@ -87,10 +88,12 @@ import { useRouter } from 'vue-router'
|
||||
import { useAvatarStore } from '@/store/avatar'
|
||||
import { useUserStore } from '@/store/user'
|
||||
import { createAvatarShareLink } from '@/api'
|
||||
import { isHuihuiEmbeddedMode } from '@/utils/embed-mode'
|
||||
|
||||
const router = useRouter()
|
||||
const avatarStore = useAvatarStore()
|
||||
const userStore = useUserStore()
|
||||
const isEmbedded = isHuihuiEmbeddedMode()
|
||||
|
||||
// 临时产品开关:余额卡片代码保留,后续改为 true 即可恢复展示。
|
||||
const SHOW_POINTS_BALANCE_CARD = false
|
||||
@@ -354,10 +357,36 @@ onMounted(() => {
|
||||
.section-head {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
justify-content: space-between;
|
||||
gap: 12px;
|
||||
margin: 8px 0 12px;
|
||||
}
|
||||
|
||||
.section-heading-copy {
|
||||
min-width: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.section-create-btn {
|
||||
flex: 0 0 auto;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 3px;
|
||||
padding: 8px 12px;
|
||||
border: 1px solid #FED7B5;
|
||||
border-radius: 999px;
|
||||
color: #E9650C;
|
||||
background: #FFF7ED;
|
||||
font-size: 12px;
|
||||
font-weight: 650;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.section-create-btn span { font-size: 17px; line-height: 1; }
|
||||
.section-create-btn:active { background: #FFEDD5; }
|
||||
|
||||
.section-title {
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
|
||||
Reference in New Issue
Block a user