This commit is contained in:
laodaming 2023-06-15 19:53:15 +08:00
parent 4a5d84fb22
commit 0af68d5f32

View File

@ -171,7 +171,7 @@ func (l *GetOrderInvoiceLogic) GetOrderInvoice(req *types.GetOrderInvoiceReq, us
mainHtml = strings.ReplaceAll(mainHtml, "{{name}}", userName) mainHtml = strings.ReplaceAll(mainHtml, "{{name}}", userName)
mainHtml = strings.ReplaceAll(mainHtml, "{{first_style1}}", firstStyle1) mainHtml = strings.ReplaceAll(mainHtml, "{{first_style1}}", firstStyle1)
mainHtml = strings.ReplaceAll(mainHtml, "{{first_style2}}", firstStyle2) mainHtml = strings.ReplaceAll(mainHtml, "{{first_style2}}", firstStyle2)
mainHtml = strings.ReplaceAll(mainHtml, "{{h5Url}}", "h5Url??????????????") // TODO ???????????? mainHtml = strings.ReplaceAll(mainHtml, "{{h5Url}}", "http://www.baidu.com") // TODO ????????????
mainHtml = strings.ReplaceAll(mainHtml, "{{order_expire_time}}", time.Unix(*orderInfo.Ctime, req.TimeZone*60).Format("02 Jan,2006")) mainHtml = strings.ReplaceAll(mainHtml, "{{order_expire_time}}", time.Unix(*orderInfo.Ctime, req.TimeZone*60).Format("02 Jan,2006"))
//html内容页面转pdf的base64 //html内容页面转pdf的base64
prfBase64, err := pdf.HtmlToPdfBase64(mainHtml, 2) prfBase64, err := pdf.HtmlToPdfBase64(mainHtml, 2)