From 5542dcdd1567da5e85e3b38fc21a76b606840a56 Mon Sep 17 00:00:00 2001 From: wangzimeng <3297159934@qq.com> Date: Tue, 5 Aug 2025 10:49:40 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E5=8F=96=E6=B6=88=E5=8F=91=E5=B8=83?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E9=A1=B5=E9=9D=A2=E7=9A=84=E4=B8=8B=E6=8B=89?= =?UTF-8?q?=E5=88=B7=E6=96=B0=202=E3=80=81=E6=90=9C=E7=B4=A2=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E7=9A=84=E5=AE=8C=E5=96=84=203=E3=80=81=E6=8B=9B?= =?UTF-8?q?=E7=A7=9F=E8=AF=A6=E6=83=85=E7=9A=84=E6=9F=A5=E7=9C=8B=E8=BF=87?= =?UTF-8?q?=E7=9A=84=E4=BA=BA=E6=95=B0=E5=92=8C=E5=9B=BE=E6=A0=87=E5=B1=85?= =?UTF-8?q?=E4=B8=AD=E5=AF=B9=E9=BD=90=204=E3=80=81=E6=8B=9B=E7=A7=9F?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E7=9A=84=E6=9F=A5=E7=9C=8B=E8=BF=87=E7=9A=84?= =?UTF-8?q?=E4=BA=BA=E6=95=B0=E5=92=8C=E5=9B=BE=E6=A0=87=E5=B1=85=E4=B8=AD?= =?UTF-8?q?=E5=AF=B9=E9=BD=90=EF=BC=9B=E9=A1=B6=E9=83=A8=E7=9A=84=E6=90=9C?= =?UTF-8?q?=E7=B4=A0=E6=A1=86=E7=9A=84=E5=AE=BD=E5=BA=A6=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=205=E3=80=81=E4=BC=98=E6=83=A0=E5=88=B8=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E7=9A=84scroll-view=E7=9A=84=E9=AB=98=E5=BA=A6=E7=9A=84?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E4=B8=BA85vh=EF=BC=9B=206=E3=80=81=E9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6=B3=E8=BF=B9?= =?UTF-8?q?=E7=9A=84=E5=88=97=E8=A1=A8=E5=B1=95=E7=A4=BA=E7=9A=84=E6=97=B6?= =?UTF-8?q?=E9=97=B4=E5=8F=AA=E5=8F=96=E5=B9=B4=E6=9C=88=E6=97=A5=2012?= =?UTF-8?q?=E3=80=81=E6=88=91=E5=8F=91=E5=B8=83=E7=9A=84=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E7=9A=84scroll-view=E7=9A=84=E9=AB=98=E5=BA=A6=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E4=B8=BA85vh=2012=E3=80=81su-navbar=E7=9A=84=E9=A1=B6?= =?UTF-8?q?=E9=83=A8=E7=9A=84=E7=AB=96=E7=BA=BF=E9=A2=9C=E8=89=B2=E6=94=B9?= =?UTF-8?q?=E4=B8=BA#3d3d3d?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packageA/search/index.vue | 501 +++++++++++++++++++++++++++++-- pages.json | 3 +- pages/canteenRent/rentDetail.vue | 157 +++++----- pages/canteenRent/rentList.vue | 11 +- pages/coupon/list.vue | 2 +- pages/index/fabu.vue | 3 +- pages/index/index.vue | 8 +- pages/index/user.vue | 7 +- pages/school/classesDetail.vue | 18 +- pages/school/schoolIndex.vue | 4 +- pages/user/goods-collect.vue | 12 +- pages/user/goods-log.vue | 12 +- pages/user/myRelease/list.vue | 2 +- sheep/ui/su-navbar/su-navbar.vue | 3 +- 14 files changed, 620 insertions(+), 123 deletions(-) diff --git a/packageA/search/index.vue b/packageA/search/index.vue index 826b15c..411ad3a 100644 --- a/packageA/search/index.vue +++ b/packageA/search/index.vue @@ -2,10 +2,149 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{item.platform_title}} + + + + {{e}} + + + + + + + + + + {{item.address_city_text}} + + + {{item.release_time_text}} + + + {{item.views}} + + + + + + + + + + + + + + + + + + + {{item.title}} + + {{item.release_time_text}} + + + + {{item.views}} + + + + + + + + + + + + + + + + + + + {{item.title}} + + {{item.release_time_text}} + + + + {{item.views}} + + + + + + + + + + + + + + @@ -21,7 +160,7 @@ onReachBottom } from '@dcloudio/uni-app'; import _ from 'lodash'; - + // const const tabMaps = [{ name: '食堂招租', @@ -51,8 +190,10 @@ type: null, my: null, page: 1, + list_rows: 10, rentPage: 1, schoolPage: 1, + mallPage: 1, limit: 10, cate_ids: '', province: null, @@ -71,18 +212,50 @@ function onChange(e) { console.log('onChange', e); currentTab.value = e.index - console.log('切换tabs', currentTab.value); + console.log('切换tabs', currentTab.value,listQuery.value.keywords); + if(listQuery.value.keywords != null) { + if (currentTab.value == 0) { + collectRentList.value = []; + getRentList(); + } else if (currentTab.value == 1) { + collectSchoolList.value = []; + getSchoolList(); + } else { + getGoods(); + } + } + } + + function search(e) { + console.log('搜索', e.value); if (currentTab.value == 0) { collectRentList.value = []; getRentList(); - } else if(currentTab.value == 1){ + } else if (currentTab.value == 1) { collectSchoolList.value = []; getSchoolList(); - }else { - + } else { + getGoods(); } } - + + //商品 + function getGoods() { + console.log('商品', listQuery.value.keywords); + // const listQuery = + sheep.$api.goods.list({ + page: listQuery.value.mallPage, + list_rows: listQuery.value.list_rows, + keyword: listQuery.value.keywords, + }).then((res) => { + if (res.code == 1) { + console.log('商品搜素列表:', res.data); + mallList.value = res.data.data + mallCount.value = res.data.total + } + }) + } + //招租列表 async function getRentList() { const res = await sheep.$api.rent.rentlist({ @@ -93,7 +266,7 @@ status: 1, }); console.log('招租收藏列表', res); - + if (res.code == 1) { collectRentList.value = [...collectRentList.value, ...res.data.list]; rentCount.value = res.data.count @@ -114,10 +287,9 @@ page: listQuery.value.schoolPage, limit: listQuery.value.limit, order: 'normal', - status: 1, }); console.log('平台课程收藏列表', res); - + if (res.code == 1) { collectSchoolList.value = [...collectSchoolList.value, ...res.data.list]; schoolCount.value = res.data.count @@ -131,7 +303,7 @@ } console.log('平台课程收藏列表-222', collectSchoolList.value); } - + //加载更多 function onScrolltolower() { if (currentTab.value == 0) { @@ -139,26 +311,27 @@ listQuery.value.rentPage += 1; getRentList(); } - } else { + } else if(currentTab.value == 1) { if (collectSchoolList.value.length < schoolCount.value) { listQuery.value.schoolPage += 1; getSchoolList(); } + }else { + if (mallList.value.length < mallCount.value) { + listQuery.value.mallPage += 1; + getGoods(); + } } - + } //下拉刷新 function onS() { - homrS.value = true + homrS.value = true; + listQuery.value.keywords = '' uni.showLoading({ title: '加载中...' }); resetLists(); - if (currentTab.value == 0) { - getRentList(); - } else { - getSchoolList(); - } setTimeout(() => { homrS.value = false; uni.hideLoading(); @@ -171,20 +344,300 @@ listQuery.value.rentPage = 1; collectRentList.value = []; loadStatus.value = "loading"; - } else { + getRentList(); + } else if(currentTab.value == 1) { listQuery.value.schoolPage = 1; collectSchoolList.value = []; loadStatus.value = "loading"; + getSchoolList(); + }else { + listQuery.value.mallPage = 1; + mallList.value = []; + loadStatus.value = "loading"; + getGoods(); } } - - - \ No newline at end of file diff --git a/pages.json b/pages.json index 5071eec..0207575 100644 --- a/pages.json +++ b/pages.json @@ -23,8 +23,7 @@ { "path": "pages/index/fabu", "style": { - "navigationBarTitleText": "发布信息", - "enablePullDownRefresh": true + "navigationBarTitleText": "发布信息" }, "meta": { "sync": true, diff --git a/pages/canteenRent/rentDetail.vue b/pages/canteenRent/rentDetail.vue index 33ba1ba..3e069d6 100644 --- a/pages/canteenRent/rentDetail.vue +++ b/pages/canteenRent/rentDetail.vue @@ -51,8 +51,8 @@ 项目类型: {{detailRent.type_text}} - - + + {{detailRent.views}} @@ -106,7 +106,7 @@ 收藏 - + 客服 @@ -116,27 +116,35 @@ - + - - 确认拨号 - 剩余联系次数:{{detailRent.all_mobile_num}} + + + 确认拨号 + + 剩余联系次数:{{detailRent.all_mobile_num}} - 取消 - 确定 + 取消 + 确定 - + - - 非常抱歉 - 你的联系次数不足请前往积分商城兑换 + + + 非常抱歉 + 你的联系次数不足请前往积分商城兑换 + 取消 @@ -144,7 +152,7 @@ - + @@ -169,7 +177,9 @@ } from '@/sheep/validate/form'; import rent from '../../sheep/api/rent'; import sheep from '@/sheep'; - import { showShareModal } from '@/sheep/hooks/useModal'; + import { + showShareModal + } from '@/sheep/hooks/useModal'; const rentId = ref(''); const detailRent = ref('') @@ -184,7 +194,7 @@ // getDetail(); // } }) - + onShow(() => { if (rentId.value) { getDetail(); @@ -197,11 +207,11 @@ if (res.code == 1) { detailRent.value = res.data.detail detailRent.value.release_time_text = detailRent.value.release_time_text.substring(0, 10); - + const imageList = res.data.detail.images - console.log('imageList:',imageList.length); + console.log('imageList:', imageList.length); imagesNum.value = imageList.length - console.log('imagesNum:',imagesNum.value); + console.log('imagesNum:', imagesNum.value); } else { uni.showToast({ title: res.msg, @@ -209,76 +219,76 @@ }) } } - + //返回首页 function backHome() { uni.switchTab({ url: '/pages/index/index' }) } - + //页面跳转 const toPage = (e) => { uni.navigateTo({ url: e }) } - + //收藏 function handleColect() { - console.log('收藏',detailRent.value.is_collect); - if(detailRent.value.is_collect == 1) { + console.log('收藏', detailRent.value.is_collect); + if (detailRent.value.is_collect == 1) { detailRent.value.is_collect = 0 const data = { id: detailRent.value.id, is_collect: detailRent.value.is_collect } sheep.$api.rent.rentCollect(data).then((res) => { - if(res.code == 1) { + if (res.code == 1) { uni.showToast({ - title:'已取消收藏', - icon:'none', + title: '已取消收藏', + icon: 'none', duration: 2000 }) - setTimeout(() =>{ + setTimeout(() => { getDetail() - },1000) + }, 1000) // getDetail() } }) - - - }else { + + + } else { detailRent.value.is_collect = 1 const data1 = { id: detailRent.value.id, is_collect: detailRent.value.is_collect } sheep.$api.rent.rentCollect(data1).then((res) => { - if(res.code == 1) { + if (res.code == 1) { uni.showToast({ - title:'已收藏', - icon:'none', + title: '已收藏', + icon: 'none', duration: 2000 }) - setTimeout(() =>{ + setTimeout(() => { getDetail() - },1000) + }, 1000) // getDetail() } }) - + } - - + + } - + //是否拨打电话的次数 function handleJuage() { - console.log('拨打电话次数:',detailRent.value.all_mobile_num); - if(detailRent.value.all_mobile_num > 0){ + console.log('拨打电话次数:', detailRent.value.all_mobile_num); + if (detailRent.value.all_mobile_num > 0) { showContacted.value = true - }else { + } else { showContactNo.value = true } } @@ -286,22 +296,22 @@ //确定拨打电话 async function handleTell() { const res = await sheep.$api.rent.getPhoneNum({ - id:rentId.value + id: rentId.value }) - console.log('获取电话',res); - if(res.code == 1) { + console.log('获取电话', res); + if (res.code == 1) { phoneTell.value = res.data.contact_number showContacted.value = false wx.makePhoneCall({ - phoneNumber: phoneTell.value, - success: function() { - console.log("拨打电话成功") - - }, - fail: function(err) { - console.log("拨打电话失败", err) - } - }) + phoneNumber: phoneTell.value, + success: function() { + console.log("拨打电话成功") + + }, + fail: function(err) { + console.log("拨打电话失败", err) + } + }) } } //去兑换拨号次数 @@ -311,7 +321,21 @@ url: '/pages/app/score-shop' }) } - + + //联系平台客服 + function handleService() { + console.log('联系平台客服',detailRent.value.platform_contact_number); + wx.makePhoneCall({ + phoneNumber: detailRent.value.platform_contact_number, + success: function() { + console.log("拨打电话成功") + + }, + fail: function(err) { + console.log("拨打电话失败", err) + } + }) + } \ No newline at end of file diff --git a/pages/canteenRent/rentList.vue b/pages/canteenRent/rentList.vue index 5e61dac..0d6e987 100644 --- a/pages/canteenRent/rentList.vue +++ b/pages/canteenRent/rentList.vue @@ -66,11 +66,6 @@ {{e}} - - @@ -81,7 +76,7 @@ {{item.release_time_text}} - + {{item.views}} @@ -174,6 +169,7 @@ const proCity = ref(''); //省市页面显示 function searchRent() { + rentList.value = [] console.log('搜索', listQuery.value.keywords); getList() } @@ -386,7 +382,7 @@ } .locTop-right { - width: 330rpx; + width: 350rpx; height: 70rpx; } @@ -465,6 +461,7 @@ .cons-third { margin-top: 20rpx; + width: 430rpx; display: flex; justify-content: space-between; align-items: center; diff --git a/pages/coupon/list.vue b/pages/coupon/list.vue index aa0e34e..7d312a1 100644 --- a/pages/coupon/list.vue +++ b/pages/coupon/list.vue @@ -10,7 +10,7 @@ + style="height: 85vh;box-sizing: border-box;margin-top: 30rpx;"> diff --git a/pages/index/fabu.vue b/pages/index/fabu.vue index 8711041..a40c01f 100644 --- a/pages/index/fabu.vue +++ b/pages/index/fabu.vue @@ -901,10 +901,9 @@ width: 750rpx; height: 200rpx; background: #FFFFFF; - // box-shadow: 0rpx -6rpx 12rpx 0rpx rgba(111, 190, 255, 0.1); border-radius: 0rpx 0rpx 0rpx 0rpx; - bottom: 0; position: fixed; + bottom: 0; z-index: 10; .btns { diff --git a/pages/index/index.vue b/pages/index/index.vue index 50dbb29..0d08754 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -237,7 +237,8 @@ if(state.model.province_name == state.model.city_name) { proCity.value = state.model.province_name }else { - proCity.value = state.model.province_name + " " + state.model.city_name + // proCity.value = state.model.province_name + " " + state.model.city_name + proCity.value = state.model.province_name + state.model.city_name } // proCity.value = state.model.province_name + " " + state.model.city_name @@ -347,7 +348,7 @@ const res = await sheep.$api.rent.rentlist({ keywords: listQuery.value.keywords, page: listQuery.value.page, - limit: listQuery.value.limit, + limit: 25, cate_ids: listQuery.value.cate_ids, order: 'normal', status: 1, @@ -632,8 +633,9 @@ .cons-third { margin-top: 20rpx; + width: 430rpx; display: flex; - justify-content: space-around; + justify-content: space-between; align-items: center; } } diff --git a/pages/index/user.vue b/pages/index/user.vue index c933428..c1b3cf0 100644 --- a/pages/index/user.vue +++ b/pages/index/user.vue @@ -17,7 +17,7 @@ - {{ userInfo.nickname}} + {{ userInfo.nickname}} 未认证 已认证 @@ -116,7 +116,7 @@ - + @@ -216,6 +216,9 @@ import { baseUrl, } from '@/sheep/config'; + import { + showShareModal + } from '@/sheep/hooks/useModal'; const showLogin = ref(false); const iv = ref(''); diff --git a/pages/school/classesDetail.vue b/pages/school/classesDetail.vue index 2bef479..716e241 100644 --- a/pages/school/classesDetail.vue +++ b/pages/school/classesDetail.vue @@ -61,7 +61,7 @@ 分享 - + 客服 @@ -225,6 +225,22 @@ }) } } + + //联系平台客服 + function handleService() { + console.log('联系平台客服',detailRent.value.platform_contact_number); + wx.makePhoneCall({ + phoneNumber: detailRent.value.platform_contact_number, + success: function() { + console.log("拨打电话成功") + + }, + fail: function(err) { + console.log("拨打电话失败", err) + } + }) + } +