Explorar o código

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

lanjianrong %!s(int64=4) %!d(string=hai) anos
pai
achega
ba44522bb0
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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)