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
454ebd88
Commit
454ebd88
authored
Sep 21, 2019
by
程默
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
分销员 分享
parent
2a7ba4dd
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
23 deletions
+34
-23
src/pages/index/index.vue
+1
-0
src/pages/login/index.vue
+33
-23
No files found.
src/pages/index/index.vue
View file @
454ebd88
...
@@ -50,6 +50,7 @@ export default {
...
@@ -50,6 +50,7 @@ export default {
this
.
spokesmanBindId
=
this
.
spokesmanBindId
=
getQueryVariable
(
this
.
link
,
"spokesmanBindId"
)
||
""
;
getQueryVariable
(
this
.
link
,
"spokesmanBindId"
)
||
""
;
if
(
this
.
spokesmanGroupId
!=
""
)
{
if
(
this
.
spokesmanGroupId
!=
""
)
{
//分销员分享
this
.
$store
.
commit
(
"setSpokesman"
,
{
this
.
$store
.
commit
(
"setSpokesman"
,
{
spokesmanGroupId
:
this
.
spokesmanGroupId
,
spokesmanGroupId
:
this
.
spokesmanGroupId
,
spokesmanShopId
:
this
.
spokesmanShopId
,
spokesmanShopId
:
this
.
spokesmanShopId
,
...
...
src/pages/login/index.vue
View file @
454ebd88
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
<div
class=
"toCLogin"
>
<div
class=
"toCLogin"
>
<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>
</div>
</div>
<div
class=
"enterpriseLogin"
@
click=
"eLogin"
>
企业员工登录
</div>
<div
class=
"enterpriseLogin"
@
click=
"eLogin"
>
企业员工登录
</div>
</div>
</div>
...
@@ -58,7 +58,7 @@ export default {
...
@@ -58,7 +58,7 @@ export default {
isHaveUnion
:
""
,
isHaveUnion
:
""
,
unionId
:
""
,
unionId
:
""
,
userInfo
:
""
,
userInfo
:
""
,
NEED_CERTIFIED
:
""
NEED_CERTIFIED
:
""
};
};
},
},
created
()
{},
created
()
{},
...
@@ -71,7 +71,10 @@ export default {
...
@@ -71,7 +71,10 @@ export default {
this
.
backParams
=
serialize
(
options
.
params
);
this
.
backParams
=
serialize
(
options
.
params
);
}
}
console
.
log
(
options
,
"登录页面"
,
this
.
backPath
,
this
.
backParams
);
console
.
log
(
options
,
"登录页面"
,
this
.
backPath
,
this
.
backParams
);
console
.
log
(
this
.
$store
.
state
.
spokesmanGroupId
,
'-----------0---------------'
)
console
.
log
(
this
.
$store
.
state
.
spokesmanGroupId
,
"-----------0---------------"
);
this
.
getshop
();
this
.
getshop
();
this
.
init
();
this
.
init
();
},
},
...
@@ -100,7 +103,7 @@ export default {
...
@@ -100,7 +103,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
;
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
...
@@ -146,7 +149,7 @@ export default {
...
@@ -146,7 +149,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
.
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"
,
...
@@ -194,27 +197,32 @@ export default {
...
@@ -194,27 +197,32 @@ export default {
});
});
},
},
bindUser
()
{
bindUser
()
{
// spokesmanRelId:'',
let
query
=
{
// spokesmanGroupId:'',
// spokesmanShopId:'',
// spokesmanBindId:''
login
.
bindUser
({
openId
:
this
.
openid
,
openId
:
this
.
openid
,
phoneNumber
:
this
.
phoneNumber
,
phoneNumber
:
this
.
phoneNumber
,
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
,
country
:
this
.
userInfo
.
country
,
country
:
this
.
userInfo
.
country
,
province
:
this
.
userInfo
.
province
,
province
:
this
.
userInfo
.
province
,
city
:
this
.
userInfo
.
city
,
city
:
this
.
userInfo
.
city
,
otherPhone
:
0
otherPhone
:
0
})
};
if
(
this
.
$store
.
state
.
spokesmanGroupId
!=
""
)
{
query
.
spokesmanRelId
=
this
.
$store
.
state
.
spokesmanRelId
;
query
.
spokesmanGroupId
=
this
.
$store
.
state
.
spokesmanGroupId
;
query
.
spokesmanShopId
=
this
.
$store
.
state
.
spokesmanShopId
;
query
.
spokesmanBindId
=
this
.
$store
.
state
.
spokesmanBindId
;
}
console
.
log
(
query
,
'query'
)
login
.
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
}
`
;
this
.
backParams
+=
`&sessionid=
${
res
.
data
.
data
.
sessionId
}
`
;
wx
.
setStorage
({
wx
.
setStorage
({
key
:
"sessionid"
,
key
:
"sessionid"
,
...
@@ -245,19 +253,21 @@ export default {
...
@@ -245,19 +253,21 @@ export default {
});
});
},
},
handbindHandle
()
{
handbindHandle
()
{
const
query
=
{
const
query
=
{
openId
:
this
.
openid
,
openId
:
this
.
openid
,
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
,
country
:
this
.
userInfo
.
country
,
country
:
this
.
userInfo
.
country
,
province
:
this
.
userInfo
.
province
,
province
:
this
.
userInfo
.
province
,
city
:
this
.
userInfo
.
city
city
:
this
.
userInfo
.
city
}
}
;
//绑定手机号
//绑定手机号
wx
.
navigateTo
({
wx
.
navigateTo
({
url
:
`../index/main?from=login&backpath=/login/wxRegister¶ms=
${
encodeURIComponent
(
serialize
(
query
))}
`
url
:
`../index/main?from=login&backpath=/login/wxRegister¶ms=
${
encodeURIComponent
(
serialize
(
query
)
)}
`
});
});
}
}
}
}
...
...
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