diff --git a/pages.json b/pages.json index 521f428..c53b3fd 100644 --- a/pages.json +++ b/pages.json @@ -39,7 +39,7 @@ } }, { - "path": "pages/mine/index", + "path": "pages/mine/mine", "style": { // "navigationBarTitleText": "我的" "navigationStyle": "custom" @@ -371,7 +371,7 @@ "text": "订单" }, { - "pagePath": "pages/mine/index", + "pagePath": "pages/mine/mine", "iconPath": "static/images/tabbar/mine.png", "selectedIconPath": "static/images/tabbar/mine_.png", "text": "我的" diff --git a/pages/feedback/evaluate.vue b/pages/feedback/evaluate.vue index 8e69bd1..f5e914e 100644 --- a/pages/feedback/evaluate.vue +++ b/pages/feedback/evaluate.vue @@ -20,7 +20,7 @@ @@ -98,8 +98,7 @@ export default { currentTab: 0, content: '', fileList: [], - contactInfo: '', - description:"" + contactInfo: '', } }, onLoad() { diff --git a/pages/login.vue b/pages/login.vue index d8affed..d4234dc 100644 --- a/pages/login.vue +++ b/pages/login.vue @@ -88,7 +88,7 @@ export default { } }, onShow() { - // uni.reLaunch({ url: '/pages/feedback/evaluate' }) + // uni.reLaunch({ url: '/pages/index' }) // setTimeout(()=>{ if(Cookies.get('remember')){ this.remember = [Cookies.get('remember')] || []; diff --git a/pages/mine/coupon/index.vue b/pages/mine/coupon/index.vue index d42bf0b..baeae2b 100644 --- a/pages/mine/coupon/index.vue +++ b/pages/mine/coupon/index.vue @@ -78,7 +78,7 @@ - - \ No newline at end of file diff --git a/pages/work/evaluateCenter.vue b/pages/work/evaluateCenter.vue index bc4a88b..69778f5 100644 --- a/pages/work/evaluateCenter.vue +++ b/pages/work/evaluateCenter.vue @@ -74,7 +74,12 @@ - + + 回复内容:{{item.reply}} + + + 回复时间:{{item.replyTime}} + @@ -208,7 +213,7 @@ export default { size: this.pageSize2, } try { - const res = await getPageEvaluateListApi(params) + const res = await getPageEvaluateListApi(params) console.log('?? ~ getEvaluatedList ~ res:', res) this.total2 = Number(res.total); if(this.pageNum2==1){ diff --git a/pages/work/index.vue b/pages/work/index.vue index 5e9505b..0f28c30 100644 --- a/pages/work/index.vue +++ b/pages/work/index.vue @@ -23,8 +23,8 @@ - - + + @@ -85,6 +85,44 @@ + + + + + + + {{ item.canteenName }}/{{item.stallName}} + + {{ item.crtime.split(" ")[0] }} + + + + + + + + {{item.description}} + + + + + + + + 回复内容:{{item.reply}} + + + 回复时间:{{item.replyTime}} + + + + + + + + + @@ -171,6 +209,11 @@ mode="date" > + + + + + @@ -178,6 +221,7 @@ import Tabs from '@/pages/components/Tabs.vue' import { getDate } from '../../uni_modules/uni-datetime-picker/components/uni-datetime-picker/util' import { getOrderInfoListAPI,getOrderSourceTypeListAPI,payOrderApi,cancelOrderApi } from '../../api/order/index' +import { getPageEvaluateListApi } from '../../api/order/index' export default { components: { Tabs }, @@ -197,7 +241,7 @@ export default { searchValue: '', searchType:'', status: 'loadmore', - tabList: ['全部订单', '待评价', '待支付', '退款'], + tabList: ['全部订单', '已评价', '待支付', '退款'], dateValue:new Date(), dateValue2:new Date(), sourceTypeList:[], @@ -270,7 +314,14 @@ export default { {id:"13",name:'到店扫码'},{id:"14",name:'到店扫码'},{id:"15",name:'美团外卖'},{id:"16",name:'美团到店'},{id:"21",name:'补扣'},{id:"22",name:'外部订单'},{id:"99",name:'其他'} ], selectedOrderTypes: [], - + //已评价 + pageNum2: 1, + pageSize2: 10, + total2: 0, + tableList2: [], + status2:'loadmore', + showPic:false, + imagerUrl:"" } }, watch: { @@ -299,11 +350,11 @@ export default { // 翻页 onScrollTolower(){ console.log(this.tableList.length) - if(this.total>this.tableList.length){ - this.pageNum++ - this.getList() - } - }, + if(this.total>this.tableList.length){ + this.pageNum++ + this.getList() + } + }, //获取订单列表 async getList() { console.log('获取列表') @@ -363,19 +414,66 @@ export default { console.log('?? ~ changeTab ~ index:', index) this.tabIndex = index; if(index==1){ - this.searchType="3" - }else if(index==2){ + // this.searchType="3"//待评价 + //已评价 + this.pageNum2=1; + this.tableList2=[] + this.getEvaluatedList() + }else if(index==2){//待支付 this.searchType="4" - }else if(index==3){ + this.pageNum=1; + this.tableList=[] + this.getList() + }else if(index==3){//退款退单 this.searchType="2" - }else{ + this.pageNum=1; + this.tableList=[] + this.getList() + }else{//全部订单 this.searchType="" - } - this.pageNum=1; - this.tableList=[] - this.getList() + this.pageNum=1; + this.tableList=[] + this.getList() + } + }, + //已评价翻页 + onScrollTolower2(){ + if(this.total2>this.tableList2.length){ + if(this.tabIndex==1){ + this.pageNum2++ + this.getEvaluatedList() + } + } + }, + //获取已评价列表 + async getEvaluatedList() { + console.log('获取列表') + const params = { + custId: uni.getStorageSync('custId'), + startDate: this.startDate, + endDate: this.endDate, + current: this.pageNum2, + size: this.pageSize2, + } + try { + const res = await getPageEvaluateListApi(params) + console.log('?? ~ getEvaluatedList ~ res:', res) + this.total2 = Number(res.total); + if(this.pageNum2==1){ + this.tableList2 = res.records + }else{ + this.tableList2.push(...res.records) + } + this.status2 = this.total2 == this.tableList2.length ? 'nomore' : 'loadmore' + } catch (error) { + console.log(error) + } + }, + //评价图片 + opePopup(item){ + this.imagerUrl = item; + this.showPic = true }, - // 处理订单状态展示 handleOrderState(state) { switch (state) {