| | |
| | | getaccept(e, orderId, index) { |
| | | this.$u.api.accept({ orderId }) |
| | | .then(res => { |
| | | uni.showToast({ title: '抢单成功!', icon: 'success', duration: 2000 }) |
| | | setTimeout(() => { |
| | | this.page = 1 |
| | | this.next = true |
| | | this.orderList = [] |
| | | this.getOrderList() |
| | | }, 2000) |
| | | if (res.code === 200) { |
| | | uni.showToast({ title: '抢单成功!', icon: 'success', duration: 2000 }) |
| | | setTimeout(() => { |
| | | this.page = 1 |
| | | this.next = true |
| | | this.orderList = [] |
| | | this.getOrderList() |
| | | }, 2000) |
| | | } |
| | | }) |
| | | }, |
| | | clickSort(id) { |
| | |
| | | priceNum1: that.form.days, |
| | | type: 2 |
| | | }).then(res => { |
| | | that.form.estimatedAccount = res.data |
| | | if (res.code === 200) { |
| | | that.form.estimatedAccount = res.data |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | |
| | | getCategoryLists() { |
| | | this.$u.api.getCategoryList({ type: 1 }) |
| | | .then(res => { |
| | | this.car = res.data |
| | | this.form.categoryId = res.data[0].id |
| | | this.form.categoryName = res.data[0].name |
| | | this.carRemark = res.data[0].remark |
| | | this.carImage = res.data[0].iconFull |
| | | if (res.code === 200) { |
| | | this.car = res.data |
| | | this.form.categoryId = res.data[0].id |
| | | this.form.categoryName = res.data[0].name |
| | | this.carRemark = res.data[0].remark |
| | | this.carImage = res.data[0].iconFull |
| | | } |
| | | }) |
| | | this.$u.api.getCategoryList({ type: 2 }) |
| | | .then(res => { |
| | | res.data.forEach(item => { |
| | | item.num = '' |
| | | item.list = item.detailList.map(child => { |
| | | return { |
| | | active: false, |
| | | price: child |
| | | } |
| | | if (res.code === 200) { |
| | | res.data.forEach(item => { |
| | | item.num = '' |
| | | item.list = item.detailList.map(child => { |
| | | return { |
| | | active: false, |
| | | price: child |
| | | } |
| | | }) |
| | | }) |
| | | }) |
| | | this.orderFood = res.data |
| | | this.orderFood = res.data |
| | | } |
| | | }) |
| | | } |
| | | } |