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
06ef6380
Commit
06ef6380
authored
Jan 18, 2024
by
李嘉林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
扫h5链接跳转小程序适配
parent
611d0c69
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
2 deletions
+21
-2
src/pages/index/index.vue
+21
-2
No files found.
src/pages/index/index.vue
View file @
06ef6380
...
@@ -73,7 +73,8 @@ export default {
...
@@ -73,7 +73,8 @@ export default {
// url添加门店信息参数
// url添加门店信息参数
let
{
offlineShopCode
,
offlineShopName
}
=
getStoreInfo
();
let
{
offlineShopCode
,
offlineShopName
}
=
getStoreInfo
();
console
.
log
(
offlineShopCode
,
'----index-offlineShopCode'
)
console
.
log
(
offlineShopCode
,
'----index-offlineShopCode'
)
if
(
offlineShopCode
&&
!
this
.
params
.
includes
(
"offlineShopCode"
))
{
// utm_source URL存在utm_source参数为扫h5链接跳转小程序适配直接进入不要拼接门店参数
if
(
offlineShopCode
&&
!
this
.
params
.
includes
(
"offlineShopCode"
)
&&
!
this
.
params
.
includes
(
"utm_source"
))
{
this
.
params
+=
`&offlineShopCode=
${
offlineShopCode
}
&offlineShopName=
${
offlineShopName
}
`
this
.
params
+=
`&offlineShopCode=
${
offlineShopCode
}
&offlineShopName=
${
offlineShopName
}
`
}
}
// 定位信息
// 定位信息
...
@@ -394,7 +395,7 @@ export default {
...
@@ -394,7 +395,7 @@ export default {
})
})
});
});
}
else
{
}
else
{
log
.
info
(
'老版本分享(下划线拼接参数)'
)
log
.
info
(
'老版本分享(下划线拼接参数)'
)
//来自扫码
//来自扫码
// options 中的scene需要使用decodeURIComponent才能获取到生成二维码时传入的scene
// options 中的scene需要使用decodeURIComponent才能获取到生成二维码时传入的scene
...
@@ -444,6 +445,24 @@ export default {
...
@@ -444,6 +445,24 @@ export default {
// var query = options.query.dentistId; // 参数二维码传递过来的场景参数
// var query = options.query.dentistId; // 参数二维码传递过来的场景参数
}
else
if
(
options
.
q
&&
options
.
scancode_time
)
{
// 扫h5链接跳转小程序适配
log
.
info
(
'扫h5链接跳转小程序适配'
,
options
);
console
.
log
(
'options.q'
,
decodeURIComponent
(
options
.
q
));
let
pageUrl
=
decodeURIComponent
(
options
.
q
);
let
page
=
pageUrl
.
split
(
'?'
)[
0
];
let
params
=
pageUrl
.
split
(
'?'
)[
1
];
if
(
page
)
{
this
.
page
=
page
;
}
if
(
params
)
{
if
(
params
.
includes
(
'mixid'
))
{
this
.
params
=
`?
${
params
}
&native_test=1&location_obj=
${
this
.
location_obj
}
`
;
}
else
{
this
.
params
+=
`&
${
params
}
`
;
}
}
}
}
this
.
newPageUrl
=
this
.
pageUrl
;
this
.
newPageUrl
=
this
.
pageUrl
;
console
.
log
(
'this.newPageUrl'
,
this
.
newPageUrl
)
console
.
log
(
'this.newPageUrl'
,
this
.
newPageUrl
)
...
...
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