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

筑农严选页面接口联调

parent 9f1da310
......@@ -27,17 +27,11 @@
src="/static/assistingAgriculture/assets/culture.png"
style="width: 366rpx; height: 362rpx"
/>
<view class="right-img">
<view v-for="(item, index) in rightList" :key="index">
<img
class="delicacy"
src="/static/assistingAgriculture/assets/delicacy.png"
style="height: 176rpx; margin-left: 8rpx"
/>
<img
@tap="toPresale"
class="fresh"
src="/static/assistingAgriculture/assets/fresh.png"
style="height: 176rpx; margin-left: 8rpx"
class="right-sort"
:src="item.icon"
style="width: 336rpx; height: 176rpx; margin-left: 8rpx"
/>
</view>
</view>
......@@ -116,7 +110,10 @@
<script setup>
import Search from '../../../components/assistingAgriculture/index/Search.vue';
import { getStrictSelection } from '../../../api/assistingAgriculture/building';
import { onMounted } from 'vue';
const current = ref(0);
const rightList = ref([]);
const light = ref(0);
// 轮播图
const swiperList = ref([
......@@ -148,6 +145,18 @@ const detailList = ref([
const choice = (index) => {
light.value = index;
};
onMounted(async () => {
getStrictSelectionList();
});
// 筑农严选分类
const getStrictSelectionList = () => {
getStrictSelection().then((res) => {
res.data.forEach((item) => {
item.icon = import.meta.env.VITE_APP_IMG_URL + item.pic;
});
rightList.value = res.data.splice(0, 2);
});
};
function handleClick(e) {
console.log(e);
}
......
......@@ -90,7 +90,6 @@ const detailList = ref([
onMounted(async () => {
getList();
getPresaleCategoryList();
getStrictSelectionList();
getPresale();
});
// 获取筑农专区分类;
......@@ -115,10 +114,6 @@ const getPresaleCategoryList = () => {
list.value = res.data;
});
};
// 筑农严选分类
const getStrictSelectionList = () => {
getStrictSelection().then((res) => {});
};
// 预售板块轮播图
const getPresale = () => {
getPresaleList({ place: 'index_top' }).then((res) => {
......
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