调整部分内容

This commit is contained in:
dftre 2025-09-10 17:20:51 +08:00
parent 2e05794a09
commit f260fdfbc3

View File

@ -11,6 +11,9 @@ const userStore = useUserStore()
const codeUrl = ref("");
const captchaEnabled = ref(true); //
const useWxLogin = ref(false); // 使
// #if MP-WEIXIN
useWxLogin.value = true
// #endif
const globalConfig = ref(config);
const loginForm = ref({
username: "admin",
@ -19,7 +22,7 @@ const loginForm = ref({
uuid: ''
});
if (useWxLogin.value) {
function handleLoginByWx() {
getWxCode().then(res => {
console.log(res);
wxLogin('miniapp', res).then(res => {
@ -119,6 +122,8 @@ getCode();
</view>
<view class="action-btn">
<button @click="handleLogin" class="login-btn cu-btn block bg-blue lg round">登录</button>
<button @click="handleLoginByWx" v-if="useWxLogin"
class="login-btn cu-btn block bg-green lg round">微信一键登录</button>
</view>
</view>
@ -180,10 +185,18 @@ page {
}
.login-btn {
.action-btn {
margin-top: 40px;
.login-btn {
height: 45px;
&+.login-btn {
margin-top: 20px;
}
}
}
.xieyi {
color: #333;