Commit f73837b9 by 李嘉林

登录组件优化

parent 469ce6b1
......@@ -13,12 +13,6 @@
<div class="btn_info flex">
<div
class="btn"
:style="{
'border-radius': loginBtnOrderRadius + 'px',
'background-color':loginBtnStyleType == 1 ? customLoginBtnBackground : '',
'color': loginBtnStyleType == 1 ? customLoginBtnColor : '',
'font-size':loginBtnStyleType == 1 ? customLoginBtnSize + 'px' : ''
}"
lang="zh_CN"
@click="getUserProfile"
v-if="wxLoginFlag && !phoneLoginFlag"
......@@ -241,6 +235,7 @@ input {
display: flex;
justify-content: center;
align-items: center;
border-radius: 50px;
}
}
.enterpriseLogin {
......@@ -262,8 +257,7 @@ input {
.passLabel {
align-items: center;
border-bottom: 1px solid #e5e5e5;
padding-bottom: 6px;
margin-bottom: 20px;
height: 44px;
position: relative;
span {
color: #333;
......@@ -275,8 +269,6 @@ input {
}
}
.passLabel {
margin-top: 10px;
margin-bottom: 0;
.forgetPassword {
position: absolute;
right: 0;
......
<template>
<!-- 登录logo名字模块 -->
<div class="loginLogo" :style="{'padding-top':paddingTop + 'px','padding-bottom':paddingBottom + 'px'}">
<div class="imgBox" v-if="useUrl" :style="{'width': logoSize + 'px','height': logoSize + 'px'}">
<img v-if="!render" class="img" :src="useUrl" />
<div class="imgBox" v-if="useUrl" :style="{'width': logoSize + '%', 'padding-top': logoSize + '%'}">
<img v-if="!render" class="img" :src="useUrl | DFSImg" />
<image v-else class="img" mode="aspectFit" :src="useUrl" />
</div>
<p class="shopName" :style="{'padding-top':pictureTextSpacing + 'px','font-size':titleSize + 'px'}" v-if="useTitle">{{ useTitle }}</p>
......@@ -40,10 +40,24 @@ export default {
components: {},
computed: {
useUrl() {
return this.useLogoType==1 ? this.customLogoUrl : this.logoUrl
let logoUrl = ()=>{
let themeShopInfo = this.$store.state.shopInfo;
if(themeShopInfo && Object.keys(themeShopInfo).length > 0 && !this.render) {
return themeShopInfo.logoUrl;
}
return this.logoUrl;
}
return this.useLogoType==1 ? this.customLogoUrl : logoUrl();
},
useTitle() {
return this.useTitleType==1 ? this.customTitle : this.shopName
let shopName = ()=>{
let themeShopInfo = this.$store.state.shopInfo;
if(themeShopInfo && Object.keys(themeShopInfo).length > 0 && !this.render) {
return themeShopInfo.shopName;
}
return this.shopName;
}
return this.useTitleType==1 ? this.customTitle : shopName();
},
useLogoType(){
return this.datas.componentData.useLogoType
......@@ -89,7 +103,11 @@ export default {
color: #333;
}
.imgBox{
position: relative;
.img {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
object-fit: cover;
......
......@@ -803,7 +803,11 @@ export default {
// 忘记密码
forgetPassword(val) {
if(!val) return;
wx.showToast({ title: val, icon: "none" });
wx.showModal({
content: val,
showCancel: false,
success (res) {}
})
},
getShopUserProtocol() {
login.getShopUserProtocol().then(res => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment