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
b53be77f
Commit
b53be77f
authored
Aug 08, 2024
by
张娇(东信)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
预售分类接口数据获取
parent
29ff107f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
5 deletions
+22
-5
building.js
src/api/assistingAgriculture/building.js
+2
-1
building.vue
src/pages/assistingAgriculture/index/building.vue
+6
-3
presale.vue
src/pages/assistingAgriculture/index/presale.vue
+14
-1
No files found.
src/api/assistingAgriculture/building.js
View file @
b53be77f
...
@@ -28,10 +28,11 @@ export function getStrictSelection(data) {
...
@@ -28,10 +28,11 @@ export function getStrictSelection(data) {
}
}
// 筑农预售分类
// 筑农预售分类
export
function
presaleList
(
)
{
export
function
categoryPresaleList
(
data
)
{
return
request
({
return
request
({
url
:
'/sgyrdd/category/presaleList'
,
url
:
'/sgyrdd/category/presaleList'
,
method
:
'GET'
,
method
:
'GET'
,
data
,
});
});
}
}
...
...
src/pages/assistingAgriculture/index/building.vue
View file @
b53be77f
...
@@ -129,7 +129,6 @@ const swiperList = ref([
...
@@ -129,7 +129,6 @@ const swiperList = ref([
'../../../static/assistingAgriculture/assets/village.png'
,
'../../../static/assistingAgriculture/assets/village.png'
,
]);
]);
// 分类列表数据
// 分类列表数据
const
tabsList
=
ref
([]);
const
detailList
=
ref
([
const
detailList
=
ref
([
{
img
:
'/static/assistingAgriculture/assets/fruit.png'
,
price
:
'2555'
,
text
:
'这是草莓这是草莓'
},
{
img
:
'/static/assistingAgriculture/assets/fruit.png'
,
price
:
'2555'
,
text
:
'这是草莓这是草莓'
},
{
{
...
@@ -160,10 +159,14 @@ onMounted(async () => {
...
@@ -160,10 +159,14 @@ onMounted(async () => {
});
});
// 筑农严选分类
// 筑农严选分类
const
getStrictSelectionList
=
()
=>
{
const
getStrictSelectionList
=
()
=>
{
getStrictSelection
({
parentId
:
router
.
query
.
categoryId
}).
then
((
res
)
=>
{
getStrictSelection
().
then
((
res
)
=>
{
tabsList
.
value
=
res
.
data
;
res
.
data
.
forEach
((
item
)
=>
{
item
.
icon
=
import
.
meta
.
env
.
VITE_APP_IMG_URL
+
item
.
pic
;
});
rightList
.
value
=
res
.
data
.
splice
(
0
,
2
);
});
});
};
};
// 好货热卖
// 好货热卖
const
getGoodSaleProd
=
()
=>
{
const
getGoodSaleProd
=
()
=>
{
getGoodSaleProdList
(
params
).
then
((
res
)
=>
{});
getGoodSaleProdList
(
params
).
then
((
res
)
=>
{});
...
...
src/pages/assistingAgriculture/index/presale.vue
View file @
b53be77f
...
@@ -145,7 +145,11 @@
...
@@ -145,7 +145,11 @@
import
Search
from
'../../../components/assistingAgriculture/index/Search.vue'
;
import
Search
from
'../../../components/assistingAgriculture/index/Search.vue'
;
import
{
useRoute
}
from
'vue-router'
;
import
{
useRoute
}
from
'vue-router'
;
import
{
ref
,
onMounted
}
from
'vue'
;
import
{
ref
,
onMounted
}
from
'vue'
;
import
{
getPresaleList
,
getPresaleProdList
}
from
'../../../api/assistingAgriculture/building'
;
import
{
categoryPresaleList
,
getPresaleList
,
getPresaleProdList
,
}
from
'../../../api/assistingAgriculture/building'
;
const
swiperList
=
ref
([]);
const
swiperList
=
ref
([]);
const
current
=
ref
(
0
);
const
current
=
ref
(
0
);
// 轮播图数据
// 轮播图数据
...
@@ -235,9 +239,11 @@ const params = {
...
@@ -235,9 +239,11 @@ const params = {
size
:
10
,
size
:
10
,
categoryId
:
router
.
query
.
categoryId
,
categoryId
:
router
.
query
.
categoryId
,
};
};
const
tabsList
=
ref
([]);
onMounted
(
async
()
=>
{
onMounted
(
async
()
=>
{
getPresale
();
getPresale
();
getPresaleProd
();
getPresaleProd
();
presaleSortList
();
});
});
// 预售板块轮播图
// 预售板块轮播图
const
getPresale
=
()
=>
{
const
getPresale
=
()
=>
{
...
@@ -252,6 +258,13 @@ const getPresale = () => {
...
@@ -252,6 +258,13 @@ const getPresale = () => {
});
});
});
});
};
};
// 筑农预售分类
const
presaleSortList
=
()
=>
{
categoryPresaleList
({
level
:
1
}).
then
((
res
)
=>
{
console
.
log
(
res
,
111
);
tabsList
.
value
=
res
.
data
;
});
};
// 筑农首页-分类查询商品列表
// 筑农首页-分类查询商品列表
const
getPresaleProd
=
()
=>
{
const
getPresaleProd
=
()
=>
{
getPresaleProdList
(
params
).
then
((
res
)
=>
{
getPresaleProdList
(
params
).
then
((
res
)
=>
{
...
...
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