Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-base
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 0ce4171c
authored
Nov 09, 2023
by
liimin
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
1.新增多商户选择后的loading状态
2.新增多商户选择界面的返回按钮
1 parent
4606cec8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
15 deletions
src/config/index.js
src/views/Login.vue
src/config/index.js
View file @
0ce4171
...
...
@@ -4,7 +4,7 @@
* @Author: limin
* @Date: 2021-06-07 14:12:32
* @LastEditors: limin
* @LastEditTime: 2023-11-09 1
1:02:43
* @LastEditTime: 2023-11-09 1
3:39:15
*/
// 根据环境引入不同配置 process.env.VUE_APP_ENV
let
cfg
=
require
(
'./conf.js'
)
...
...
@@ -25,7 +25,7 @@ export const fetchConfig = (isEnv = sw) => {
if
((
_config
&&
!
_constRoutes
.
includes
(
_pathname
))
||
_pathname
===
_login_path
||
(
_pathname
===
'/'
&&
_login_path
===
'/login'
))
{
return
Promise
.
resolve
(
_config
)
}
return
new
Http
({
headers
:
{
refererurl
:
_pathname
},
request
:
{
timeout
:
30000
}
}).
get
(
'https://oss-config.
test
.glsx.com.cn/mock/6136bea6ceeb5a5c2bec6950/base/config'
)
return
new
Http
({
headers
:
{
refererurl
:
_pathname
},
request
:
{
timeout
:
30000
}
}).
get
(
'https://oss-config.
dev
.glsx.com.cn/mock/6136bea6ceeb5a5c2bec6950/base/config'
)
}
export
const
config
=
{
install
(
vue
,
cfg
)
{
...
...
src/views/Login.vue
View file @
0ce4171
...
...
@@ -4,10 +4,10 @@
<el-image
:src=
"`$
{$config.cdn}/assets/${$config.customized.assets}/logo_login.png`">
</el-image>
<h2>
专注汽车行业数字化+智能营销解决方案——帮您的流量变销量
</h2>
</div>
<div
class=
"login-wrap animate__animated"
:class=
"
{ animate__fadeInUp: isDoAnimate }">
<
i
class=
"icon el-icon-arrow-left"
></i
>
<div
class=
"merchants"
v-if=
"isHasMutilMerchants"
@
click=
"forback"
>
<div
class=
"wrap"
v-loading=
"isLoading"
>
<div
class=
"login-wrap animate__animated"
:class=
"
{ animate__fadeInUp: isDoAnimate }"
v-loading="isMutilMerchantLogin"
>
<
div
class=
"merchants"
v-if=
"isHasMutilMerchants"
>
<i
class=
"icon el-icon-arrow-left forback"
@
click=
"forback"
></i
>
<div
class=
"wrap"
>
<span
class=
"title"
>
请选择登录商户号
</span>
<GLScroll
class=
"login-merchants-scroll"
>
<div
class=
"item-wrap"
>
...
...
@@ -129,14 +129,15 @@ export default {
},
isPrivacyChecked
:
true
,
chooseMerchant
:
null
,
is
Loading
:
false
is
MutilMerchantLogin
:
false
}
},
watch
:
{
smsCodeDialogVisible
:
function
(
val
)
{
if
(
!
val
)
{
this
.
isLogin
=
false
this
.
getCode
()
this
.
isMutilMerchantLogin
=
false
!
this
.
isHasMutilMerchants
&&
this
.
getCode
()
}
}
},
...
...
@@ -229,7 +230,7 @@ export default {
} catch (error) {
this.error(error.message, ERROR_TYPE.MESSAGE)
} finally {
this.is
Loading
= false
this.is
MutilMerchantLogin
= false
}
},
/**
...
...
@@ -237,11 +238,11 @@ export default {
* 1.获取选择的商户信息
* 2.获取菜单信息并登录
*/
loginChoose: utils.debounce(function (merchant) {
if (this.isLoading) return
loginChoose(merchant) {
if (this.isMutilMerchantLogin) return
this.isMutilMerchantLogin = true
this.verifyPhone(merchant)
this.isLoading = true
}, 2000),
},
/**
* 登录成功,验证本账号是否需要短信验证登录
* 如果不需要验证,直接调取是否选择门店方法
...
...
@@ -314,7 +315,7 @@ export default {
*/
error(message, type = this.isHasMutilMerchants) {
this.isLogin = false
this.is
Loading
= false
this.is
MutilMerchantLogin
= false
~[() => (this.errMsg = message), () => Message.error(message)][+type].call()
this.getCode()
},
...
...
@@ -334,7 +335,7 @@ export default {
this.getCode()
this.isHasMutilMerchants = false
this.chooseMerchant = null
this.is
Loading
= false
this.is
MutilMerchantLogin
= false
},
...mapActions('app', ['login']),
...mapActions('auth', ['permission', 'setSession']),
...
...
@@ -372,6 +373,19 @@ $border-radius: 20px;
box-shadow
:
15px
18px
64px
0px
rgba
(
210
,
210
,
210
,
0.13
);
border-radius
:
$
border-radius
;
overflow
:
hidden
;
.forback
{
position
:
absolute
;
top
:
20px
;
left
:
20px
;
font-size
:
16px
;
z-index
:
1234
;
padding
:
10px
;
cursor
:
pointer
;
&:hover
{
background-color
:
#f1f1f1
;
border-radius
:
50%
;
}
}
.merchants
{
position
:
absolute
;
width
:
100%
;
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment