337eb4f05a
- 移除内置密码注册/登录/改密/删号/头像,统一走 Casdoor OIDC 授权码 - 服务端 casdoor-nodejs-sdk:code 换 token + 证书公钥验签 + get-account 补齐资料 - 用户表重建为 provider+provider_id(Casdoor sub 为准),邮箱不再唯一 - 管理员由 Casdoor token 的 isAdmin/IsAdmin 字段或 admin 角色判定,删除角色切换接口 - 前端登录弹窗改为申统认证跳转,注册去 Casdoor;后台用户列表只读角色 - 会话沿用 an_session httpOnly Cookie,requireUser/requireAdmin 守卫保留 - 配置注入 deploy.sh/.env.example;新增 casdoor 单测,删除 password 单测
31 lines
661 B
Vue
31 lines
661 B
Vue
<template>
|
||
<!-- 有图显示图片;无图显示品牌渐变兜底 + 标题文字,避免裂图 -->
|
||
<img
|
||
v-if="src"
|
||
:src="src"
|
||
:alt="alt"
|
||
v-bind="$attrs"
|
||
loading="lazy"
|
||
decoding="async"
|
||
/>
|
||
<div
|
||
v-else
|
||
v-bind="$attrs"
|
||
class="flex items-center justify-center bg-gradient-to-br from-gray-200 via-gray-100 to-gray-200"
|
||
>
|
||
<span class="px-4 text-center text-sm md:text-base font-bold tracking-tight text-gray-400">
|
||
{{ title }}
|
||
</span>
|
||
</div>
|
||
</template>
|
||
|
||
<script setup lang="ts">
|
||
defineOptions({ inheritAttrs: false })
|
||
|
||
defineProps<{
|
||
src?: string | null
|
||
alt?: string
|
||
title?: string
|
||
}>()
|
||
</script>
|