cloud-web-corejs 1.0.160 → 1.0.162
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/App.vue +29 -33
- package/src/api/user.js +8 -0
- package/src/permission.js +1 -18
- package/src/store/getters.js +3 -1
- package/src/store/modules/user.js +10 -16
- package/src/views/user/login/default.vue +16 -14
- package/src/views/user/login/index.vue +4 -6
- package/src/views/user/login/indexMixin.js +45 -1
- package/src/views/user/login/index2.vue +0 -131
|
@@ -3,11 +3,16 @@
|
|
|
3
3
|
class="login-container"
|
|
4
4
|
:class="backgroundClass"
|
|
5
5
|
ref="login-container"
|
|
6
|
+
:style="{
|
|
7
|
+
background: imageUrl
|
|
8
|
+
? 'url(' + imageUrl + ') center center/cover no-repeat !important'
|
|
9
|
+
: 'auto',
|
|
10
|
+
}"
|
|
6
11
|
v-show="showContent"
|
|
7
12
|
>
|
|
8
13
|
<div class="login-main" style="height: auto">
|
|
9
14
|
<el-tabs v-model="activeName" @tab-click="changeTab">
|
|
10
|
-
<el-tab-pane :label="$t1('账号登录')" name="first">
|
|
15
|
+
<el-tab-pane :label="$t1('账号登录')" name="first" v-if="accountLoagin">
|
|
11
16
|
<el-form
|
|
12
17
|
ref="loginForm"
|
|
13
18
|
:model="loginForm"
|
|
@@ -72,11 +77,7 @@
|
|
|
72
77
|
>
|
|
73
78
|
</el-form>
|
|
74
79
|
</el-tab-pane>
|
|
75
|
-
<el-tab-pane
|
|
76
|
-
:label="$t1('手机登录')"
|
|
77
|
-
name="second"
|
|
78
|
-
v-if="settingConfig.mobileLoginEnabled"
|
|
79
|
-
>
|
|
80
|
+
<el-tab-pane :label="$t1('手机登录')" name="second" v-if="phoneLogin">
|
|
80
81
|
<el-form
|
|
81
82
|
ref="loginForm"
|
|
82
83
|
:model="loginForm2"
|
|
@@ -128,11 +129,7 @@
|
|
|
128
129
|
>
|
|
129
130
|
</el-form>
|
|
130
131
|
</el-tab-pane>
|
|
131
|
-
<el-tab-pane
|
|
132
|
-
:label="$t1('扫码登录')"
|
|
133
|
-
name="third"
|
|
134
|
-
v-if="settingConfig.qrLoginEnabled"
|
|
135
|
-
>
|
|
132
|
+
<el-tab-pane :label="$t1('扫码登录')" name="third" v-if="qrLogin">
|
|
136
133
|
<div class="login-qr">
|
|
137
134
|
<img class="qr__img" :src="qrBase64" v-if="activeName === 'third'" />
|
|
138
135
|
<span class="qr__txt">{{ $t1("扫一扫,登录系统") }}</span>
|
|
@@ -143,10 +140,15 @@
|
|
|
143
140
|
</el-tab-pane>
|
|
144
141
|
</el-tabs>
|
|
145
142
|
</div>
|
|
146
|
-
<div class="tc copyright">
|
|
143
|
+
<div class="tc copyright" v-show="loginConfig.hide_filing_info !== true">
|
|
147
144
|
<slot name="footer">
|
|
148
|
-
© {{
|
|
149
|
-
<span style="margin-left: 50px">
|
|
145
|
+
© {{ this.$t1(loginConfig.filing_company || "广州同望科技发展有限公司") }}
|
|
146
|
+
<span style="margin-left: 50px" v-if="!!loginConfig.filing_number">{{
|
|
147
|
+
loginConfig.filing_number + " " + (loginConfig.phone || "4000646100")
|
|
148
|
+
}}</span>
|
|
149
|
+
<span style="margin-left: 50px" v-if="!loginConfig.filing_number">{{
|
|
150
|
+
loginConfig.phone || "4000646100"
|
|
151
|
+
}}</span>
|
|
150
152
|
</slot>
|
|
151
153
|
</div>
|
|
152
154
|
</div>
|
|
@@ -6,10 +6,8 @@
|
|
|
6
6
|
import defaultView from "@base/views/user/login/default.vue";
|
|
7
7
|
|
|
8
8
|
export default {
|
|
9
|
-
name:
|
|
10
|
-
components: {defaultView}
|
|
11
|
-
}
|
|
9
|
+
name: "Login",
|
|
10
|
+
components: { defaultView },
|
|
11
|
+
};
|
|
12
12
|
</script>
|
|
13
|
-
<style lang="scss" scoped>
|
|
14
|
-
|
|
15
|
-
</style>
|
|
13
|
+
<style lang="scss" scoped></style>
|
|
@@ -67,7 +67,14 @@ export default {
|
|
|
67
67
|
qrCodeFlag: 0,
|
|
68
68
|
qrBase64: "",
|
|
69
69
|
settingConfig: settingConfig,
|
|
70
|
-
qrExpired: false
|
|
70
|
+
qrExpired: false,
|
|
71
|
+
loginConfig: {},
|
|
72
|
+
imageUrl: '',
|
|
73
|
+
loginMethod: '',
|
|
74
|
+
|
|
75
|
+
accountLoagin:true,
|
|
76
|
+
phoneLogin:false,
|
|
77
|
+
qrLogin:false,
|
|
71
78
|
};
|
|
72
79
|
},
|
|
73
80
|
watch: {
|
|
@@ -101,6 +108,42 @@ export default {
|
|
|
101
108
|
window.removeEventListener('keydown', this.keyDown, false);
|
|
102
109
|
},
|
|
103
110
|
methods: {
|
|
111
|
+
handleLoginConfig(){
|
|
112
|
+
let loginConfig = this.$store.getters.loginConfig || {};
|
|
113
|
+
this.loginConfig = loginConfig;
|
|
114
|
+
this.initImage();
|
|
115
|
+
this.initLoginMethod();
|
|
116
|
+
},
|
|
117
|
+
initImage(){
|
|
118
|
+
//初始化登录图片
|
|
119
|
+
let loginConfig = this.loginConfig;
|
|
120
|
+
if(loginConfig?.attachments?.length){
|
|
121
|
+
this.imageUrl = loginConfig.attachments[0].domain + loginConfig.attachments[0].source;
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
|
|
125
|
+
initLoginMethod(){
|
|
126
|
+
let loginConfig = this.loginConfig?.login_method;
|
|
127
|
+
if(loginConfig?.length){
|
|
128
|
+
this.accountLoagin = loginConfig.includes(1);
|
|
129
|
+
this.phoneLogin = loginConfig.includes(2);
|
|
130
|
+
this.qrLogin = loginConfig.includes(3);
|
|
131
|
+
if(this.accountLoagin){
|
|
132
|
+
this.activeName = "first";
|
|
133
|
+
}else if(this.phoneLogin){
|
|
134
|
+
this.activeName = "second";
|
|
135
|
+
}else if(this.qrLogin){
|
|
136
|
+
this.activeName = "third";
|
|
137
|
+
this.$nextTick(() => {
|
|
138
|
+
this.initQR();
|
|
139
|
+
})
|
|
140
|
+
}
|
|
141
|
+
}else{
|
|
142
|
+
this.accountLoagin = true;
|
|
143
|
+
this.phoneLogin = settingConfig.mobileLoginEnabled;
|
|
144
|
+
this.qrLogin = settingConfig.qrLoginEnabled;
|
|
145
|
+
}
|
|
146
|
+
},
|
|
104
147
|
initLang(){
|
|
105
148
|
let lang = this.$route.query.lang;
|
|
106
149
|
if(!lang && !!this.lang){
|
|
@@ -117,6 +160,7 @@ export default {
|
|
|
117
160
|
},
|
|
118
161
|
init() {
|
|
119
162
|
this.initLang();
|
|
163
|
+
this.handleLoginConfig();
|
|
120
164
|
let searchParam = getUrlParams(location.search);
|
|
121
165
|
this.searchParam = searchParam;
|
|
122
166
|
//小熊SSO返回判断--目前因为小熊单点返回ticket有问题要特殊处理
|
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="login-container" :class="backgroundClass" ref="login-container" v-show="showContent">
|
|
3
|
-
<div class="login-main" style="height: auto;">
|
|
4
|
-
<el-tabs v-model="activeName">
|
|
5
|
-
<el-tab-pane label="账号登录" name="first">
|
|
6
|
-
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="box-form login" autocomplete="on"
|
|
7
|
-
label-position="left">
|
|
8
|
-
<el-form-item prop="username" class="txt">
|
|
9
|
-
<span class="svg-container"><i class="el-icon-user"/></span>
|
|
10
|
-
<el-input ref="username" v-model="loginForm.username" placeholder="请输入用户名" name="" type="text"
|
|
11
|
-
tabindex="1" autocomplete="on" @keyup.enter.native="handleLogin"/>
|
|
12
|
-
</el-form-item>
|
|
13
|
-
<el-tooltip :enterable="false" v-model="capsTooltip" content="Caps lock is On" placement="right" manual>
|
|
14
|
-
<el-form-item prop="password" class="txt">
|
|
15
|
-
<span class="svg-container"><i class="el-icon-lock"/></span>
|
|
16
|
-
<el-input
|
|
17
|
-
:key="passwordType"
|
|
18
|
-
ref="password"
|
|
19
|
-
v-model="loginForm.password"
|
|
20
|
-
:type="passwordType"
|
|
21
|
-
placeholder="请输入密码"
|
|
22
|
-
name=""
|
|
23
|
-
tabindex="2"
|
|
24
|
-
autocomplete="on"
|
|
25
|
-
auto-complete="new-password"
|
|
26
|
-
@keyup.native="checkCapslock"
|
|
27
|
-
@blur="capsTooltip = false"
|
|
28
|
-
@keyup.enter.native="handleLogin"
|
|
29
|
-
/>
|
|
30
|
-
<span class="show-pwd" @click="showPwd"><svg-icon
|
|
31
|
-
:icon-class="passwordType === 'password' ? 'eye' : 'eye-open'"/></span>
|
|
32
|
-
</el-form-item>
|
|
33
|
-
</el-tooltip>
|
|
34
|
-
<div class="">
|
|
35
|
-
<el-checkbox v-model="isRememberPassword">记住密码</el-checkbox>
|
|
36
|
-
</div>
|
|
37
|
-
<el-button :loading="loading" type="primary" @click.prevent.stop="handleLogin" class="btn">登录</el-button>
|
|
38
|
-
</el-form>
|
|
39
|
-
</el-tab-pane>
|
|
40
|
-
<el-tab-pane label="手机验证码登录" name="second">
|
|
41
|
-
<el-form ref="loginForm" :model="loginForm2" :rules="loginRules" class="box-form login" autocomplete="on"
|
|
42
|
-
label-position="left">
|
|
43
|
-
<el-form-item prop="username" class="txt" style="width:66%">
|
|
44
|
-
<span class="svg-container"><i class="el-icon-mobile-phone"/></span>
|
|
45
|
-
<el-input ref="mobile" v-model="loginForm2.username" placeholder="请输入手机号" name="" type="text"
|
|
46
|
-
tabindex="1" autocomplete="on" @keyup.enter.native="handleLogin"/>
|
|
47
|
-
</el-form-item>
|
|
48
|
-
<el-button class="btn-send" type="success" :class="{'gray-btn':isCounting}" @click="sendCode">
|
|
49
|
-
{{ buttonText }}
|
|
50
|
-
</el-button>
|
|
51
|
-
<el-form-item prop="smsCode" class="txt">
|
|
52
|
-
<span class="svg-container"><i class="el-icon-message"/></span>
|
|
53
|
-
<el-input ref="smsCode" v-model="loginForm2.smsCode" placeholder="请输入验证码" name="" type="text"
|
|
54
|
-
tabindex="1" autocomplete="on" @keyup.enter.native="handleLogin"/>
|
|
55
|
-
</el-form-item>
|
|
56
|
-
<el-button :loading="loading" type="primary" @click.prevent.stop="handleLogin" class="btn">登录</el-button>
|
|
57
|
-
</el-form>
|
|
58
|
-
</el-tab-pane>
|
|
59
|
-
</el-tabs>
|
|
60
|
-
</div>
|
|
61
|
-
<div class="tc copyright">
|
|
62
|
-
<slot name="footer">
|
|
63
|
-
© 广州同望科技发展有限公司
|
|
64
|
-
<span style="margin-left:50px;">4000646100</span>
|
|
65
|
-
</slot>
|
|
66
|
-
</div>
|
|
67
|
-
</div>
|
|
68
|
-
</template>
|
|
69
|
-
|
|
70
|
-
<script>
|
|
71
|
-
import mixin from "@base/views/user/login/indexMixin";
|
|
72
|
-
|
|
73
|
-
export default {
|
|
74
|
-
name: 'Login',
|
|
75
|
-
mixins: [mixin]
|
|
76
|
-
}
|
|
77
|
-
</script>
|
|
78
|
-
<style lang="scss" scoped>
|
|
79
|
-
@import '@/resources/css/login.scss';
|
|
80
|
-
|
|
81
|
-
.login-container.tc {
|
|
82
|
-
background: url(~@/resources/images/bg-login5.jpg) center center/cover no-repeat;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
.login-container.chigo {
|
|
86
|
-
background: url(~@/resources/images/bg-login6.jpg) center center/cover no-repeat;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
.login-container.pcp {
|
|
90
|
-
background: url(~@/resources/images/bg-login8.jpg) center center/cover no-repeat;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
.el-select-dropdown {
|
|
94
|
-
right: 5px;
|
|
95
|
-
top: 25px;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
::v-deep .login-main .el-tabs__header {
|
|
99
|
-
margin-bottom: 0;
|
|
100
|
-
|
|
101
|
-
.el-tabs__nav {
|
|
102
|
-
line-height: 65px;
|
|
103
|
-
margin: 0 25px;
|
|
104
|
-
width: calc(100% - 50px);
|
|
105
|
-
|
|
106
|
-
.el-tabs__item {
|
|
107
|
-
font-size: 18px;
|
|
108
|
-
width: 50%;
|
|
109
|
-
text-align: center;
|
|
110
|
-
margin-right: 0;
|
|
111
|
-
padding-right: 0 !important;
|
|
112
|
-
line-height: 65px;
|
|
113
|
-
height: 65px;
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
.btn-send {
|
|
119
|
-
position: absolute;
|
|
120
|
-
margin-top: -74px;
|
|
121
|
-
right: 35px;
|
|
122
|
-
height: 52px;
|
|
123
|
-
width: 27%;
|
|
124
|
-
|
|
125
|
-
&.gray-btn {
|
|
126
|
-
background: #dedede;
|
|
127
|
-
border-color: #dedede;
|
|
128
|
-
color: #8a8686;
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
</style>
|