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
8af70917
Commit
8af70917
authored
Mar 11, 2020
by
程智春
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
扫码pid
parent
3bee0938
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
15 deletions
+40
-15
src/pages/index/index.vue
+40
-15
No files found.
src/pages/index/index.vue
View file @
8af70917
...
@@ -30,13 +30,14 @@ export default {
...
@@ -30,13 +30,14 @@ export default {
spokesmanGroupId
:
""
,
// 代言人的集团id
spokesmanGroupId
:
""
,
// 代言人的集团id
spokesmanShopId
:
""
,
// 代言人的门店id
spokesmanShopId
:
""
,
// 代言人的门店id
spokesmanRelId
:
""
,
//代言人的id
spokesmanRelId
:
""
,
//代言人的id
userId
:
''
,
hasInvitationStatus
:
0
,
// 邀请资格:0-不能够邀请下级,1-能够邀请下级
hasInvitationStatus
:
0
,
// 邀请资格:0-不能够邀请下级,1-能够邀请下级
newHref
:
""
,
newHref
:
""
,
shareShopName
:
""
,
shareShopName
:
""
,
shareLogoUrl
:
""
,
shareLogoUrl
:
""
,
shareOrderSn
:
""
,
shareOrderSn
:
""
,
shareTid
:
""
,
shareTid
:
""
,
shareImgUrl
:
''
,
newWindowHref
:
''
,
sharePageList
:
[
sharePageList
:
[
"goods/"
,
"goods/"
,
"receivingGift"
,
"receivingGift"
,
...
@@ -69,6 +70,7 @@ export default {
...
@@ -69,6 +70,7 @@ export default {
this
.
spokesmanShopId
=
this
.
spokesmanShopId
=
getQueryVariable
(
this
.
link
,
"spokesmanShopId"
)
||
""
;
getQueryVariable
(
this
.
link
,
"spokesmanShopId"
)
||
""
;
this
.
spokesmanRelId
=
getQueryVariable
(
this
.
link
,
"spokesmanRelId"
)
||
""
;
this
.
spokesmanRelId
=
getQueryVariable
(
this
.
link
,
"spokesmanRelId"
)
||
""
;
this
.
userId
=
getQueryVariable
(
this
.
link
,
"userId"
)
||
""
;
if
(
this
.
spokesmanGroupId
!=
""
)
{
if
(
this
.
spokesmanGroupId
!=
""
)
{
//分销员分享
//分销员分享
this
.
$store
.
commit
(
"setSpokesman"
,
{
this
.
$store
.
commit
(
"setSpokesman"
,
{
...
@@ -114,26 +116,49 @@ export default {
...
@@ -114,26 +116,49 @@ export default {
var
scene
=
decodeURIComponent
(
options
.
scene
);
//参数二维码传递过来的参数
var
scene
=
decodeURIComponent
(
options
.
scene
);
//参数二维码传递过来的参数
let
querys
=
scene
.
split
(
"_"
);
let
querys
=
scene
.
split
(
"_"
);
if
(
querys
)
{
if
(
querys
)
{
if
(
querys
[
0
]
==
"
goods
"
)
{
if
(
querys
[
0
]
==
"
pid
"
)
{
//商品详情 pid_123
//商品详情 pid_123
this
.
page
=
`/goods/
${
querys
[
1
]}
`
;
this
.
page
=
`/goods/
${
querys
[
1
]}
`
;
this
.
params
+=
`&spokesmanGroupId=
${
querys
[
2
]}
&spokesmanShopId=
${
if
(
querys
.
length
>
3
){
querys
[
3
]
if
(
querys
[
5
]){
}
&spokesmanRelId=
${
querys
[
4
]}
&usedId=
${
querys
[
5
]}
`
;
this
.
params
+=
`&spokesmanGroupId=
${
querys
[
2
]}
&spokesmanShopId=
${
querys
[
3
]}
&spokesmanRelId=
${
querys
[
4
]}
$userId=
${
querys
[
5
]}
`
}
else
{
this
.
params
+=
`&spokesmanGroupId=
${
querys
[
2
]}
&spokesmanShopId=
${
querys
[
3
]}
&spokesmanRelId=
${
querys
[
4
]}
`
}
}
else
if
(
querys
.
length
==
3
){
this
.
params
+=
`&userId=
${
querys
[
1
]}
`
}
}
else
if
(
querys
[
0
]
==
"activty"
)
{
}
else
if
(
querys
[
0
]
==
"activty"
)
{
//活动页面activty_turntable_123
//活动页面activty_turntable_123
this
.
params
+=
`&pageInfo=
${
scene
}
`
;
this
.
params
+=
`&pageInfo=
${
scene
}
`
;
}
else
if
(
querys
[
0
]
==
"spokesman"
)
{
}
else
if
(
querys
[
0
]
==
"spokesman"
)
{
//分销员 小程序码
//分销员 小程序码
this
.
page
=
`/personalCenter/spokesmanCenter`
;
this
.
page
=
`/personalCenter/spokesmanCenter`
;
this
.
params
+=
`&spokesmanGroupId=
${
querys
[
1
]}
&spokesmanShopId=
${
if
(
querys
.
length
>
4
){
querys
[
2
]
this
.
params
+=
`&spokesmanGroupId=
${
querys
[
1
]}
&spokesmanShopId=
${
}
&spokesmanRelId=
${
querys
[
3
]}
&usedId=
${
querys
[
4
]}
`
;
querys
[
2
]
}
&spokesmanRelId=
${
querys
[
3
]}
&usedId=
${
querys
[
4
]}
&=
${
querys
[
5
]}
`
;
}
else
{
this
.
params
+=
`&spokesmanGroupId=
${
querys
[
1
]}
&spokesmanShopId=
${
querys
[
2
]
}
&spokesmanRelId=
${
querys
[
3
]}
&usedId=
${
querys
[
4
]}
`
;
}
}
else
if
(
querys
[
0
]
==
"home"
){
}
else
if
(
querys
[
0
]
==
"home"
){
this
.
page
=
`/`
;
this
.
page
=
`/`
;
this
.
params
+=
`&spokesmanGroupId=
${
querys
[
1
]}
&spokesmanShopId=
${
if
(
querys
.
length
>
2
){
querys
[
2
]
if
(
querys
[
4
]){
}
&spokesmanRelId=
${
querys
[
3
]}
&usedId=
${
querys
[
4
]}
`
;
this
.
params
+=
`&spokesmanGroupId=
${
querys
[
1
]}
&spokesmanShopId=
${
querys
[
2
]}
&spokesmanRelId=
${
querys
[
3
]}
$userId=
${
querys
[
4
]}
`
}
else
{
this
.
params
+=
`&spokesmanGroupId=
${
querys
[
1
]}
&spokesmanShopId=
${
querys
[
2
]}
&spokesmanRelId=
${
querys
[
3
]}
`
}
}
else
if
(
querys
.
length
==
2
){
this
.
params
+=
`&userId=
${
querys
[
1
]}
`
}
}
}
}
}
console
.
log
(
querys
,
"scene"
);
console
.
log
(
querys
,
"scene"
);
...
@@ -248,8 +273,8 @@ export default {
...
@@ -248,8 +273,8 @@ export default {
//分享内容中有订单信息为送礼活动
//分享内容中有订单信息为送礼活动
this
.
shareOrderSn
=
res
.
target
.
data
[
len
].
orderSn
;
this
.
shareOrderSn
=
res
.
target
.
data
[
len
].
orderSn
;
this
.
shareTid
=
res
.
target
.
data
[
len
].
shareTid
;
this
.
shareTid
=
res
.
target
.
data
[
len
].
shareTid
;
this
.
shareImgUrl
=
res
.
target
.
data
[
len
].
shareImgUrl
;
this
.
newWindowHref
=
res
.
target
.
data
[
len
].
shareImgUrl
;
console
.
log
(
"分享信息:"
,
this
.
shareLogoUrl
,
this
.
shareShopName
,
this
.
shareImgUrl
);
console
.
log
(
"分享信息:"
,
this
.
shareLogoUrl
,
this
.
shareShopName
,
this
.
newWindowHref
);
},
},
checkPageUrl
(
val
)
{
checkPageUrl
(
val
)
{
for
(
let
i
=
0
;
i
<
this
.
sharePageList
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
this
.
sharePageList
.
length
;
i
++
)
{
...
@@ -273,8 +298,8 @@ export default {
...
@@ -273,8 +298,8 @@ export default {
this
.
shareLogoUrl
this
.
shareLogoUrl
);
);
let
url
=
''
let
url
=
''
if
(
this
.
shareImgUrl
){
if
(
this
.
newWindowHref
){
url
=
this
.
shareImgUrl
;
url
=
this
.
newWindowHref
;
}
else
{
}
else
{
url
=
res
.
webViewUrl
;
url
=
res
.
webViewUrl
;
}
}
...
...
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