隐藏登录页面图标
parent
ba9e196d09
commit
c6d07653ae
15
.env
15
.env
|
|
@ -18,7 +18,20 @@ VITE_APP_DOCALERT_ENABLE=true
|
||||||
|
|
||||||
# 百度统计
|
# 百度统计
|
||||||
VITE_APP_BAIDU_CODE = a1ff8825baa73c3a78eb96aa40325abc
|
VITE_APP_BAIDU_CODE = a1ff8825baa73c3a78eb96aa40325abc
|
||||||
|
# 手机登录开关
|
||||||
|
VITE_APP_PHONE = true
|
||||||
|
# 二维码登录开关
|
||||||
|
VITE_APP_CODE = true
|
||||||
|
# 注册开关
|
||||||
|
VITE_APP_REGISTER = false
|
||||||
|
# 微信登录开关
|
||||||
|
VITE_APP_WEIXIN = true
|
||||||
|
# 钉钉登录开关
|
||||||
|
VITE_APP_DINDIN = true
|
||||||
|
# github登录开关
|
||||||
|
VITE_APP_GITHUB = false
|
||||||
|
# 支付宝登录开关
|
||||||
|
VITE_APP_ALIPAY = false
|
||||||
# 默认账户密码
|
# 默认账户密码
|
||||||
# VITE_APP_DEFAULT_LOGIN_TENANT = 芋道源码
|
# VITE_APP_DEFAULT_LOGIN_TENANT = 芋道源码
|
||||||
# VITE_APP_DEFAULT_LOGIN_USERNAME = admin
|
# VITE_APP_DEFAULT_LOGIN_USERNAME = admin
|
||||||
|
|
|
||||||
|
|
@ -3,13 +3,15 @@ NODE_ENV=development
|
||||||
|
|
||||||
VITE_DEV=true
|
VITE_DEV=true
|
||||||
|
|
||||||
|
# 请求路径VITE_BASE_URL='http://localhost:48080'
|
||||||
# 请求路径
|
# 请求路径
|
||||||
VITE_BASE_URL='http://localhost:48080'
|
VITE_BASE_URL='http://saas.yibeidl.cn'
|
||||||
|
|
||||||
# 文件上传类型:server - 后端上传, client - 前端直连上传,仅支持 S3 服务
|
# 文件上传类型:server - 后端上传, client - 前端直连上传,仅支持 S3 服务
|
||||||
VITE_UPLOAD_TYPE=server
|
VITE_UPLOAD_TYPE=server
|
||||||
|
# 上传路径VITE_UPLOAD_URL='http://localhost:48080/admin-api/infra/file/upload'
|
||||||
# 上传路径
|
# 上传路径
|
||||||
VITE_UPLOAD_URL='http://localhost:48080/admin-api/infra/file/upload'
|
VITE_UPLOAD_URL='http://saas.yibeidl.cn/admin-api/infra/file/upload'
|
||||||
|
|
||||||
# 接口地址
|
# 接口地址
|
||||||
VITE_API_URL=/admin-api
|
VITE_API_URL=/admin-api
|
||||||
|
|
|
||||||
|
|
@ -87,7 +87,7 @@
|
||||||
"source.fixAll.stylelint": "explicit"
|
"source.fixAll.stylelint": "explicit"
|
||||||
},
|
},
|
||||||
"[vue]": {
|
"[vue]": {
|
||||||
"editor.defaultFormatter": "rvest.vs-code-prettier-eslint"
|
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||||
},
|
},
|
||||||
"i18n-ally.localesPaths": ["src/locales"],
|
"i18n-ally.localesPaths": ["src/locales"],
|
||||||
"i18n-ally.keystyle": "nested",
|
"i18n-ally.keystyle": "nested",
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -15,17 +15,17 @@
|
||||||
<LoginFormTitle style="width: 100%" />
|
<LoginFormTitle style="width: 100%" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<!-- <el-col :span="24" style="padding-right: 10px; padding-left: 10px">-->
|
<!-- <el-col :span="24" style="padding-right: 10px; padding-left: 10px">-->
|
||||||
<!-- <el-form-item v-if="loginData.tenantEnable === 'true'" prop="tenantName">-->
|
<!-- <el-form-item v-if="loginData.tenantEnable === 'true'" prop="tenantName">-->
|
||||||
<!-- <el-input-->
|
<!-- <el-input-->
|
||||||
<!-- v-model="loginData.loginForm.tenantName"-->
|
<!-- v-model="loginData.loginForm.tenantName"-->
|
||||||
<!-- :placeholder="t('login.tenantNamePlaceholder')"-->
|
<!-- :placeholder="t('login.tenantNamePlaceholder')"-->
|
||||||
<!-- :prefix-icon="iconHouse"-->
|
<!-- :prefix-icon="iconHouse"-->
|
||||||
<!-- link-->
|
<!-- link-->
|
||||||
<!-- type="primary"-->
|
<!-- type="primary"-->
|
||||||
<!-- />-->
|
<!-- />-->
|
||||||
<!-- </el-form-item>-->
|
<!-- </el-form-item>-->
|
||||||
<!-- </el-col>-->
|
<!-- </el-col>-->
|
||||||
<el-col :span="24" style="padding-right: 10px; padding-left: 10px">
|
<el-col :span="24" style="padding-right: 10px; padding-left: 10px">
|
||||||
<el-form-item prop="username">
|
<el-form-item prop="username">
|
||||||
<el-input
|
<el-input
|
||||||
|
|
@ -58,9 +58,9 @@
|
||||||
{{ t('login.remember') }}
|
{{ t('login.remember') }}
|
||||||
</el-checkbox>
|
</el-checkbox>
|
||||||
</el-col>
|
</el-col>
|
||||||
<!-- <el-col :offset="6" :span="12">-->
|
<!-- <el-col :offset="6" :span="12">-->
|
||||||
<!-- <el-link style="float: right" type="primary">{{ t('login.forgetPassword') }}</el-link>-->
|
<!-- <el-link style="float: right" type="primary">{{ t('login.forgetPassword') }}</el-link>-->
|
||||||
<!-- </el-col>-->
|
<!-- </el-col>-->
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
@ -82,24 +82,28 @@
|
||||||
mode="pop"
|
mode="pop"
|
||||||
@success="handleLogin"
|
@success="handleLogin"
|
||||||
/>
|
/>
|
||||||
<el-col :span="24" style="padding-right: 10px; padding-left: 10px">
|
<el-col
|
||||||
|
:span="24"
|
||||||
|
style="padding-right: 10px; padding-left: 10px"
|
||||||
|
v-if="phoneShow || codeShow || regtsterShow"
|
||||||
|
>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-row :gutter="5" justify="space-between" style="width: 100%">
|
<el-row :gutter="5" justify="space-around" style="width: 100%">
|
||||||
<el-col :span="8">
|
<el-col :span="8" v-if="phoneShow">
|
||||||
<XButton
|
<XButton
|
||||||
:title="t('login.btnMobile')"
|
:title="t('login.btnMobile')"
|
||||||
class="w-[100%]"
|
class="w-[100%]"
|
||||||
@click="setLoginState(LoginStateEnum.MOBILE)"
|
@click="setLoginState(LoginStateEnum.MOBILE)"
|
||||||
/>
|
/>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8" v-if="codeShow">
|
||||||
<XButton
|
<XButton
|
||||||
:title="t('login.btnQRCode')"
|
:title="t('login.btnQRCode')"
|
||||||
class="w-[100%]"
|
class="w-[100%]"
|
||||||
@click="setLoginState(LoginStateEnum.QR_CODE)"
|
@click="setLoginState(LoginStateEnum.QR_CODE)"
|
||||||
/>
|
/>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8" v-if="regtsterShow">
|
||||||
<XButton
|
<XButton
|
||||||
:title="t('login.btnRegister')"
|
:title="t('login.btnRegister')"
|
||||||
class="w-[100%]"
|
class="w-[100%]"
|
||||||
|
|
@ -109,10 +113,18 @@
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-divider content-position="center">{{ t('login.otherLogin') }}</el-divider>
|
<el-divider
|
||||||
<el-col :span="24" style="padding-right: 10px; padding-left: 10px">
|
content-position="center"
|
||||||
|
v-if="weixinShow || dindinShow || gitShow || alipayShow"
|
||||||
|
>{{ t('login.otherLogin') }}</el-divider
|
||||||
|
>
|
||||||
|
<el-col
|
||||||
|
:span="24"
|
||||||
|
style="padding-right: 10px; padding-left: 10px"
|
||||||
|
v-if="weixinShow || dindinShow || gitShow || alipayShow"
|
||||||
|
>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<div class="w-[100%] flex justify-between">
|
<div class="w-[100%] flex justify-around">
|
||||||
<Icon
|
<Icon
|
||||||
v-for="(item, key) in socialList"
|
v-for="(item, key) in socialList"
|
||||||
:key="key"
|
:key="key"
|
||||||
|
|
@ -121,6 +133,7 @@
|
||||||
class="anticon cursor-pointer"
|
class="anticon cursor-pointer"
|
||||||
color="#999"
|
color="#999"
|
||||||
@click="doSocialLogin(item.type)"
|
@click="doSocialLogin(item.type)"
|
||||||
|
v-show="item.show"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
@ -140,6 +153,21 @@ import { usePermissionStore } from '@/store/modules/permission'
|
||||||
import * as LoginApi from '@/api/login'
|
import * as LoginApi from '@/api/login'
|
||||||
import { LoginStateEnum, useFormValid, useLoginState } from './useLogin'
|
import { LoginStateEnum, useFormValid, useLoginState } from './useLogin'
|
||||||
|
|
||||||
|
// 登录选项配置手机
|
||||||
|
let phoneShow = JSON.parse(import.meta.env.VITE_APP_PHONE)
|
||||||
|
// 登录选项配置二维码
|
||||||
|
let codeShow = JSON.parse(import.meta.env.VITE_APP_CODE)
|
||||||
|
// 登录选项配置注册
|
||||||
|
let regtsterShow = JSON.parse(import.meta.env.VITE_APP_REGISTER)
|
||||||
|
// 登录选项配置微信
|
||||||
|
let weixinShow = JSON.parse(import.meta.env.VITE_APP_WEIXIN)
|
||||||
|
// 登录选项配钉钉
|
||||||
|
let dindinShow = JSON.parse(import.meta.env.VITE_APP_DINDIN)
|
||||||
|
// 登录选项配置git
|
||||||
|
let gitShow = JSON.parse(import.meta.env.VITE_APP_GITHUB)
|
||||||
|
// 登录选项配置支付宝
|
||||||
|
let alipayShow = JSON.parse(import.meta.env.VITE_APP_ALIPAY)
|
||||||
|
|
||||||
defineOptions({ name: 'LoginForm' })
|
defineOptions({ name: 'LoginForm' })
|
||||||
|
|
||||||
const { t } = useI18n()
|
const { t } = useI18n()
|
||||||
|
|
@ -178,10 +206,10 @@ const loginData = reactive({
|
||||||
})
|
})
|
||||||
|
|
||||||
const socialList = [
|
const socialList = [
|
||||||
{ icon: 'ant-design:wechat-filled', type: 30 },
|
{ icon: 'ant-design:wechat-filled', type: 30, show: weixinShow },
|
||||||
{ icon: 'ant-design:dingtalk-circle-filled', type: 20 },
|
{ icon: 'ant-design:dingtalk-circle-filled', type: 20, show: dindinShow },
|
||||||
{ icon: 'ant-design:github-filled', type: 0 },
|
{ icon: 'ant-design:github-filled', type: 0, show: gitShow },
|
||||||
{ icon: 'ant-design:alipay-circle-filled', type: 0 }
|
{ icon: 'ant-design:alipay-circle-filled', type: 0, show: alipayShow }
|
||||||
]
|
]
|
||||||
|
|
||||||
// 获取验证码
|
// 获取验证码
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue