更新
This commit is contained in:
parent
5029a6a7b2
commit
b44429d720
@ -186,7 +186,8 @@ func ExportRegister(c *gin.Context) {
|
|||||||
data = append(data, &temp)
|
data = append(data, &temp)
|
||||||
}
|
}
|
||||||
fmt.Println("=======================组装完数据============================")
|
fmt.Println("=======================组装完数据============================")
|
||||||
fmt.Println(data)
|
fmt.Println(columns)
|
||||||
|
fmt.Println("=======================转换成excel============================")
|
||||||
_, _ = utils.ToExcelByType(columns, data, "slice", filePath)
|
_, _ = utils.ToExcelByType(columns, data, "slice", filePath)
|
||||||
//处理图片
|
//处理图片
|
||||||
err = logic.DealExcelImg(filePath)
|
err = logic.DealExcelImg(filePath)
|
||||||
@ -194,6 +195,7 @@ func ExportRegister(c *gin.Context) {
|
|||||||
response.ResponseQuickMsg(c, msg.Fail, err.Error(), nil)
|
response.ResponseQuickMsg(c, msg.Fail, err.Error(), nil)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
fmt.Println("=======================处理图片============================")
|
||||||
var httpType string
|
var httpType string
|
||||||
if config.Data.System.IsHttps {
|
if config.Data.System.IsHttps {
|
||||||
httpType = model.HttpsType
|
httpType = model.HttpsType
|
||||||
@ -202,6 +204,8 @@ func ExportRegister(c *gin.Context) {
|
|||||||
}
|
}
|
||||||
var exportUrl string
|
var exportUrl string
|
||||||
exportUrl = fmt.Sprintf("%s%s/static/%s", httpType, c.Request.Host, exportFileName)
|
exportUrl = fmt.Sprintf("%s%s/static/%s", httpType, c.Request.Host, exportFileName)
|
||||||
|
fmt.Println("=======================结束URL============================")
|
||||||
|
fmt.Println(exportUrl)
|
||||||
response.ResponseQuickMsg(c, msg.Ok, resp.Msg, map[string]string{
|
response.ResponseQuickMsg(c, msg.Ok, resp.Msg, map[string]string{
|
||||||
"exportUrl": exportUrl,
|
"exportUrl": exportUrl,
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user