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
cfe72829
Commit
cfe72829
authored
Sep 20, 2019
by
程默
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bind修改
parent
f7cdbf73
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
3 deletions
+8
-3
src/api/login.js
+1
-1
src/pages/login/index.vue
+7
-2
No files found.
src/api/login.js
View file @
cfe72829
...
@@ -10,7 +10,7 @@ console.log(process.env,'-----------------config------')
...
@@ -10,7 +10,7 @@ console.log(process.env,'-----------------config------')
},
},
//绑定
//绑定
bindUser
(
options
){
bindUser
(
options
){
return
request
GE
T
(
`
${
process
.
env
.
OLSHOP_URL
}
/wx/mini_bind_user`
,
options
)
return
request
POS
T
(
`
${
process
.
env
.
OLSHOP_URL
}
/wx/mini_bind_user`
,
options
)
},
},
//check unionid
//check unionid
checkUnionid
(
options
){
checkUnionid
(
options
){
...
...
src/pages/login/index.vue
View file @
cfe72829
...
@@ -57,7 +57,8 @@ export default {
...
@@ -57,7 +57,8 @@ export default {
backParams
:
""
,
backParams
:
""
,
isHaveUnion
:
""
,
isHaveUnion
:
""
,
unionId
:
""
,
unionId
:
""
,
userInfo
:
""
userInfo
:
""
,
NEED_CERTIFIED
:
""
};
};
},
},
created
()
{},
created
()
{},
...
@@ -98,6 +99,7 @@ export default {
...
@@ -98,6 +99,7 @@ export default {
//有账号
//有账号
this
.
isHaveUnion
=
true
;
this
.
isHaveUnion
=
true
;
this
.
backParams
+=
`&sessionid=
${
res
.
data
.
data
.
sessionId
}
`
;
this
.
backParams
+=
`&sessionid=
${
res
.
data
.
data
.
sessionId
}
`
;
this
.
NEED_CERTIFIED
=
res
.
data
.
data
.
NEED_CERTIFIED
;
wx
.
setStorage
({
wx
.
setStorage
({
key
:
"sessionid"
,
key
:
"sessionid"
,
data
:
res
.
data
.
data
.
sessionId
data
:
res
.
data
.
data
.
sessionId
...
@@ -143,6 +145,7 @@ export default {
...
@@ -143,6 +145,7 @@ export default {
if
(
res
.
data
.
code
==
200
)
{
if
(
res
.
data
.
code
==
200
)
{
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
.
backParams
+=
`&sessionid=
${
res
.
data
.
data
.
sessionId
}
`
;
this
.
backParams
+=
`&sessionid=
${
res
.
data
.
data
.
sessionId
}
`
;
wx
.
setStorage
({
wx
.
setStorage
({
key
:
"sessionid"
,
key
:
"sessionid"
,
...
@@ -197,11 +200,13 @@ export default {
...
@@ -197,11 +200,13 @@ export default {
unionId
:
this
.
unionId
,
unionId
:
this
.
unionId
,
headImgUrl
:
this
.
userInfo
.
avatarUrl
,
headImgUrl
:
this
.
userInfo
.
avatarUrl
,
gender
:
this
.
userInfo
.
gender
,
gender
:
this
.
userInfo
.
gender
,
nickname
:
this
.
userInfo
.
nickName
nickname
:
this
.
userInfo
.
nickName
,
otherPhone
:
0
})
})
.
then
(
res
=>
{
.
then
(
res
=>
{
//绑定成功
//绑定成功
if
(
res
.
data
.
code
==
200
)
{
if
(
res
.
data
.
code
==
200
)
{
this
.
NEED_CERTIFIED
=
res
.
data
.
data
.
NEED_CERTIFIED
;
this
.
backParams
+=
`&sessionid=
${
res
.
data
.
data
.
sessionId
}
`
;
this
.
backParams
+=
`&sessionid=
${
res
.
data
.
data
.
sessionId
}
`
;
wx
.
setStorage
({
wx
.
setStorage
({
key
:
"sessionid"
,
key
:
"sessionid"
,
...
...
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