Procházet zdrojové kódy

Merge branch 'dev' into dev_YWQ

dev_YWQ
HolyKnightIX před 1 rokem
rodič
revize
7bfa17e50d
9 změnil soubory, kde provedl 30 přidání a 38 odebrání
  1. +1
    -1
      .env.development
  2. +4
    -1
      .env.production
  3. +8
    -0
      .env.test
  4. +1
    -1
      package.json
  5. +1
    -1
      src/apis/login.js
  6. +3
    -13
      src/layout/index.vue
  7. +6
    -19
      src/router/index.ts
  8. +5
    -1
      src/utils/request.js
  9. +1
    -1
      src/views/login/index.vue

+ 1
- 1
.env.development Zobrazit soubor

@@ -5,4 +5,4 @@ NODE_ENV='development'

VITE_APP_TITLE = 'Metavatar-PC'
VITE_APP_PORT = 3000
VITE_APP_BASE_API = 'https://photo.metavatar.cc/C/api'
VITE_APP_BASE_API = 'https://photo.metavatar.cc/C'

+ 4
- 1
.env.production Zobrazit soubor

@@ -1,5 +1,8 @@
## 生产环境

# 变量必须以 VITE_ 为前缀才能暴露给外部读取
NODE_ENV='production'

VITE_APP_TITLE = 'Metavatar-PC'
VITE_APP_PORT = 3000
VITE_APP_BASE_API = 'https://photo.metavatar.cc/C/api'
VITE_APP_BASE_API = 'https://photo.metavatar.cc/C'

+ 8
- 0
.env.test Zobrazit soubor

@@ -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'

+ 1
- 1
package.json Zobrazit soubor

@@ -5,7 +5,7 @@
"type": "module",
"scripts": {
"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"
},
"config": {


+ 1
- 1
src/apis/login.js Zobrazit soubor

@@ -48,5 +48,5 @@ export function sendRegisterEmail(email) {
* @description:获取图形验证码
* @return: 验证码地址
*/
export const getCodeImgUrl = baseURL + '/user/captcha.jpg'
export const getCodeImgUrl = baseURL + '/api/user/captcha.jpg'


+ 3
- 13
src/layout/index.vue Zobrazit soubor

@@ -1,5 +1,5 @@
<template>
<div v-if="sideBarVisible" :class="classObj" class="app-wrapper">
<div :class="classObj" class="app-wrapper">
<!-- 手机设备侧边栏打开遮罩层 -->
<div
v-if="classObj.mobile && classObj.openSidebar"
@@ -18,16 +18,12 @@
<!--主页面-->
<app-main />

<!-- 设置面板 -->
<!-- 设置面板 -->-
<RightPanel v-if="showSettings">
<settings />
</RightPanel>
</div>
</div>

<div v-if="!sideBarVisible">
<SignSucceed />
</div>
</template>

<script setup lang="ts">
@@ -57,7 +53,6 @@ const WIDTH = 992;
const appStore = useAppStore();
const settingsStore = useSettingsStore();

const sideBarVisible = ref(true);
const fixedHeader = computed(() => settingsStore.fixedHeader);
const showTagsView = computed(() => settingsStore.tagsView);
const showSettings = computed(() => settingsStore.showSettings);
@@ -89,12 +84,7 @@ function handleOutsideClick() {
appStore.closeSideBar(false);
}

onMounted(() => {
if (route.path == "/signSucceed") {
sideBarVisible.value = false;
console.log(true);
}
});
onMounted(() => {});
</script>

<style lang="scss" scoped>


+ 6
- 19
src/router/index.ts Zobrazit soubor

@@ -22,6 +22,11 @@ export const constantRoutes: RouteRecordRaw[] = [
component: () => import("@/views/login/index.vue"),
meta: { hidden: true },
},
{
path: "/signSucceed",
component: () => import("@/views/signSucceed/index.vue"),
meta: { hidden: true },
},
// 创建视频
{
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",
// component: Layout,


+ 5
- 1
src/utils/request.js Zobrazit soubor

@@ -3,11 +3,15 @@ import router from '@/router'
import { ElMessage } from 'element-plus'
ElMessage

// 开发环境需以 "/api" 拼接,其他环境需以 "/C" 拼接
const env = process.env.NODE_ENV == 'development' ? "/api" : "/C"
console.log(env, 'env')

/**
* @description:发送Axios请求
*/
const request = axios.create({
baseURL: '/api',
baseURL: env,
timeout: 5000
})



+ 1
- 1
src/views/login/index.vue Zobrazit soubor

@@ -1,6 +1,6 @@
<template>
<div class="login-container">
<div class="Version">Version 1.0.1</div>
<div class="Version">Version 1.0.2</div>
<div class="videoBox">
<video
src="https://video.metavatar.cc/sv/4aaaaa5e-18832dbb5e6/4aaaaa5e-18832dbb5e6.mp4"


Načítá se…
Zrušit
Uložit