generated from Leo_Ding/web-template
环境配置
This commit is contained in:
parent
44f1742797
commit
2d9558e5e6
4
.env.dev
4
.env.dev
@ -2,7 +2,7 @@
|
|||||||
NODE_ENV=development
|
NODE_ENV=development
|
||||||
|
|
||||||
# app
|
# app
|
||||||
VITE_TITLE=GuXuan-Admin
|
VITE_TITLE=HaHa-Admin
|
||||||
VITE_PUBLIC_PATH=/
|
VITE_PUBLIC_PATH=/
|
||||||
VITE_OUT_DIR=dist
|
VITE_OUT_DIR=dist
|
||||||
VITE_PERMISSION=false
|
VITE_PERMISSION=false
|
||||||
@ -12,7 +12,7 @@ VITE_ROUTER_BASE=/
|
|||||||
VITE_ROUTER_HISTORY=hash
|
VITE_ROUTER_HISTORY=hash
|
||||||
|
|
||||||
# api
|
# api
|
||||||
VITE_API_BASIC=
|
VITE_API_BASIC='http://10.10.1.6:8040'
|
||||||
VITE_API_HTTP=/api/v1/
|
VITE_API_HTTP=/api/v1/
|
||||||
# storage
|
# storage
|
||||||
VITE_STORAGE_NAMESPACE = gin-admin_local_
|
VITE_STORAGE_NAMESPACE = gin-admin_local_
|
||||||
@ -2,9 +2,9 @@
|
|||||||
NODE_ENV=production
|
NODE_ENV=production
|
||||||
|
|
||||||
# app
|
# app
|
||||||
VITE_TITLE=GuXuan-Admin
|
VITE_TITLE=HaHa-Admin
|
||||||
VITE_PUBLIC_PATH=/
|
VITE_PUBLIC_PATH=/
|
||||||
VITE_OUT_DIR=dist
|
VITE_OUT_DIR=index
|
||||||
VITE_PERMISSION=true
|
VITE_PERMISSION=true
|
||||||
|
|
||||||
# router
|
# router
|
||||||
|
|||||||
1
.gitignore
vendored
1
.gitignore
vendored
@ -9,6 +9,7 @@ lerna-debug.log*
|
|||||||
|
|
||||||
node_modules
|
node_modules
|
||||||
dist
|
dist
|
||||||
|
index
|
||||||
dist-ssr
|
dist-ssr
|
||||||
*.local
|
*.local
|
||||||
*/.vitepress/cache/**/*
|
*/.vitepress/cache/**/*
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
# GuXuan-Admin-Template
|
# HaHa-Admin-Template
|
||||||
|
|
||||||
> GIN-Admin-vue is a frontend project for [gin-admin](https://github.com/LyricTian/gin-admin) base on Ant Design React.
|
> GIN-Admin-vue is a frontend project for [gin-admin](https://github.com/LyricTian/gin-admin) base on Ant Design React.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
- [Preview](http://101.42.232.163:8040)
|
- [Preview](http://101.42.232.163:8040)
|
||||||
- Username: admin
|
- Username: admin
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<link rel="icon"
|
<link rel="icon"
|
||||||
href="/favicon.ico" />
|
href="/logo-hahayun.png" />
|
||||||
<meta name="viewport"
|
<meta name="viewport"
|
||||||
content="width=device-width, initial-scale=1.0" />
|
content="width=device-width, initial-scale=1.0" />
|
||||||
<title></title>
|
<title></title>
|
||||||
|
|||||||
4
package-lock.json
generated
4
package-lock.json
generated
@ -1,11 +1,11 @@
|
|||||||
{
|
{
|
||||||
"name": "gin-admin",
|
"name": "HaHa-Admin",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "gin-admin",
|
"name": "HaHa-Admin",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@ant-design/colors": "^7.0.0",
|
"@ant-design/colors": "^7.0.0",
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"name": "guxuan-admin",
|
"name": "HaHa-Admin",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
BIN
public/logo-hahayun.png
Normal file
BIN
public/logo-hahayun.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.6 KiB |
BIN
src/assets/img2.png
Normal file
BIN
src/assets/img2.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 80 KiB |
BIN
src/assets/imgs/jianguan.png
Normal file
BIN
src/assets/imgs/jianguan.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.1 KiB |
BIN
src/assets/imgs/tel.png
Normal file
BIN
src/assets/imgs/tel.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 6.0 KiB |
BIN
src/assets/imgs/yunying.png
Normal file
BIN
src/assets/imgs/yunying.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.9 KiB |
BIN
src/assets/ylimg.png
Normal file
BIN
src/assets/ylimg.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 36 KiB |
@ -7,8 +7,8 @@
|
|||||||
<div class="aside-body">
|
<div class="aside-body">
|
||||||
<img
|
<img
|
||||||
alt=""
|
alt=""
|
||||||
:src="assets('logos.png')" />
|
:src="assets('ylimg.png')" />
|
||||||
<h3>{{ $t('pages.layouts.userLayout.title') }}</h3>
|
<!-- <h3>{{ $t('pages.layouts.userLayout.title') }}</h3> -->
|
||||||
<!-- <p>Vue3 + Ant Design Vue + vite</p>-->
|
<!-- <p>Vue3 + Ant Design Vue + vite</p>-->
|
||||||
</div>
|
</div>
|
||||||
<div class="aside-footer">
|
<div class="aside-footer">
|
||||||
@ -17,10 +17,9 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="user-layout-main">
|
<div class="user-layout-main">
|
||||||
<div class="user-layout-content">
|
<div class="user-layout-content">
|
||||||
<div class="user-layout-top">
|
<!-- <div class="user-layout-top">
|
||||||
<div class="user-layout-header">{{ $t('login') }}</div>
|
<div class="user-layout-header">{{ $t('login') }}</div>
|
||||||
<!-- <div class="user-layout-desc">欢迎使用{{ title }}</div>-->
|
</div> -->
|
||||||
</div>
|
|
||||||
<div class="user-layout-form">
|
<div class="user-layout-form">
|
||||||
<router-view></router-view>
|
<router-view></router-view>
|
||||||
</div>
|
</div>
|
||||||
@ -130,7 +129,7 @@ function handleLang(lang) {
|
|||||||
&-body {
|
&-body {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
padding: 48px 0 0;
|
padding: 60px 0 0;
|
||||||
|
|
||||||
img {
|
img {
|
||||||
width: 80%;
|
width: 80%;
|
||||||
@ -162,7 +161,7 @@ function handleLang(lang) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
&-content {
|
&-content {
|
||||||
width: 368px;
|
// width: 368px;
|
||||||
height: 440px;
|
height: 440px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -3,7 +3,7 @@ import * as layouts from '@/layouts'
|
|||||||
* 白名单
|
* 白名单
|
||||||
* @type {string[]}
|
* @type {string[]}
|
||||||
*/
|
*/
|
||||||
export const whiteList = ['login', 'logout', '404', 'users']
|
export const whiteList = ['login', 'logout', '404', 'users','plateform']
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 未找到页面路由
|
* 未找到页面路由
|
||||||
@ -41,6 +41,14 @@ export const constantRoutes = [
|
|||||||
title: '登录',
|
title: '登录',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: '/plateform',
|
||||||
|
name: 'plateform',
|
||||||
|
component: () => import('@/views/login/platForm.vue'),
|
||||||
|
meta: {
|
||||||
|
title: '平台选择',
|
||||||
|
},
|
||||||
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,31 +1,21 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
|
<div class="user-layout-header" style="font-size: 30px;font-weight: 500;">{{ $t('login') }}</div>
|
||||||
<a-tabs>
|
<a-tabs>
|
||||||
<!-- 账号登录 -->
|
<!-- 账号登录 -->
|
||||||
<a-tab-pane
|
<a-tab-pane key="account" :tab="$t('pages.login.accountLogin.tab')">
|
||||||
key="account"
|
<a-form :model="formData" :rules="formRules" ref="formRef">
|
||||||
:tab="$t('pages.login.accountLogin.tab')">
|
|
||||||
<a-form
|
|
||||||
:model="formData"
|
|
||||||
:rules="formRules"
|
|
||||||
ref="formRef">
|
|
||||||
<a-form-item name="username">
|
<a-form-item name="username">
|
||||||
<a-input
|
<a-input :placeholder="$t('pages.login.username.placeholder')"
|
||||||
:placeholder="$t('pages.login.username.placeholder')"
|
v-model:value="formData.username" size="large">
|
||||||
v-model:value="formData.username"
|
|
||||||
size="large">
|
|
||||||
<template #prefix>
|
<template #prefix>
|
||||||
<user-outlined></user-outlined>
|
<user-outlined></user-outlined>
|
||||||
</template>
|
</template>
|
||||||
</a-input>
|
</a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item name="password">
|
<a-form-item name="password">
|
||||||
<a-input
|
<a-input v-model:value="formData.password" size="large" type="password"
|
||||||
v-model:value="formData.password"
|
:placeholder="$t('pages.login.password.placeholder')" @pressEnter="handleLogin">
|
||||||
size="large"
|
|
||||||
type="password"
|
|
||||||
:placeholder="$t('pages.login.password.placeholder')"
|
|
||||||
@pressEnter="handleLogin">
|
|
||||||
<template #prefix>
|
<template #prefix>
|
||||||
<lock-outlined></lock-outlined>
|
<lock-outlined></lock-outlined>
|
||||||
</template>
|
</template>
|
||||||
@ -33,32 +23,19 @@
|
|||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item name="captcha_code">
|
<a-form-item name="captcha_code">
|
||||||
<a-space>
|
<a-space>
|
||||||
<a-input
|
<a-input v-model:value="formData.captcha_code" size="large" type="text"
|
||||||
v-model:value="formData.captcha_code"
|
:placeholder="$t('pages.login.captcha.placeholder')" @pressEnter="handleLogin">
|
||||||
size="large"
|
|
||||||
type="text"
|
|
||||||
:placeholder="$t('pages.login.captcha.placeholder')"
|
|
||||||
@pressEnter="handleLogin">
|
|
||||||
<template #prefix>
|
<template #prefix>
|
||||||
<safety-outlined />
|
<safety-outlined />
|
||||||
</template>
|
</template>
|
||||||
</a-input>
|
</a-input>
|
||||||
<a-image
|
<a-image @click="getCaptcha" :preview="false" :width="140" :height="42"
|
||||||
@click="getCaptcha"
|
|
||||||
:preview="false"
|
|
||||||
:width="140"
|
|
||||||
:height="42"
|
|
||||||
:src="captcha_img" />
|
:src="captcha_img" />
|
||||||
</a-space>
|
</a-space>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item>
|
<a-form-item>
|
||||||
<a-button
|
<a-button type="primary" size="large" block :loading="loading" @click="handleLogin">{{
|
||||||
type="primary"
|
$t('pages.login.submit') }}
|
||||||
size="large"
|
|
||||||
block
|
|
||||||
:loading="loading"
|
|
||||||
@click="handleLogin"
|
|
||||||
>{{ $t('pages.login.submit') }}
|
|
||||||
</a-button>
|
</a-button>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-form>
|
</a-form>
|
||||||
@ -76,6 +53,7 @@ import { config } from '@/config'
|
|||||||
import { useForm } from '@/hooks'
|
import { useForm } from '@/hooks'
|
||||||
import { useAppStore, useRouterStore, useUserStore } from '@/store'
|
import { useAppStore, useRouterStore, useUserStore } from '@/store'
|
||||||
import { timeFix } from '@/utils/util'
|
import { timeFix } from '@/utils/util'
|
||||||
|
|
||||||
import apis from '@/apis'
|
import apis from '@/apis'
|
||||||
import { md5 } from 'js-md5'
|
import { md5 } from 'js-md5'
|
||||||
import { useI18n } from 'vue-i18n'
|
import { useI18n } from 'vue-i18n'
|
||||||
@ -92,6 +70,8 @@ const route = useRoute()
|
|||||||
const loading = ref(false)
|
const loading = ref(false)
|
||||||
const captcha_img = ref('')
|
const captcha_img = ref('')
|
||||||
const captcha_id = ref('')
|
const captcha_id = ref('')
|
||||||
|
const currentStep = ref(2) // 当前步骤
|
||||||
|
|
||||||
const httpApi = import.meta.env.BASE_URL + `api/v1/captcha/image`
|
const httpApi = import.meta.env.BASE_URL + `api/v1/captcha/image`
|
||||||
const redirect = computed(() => decodeURIComponent(route.query?.redirect ?? ''))
|
const redirect = computed(() => decodeURIComponent(route.query?.redirect ?? ''))
|
||||||
|
|
||||||
@ -188,4 +168,35 @@ function goIndex() {
|
|||||||
:deep(.ant-tabs-tab) {
|
:deep(.ant-tabs-tab) {
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.user-layout-platform {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-around;
|
||||||
|
align-items: center;
|
||||||
|
gap: 20px;
|
||||||
|
width: 100%;
|
||||||
|
.platform-item {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
width: 200px;
|
||||||
|
flex-shrink: 0; /* 防止元素被压缩 */
|
||||||
|
background: #415172;
|
||||||
|
border-radius: 8px;
|
||||||
|
font-size: 20px;
|
||||||
|
font-weight: 600;
|
||||||
|
color: #fff;
|
||||||
|
|
||||||
|
img {
|
||||||
|
width: 80px;
|
||||||
|
height: 80px;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
span {
|
||||||
|
font-size: 16px;
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
56
src/views/login/platForm.vue
Normal file
56
src/views/login/platForm.vue
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
<template>
|
||||||
|
<div class="user-layout-platform">
|
||||||
|
<div v-for="value in plateformList" :key="value.title" class="platform-item">
|
||||||
|
<img :src="value.icon" alt="" />
|
||||||
|
<span>{{ value.title }}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script setup>
|
||||||
|
import { computed, onMounted, ref } from 'vue'
|
||||||
|
import tel from '@/assets/imgs/tel.png'
|
||||||
|
import jianguan from '@/assets/imgs/jianguan.png'
|
||||||
|
import yunying from '@/assets/imgs/yunying.png'
|
||||||
|
defineOptions({
|
||||||
|
name: 'login',
|
||||||
|
})
|
||||||
|
const plateformList = ref([
|
||||||
|
{ title: '呼叫中心', icon: tel },
|
||||||
|
{ title: '监管平台', icon: jianguan },
|
||||||
|
{ title: '运营平台', icon: yunying },
|
||||||
|
])
|
||||||
|
</script>
|
||||||
|
<style lang="less" scoped>
|
||||||
|
|
||||||
|
.user-layout-platform {
|
||||||
|
margin: 0 auto;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-around;
|
||||||
|
align-items: center;
|
||||||
|
gap: 20px;
|
||||||
|
width: 100%;
|
||||||
|
.platform-item {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
width: 200px;
|
||||||
|
flex-shrink: 0; /* 防止元素被压缩 */
|
||||||
|
background: #415172;
|
||||||
|
border-radius: 8px;
|
||||||
|
font-size: 20px;
|
||||||
|
font-weight: 600;
|
||||||
|
color: #fff;
|
||||||
|
|
||||||
|
img {
|
||||||
|
width: 80px;
|
||||||
|
height: 80px;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
span {
|
||||||
|
font-size: 16px;
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
Loading…
x
Reference in New Issue
Block a user