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

筑农严选页面接口联调

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