初始化项目

This commit is contained in:
2025-11-20 11:03:29 +08:00
commit 86785bb77f
988 changed files with 325041 additions and 0 deletions

View File

@@ -0,0 +1,77 @@
// 使用 createApp 来创建一个 Vue 应用实例
const App = {
data() {
return {
loginForm: {
username: '',
password: '',
remember: true,
},
};
},
methods: {
// 登录按钮点击事件
handleLogin() {
console.log(this.loginForm);
},
/*
async generateKey() { // 二次验证登录未完成可用需要添加两个变量secretKey totpCode
try {
const response = await axios.get('/MultiFactorAuth/GenerateKey');
this.secretKey = response.data.secretKey;
this.totpCode = response.data.qrCodeSetupUrl;
console.log(response);
// 显示二维码,让用户扫描
// 可以使用第三方库来显示二维码,例如 qrcode.vue
} catch (error) {
console.error(error);
}
},
async verifyTOTP() {
try {
const response = await axios.post('/MultiFactorAuth/VerifyTOTP', {
SecretKey: this.secretKey,
TotpCode: this.totpCode,
});
if (response.data.Success) {
alert('Verification successful!');
// 进行登录流程
} else {
alert('Invalid TOTP code.');
}
} catch (error) {
console.error(error);
}
},
*/
},
mounted() {
// this.generateKey();
},
};
const app = Vue.createApp(App);
app.use(ElementPlus);
// 挂载 Vue 应用到 DOM 元素上
app.mount('#app');
// 页面加载时
window.onload = function () {
};
// 监听窗口大小变化事件方法
function AdjustWindow() {
if (window.innerWidth <= 768) {
} else {
}
}
// 监听窗口大小变化事件Window加载时创建
window.addEventListener('resize', function () { AdjustWindow() });

View File

@@ -0,0 +1,4 @@
// Please see documentation at https://learn.microsoft.com/aspnet/core/client-side/bundling-and-minification
// for details on configuring this project to bundle and minify static web assets.
// Write your JavaScript code.