From 9e99372df2963485a8c02126551e153a40340e11 Mon Sep 17 00:00:00 2001 From: 396316021 <396316021@qq.com> Date: Wed, 20 Sep 2023 16:25:43 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dbug=E5=8F=8A=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/PetPage/index.vue | 128 +++++++++++----------- pages/ChatDetail/index.vue | 4 +- pages/FeedLog/index.vue | 28 +++-- pages/Index/components/ChatPage/index.vue | 10 +- pages/Index/index.vue | 3 +- pages/OrderPage/index.vue | 108 +++++++++++------- pages/UserCoupons/index.vue | 25 ++++- 7 files changed, 186 insertions(+), 120 deletions(-) diff --git a/components/PetPage/index.vue b/components/PetPage/index.vue index 388dbe6..f391826 100644 --- a/components/PetPage/index.vue +++ b/components/PetPage/index.vue @@ -188,27 +188,27 @@ - - - 宝贝背景图 - - - - - - - + + + + + + + + + + + + + + + + + + + + + @@ -444,50 +444,52 @@ - - - - + + + + + + + + + diff --git a/pages/ChatDetail/index.vue b/pages/ChatDetail/index.vue index 89dcd71..81bf77c 100644 --- a/pages/ChatDetail/index.vue +++ b/pages/ChatDetail/index.vue @@ -190,7 +190,9 @@ export default { uni.hideLoading(); this.message = ''; } - this.scrollToBottom(); + uni.$u.sleep(200).then(()=>{ + this.scrollToBottom(); + }) } }, onPageScroll(res) { diff --git a/pages/FeedLog/index.vue b/pages/FeedLog/index.vue index 7fe7192..1adb19f 100644 --- a/pages/FeedLog/index.vue +++ b/pages/FeedLog/index.vue @@ -41,8 +41,9 @@ - + @@ -62,8 +63,9 @@ - + @@ -83,8 +85,9 @@ - + @@ -104,8 +107,9 @@ - + @@ -125,8 +129,9 @@ - + @@ -146,8 +151,9 @@ - + @@ -167,8 +173,9 @@ - + @@ -188,8 +195,9 @@ - + @@ -446,7 +454,9 @@ this.detail.feedlist.pet_id = this.pet_id editFeed(this.detail.feedlist).then(res => { console.log(res) - uni.navigateBack(); + api.success('保存成功').then(() => { + uni.navigateBack(); + }) }) }); }, diff --git a/pages/Index/components/ChatPage/index.vue b/pages/Index/components/ChatPage/index.vue index 3252e3c..b7d1e0d 100644 --- a/pages/Index/components/ChatPage/index.vue +++ b/pages/Index/components/ChatPage/index.vue @@ -82,7 +82,7 @@ chatShow(){ this.page = 1; this.status = 'loadmore'; - this.getChatList(); + this.getChatList(true); }, timeFormat(time){ let now = uni.$u.timeFormat(new Date().getTime(),'yyyy/mm/dd'); @@ -98,8 +98,12 @@ url:'/pages/ChatDetail/index?id='+item.order_service_id }); }, - getChatList(){ - + getChatList(clear = false){ + if(clear){ + this.status = 'loadmore'; + this.chatList = []; + this.page = 1; + } if(this.status === 'nomre'){ return false; } diff --git a/pages/Index/index.vue b/pages/Index/index.vue index 518a822..845e075 100644 --- a/pages/Index/index.vue +++ b/pages/Index/index.vue @@ -63,7 +63,7 @@ image: imghost + "/foot-nav-button-three", name: 'chat', title: '在线沟通', - is_show: true + is_show: false }, { image: imghost + "/foot-nav-button-four", @@ -117,6 +117,7 @@ onShow(){ console.log(this.footGroup) this.footGroup[1].is_show = (UserCache.get('store_id', 0) > 0) + this.footGroup[2].is_show = (UserCache.get('store_id', 0) === 0) if(this.footCheck === 'chat'){ this.$refs.chat.chatShow(); } diff --git a/pages/OrderPage/index.vue b/pages/OrderPage/index.vue index bccd2f1..0e6e8f7 100644 --- a/pages/OrderPage/index.vue +++ b/pages/OrderPage/index.vue @@ -242,49 +242,51 @@ - - - - + + + + + + + + @@ -455,7 +457,7 @@ this.addServiceList[e].checked = !this.addServiceList[e].checked; }, orderPay(){ - + uni.showLoading('加载中'); if( this.address &&this.timeList.length>0 @@ -475,10 +477,30 @@ console.log(res) api.payment(res.data).then(res => { uni.redirectTo({url:'/pages/Order/done?type=order'}); + uni.hideLoading(); }).catch(err => { api.error('支付失败'); + uni.hideLoading(); }); }); + }else{ + uni.hideLoading(); + if(!this.address){ + api.error('请选择地址') + return; + } + if(this.timeList.length === 0){ + api.error('请选择服务日期') + return; + } + if(this.petChecked.length === 0){ + api.error('请选择宠物') + return; + } + if(this.basicServiceChecked.length === 0){ + api.error('请选择基础服务') + } + } }, checkOrderData(){ @@ -544,6 +566,8 @@ console.log(cacheCoupons) this.coupons = cacheCoupons; uni.removeStorage({key:'userCoupons'}); + }else{ + this.coupons = {}; } this.checkOrderData(); }, diff --git a/pages/UserCoupons/index.vue b/pages/UserCoupons/index.vue index 9d9fea5..0df6d8d 100644 --- a/pages/UserCoupons/index.vue +++ b/pages/UserCoupons/index.vue @@ -35,7 +35,7 @@ - 查看使用规则 + 查看使用规则 + + + + + + 使用说明 + + + + + + + + @@ -74,6 +88,7 @@ import RightNav from '@/components/RightNav/Index.vue'; import MzButton from '@/components/MzButton/Index.vue'; import {userCoupons} from "../../api/user"; + import {getConfig} from "@/api/other"; export default { components: { HeaderNav, @@ -117,6 +132,7 @@ page:1, status:'loadmore', navToUrl:'', + couponsContent:'', } }, onLoad(option) { @@ -125,6 +141,12 @@ this.navToUrl = option.url || '' }, methods: { + showCoupons(item){ + console.log(item) + console.log(item.use_info) + this.couponsContent = item.use_info; + this.$refs.agreement.open(); + }, clickCoupons(item){ if(item.status === 0){ console.log('coupons', item) @@ -157,6 +179,7 @@ time: '有效期至 '+row.end_time, cause:'满'+parseFloat(row.min_price)+'使用', status: row.status, + use_info: row.use_info, } }); this.status = couponsList.length < 10 ? 'nomore' : 'loadmore';