@@ -5,4 +5,4 @@ NODE_ENV='development' | |||||
VITE_APP_TITLE = 'Metavatar-PC' | VITE_APP_TITLE = 'Metavatar-PC' | ||||
VITE_APP_PORT = 3000 | VITE_APP_PORT = 3000 | ||||
VITE_APP_BASE_API = 'https://photo.metavatar.cc/C/api' | |||||
VITE_APP_BASE_API = 'https://photo.metavatar.cc/C' |
@@ -1,5 +1,8 @@ | |||||
## 生产环境 | ## 生产环境 | ||||
# 变量必须以 VITE_ 为前缀才能暴露给外部读取 | |||||
NODE_ENV='production' | |||||
VITE_APP_TITLE = 'Metavatar-PC' | VITE_APP_TITLE = 'Metavatar-PC' | ||||
VITE_APP_PORT = 3000 | VITE_APP_PORT = 3000 | ||||
VITE_APP_BASE_API = 'https://photo.metavatar.cc/C/api' | |||||
VITE_APP_BASE_API = 'https://photo.metavatar.cc/C' |
@@ -0,0 +1,8 @@ | |||||
## 开发环境 | |||||
# 变量必须以 VITE_ 为前缀才能暴露给外部读取 | |||||
NODE_ENV='test' | |||||
VITE_APP_TITLE = 'Metavatar-PC' | |||||
VITE_APP_PORT = 3000 | |||||
VITE_APP_BASE_API = 'https://photo.metavatar.cc/C' |
@@ -5,7 +5,7 @@ | |||||
"type": "module", | "type": "module", | ||||
"scripts": { | "scripts": { | ||||
"dev": "vite serve --mode development", | "dev": "vite serve --mode development", | ||||
"build:dev": "vite build --mode development &&vue-tsc --noEmit", | |||||
"build:dev": "vite build --mode test &&vue-tsc --noEmit", | |||||
"build:prod": "vite build --mode production &&vue-tsc --noEmit" | "build:prod": "vite build --mode production &&vue-tsc --noEmit" | ||||
}, | }, | ||||
"config": { | "config": { | ||||
@@ -48,5 +48,5 @@ export function sendRegisterEmail(email) { | |||||
* @description:获取图形验证码 | * @description:获取图形验证码 | ||||
* @return: 验证码地址 | * @return: 验证码地址 | ||||
*/ | */ | ||||
export const getCodeImgUrl = baseURL + '/user/captcha.jpg' | |||||
export const getCodeImgUrl = baseURL + '/api/user/captcha.jpg' | |||||
@@ -1,5 +1,5 @@ | |||||
<template> | <template> | ||||
<div v-if="sideBarVisible" :class="classObj" class="app-wrapper"> | |||||
<div :class="classObj" class="app-wrapper"> | |||||
<!-- 手机设备侧边栏打开遮罩层 --> | <!-- 手机设备侧边栏打开遮罩层 --> | ||||
<div | <div | ||||
v-if="classObj.mobile && classObj.openSidebar" | v-if="classObj.mobile && classObj.openSidebar" | ||||
@@ -18,16 +18,12 @@ | |||||
<!--主页面--> | <!--主页面--> | ||||
<app-main /> | <app-main /> | ||||
<!-- 设置面板 --> | |||||
<!-- 设置面板 -->- | |||||
<RightPanel v-if="showSettings"> | <RightPanel v-if="showSettings"> | ||||
<settings /> | <settings /> | ||||
</RightPanel> | </RightPanel> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
<div v-if="!sideBarVisible"> | |||||
<SignSucceed /> | |||||
</div> | |||||
</template> | </template> | ||||
<script setup lang="ts"> | <script setup lang="ts"> | ||||
@@ -57,7 +53,6 @@ const WIDTH = 992; | |||||
const appStore = useAppStore(); | const appStore = useAppStore(); | ||||
const settingsStore = useSettingsStore(); | const settingsStore = useSettingsStore(); | ||||
const sideBarVisible = ref(true); | |||||
const fixedHeader = computed(() => settingsStore.fixedHeader); | const fixedHeader = computed(() => settingsStore.fixedHeader); | ||||
const showTagsView = computed(() => settingsStore.tagsView); | const showTagsView = computed(() => settingsStore.tagsView); | ||||
const showSettings = computed(() => settingsStore.showSettings); | const showSettings = computed(() => settingsStore.showSettings); | ||||
@@ -89,12 +84,7 @@ function handleOutsideClick() { | |||||
appStore.closeSideBar(false); | appStore.closeSideBar(false); | ||||
} | } | ||||
onMounted(() => { | |||||
if (route.path == "/signSucceed") { | |||||
sideBarVisible.value = false; | |||||
console.log(true); | |||||
} | |||||
}); | |||||
onMounted(() => {}); | |||||
</script> | </script> | ||||
<style lang="scss" scoped> | <style lang="scss" scoped> | ||||
@@ -22,6 +22,11 @@ export const constantRoutes: RouteRecordRaw[] = [ | |||||
component: () => import("@/views/login/index.vue"), | component: () => import("@/views/login/index.vue"), | ||||
meta: { hidden: true }, | meta: { hidden: true }, | ||||
}, | }, | ||||
{ | |||||
path: "/signSucceed", | |||||
component: () => import("@/views/signSucceed/index.vue"), | |||||
meta: { hidden: true }, | |||||
}, | |||||
// 创建视频 | // 创建视频 | ||||
{ | { | ||||
path: "/", | path: "/", | ||||
@@ -116,25 +121,7 @@ export const constantRoutes: RouteRecordRaw[] = [ | |||||
}, | }, | ||||
], | ], | ||||
}, | }, | ||||
// 商店 | |||||
{ | |||||
path: "/", | |||||
component: Layout, | |||||
redirect: "/signSucceed", | |||||
children: [ | |||||
{ | |||||
path: "signSucceed", | |||||
component: () => import("@/views/signSucceed/index.vue"), | |||||
name: "signSucceed", | |||||
meta: { | |||||
title: "signSucceed", | |||||
icon: "homepage", | |||||
affix: true, | |||||
name: "signSucceed.title", | |||||
}, | |||||
}, | |||||
], | |||||
}, | |||||
// { | // { | ||||
// path: "/dashboard", | // path: "/dashboard", | ||||
// component: Layout, | // component: Layout, | ||||
@@ -3,11 +3,15 @@ import router from '@/router' | |||||
import { ElMessage } from 'element-plus' | import { ElMessage } from 'element-plus' | ||||
ElMessage | ElMessage | ||||
// 开发环境需以 "/api" 拼接,其他环境需以 "/C" 拼接 | |||||
const env = process.env.NODE_ENV == 'development' ? "/api" : "/C" | |||||
console.log(env, 'env') | |||||
/** | /** | ||||
* @description:发送Axios请求 | * @description:发送Axios请求 | ||||
*/ | */ | ||||
const request = axios.create({ | const request = axios.create({ | ||||
baseURL: '/api', | |||||
baseURL: env, | |||||
timeout: 5000 | timeout: 5000 | ||||
}) | }) | ||||
@@ -1,6 +1,6 @@ | |||||
<template> | <template> | ||||
<div class="login-container"> | <div class="login-container"> | ||||
<div class="Version">Version 1.0.1</div> | |||||
<div class="Version">Version 1.0.2</div> | |||||
<div class="videoBox"> | <div class="videoBox"> | ||||
<video | <video | ||||
src="https://video.metavatar.cc/sv/4aaaaa5e-18832dbb5e6/4aaaaa5e-18832dbb5e6.mp4" | src="https://video.metavatar.cc/sv/4aaaaa5e-18832dbb5e6/4aaaaa5e-18832dbb5e6.mp4" | ||||