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
c5bd8792
Commit
c5bd8792
authored
Mar 06, 2023
by
HouTiZhuo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
全网搜 bug 修复
parent
2c03ab4d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
11 deletions
+12
-11
src/pages/index/index.vue
+10
-9
static/nativeComponents/GoodsSearch/index.js
+2
-2
No files found.
src/pages/index/index.vue
View file @
c5bd8792
...
...
@@ -146,15 +146,16 @@ export default {
this
.
options
=
options
;
log
.
info
(
this
.
options
,
'----------------index-----options'
)
Object
.
assign
(
this
.
$data
,
this
.
$options
.
data
());
let
h5Params
=
options
&&
options
.
params
?
JSON
.
parse
(
decodeURIComponent
(
options
.
params
))
:
""
;
console
.
log
(
h5Params
,
'--h5Params'
)
if
(
h5Params
)
{
// 存储h5url门店信息
setStoreInfo
({
offlineShopCode
:
h5Params
.
offlineShopCode
,
offlineShopName
:
h5Params
.
offlineShopName
,
});
}
try
{
const
h5Params
=
options
&&
options
.
params
?
JSON
.
parse
(
decodeURIComponent
(
options
.
params
))
:
""
;
if
(
h5Params
)
{
// 存储h5url门店信息
setStoreInfo
({
offlineShopCode
:
h5Params
.
offlineShopCode
,
offlineShopName
:
h5Params
.
offlineShopName
,
});
}
}
catch
(
e
)
{
console
.
log
(
e
)
}
if
(
wx
.
getStorageSync
(
"workBox"
)){
this
.
params
+=
`&workBox=
${
wx
.
getStorageSync
(
"workBox"
)}
`
}
...
...
static/nativeComponents/GoodsSearch/index.js
View file @
c5bd8792
...
...
@@ -52,13 +52,13 @@ Component({
let
query
=
`?placeHolderText=
${
placeHolderText
}
`
;
if
(
this
.
data
.
datas
.
componentData
[
'searchModel'
]
==
1
)
{
query
+=
`&searchScopeFlag=
${
this
.
data
.
searchScopeFlag
}
`
;
// 重置默认全网搜
this
.
setData
({
searchScopeFlag
:
0
});
}
let
link
=
`/contentSearch/contentSearch
${
query
}
`
;
if
(
this
.
data
.
datas
.
componentData
[
'searchModel'
]
==
1
&&
this
.
data
.
searchScopeFlag
==
0
)
{
link
=
`/goodsSearch/searchAllGoods
${
query
}
`
;
}
// 重置默认全网搜
this
.
setData
({
searchScopeFlag
:
0
});
app
.
$themeToLink
({
type
:
1
,
link
});
},
// 本店搜
...
...
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