fix: NuclideReview 返回为空时的处理
This commit is contained in:
		
							parent
							
								
									a733ae0688
								
							
						
					
					
						commit
						6cc9d9ae69
					
				|  | @ -268,8 +268,6 @@ export default { | |||
|           } | ||||
| 
 | ||||
|           this.handleResData(result) | ||||
|           this.isLoading = false | ||||
| 
 | ||||
|           if (this.nuclide && this.nuclideList.length) { | ||||
|             this.currNuclide = this.nuclide | ||||
|             this.getInfoByNuclide() | ||||
|  | @ -279,11 +277,25 @@ export default { | |||
|         } | ||||
|       } catch (error) { | ||||
|         console.error(error) | ||||
|       } finally { | ||||
|         this.isLoading = false | ||||
|       } | ||||
|     }, | ||||
| 
 | ||||
|     // 处理返回的数据 | ||||
|     handleResData(result) { | ||||
|       if(!result) { | ||||
|         result = { | ||||
|           chart: [], | ||||
|           halfLife: null, | ||||
|           halfLifeErr: null, | ||||
|           lines: null, | ||||
|           list: [], | ||||
|           name: '', | ||||
|           table: [], | ||||
|         } | ||||
|       } | ||||
| 
 | ||||
|       const { chart, halfLife, halfLifeErr, lines, list, name, table } = result | ||||
| 
 | ||||
|       this.info = { | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user