diff --git a/pages/chat/components/uploadQrcode.vue b/pages/chat/components/uploadQrcode.vue index 78d0b5f..6f3b0b0 100644 --- a/pages/chat/components/uploadQrcode.vue +++ b/pages/chat/components/uploadQrcode.vue @@ -179,11 +179,23 @@ async function initQrCode() { } function makeQrcode() { - const protocol = window.location.protocol; - const host = window.location.host; - const isLocal = host.includes('localhost') || host.includes('127.0.0.1'); - const pathPrefix = isLocal ? '' : '/rgpp-api/all-in-one'; - const htmlPath = `${protocol}//${host}${pathPrefix}/static/upload.html?sessionId=${uuid.value}&uploadApi=${config.baseUrl}/app/kiosk/upload&fileCount=${props.leaveFileCount}`; + const protocol = window.location.protocol; + const host = window.location.host; + const isLocal = host.includes('localhost') || host.includes('127.0.0.1'); + // const pathPrefix = isLocal ? '' : '/rgpp-api/all-in-one'; + let pathPrefix = ''; + if (host.includes('localhost') || host.includes('127.0.0.1')) { + pathPrefix = ''; + } else if (host.includes('qd.zhaopinzao8dian.com')) { + // 外网测试环境 + pathPrefix = '/app'; + } else if (host.includes('fw.rc.qingdao.gov.cn')) { + // 青岛政务网环境 + pathPrefix = '/rgpp-api/all-in-one'; + } else { + pathPrefix = ''; + } + const htmlPath = `${protocol}//${host}${pathPrefix}/static/upload.html?sessionId=${uuid.value}&uploadApi=${config.baseUrl}/app/kiosk/upload`; // const htmlPath = `${window.location.host}/static/upload.html?sessionId=${uuid.value}&uploadApi=${ // config.baseUrl + '/app/kiosk/upload'