Commit f73837b9 by 李嘉林

登录组件优化

parent 469ce6b1
...@@ -13,12 +13,6 @@ ...@@ -13,12 +13,6 @@
<div class="btn_info flex"> <div class="btn_info flex">
<div <div
class="btn" 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" lang="zh_CN"
@click="getUserProfile" @click="getUserProfile"
v-if="wxLoginFlag && !phoneLoginFlag" v-if="wxLoginFlag && !phoneLoginFlag"
...@@ -241,6 +235,7 @@ input { ...@@ -241,6 +235,7 @@ input {
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
border-radius: 50px;
} }
} }
.enterpriseLogin { .enterpriseLogin {
...@@ -262,8 +257,7 @@ input { ...@@ -262,8 +257,7 @@ input {
.passLabel { .passLabel {
align-items: center; align-items: center;
border-bottom: 1px solid #e5e5e5; border-bottom: 1px solid #e5e5e5;
padding-bottom: 6px; height: 44px;
margin-bottom: 20px;
position: relative; position: relative;
span { span {
color: #333; color: #333;
...@@ -275,8 +269,6 @@ input { ...@@ -275,8 +269,6 @@ input {
} }
} }
.passLabel { .passLabel {
margin-top: 10px;
margin-bottom: 0;
.forgetPassword { .forgetPassword {
position: absolute; position: absolute;
right: 0; right: 0;
......
<template> <template>
<!-- 登录logo名字模块 --> <!-- 登录logo名字模块 -->
<div class="loginLogo" :style="{'padding-top':paddingTop + 'px','padding-bottom':paddingBottom + 'px'}"> <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'}"> <div class="imgBox" v-if="useUrl" :style="{'width': logoSize + '%', 'padding-top': logoSize + '%'}">
<img v-if="!render" class="img" :src="useUrl" /> <img v-if="!render" class="img" :src="useUrl | DFSImg" />
<image v-else class="img" mode="aspectFit" :src="useUrl" /> <image v-else class="img" mode="aspectFit" :src="useUrl" />
</div> </div>
<p class="shopName" :style="{'padding-top':pictureTextSpacing + 'px','font-size':titleSize + 'px'}" v-if="useTitle">{{ useTitle }}</p> <p class="shopName" :style="{'padding-top':pictureTextSpacing + 'px','font-size':titleSize + 'px'}" v-if="useTitle">{{ useTitle }}</p>
...@@ -40,10 +40,24 @@ export default { ...@@ -40,10 +40,24 @@ export default {
components: {}, components: {},
computed: { computed: {
useUrl() { 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() { 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(){ useLogoType(){
return this.datas.componentData.useLogoType return this.datas.componentData.useLogoType
...@@ -89,7 +103,11 @@ export default { ...@@ -89,7 +103,11 @@ export default {
color: #333; color: #333;
} }
.imgBox{ .imgBox{
position: relative;
.img { .img {
position: absolute;
top: 0;
left: 0;
width: 100%; width: 100%;
height: 100%; height: 100%;
object-fit: cover; object-fit: cover;
......
...@@ -803,7 +803,11 @@ export default { ...@@ -803,7 +803,11 @@ export default {
// 忘记密码 // 忘记密码
forgetPassword(val) { forgetPassword(val) {
if(!val) return; if(!val) return;
wx.showToast({ title: val, icon: "none" }); wx.showModal({
content: val,
showCancel: false,
success (res) {}
})
}, },
getShopUserProtocol() { getShopUserProtocol() {
login.getShopUserProtocol().then(res => { 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