奇淼(piexlmax
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
24 changed files with 160 additions and 10161 deletions
-
7server/api/v1/sys_initdb.go
-
24server/api/v1/sys_user.go
-
1server/config.yaml
-
1server/model/sys_auto_code.go
-
4server/resource/template/server/model.go.tpl
-
3server/router/sys_base.go
-
3server/service/jwt_black_list.go
-
9server/service/sys_auto_code.go
-
33server/service/sys_initdb.go
-
8web/.env.development
-
8web/.env.production
-
6web/src/App.vue
-
15web/src/core/config.js
-
4web/src/core/gin-vue-admin.js
-
7web/src/utils/page.js
-
23web/src/utils/request.js
-
24web/src/view/init/index.vue
-
2web/src/view/layout/bottomInfo/bottomInfo.vue
-
6web/src/view/layout/index.vue
-
31web/src/view/layout/search/search.vue
-
25web/src/view/login/index.vue
-
157web/src/view/login/login.vue
-
4web/src/view/systemTools/autoCode/index.vue
-
9916web/yarn.lock
@ -1,6 +1,6 @@ |
|||||
ENV = 'development' |
ENV = 'development' |
||||
|
|
||||
VUE_APP_CLI_PORT = '8080' |
|
||||
VUE_APP_SERVER_PORT = '8888' |
|
||||
VUE_APP_BASE_API = '/api' |
|
||||
VUE_APP_BASE_PATH = 'http://127.0.0.1' |
|
||||
|
VUE_APP_CLI_PORT = 8080 |
||||
|
VUE_APP_SERVER_PORT = 8888 |
||||
|
VUE_APP_BASE_API = /api |
||||
|
VUE_APP_BASE_PATH = http://127.0.0.1 |
@ -1,7 +1,7 @@ |
|||||
ENV = 'production' |
ENV = 'production' |
||||
|
|
||||
VUE_APP_CLI_PORT = '8080' |
|
||||
VUE_APP_SERVER_PORT = '8888' |
|
||||
VUE_APP_BASE_API = '/api' |
|
||||
|
VUE_APP_CLI_PORT = 8080 |
||||
|
VUE_APP_SERVER_PORT = 8888 |
||||
|
VUE_APP_BASE_API = /api |
||||
#下方修改为你的线上ip |
#下方修改为你的线上ip |
||||
VUE_APP_BASE_PATH = 'http://8.141.61.63' |
|
||||
|
VUE_APP_BASE_PATH = http://8.141.61.63 |
@ -0,0 +1,15 @@ |
|||||
|
/* |
||||
|
* 网站配置文件 |
||||
|
* */ |
||||
|
|
||||
|
|
||||
|
|
||||
|
const config ={ |
||||
|
|
||||
|
appName : 'Gin-Vue-Admin', |
||||
|
|
||||
|
appLogo : 'https://www.gin-vue-admin.com/img/logo.png' |
||||
|
|
||||
|
} |
||||
|
|
||||
|
export default config |
@ -1,8 +1,7 @@ |
|||||
const title = 'GIN-VUE-ADMIN' |
|
||||
|
|
||||
|
import config from '@/core/config' |
||||
export default function getPageTitle(pageTitle) { |
export default function getPageTitle(pageTitle) { |
||||
if (pageTitle) { |
if (pageTitle) { |
||||
return `${pageTitle} - ${title}` |
|
||||
|
return `${pageTitle} - ${config.appName}` |
||||
} |
} |
||||
return `${title}` |
|
||||
|
return `${config.appName}` |
||||
} |
} |
@ -1,157 +0,0 @@ |
|||||
<template> |
|
||||
<div id="userLayout" class="user-layout-wrapper"> |
|
||||
<div class="container"> |
|
||||
<div class="top"> |
|
||||
<div class="desc"> |
|
||||
<img class="logo_login" src="@/assets/logo_login.png" alt=""> |
|
||||
</div> |
|
||||
<div class="header"> |
|
||||
<a href="/"><span class="title">Gin-Vue-Admin</span></a> |
|
||||
</div> |
|
||||
</div> |
|
||||
<div class="main"> |
|
||||
<el-form |
|
||||
ref="loginForm" |
|
||||
:model="loginForm" |
|
||||
:rules="rules" |
|
||||
@keyup.enter.native="submitForm" |
|
||||
> |
|
||||
<el-form-item prop="username"> |
|
||||
<el-input v-model="loginForm.username" placeholder="请输入用户名"> |
|
||||
<i slot="suffix" class="el-input__icon el-icon-user" /> |
|
||||
</el-input> |
|
||||
</el-form-item> |
|
||||
<el-form-item prop="password"> |
|
||||
<el-input |
|
||||
v-model="loginForm.password" |
|
||||
:type="lock === 'lock' ? 'password' : 'text'" |
|
||||
placeholder="请输入密码" |
|
||||
> |
|
||||
<i |
|
||||
slot="suffix" |
|
||||
:class="'el-input__icon el-icon-' + lock" |
|
||||
@click="changeLock" |
|
||||
/> |
|
||||
</el-input> |
|
||||
</el-form-item> |
|
||||
<el-form-item style="position: relative"> |
|
||||
<el-input |
|
||||
v-model="loginForm.captcha" |
|
||||
name="logVerify" |
|
||||
placeholder="请输入验证码" |
|
||||
style="width: 60%" |
|
||||
/> |
|
||||
<div class="vPic"> |
|
||||
<img |
|
||||
v-if="picPath" |
|
||||
:src="picPath" |
|
||||
width="100%" |
|
||||
height="100%" |
|
||||
alt="请输入验证码" |
|
||||
@click="loginVerify()" |
|
||||
> |
|
||||
</div> |
|
||||
</el-form-item> |
|
||||
<el-form-item> |
|
||||
<el-button |
|
||||
type="primary" |
|
||||
style="width: 100%" |
|
||||
@click="submitForm" |
|
||||
>登 录</el-button> |
|
||||
</el-form-item> |
|
||||
</el-form> |
|
||||
</div> |
|
||||
|
|
||||
<div class="footer"> |
|
||||
<div class="links"> |
|
||||
<a href="http://doc.henrongyi.top/"><img src="@/assets/docs.png" class="link-icon"></a> |
|
||||
<a href="https://www.yuque.com/flipped-aurora/"><img src="@/assets/yuque.png" class="link-icon"></a> |
|
||||
<a href="https://github.com/flipped-aurora/gin-vue-admin"><img src="@/assets/github.png" class="link-icon"></a> |
|
||||
<a href="https://space.bilibili.com/322210472"><img src="@/assets/video.png" class="link-icon"></a> |
|
||||
</div> |
|
||||
<div class="copyright">Copyright © {{ curYear }} 💖flipped-aurora</div> |
|
||||
</div> |
|
||||
</div> |
|
||||
</div> |
|
||||
</template> |
|
||||
|
|
||||
<script> |
|
||||
import { mapActions } from 'vuex' |
|
||||
import { captcha } from '@/api/user' |
|
||||
export default { |
|
||||
name: 'Login', |
|
||||
data() { |
|
||||
const checkUsername = (rule, value, callback) => { |
|
||||
if (value.length < 5) { |
|
||||
return callback(new Error('请输入正确的用户名')) |
|
||||
} else { |
|
||||
callback() |
|
||||
} |
|
||||
} |
|
||||
const checkPassword = (rule, value, callback) => { |
|
||||
if (value.length < 6) { |
|
||||
return callback(new Error('请输入正确的密码')) |
|
||||
} else { |
|
||||
callback() |
|
||||
} |
|
||||
} |
|
||||
return { |
|
||||
curYear: 0, |
|
||||
lock: 'lock', |
|
||||
loginForm: { |
|
||||
username: 'admin', |
|
||||
password: '123456', |
|
||||
captcha: '', |
|
||||
captchaId: '' |
|
||||
}, |
|
||||
rules: { |
|
||||
username: [{ validator: checkUsername, trigger: 'blur' }], |
|
||||
password: [{ validator: checkPassword, trigger: 'blur' }] |
|
||||
}, |
|
||||
logVerify: '', |
|
||||
picPath: '' |
|
||||
} |
|
||||
}, |
|
||||
created() { |
|
||||
this.loginVerify() |
|
||||
this.curYear = new Date().getFullYear() |
|
||||
}, |
|
||||
methods: { |
|
||||
...mapActions('user', ['LoginIn']), |
|
||||
async login() { |
|
||||
return await this.LoginIn(this.loginForm) |
|
||||
}, |
|
||||
async submitForm() { |
|
||||
this.$refs.loginForm.validate(async(v) => { |
|
||||
if (v) { |
|
||||
const flag = await this.login() |
|
||||
if (!flag) { |
|
||||
this.loginVerify() |
|
||||
} |
|
||||
} else { |
|
||||
this.$message({ |
|
||||
type: 'error', |
|
||||
message: '请正确填写登录信息', |
|
||||
showClose: true |
|
||||
}) |
|
||||
this.loginVerify() |
|
||||
return false |
|
||||
} |
|
||||
}) |
|
||||
}, |
|
||||
changeLock() { |
|
||||
this.lock = this.lock === 'lock' ? 'unlock' : 'lock' |
|
||||
}, |
|
||||
loginVerify() { |
|
||||
captcha({}).then((ele) => { |
|
||||
this.picPath = ele.data.picPath |
|
||||
this.loginForm.captchaId = ele.data.captchaId |
|
||||
}) |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
</script> |
|
||||
|
|
||||
<style scoped lang="scss"> |
|
||||
@import "@/style/login.scss"; |
|
||||
</style> |
|
9916
web/yarn.lock
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
Write
Preview
Loading…
Cancel
Save
Reference in new issue