Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
groupPurchase-miniapp
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
彭佳妮(贵阳日报)
groupPurchase-miniapp
Commits
7fe3fb06
Commit
7fe3fb06
authored
Aug 14, 2024
by
张娇(东信)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
搜索跳转
parent
ecfa5dfb
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
36 additions
and
13 deletions
+36
-13
RuralTravel.vue
src/pages/assistingAgriculture/RuralTravel/RuralTravel.vue
+1
-1
building.vue
src/pages/assistingAgriculture/index/building.vue
+1
-1
index.vue
src/pages/assistingAgriculture/index/index.vue
+1
-1
presale.vue
src/pages/assistingAgriculture/index/presale.vue
+1
-1
searchPage.vue
src/pages/assistingAgriculture/searchPage/searchPage.vue
+32
-9
No files found.
src/pages/assistingAgriculture/RuralTravel/RuralTravel.vue
View file @
7fe3fb06
...
...
@@ -302,7 +302,7 @@ const screenParams = (selectedItems, type) => {
// 搜索
// 搜索
const
toSearch
=
()
=>
{
xma
.
navigateTo
({
url
:
'/pages/assistingAgriculture/searchPage/searchPage?prodType=10'
});
xma
.
navigateTo
({
url
:
'/pages/assistingAgriculture/searchPage/searchPage?prodType
s
=10'
});
};
// 查询列表
...
...
src/pages/assistingAgriculture/index/building.vue
View file @
7fe3fb06
...
...
@@ -176,7 +176,7 @@ onMounted(async () => {
// 搜索
const
toSearch
=
()
=>
{
xma
.
navigateTo
({
url
:
'/pages/assistingAgriculture/searchPage/searchPage?prodType=7'
});
xma
.
navigateTo
({
url
:
'/pages/assistingAgriculture/searchPage/searchPage?prodType
s
=7'
});
};
// 获取购物车列表
const
getshoppingCartListFn
=
()
=>
{
...
...
src/pages/assistingAgriculture/index/index.vue
View file @
7fe3fb06
...
...
@@ -120,7 +120,7 @@ const getPresale = () => {
};
// 搜索
const
toSearch
=
()
=>
{
xma
.
navigateTo
({
url
:
'/pages/assistingAgriculture/searchPage/searchPage?prodType
=[7,10]
'
});
xma
.
navigateTo
({
url
:
'/pages/assistingAgriculture/searchPage/searchPage?prodType
s=7,10
'
});
};
const
onChange
=
(
e
)
=>
{
// console.log(e);
...
...
src/pages/assistingAgriculture/index/presale.vue
View file @
7fe3fb06
...
...
@@ -161,7 +161,7 @@ onMounted(async () => {
});
// 搜索
const
toSearch
=
()
=>
{
xma
.
navigateTo
({
url
:
'/pages/assistingAgriculture/searchPage/searchPage?prodType=7'
});
xma
.
navigateTo
({
url
:
'/pages/assistingAgriculture/searchPage/searchPage?prodType
s
=7'
});
};
// 获取购物车列表
const
getshoppingCartListFn
=
()
=>
{
...
...
src/pages/assistingAgriculture/searchPage/searchPage.vue
View file @
7fe3fb06
...
...
@@ -28,7 +28,12 @@
<block
v-for=
"(item, index) in tabs"
:key=
"index"
>
<wd-tab
:title=
"item"
>
<view
class=
"content1"
v-show=
"tab === 0"
>
<view
class=
"shopitem"
v-for=
"(item, index) in commoditys"
:key=
"index"
>
<view
class=
"shopitem"
v-for=
"(item, index) in commoditys"
:key=
"index"
@
tap=
"toDetail(item)"
>
<image
class=
"img"
:src=
"item.imgUrl"
mode=
"aspectFill"
/>
<view
class=
"middle"
>
<text
class=
"text"
>
{{
item
.
prodName
}}
</text>
...
...
@@ -61,9 +66,10 @@
</
template
>
<
script
setup
>
import
{
useRoute
}
from
'vue-router'
;
import
{
searchCommodity
,
searchBusiness
}
from
'@/api/assistingAgriculture/search'
;
const
tab
=
ref
(
0
);
const
tabs
=
ref
([
'商品'
,
'店铺'
]);
const
tabs
=
ref
([
'商品'
]);
const
value
=
ref
(
5
);
const
commoditys
=
ref
([]);
const
shops
=
ref
([]);
...
...
@@ -76,12 +82,15 @@ const back = () => {
delta
:
1
,
});
};
const
router
=
useRoute
();
// 搜索
const
toSearch
=
(
data
)
=>
{
const
keyword
=
data
.
detail
.
value
;
const
params
=
{
current
:
1
,
size
:
100
,
prodTypes
:
router
.
query
.
prodTypes
.
split
(
','
),
};
const
params2
=
{
current
:
1
,
...
...
@@ -96,15 +105,29 @@ const toSearch = (data) => {
});
commoditys
.
value
=
res
.
data
.
data
;
});
// 店铺搜索
params2
.
keyword
=
keyword
;
searchBusiness
(
params2
).
then
((
res
)
=>
{
res
.
data
.
content
.
forEach
((
item
)
=>
{
item
.
shopLogo
=
baseImgurl
+
item
.
shopLogo
;
// // 店铺搜索
// params2.keyword = keyword;
// searchBusiness(params2).then((res) => {
// res.data.content.forEach((item) => {
// item.shopLogo = baseImgurl + item.shopLogo;
// });
// shops.value = res.data.content;
// });
};
// 跳转详情
function
toDetail
(
item
)
{
if
(
item
.
prodType
===
'7'
)
{
// TODO: 跳转到筑农详情页
xma
.
navigateTo
({
url
:
`/pages/assistingAgriculture/detail/detail?prodId=
${
item
.
prodId
}
`
,
});
shops
.
value
=
res
.
data
.
content
;
}
else
if
(
item
.
prodType
===
'10'
)
{
// TODO: 跳转到旅居详情页
xma
.
navigateTo
({
url
:
`/pages/assistingAgriculture/RouteDetails/RouteDetails?shopId=
${
item
.
shopId
}
&prodId=
${
item
.
prodId
}
`
,
});
};
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
...
...
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