浏览代码

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

lanjianrong 4 年之前
父节点
当前提交
ba44522bb0
共有 1 个文件被更改,包括 1 次插入1 次删除
  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 规则类型
  * @param type 规则类型
  */
  */
 const handleAutoCode = async (bidsectionId: string, type: string) => {
 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[] = []
   const ruleArr: string[] = []
   if (code === consts.RET_CODE.SUCCESS) {
   if (code === consts.RET_CODE.SUCCESS) {
       const code = JSON.parse(rule)
       const code = JSON.parse(rule)