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
f555208b
Commit
f555208b
authored
Sep 20, 2019
by
程默
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
手动绑定
parent
cfe72829
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
3 deletions
+18
-3
src/pages/login/index.vue
+15
-2
src/utils/index.js
+3
-1
No files found.
src/pages/login/index.vue
View file @
f555208b
...
@@ -137,7 +137,7 @@ export default {
...
@@ -137,7 +137,7 @@ export default {
);
);
this
.
unionId
=
data
.
unionId
||
""
;
this
.
unionId
=
data
.
unionId
||
""
;
this
.
userInfo
=
JSON
.
parse
(
e
.
target
.
rawData
);
this
.
userInfo
=
JSON
.
parse
(
e
.
target
.
rawData
);
console
.
log
(
this
.
u
nionId
,
"this.unionId
"
);
console
.
log
(
this
.
u
serInfo
,
"this.userInfo
"
);
if
(
this
.
unionId
)
{
if
(
this
.
unionId
)
{
login
login
.
checkUnionid
({
unionId
:
this
.
unionId
,
openId
:
this
.
openid
})
.
checkUnionid
({
unionId
:
this
.
unionId
,
openId
:
this
.
openid
})
...
@@ -201,6 +201,9 @@ export default {
...
@@ -201,6 +201,9 @@ export default {
headImgUrl
:
this
.
userInfo
.
avatarUrl
,
headImgUrl
:
this
.
userInfo
.
avatarUrl
,
gender
:
this
.
userInfo
.
gender
,
gender
:
this
.
userInfo
.
gender
,
nickname
:
this
.
userInfo
.
nickName
,
nickname
:
this
.
userInfo
.
nickName
,
country
:
this
.
userInfo
.
country
,
province
:
this
.
userInfo
.
province
,
city
:
this
.
userInfo
.
city
,
otherPhone
:
0
otherPhone
:
0
})
})
.
then
(
res
=>
{
.
then
(
res
=>
{
...
@@ -237,9 +240,19 @@ export default {
...
@@ -237,9 +240,19 @@ export default {
});
});
},
},
handbindHandle
()
{
handbindHandle
()
{
const
query
=
{
openId
:
this
.
openid
,
unionId
:
this
.
unionId
,
headImgUrl
:
this
.
userInfo
.
avatarUrl
,
gender
:
this
.
userInfo
.
gender
,
nickname
:
this
.
userInfo
.
nickName
,
country
:
this
.
userInfo
.
country
,
province
:
this
.
userInfo
.
province
,
city
:
this
.
userInfo
.
city
}
//绑定手机号
//绑定手机号
wx
.
navigateTo
({
wx
.
navigateTo
({
url
:
`../index/main?from=login&backpath=/login/wxRegister`
url
:
`../index/main?from=login&backpath=/login/wxRegister
¶ms=
${
encodeURIComponent
(
serialize
(
query
))}
`
});
});
}
}
}
}
...
...
src/utils/index.js
View file @
f555208b
...
@@ -22,7 +22,9 @@ export function formatTime(date) {
...
@@ -22,7 +22,9 @@ export function formatTime(date) {
//对象转querystring
//对象转querystring
export
function
serialize
(
obj
)
{
export
function
serialize
(
obj
)
{
var
str
=
[];
var
str
=
[];
obj
=
JSON
.
parse
(
obj
);
if
(
typeof
obj
==
"string"
)
{
obj
=
JSON
.
parse
(
obj
);
}
for
(
var
p
in
obj
)
{
for
(
var
p
in
obj
)
{
if
(
obj
.
hasOwnProperty
(
p
))
{
if
(
obj
.
hasOwnProperty
(
p
))
{
str
.
push
(
encodeURIComponent
(
p
)
+
"="
+
encodeURIComponent
(
obj
[
p
]));
str
.
push
(
encodeURIComponent
(
p
)
+
"="
+
encodeURIComponent
(
obj
[
p
]));
...
...
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