Parcourir la source

兼容申万系统缩略图

kobe6258 il y a 4 jours
Parent
commit
373cae4e28
1 fichiers modifiés avec 1 ajouts et 3 suppressions
  1. 1 3
      controllers/data_manage/chart_info.go

+ 1 - 3
controllers/data_manage/chart_info.go

@@ -3006,6 +3006,7 @@ func (this *ChartInfoController) ChartInfoBase64Upload() {
 	randStr := utils.GetRandStringNoSpecialChar(28)
 	var fileName, outFileName string
 	fileName = randStr + ".txt"
+	outFileName = randStr + ".png"
 	fileName = uploadDir + fileName
 	if NotBackendGenerate {
 		err := utils.SaveBase64ToFile(imgData, outFileName)
@@ -3021,8 +3022,6 @@ func (this *ChartInfoController) ChartInfoBase64Upload() {
 			br.ErrMsg = "图片保存失败,Err:" + err.Error()
 			return
 		}
-		outFileName = randStr + ".png"
-
 		doneChannel := make(chan bool, 1)
 		errorChannel := make(chan error, 1)
 
@@ -3037,7 +3036,6 @@ func (this *ChartInfoController) ChartInfoBase64Upload() {
 			}
 			doneChannel <- true
 		}()
-
 		select {
 		case <-time.After(30 * time.Second):
 			utils.FileLog.Info("执行超过30秒 杀死超时进程")