forked from natuka/web.puabadge.com
修改:logo和名称改为萌趣小宝
This commit is contained in:
1 parent
290b065310
commit
6bf542bf1d
6 files changed
+31
-14
No files matched your search
Binary file not shown.
|
After Width: | Height: | Size: 779 KiB |
@@ -1,5 +1,4 @@
|
||||
import logo1 from '@/assets/douyin/logo_1.png'
|
||||
import logo2 from '@/assets/douyin/logo_2.png'
|
||||
import mengqu from '@/assets/douyin/mengqu.png'
|
||||
import zuozi from '@/assets/douyin/zuozi.png'
|
||||
|
||||
export const douyinConfig = {
|
||||
@@ -11,14 +10,14 @@ export const douyinConfig = {
|
||||
success: '/douyin/success',
|
||||
},
|
||||
|
||||
brandName: '速哇定制',
|
||||
brandName: '萌趣小宝.ai定制',
|
||||
primaryColor: '#5fbf45',
|
||||
background: '#ffffff',
|
||||
|
||||
images: {
|
||||
logo: logo2,
|
||||
logo: mengqu,
|
||||
/** 点云 Logo 段原图 */
|
||||
logoCloud: logo1,
|
||||
logoCloud: mengqu,
|
||||
effectRef: zuozi,
|
||||
},
|
||||
|
||||
|
||||
+20
-3
@@ -10,8 +10,22 @@ import * as douyinRouter from './douyin'
|
||||
import cartoon from '@/views/cartoon/index.vue'
|
||||
import {useStore} from '@/stores'
|
||||
import { config } from '@/config/config'
|
||||
import { douyinConfig } from '@/config/douyin'
|
||||
import { localStorage } from '@/utils/local-storage'
|
||||
|
||||
const DEFAULT_FAVICON = '/douyin-logo.png'
|
||||
|
||||
function setFavicon(href: string) {
|
||||
let link = document.querySelector<HTMLLinkElement>('link[rel="icon"]')
|
||||
if (!link) {
|
||||
link = document.createElement('link')
|
||||
link.rel = 'icon'
|
||||
document.head.appendChild(link)
|
||||
}
|
||||
link.type = 'image/png'
|
||||
link.href = href
|
||||
}
|
||||
|
||||
NProgress.configure({ showSpinner: true, parent: '#app' })
|
||||
|
||||
// 定义路由,每个路由都需要映射到一个组件
|
||||
@@ -74,9 +88,12 @@ router.beforeEach((_to, _from, next) => {
|
||||
const pageTitle = (_to.meta.title as string) || '相册'
|
||||
const titleText = pageTitle.$t || pageTitle
|
||||
const brandText = config.brand?.$t || config.brand || ''
|
||||
// 暂时去掉「葡哇立体肖像」前缀,仅保留页面标题(如「抖音定制」)
|
||||
window.document.title =
|
||||
config.showBrandInTitle && brandText ? `${brandText} - ${titleText}` : String(titleText)
|
||||
const isDouyin = _to.meta.channel === 'douyin' || _to.path.includes('douyin')
|
||||
// 暂时去掉「葡哇立体肖像」前缀;抖音页使用「萌趣小宝.ai定制」
|
||||
window.document.title = isDouyin
|
||||
? `${douyinConfig.brandName} - ${titleText}`
|
||||
: (config.showBrandInTitle && brandText ? `${brandText} - ${titleText}` : String(titleText))
|
||||
setFavicon(isDouyin ? douyinConfig.images.logo : DEFAULT_FAVICON)
|
||||
NProgress.start() // start progress bar
|
||||
const needGuard = _to.meta.needGuard
|
||||
if (needGuard) {
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue'
|
||||
import { douyinConfig } from '@/config/douyin'
|
||||
import logo2 from '@/assets/douyin/logo_2.png'
|
||||
import logo from '@/assets/douyin/mengqu.png'
|
||||
|
||||
const props = defineProps<{
|
||||
phase: string
|
||||
@@ -43,11 +43,11 @@ const copy = computed(() => {
|
||||
})
|
||||
|
||||
const displayUrl = computed(() => {
|
||||
if (props.phase === 'LOGO') return logo2
|
||||
if (props.phase === 'LOGO') return logo
|
||||
if (props.phase === 'RESULT_REVEAL' || props.phase === 'DONE') {
|
||||
return props.resultUrl || props.sourceUrl || logo2
|
||||
return props.resultUrl || props.sourceUrl || logo
|
||||
}
|
||||
return props.sourceUrl || logo2
|
||||
return props.sourceUrl || logo
|
||||
})
|
||||
|
||||
const imgClass = computed(() => {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/** Image point cloud — shared constants */
|
||||
import logo1 from '@/assets/douyin/logo_1.png'
|
||||
import logo1 from '@/assets/douyin/mengqu.png'
|
||||
|
||||
const PHASE = {
|
||||
INIT: 'INIT',
|
||||
|
||||
@@ -234,7 +234,8 @@ onMounted(() => {
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
padding-left: 4px;
|
||||
max-width: 160px;
|
||||
max-width: 100%;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.brand-logo {
|
||||
|
||||
Reference in new issue
Block a user