Commit a8d4b856 authored by Xuguangxing's avatar Xuguangxing

feat: 修复保存时trim报错

parent 47eca88c
...@@ -101,17 +101,15 @@ export default class DashBoard extends Mixins(ContextMenuMixin, GoodsTabsMixin, ...@@ -101,17 +101,15 @@ export default class DashBoard extends Mixins(ContextMenuMixin, GoodsTabsMixin,
separateAllScheme(pageData.elements); separateAllScheme(pageData.elements);
const pageInfo = { diversion, page: JSON.stringify(pageData), author: user?.account, isPublish, pageName, pageDescribe, pageKeywords, coverImage, isTemplate, shareCoverImage, shareOpenMethod, validStartTime, validEndTime, redirectUrl } as pageInfo; const pageInfo = { diversion, page: JSON.stringify(pageData), author: user?.account, isPublish, pageName, pageDescribe, pageKeywords, coverImage, isTemplate, shareCoverImage, shareOpenMethod, validStartTime, validEndTime, redirectUrl } as pageInfo;
if (this.uuid) { pageInfo.uuid = this.uuid; } if (this.uuid) { pageInfo.uuid = this.uuid; }
pageInfo.redirectUrl = pageInfo.redirectUrl.trim(); pageInfo.redirectUrl = pageInfo.redirectUrl && typeof pageInfo.redirectUrl == 'string' ? pageInfo.redirectUrl.trim() : '';
if (pageInfo.redirectUrl.trim()) { if (pageInfo.redirectUrl.indexOf('https://') != 0 && pageInfo.redirectUrl.indexOf('xyqb://') != 0) {
if (pageInfo.redirectUrl.indexOf('https://') != 0 && pageInfo.redirectUrl.indexOf('xyqb://') != 0) { // 校验活动结束地址链接配置是否满足https和xyqb协议
// 校验活动结束地址链接配置是否满足https和xyqb协议 this.$Notice.error({
this.$Notice.error({ title: '链接地址错误或域名不支持,请重新输入',
title: '链接地址错误或域名不支持,请重新输入', desc: '',
desc: '', });
}); this.showSubmitPopup = false;
this.showSubmitPopup = false; return;
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 }); }
......
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