Showing
4 changed files
with
67 additions
and
2 deletions
app/components/select/select-sell-type.vue
0 → 100644
1 | +<template> | ||
2 | + <Select :value="handleValue" @on-change="updateValue" clearable placeholder="请选择"> | ||
3 | + <Option :value="item.value" v-for="item in list" :key="item.value">{{item.label}}</Option> | ||
4 | + </Select> | ||
5 | +</template> | ||
6 | + | ||
7 | +<script> | ||
8 | + | ||
9 | + import {SellTypeService} from 'services/product'; | ||
10 | + | ||
11 | + export default { | ||
12 | + name: 'select-sell-type', | ||
13 | + props: { | ||
14 | + value: { | ||
15 | + type: String | ||
16 | + } | ||
17 | + }, | ||
18 | + data() { | ||
19 | + return { | ||
20 | + handleValue: this.value, | ||
21 | + list: [] | ||
22 | + }; | ||
23 | + }, | ||
24 | + mounted() { | ||
25 | + SellTypeService.getSellType('/platform/getSellType').then((result) => { | ||
26 | + if (result.code === 200) { | ||
27 | + this.list = result.data; | ||
28 | + } | ||
29 | + }); | ||
30 | + }, | ||
31 | + methods: { | ||
32 | + updateValue(newValue) { | ||
33 | + this.$emit('input', newValue); | ||
34 | + } | ||
35 | + }, | ||
36 | + watch: { | ||
37 | + value(newValue) { | ||
38 | + this.handleValue = newValue; | ||
39 | + } | ||
40 | + } | ||
41 | + | ||
42 | + }; | ||
43 | +</script> | ||
44 | + | ||
45 | +<style> | ||
46 | + | ||
47 | +</style> |
@@ -4,6 +4,7 @@ import ColorService from './color-service'; | @@ -4,6 +4,7 @@ import ColorService from './color-service'; | ||
4 | import SizeService from './size-service'; | 4 | import SizeService from './size-service'; |
5 | import ProductCreateService from './product-create-service'; | 5 | import ProductCreateService from './product-create-service'; |
6 | import ProductService from './product-service'; | 6 | import ProductService from './product-service'; |
7 | +import SellTypeService from './sell-type-service'; | ||
7 | 8 | ||
8 | export { | 9 | export { |
9 | BrandService, | 10 | BrandService, |
@@ -11,5 +12,6 @@ export { | @@ -11,5 +12,6 @@ export { | ||
11 | ProductService, | 12 | ProductService, |
12 | SortService, | 13 | SortService, |
13 | ColorService, | 14 | ColorService, |
14 | - SizeService | 15 | + SizeService, |
16 | + SellTypeService | ||
15 | }; | 17 | }; |
app/services/product/sell-type-service.js
0 → 100644
@@ -78,7 +78,8 @@ let domainApis = { | @@ -78,7 +78,8 @@ let domainApis = { | ||
78 | deleteCategoryLinkProduct: '/SellerShopController/deleteCategoryLinkProduct', | 78 | deleteCategoryLinkProduct: '/SellerShopController/deleteCategoryLinkProduct', |
79 | getRemoteImageUrlBySku: '/product/getRemoteImageUrlBySku', | 79 | getRemoteImageUrlBySku: '/product/getRemoteImageUrlBySku', |
80 | importSeller: '/batch/importSeller', | 80 | importSeller: '/batch/importSeller', |
81 | - downloadFile: '/exceltemplate/download/CreateProductForShops' | 81 | + downloadFile: '/exceltemplate/download/CreateProductForShops', |
82 | + getSellType: '/SellerProductController/getSellType' | ||
82 | }, | 83 | }, |
83 | shop: { | 84 | shop: { |
84 | login: '/loginInter', | 85 | login: '/loginInter', |
-
Please register or login to post a comment