Commit 62e2e1be authored by XieZhiXiong's avatar XieZhiXiong

fix: 修复 渠道数据为 null 报错的问题

parent 5b7418e5
......@@ -12,6 +12,7 @@ import { useLinkageUtils } from '@/utils/formEffectUtils';
import { PublicApi } from '@/services/api';
import { GetMemberAbilitySubGetResponse } from '@/services/MemberApi';
import { initDetailSchema } from './schema';
import { legoState } from 'lingxi-editor-core';
// import { getAuth } from '@/utils/auth';
const formActions = createFormActions();
......@@ -352,11 +353,13 @@ const MemberForm: React.FC<MemberFormProps> = ({
if (res.code !== 1000) {
return;
}
const {
let {
channelLevelTag = '',
channelTypes = [],
upperMembers = [],
channelTypes,
upperMembers,
} = res.data;
channelTypes = channelTypes || [];
upperMembers = upperMembers || [];
formActions.setFieldState('tabs', state => {
state.props['x-component-props'] =
state.props['x-component-props'] || {};
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2021-05-24 17:47:32
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-06-02 18:47:45
* @LastEditTime: 2021-06-09 10:54:28
* @Description: 审核Form抽屉
*/
import React, { useEffect } from 'react';
......@@ -156,10 +156,12 @@ const VerifyComingDataDrawer: React.FC<IProps> = (props: IProps) => {
if (!channelInfo) {
return;
}
const {
upperMembers = [],
channelTypes = [],
let {
upperMembers,
channelTypes,
} = channelInfo;
upperMembers = upperMembers || [];
channelTypes = channelTypes || [];
const channelType = channelTypes.map(item => ({ label: item.channelTypeName, value: item.channelTypeId }));
// 渠道上级id,如果没有也是返回只有一项的数组
......
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