Commit ae29e1e2 authored by 张娇(东信)'s avatar 张娇(东信)

预售商品获取数据

parent 6f4ed3e4
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
<view class="tab-list" v-for="(item, index) in buyList" :key="index" @tap="toDetail"> <view class="tab-list" v-for="(item, index) in buyList" :key="index" @tap="toDetail">
<img class="buy-list" :src="item.img" style="width: 670rpx; height: 670rpx" /> <img class="buy-list" :src="item.img" style="width: 670rpx; height: 670rpx" />
<view> <view>
<text class="retail-price">零售价:¥{{ item.price }}/盒</text> <text class="retail-price">零售价:¥{{ item.oriPrice }}/盒</text>
<text class="presale-price">预售价:¥{{ item.price }}/盒</text> <text class="presale-price">预售价:¥{{ item.price }}/盒</text>
</view> </view>
<view> <view>
...@@ -57,8 +57,8 @@ ...@@ -57,8 +57,8 @@
width: 284rpx; width: 284rpx;
height: 128rpx; height: 128rpx;
float: right; float: right;
margin-top: -98rpx; margin-top: -80rpx;
margin-right: 30rpx; margin-right: 16rpx;
" "
/> />
</view> </view>
...@@ -159,11 +159,7 @@ let sortData; ...@@ -159,11 +159,7 @@ let sortData;
const light = ref(0); const light = ref(0);
const sortList = ref([]); const sortList = ref([]);
const tabsData = ref([]); const tabsData = ref([]);
const buyList = ref([ const buyList = ref([]);
{ img: '/static/assistingAgriculture/presale/buy.png', price: '29.9', text: '应季好物' },
{ img: '/static/assistingAgriculture/presale/buy.png', price: '29.9', text: '猪肉蛋禽' },
{ img: '/static/assistingAgriculture/presale/buy.png', price: '29.9', text: '米面粮油' },
]);
const shopList = ref([ const shopList = ref([
{ img: '/static/assistingAgriculture/presale/img7.png', price: '29.9', text: '应季好物' }, { img: '/static/assistingAgriculture/presale/img7.png', price: '29.9', text: '应季好物' },
{ img: '/static/assistingAgriculture/presale/img7.png', price: '29.9', text: '应季好物' }, { img: '/static/assistingAgriculture/presale/img7.png', price: '29.9', text: '应季好物' },
...@@ -272,10 +268,10 @@ const getStrictSelectionList = () => { ...@@ -272,10 +268,10 @@ const getStrictSelectionList = () => {
// 筑农首页-分类查询商品列表 // 筑农首页-分类查询商品列表
const getPresaleProd = () => { const getPresaleProd = () => {
getPresaleProdList(params).then((res) => { getPresaleProdList(params).then((res) => {
// res.data.forEach((item) => { res.data.records.forEach((item) => {
// item.imgUrl = import.meta.env.VITE_APP_IMG_URL + item.pic; item.img = import.meta.env.VITE_APP_IMG_URL + item.pic;
// }); });
// tabsData.value = res.data; buyList.value = res.data.records;
}); });
}; };
// 左侧数据列表 // 左侧数据列表
...@@ -443,7 +439,6 @@ page { ...@@ -443,7 +439,6 @@ page {
color: #b3b3b3; color: #b3b3b3;
} }
.presale-price { .presale-price {
left: 20rpx;
display: block; display: block;
margin-left: 60rpx; margin-left: 60rpx;
font-size: 30rpx; font-size: 30rpx;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment