diff --git a/pages/canteenRent/rentDetail.vue b/pages/canteenRent/rentDetail.vue index 907e06e..408b895 100644 --- a/pages/canteenRent/rentDetail.vue +++ b/pages/canteenRent/rentDetail.vue @@ -1,9 +1,473 @@ \ No newline at end of file diff --git a/pages/canteenRent/rentList.vue b/pages/canteenRent/rentList.vue index 3909a94..45c6da7 100644 --- a/pages/canteenRent/rentList.vue +++ b/pages/canteenRent/rentList.vue @@ -9,7 +9,7 @@ + @confirm="searchRent" /> @@ -25,8 +25,11 @@ - - {{dictLabel || '标签'}} + + + {{dictLabel || '标签'}} @@ -41,48 +44,55 @@ - - - - - - - - - - - {{item.platform_title}} - - - - {{e}} - + + + + + + + + + + + + {{item.platform_title}} + + + + {{e}} + + - - - - - - - {{item.address_city_text}} - - {{item.release_time_text}} - - - {{item.views}} + + + + + + {{item.address_city_text}} + + + {{item.release_time_text}} + + + {{item.views}} + - + + @@ -164,7 +174,7 @@ const proCity = ref(''); //省市页面显示 function searchRent() { - console.log('搜索',listQuery.value.keywords); + console.log('搜索', listQuery.value.keywords); getList() } @@ -216,6 +226,7 @@ } const rentList = ref([]) + const rentCount = ref(0) //招租列表 async function getList() { const res = await sheep.$api.rent.rentlist({ @@ -232,7 +243,7 @@ if (res.data && res.data.list) { rentList.value = res.data.list; - + rentCount.value = res.data.count; // Safely process each item rentList.value = rentList.value.map(item => { // Create a new object with all properties from the original item @@ -256,8 +267,44 @@ // for(let i=0;i { + homrS.value = false; + uni.hideLoading(); + uni.stopPullDownRefresh(); + }, 2000) + } + // 重置列表 + function resetLists() { + listQuery.value.page = 1; + rentList.value = []; + // loadStatus.value = "loading"; + } + + function toDetail(e){ + console.log('跳转详情',e); + uni.navigateTo({ + url:'/pages/canteenRent/rentDetail?id=' + e.id + }) + } + \ No newline at end of file diff --git a/pages/user/goods-collect.vue b/pages/user/goods-collect.vue index e75a9a4..53dbd89 100644 --- a/pages/user/goods-collect.vue +++ b/pages/user/goods-collect.vue @@ -248,9 +248,9 @@ title: '加载中...' }); resetLists(); - if(currentTab.value == 0){ + if (currentTab.value == 0) { getRentList(); - }else { + } else { getSchoolList(); } setTimeout(() => { @@ -407,12 +407,8 @@ padding: 0 30rpx; display: grid; grid-template-columns: repeat(2, 1fr); - ; - grid-gap: 20px; - // display: flex; - // justify-content: center; - // align-items: center; - + grid-gap: 20rpx; + box-sizing: border-box; .list-item { width: 330rpx; diff --git a/sheep/api/rent.js b/sheep/api/rent.js index 2637460..2f6b8d8 100644 --- a/sheep/api/rent.js +++ b/sheep/api/rent.js @@ -21,14 +21,13 @@ export default { showLoading: false, }, }), - // detail: (id, user_coupon_id) => - // request({ - // url: 'coupon/detail', - // method: 'GET', - // params: { - // id: id, - // user_coupon_id, - // }, - // }), + rentInfo: (id) => + request({ + url: 'meal.information/detail', + method: 'GET', + params: { + id: id, + }, + }), }; \ No newline at end of file