去除不必要代码

This commit is contained in:
dqz 2025-03-11 08:58:19 +08:00
parent 1ab653eebe
commit c862472dee
5 changed files with 112 additions and 180 deletions

View File

@ -1,7 +1,7 @@
# 线上环境平台打包路径 # 线上环境平台打包路径
VITE_PUBLIC_PATH = ./ VITE_PUBLIC_PATH = /shop-admin/
# 线上环境路由历史模式Hash模式传"hash"、HTML5模式传"h5"、Hash模式带base参数传"hash,base参数"、HTML5模式带base参数传"h5,base参数" # 预发布环境路由历史模式Hash模式传"hash"、HTML5模式传"h5"、Hash模式带base参数传"hash,base参数"、HTML5模式带base参数传"h5,base参数"
VITE_ROUTER_HISTORY = "hash" VITE_ROUTER_HISTORY = "hash"
# 是否在打包时使用cdn替换本地库 替换 true 不替换 false # 是否在打包时使用cdn替换本地库 替换 true 不替换 false
@ -13,4 +13,4 @@ VITE_CDN = false
VITE_COMPRESSION = "none" VITE_COMPRESSION = "none"
# 后端地址 # 后端地址
VITE_APP_BASE_API = '/prod-api' VITE_APP_BASE_API = '/shop-back-end'

View File

@ -1,14 +1,13 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="UTF-8" /> <meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="renderer" content="webkit" /> <meta name="renderer" content="webkit" />
<meta <meta name="viewport"
name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=0" />
content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=0" <title>微商城管理系统</title>
/>
<title>Agileboot管理系统</title>
<link rel="icon" href="/favicon.ico" /> <link rel="icon" href="/favicon.ico" />
<script> <script>
window.process = {}; window.process = {};
@ -69,6 +68,7 @@
} }
@keyframes load-animation { @keyframes load-animation {
0%, 0%,
80%, 80%,
100% { 100% {
@ -84,4 +84,5 @@
</div> </div>
<script type="module" src="/src/main.ts"></script> <script type="module" src="/src/main.ts"></script>
</body> </body>
</html> </html>

View File

@ -1,6 +1,6 @@
{ {
"Version": "4.4.0", "Version": "4.4.0",
"Title": "Agileboot", "Title": "微商城后台管理系统",
"FixedHeader": true, "FixedHeader": true,
"HiddenSideBar": false, "HiddenSideBar": false,
"MultiTagsCache": false, "MultiTagsCache": false,

View File

@ -158,13 +158,8 @@ onBeforeUnmount(() => {
<img :src="bg" class="wave" /> <img :src="bg" class="wave" />
<div class="absolute flex-c right-5 top-3"> <div class="absolute flex-c right-5 top-3">
<!-- 主题 --> <!-- 主题 -->
<el-switch <el-switch v-model="dataTheme" :active-icon="dayIcon" :inactive-icon="darkIcon" inline-prompt
v-model="dataTheme" @change="dataThemeChange" />
:active-icon="dayIcon"
:inactive-icon="darkIcon"
inline-prompt
@change="dataThemeChange"
/>
</div> </div>
<div class="login-container"> <div class="login-container">
<div class="img"> <div class="img">
@ -181,63 +176,36 @@ onBeforeUnmount(() => {
</h2> </h2>
</Motion> </Motion>
<el-form <el-form v-if="currentPage === 0" ref="ruleFormRef" :model="ruleForm" :rules="loginRules" size="large">
v-if="currentPage === 0"
ref="ruleFormRef"
:model="ruleForm"
:rules="loginRules"
size="large"
>
<Motion :delay="100"> <Motion :delay="100">
<el-form-item <el-form-item :rules="[
:rules="[
{ {
required: true, required: true,
message: '请输入账号', message: '请输入账号',
trigger: 'blur' trigger: 'blur'
} }
]" ]" prop="username">
prop="username" <el-input v-model="ruleForm.username" :prefix-icon="useRenderIcon(User)" clearable placeholder="账号" />
>
<el-input
v-model="ruleForm.username"
:prefix-icon="useRenderIcon(User)"
clearable
placeholder="账号"
/>
</el-form-item> </el-form-item>
</Motion> </Motion>
<Motion :delay="150"> <Motion :delay="150">
<el-form-item prop="password"> <el-form-item prop="password">
<el-input <el-input v-model="ruleForm.password" :prefix-icon="useRenderIcon(Lock)" clearable placeholder="密码"
v-model="ruleForm.password" show-password />
:prefix-icon="useRenderIcon(Lock)"
clearable
placeholder="密码"
show-password
/>
</el-form-item> </el-form-item>
</Motion> </Motion>
<Motion :delay="200"> <Motion :delay="200">
<el-form-item v-if="isCaptchaOn" prop="captchaCode"> <el-form-item v-if="isCaptchaOn" prop="captchaCode">
<el-input <el-input v-model="ruleForm.captchaCode" :prefix-icon="useRenderIcon('ri:shield-keyhole-line')"
v-model="ruleForm.captchaCode" clearable placeholder="验证码">
:prefix-icon="useRenderIcon('ri:shield-keyhole-line')"
clearable
placeholder="验证码"
>
<template v-slot:append> <template v-slot:append>
<el-image <el-image :src="captchaCodeBase64" style="
:src="captchaCodeBase64"
style="
justify-content: center; justify-content: center;
width: 120px; width: 120px;
height: 40px; height: 40px;
" " @click="getCaptchaCode">
@click="getCaptchaCode"
>
<template #error> <template #error>
<span>Loading</span> <span>Loading</span>
</template> </template>
@ -255,13 +223,8 @@ onBeforeUnmount(() => {
忘记密码 忘记密码
</el-button> </el-button>
</div> </div>
<el-button <el-button :loading="loading" class="w-full mt-4" size="default" type="primary"
:loading="loading" @click="onLogin(ruleFormRef)">
class="w-full mt-4"
size="default"
type="primary"
@click="onLogin(ruleFormRef)"
>
登录 登录
</el-button> </el-button>
</el-form-item> </el-form-item>
@ -270,13 +233,8 @@ onBeforeUnmount(() => {
<Motion :delay="300"> <Motion :delay="300">
<el-form-item> <el-form-item>
<div class="w-full h-[20px] flex justify-between items-center"> <div class="w-full h-[20px] flex justify-between items-center">
<el-button <el-button v-for="(item, index) in operates" :key="index" class="w-full mt-4" size="default"
v-for="(item, index) in operates" @click="currentPage = item.page">
:key="index"
class="w-full mt-4"
size="default"
@click="currentPage = item.page"
>
{{ item.title }} {{ item.title }}
</el-button> </el-button>
</div> </div>
@ -290,16 +248,9 @@ onBeforeUnmount(() => {
<p class="text-xs text-gray-500">{{ "第三方登录" }}</p> <p class="text-xs text-gray-500">{{ "第三方登录" }}</p>
</el-divider> </el-divider>
<div class="flex w-full justify-evenly"> <div class="flex w-full justify-evenly">
<span <span v-for="(item, index) in thirdParty" :key="index" :title="item.title">
v-for="(item, index) in thirdParty" <IconifyIconOnline :icon="`ri:${item.icon}-fill`"
:key="index" class="text-gray-500 cursor-pointer hover:text-blue-400" width="20" />
:title="item.title"
>
<IconifyIconOnline
:icon="`ri:${item.icon}-fill`"
class="text-gray-500 cursor-pointer hover:text-blue-400"
width="20"
/>
</span> </span>
</div> </div>
</el-form-item> </el-form-item>
@ -309,31 +260,12 @@ onBeforeUnmount(() => {
<!-- 二维码登录 --> <!-- 二维码登录 -->
<qrCode v-if="currentPage === 2" v-model:current-page="currentPage" /> <qrCode v-if="currentPage === 2" v-model:current-page="currentPage" />
<!-- 注册 --> <!-- 注册 -->
<register <register v-if="currentPage === 3" v-model:current-page="currentPage" />
v-if="currentPage === 3"
v-model:current-page="currentPage"
/>
<!-- 忘记密码 --> <!-- 忘记密码 -->
<resetPassword <resetPassword v-if="currentPage === 4" v-model:current-page="currentPage" />
v-if="currentPage === 4"
v-model:current-page="currentPage"
/>
</div> </div>
</div> </div>
</div> </div>
<!-- 底部 -->
<div class="flex items-center justify-center h-full">
<div class="flex flex-col items-center justify-center mb-3">
<span>Copyright © 2018-2023 Agileboot All Rights Reserved. </span>
<el-link
href="https://beian.miit.gov.cn"
rel="external nofollow"
target="_blank"
type="primary"
>闽ICP备2022018106号-2
</el-link>
</div>
</div>
</div> </div>
</template> </template>

View File

@ -5,5 +5,4 @@ defineOptions({
</script> </script>
<template> <template>
<h1>Agileboot前端预览</h1>
</template> </template>