|
@@ -200,22 +200,49 @@
|
|
async onSubmit(ref) {
|
|
async onSubmit(ref) {
|
|
const that = this;
|
|
const that = this;
|
|
that.$refs[ref].validate().then(async params => {
|
|
that.$refs[ref].validate().then(async params => {
|
|
- params.file = that.icon;
|
|
|
|
- params.order_detail = that.id;
|
|
|
|
- const arr = await that.$api(`/afterSale`, 'POST', params);
|
|
|
|
- if (arr.errcode == '0') {
|
|
|
|
- uni.showToast({
|
|
|
|
- title: `申请售后成功`,
|
|
|
|
- icon: 'success',
|
|
|
|
- });
|
|
|
|
- uni.navigateBack({
|
|
|
|
- detail: 1
|
|
|
|
- })
|
|
|
|
|
|
+ if (params.type != '2') {
|
|
|
|
+ if (params.money) {
|
|
|
|
+ params.file = that.icon;
|
|
|
|
+ params.order_detail = that.id;
|
|
|
|
+ const arr = await that.$api(`/afterSale`, 'POST', params);
|
|
|
|
+ if (arr.errcode == '0') {
|
|
|
|
+ uni.showToast({
|
|
|
|
+ title: `申请售后成功`,
|
|
|
|
+ icon: 'success',
|
|
|
|
+ });
|
|
|
|
+ uni.navigateBack({
|
|
|
|
+ detail: 1
|
|
|
|
+ })
|
|
|
|
+ } else {
|
|
|
|
+ uni.showToast({
|
|
|
|
+ title: arr.errmsg,
|
|
|
|
+ icon: 'none',
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ uni.showToast({
|
|
|
|
+ title: `请输入退款金额`,
|
|
|
|
+ icon: 'none',
|
|
|
|
+ });
|
|
|
|
+ }
|
|
} else {
|
|
} else {
|
|
- uni.showToast({
|
|
|
|
- title: arr.errmsg,
|
|
|
|
- icon: 'none',
|
|
|
|
- })
|
|
|
|
|
|
+ params.file = that.icon;
|
|
|
|
+ params.order_detail = that.id;
|
|
|
|
+ const arr = await that.$api(`/afterSale`, 'POST', params);
|
|
|
|
+ if (arr.errcode == '0') {
|
|
|
|
+ uni.showToast({
|
|
|
|
+ title: `申请售后成功`,
|
|
|
|
+ icon: 'success',
|
|
|
|
+ });
|
|
|
|
+ uni.navigateBack({
|
|
|
|
+ detail: 1
|
|
|
|
+ })
|
|
|
|
+ } else {
|
|
|
|
+ uni.showToast({
|
|
|
|
+ title: arr.errmsg,
|
|
|
|
+ icon: 'none',
|
|
|
|
+ })
|
|
|
|
+ }
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|