You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 line
21 KiB
1 line
21 KiB
1 month ago
|
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-users-order-peiwan"],{"06a3":function(t,e,n){"use strict";n("6a54");var i=n("f5bd").default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,n("473f"),n("bf0f"),n("aa9c"),n("64aa");var o=i(n("2634")),r=i(n("2fdc")),s={data:function(){return{payInfo:{},show:!1,payIndex:0,current:0,list:[{name:"全部"},{name:"待接单"},{name:"已接单"},{name:"服务中"},{name:"已完成"}],activeStyle:{fontSize:"30rpx"},orderList:[],page:1,total:1}},onLoad:function(t){this.current=t.type,this.getList()},methods:{toDetail:function(t){uni.navigateTo({url:"/pages/users/order/pdetail?type=1&id="+t.id})},toFuwu:function(){var t=this;uni.showModal({title:"温馨提示",content:"是否要开始服务?",success:function(e){return(0,r.default)((0,o.default)().mark((function n(){var i,r,s;return(0,o.default)().wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(!e.confirm){n.next=8;break}return n.next=3,t.$api.serviceOrder({orderId:a.id,userId:uni.getStorageSync("userInfo").id});case 3:i=n.sent,r=i.code,i.data,s=i.msg,200==r?(uni.showToast({title:"服务开始"}),setTimeout((function(){t.getList()}),2e3)):uni.showToast({title:s,icon:"none",position:"bottom"});case 8:case"end":return n.stop()}}),n)})))()}})},toShengqing:function(t){var e=this;uni.showModal({title:"温馨提示",content:"是否要单?",success:function(n){return(0,r.default)((0,o.default)().mark((function i(){var a,r,s;return(0,o.default)().wrap((function(i){while(1)switch(i.prev=i.next){case 0:if(!n.confirm){i.next=8;break}return i.next=3,e.$api.acceptOrder({orderId:t.id,userId:uni.getStorageSync("userInfo").id});case 3:a=i.sent,r=a.code,a.data,s=a.msg,200==r?(uni.showToast({title:"接单成功"}),setTimeout((function(){e.getList()}),2e3)):uni.showToast({title:s,icon:"none",position:"bottom"});case 8:case"end":return i.stop()}}),i)})))()}})},toDel:function(t){var e=this;uni.showModal({title:"温馨提示",content:"是否要删除该订单?",success:function(n){return(0,r.default)((0,o.default)().mark((function i(){var a,r,s;return(0,o.default)().wrap((function(i){while(1)switch(i.prev=i.next){case 0:if(!n.confirm){i.next=8;break}return i.next=3,e.$api.deleteOrder({orderId:t.id,delType:2,userId:uni.getStorageSync("userInfo").id});case 3:a=i.sent,r=a.code,a.data,s=a.msg,200==r?(uni.showToast({title:"删除成功"}),setTimeout((function(){e.getList()}),2e3)):uni.showToast({title:s,icon:"none",position:"bottom"});case 8:case"end":return i.stop()}}),i)})))()}})},toCancle:function(t){var e=this;uni.showModal({title:"温馨提示",content:"是否要取消该订单?",success:function(n){return(0,r.default)((0,o.default)().mark((function i(){var a,r,s;return(0,o.default)().wrap((function(i){while(1)switch(i.prev=i.next){case 0:if(!n.confirm){i.next=8;break}return i.next=3,e.$api.cancelOrder({orderId:t.id,userId:uni.getStorageSync("userInfo").id});case 3:a=i.sent,r=a.code,a.data,s=a.msg,200==r?(uni.showToast({title:"取消成功"}),setTimeout((function(){e.getList()}),2e3)):uni.showToast({title:s,icon:"none",position:"bottom"});case 8:case"end":return i.stop()}}),i)})))()}})},arrayUnique:function(t,e){var n={};return t.reduce((function(t,i){return!n[i[e]]&&(n[i[e]]=t.push(i)),t}),[])},getList:function(t){var e=this;return(0,r.default)((0,o.default)().mark((function n(){var i,a,r;return(0,o.default)().wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.next=2,e.$api.orderList({userId:uni.getStorageSync("userInfo").id,status:Number(e.current)-1,limit:20,page:e.page,userType:2});case 2:i=n.sent,a=i.code,r=i.data,1==t&&uni.hideLoading(),200==a&&(e.total=0==r.length?0:1,e.orderList=r);case 7:case"end":return n.stop()}}),n)})))()},changeTabs:function(t){this.current=t,this.page=1,this.orderList=[],this.getList()}}};e.default=s},"0da4":function(t,e,n){var i=n("2fb0");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);var a=n("967d").default;a("f2914910",i,!0,{sourceMap:!1,shadowMode:!1})},"188a":function(t,e,n){"use strict";n.d(e,"b",(functi
|