@GetMapping("/getQRCode/{id}/{chuanming}/{host}")
@ResponseBody
public void generateQRCode(@PathVariable("id") String id, @PathVariable("chuanming") String chuanming, @PathVariable("host") String host,
HttpServletResponse response) {
String qrCodeUrl = host + "/charsming/bordingShip/mobile?id=" + id + "&chuanming=" + chuanming;
try {
QrConfig qrConfig = new QrConfig(300, 300);
QrCodeUtil.generate(qrCodeUrl, qrConfig, "png", response.getOutputStream());
} catch (IOException e) {
e.printStackTrace();
}
}
js
//二维码
function resetPwd(id,chuanming) {
var host = window.location.host
layer.open({
type: 1,
title: '船舶二维码',
maxmin: true,
shadeClose: false, // 点击遮罩关闭层
content: ``
});
}



