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 mengqu from '@/assets/douyin/mengqu.png'
|
||||||
import logo2 from '@/assets/douyin/logo_2.png'
|
|
||||||
import zuozi from '@/assets/douyin/zuozi.png'
|
import zuozi from '@/assets/douyin/zuozi.png'
|
||||||
|
|
||||||
export const douyinConfig = {
|
export const douyinConfig = {
|
||||||
@@ -11,14 +10,14 @@ export const douyinConfig = {
|
|||||||
success: '/douyin/success',
|
success: '/douyin/success',
|
||||||
},
|
},
|
||||||
|
|
||||||
brandName: '速哇定制',
|
brandName: '萌趣小宝.ai定制',
|
||||||
primaryColor: '#5fbf45',
|
primaryColor: '#5fbf45',
|
||||||
background: '#ffffff',
|
background: '#ffffff',
|
||||||
|
|
||||||
images: {
|
images: {
|
||||||
logo: logo2,
|
logo: mengqu,
|
||||||
/** 点云 Logo 段原图 */
|
/** 点云 Logo 段原图 */
|
||||||
logoCloud: logo1,
|
logoCloud: mengqu,
|
||||||
effectRef: zuozi,
|
effectRef: zuozi,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
+20
-3
@@ -10,8 +10,22 @@ import * as douyinRouter from './douyin'
|
|||||||
import cartoon from '@/views/cartoon/index.vue'
|
import cartoon from '@/views/cartoon/index.vue'
|
||||||
import {useStore} from '@/stores'
|
import {useStore} from '@/stores'
|
||||||
import { config } from '@/config/config'
|
import { config } from '@/config/config'
|
||||||
|
import { douyinConfig } from '@/config/douyin'
|
||||||
import { localStorage } from '@/utils/local-storage'
|
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' })
|
NProgress.configure({ showSpinner: true, parent: '#app' })
|
||||||
|
|
||||||
// 定义路由,每个路由都需要映射到一个组件
|
// 定义路由,每个路由都需要映射到一个组件
|
||||||
@@ -74,9 +88,12 @@ router.beforeEach((_to, _from, next) => {
|
|||||||
const pageTitle = (_to.meta.title as string) || '相册'
|
const pageTitle = (_to.meta.title as string) || '相册'
|
||||||
const titleText = pageTitle.$t || pageTitle
|
const titleText = pageTitle.$t || pageTitle
|
||||||
const brandText = config.brand?.$t || config.brand || ''
|
const brandText = config.brand?.$t || config.brand || ''
|
||||||
// 暂时去掉「葡哇立体肖像」前缀,仅保留页面标题(如「抖音定制」)
|
const isDouyin = _to.meta.channel === 'douyin' || _to.path.includes('douyin')
|
||||||
window.document.title =
|
// 暂时去掉「葡哇立体肖像」前缀;抖音页使用「萌趣小宝.ai定制」
|
||||||
config.showBrandInTitle && brandText ? `${brandText} - ${titleText}` : String(titleText)
|
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
|
NProgress.start() // start progress bar
|
||||||
const needGuard = _to.meta.needGuard
|
const needGuard = _to.meta.needGuard
|
||||||
if (needGuard) {
|
if (needGuard) {
|
||||||
|
|||||||
@@ -28,7 +28,7 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { computed } from 'vue'
|
import { computed } from 'vue'
|
||||||
import { douyinConfig } from '@/config/douyin'
|
import { douyinConfig } from '@/config/douyin'
|
||||||
import logo2 from '@/assets/douyin/logo_2.png'
|
import logo from '@/assets/douyin/mengqu.png'
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
phase: string
|
phase: string
|
||||||
@@ -43,11 +43,11 @@ const copy = computed(() => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
const displayUrl = computed(() => {
|
const displayUrl = computed(() => {
|
||||||
if (props.phase === 'LOGO') return logo2
|
if (props.phase === 'LOGO') return logo
|
||||||
if (props.phase === 'RESULT_REVEAL' || props.phase === 'DONE') {
|
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(() => {
|
const imgClass = computed(() => {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/** Image point cloud — shared constants */
|
/** Image point cloud — shared constants */
|
||||||
import logo1 from '@/assets/douyin/logo_1.png'
|
import logo1 from '@/assets/douyin/mengqu.png'
|
||||||
|
|
||||||
const PHASE = {
|
const PHASE = {
|
||||||
INIT: 'INIT',
|
INIT: 'INIT',
|
||||||
|
|||||||
@@ -234,7 +234,8 @@ onMounted(() => {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 8px;
|
gap: 8px;
|
||||||
padding-left: 4px;
|
padding-left: 4px;
|
||||||
max-width: 160px;
|
max-width: 100%;
|
||||||
|
min-width: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.brand-logo {
|
.brand-logo {
|
||||||
|
|||||||
Reference in new issue
Block a user