添加编码

This commit is contained in:
yunkexin 2026-01-21 14:49:42 +08:00
parent 5260b510b6
commit 45a2fec144

View File

@ -14,6 +14,12 @@ class GuideCanvas extends Component {
};
}
componentDidMount() {
const { baseConfig = {} } = this.props.login;
const sysName = baseConfig.SYS_NAME || '';
let sysNameParam = '';
if (sysName) {
sysNameParam = `&sysName=${btoa(encodeURIComponent(sysName))}`;
}
QRCode.toCanvas(config.guideSeverHost, { errorCorrectionLevel: 'L', width: 140 }, function (err, canvas) {
if (err) throw err;
let container = document.getElementById('canvas1');
@ -33,7 +39,7 @@ class GuideCanvas extends Component {
}
});
QRCode.toCanvas(
config.h5Web + '#/pages/index/index?OrgId=' + this.props.login.OrgId,
config.h5Web + '#/pages/index/index?OrgId=' + this.props.login.OrgId + sysNameParam,
{ errorCorrectionLevel: 'L', width: 140 },
function (err, canvas) {
if (err) throw err;