Authored by htoooth

fix format

... ... @@ -4,7 +4,7 @@
import api from '../api';
function getProduct (skn) {
function getProduct(skn) {
return api.getProductAllInfo(skn).then((result) => {
return result.data;
});
... ...
... ... @@ -239,8 +239,8 @@ export default {
this.submit().then((result) => {
this.$Loading.finish();
if (result.code === 200) {
this.$Notice.success({title : '保存成功'});
if (result.code === 200) {
this.$Notice.success({title: '保存成功'});
this.$router.push({name: 'product.offsale'});
} else {
this.$Notice.error({
... ...
... ... @@ -333,7 +333,7 @@ import MuliSelect from './views/muli-select';
import Age from './views/age';
import Season from './views/season';
import Gender from './views/gender';
import GoodsSeason from './views/goods-season'
import GoodsSeason from './views/goods-season';
import service from './service';
import api from './api';
... ... @@ -590,8 +590,9 @@ export default {
one.forEach((s) => {
let i = _.find(this.render.attributeProValuesOne, {attributeId: s.attributeId});
if (i) {
i.model = s.attributeValueIds.map(s => `${s}`);
i.model = s.attributeValueIds.map(id => `${id}`);
}
});
... ... @@ -599,7 +600,7 @@ export default {
let i = _.find(this.render.attributeProValuesTwo, {attributeId: s.attributeId});
if (i) {
i.model = s.attributeValueIds.map(s => `${s}`);
i.model = s.attributeValueIds.map(id => `${id}`);
}
});
});
... ... @@ -612,7 +613,7 @@ export default {
this.initAttr();
},
getDefaultSelectedColor: function() {
this.product.sellerGoodList.forEach((g) => {
this.product.sellerGoodList.forEach((g) => {
let defaultColor = _.find(this.colors, (c) => c.id === g.colorId);
if (defaultColor) {
... ... @@ -740,7 +741,7 @@ export default {
desc: '该商品保存成功!'
});
this.$router.push({name: 'product.offsale'})
this.$router.push({name: 'product.offsale'});
} else {
this.$Notice.error({
title: '保存错误',
... ... @@ -792,6 +793,7 @@ export default {
let sizeId = s.id;
let productSku = s.productSku;
let factoryCode = color.sizeCode[i].name;
return {sizeId, factoryCode, productSku};
});
},
... ... @@ -883,7 +885,7 @@ export default {
},
removeColorData: function(color) {
let index = this.table.data.findIndex((d) => {
return d.colorId === color.id;
return d.colorId === color.id;
});
this.table.data.splice(index, 1);
... ...
... ... @@ -8,4 +8,4 @@ export default {
path: '/edit/:id',
name: 'edit',
component: editProduct
};
\ No newline at end of file
};
... ...
... ... @@ -69,9 +69,9 @@ const handleGoods = (goods) => {
};
const handleGoodsImage = (goodsColorInfo) => {
let image0 = {genderCover: 0, isDefault: 'Y'}; // 0商品正面图
let image3 = {genderCover: 1, isDefault: 'N'}; // 3男生频道封面图
let image4 = {genderCover: 2, isDefault: 'N'}; // 4女生频道封面图
let image0 = {genderCover: 0, isDefault: 'Y'}; // 0商品正面图
let image3 = {genderCover: 1, isDefault: 'N'}; // 3男生频道封面图
let image4 = {genderCover: 2, isDefault: 'N'}; // 4女生频道封面图
let newGoods = handleGoods(goodsColorInfo);
... ...
... ... @@ -4,7 +4,7 @@
import api from '../api';
function getProduct (skn) {
function getProduct(skn) {
return api.getProductAllInfo(skn).then((result) => {
return result.data;
});
... ...
... ... @@ -23,13 +23,15 @@ export default {
props: ['value'],
data() {
let _this = this;
return {
handleValue: _this.value.split('|')
}
};
},
methods: {
updateValue(newValue) {
let nValue = newValue.join('|');
this.$emit('input', nValue);
}
},
... ... @@ -38,10 +40,10 @@ export default {
this.handleValue = newValue.split('|');
}
}
};
}
</script>
<style>
</style>
\ No newline at end of file
</style>
... ...
... ... @@ -13,29 +13,31 @@
</template>
<script>
export default {
props: ['value'],
data() {
let _this = this;
return {
handleValue: _this.value
}
},
methods: {
updateValue(newValue) {
let nValue = newValue;
this.$emit('input', nValue);
}
},
watch: {
value(newValue) {
this.handleValue = newValue;
}
}
export default {
props: ['value'],
data() {
let _this = this;
return {
handleValue: _this.value
};
},
methods: {
updateValue(newValue) {
let nValue = newValue;
this.$emit('input', nValue);
}
},
watch: {
value(newValue) {
this.handleValue = newValue;
}
}
};
</script>
<style>
</style>
\ No newline at end of file
</style>
... ...
... ... @@ -10,30 +10,32 @@
</template>
<script>
export default {
name: 'product-goods-season',
props: ['value'],
data() {
let _this = this;
return {
handleValue: _this.value
}
},
methods: {
updateValue(newValue) {
let nValue = newValue;
this.$emit('input', nValue);
}
},
watch: {
value(newValue) {
this.handleValue = newValue;
}
}
export default {
name: 'product-goods-season',
props: ['value'],
data() {
let _this = this;
return {
handleValue: _this.value
};
},
methods: {
updateValue(newValue) {
let nValue = newValue;
this.$emit('input', nValue);
}
},
watch: {
value(newValue) {
this.handleValue = newValue;
}
}
};
</script>
<style>
</style>
\ No newline at end of file
</style>
... ...
... ... @@ -24,14 +24,16 @@ export default {
},
data() {
let _this = this;
return {
handleValue: _this.value.map(s => `${s.id}`)
};
},
methods: {
updateValue: function(value) {
this.handleValue = value;
let newValue = value.map(s => ({id: s}));
this.handleValue = value;
this.$emit('input', newValue);
}
},
... ... @@ -41,9 +43,9 @@ export default {
}
}
}
};
</script>
<style>
</style>
\ No newline at end of file
</style>
... ...
... ... @@ -26,10 +26,11 @@ export default {
props: ['value', 'attr'],
data() {
let _this = this;
return {
handleSelectValue: _this.value[0],
handleCheckValue: _this.value
}
};
},
methods: {
updateSelectValue(value) {
... ... @@ -48,9 +49,9 @@ export default {
}
}
}
}
};
</script>
<style>
</style>
\ No newline at end of file
</style>
... ...
... ... @@ -16,29 +16,31 @@
</template>
<script>
export default {
props: ['value'],
data() {
let _this = this;
return {
handleValue: _this.value
}
},
methods: {
updateValue(newValue) {
let nValue = newValue;
this.$emit('input', nValue);
}
},
watch: {
value(newValue) {
this.handleValue = newValue;
}
}
export default {
props: ['value'],
data() {
let _this = this;
return {
handleValue: _this.value
};
},
methods: {
updateValue(newValue) {
let nValue = newValue;
this.$emit('input', nValue);
}
},
watch: {
value(newValue) {
this.handleValue = newValue;
}
}
};
</script>
<style>
</style>
\ No newline at end of file
</style>
... ...
... ... @@ -8,4 +8,4 @@ export default {
path: '/show/:id',
name: 'show',
component: showProduct
};
\ No newline at end of file
};
... ...