Commit 9c211994 authored by Xuguangxing's avatar Xuguangxing

feat: 增加抢购组件选择器

parent 629b91e0
......@@ -86,4 +86,9 @@ export default {
},
});
},
getActivityList(params) {
return http.post(`${config.opapiHost}/kdspOp/api/kdsp/activity/activity-info/current-valid-activity`, params, {
accessToken: true
});
}
};
\ No newline at end of file
<template>
<div class="snapUpActivityContainer">
<Select v-model="activityInfoId">
<Option v-for="item in list" :value="item.id" :key="item.id">{{ `id ${item.id} - ${item.title}` }}</Option>
</Select>
<!-- <Button type="primary" @click="save">保存</Button> -->
</div>
</template>
<script>
import operationApi from '@api/operation.api';
export default {
props: {
value: {
type: Number,
default: 0
}
},
watch: {
activityInfoId(val) {
this.$emit('input', val);
}
},
components: {
},
data() {
return {
list: [],
activityInfoId: ''
}
},
created() {
this.activityInfoId = this.value;
this.getActivityList();
console.log(this.value)
},
methods: {
async getActivityList() {
const res = await operationApi.getActivityList({
templateType: 11
});
this.list = res;
}
}
}
</script>
<style scoped lang="less">
</style>
......@@ -6,6 +6,7 @@ import DynamicFormMixin from './component/mixins/dynamicForm.mixin';
import Upload from './component/Upload/index.vue';
import ColorSelector from './component/ColorSelector/index.vue';
import DiscountGoodsSelector from './component/DiscountGoodsSelector/index.vue';
import SnapUpActivitySelector from './component/SnapUpActivitySelector/index.vue';
import BaseSelect from './component/BaseSelect/index.vue';
import ComponentSelect from './component/ComponentSelect/index.vue';
import FormList from './component/FormList/index.vue';
......@@ -19,7 +20,7 @@ import { getAllScheme } from '../../../store/modules/editor/scheme';
import EventBus from '@service/eventBus.service';
const allComponentsMap = getAllScheme();
@Component({ components: { Upload, ColorSelector, BaseSelect, FormList, Textarea, Number, ComponentSelect, GoodsTableModal, CouponTableModal, ColumnSelector, DiscountGoodsSelector }, name: 'DynamicForm' })
@Component({ components: { Upload, ColorSelector, BaseSelect, FormList, Textarea, Number, ComponentSelect, GoodsTableModal, CouponTableModal, ColumnSelector, DiscountGoodsSelector, SnapUpActivitySelector }, name: 'DynamicForm' })
export default class DynamicForm extends Mixins(ContextMenuMixin, DynamicFormMixin) {
@State(state => state.editor.curEleIndex) curEleIndex;
@State(state => state.editor.curChildIndex) curChildIndex;
......
......@@ -2176,9 +2176,9 @@
}
},
"@qg/citrus-ui": {
"version": "0.3.39",
"resolved": "http://npmprivate.quantgroups.com/@qg%2fcitrus-ui/-/citrus-ui-0.3.39.tgz",
"integrity": "sha512-gPYukKwEaI/BAbIace1c0Zpw8nNtfQYy5AE1NOuYZfdwT8qZ8b4a2RZwGgaeNBL+wK5sbZy48SiKUEJPqU5grQ==",
"version": "0.3.39-beta1",
"resolved": "http://npmprivate.quantgroups.com/@qg%2fcitrus-ui/-/citrus-ui-0.3.39-beta1.tgz",
"integrity": "sha512-e+u2Tw7NcoAxx6IJR0kOHy1/hi6UzMIW7GRpKNIvXtyJ+8gM6PwKS4uqD36yXN2uF8E4fCCC9rFKukjNbBCFPw==",
"requires": {
"@better-scroll/core": "^2.1.1",
"@qg/cherry-ui": "^2.23.9",
......
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