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
11ab8998
Commit
11ab8998
authored
Aug 08, 2024
by
张娇(东信)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
接口联调
parent
06a3435b
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
54 additions
and
23 deletions
+54
-23
DepartureDate.vue
src/Components/assistingAgriculture/index/DepartureDate.vue
+2
-1
Search.vue
src/Components/assistingAgriculture/index/Search.vue
+1
-0
building.vue
src/pages/assistingAgriculture/index/building.vue
+32
-7
index.vue
src/pages/assistingAgriculture/index/index.vue
+12
-13
presale.vue
src/pages/assistingAgriculture/index/presale.vue
+7
-2
No files found.
src/Components/assistingAgriculture/index/DepartureDate.vue
View file @
11ab8998
...
...
@@ -10,13 +10,14 @@
>
{{
item
}}
</li>
<li>
选择日期
</li>
</ul>
</view>
</
template
>
<
script
setup
>
import
{
defineProps
}
from
'vue'
;
const
items
=
reactive
([
'
智能排序'
,
'距离优先'
,
'好评优先'
,
'销量优先'
,
'低价优先'
,
'低价优先
'
]);
const
items
=
reactive
([
'
日期不限'
,
'今天'
,
'明天'
,
'一周内'
,
'一月内'
,
'本周末'
,
'七夕节
'
]);
const
selectedItem
=
ref
(
null
);
const
props
=
defineProps
({
width
:
{
...
...
src/Components/assistingAgriculture/index/Search.vue
View file @
11ab8998
...
...
@@ -54,6 +54,7 @@ function back() {
padding-left
:
20rpx
;
padding-top
:
75rpx
;
box-sizing
:
border-box
;
z-index
:
999
;
.arrow
{
width
:
15rpx
;
height
:
24rpx
;
...
...
src/pages/assistingAgriculture/index/building.vue
View file @
11ab8998
...
...
@@ -112,8 +112,13 @@
<
script
setup
>
import
Search
from
'../../../components/assistingAgriculture/index/Search.vue'
;
import
{
getStrictSelection
}
from
'../../../api/assistingAgriculture/building'
;
import
{
getGoodSaleProdList
,
getPlatformProdList
,
getStrictSelection
,
}
from
'../../../api/assistingAgriculture/building'
;
import
{
onMounted
}
from
'vue'
;
import
{
useRoute
}
from
'vue-router'
;
const
current
=
ref
(
0
);
const
rightList
=
ref
([]);
const
light
=
ref
(
0
);
...
...
@@ -147,8 +152,21 @@ const detailList = ref([
const
choice
=
(
index
)
=>
{
light
.
value
=
index
;
};
const
params
=
{
current
:
1
,
size
:
10
,
};
const
router
=
useRoute
();
console
.
log
(
router
,
211
);
const
params1
=
{
current
:
1
,
size
:
10
,
categoryId
:
router
.
query
.
categoryId
,
};
onMounted
(
async
()
=>
{
getStrictSelectionList
();
getGoodSaleProd
();
platformProdList
();
});
// 筑农严选分类
const
getStrictSelectionList
=
()
=>
{
...
...
@@ -159,6 +177,19 @@ const getStrictSelectionList = () => {
rightList
.
value
=
res
.
data
.
splice
(
0
,
2
);
});
};
// 好货热卖
const
getGoodSaleProd
=
()
=>
{
getGoodSaleProdList
(
params
).
then
((
res
)
=>
{
console
.
log
(
res
,
123
);
});
};
// 筑农严选首页-分类查询商品列表
const
platformProdList
=
()
=>
{
getPlatformProdList
(
params1
).
then
((
res
)
=>
{
console
.
log
(
res
,
111
);
});
};
// 跳转预售
const
toPresale
=
(
id
)
=>
{
console
.
log
(
id
,
121
);
xma
.
navigateTo
({
...
...
@@ -171,12 +202,6 @@ function handleClick(e) {
function
onChange
(
e
)
{
console
.
log
(
e
);
}
// function toPresale() {
// // TODO: 跳转到预售
// xma.navigateTo({
// url: '/pages/assistingAgriculture/index/presale',
// });
// }
function
toDetail
()
{
// TODO: 跳转到详情页
xma
.
navigateTo
({
...
...
src/pages/assistingAgriculture/index/index.vue
View file @
11ab8998
...
...
@@ -23,7 +23,7 @@
<view
style=
"display: flex; flex-direction: row"
>
<view
class=
"borderClass"
@
click=
"toBuilding(i
ndex
)"
@
click=
"toBuilding(i
tem
)"
v-for=
"(item, index) in sortList"
:key=
"index"
>
...
...
@@ -62,7 +62,6 @@ import {
}
from
'../../../api/assistingAgriculture/building'
;
import
{
onMounted
,
ref
}
from
'vue'
;
import
{
groupImgList
}
from
'@/api'
;
const
list
=
ref
([]);
const
sortList
=
ref
([]);
const
swiperList
=
ref
([]);
...
...
@@ -90,6 +89,7 @@ onMounted(async () => {
getList
();
getPresaleCategoryList
();
getPresale
();
platformProdList
();
});
// 获取筑农专区分类;
const
getList
=
()
=>
{
...
...
@@ -126,26 +126,25 @@ const getPresale = () => {
});
});
};
const
onChange
=
(
e
)
=>
{
// console.log(e);
};
function
toBuilding
(
index
)
{
if
(
i
ndex
===
0
)
{
//
TODO:
跳转到筑农严选
const
toBuilding
=
(
item
)
=>
{
if
(
i
tem
.
categoryName
===
'筑农严选'
)
{
// 跳转到筑农严选
xma
.
navigateTo
({
url
:
'/pages/assistingAgriculture/index/building'
,
url
:
`/pages/assistingAgriculture/index/building?categoryId=
${
item
.
categoryId
}
`
,
});
}
else
if
(
index
===
1
)
{
console
.
log
(
111
);
}
else
if
(
index
===
2
)
{
// TODO: 跳转到乡村旅居
}
else
if
(
item
.
categoryName
===
'乡村旅居'
)
{
// 跳转到乡村旅居
xma
.
navigateTo
({
url
:
'/pages/assistingAgriculture/RuralTravel/RuralTravel'
,
url
:
`/pages/assistingAgriculture/RuralTravel/RuralTravel?categoryId=
${
item
.
categoryId
}
`
,
});
}
else
if
(
index
===
3
)
{
}
else
{
console
.
log
(
222
);
}
}
}
;
// 跳转详情页
function
toDetail
()
{
// TODO: 跳转到详情页
...
...
src/pages/assistingAgriculture/index/presale.vue
View file @
11ab8998
...
...
@@ -230,6 +230,11 @@ const goodList = ref([
},
]);
const
router
=
useRoute
();
const
params
=
{
current
:
1
,
size
:
10
,
categoryId
:
router
.
query
.
categoryId
,
};
onMounted
(
async
()
=>
{
getPresale
();
getPresaleProd
();
...
...
@@ -249,8 +254,8 @@ const getPresale = () => {
};
// 筑农首页-分类查询商品列表
const
getPresaleProd
=
()
=>
{
getPresaleProdList
(
router
.
query
).
then
((
res
)
=>
{
console
.
log
(
res
,
111
);
getPresaleProdList
(
params
).
then
((
res
)
=>
{
console
.
log
(
res
,
222
);
});
};
// 左侧数据列表
...
...
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