Commit ac6889d5 authored by Xuguangxing's avatar Xuguangxing

feat: 支持频道商品及商品促销组件

parent 9eb182cd
......@@ -3,15 +3,15 @@ const protocol = EASY_ENV_IS_BROWSER ? window.location.protocol : 'http';
const hostMap = {
apiHost: `http://localhost:7002/`,
// apiHost: `http://192.168.28.199:7001/`,
// apiHost: 'https://quantum-blocks-test1.liangkebang.net/',
h5Host: 'https://quantum-h5-test1.liangkebang.net',
// apiHost: 'https://quantum-blocks-yxm.liangkebang.net/',
h5Host: 'https://quantum-h5-yxm.liangkebang.net',
qiniuHost: `https://appsync.lkbang.net`,
shenceUrl: `${protocol}//bn.xyqb.com/sa?project=default`,
opapiHost: `https://opapi-test1.liangkebang.net`,
opapiHost: `https://opapi-yxm.liangkebang.net`,
qiniuUpHost: `${protocol}//up-z0.qiniup.com`,
// kdspHost: 'https://kdsp-api-test1.liangkebang.net',
talosHost: 'https://talos-test1.liangkebang.net',
kdspHost: 'https://kdsp-api-test1.liangkebang.net',
// kdspHost: 'https://kdsp-api-yxm.liangkebang.net',
talosHost: 'https://talos-yxm.liangkebang.net',
kdspHost: 'https://kdsp-api-yxm.liangkebang.net',
yxmTenantId: 560761,
appIdMap: {
560761: 'wxe16bf9293671506c',
......
<template>
<div class="GoodsChannelTypeSelectorContainer">
<span class="option" @click="select(item.id)" v-for="(item, index) in options" :key="index" :class="{selected: item.id == selected}">
{{item.label}}
</span>
<!-- <Button type="primary" @click="save">保存</Button> -->
</div>
</template>
<script>
export default {
props: {
value: {
type: String,
default: "1"
}
},
watch: {
selected(val) {
this.$emit('input', val);
}
},
methods: {
select(id) {
this.selected = id;
}
},
data() {
return {
options: [
{id: '1', label: '单行'},
{id: '2', label: '双行'},
],
selected: 0
}
},
created() {
this.selected = this.value;
}
}
</script>
<style scoped lang="less">
.option{
cursor: pointer;
border-radius: 4px;
line-height:normal;
display: inline-block;
padding: 3px 5px;
border: 1px solid #dddee1;
margin: 0 2px;
user-select: none;
&.selected, &:hover{
border-color: #57a3f3;
box-shadow: 0px 0px 0px 2px rgb(45 140 240 / 20%)
}
}
</style>
<template>
<div class="GoodsPromotionTypeSelectorContainer">
<span class="option" @click="select(item.id)" v-for="(item, index) in options" :key="index" :class="{selected: item.id == selected}">
{{item.label}}
</span>
<!-- <Button type="primary" @click="save">保存</Button> -->
</div>
</template>
<script>
export default {
props: {
value: {
type: String,
default: "1"
}
},
watch: {
selected(val) {
this.$emit('input', val);
}
},
methods: {
select(id) {
this.selected = id;
}
},
data() {
return {
options: [
{id: '1', label: '左一带五'},
{id: '2', label: '右一带五'},
{id: '3', label: '左二带四'},
{id: '4', label: '右二带四'},
],
selected: 0
}
},
created() {
this.selected = this.value;
}
}
</script>
<style scoped lang="less">
.option{
cursor: pointer;
border-radius: 4px;
line-height:normal;
display: inline-block;
padding: 3px 5px;
border: 1px solid #dddee1;
margin: 0 2px;
user-select: none;
&.selected, &:hover{
border-color: #57a3f3;
box-shadow: 0px 0px 0px 2px rgb(45 140 240 / 20%)
}
}
</style>
......@@ -15,6 +15,8 @@ import SwiperStyleTypeSelector from './component/SwiperStyleTypeSelector/index.v
import SwiperListSelector from './component/SwiperListSelector/index.vue';
import GoodsSwiperSelector from './component/GoodsSwiperSelector/index.vue';
import DiscountGoodsSelectorV2 from './component/DiscountGoodsSelectorV2/index.vue';
import GoodsChannelTypeSelector from './component/GoodsChannelTypeSelector/index.vue';
import GoodsPromotionTypeSelector from './component/GoodsPromotionTypeSelector/index.vue';
import BaseSelect from './component/BaseSelect/index.vue';
import ComponentSelect from './component/ComponentSelect/index.vue';
import FormList from './component/FormList/index.vue';
......@@ -48,7 +50,9 @@ const allComponentsMap = getAllScheme();
DiscountGoodsSelectorV2,
SwiperStyleTypeSelector,
SwiperListSelector,
GoodsSwiperSelector
GoodsSwiperSelector,
GoodsChannelTypeSelector,
GoodsPromotionTypeSelector
}, name: 'DynamicForm' })
export default class DynamicForm extends Mixins(ContextMenuMixin, DynamicFormMixin) {
@State(state => state.editor.curEleIndex) curEleIndex;
......
......@@ -2176,9 +2176,9 @@
}
},
"@qg/citrus-ui": {
"version": "0.3.51-beta1",
"resolved": "http://npmprivate.quantgroups.com/@qg%2fcitrus-ui/-/citrus-ui-0.3.51-beta1.tgz",
"integrity": "sha512-PGXPvL9hAjqeNlG/saf6sINxFYc+a5QBCohZ5bmkfOeH5/s/wBgwS0S0CMe25/prqrZsa50JRzarDHef4MB2bw==",
"version": "0.3.51-beta2",
"resolved": "http://npmprivate.quantgroups.com/@qg%2fcitrus-ui/-/citrus-ui-0.3.51-beta2.tgz",
"integrity": "sha512-2MASWLJhX0m9Ek/6MHDj9nLliX5WH7qSW4ank0cFdwOz2LSOO26AJ2kHxjHiCMS6mD0E0fwRtCUKwNiDSBq2yw==",
"requires": {
"@better-scroll/core": "^2.1.1",
"@qg/cherry-ui": "^2.23.9",
......
......@@ -8,7 +8,7 @@
"test": "cross-env NODE_ENV=production EGG_SERVER_ENV=sit egg-scripts start --port 80 --workers 1",
"stop": "egg-scripts stop",
"backend": "nohup egg-scripts start --port 7001 --workers 4",
"dev": "cross-env NODE_ENV=test APOLLO_CLUSTER=k8s NAMESPACE=test1 npm run apollo && egg-bin dev -r egg-ts-helper/register --port 7002",
"dev": "cross-env NODE_ENV=test APOLLO_CLUSTER=k8s NAMESPACE=yxm npm run apollo && egg-bin dev -r egg-ts-helper/register --port 7002",
"debug": "egg-bin debug -r egg-ts-helper/register",
"apollo": "node bin/apollo.js",
"build": "npm run tsc && cross-env NODE_ENV=production APOLLO_CLUSTER=3C npm run apollo && cross-env COS_ENV=production easy build --devtool",
......@@ -30,7 +30,7 @@
"@hubcarl/json-typescript-mapper": "^2.0.0",
"@qg/apollo-nodejs": "^2.1.2",
"@qg/cherry-ui": "2.23.10",
"@qg/citrus-ui": "0.3.51-beta1",
"@qg/citrus-ui": "0.3.51-beta2",
"@riophae/vue-treeselect": "^0.4.0",
"@types/lodash": "^4.14.117",
"@types/node": "^10.12.0",
......@@ -121,4 +121,4 @@
"commit-msg": "commitlint -e $HUSKY_GIT_PARAMS"
}
}
}
\ No newline at end of file
}
Markdown is supported
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