Commit 8e68cde1 by 陈羽

update: 添加计划时间校验接口

parent 09d9ac4c
......@@ -280,6 +280,8 @@ export default {
dateTime: [], // 计划时间
popupList: [] // 弹窗列表
},
dateTimeCheck: true,
dateTimeTip: '',
rules: {
name: [{ required: true, message: '请输入计划名称', trigger: 'change' }],
dateTime: [{ required: true, validator: validateDateLessYear, trigger: 'change' }]
......@@ -588,7 +590,20 @@ export default {
this.resetField(`putonPageList_${this.curIndex}`);
},
filedAllPopDate() {
this.group.popupList.map((item, index) => this.resetField(`dateTime_${index}`));
const params = {
beginTime: new Date(this.group.dateTime[0]).getTime(),
endTime: new Date(this.group.dateTime[1]).getTime()
};
this.axios.post(`${config.api}/api-marketing/check-popup-plan-time?requestProject=marketing`, params).then(res => {
if (res.data.errorCode !== 0) {
this.$message({
type: 'error',
message: res.data.message
});
} else {
this.group.popupList.map((item, index) => this.resetField(`dateTime_${index}`));
}
});
},
datePickerBulr(elIndex) {
this.dateDelay = 1;
......
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