Authored by htoooth

fix

... ... @@ -129,6 +129,14 @@ import api from 'product-create/api';
import serial from 'product-create/serialize';
export default {
props: {
from: {
type: String,
default() {
return 'offsale';
}
}
},
data() {
return {
showLoading: true,
... ... @@ -493,7 +501,12 @@ export default {
desc: '该商品保存成功!'
});
this.$router.push({ name: 'product.offsale' });
if (this.from === 'offsale') {
this.goOffSale();
} else {
this.goOnlineSale();
}
} else {
this.$Notice.error({
title: '保存错误',
... ... @@ -503,6 +516,12 @@ export default {
}
});
},
goOffSale() {
this.$router.push({ name: 'product.offsale' });
},
goOnlineSale() {
this.$router.push({ name: 'product.online' });
},
submit() {
this.validate()
.then(([r1, r2]) => {
... ...
... ... @@ -295,7 +295,8 @@
this.$router.push({
name: 'product.edit',
params: {
id: skn
id: skn,
from: 'offsale'
}
});
},
... ...
... ... @@ -272,7 +272,8 @@
this.$router.push({
name: 'product.edit',
params: {
id: skn
id: skn,
from: 'onsale'
}
});
},
... ...