Commit 15aeed63 authored by Junling Bu's avatar Junling Bu
Browse files

fix[litemall-admin]: 修复小错误

parent ac21869a
...@@ -90,11 +90,11 @@ ...@@ -90,11 +90,11 @@
</el-form-item> </el-form-item>
<el-form-item label="所属分类"> <el-form-item label="所属分类">
<el-cascader :options="categoryList" expand-trigger="hover" @change="handleCategoryChange" /> <el-cascader :options="categoryList" expand-trigger="hover" clearable @change="handleCategoryChange" />
</el-form-item> </el-form-item>
<el-form-item label="所属品牌商"> <el-form-item label="所属品牌商">
<el-select v-model="goods.brandId"> <el-select v-model="goods.brandId" clearable>
<el-option v-for="item in brandList" :key="item.value" :label="item.label" :value="item.value" /> <el-option v-for="item in brandList" :key="item.value" :label="item.label" :value="item.value" />
</el-select> </el-select>
</el-form-item> </el-form-item>
...@@ -254,7 +254,7 @@ ...@@ -254,7 +254,7 @@
<el-card class="box-card"> <el-card class="box-card">
<h3>商品参数</h3> <h3>商品参数</h3>
<el-button :plain="true" type="primary" @click="handleAttributeShow">添加</el-button> <el-button type="primary" @click="handleAttributeShow">添加</el-button>
<el-table :data="attributes"> <el-table :data="attributes">
<el-table-column property="attribute" label="商品参数名称" /> <el-table-column property="attribute" label="商品参数名称" />
<el-table-column property="value" label="商品参数值" /> <el-table-column property="value" label="商品参数值" />
...@@ -360,7 +360,7 @@ export default { ...@@ -360,7 +360,7 @@ export default {
keywords: [], keywords: [],
categoryList: [], categoryList: [],
brandList: [], brandList: [],
goods: { picUrl: '', gallery: [] }, goods: { picUrl: '', gallery: [], isHot: false, isNew: true, isOnSale: true },
specVisiable: false, specVisiable: false,
specForm: { specification: '', value: '', picUrl: '' }, specForm: { specification: '', value: '', picUrl: '' },
multipleSpec: false, multipleSpec: false,
......
...@@ -86,11 +86,11 @@ ...@@ -86,11 +86,11 @@
</el-form-item> </el-form-item>
<el-form-item label="所属分类"> <el-form-item label="所属分类">
<el-cascader v-model="categoryIds" :options="categoryList" expand-trigger="hover" @change="handleCategoryChange" /> <el-cascader v-model="categoryIds" :options="categoryList" clearable expand-trigger="hover" @change="handleCategoryChange" />
</el-form-item> </el-form-item>
<el-form-item label="所属品牌商"> <el-form-item label="所属品牌商">
<el-select v-model="goods.brandId"> <el-select v-model="goods.brandId" clearable>
<el-option v-for="item in brandList" :key="item.value" :label="item.label" :value="item.value" /> <el-option v-for="item in brandList" :key="item.value" :label="item.label" :value="item.value" />
</el-select> </el-select>
</el-form-item> </el-form-item>
...@@ -391,6 +391,13 @@ export default { ...@@ -391,6 +391,13 @@ export default {
const goodsId = this.$route.query.id const goodsId = this.$route.query.id
detailGoods(goodsId).then(response => { detailGoods(goodsId).then(response => {
this.goods = response.data.data.goods this.goods = response.data.data.goods
// 稍微调整一下前后端不一致
if (this.goods.brandId === 0) {
this.goods.brandId = null
}
if (this.goods.keywords === '') {
this.goods.keywords = null
}
this.specifications = response.data.data.specifications this.specifications = response.data.data.specifications
this.products = response.data.data.products this.products = response.data.data.products
this.attributes = response.data.data.attributes this.attributes = response.data.data.attributes
......
Supports Markdown
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