Browse Source

feat: 给处理自动编号逻辑方法添加容错处理

lanjianrong 4 years ago
parent
commit
ba44522bb0
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/utils/util.ts

+ 1 - 1
src/utils/util.ts

@@ -226,7 +226,7 @@ const handleIntoBidsection = async (permission_type: 'contract' | 'safe' | 'qual
  * @param type 规则类型
  */
 const handleAutoCode = async (bidsectionId: string, type: string) => {
-  const { code = -1, data: { rule = '', newCode = '' } } = await apiAutoCode(bidsectionId, type)
+  const { code = -1, data: { rule = '', newCode = '' } = { rule: '', newCode: '' } } = await apiAutoCode(bidsectionId, type)
   const ruleArr: string[] = []
   if (code === consts.RET_CODE.SUCCESS) {
       const code = JSON.parse(rule)