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

预售商品获取数据

parent 6f4ed3e4
......@@ -45,7 +45,7 @@
<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" />
<view>
<text class="retail-price">零售价:¥{{ item.price }}/盒</text>
<text class="retail-price">零售价:¥{{ item.oriPrice }}/盒</text>
<text class="presale-price">预售价:¥{{ item.price }}/盒</text>
</view>
<view>
......@@ -57,8 +57,8 @@
width: 284rpx;
height: 128rpx;
float: right;
margin-top: -98rpx;
margin-right: 30rpx;
margin-top: -80rpx;
margin-right: 16rpx;
"
/>
</view>
......@@ -159,11 +159,7 @@ let sortData;
const light = ref(0);
const sortList = ref([]);
const tabsData = 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 buyList = ref([]);
const shopList = ref([
{ 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 = () => {
// 筑农首页-分类查询商品列表
const getPresaleProd = () => {
getPresaleProdList(params).then((res) => {
// res.data.forEach((item) => {
// item.imgUrl = import.meta.env.VITE_APP_IMG_URL + item.pic;
// });
// tabsData.value = res.data;
res.data.records.forEach((item) => {
item.img = import.meta.env.VITE_APP_IMG_URL + item.pic;
});
buyList.value = res.data.records;
});
};
// 左侧数据列表
......@@ -443,7 +439,6 @@ page {
color: #b3b3b3;
}
.presale-price {
left: 20rpx;
display: block;
margin-left: 60rpx;
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