diff --git a/pages/index/details.vue b/pages/index/details.vue index 64d148e..e9d40da 100644 --- a/pages/index/details.vue +++ b/pages/index/details.vue @@ -182,49 +182,45 @@ export default { if (this.cur == 0) { // 确定退款 return; - this.$u.api - .refund({ - refund_id: this.orderid, - seller_state:2, - seller_message:"" - }) - .then(res => { - if (res.errCode != 0) { - this.$refs.uToast.show({ - title: res.message, - type: 'error' - }); - } else { - this.$refs.uToast.show({ - title: res.message, - type: 'success' - }); - console.log(res); - } - }); + this.$u.api.refund({ + refund_id: this.orderid, + seller_state:2, + seller_message:"" + }).then(res => { + if (res.errCode != 0) { + this.$refs.uToast.show({ + title: res.message, + type: 'error' + }); + } else { + this.$refs.uToast.show({ + title: res.message, + type: 'success' + }); + console.log(res); + } + }); } else { // 不进行退款 return; - this.$u.api - .refund({ - refund_id: this.orderid, - seller_state:3, - seller_message:"" - }) - .then(res => { - if (res.errCode != 0) { - this.$refs.uToast.show({ - title: res.message, - type: 'error' - }); - } else { - this.$refs.uToast.show({ - title: res.message, - type: 'success' - }); - console.log(res); - } - }); + this.$u.api.refund({ + refund_id: this.orderid, + seller_state:3, + seller_message:"" + }).then(res => { + if (res.errCode != 0) { + this.$refs.uToast.show({ + title: res.message, + type: 'error' + }); + } else { + this.$refs.uToast.show({ + title: res.message, + type: 'success' + }); + console.log(res); + } + }); } }, // 同意退款 @@ -239,24 +235,22 @@ export default { }, // 获取物流信息 getcarinfo() { - this.$u.api - .getpushinfo({ - order_id: this.orderid - }) - .then(res => { - if (res.errCode != 0) { - this.$refs.uToast.show({ - title: res.message, - type: 'error' - }); - } else { - this.$refs.uToast.show({ - title: res.message, - type: 'success' - }); - console.log(res); - } - }); + this.$u.api.getpushinfo({ + order_id: this.orderid + }).then(res => { + if (res.errCode != 0) { + this.$refs.uToast.show({ + title: res.message, + type: 'error' + }); + } else { + this.$refs.uToast.show({ + title: res.message, + type: 'success' + }); + console.log(res); + } + }); }, // 选择快递公司 getselectcompany(e) { @@ -268,48 +262,44 @@ export default { confirmpushstyle() { if (this.cur == 0) { console.log(this.pushid); - this.$u.api - .bindpushid({ - order_id: this.orderid, - shipping_code: this.pushid, - shipping_express_id: this.companyidA - }) - .then(res => { - if (res.errCode != 0) { - this.$refs.uToast.show({ - title: res.message, - type: 'error' - }); - } else { - this.$refs.uToast.show({ - title: res.message, - type: 'success' - }); - uni.navigateBack({ - delta: 1 - }); - } - }); + this.$u.api.bindpushid({ + order_id: this.orderid, + shipping_code: this.pushid, + shipping_express_id: this.companyidA + }).then(res => { + if (res.errCode != 0) { + this.$refs.uToast.show({ + title: res.message, + type: 'error' + }); + } else { + this.$refs.uToast.show({ + title: res.message, + type: 'success' + }); + uni.navigateBack({ + delta: 1 + }); + } + }); } else { - this.$u.api - .bindcarer({ - order_id: this.orderid, - takeawayer_id: this.selctcar.takeawayer_id - }) - .then(res => { - console.log(res); - if (res.errCode != 0) { - this.$refs.uToast.show({ - title: res.message, - type: 'error' - }); - } else { - this.$refs.uToast.show({ - title: res.message, - type: 'success' - }); - } - }); + this.$u.api.bindcarer({ + order_id: this.orderid, + takeawayer_id: this.selctcar.takeawayer_id + }).then(res => { + console.log(res); + if (res.errCode != 0) { + this.$refs.uToast.show({ + title: res.message, + type: 'error' + }); + } else { + this.$refs.uToast.show({ + title: res.message, + type: 'success' + }); + } + }); } }, // 选择骑手 @@ -318,21 +308,19 @@ export default { }, // 获取订单信息 resetinfo() { - this.$u.api - .orderdetail({ - order_id: this.orderid - }) - .then(res => { - console.log(res); - if (res.errCode != 0) { - this.$refs.uToast.show({ - title: res.message, - type: 'error' - }); - } else { - this.info = res.data; - } - }); + this.$u.api.orderdetail({ + order_id: this.orderid + }).then(res => { + console.log(res); + if (res.errCode != 0) { + this.$refs.uToast.show({ + title: res.message, + type: 'error' + }); + } else { + this.info = res.data; + } + }); this.$u.api.takeawayerlist({}).then(res => { console.log(res); if (res.errCode != 0) { diff --git a/pages/index/otherdetails.vue b/pages/index/otherdetails.vue index 3f9ba6f..27f360a 100644 --- a/pages/index/otherdetails.vue +++ b/pages/index/otherdetails.vue @@ -123,39 +123,35 @@ export default { // 绑定配送方式 confirmpushstyle() { if (this.cur == 0) { - this.$u.api - .agreetest({ - goods_try_id: this.orderid, - type: 1, - takeawayer_id: 0 - }) - .then(res => { - console.log(res); - if (res.errCode != 0) { - this.$refs.uToast.show({ - title: res.message, - type: 'error' - }); - } else { - } - }); + this.$u.api.agreetest({ + goods_try_id: this.orderid, + type: 1, + takeawayer_id: 0 + }).then(res => { + console.log(res); + if (res.errCode != 0) { + this.$refs.uToast.show({ + title: res.message, + type: 'error' + }); + } else { + } + }); } else { - this.$u.api - .agreetest({ - goods_try_id: this.orderid, - type: 1, - takeawayer_id: this.selctcar.takeawayer_id - }) - .then(res => { - console.log(res); - if (res.errCode != 0) { - this.$refs.uToast.show({ - title: res.message, - type: 'error' - }); - } else { - } - }); + this.$u.api.agreetest({ + goods_try_id: this.orderid, + type: 1, + takeawayer_id: this.selctcar.takeawayer_id + }).then(res => { + console.log(res); + if (res.errCode != 0) { + this.$refs.uToast.show({ + title: res.message, + type: 'error' + }); + } else { + } + }); } }, // 选择骑手 @@ -164,21 +160,19 @@ export default { }, // 获取订单信息 resetinfo() { - this.$u.api - .testorderdetail({ - goods_try_id: this.orderid - }) - .then(res => { - console.log(res); - if (res.errCode != 0) { - this.$refs.uToast.show({ - title: res.message, - type: 'error' - }); - } else { - this.info = res.data.info; - } - }); + this.$u.api.testorderdetail({ + goods_try_id: this.orderid + }).then(res => { + console.log(res); + if (res.errCode != 0) { + this.$refs.uToast.show({ + title: res.message, + type: 'error' + }); + } else { + this.info = res.data.info; + } + }); // 获取骑手列表 this.$u.api.takeawayerlist({}).then(res => { console.log(res); diff --git a/pages/release/index.vue b/pages/release/index.vue index 12245b8..ef217e0 100644 --- a/pages/release/index.vue +++ b/pages/release/index.vue @@ -207,25 +207,23 @@ export default { }, // 创建标签 addLiveSpec() { - this.$u.api - .createLivesp({ - spec_name: this.tagcontent - }) - .then(res => { - if (res.errCode != 0) { - this.$refs.uToast.show({ - title: res.message, - type: 'error' - }); - } else { - this.tagcontent = ''; - this.show = false; - this.$refs.uToast.show({ - title: res.message, - type: 'success' - }); - } - }); + this.$u.api.createLivesp({ + spec_name: this.tagcontent + }).then(res => { + if (res.errCode != 0) { + this.$refs.uToast.show({ + title: res.message, + type: 'error' + }); + } else { + this.tagcontent = ''; + this.show = false; + this.$refs.uToast.show({ + title: res.message, + type: 'success' + }); + } + }); }, // 上传封面 uploadcover(data) { diff --git a/pages/release/video.vue b/pages/release/video.vue index d995935..8b7c613 100644 --- a/pages/release/video.vue +++ b/pages/release/video.vue @@ -184,25 +184,23 @@ export default { }, // 创建标签 addLiveSpec() { - this.$u.api - .createLivesp({ - spec_name: this.tagcontent - }) - .then(res => { - if (res.errCode != 0) { - this.$refs.uToast.show({ - title: res.message, - type: 'error' - }); - } else { - this.tagcontent = ''; - this.show = false; - this.$refs.uToast.show({ - title: res.message, - type: 'success' - }); - } - }); + this.$u.api.createLivesp({ + spec_name: this.tagcontent + }).then(res => { + if (res.errCode != 0) { + this.$refs.uToast.show({ + title: res.message, + type: 'error' + }); + } else { + this.tagcontent = ''; + this.show = false; + this.$refs.uToast.show({ + title: res.message, + type: 'success' + }); + } + }); }, // 获取标签 getLiveSpec() {