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) + } + }) + } +