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
e4f18d1e
Commit
e4f18d1e
authored
Feb 14, 2020
by
程默
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
扫码进入分销员中心
parent
25c1e8a3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
12 deletions
+35
-12
src/pages/index/index.vue
+35
-12
No files found.
src/pages/index/index.vue
View file @
e4f18d1e
...
...
@@ -34,8 +34,13 @@ export default {
shareShopName
:
""
,
shareLogoUrl
:
""
,
shareOrderSn
:
""
,
shareTid
:
""
,
sharePageList
:
[
"goods/"
,
"receivingGift"
,
"article/"
]
shareTid
:
""
,
sharePageList
:
[
"goods/"
,
"receivingGift"
,
"article/"
,
"/personalCenter/spokesmanCenter/mine/popularize"
]
//分享白名单
};
},
onLoad
(
options
)
{
...
...
@@ -79,7 +84,7 @@ export default {
}
else
if
(
options
.
from
&&
options
.
from
==
"login"
)
{
//来自小程序登录页面
this
.
page
=
decodeURIComponent
(
options
.
backpath
);
this
.
params
+=
"&"
+
decodeURIComponent
(
options
.
params
)
+
"&"
;
this
.
params
+=
"&"
+
decodeURIComponent
(
options
.
params
)
+
"&"
;
}
else
if
(
options
.
from
&&
options
.
from
==
"logout"
)
{
//来自用户登出
wx
.
removeStorage
({
...
...
@@ -91,7 +96,7 @@ export default {
}
else
if
(
options
.
from
&&
options
.
from
==
"address"
)
{
// 来自小程序地址页面
this
.
link
=
decodeURIComponent
(
options
.
backpath
);
console
.
log
(
'adress'
,
options
.
backpath
,
this
.
link
)
console
.
log
(
"adress"
,
options
.
backpath
,
this
.
link
);
this
.
page
=
""
;
this
.
params
=
""
;
}
else
if
(
options
.
from
==
"wxPay"
)
{
...
...
@@ -107,11 +112,18 @@ export default {
if
(
querys
[
0
]
==
"pid"
)
{
//商品详情 pid_123
this
.
page
=
`/goods/
${
querys
[
1
]}
`
;
}
else
if
(
querys
[
0
]
==
"activty"
)
{
//活动页面activty_turntable_123
this
.
params
+=
`&pageInfo=
${
scene
}
`
}
else
if
(
querys
[
0
]
==
"activty"
)
{
//活动页面activty_turntable_123
this
.
params
+=
`&pageInfo=
${
scene
}
`
;
}
else
if
(
querys
[
0
]
==
"spokesman"
)
{
//分销员 小程序码
this
.
page
=
`/personalCenter/spokesmanCenter`
;
this
.
params
+=
`&spokesmanGroupId=
${
querys
[
0
]}
&spokesmanShopId=
${
querys
[
1
]
}
&spokesmanRelId=
${
querys
[
2
]}
`
;
}
}
console
.
log
(
querys
,
'scene'
);
console
.
log
(
querys
,
"scene"
);
// var query = options.query.dentistId; // 参数二维码传递过来的场景参数
}
console
.
log
(
"url"
,
this
.
link
+
this
.
page
+
this
.
params
);
...
...
@@ -178,6 +190,8 @@ export default {
}
&spokesmanShopId=
${
this
.
spokesmanShopId
}
&spokesmanRelId=
${
this
.
spokesmanRelId
}
`
;
}
else
{
this
.
newHref
=
""
;
}
console
.
log
(
this
.
newHref
,
"this.newHrefthis.newHrefthis.newHref"
);
}
...
...
@@ -198,8 +212,8 @@ export default {
this
.
shareLogoUrl
=
DFSImg
(
res
.
target
.
data
[
len
].
shareLogoUrl
,
500
,
400
);
//分享内容中有订单信息为送礼活动
this
.
shareOrderSn
=
res
.
target
.
data
[
len
].
orderSn
;
this
.
shareTid
=
res
.
target
.
data
[
len
].
shareTid
;
this
.
shareTid
=
res
.
target
.
data
[
len
].
shareTid
;
console
.
log
(
"分享信息:"
,
this
.
shareLogoUrl
,
this
.
shareShopName
);
},
checkPageUrl
(
val
)
{
...
...
@@ -231,16 +245,25 @@ export default {
if
(
!
this
.
checkPageUrl
(
url
))
{
url
=
this
.
baseUrl
+
"?mixid="
+
this
.
shopId
;
}
console
.
log
(
"+++++"
,
this
.
shareOrderSn
);
//有订单为送礼
页面
//有订单为送礼
订单分享
if
(
this
.
shareOrderSn
!=
""
)
{
url
=
`
${
this
.
baseUrl
}
/activty/receivingGift?mixid=
${
this
.
shopId
}
&orderSn=
${
this
.
shareOrderSn
}
&shareTid=
${
this
.
shareTid
}
`
;
}
//分销员推广页面 默认分享分销员中心页面
if
(
url
.
indexOf
(
"/personalCenter/spokesmanCenter/mine/popularize"
)
>
-
1
)
{
url
=
`
${
this
.
baseUrl
}
/personalCenter/spokesmanCenter?mixid=
${
this
.
shopId
}
`
;
}
//增加分销员信息
this
.
newHref
=
`&spokesmanGroupId=
${
21
}
&spokesmanShopId=
${
48
}
&spokesmanRelId=
${
175
}
`
;
this
.
shareUrl
=
url
+
this
.
newHref
;
console
.
log
(
this
.
shareUrl
,
"index12"
);
...
...
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