Commit 6a44611a authored by Xuguangxing's avatar Xuguangxing

feat: 页面配置增加优惠券弹窗选项

parent 29a6c92d
...@@ -105,4 +105,9 @@ export default { ...@@ -105,4 +105,9 @@ export default {
accessToken: true accessToken: true
}); });
}, },
getCouponModalList(params) {
return http.post(`${config.opapiHost}/kdspOp/api/kdsp/app/app-config-push/listAll`, params, {
accessToken: true
});
}
}; };
\ No newline at end of file
<template> <template>
<div class="snapUpActivityContainer"> <div class="couponModalSeletor">
<Select v-model="activityInfoId" filterable> <Select v-model="modalId" filterable clearable>
<Option v-for="item in list" :value="item.id" :key="item.id">{{ `id ${item.id} - ${item.title}` }}</Option> <Option v-for="item in list" :value="item.id" :key="item.id">{{ `id ${item.id} - ${item.name}` }}</Option>
</Select> </Select>
<!-- <Button type="primary" @click="save">保存</Button> --> <!-- <Button type="primary" @click="save">保存</Button> -->
</div> </div>
...@@ -16,8 +16,11 @@ export default { ...@@ -16,8 +16,11 @@ export default {
} }
}, },
watch: { watch: {
activityInfoId(val) { value(val) {
this.$emit('input', val); this.modalId = val;
},
modalId(val) {
this.$emit('input', val ? val : '');
} }
}, },
components: { components: {
...@@ -25,25 +28,27 @@ export default { ...@@ -25,25 +28,27 @@ export default {
data() { data() {
return { return {
list: [], list: [],
activityInfoId: '' modalId: ''
} }
}, },
created() { created() {
this.activityInfoId = this.value; this.modalId = this.value;
this.getActivityList(); this.getCouponModalList();
console.log(this.value)
}, },
methods: { methods: {
async getActivityList() { async getCouponModalList() {
const res = await operationApi.getActivityList({ const res = await operationApi.getCouponModalList({
templateType: 11, elementType: 4, // 4为优惠券弹窗类型
crowdType: [1], enable: 'VALID'
userType:[]
}); });
for (let i = 0; i < res.length; i++) { const list = res.list.map(item => {
res[i].id = res[i].id.toString(); let obj = {};
} obj.id = item.id.toString();
this.list = res; obj.name = item.componentName;
return obj;
})
console.log(list)
this.list = list;
} }
} }
} }
......
...@@ -179,7 +179,7 @@ export default class DynamicPageForm extends Mixins(ContextMenuMixin) { ...@@ -179,7 +179,7 @@ export default class DynamicPageForm extends Mixins(ContextMenuMixin) {
}, },
]; ];
get propsSchema() { get propsSchema() {
return [...this.titleSchema, ...this.bottomSchema, ...this.floatSchema, ...this.otherProps]; return [...this.titleSchema, ...this.bottomSchema, ...this.floatSchema, ...this.otherProps, ...this.floatModal];
} }
@Watch('cartAndShareBtn', { immediate: true }) @Watch('cartAndShareBtn', { immediate: true })
......
...@@ -113,6 +113,8 @@ export default class DashBoard extends Mixins(ContextMenuMixin, GoodsTabsMixin, ...@@ -113,6 +113,8 @@ export default class DashBoard extends Mixins(ContextMenuMixin, GoodsTabsMixin,
return; return;
} }
} }
// console.log({ pageInfo, pageData: this.pageData }, 0);
// return;
await this.savePageData({ pageInfo, pageData: this.pageData }); await this.savePageData({ pageInfo, pageData: this.pageData });
if (this.uuid) { await this.getPageDate({ pageId: this.uuid }); } if (this.uuid) { await this.getPageDate({ pageId: this.uuid }); }
this.showSubmitPopup = false; this.showSubmitPopup = false;
......
...@@ -100,6 +100,7 @@ export const defaultState = { ...@@ -100,6 +100,7 @@ export const defaultState = {
showPageBottomTip: true, showPageBottomTip: true,
pageBottomTxt: '没有更多啦~', pageBottomTxt: '没有更多啦~',
pageBottomColor: '#333', pageBottomColor: '#333',
couponModal: '',
showBackTop: true, showBackTop: true,
btAttachVal: [ btAttachVal: [
{ {
......
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