index.vue 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. <template>
  2. <view class="page-container">
  3. <!-- 导航栏 -->
  4. <view class="nav-bar">
  5. <text class="nav-title">小鹅通</text>
  6. <view class="nav-icons">
  7. <view class="iconfont1 icon-sousuo icon"></view>
  8. <view class="iconfont1 icon-rili icon"></view>
  9. </view>
  10. </view>
  11. <!-- 仿日历形状的框 -->
  12. <view class="calendar-box">
  13. <!-- 这里可以添加日历内容 -->
  14. </view>
  15. <!-- 中间内容 -->
  16. <view class="content-box">
  17. <text class="course-title">我的课程</text>
  18. <!-- 新增椭圆形蓝色框 -->
  19. <view class="oval-blue-box">
  20. <text class="oval-text">更多课程</text>
  21. </view>
  22. </view>
  23. <!-- 新增提示文字 -->
  24. <text class="no-course-tip">找不到已购课程?</text>
  25. </view>
  26. </template>
  27. <script>
  28. export default {
  29. }
  30. </script>
  31. <style scoped>
  32. @import '@/static/fontico/iconfont.css';
  33. /* 页面容器 */
  34. .page-container {
  35. display: flex;
  36. flex-direction: column;
  37. height: 100vh;
  38. }
  39. /* 导航栏 */
  40. .nav-bar {
  41. display: flex;
  42. align-items: center;
  43. justify-content: center;
  44. height: 100rpx;
  45. padding: 0 30rpx;
  46. border-bottom: 1rpx solid #eee;
  47. position: relative;
  48. }
  49. /* 修改导航标题样式 */
  50. .nav-title {
  51. font-size: 48rpx; /* 加大字号 */
  52. color: #000; /* 变为黑色 */
  53. }
  54. .nav-icons {
  55. position: absolute;
  56. right: 30rpx;
  57. display: flex;
  58. gap: 30rpx;
  59. }
  60. /* 修改图标样式 */
  61. .iconfont1 {
  62. font-size: 50rpx; /* 放大图标 */
  63. color: #333;
  64. }
  65. /* 仿日历形状的框 */
  66. .calendar-box {
  67. width: 80%; /* 可根据需求调整宽度 */
  68. height: 150rpx; /* 缩短高度,可根据需求调整 */
  69. margin: 20rpx auto;
  70. border: 1rpx solid #ccc;
  71. border-radius: 10rpx;
  72. background-color: #f5f5f5;
  73. flex: none; /* 移除 flex 属性,使用固定高度 */
  74. }
  75. /* 中间内容框 */
  76. .content-box {
  77. width: 90%; /* 宽度接近页面宽度 */
  78. height: 400px; /* 高度自适应 */
  79. background-color: #fff;
  80. margin: 20rpx auto; /* 居中放置 */
  81. padding: 20rpx;
  82. border-radius: 10rpx;
  83. box-shadow: 0 0 10rpx rgba(0, 0, 0, 0.1);
  84. flex: none; /* 移除 flex 属性 */
  85. position: relative; /* 为子元素定位做准备 */
  86. }
  87. /* 修改为圆角矩形样式 */
  88. .oval-blue-box {
  89. position: absolute;
  90. bottom: 12%; /* 往下移动,可根据需求调整 */
  91. left: 50%;
  92. height: 50px;
  93. transform: translateX(-50%);
  94. background-color: transparent; /* 背景透明 */
  95. border: 2px solid #007AFF; /* 蓝色边框 */
  96. border-radius: 150px; /* 圆角半径,可根据需求调整 */
  97. padding: 10px 100px; /* 左右内边距在原来 40px 的基础上加宽一倍 */
  98. display: flex;
  99. justify-content: center;
  100. align-items: center;
  101. }
  102. /* 椭圆形框内文字样式 */
  103. .oval-text {
  104. color: #004AFF; /* 加深蓝色文字 */
  105. font-size: 16px;
  106. white-space: nowrap; /* 防止文字换行 */
  107. }
  108. .course-title {
  109. font-size: 32rpx;
  110. font-weight: bold;
  111. }
  112. /* 新增提示文字样式 */
  113. .no-course-tip {
  114. font-size: 14px; /* 小字大小,可根据需求调整 */
  115. color: #666; /* 文字颜色,可根据需求调整 */
  116. text-align: center; /* 文字居中 */
  117. margin-top: 10px; /* 与上方框的间距,可根据需求调整 */
  118. }
  119. </style>