Переглянути джерело

✅ test: 企业微信扫码登录3

WanGxC 1 рік тому
батько
коміт
bebc1de180
1 змінених файлів з 27 додано та 27 видалено
  1. 27 27
      src/views/system/login/component/scan.vue

+ 27 - 27
src/views/system/login/component/scan.vue

@@ -1,38 +1,38 @@
-<template>
-	<div class="login-scan-container">
-		<div ref="qrcodeRef"></div>
-		<div class="font12 mt20 login-msg">{{ $t('message.scan.text') }}</div>
-	</div>
-</template>
-
 <script lang="ts">
 import { ref, defineComponent, onMounted } from 'vue';
 import QRCode from 'qrcodejs2-fixes';
 
 export default defineComponent({
-	name: 'loginScan',
-	setup() {
-		const qrcodeRef = ref<HTMLElement | null>(null);
-		// 初始化生成二维码
-		const initQrcode = () => {
-			(qrcodeRef.value as HTMLElement).innerHTML = '';
-			new QRCode(qrcodeRef.value, {
-				text: `https://jq.qq.com/?_wv=1027&k=hUu2GeU1`,
-				width: 260,
-				height: 260,
-				colorDark: '#000000',
-				colorLight: '#ffffff',
-			});
-		};
-		// 页面加载时
-		onMounted(() => {
-			initQrcode();
-		});
-		return { qrcodeRef };
-	},
+  name: 'loginScan',
+  setup() {
+    const qrcodeRef = ref<HTMLElement | null>(null);
+    // 初始化生成二维码
+    const initQrcode = () => {
+      (qrcodeRef.value as HTMLElement).innerHTML = '';
+      new QRCode(qrcodeRef.value, {
+        text: `https://jq.qq.com/?_wv=1027&k=hUu2GeU1`,
+        width: 260,
+        height: 260,
+        colorDark: '#000000',
+        colorLight: '#ffffff',
+      });
+    };
+    // 页面加载时
+    onMounted(() => {
+      initQrcode();
+    });
+    return { qrcodeRef };
+  },
 });
 </script>
 
+<template>
+	<div class="login-scan-container">
+		<div ref="qrcodeRef"></div>
+		<div class="font12 mt20 login-msg">{{ $t('message.scan.text') }}</div>
+	</div>
+</template>
+
 <style scoped lang="scss">
 .login-scan-animation {
 	opacity: 0;