二维码的生成
String uuid = UUID.randomUUID().toString();
Qrcode code = new Qrcode();
try {
Blob blob = new Blob();
code.create(Constants.BASE_URL+"m/registerMobile?recommendMobile="+user.mobile, BarcodeFormat.QR_CODE, 175, 175, new File(blob.getStore(), uuid).getAbsolutePath(), "png");
//code.create("http://10.0.0.13:9000/m/registerMobile?recommendMobile="+user.mobile, BarcodeFormat.QR_CODE, 175, 175, new File(blob.getStore(), uuid).getAbsolutePath(), "png");
user.qr_code = uuid;
} catch (Exception e) {
e.printStackTrace();
Logger.info("创建二维码图片失败"+e.getMessage());
error.code = -5;
error.msg = "对不起,由于平台出现故障,此次注册失败!";
return error.code;
}