隐藏登录页面图标

pull/551/head
岳琳红 2024-08-23 15:10:33 +08:00
parent ba9e196d09
commit c6d07653ae
5 changed files with 17643 additions and 30 deletions

15
.env
View File

@ -18,7 +18,20 @@ VITE_APP_DOCALERT_ENABLE=true
# 百度统计
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_USERNAME = admin

View File

@ -3,13 +3,15 @@ NODE_ENV=development
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 服务
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

View File

@ -87,7 +87,7 @@
"source.fixAll.stylelint": "explicit"
},
"[vue]": {
"editor.defaultFormatter": "rvest.vs-code-prettier-eslint"
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"i18n-ally.localesPaths": ["src/locales"],
"i18n-ally.keystyle": "nested",

17570
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -15,17 +15,17 @@
<LoginFormTitle style="width: 100%" />
</el-form-item>
</el-col>
<!-- <el-col :span="24" style="padding-right: 10px; padding-left: 10px">-->
<!-- <el-form-item v-if="loginData.tenantEnable === 'true'" prop="tenantName">-->
<!-- <el-input-->
<!-- v-model="loginData.loginForm.tenantName"-->
<!-- :placeholder="t('login.tenantNamePlaceholder')"-->
<!-- :prefix-icon="iconHouse"-->
<!-- link-->
<!-- type="primary"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="24" style="padding-right: 10px; padding-left: 10px">-->
<!-- <el-form-item v-if="loginData.tenantEnable === 'true'" prop="tenantName">-->
<!-- <el-input-->
<!-- v-model="loginData.loginForm.tenantName"-->
<!-- :placeholder="t('login.tenantNamePlaceholder')"-->
<!-- :prefix-icon="iconHouse"-->
<!-- link-->
<!-- type="primary"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<el-col :span="24" style="padding-right: 10px; padding-left: 10px">
<el-form-item prop="username">
<el-input
@ -58,9 +58,9 @@
{{ t('login.remember') }}
</el-checkbox>
</el-col>
<!-- <el-col :offset="6" :span="12">-->
<!-- <el-link style="float: right" type="primary">{{ t('login.forgetPassword') }}</el-link>-->
<!-- </el-col>-->
<!-- <el-col :offset="6" :span="12">-->
<!-- <el-link style="float: right" type="primary">{{ t('login.forgetPassword') }}</el-link>-->
<!-- </el-col>-->
</el-row>
</el-form-item>
</el-col>
@ -82,24 +82,28 @@
mode="pop"
@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-row :gutter="5" justify="space-between" style="width: 100%">
<el-col :span="8">
<el-row :gutter="5" justify="space-around" style="width: 100%">
<el-col :span="8" v-if="phoneShow">
<XButton
:title="t('login.btnMobile')"
class="w-[100%]"
@click="setLoginState(LoginStateEnum.MOBILE)"
/>
</el-col>
<el-col :span="8">
<el-col :span="8" v-if="codeShow">
<XButton
:title="t('login.btnQRCode')"
class="w-[100%]"
@click="setLoginState(LoginStateEnum.QR_CODE)"
/>
</el-col>
<el-col :span="8">
<el-col :span="8" v-if="regtsterShow">
<XButton
:title="t('login.btnRegister')"
class="w-[100%]"
@ -109,10 +113,18 @@
</el-row>
</el-form-item>
</el-col>
<el-divider content-position="center">{{ t('login.otherLogin') }}</el-divider>
<el-col :span="24" style="padding-right: 10px; padding-left: 10px">
<el-divider
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>
<div class="w-[100%] flex justify-between">
<div class="w-[100%] flex justify-around">
<Icon
v-for="(item, key) in socialList"
:key="key"
@ -121,6 +133,7 @@
class="anticon cursor-pointer"
color="#999"
@click="doSocialLogin(item.type)"
v-show="item.show"
/>
</div>
</el-form-item>
@ -140,6 +153,21 @@ import { usePermissionStore } from '@/store/modules/permission'
import * as LoginApi from '@/api/login'
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' })
const { t } = useI18n()
@ -178,10 +206,10 @@ const loginData = reactive({
})
const socialList = [
{ icon: 'ant-design:wechat-filled', type: 30 },
{ icon: 'ant-design:dingtalk-circle-filled', type: 20 },
{ icon: 'ant-design:github-filled', type: 0 },
{ icon: 'ant-design:alipay-circle-filled', type: 0 }
{ icon: 'ant-design:wechat-filled', type: 30, show: weixinShow },
{ icon: 'ant-design:dingtalk-circle-filled', type: 20, show: dindinShow },
{ icon: 'ant-design:github-filled', type: 0, show: gitShow },
{ icon: 'ant-design:alipay-circle-filled', type: 0, show: alipayShow }
]
//