123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253 |
- "calendar-box<template>
- <view class="page-container">
-
- <view class="nav-bar">
- <text class="nav-title">小鹅通</text>
- <view class="nav-icons">
- <view class="iconfont1 icon-sousuo icon" @click="handleSearch"></view>
- <view class="iconfont1 icon-rili icon" @click="showCalendarDrawer"></view>
- </view>
- </view>
-
- <view class="calendar-box">
-
- <div class="daily - tip">
- <div class="tip - content">
- <span class="date">14</span>
- <span class="month">/ 五月</span>
- <p class="slogan">学习让我们成为更好的自己。</p>
- </div>
-
- </div>
- </view>
-
- <view class="content-box">
- <text class="course-title">我的课程</text>
-
- <view class="oval-blue-box">
- <text class="oval-text">更多课程</text>
- </view>
- </view>
-
- <text class="no-course-tip">找不到已购课程?</text>
-
- <view
- class="calendar-drawer"
- :style="{ right: showDrawer ? '0' : '-300px' }"
- v-if="showDrawer"
- @click.self="closeCalendarDrawer"
- >
- <view class="drawer-header">
- <view class="close-btn" @click="closeCalendarDrawer">×</view>
- </view>
-
- <view class="real-time-calendar">
-
- 实时日历内容
- </view>
- </view>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- showDrawer: false
- };
- },
- methods: {
- handleSearch() {
-
- uni.navigateTo({
- url: '/pages/search/index'
- });
- },
- showCalendarDrawer() {
- this.showDrawer = true;
- },
- closeCalendarDrawer() {
- this.showDrawer = false;
- }
- }
- };
- </script>
- <style scoped>
- @import '@/static/fontico/iconfont.css';
-
- .page-container {
- display: flex;
- flex-direction: column;
- height: 100vh;
- }
-
- .nav-bar {
- display: flex;
- align-items: center;
- justify-content: center;
- height: 100rpx;
- padding: 0 30rpx;
- border-bottom: 1rpx solid #eee;
- position: relative;
- }
-
- .nav-title {
- font-size: 48rpx;
- color: #000;
- }
- .nav-icons {
- position: absolute;
- right: 30rpx;
- display: flex;
- gap: 30rpx;
- }
-
- .iconfont1 {
- font-size: 50rpx;
- color: #333;
- }
-
- .calendar-box {
- width: 90%;
- height: 150rpx;
- margin: 20rpx auto;
- border: 1rpx solid #ccc;
- border-radius: 10rpx;
- background-color: #f5f5f5;
- flex: none;
- }
-
- .content-box {
- width: 90%;
- height: 400px;
- background-color: #fff;
- margin: 20rpx auto;
- padding: 20rpx;
- border-radius: 10rpx;
- box-shadow: 0 0 10rpx rgba(0, 0, 0, 0.1);
- flex: none;
- position: relative;
- }
-
- .oval-blue-box {
- position: absolute;
- bottom: 12%;
- left: 50%;
- height: 50px;
- transform: translateX(-50%);
- background-color: transparent;
- border: 2px solid #007AFF;
- border-radius: 150px;
- padding: 10px 100px;
- display: flex;
- justify-content: center;
- align-items: center;
- }
-
- .oval-text {
- color: #004AFF;
- font-size: 16px;
- white-space: nowrap;
- }
- .course-title {
- font-size: 32rpx;
- font-weight: bold;
- }
-
- .no-course-tip {
- font-size: 14px;
- color: #666;
- text-align: center;
- margin-top: 10px;
- }
- .calendar-drawer {
- position: fixed;
- top: 0;
- right: -300px;
- width: 300px;
- height: 100vh;
- background-color: white;
- box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1);
- transition: right 0.3s ease;
- z-index: 999;
- }
- .real-time-calendar {
- padding: 20px;
- }
- .drawer-header {
- display: flex;
- justify-content: flex-end;
- padding: 10px;
- }
- .close-btn {
- font-size: 24px;
- cursor: pointer;
- padding: 5px;
- }
- .daily-tip {
- background-color: #e6f7ff;
- padding: 20px;
- border-radius: 10px;
- box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
- display: flex;
- justify-content: space-between;
- align-items: center;
- }
- .tip-content {
- width: 60%;
- }
- .date {
- font-size: 28px;
- font-weight: bold;
- color: #333;
- }
- .month {
- font-size: 16px;
- color: #666;
- margin-left: 5px;
- }
- .slogan {
- font-size: 18px;
- color: #333;
- margin-top: 10px;
- }
- .tip-img {
- width: 30%;
- display: flex;
- justify-content: flex-end;
- }
- .tip-img img {
- max-width: 100%;
- height: auto;
- }
- </style>
|