Jary
Results
1
comments of
Jary
刚好我也有这个需求,我研究了一下,解决了,给你贴上解决方法 ```go // 生成图片 img, imageText := mCaptcha.Create(4, captcha.NUM) emptyBuff := bytes.NewBuffer(nil) _ = png.Encode(emptyBuff, img) response.WinJson(r, "成功", &g.Map{ "id": imageCodeId, "b64s": "data:image/png;base64," + base64.StdEncoding.EncodeToString(emptyBuff.Bytes()), }) ```