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
a22d39c0
Commit
a22d39c0
authored
Aug 07, 2024
by
张娇(东信)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
首页数据获取
parent
48654f07
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
109 deletions
+15
-109
index.vue
src/pages/assistingAgriculture/index/index.vue
+15
-109
No files found.
src/pages/assistingAgriculture/index/index.vue
View file @
a22d39c0
...
...
@@ -37,105 +37,14 @@
</view>
</view>
</view>
<view
class=
"product-page"
>
<view>
<view
class=
"page-title"
>
特色美食
</view>
<img
src=
"/static/assistingAgriculture/assets/mainPicture.png"
class=
"main-img"
/>
<view
style=
"display: flex; flex-direction: row"
>
<view
class=
"detail-border"
>
<img
src=
"/static/assistingAgriculture/assets/detailedMapOne.png"
style=
"width: 216rpx; height: 176rpx"
/>
<view
class=
"detail-title"
>
干辣椒炒肉
</view>
<view
class=
"jiage-page"
>
<text
class=
"jiage"
>
¥25
</text>
/份
</view>
<view
class=
"yushou"
>
预售
</view>
</view>
<view
class=
"detail-border"
>
<img
src=
"/static/assistingAgriculture/assets/detailedMapOne.png"
style=
"width: 216rpx; height: 176rpx"
/>
<view
class=
"detail-title"
>
贵阳辣子鸡
</view>
<view
class=
"jiage-page"
>
<text
class=
"jiage"
>
¥25
</text>
/份
</view>
<view
class=
"yushou"
>
预售
</view>
</view>
<view
class=
"detail-border"
>
<img
src=
"/static/assistingAgriculture/assets/detailedMapOne.png"
style=
"width: 216rpx; height: 176rpx"
/>
<view
class=
"detail-title"
>
麻辣鱼豆腐
</view>
<view
class=
"jiage-page"
>
<text
class=
"jiage"
>
¥25
</text>
/份
</view>
<view
class=
"yushou"
>
预售
</view>
</view>
</view>
</view>
</view>
<view
class=
"product-page"
@
tap=
"toDetail"
>
<view>
<view
class=
"page-title"
>
农货预售
</view>
<img
src=
"/static/assistingAgriculture/assets/img4.png"
class=
"main-img"
/>
<view
style=
"display: flex; flex-direction: row"
>
<view
class=
"detail-border"
>
<img
src=
"/static/assistingAgriculture/assets/img1.png"
style=
"width: 216rpx; height: 176rpx"
/>
<view
class=
"detail-title"
>
这是农村种的土豆
</view>
<view
class=
"jiage-page"
>
<text
class=
"jiage"
>
¥25
</text>
/份
</view>
<view
class=
"yushou"
>
预售
</view>
</view>
<view
class=
"detail-border"
>
<img
src=
"/static/assistingAgriculture/assets/img2.png"
style=
"width: 216rpx; height: 176rpx"
/>
<view
class=
"detail-title"
>
这是农村玉米
</view>
<view
class=
"jiage-page"
>
<text
class=
"jiage"
>
¥25
</text>
/份
</view>
<view
class=
"yushou"
>
预售
</view>
</view>
<view
class=
"detail-border"
>
<img
src=
"/static/assistingAgriculture/assets/img3.png"
style=
"width: 216rpx; height: 176rpx"
/>
<view
class=
"detail-title"
>
这是农村中的猕猴桃
</view>
<view
class=
"jiage-page"
>
<text
class=
"jiage"
>
¥25
</text>
/份
</view>
<view
class=
"yushou"
>
预售
</view>
</view>
</view>
</view>
</view>
<view
class=
"product-page"
v-for=
"(item, index) in list"
:key=
"index"
>
<view>
<view
class=
"page-title"
>
{{
item
.
text
}}
</view>
<view
class=
"page-title"
>
{{
item
.
categoryName
}}
</view>
<img
:src=
"item.img"
class=
"main-img"
/>
<view
style=
"display: flex; flex-direction: row"
>
<view
class=
"detail-border"
v-for=
"(item, index) in detailList"
:key=
"index"
>
<img
src=
"/static/assistingAgriculture/assets/detailedMapOne.png"
style=
"width: 216rpx; height: 176rpx"
/>
<view
class=
"detail-title"
>
{{
item
.
text
}}
</view>
<view
class=
"detail-border"
v-for=
"(item, index) in item.commodityList"
:key=
"index"
>
<img
:src=
"item.commodityImg"
style=
"width: 216rpx; height: 176rpx"
/>
<view
class=
"detail-title"
>
{{
item
.
prodName
}}
</view>
<view
class=
"jiage-page"
>
<text
class=
"jiage"
>
¥
{{
item
.
price
}}
</text>
/份
...
...
@@ -157,14 +66,7 @@ import {
getStrictSelection
,
}
from
'../../../api/assistingAgriculture/building'
;
import
{
onMounted
}
from
'vue'
;
const
list
=
ref
([
// // { img: '/static/assistingAgriculture/assets/mainPicture.png', text: '特色美食' },
// // { img: '/static/assistingAgriculture/assets/presale.png', text: '农货预售' },
{
img
:
'/static/assistingAgriculture/assets/mainPicture.png'
,
text
:
'乡村非遗'
},
{
img
:
'/static/assistingAgriculture/assets/mainPicture.png'
,
text
:
'认养农业'
},
{
img
:
'/static/assistingAgriculture/assets/mainPicture.png'
,
text
:
'乡村旅居'
},
{
img
:
'/static/assistingAgriculture/assets/mainPicture.png'
,
text
:
'特色农庄'
},
]);
const
list
=
ref
([]);
const
detailList
=
ref
([
{
img
:
'/static/assistingAgriculture/assets/detailedMapOne.png'
,
...
...
@@ -191,19 +93,24 @@ onMounted(async () => {
// 获取筑农专区分类;
const
getList
=
()
=>
{
getSortList
().
then
((
res
)
=>
{
console
.
log
(
res
,
111
);
res
.
data
.
forEach
((
item
)
=>
{
item
.
icon
=
import
.
meta
.
env
.
VITE_APP_IMG_URL
+
item
.
icon
;
item
.
pic
=
import
.
meta
.
env
.
VITE_APP_IMG_URL
+
item
.
pic
;
item
.
icon
=
import
.
meta
.
env
.
VITE_APP_IMG_URL
+
item
.
pic
;
});
sortList
.
value
=
res
.
data
.
splice
(
0
,
4
);
console
.
log
(
list
.
value
,
111
);
});
};
// 筑农严选首页-分类预售商品列表
const
getPresaleCategoryList
=
()
=>
{
getPresaleCategory
().
then
((
res
)
=>
{
console
.
log
(
res
,
222
);
res
.
data
.
forEach
((
item
)
=>
{
item
.
img
=
import
.
meta
.
env
.
VITE_APP_IMG_URL
+
item
.
pic
;
item
.
commodityList
=
item
.
prodSimples
;
item
.
commodityList
.
forEach
((
item
)
=>
{
item
.
commodityImg
=
import
.
meta
.
env
.
VITE_APP_IMG_URL
+
item
.
pic
;
console
.
log
(
item
.
commodityImg
,
111
);
});
});
list
.
value
=
res
.
data
;
});
};
// 筑农严选分类
...
...
@@ -340,7 +247,6 @@ page {
text-overflow
:
ellipsis
;
}
.jiage-page
{
width
:
96rpx
;
height
:
28rpx
;
margin-top
:
20rpx
;
font-size
:
24rpx
;
...
...
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