Tcode平台改造升级-用户工作台页面样式优化及邀请你的团队功能开发

This commit is contained in:
fmk1023
2025-12-10 14:34:29 +08:00
parent 44467bc22a
commit fd4f9bc73d
16 changed files with 750 additions and 48 deletions

View File

@@ -53,13 +53,14 @@
</div>
</d-button>
<template v-if="!isLogin">
<d-button @click="handleLogin('register')" class="min-w-[64px]">注册</d-button>
<d-button variant="solid" color="primary" @click="handleLogin('login')">账号登录</d-button>
</template>
<template v-else>
<UserAvatar />
</template>
<!-- <template v-if="!isLogin">-->
<!-- <d-button @click="handleLogin('register')" class="min-w-[64px]">注册</d-button>-->
<!-- <d-button variant="solid" color="primary" @click="handleLogin('login')">账号登录</d-button>-->
<!-- </template>-->
<!-- <template v-else>-->
<!-- <UserAvatar />-->
<!-- </template>-->
<UserAvatar />
</div>
</div>

View File

@@ -60,8 +60,8 @@
size="lg"
class="verify-input"
/>
<div class="captcha-box" @click="refreshCaptcha">
<span>x j 7 2</span>
<div class="captcha-box">
<img class="code" :src="codeDir" alt="验证码图片" @click="getCaptchaUrl" />
</div>
</div>
</template>
@@ -123,7 +123,7 @@
</template>
<script setup lang="ts">
import { ref, reactive } from 'vue';
import { ref, reactive,onMounted } from 'vue';
import { useModel } from '@/utils/hooks/useModel';
// 引入 DevUI 组件 (确保已安装)
import { Modal as DModal } from 'vue-devui/modal';
@@ -132,6 +132,7 @@ import { Button as DButton } from 'vue-devui/button';
import { Checkbox as DCheckbox } from 'vue-devui/checkbox';
import { Message } from 'vue-devui/message';
import {useRouter} from "vue-router";
import {getCaptcha} from "@/api/jyh/auth";
// 定义 Props 和 Emits
const props = withDefaults(defineProps<{
@@ -170,18 +171,22 @@ const count = ref(60);
const isCounting = ref(false);
let timer: any = null;
// --- 方法 ---
const codeDir = ref('');
const getCaptchaUrl = () => {
getCaptcha().then((res) => {
const imageUrl = URL.createObjectURL(res.data);
codeDir.value = imageUrl;
});
};
const handleClose = (close: Function) => {
emits('close');
close();
};
const refreshCaptcha = () => {
// TODO: 调用刷新图形验证码接口
console.log('刷新验证码');
};
const getSmsCode = async () => {
if (!loginForm.mobile) {
Message.warning('请输入手机号');
@@ -240,6 +245,11 @@ const switchToRegister = () => {
// 切换到注册模式或跳转
emits('go-register');
};
onMounted(() => {
getCaptchaUrl();
});
</script>
<style lang="scss">