mirror of
				https://gitee.com/dromara/mayfly-go
				synced 2025-11-04 16:30:25 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			12 lines
		
	
	
		
			206 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			12 lines
		
	
	
		
			206 B
		
	
	
	
		
			Go
		
	
	
	
	
	
package api
 | 
						|
 | 
						|
import (
 | 
						|
	"mayfly-go/pkg/captcha"
 | 
						|
	"mayfly-go/pkg/req"
 | 
						|
)
 | 
						|
 | 
						|
func GenerateCaptcha(rc *req.Ctx) {
 | 
						|
	id, image := captcha.Generate()
 | 
						|
	rc.ResData = map[string]any{"base64Captcha": image, "cid": id}
 | 
						|
}
 |