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
f056857c
Commit
f056857c
authored
Dec 24, 2019
by
程默
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix err
parent
d27d4183
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
16 deletions
+25
-16
src/pages/login/index.vue
+25
-16
No files found.
src/pages/login/index.vue
View file @
f056857c
<
template
>
<
template
>
<div
class=
"domain"
>
<div
class=
"domain"
>
<div
class=
"toCLogin"
>
<div
class=
"toCLogin"
>
<image
class=
"img"
mode=
"aspectFit"
:src=
"logoUrl"
/>
<image
class=
"img"
mode=
"aspectFit"
:src=
"logoUrl"
/>
<p
class=
"shopName"
v-if=
"shopName"
>
{{
shopName
}}
</p>
<p
class=
"shopName"
v-if=
"shopName"
>
{{
shopName
}}
</p>
<div
class=
"btn_info"
>
<div
class=
"btn_info"
>
<button
class=
"btn"
lang=
"zh_CN"
open-type=
"getUserInfo"
@
getuserinfo=
"getUserInfo"
>
微信一键登录
</button>
<button
class=
"btn"
lang=
"zh_CN"
open-type=
"getUserInfo"
@
getuserinfo=
"getUserInfo"
>
微信一键登录
</button>
...
@@ -34,7 +34,7 @@ export default {
...
@@ -34,7 +34,7 @@ export default {
return
{
return
{
session_key
:
""
,
session_key
:
""
,
shopName
:
""
,
shopName
:
""
,
logoUrl
:
""
,
logoUrl
:
""
,
isShow
:
false
,
isShow
:
false
,
isShowPhone
:
false
,
isShowPhone
:
false
,
getPhone
:
false
,
getPhone
:
false
,
...
@@ -50,7 +50,7 @@ export default {
...
@@ -50,7 +50,7 @@ export default {
isHaveUnion
:
""
,
isHaveUnion
:
""
,
unionId
:
""
,
unionId
:
""
,
userInfo
:
""
,
userInfo
:
""
,
NEED_CERTIFIED
:
""
NEED_CERTIFIED
:
""
,
};
};
},
},
created
()
{},
created
()
{},
...
@@ -76,8 +76,9 @@ export default {
...
@@ -76,8 +76,9 @@ export default {
console
.
log
(
res
,
"shop"
);
console
.
log
(
res
,
"shop"
);
if
(
res
.
data
.
code
==
200
)
{
if
(
res
.
data
.
code
==
200
)
{
this
.
shopName
=
res
.
data
.
data
.
shopName
;
this
.
shopName
=
res
.
data
.
data
.
shopName
;
this
.
logoUrl
=
process
.
env
.
IMG_DOMAIN
+
res
.
data
.
data
.
logoUrl
;
this
.
logoUrl
=
process
.
env
.
IMG_DOMAIN
+
res
.
data
.
data
.
logoUrl
;
console
.
log
(
this
.
logoUrl
)
console
.
log
(
this
.
logoUrl
);
}
else
{
}
}
});
});
},
},
...
@@ -96,7 +97,9 @@ export default {
...
@@ -96,7 +97,9 @@ export default {
if
(
res
.
data
.
data
.
isHaveUnion
==
"true"
)
{
if
(
res
.
data
.
data
.
isHaveUnion
==
"true"
)
{
//有账号
//有账号
this
.
isHaveUnion
=
true
;
this
.
isHaveUnion
=
true
;
this
.
backParams
+=
`&sessionid=
${
res
.
data
.
data
.
sessionId
}
&needCertified=
${
res
.
data
.
data
.
NEED_CERTIFIED
}
`
;
this
.
backParams
+=
`&sessionid=
${
res
.
data
.
data
.
sessionId
}
&needCertified=
${
res
.
data
.
data
.
NEED_CERTIFIED
}
`
;
this
.
NEED_CERTIFIED
=
res
.
data
.
data
.
NEED_CERTIFIED
;
this
.
NEED_CERTIFIED
=
res
.
data
.
data
.
NEED_CERTIFIED
;
wx
.
setStorage
({
wx
.
setStorage
({
key
:
"sessionid"
,
key
:
"sessionid"
,
...
@@ -110,11 +113,13 @@ export default {
...
@@ -110,11 +113,13 @@ export default {
this
.
session_key
=
res
.
data
.
data
.
session_key
;
this
.
session_key
=
res
.
data
.
data
.
session_key
;
this
.
openid
=
res
.
data
.
data
.
openid
;
this
.
openid
=
res
.
data
.
data
.
openid
;
this
.
isShow
=
true
;
this
.
isShow
=
true
;
}
else
{
}
else
{
wx
.
showToast
({
title
:
res
.
data
.
msg
,
icon
:
'none'
})
wx
.
showToast
({
title
:
res
.
data
.
msg
,
icon
:
"none"
});
}
}
})
})
.
catch
(
err
=>
{});
.
catch
(
err
=>
{
wx
.
showToast
({
title
:
err
,
icon
:
"none"
});
});
}
}
}
}
});
});
...
@@ -152,7 +157,9 @@ export default {
...
@@ -152,7 +157,9 @@ export default {
console
.
log
(
"check"
,
res
);
console
.
log
(
"check"
,
res
);
if
(
res
.
data
.
data
.
isHaveUnion
==
"true"
)
{
if
(
res
.
data
.
data
.
isHaveUnion
==
"true"
)
{
this
.
NEED_CERTIFIED
=
res
.
data
.
data
.
NEED_CERTIFIED
;
this
.
NEED_CERTIFIED
=
res
.
data
.
data
.
NEED_CERTIFIED
;
this
.
backParams
+=
`&sessionid=
${
res
.
data
.
data
.
sessionId
}
&needCertified=
${
res
.
data
.
data
.
NEED_CERTIFIED
}
`
;
this
.
backParams
+=
`&sessionid=
${
res
.
data
.
data
.
sessionId
}
&needCertified=
${
res
.
data
.
data
.
NEED_CERTIFIED
}
`
;
wx
.
setStorage
({
wx
.
setStorage
({
key
:
"sessionid"
,
key
:
"sessionid"
,
data
:
res
.
data
.
data
.
sessionId
data
:
res
.
data
.
data
.
sessionId
...
@@ -214,19 +221,21 @@ export default {
...
@@ -214,19 +221,21 @@ export default {
otherPhone
:
0
otherPhone
:
0
};
};
if
(
this
.
$store
.
state
.
spokesmanGroupId
!=
""
)
{
if
(
this
.
$store
.
state
.
spokesmanGroupId
!=
""
)
{
query
.
spokesmanRelId
=
this
.
$store
.
state
.
spokesmanRelId
;
query
.
spokesmanRelId
=
this
.
$store
.
state
.
spokesmanRelId
;
query
.
spokesmanGroupId
=
this
.
$store
.
state
.
spokesmanGroupId
;
query
.
spokesmanGroupId
=
this
.
$store
.
state
.
spokesmanGroupId
;
query
.
spokesmanShopId
=
this
.
$store
.
state
.
spokesmanShopId
;
query
.
spokesmanShopId
=
this
.
$store
.
state
.
spokesmanShopId
;
}
}
console
.
log
(
query
,
'query'
)
console
.
log
(
query
,
"query"
);
login
login
.
bindUser
(
query
)
.
bindUser
(
query
)
.
then
(
res
=>
{
.
then
(
res
=>
{
//绑定成功
//绑定成功
if
(
res
.
data
.
code
==
200
)
{
if
(
res
.
data
.
code
==
200
)
{
this
.
NEED_CERTIFIED
=
res
.
data
.
data
.
NEED_CERTIFIED
;
this
.
NEED_CERTIFIED
=
res
.
data
.
data
.
NEED_CERTIFIED
;
this
.
backParams
+=
`&sessionid=
${
res
.
data
.
data
.
sessionId
}
&needCertified=
${
res
.
data
.
data
.
NEED_CERTIFIED
}
`
;
this
.
backParams
+=
`&sessionid=
${
res
.
data
.
data
.
sessionId
}
&needCertified=
${
res
.
data
.
data
.
NEED_CERTIFIED
}
`
;
wx
.
setStorage
({
wx
.
setStorage
({
key
:
"sessionid"
,
key
:
"sessionid"
,
data
:
res
.
data
.
data
.
sessionId
data
:
res
.
data
.
data
.
sessionId
...
@@ -293,7 +302,7 @@ export default {
...
@@ -293,7 +302,7 @@ export default {
font-weight
:
bold
;
font-weight
:
bold
;
color
:
#333
;
color
:
#333
;
}
}
.img
{
.img
{
width
:
100px
;
width
:
100px
;
height
:
100px
;
height
:
100px
;
}
}
...
...
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