cmx #21

Merged
cmx merged 4 commits from cmx into master 2020-08-05 12:11:37 +00:00
4 changed files with 177 additions and 199 deletions
Showing only changes of commit 80e3a721a1 - Show all commits

View File

@ -182,49 +182,45 @@ export default {
if (this.cur == 0) { if (this.cur == 0) {
// 退 // 退
return; return;
this.$u.api this.$u.api.refund({
.refund({ refund_id: this.orderid,
refund_id: this.orderid, seller_state:2,
seller_state:2, seller_message:""
seller_message:"" }).then(res => {
}) if (res.errCode != 0) {
.then(res => { this.$refs.uToast.show({
if (res.errCode != 0) { title: res.message,
this.$refs.uToast.show({ type: 'error'
title: res.message, });
type: 'error' } else {
}); this.$refs.uToast.show({
} else { title: res.message,
this.$refs.uToast.show({ type: 'success'
title: res.message, });
type: 'success' console.log(res);
}); }
console.log(res); });
}
});
} else { } else {
// 退 // 退
return; return;
this.$u.api this.$u.api.refund({
.refund({ refund_id: this.orderid,
refund_id: this.orderid, seller_state:3,
seller_state:3, seller_message:""
seller_message:"" }).then(res => {
}) if (res.errCode != 0) {
.then(res => { this.$refs.uToast.show({
if (res.errCode != 0) { title: res.message,
this.$refs.uToast.show({ type: 'error'
title: res.message, });
type: 'error' } else {
}); this.$refs.uToast.show({
} else { title: res.message,
this.$refs.uToast.show({ type: 'success'
title: res.message, });
type: 'success' console.log(res);
}); }
console.log(res); });
}
});
} }
}, },
// 退 // 退
@ -239,24 +235,22 @@ export default {
}, },
// //
getcarinfo() { getcarinfo() {
this.$u.api this.$u.api.getpushinfo({
.getpushinfo({ order_id: this.orderid
order_id: this.orderid }).then(res => {
}) if (res.errCode != 0) {
.then(res => { this.$refs.uToast.show({
if (res.errCode != 0) { title: res.message,
this.$refs.uToast.show({ type: 'error'
title: res.message, });
type: 'error' } else {
}); this.$refs.uToast.show({
} else { title: res.message,
this.$refs.uToast.show({ type: 'success'
title: res.message, });
type: 'success' console.log(res);
}); }
console.log(res); });
}
});
}, },
// //
getselectcompany(e) { getselectcompany(e) {
@ -268,48 +262,44 @@ export default {
confirmpushstyle() { confirmpushstyle() {
if (this.cur == 0) { if (this.cur == 0) {
console.log(this.pushid); console.log(this.pushid);
this.$u.api this.$u.api.bindpushid({
.bindpushid({ order_id: this.orderid,
order_id: this.orderid, shipping_code: this.pushid,
shipping_code: this.pushid, shipping_express_id: this.companyidA
shipping_express_id: this.companyidA }).then(res => {
}) if (res.errCode != 0) {
.then(res => { this.$refs.uToast.show({
if (res.errCode != 0) { title: res.message,
this.$refs.uToast.show({ type: 'error'
title: res.message, });
type: 'error' } else {
}); this.$refs.uToast.show({
} else { title: res.message,
this.$refs.uToast.show({ type: 'success'
title: res.message, });
type: 'success' uni.navigateBack({
}); delta: 1
uni.navigateBack({ });
delta: 1 }
}); });
}
});
} else { } else {
this.$u.api this.$u.api.bindcarer({
.bindcarer({ order_id: this.orderid,
order_id: this.orderid, takeawayer_id: this.selctcar.takeawayer_id
takeawayer_id: this.selctcar.takeawayer_id }).then(res => {
}) console.log(res);
.then(res => { if (res.errCode != 0) {
console.log(res); this.$refs.uToast.show({
if (res.errCode != 0) { title: res.message,
this.$refs.uToast.show({ type: 'error'
title: res.message, });
type: 'error' } else {
}); this.$refs.uToast.show({
} else { title: res.message,
this.$refs.uToast.show({ type: 'success'
title: res.message, });
type: 'success' }
}); });
}
});
} }
}, },
// //
@ -318,21 +308,19 @@ export default {
}, },
// //
resetinfo() { resetinfo() {
this.$u.api this.$u.api.orderdetail({
.orderdetail({ order_id: this.orderid
order_id: this.orderid }).then(res => {
}) console.log(res);
.then(res => { if (res.errCode != 0) {
console.log(res); this.$refs.uToast.show({
if (res.errCode != 0) { title: res.message,
this.$refs.uToast.show({ type: 'error'
title: res.message, });
type: 'error' } else {
}); this.info = res.data;
} else { }
this.info = res.data; });
}
});
this.$u.api.takeawayerlist({}).then(res => { this.$u.api.takeawayerlist({}).then(res => {
console.log(res); console.log(res);
if (res.errCode != 0) { if (res.errCode != 0) {

View File

@ -123,39 +123,35 @@ export default {
// //
confirmpushstyle() { confirmpushstyle() {
if (this.cur == 0) { if (this.cur == 0) {
this.$u.api this.$u.api.agreetest({
.agreetest({ goods_try_id: this.orderid,
goods_try_id: this.orderid, type: 1,
type: 1, takeawayer_id: 0
takeawayer_id: 0 }).then(res => {
}) console.log(res);
.then(res => { if (res.errCode != 0) {
console.log(res); this.$refs.uToast.show({
if (res.errCode != 0) { title: res.message,
this.$refs.uToast.show({ type: 'error'
title: res.message, });
type: 'error' } else {
}); }
} else { });
}
});
} else { } else {
this.$u.api this.$u.api.agreetest({
.agreetest({ goods_try_id: this.orderid,
goods_try_id: this.orderid, type: 1,
type: 1, takeawayer_id: this.selctcar.takeawayer_id
takeawayer_id: this.selctcar.takeawayer_id }).then(res => {
}) console.log(res);
.then(res => { if (res.errCode != 0) {
console.log(res); this.$refs.uToast.show({
if (res.errCode != 0) { title: res.message,
this.$refs.uToast.show({ type: 'error'
title: res.message, });
type: 'error' } else {
}); }
} else { });
}
});
} }
}, },
// //
@ -164,21 +160,19 @@ export default {
}, },
// //
resetinfo() { resetinfo() {
this.$u.api this.$u.api.testorderdetail({
.testorderdetail({ goods_try_id: this.orderid
goods_try_id: this.orderid }).then(res => {
}) console.log(res);
.then(res => { if (res.errCode != 0) {
console.log(res); this.$refs.uToast.show({
if (res.errCode != 0) { title: res.message,
this.$refs.uToast.show({ type: 'error'
title: res.message, });
type: 'error' } else {
}); this.info = res.data.info;
} else { }
this.info = res.data.info; });
}
});
// //
this.$u.api.takeawayerlist({}).then(res => { this.$u.api.takeawayerlist({}).then(res => {
console.log(res); console.log(res);

View File

@ -207,25 +207,23 @@ export default {
}, },
// //
addLiveSpec() { addLiveSpec() {
this.$u.api this.$u.api.createLivesp({
.createLivesp({ spec_name: this.tagcontent
spec_name: this.tagcontent }).then(res => {
}) if (res.errCode != 0) {
.then(res => { this.$refs.uToast.show({
if (res.errCode != 0) { title: res.message,
this.$refs.uToast.show({ type: 'error'
title: res.message, });
type: 'error' } else {
}); this.tagcontent = '';
} else { this.show = false;
this.tagcontent = ''; this.$refs.uToast.show({
this.show = false; title: res.message,
this.$refs.uToast.show({ type: 'success'
title: res.message, });
type: 'success' }
}); });
}
});
}, },
// //
uploadcover(data) { uploadcover(data) {

View File

@ -184,25 +184,23 @@ export default {
}, },
// //
addLiveSpec() { addLiveSpec() {
this.$u.api this.$u.api.createLivesp({
.createLivesp({ spec_name: this.tagcontent
spec_name: this.tagcontent }).then(res => {
}) if (res.errCode != 0) {
.then(res => { this.$refs.uToast.show({
if (res.errCode != 0) { title: res.message,
this.$refs.uToast.show({ type: 'error'
title: res.message, });
type: 'error' } else {
}); this.tagcontent = '';
} else { this.show = false;
this.tagcontent = ''; this.$refs.uToast.show({
this.show = false; title: res.message,
this.$refs.uToast.show({ type: 'success'
title: res.message, });
type: 'success' }
}); });
}
});
}, },
// //
getLiveSpec() { getLiveSpec() {