Commit 98be934f authored by 我在何方's avatar 我在何方

新增商品修复

parent a67a96a9
......@@ -381,7 +381,6 @@ export default {
this.getList()
},
created() {
console.log(111)
//新增商品异常跳转商品修改
if(this.$route.query.prodId){
this.exceptionProductId = this.$route.query.prodId
......@@ -505,7 +504,7 @@ export default {
const id = row.id;
getProduct(id).then(response => {
this.form = {...response.data,couponIds:[]};
let attrArray = this.form.attrId.split(',');
let attrArray = this.form.attrId?this.form.attrId.split(','):[];
for (let index in attrArray) {
let value = attrArray[index];
attrArray[index] = parseInt(value);
......@@ -542,6 +541,7 @@ export default {
this.$modal.msgSuccess(this.$t("修改成功"));
this.open = false;
if(this.exceptionProductId){
this.exceptionProductId = null
this.$router.replace({ path: '/product/product-list'})
}
this.getList();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment