Commit a7336dbc authored by 刘玉宏's avatar 刘玉宏
parents 960952cc 3df7f883
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
"qrcode": "^1.5.3", "qrcode": "^1.5.3",
"vue": "^3.3.11", "vue": "^3.3.11",
"vue-i18n": "^9.1.9", "vue-i18n": "^9.1.9",
"vue-router": "^4.4.3",
"wot-design-uni": "^1.3.7" "wot-design-uni": "^1.3.7"
}, },
"devDependencies": { "devDependencies": {
......
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
"qrcode": "^1.5.3", "qrcode": "^1.5.3",
"vue": "^3.3.11", "vue": "^3.3.11",
"vue-i18n": "^9.1.9", "vue-i18n": "^9.1.9",
"vue-router": "^4.4.3",
"wot-design-uni": "^1.3.7" "wot-design-uni": "^1.3.7"
}, },
"devDependencies": { "devDependencies": {
......
...@@ -27,6 +27,14 @@ export function getStrictSelection(data) { ...@@ -27,6 +27,14 @@ export function getStrictSelection(data) {
}); });
} }
// 筑农预售分类
export function presaleList() {
return request({
url: '/sgyrdd/category/presaleList',
method: 'GET',
});
}
// 筑农严选首页-分类预售商品列表 // 筑农严选首页-分类预售商品列表
export function getPresaleCategory(data) { export function getPresaleCategory(data) {
return request({ return request({
......
...@@ -27,7 +27,8 @@ ...@@ -27,7 +27,8 @@
src="/static/assistingAgriculture/assets/culture.png" src="/static/assistingAgriculture/assets/culture.png"
style="width: 366rpx; height: 362rpx" style="width: 366rpx; height: 362rpx"
/> />
<view v-for="(item, index) in rightList" :key="index"> <view>
<view v-for="(item, index) in rightList" :key="index" @click="toPresale(item.categoryId)">
<img <img
class="right-sort" class="right-sort"
:src="item.icon" :src="item.icon"
...@@ -36,6 +37,7 @@ ...@@ -36,6 +37,7 @@
</view> </view>
</view> </view>
</view> </view>
</view>
<!-- 好货热卖--> <!-- 好货热卖-->
<view class="hot-sale"> <view class="hot-sale">
<view class="top-title"> <view class="top-title">
...@@ -157,18 +159,24 @@ const getStrictSelectionList = () => { ...@@ -157,18 +159,24 @@ const getStrictSelectionList = () => {
rightList.value = res.data.splice(0, 2); rightList.value = res.data.splice(0, 2);
}); });
}; };
const toPresale = (id) => {
console.log(id, 121);
xma.navigateTo({
url: `/pages/assistingAgriculture/index/presale?categoryId=${id}`,
});
};
function handleClick(e) { function handleClick(e) {
console.log(e); console.log(e);
} }
function onChange(e) { function onChange(e) {
console.log(e); console.log(e);
} }
function toPresale() { // function toPresale() {
// TODO: 跳转到预售 // // TODO: 跳转到预售
xma.navigateTo({ // xma.navigateTo({
url: '/pages/assistingAgriculture/index/presale', // url: '/pages/assistingAgriculture/index/presale',
}); // });
} // }
function toDetail() { function toDetail() {
// TODO: 跳转到详情页 // TODO: 跳转到详情页
xma.navigateTo({ xma.navigateTo({
...@@ -386,4 +394,23 @@ page { ...@@ -386,4 +394,23 @@ page {
width: 56rpx; width: 56rpx;
height: 56rpx; height: 56rpx;
} }
.container1 {
display: flex;
}
.left-box {
width: 33.33%;
background-color: lightblue;
}
.right-box {
width: 66.66%;
display: flex;
flex-direction: column;
}
.right-top-box {
height: 100%;
background-color: lightgreen;
}
</style> </style>
...@@ -59,7 +59,6 @@ import { ...@@ -59,7 +59,6 @@ import {
getPresaleCategory, getPresaleCategory,
getPresaleList, getPresaleList,
getSortList, getSortList,
getStrictSelection,
} from '../../../api/assistingAgriculture/building'; } from '../../../api/assistingAgriculture/building';
import { onMounted, ref } from 'vue'; import { onMounted, ref } from 'vue';
import { groupImgList } from '@/api'; import { groupImgList } from '@/api';
......
...@@ -143,8 +143,9 @@ ...@@ -143,8 +143,9 @@
<script setup> <script setup>
import Search from '../../../components/assistingAgriculture/index/Search.vue'; import Search from '../../../components/assistingAgriculture/index/Search.vue';
import { useRoute } from 'vue-router';
import { ref, onMounted } from 'vue'; import { ref, onMounted } from 'vue';
import { getPresaleList } from '../../../api/assistingAgriculture/building'; import { getPresaleList, getPresaleProdList } from '../../../api/assistingAgriculture/building';
const swiperList = ref([]); const swiperList = ref([]);
const current = ref(0); const current = ref(0);
// 轮播图数据 // 轮播图数据
...@@ -228,8 +229,10 @@ const goodList = ref([ ...@@ -228,8 +229,10 @@ const goodList = ref([
price: 69.9, price: 69.9,
}, },
]); ]);
const router = useRoute();
onMounted(async () => { onMounted(async () => {
getPresale(); getPresale();
getPresaleProd();
}); });
// 预售板块轮播图 // 预售板块轮播图
const getPresale = () => { const getPresale = () => {
...@@ -244,6 +247,12 @@ const getPresale = () => { ...@@ -244,6 +247,12 @@ const getPresale = () => {
}); });
}); });
}; };
// 筑农首页-分类查询商品列表
const getPresaleProd = () => {
getPresaleProdList(router.query).then((res) => {
console.log(res, 111);
});
};
// 左侧数据列表 // 左侧数据列表
const LeftList = ref([]); const LeftList = ref([]);
// 右侧数据列表 // 右侧数据列表
......
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