Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yoho-shop-manage
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
htoooth
2017-06-12 15:49:16 +0800
Commit
2c9970d583e1c7527cfe16053612537f931b0ba1
1 parent
6b4e07ef
add sell type
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
67 additions
and
2 deletions
app/components/select/select-sell-type.vue
app/services/product/index.js
app/services/product/sell-type-service.js
server/common/api-domain.js
app/components/select/select-sell-type.vue
0 → 100644
View file @
2c9970d
<template>
<Select :value="handleValue" @on-change="updateValue" clearable placeholder="请选择">
<Option :value="item.value" v-for="item in list" :key="item.value">{{item.label}}</Option>
</Select>
</template>
<script>
import {SellTypeService} from 'services/product';
export default {
name: 'select-sell-type',
props: {
value: {
type: String
}
},
data() {
return {
handleValue: this.value,
list: []
};
},
mounted() {
SellTypeService.getSellType('/platform/getSellType').then((result) => {
if (result.code === 200) {
this.list = result.data;
}
});
},
methods: {
updateValue(newValue) {
this.$emit('input', newValue);
}
},
watch: {
value(newValue) {
this.handleValue = newValue;
}
}
};
</script>
<style>
</style>
...
...
app/services/product/index.js
View file @
2c9970d
...
...
@@ -4,6 +4,7 @@ import ColorService from './color-service';
import
SizeService
from
'./size-service'
;
import
ProductCreateService
from
'./product-create-service'
;
import
ProductService
from
'./product-service'
;
import
SellTypeService
from
'./sell-type-service'
;
export
{
BrandService
,
...
...
@@ -11,5 +12,6 @@ export {
ProductService
,
SortService
,
ColorService
,
SizeService
SizeService
,
SellTypeService
};
...
...
app/services/product/sell-type-service.js
0 → 100644
View file @
2c9970d
/**
* Created by TaoHuang on 2017/6/12.
*/
import
Service
from
'../service'
;
class
SellTypeService
extends
Service
{
getSellType
()
{
return
this
.
get
(
'/platform/getSellType'
,
{
cache
:
true
});
}
}
export
default
SellTypeService
;
\ No newline at end of file
...
...
server/common/api-domain.js
View file @
2c9970d
...
...
@@ -78,7 +78,8 @@ let domainApis = {
deleteCategoryLinkProduct
:
'/SellerShopController/deleteCategoryLinkProduct'
,
getRemoteImageUrlBySku
:
'/product/getRemoteImageUrlBySku'
,
importSeller
:
'/batch/importSeller'
,
downloadFile
:
'/exceltemplate/download/CreateProductForShops'
downloadFile
:
'/exceltemplate/download/CreateProductForShops'
,
getSellType
:
'/SellerProductController/getSellType'
},
shop
:
{
login
:
'/loginInter'
,
...
...
Please
register
or
login
to post a comment