Commit 6a44611a authored by Xuguangxing's avatar Xuguangxing

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

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