|
@@ -39,9 +39,16 @@
|
|
|
// import { Download } from '@element-plus/icons-vue';
|
|
// import { Download } from '@element-plus/icons-vue';
|
|
|
import { QrCode } from '@/components/Qrcode/index';
|
|
import { QrCode } from '@/components/Qrcode/index';
|
|
|
import { useGlobSetting } from '@/hooks/setting';
|
|
import { useGlobSetting } from '@/hooks/setting';
|
|
|
- import { ref } from 'vue';
|
|
|
|
|
|
|
+ import urlJoin from 'url-join';
|
|
|
|
|
+ import { computed, ref } from 'vue';
|
|
|
const globSetting = useGlobSetting();
|
|
const globSetting = useGlobSetting();
|
|
|
- const qrCodeUrl = ref(globSetting.appDownloadUrl);
|
|
|
|
|
|
|
+ const qrCodeUrl = computed(() => {
|
|
|
|
|
+ const url = globSetting.appDownloadUrl || '';
|
|
|
|
|
+ if (url?.startsWith('http') || url?.startsWith('//')) {
|
|
|
|
|
+ return url;
|
|
|
|
|
+ }
|
|
|
|
|
+ return urlJoin(window.location.origin, url);
|
|
|
|
|
+ });
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
<style scoped lang="scss">
|
|
<style scoped lang="scss">
|