-
+
+
+
@@ -127,6 +128,7 @@ export default {
form: {},
skuList:[],
skuAttr:[],
+ albumPics:null,
productAttr: [
{
name: '颜色',
@@ -143,6 +145,8 @@ export default {
const {id} = this.$route.query
if (id) {
this.getInfo(id);
+ }else{
+ this.form.publishStatus=0
}
},
methods: {
@@ -199,7 +203,7 @@ export default {
getPmsProduct(id).then(response => {
const {albumPics } = response
if (albumPics) {
- response.albumPics = albumPics.split(',')
+ this.albumPics = albumPics.split(',')
}
this.form = response;
if(this.form.productAttr){
@@ -212,6 +216,9 @@ export default {
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
+ if(this.albumPics){
+ this.form.albumPics = this.albumPics.toString()
+ }
this.form.skuList = this.skuList
if(this.form.categoryId && Array.isArray(this.form.categoryId)){
this.form.categoryId = this.form.categoryId.pop()
diff --git a/src/views/pms/product/index.vue b/src/views/pms/product/index.vue
index a7ac6f6..2a87a3c 100644
--- a/src/views/pms/product/index.vue
+++ b/src/views/pms/product/index.vue
@@ -63,10 +63,18 @@
-
+
+
+
+
+
-
+
+
+
+
+