Commit bac2fab6 by wangql

联调接口

1 parent 056477cd
......@@ -6,3 +6,8 @@ export function getList(data) {
data.method = `${path}goodsinfo.page`
return request(data)
}
export function getType(data) {
data.method = `${path}goods.type.list`
return request(data)
}
......@@ -18,24 +18,8 @@
v-model="searchForm.goodsType"
placeholder="请选择产品分类"
>
<el-option
v-for="item in baseData.product1"
:key="item.confId"
:label="item.confKey"
:value="item.confId"
></el-option>
<el-option v-for="item in baseData.productTypeList" :key="item.goodsType" :value="item.goodsType" :label="item.goodsTypeName" />
</el-select>
<!-- <el-select
v-model="searchForm.class2"
placeholder="请选择产品分类2"
>
<el-option
v-for="item in baseData.product2"
:key="item.confId"
:label="item.confKey"
:value="item.confId"
></el-option>
</el-select> -->
</el-form-item>
<el-form-item label="品牌商">
<el-select
......@@ -88,7 +72,7 @@
</template>
<script>
import { getList } from '@api/product'
import { getList, getType } from '@api/product'
export default {
name: 'product',
data() {
......@@ -113,7 +97,7 @@ export default {
addHtml: 'img'
}, {
label: '素材名称',
prop: 'name'
prop: 'goodsName'
}, {
label: '商品ID',
prop: 'id'
......@@ -130,10 +114,11 @@ export default {
label: '产品状态',
prop: 'state',
formatter: (cellValue) => {
return {
0: '上架',
1: '下架'
}[cellValue.state]
// return {
// 0: '上架',
// 1: '下架'
// }[cellValue.state]
return '上架'
}
}]
},
......@@ -141,27 +126,24 @@ export default {
detailVisible: false,
// 基本数据
baseData: {
product1: [{
confId: 1,
confKey: '分类1'
}],
product2: [{
confId: 1,
confKey: '分类2'
}],
productTypeList: [],
brandList: []
}
},
}
},
mounted() {
// console.log(storeDetail)
// var allOpt = { confId: '', confKey: '全部' }
// this.baseData.product.unshift(allOpt)
// this.baseData.brandList.unshift(allOpt)
this.getProductType()
},
methods: {
getProductType(){
let prarms = {}
getType(prarms).then(res => {
this.baseData.productTypeList = res || []
});
},
beforeSearchFn() {
return new Promise(resolve => {
console.log('搜索前操作--')
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!