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
d30c36ea
Commit
d30c36ea
authored
Jul 13, 2021
by
李嘉林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
积分抽奖分享
parent
24a1aaa4
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
1 deletions
+26
-1
src/pages/index/index.vue
+26
-1
No files found.
src/pages/index/index.vue
View file @
d30c36ea
...
@@ -468,7 +468,30 @@ export default {
...
@@ -468,7 +468,30 @@ export default {
}
}
return
params
;
return
params
;
},
delParam
(
oldUrl
,
paramKey
)
{
var
url
=
oldUrl
;
//页面url
var
urlParam
=
oldUrl
.
split
(
"?"
)[
1
];
//页面参数
var
beforeUrl
=
url
.
substr
(
0
,
url
.
indexOf
(
"?"
));
//页面主地址(参数之前地址)
var
nextUrl
=
""
;
var
arr
=
new
Array
();
if
(
urlParam
!=
""
)
{
var
urlParamArr
=
urlParam
.
split
(
"&"
);
//将参数按照&符分成数组
for
(
var
i
=
0
;
i
<
urlParamArr
.
length
;
i
++
)
{
var
paramArr
=
urlParamArr
[
i
].
split
(
"="
);
//将参数键,值拆开
//如果键雨要删除的不一致,则加入到参数中
if
(
paramArr
[
0
]
!=
paramKey
)
{
arr
.
push
(
urlParamArr
[
i
]);
}
}
}
}
if
(
arr
.
length
>
0
)
{
nextUrl
=
"?"
+
arr
.
join
(
"&"
);
}
url
=
beforeUrl
+
nextUrl
;
return
url
;
},
},
},
onUnload
()
{
onUnload
()
{
console
.
log
(
"卸载----------------"
,
this
.
options
);
console
.
log
(
"卸载----------------"
,
this
.
options
);
...
@@ -485,7 +508,9 @@ export default {
...
@@ -485,7 +508,9 @@ export default {
}
}
//分享页面去掉登录态
//分享页面去掉登录态
if
(
url
.
indexOf
(
"sessionid"
)
>
-
1
)
{
if
(
url
.
indexOf
(
"sessionid"
)
>
-
1
)
{
url
=
url
.
split
(
"?"
)[
0
]
+
"?mixid="
+
this
.
shopId
;
// url = url.split("?")[0] + "?mixid=" + this.shopId;
url
=
this
.
delParam
(
this
.
newWindowHref
,
'sessionid'
)
url
=
this
.
delParam
(
url
,
'open_id'
)
}
}
//分销员推广页面 默认分享分销员中心页面
//分销员推广页面 默认分享分销员中心页面
if
(
url
.
indexOf
(
"/personalCenter/spokesmanCenter/mine/popularize"
)
>
-
1
)
{
if
(
url
.
indexOf
(
"/personalCenter/spokesmanCenter/mine/popularize"
)
>
-
1
)
{
...
...
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