ChatCard.vue 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. <template>
  2. <!-- 聊天卡片核心内容 -->
  3. <div class="login-card">
  4. <h3 class="card-title">请完成身份登录</h3>
  5. <p class="card-desc">为保障你的使用安全,需要验证身份后才能继续使用服务</p>
  6. <!-- 点击跳转登录页,替换 href 为你的登录链接即可 -->
  7. <a href="javascript:alert('跳转到登录页面');" class="login-btn">立即登录</a>
  8. </div>
  9. </template>
  10. <script>
  11. export default {
  12. methods: {
  13. handleLogin() {
  14. alert('跳转到登录页面')
  15. }
  16. }
  17. }
  18. </script>
  19. <style scoped>
  20. /* 基础样式 - 适配聊天卡片,无多余边距 */
  21. * {
  22. margin: 0;
  23. padding: 0;
  24. box-sizing: border-box;
  25. font-family:
  26. -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  27. }
  28. /* 聊天卡片主体容器 */
  29. .login-card {
  30. width: 100%;
  31. max-width: 320px; /* 聊天界面标准宽度 */
  32. background: #ffffff;
  33. border-radius: 12px;
  34. padding: 20px;
  35. box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  36. border: 1px solid #f0f0f0;
  37. }
  38. /* 标题样式 */
  39. .card-title {
  40. font-size: 16px;
  41. font-weight: 600;
  42. color: #333333;
  43. margin-bottom: 8px;
  44. text-align: center;
  45. }
  46. /* 提示文字 */
  47. .card-desc {
  48. font-size: 14px;
  49. color: #666666;
  50. text-align: center;
  51. line-height: 1.5;
  52. margin-bottom: 20px;
  53. }
  54. /* 登录按钮 */
  55. .login-btn {
  56. display: block;
  57. width: 100%;
  58. height: 42px;
  59. line-height: 42px;
  60. background: #007aff; /* 主流聊天工具主色调 */
  61. color: #ffffff;
  62. text-align: center;
  63. border-radius: 8px;
  64. font-size: 15px;
  65. font-weight: 500;
  66. text-decoration: none;
  67. transition: background 0.2s ease;
  68. border: none;
  69. cursor: pointer;
  70. }
  71. .login-btn:hover {
  72. background: #0066cc;
  73. }
  74. </style>