Commit 0ce4171c by liimin

1.新增多商户选择后的loading状态

2.新增多商户选择界面的返回按钮
1 parent 4606cec8
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* @Author: limin * @Author: limin
* @Date: 2021-06-07 14:12:32 * @Date: 2021-06-07 14:12:32
* @LastEditors: limin * @LastEditors: limin
* @LastEditTime: 2023-11-09 11:02:43 * @LastEditTime: 2023-11-09 13:39:15
*/ */
// 根据环境引入不同配置 process.env.VUE_APP_ENV // 根据环境引入不同配置 process.env.VUE_APP_ENV
let cfg = require('./conf.js') let cfg = require('./conf.js')
...@@ -25,7 +25,7 @@ export const fetchConfig = (isEnv = sw) => { ...@@ -25,7 +25,7 @@ export const fetchConfig = (isEnv = sw) => {
if ((_config && !_constRoutes.includes(_pathname)) || _pathname === _login_path || (_pathname === '/' && _login_path === '/login')) { if ((_config && !_constRoutes.includes(_pathname)) || _pathname === _login_path || (_pathname === '/' && _login_path === '/login')) {
return Promise.resolve(_config) 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 = { export const config = {
install(vue, cfg) { install(vue, cfg) {
......
...@@ -4,10 +4,10 @@ ...@@ -4,10 +4,10 @@
<el-image :src="`${$config.cdn}/assets/${$config.customized.assets}/logo_login.png`"></el-image> <el-image :src="`${$config.cdn}/assets/${$config.customized.assets}/logo_login.png`"></el-image>
<h2>专注汽车行业数字化+智能营销解决方案——帮您的流量变销量</h2> <h2>专注汽车行业数字化+智能营销解决方案——帮您的流量变销量</h2>
</div> </div>
<div class="login-wrap animate__animated" :class="{ animate__fadeInUp: isDoAnimate }"> <div class="login-wrap animate__animated" :class="{ animate__fadeInUp: isDoAnimate }" v-loading="isMutilMerchantLogin">
<i class="icon el-icon-arrow-left"></i> <div class="merchants" v-if="isHasMutilMerchants">
<div class="merchants" v-if="isHasMutilMerchants" @click="forback"> <i class="icon el-icon-arrow-left forback" @click="forback"></i>
<div class="wrap" v-loading="isLoading"> <div class="wrap">
<span class="title">请选择登录商户号</span> <span class="title">请选择登录商户号</span>
<GLScroll class="login-merchants-scroll"> <GLScroll class="login-merchants-scroll">
<div class="item-wrap"> <div class="item-wrap">
...@@ -129,14 +129,15 @@ export default { ...@@ -129,14 +129,15 @@ export default {
}, },
isPrivacyChecked: true, isPrivacyChecked: true,
chooseMerchant: null, chooseMerchant: null,
isLoading: false isMutilMerchantLogin: false
} }
}, },
watch: { watch: {
smsCodeDialogVisible: function (val) { smsCodeDialogVisible: function (val) {
if (!val) { if (!val) {
this.isLogin = false this.isLogin = false
this.getCode() this.isMutilMerchantLogin = false
!this.isHasMutilMerchants && this.getCode()
} }
} }
}, },
...@@ -229,7 +230,7 @@ export default { ...@@ -229,7 +230,7 @@ export default {
} catch (error) { } catch (error) {
this.error(error.message, ERROR_TYPE.MESSAGE) this.error(error.message, ERROR_TYPE.MESSAGE)
} finally { } finally {
this.isLoading = false this.isMutilMerchantLogin = false
} }
}, },
/** /**
...@@ -237,11 +238,11 @@ export default { ...@@ -237,11 +238,11 @@ export default {
* 1.获取选择的商户信息 * 1.获取选择的商户信息
* 2.获取菜单信息并登录 * 2.获取菜单信息并登录
*/ */
loginChoose: utils.debounce(function (merchant) { loginChoose(merchant) {
if (this.isLoading) return if (this.isMutilMerchantLogin) return
this.isMutilMerchantLogin = true
this.verifyPhone(merchant) this.verifyPhone(merchant)
this.isLoading = true },
}, 2000),
/** /**
* 登录成功,验证本账号是否需要短信验证登录 * 登录成功,验证本账号是否需要短信验证登录
* 如果不需要验证,直接调取是否选择门店方法 * 如果不需要验证,直接调取是否选择门店方法
...@@ -314,7 +315,7 @@ export default { ...@@ -314,7 +315,7 @@ export default {
*/ */
error(message, type = this.isHasMutilMerchants) { error(message, type = this.isHasMutilMerchants) {
this.isLogin = false this.isLogin = false
this.isLoading = false this.isMutilMerchantLogin = false
~[() => (this.errMsg = message), () => Message.error(message)][+type].call() ~[() => (this.errMsg = message), () => Message.error(message)][+type].call()
this.getCode() this.getCode()
}, },
...@@ -334,7 +335,7 @@ export default { ...@@ -334,7 +335,7 @@ export default {
this.getCode() this.getCode()
this.isHasMutilMerchants = false this.isHasMutilMerchants = false
this.chooseMerchant = null this.chooseMerchant = null
this.isLoading = false this.isMutilMerchantLogin = false
}, },
...mapActions('app', ['login']), ...mapActions('app', ['login']),
...mapActions('auth', ['permission', 'setSession']), ...mapActions('auth', ['permission', 'setSession']),
...@@ -372,6 +373,19 @@ $border-radius: 20px; ...@@ -372,6 +373,19 @@ $border-radius: 20px;
box-shadow: 15px 18px 64px 0px rgba(210, 210, 210, 0.13); box-shadow: 15px 18px 64px 0px rgba(210, 210, 210, 0.13);
border-radius: $border-radius; border-radius: $border-radius;
overflow: hidden; 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 { .merchants {
position: absolute; position: absolute;
width: 100%; width: 100%;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!