root 5 lat temu
rodzic
commit
05dbfa93a3

+ 6 - 5
src/main/java/io/renren/modules/app/controller/QRCodeTest.java

55
	@GetMapping("qcodetesturl")
55
	@GetMapping("qcodetesturl")
56
    @ApiOperation("获取二维码图片地址")
56
    @ApiOperation("获取二维码图片地址")
57
    public R  getCodeImgUrl(String text)throws IOException {
57
    public R  getCodeImgUrl(String text)throws IOException {
58
		String imgpath = "/home/qcodetest/";
58
		String imgpath = "/kexiu/webdata/data/qcode";
59
		long t = new Date().getTime();
59
                String rpath = "www.ekexiu.com/data/qcode/";
60
		String imgurl = imgpath.t;
60
		String imgurl = "";
61
		try{
61
                try{
62
			imgurl = qRCodeUtils.encode(text, imgurl);
62
		     String file = qRCodeUtils.encode(text, null, imgpath, false);
63
		     imgurl = rpath+file;
63
		}catch(Exception e){
64
		}catch(Exception e){
64
			e.printStackTrace();
65
			e.printStackTrace();
65
		}
66
		}