Commit 0eb56028 authored by Xuguangxing's avatar Xuguangxing

feat: 修复保存时trim报错

parent 4b39d2b4
......@@ -101,6 +101,7 @@ export default class DashBoard extends Mixins(ContextMenuMixin, GoodsTabsMixin,
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;
if (this.uuid) { pageInfo.uuid = this.uuid; }
// 兼容老数据保存时redirectUrl为null的情况
pageInfo.redirectUrl = pageInfo.redirectUrl && typeof pageInfo.redirectUrl == 'string' ? pageInfo.redirectUrl.trim() : '';
if (pageInfo.redirectUrl.length) {
if (pageInfo.redirectUrl.indexOf('https://') != 0 && pageInfo.redirectUrl.indexOf('xyqb://') != 0) {
......
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