Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mayi-mp-shop
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
程默
mayi-mp-shop
Commits
f73837b9
Commit
f73837b9
authored
Jul 13, 2022
by
李嘉林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
登录组件优化
parent
469ce6b1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
15 deletions
+29
-15
src/components/login/loginBox.vue
+2
-10
src/components/login/loginLogo.vue
+22
-4
src/pages/login/index.vue
+5
-1
No files found.
src/components/login/loginBox.vue
View file @
f73837b9
...
...
@@ -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
;
...
...
src/components/login/loginLogo.vue
View file @
f73837b9
<
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
;
...
...
src/pages/login/index.vue
View file @
f73837b9
...
...
@@ -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
=>
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment