|
|
@@ -1,16 +1,12 @@
|
|
|
<template>
|
|
|
<view class="home-container">
|
|
|
- <!-- 顶部背景装饰 -->
|
|
|
+ <!-- 顶部渐变背景装饰 -->
|
|
|
<view class="top-bg-decoration"></view>
|
|
|
|
|
|
<!-- 自定义导航栏 -->
|
|
|
<view class="nav-bar-fixed" :style="{ paddingTop: statusBarHeight + 'px' }">
|
|
|
<view class="nav-content">
|
|
|
<view class="product-name">产品名称</view>
|
|
|
- <view class="search-input-box" @click="toSearch">
|
|
|
- <image class="search-icon" src="/static/search_gray.png" mode="aspectFit"></image>
|
|
|
- <text class="placeholder">搜索课程</text>
|
|
|
- </view>
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
@@ -22,79 +18,117 @@
|
|
|
indicator-color="rgba(255,255,255,0.6)" indicator-active-color="#fff">
|
|
|
<swiper-item v-for="(item, index) in advList" :key="index" @click="handleAdvClick(item)">
|
|
|
<view class="banner-card">
|
|
|
- <image v-if="item.imageUrl" class="banner-image" :src="item.imageUrl" mode="aspectFill"></image>
|
|
|
+ <image class="banner-image" :src="item.imageUrl || '/static/home_top_bg.png'" mode="aspectFill"></image>
|
|
|
</view>
|
|
|
</swiper-item>
|
|
|
</swiper>
|
|
|
</view>
|
|
|
|
|
|
- <!-- 导航网格 -->
|
|
|
- <view class="nav-grid">
|
|
|
- <view class="nav-item" v-for="(item, index) in navMenus" :key="index" @click="menuClick(item)">
|
|
|
- <view class="nav-icon-wrap">
|
|
|
- <image class="nav-icon" :src="item.icon" mode="aspectFit"></image>
|
|
|
- </view>
|
|
|
- <text class="nav-title">{{ item.title }}</text>
|
|
|
+ <!-- 三个大功能入口 -->
|
|
|
+ <view class="quick-access-grid">
|
|
|
+ <view class="access-item" @click="goPage('/pages/shopping/index')">
|
|
|
+ <image class="access-img" src="/static/home1.png" mode="widthFix"></image>
|
|
|
+ </view>
|
|
|
+ <view class="access-item" @click="goPage('/pages_course/teacherClassroom?type=1')">
|
|
|
+ <image class="access-img" src="/static/home2.png" mode="widthFix"></image>
|
|
|
+ </view>
|
|
|
+ <view class="access-item" @click="goPage('/pages/healthy/index')">
|
|
|
+ <image class="access-img" src="/static/home3.png" mode="widthFix"></image>
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
- <!-- 热门好课 -->
|
|
|
+ <!-- 热门文章 (可横向滑动) -->
|
|
|
<view class="section-container">
|
|
|
<view class="section-header">
|
|
|
- <text class="section-title">热门好课</text>
|
|
|
- <view class="more-link" @click="goClassList(1)">
|
|
|
+ <view class="left">
|
|
|
+ <image class="header-icon" src="/static/home_article.png" mode="aspectFit"></image>
|
|
|
+ <text class="section-title">热门文章</text>
|
|
|
+ </view>
|
|
|
+ <view class="more-link" @click="goArticleList">
|
|
|
<text>更多</text>
|
|
|
<image class="arrow-icon" src="/static/right_arrow_right.png" mode="aspectFit"></image>
|
|
|
</view>
|
|
|
</view>
|
|
|
-
|
|
|
- <!-- 特色大课 -->
|
|
|
- <view class="featured-course-card" v-if="featuredCourse" @click="goClass(featuredCourse.courseId, 1)">
|
|
|
- <view class="cover-wrap">
|
|
|
- <image class="course-cover" :src="featuredCourse.imgUrl || '/static/bg_video.png'" mode="aspectFill"></image>
|
|
|
- <view class="tag-yangsheng">养生</view>
|
|
|
- <view class="lesson-badge">
|
|
|
- <view class="left">
|
|
|
- <image class="left-icon" src="/static/course_number_bg.png" mode="aspectFit"></image>
|
|
|
- <image class="play-icon-small" src="/static/course_number.png" mode="aspectFit"></image>
|
|
|
- <text>第1讲</text>
|
|
|
+
|
|
|
+ <scroll-view class="article-scroll-x" scroll-x enable-flex>
|
|
|
+ <view class="article-list-row">
|
|
|
+ <view class="article-card" v-for="(item, index) in hotArticles" :key="index" @click="goArticleDetail(item.id)">
|
|
|
+ <image class="article-img" :src="item.imgUrl || '/static/course_img.png'" mode="aspectFill"></image>
|
|
|
+ <view class="article-info">
|
|
|
+ <view class="article-title ellipsis-2">{{ item.title }}</view>
|
|
|
+ <view class="article-meta">
|
|
|
+ <text>{{ item.views }}阅读</text>
|
|
|
+ <text>{{ item.likes }}点赞</text>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
- <text>共{{ featuredCourse.lessonCount }}节课</text>
|
|
|
- <image class="arrow-right-small" src="/static/right_arrow_white.png" mode="aspectFit"></image>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="course-info">
|
|
|
- <view class="course-title">{{ featuredCourse.courseName }}</view>
|
|
|
- <view class="course-footer">
|
|
|
- <view class="author-info">
|
|
|
- <image class="author-avatar" :src="featuredCourse.authorAvatar || '/static/avatar.png'" mode="aspectFill"></image>
|
|
|
- <text class="author-name">{{ featuredCourse.authorName }}</text>
|
|
|
+ </scroll-view>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <!-- 精品课程 -->
|
|
|
+ <view class="section-container">
|
|
|
+ <view class="section-header">
|
|
|
+ <view class="left">
|
|
|
+ <image class="header-icon" src="/static/home_lessen.png" mode="aspectFit"></image>
|
|
|
+ <text class="section-title">精品课程</text>
|
|
|
+ </view>
|
|
|
+ <view class="more-link" @click="goCourseList">
|
|
|
+ <text>更多</text>
|
|
|
+ <image class="arrow-icon" src="/static/right_arrow_right.png" mode="aspectFit"></image>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <view class="course-vertical-list">
|
|
|
+ <view class="course-card-horizontal" v-for="(item, index) in featuredCourses" :key="index" @click="goCourseDetail(item.id)">
|
|
|
+ <view class="course-cover-wrap">
|
|
|
+ <image class="course-cover" :src="item.imgUrl || '/static/course_img.png'" mode="aspectFill"></image>
|
|
|
+ </view>
|
|
|
+ <view class="course-content">
|
|
|
+ <view class="course-title ellipsis-1">{{ item.title }}</view>
|
|
|
+ <view class="course-tags">
|
|
|
+ <text class="tag-orange">养生</text>
|
|
|
+ <text class="meta-text">{{ item.playCount }}次播放</text>
|
|
|
+ <text class="meta-text">|</text>
|
|
|
+
|
|
|
+ <text class="meta-text">{{ item.likes }}人喜欢</text>
|
|
|
+ </view>
|
|
|
+ <view class="course-footer">
|
|
|
+ <view class="author-box">
|
|
|
+ <image class="author-avatar" :src="item.authorAvatar || '/static/avatar.png'" mode="aspectFill"></image>
|
|
|
+ <text class="author-name">{{ item.authorName }}</text>
|
|
|
+ </view>
|
|
|
+ <view class="study-btn-orange">立即学习</view>
|
|
|
</view>
|
|
|
- <view class="playback-count">{{ featuredCourse.playCount }}次播放</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
+ </view>
|
|
|
|
|
|
- <!-- 课程列表 -->
|
|
|
- <view class="course-list">
|
|
|
- <view class="course-item" v-for="(item, index) in otherCourses" :key="index" @click="goClass(item.courseId, 1)">
|
|
|
- <image class="item-thumb" :src="item.imgUrl || '/static/course_img.png'" mode="aspectFill"></image>
|
|
|
- <view class="item-content">
|
|
|
- <view class="item-title ellipsis-2">{{ item.courseName }}</view>
|
|
|
- <view class="item-footer">
|
|
|
- <text class="item-playback">{{ item.playCount }}次播放</text>
|
|
|
- <view class="study-btn">去学习</view>
|
|
|
+ <!-- 商品列表 (瀑布流/两列) -->
|
|
|
+ <view class="product-grid">
|
|
|
+ <view class="product-item" v-for="(item, index) in productList" :key="index" @click="goProductDetail(item.id)">
|
|
|
+ <image class="product-img" :src="item.imgUrl || '/static/course_img.png'" mode="aspectFill"></image>
|
|
|
+ <view class="product-info">
|
|
|
+ <view class="product-title ellipsis-2">{{ item.title }}</view>
|
|
|
+ <view class="price-row">
|
|
|
+ <view class="price-box">
|
|
|
+ <text class="price-label">会员价</text>
|
|
|
+ <text class="price-symbol">¥</text>
|
|
|
+ <text class="price-value">{{ item.memberPrice }}</text>
|
|
|
</view>
|
|
|
+ <view class="add-btn"><image src="/static/good_more.png" mode="aspectFit"></image></view>
|
|
|
</view>
|
|
|
+ <view class="original-price">¥{{ item.price }}</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
- <!-- 底部间距 -->
|
|
|
+ <!-- 底部占位 -->
|
|
|
<view class="bottom-safe-area"></view>
|
|
|
</scroll-view>
|
|
|
|
|
|
- <!-- 原有的弹窗组件保留 -->
|
|
|
+ <!-- 弹窗保留 -->
|
|
|
<view class="popup-box" v-if="activityShow">
|
|
|
<view class="info-mask" @tap="closeActivity()"></view>
|
|
|
<view class="info-form">
|
|
|
@@ -121,36 +155,32 @@
|
|
|
return {
|
|
|
statusBarHeight: uni.getSystemInfoSync().statusBarHeight,
|
|
|
advList: [
|
|
|
- { imageUrl: '', advUrl: '', showType: 1 },
|
|
|
{ imageUrl: '', advUrl: '', showType: 1 }
|
|
|
],
|
|
|
- navMenus: [
|
|
|
- { title: '药品商城', icon: '/static/menu1.png', linkUrl: '/pages/shopping/index', linkType: 1 },
|
|
|
- { title: '热门好课', icon: '/static/menu2.png',linkUrl: '/pages_course/teacherClassroom?type=1', linkType: 1 },
|
|
|
- { title: '我的课程', icon: '/static/menu3.png', linkUrl: '/pages_course/teacherClassroom?type=2', linkType: 1 },
|
|
|
- { title: '专业客服', icon: '/static/menu4.png', linkUrl: '/pages/message/index', linkType: 1 }
|
|
|
+ hotArticles: [
|
|
|
+ { id: 1, title: '每日养生睡眠最佳方式', views: '123', likes: '45', imgUrl: '/static/famous_doctor_img.png' },
|
|
|
+ { id: 2, title: '每日养生睡眠最佳方式', views: '123', likes: '45', imgUrl: '/static/famous_doctor_img.png' },
|
|
|
+ { id: 3, title: '植物油和动物油到底谁更...', views: '123', likes: '45', imgUrl: '/static/famous_doctor_img.png' },
|
|
|
+ { id: 4, title: '植物油和动物油到底谁更...', views: '123', likes: '45', imgUrl: '/static/famous_doctor_img.png' }
|
|
|
+ ],
|
|
|
+ featuredCourses: [
|
|
|
+ { id: 1, title: '中医基础理论与养生智慧', playCount: '2468', likes: '900', authorName: '李医生', authorAvatar: '/static/avatar.png', imgUrl: '/static/famous_doctor_img.png' },
|
|
|
+ { id: 2, title: '上班族 30 分钟每日养生计划', playCount: '2468', likes: '900', authorName: '李医生', authorAvatar: '/static/avatar.png', imgUrl: '/static/famous_doctor_img.png' },
|
|
|
+ { id: 3, title: '马年四季养生课:跟着节气养...', playCount: '2468', likes: '900', authorName: '李医生', authorAvatar: '/static/avatar.png', imgUrl: '/static/famous_doctor_img.png' },
|
|
|
+ { id: 4, title: '中医基础理论与养生智慧', playCount: '2468', likes: '900', authorName: '李医生', authorAvatar: '/static/avatar.png', imgUrl: '/static/famous_doctor_img.png' }
|
|
|
],
|
|
|
- featuredCourse: {
|
|
|
- courseId: 4,
|
|
|
- courseName: '你和合理膳食还有多少距离?',
|
|
|
- imgUrl: '/static/bg_video.png',
|
|
|
- lessonCount: 30,
|
|
|
- authorName: '健康大讲堂',
|
|
|
- authorAvatar: '/static/avatar.png',
|
|
|
- playCount: '8.1万'
|
|
|
- },
|
|
|
- otherCourses: [
|
|
|
- { courseId: 5, courseName: '脑梗塞是帕金森病的发病因素吗?', imgUrl: '/static/famous_doctor_img.png', playCount: '25862' },
|
|
|
- { courseId: 6, courseName: '合理的运动与健康', imgUrl: '/static/famous_doctor_img2.png', playCount: '25862' },
|
|
|
- { courseId: 7, courseName: '合理的运动与健康', imgUrl: '/static/course_img.png', playCount: '25862' },
|
|
|
- { courseId: 8, courseName: '合理的运动与健康', imgUrl: '/static/famous_doctor_img.png', playCount: '25862' }
|
|
|
+ productList: [
|
|
|
+ { id: 1, title: '益生菌配方羊乳粉 成人中老年羊奶粉学生羊...', memberPrice: '105.36', price: '128.00', imgUrl: '/static/course_img.png' },
|
|
|
+ { id: 2, title: '复合益生菌果蔬片 轻松入睡 肠通无阻', memberPrice: '105.36', price: '128.00', imgUrl: '/static/course_img.png' },
|
|
|
+ { id: 3, title: '低GI控糖多元谷物专为控糖人士配比', memberPrice: '105.36', price: '128.00', imgUrl: '/static/course_img.png' },
|
|
|
+ { id: 4, title: '天赐蓉精选阿拉善有机荒漠肉苁蓉', memberPrice: '105.36', price: '128.00', imgUrl: '/static/course_img.png' }
|
|
|
],
|
|
|
activityShow: false,
|
|
|
activity: null,
|
|
|
tuiModalControl: false,
|
|
|
btnGroup: [
|
|
|
{ text: '取消', color: '#FFFFFF', bgColor: '#999999', width: '150rpx', height: '80rpx', shape: 'fillet', eventName: 'cancle' },
|
|
|
- { text: '确定', color: '#FFFFFF', bgColor: '#5B37FD', width: '150rpx', height: '80rpx', shape: 'fillet', eventName: 'sure' }
|
|
|
+ { text: '确定', color: '#FFFFFF', bgColor: '#F5723A', width: '150rpx', height: '80rpx', shape: 'fillet', eventName: 'sure' }
|
|
|
]
|
|
|
}
|
|
|
},
|
|
|
@@ -178,23 +208,23 @@
|
|
|
uni.navigateTo({ url: item.advUrl });
|
|
|
}
|
|
|
},
|
|
|
- menuClick(item) {
|
|
|
- if (item.linkType == 1) {
|
|
|
- uni.navigateTo({ url: item.linkUrl });
|
|
|
- }
|
|
|
+ goPage(url) {
|
|
|
+ uni.navigateTo({ url });
|
|
|
},
|
|
|
- goClass(id, type) {
|
|
|
- uni.navigateTo({
|
|
|
- url: '/pages_course/learn?courseId=' + id + '&type=' + type
|
|
|
- });
|
|
|
+ goArticleList() {
|
|
|
+ uni.navigateTo({ url: '/pages_index/index/articleList' });
|
|
|
},
|
|
|
- goClassList(type) {
|
|
|
- uni.navigateTo({
|
|
|
- url: '/pages_course/teacherClassroom?type=' + type
|
|
|
- });
|
|
|
+ goArticleDetail(id) {
|
|
|
+ uni.navigateTo({ url: '/pages_index/index/articleDetails?id=' + id });
|
|
|
},
|
|
|
- toSearch() {
|
|
|
- uni.navigateTo({ url: './productSearch' });
|
|
|
+ goCourseList() {
|
|
|
+ uni.navigateTo({ url: '/pages_course/teacherClassroom?type=1' });
|
|
|
+ },
|
|
|
+ goCourseDetail(id) {
|
|
|
+ uni.navigateTo({ url: '/pages_course/learn?courseId=' + id });
|
|
|
+ },
|
|
|
+ goProductDetail(id) {
|
|
|
+ uni.navigateTo({ url: '/pages/shopping/productDetails?id=' + id });
|
|
|
},
|
|
|
closeActivity() { this.activityShow = false; },
|
|
|
showActivity() {
|
|
|
@@ -221,7 +251,7 @@
|
|
|
<style lang="scss">
|
|
|
.home-container {
|
|
|
min-height: 100vh;
|
|
|
- background-color: #FFFFFF;
|
|
|
+ background-color: #F8F8F8;
|
|
|
position: relative;
|
|
|
}
|
|
|
|
|
|
@@ -230,8 +260,8 @@
|
|
|
top: 0;
|
|
|
left: 0;
|
|
|
width: 100%;
|
|
|
- height: 450rpx;
|
|
|
- background: linear-gradient(180deg, #F0F2FF 0%, rgba(255, 255, 255, 0) 100%);
|
|
|
+ height: 400rpx;
|
|
|
+ background: linear-gradient(180deg, #FFE4D6 0%, rgba(255, 255, 255, 0) 100%);
|
|
|
z-index: 0;
|
|
|
}
|
|
|
|
|
|
@@ -249,305 +279,351 @@
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
padding: 0 30rpx;
|
|
|
-
|
|
|
+
|
|
|
.product-name {
|
|
|
- font-size: 42rpx;
|
|
|
+ font-size: 36rpx;
|
|
|
font-weight: bold;
|
|
|
- color: #1A1A1A;
|
|
|
- margin-right: 24rpx;
|
|
|
- flex-shrink: 0;
|
|
|
- }
|
|
|
-
|
|
|
- .search-input-box {
|
|
|
- width: 302rpx;
|
|
|
- height: 68rpx;
|
|
|
- background: #FFFFFF;
|
|
|
- border-radius: 34rpx;
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
- padding: 0 28rpx;
|
|
|
- margin-right: 24rpx;
|
|
|
- box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
|
|
|
-
|
|
|
- .search-icon {
|
|
|
- width: 30rpx;
|
|
|
- height: 30rpx;
|
|
|
- margin-right: 14rpx;
|
|
|
- }
|
|
|
-
|
|
|
- .placeholder {
|
|
|
- font-size: 28rpx;
|
|
|
- color: #BBBBBB;
|
|
|
- }
|
|
|
+ color: #333333;
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
}
|
|
|
}
|
|
|
|
|
|
.main-content-scroll {
|
|
|
height: 100vh;
|
|
|
- position: relative;
|
|
|
- z-index: 1;
|
|
|
+ box-sizing: border-box;
|
|
|
}
|
|
|
|
|
|
/* Banner */
|
|
|
.banner-section {
|
|
|
padding: 20rpx 30rpx;
|
|
|
-
|
|
|
+
|
|
|
.banner-swiper {
|
|
|
- height: 233rpx;
|
|
|
- border-radius: 28rpx;
|
|
|
+ height: 300rpx;
|
|
|
+ border-radius: 24rpx;
|
|
|
overflow: hidden;
|
|
|
- }
|
|
|
-
|
|
|
- .banner-card {
|
|
|
- width: 100%;
|
|
|
- height: 100%;
|
|
|
- background: linear-gradient(135deg, #FF4D4D 0%, #FF8533 100%);
|
|
|
- position: relative;
|
|
|
- }
|
|
|
-
|
|
|
- .banner-image {
|
|
|
- position: absolute;
|
|
|
- width: 100%;
|
|
|
- height: 100%;
|
|
|
- z-index: 1;
|
|
|
+ transform: translateY(0);
|
|
|
+
|
|
|
+ .banner-card {
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+
|
|
|
+ .banner-image {
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ border-radius: 24rpx;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- /* 导航网格 */
|
|
|
- .nav-grid {
|
|
|
+ /* 功能入口 */
|
|
|
+ .quick-access-grid {
|
|
|
display: flex;
|
|
|
justify-content: space-between;
|
|
|
- padding: 40rpx 50rpx;
|
|
|
-
|
|
|
- .nav-item {
|
|
|
- display: flex;
|
|
|
- flex-direction: column;
|
|
|
- align-items: center;
|
|
|
-
|
|
|
- .nav-icon-wrap {
|
|
|
- width: 104rpx;
|
|
|
- height: 104rpx;
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
- justify-content: center;
|
|
|
- margin-bottom: 20rpx;
|
|
|
- .nav-icon {
|
|
|
- width:100%;
|
|
|
- height: 100%;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- .nav-title {
|
|
|
- font-size: 28rpx;
|
|
|
- color: #333333;
|
|
|
- font-weight: 500;
|
|
|
+ padding: 10rpx 30rpx 30rpx;
|
|
|
+
|
|
|
+ .access-item {
|
|
|
+ width: 216rpx;
|
|
|
+
|
|
|
+ .access-img {
|
|
|
+ width: 100%;
|
|
|
+ border-radius: 20rpx;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- /* 章节容器 */
|
|
|
+ /* 公共块样式 */
|
|
|
.section-container {
|
|
|
- padding: 20rpx 30rpx;
|
|
|
-
|
|
|
+ background: linear-gradient( 180deg, #FBEBE1 0%, #FFFFFF 30%, #FFFFFF 100%);
|
|
|
+ margin: 0 30rpx 24rpx;
|
|
|
+ border-radius: 24rpx;
|
|
|
+ padding: 24rpx 20rpx;
|
|
|
+
|
|
|
.section-header {
|
|
|
display: flex;
|
|
|
justify-content: space-between;
|
|
|
align-items: center;
|
|
|
- margin-bottom: 30rpx;
|
|
|
-
|
|
|
- .section-title {
|
|
|
- font-size: 38rpx;
|
|
|
- font-weight: bold;
|
|
|
- color: #1A1A1A;
|
|
|
+ margin-bottom:48rpx;
|
|
|
+
|
|
|
+ .left {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+
|
|
|
+ .header-icon {
|
|
|
+ width: 36rpx;
|
|
|
+ height: 36rpx;
|
|
|
+ margin-right: 12rpx;
|
|
|
+ }
|
|
|
+
|
|
|
+ .section-title {
|
|
|
+ font-size: 32rpx;
|
|
|
+ font-weight: bold;
|
|
|
+ color: #333333;
|
|
|
+ }
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
.more-link {
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
- font-size: 28rpx;
|
|
|
- color: #BBBBBB;
|
|
|
-
|
|
|
+ font-size: 26rpx;
|
|
|
+ color: #999999;
|
|
|
+
|
|
|
.arrow-icon {
|
|
|
- width: 28rpx;
|
|
|
- height: 28rpx;
|
|
|
+ width: 48rpx;
|
|
|
+ height: 48rpx;
|
|
|
margin-left: 4rpx;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- /* 特色大课卡片 */
|
|
|
- .featured-course-card {
|
|
|
- background: #FFFFFF;
|
|
|
- border-radius: 28rpx;
|
|
|
- overflow: hidden;
|
|
|
- box-shadow: 0 6rpx 30rpx rgba(0, 0, 0, 0.06);
|
|
|
- margin-bottom: 40rpx;
|
|
|
-
|
|
|
- .cover-wrap {
|
|
|
- position: relative;
|
|
|
- width: 100%;
|
|
|
- height: 420rpx;
|
|
|
-
|
|
|
- .course-cover {
|
|
|
- width: 100%;
|
|
|
- height: 100%;
|
|
|
- }
|
|
|
-
|
|
|
- .tag-yangsheng {
|
|
|
- position: absolute;
|
|
|
- top: 0;
|
|
|
- left: 0;
|
|
|
- padding: 10rpx 28rpx;
|
|
|
- background: #5B37FD;
|
|
|
- color: #FFFFFF;
|
|
|
- font-size: 26rpx;
|
|
|
- border-bottom-right-radius: 24rpx;
|
|
|
+ /* 热门文章横向滑动 */
|
|
|
+ .article-scroll-x {
|
|
|
+ width: 100%;
|
|
|
+ white-space: nowrap;
|
|
|
+
|
|
|
+ .article-list-row {
|
|
|
+ display: flex;
|
|
|
+ flex-wrap: wrap;
|
|
|
+ height: 360rpx; /* 两行的高度 */
|
|
|
+ flex-direction: column;
|
|
|
+ }
|
|
|
+
|
|
|
+ .article-card {
|
|
|
+ display: inline-flex;
|
|
|
+ width: 500rpx;
|
|
|
+ margin-right: 30rpx;
|
|
|
+ margin-bottom: 20rpx;
|
|
|
+
|
|
|
+ .article-img {
|
|
|
+ width: 120rpx;
|
|
|
+ height: 120rpx;
|
|
|
+ border-radius: 12rpx;
|
|
|
+ margin-right: 20rpx;
|
|
|
+ flex-shrink: 0;
|
|
|
}
|
|
|
-
|
|
|
- .lesson-badge {
|
|
|
- padding-right: 16rpx;
|
|
|
- position: absolute;
|
|
|
- bottom: 24rpx;
|
|
|
- right: 24rpx;
|
|
|
- background: rgba(0,0,0,0.5);
|
|
|
- backdrop-filter: blur(6px);
|
|
|
- border-radius: 24rpx;
|
|
|
+
|
|
|
+ .article-info {
|
|
|
+ flex: 1;
|
|
|
display: flex;
|
|
|
- height: 48rpx;
|
|
|
- align-items: center;
|
|
|
- color: #FFFFFF;
|
|
|
- font-size: 26rpx;
|
|
|
- .left{
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
- padding-left: 16rpx;
|
|
|
- width: 144rpx;
|
|
|
- height: 48rpx;
|
|
|
- position: relative;
|
|
|
- .left-icon{
|
|
|
- position: absolute;
|
|
|
- left: 0;
|
|
|
- top: 0;
|
|
|
- width: 144rpx;
|
|
|
- height: 48rpx;
|
|
|
- z-index: -1;
|
|
|
- }
|
|
|
- .play-icon-small {
|
|
|
- width: 30rpx;
|
|
|
- height: 30rpx;
|
|
|
- margin-right: 4rpx;
|
|
|
- }
|
|
|
+ flex-direction: column;
|
|
|
+ justify-content: space-between;
|
|
|
+ white-space: normal;
|
|
|
+
|
|
|
+ .article-title {
|
|
|
+ font-size: 28rpx;
|
|
|
+ color: #333333;
|
|
|
+ line-height: 1.4;
|
|
|
}
|
|
|
|
|
|
- .arrow-right-small {
|
|
|
- width: 20rpx;
|
|
|
- height: 20rpx;
|
|
|
+ .article-meta {
|
|
|
+ font-size: 24rpx;
|
|
|
+ color: #BBBBBB;
|
|
|
+
|
|
|
+ text {
|
|
|
+ margin-right: 20rpx;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ }
|
|
|
|
|
|
- .course-info {
|
|
|
- padding: 30rpx;
|
|
|
- background: #68686A;
|
|
|
- color: #fff;
|
|
|
- .course-title {
|
|
|
- font-size: 36rpx;
|
|
|
- font-weight: bold;
|
|
|
- margin-bottom: 28rpx;
|
|
|
+ /* 精品课程列表 */
|
|
|
+ .course-vertical-list {
|
|
|
+ .course-card-horizontal {
|
|
|
+ display: flex;
|
|
|
+ margin-bottom: 30rpx;
|
|
|
+
|
|
|
+ &:last-child {
|
|
|
+ margin-bottom: 0;
|
|
|
}
|
|
|
-
|
|
|
- .course-footer {
|
|
|
+
|
|
|
+ .course-cover-wrap {
|
|
|
+ position: relative;
|
|
|
+ width: 220rpx;
|
|
|
+ height: 160rpx;
|
|
|
+ margin-right: 24rpx;
|
|
|
+ flex-shrink: 0;
|
|
|
+
|
|
|
+ .course-cover {
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ border-radius: 16rpx 0 0 16rpx;
|
|
|
+ }
|
|
|
+
|
|
|
+ // .tag-yangsheng {
|
|
|
+ // position: absolute;
|
|
|
+ // top: 0;
|
|
|
+ // left: 0;
|
|
|
+ // background: rgba(0,0,0,0.4);
|
|
|
+ // color: #FFFFFF;
|
|
|
+ // font-size: 20rpx;
|
|
|
+ // padding: 4rpx 12rpx;
|
|
|
+ // border-top-left-radius: 16rpx;
|
|
|
+ // border-bottom-right-radius: 16rpx;
|
|
|
+ // }
|
|
|
+ }
|
|
|
+
|
|
|
+ .course-content {
|
|
|
+ flex: 1;
|
|
|
display: flex;
|
|
|
+ flex-direction: column;
|
|
|
justify-content: space-between;
|
|
|
- align-items: center;
|
|
|
-
|
|
|
- .author-info {
|
|
|
+
|
|
|
+ .course-title {
|
|
|
+ font-size: 30rpx;
|
|
|
+ font-weight: 500;
|
|
|
+ color: #333333;
|
|
|
+ }
|
|
|
+
|
|
|
+ .course-tags {
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
-
|
|
|
- .author-avatar {
|
|
|
- width: 52rpx;
|
|
|
- height: 52rpx;
|
|
|
- border-radius: 50%;
|
|
|
+ margin-top: 10rpx;
|
|
|
+
|
|
|
+ .tag-orange {
|
|
|
+ background: #FFF1E8;
|
|
|
+ color: #F8792B;
|
|
|
+ font-size: 22rpx;
|
|
|
+ padding: 2rpx 10rpx;
|
|
|
+ border-radius: 8rpx;
|
|
|
margin-right: 16rpx;
|
|
|
}
|
|
|
-
|
|
|
- .author-name {
|
|
|
- font-size: 28rpx;
|
|
|
+
|
|
|
+ .meta-text {
|
|
|
+ font-size: 24rpx;
|
|
|
+ color: #999999;
|
|
|
+ margin-right: 16rpx;
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
- .playback-count {
|
|
|
- font-size: 28rpx;
|
|
|
+
|
|
|
+ .course-footer {
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ align-items: center;
|
|
|
+ margin-top: 10rpx;
|
|
|
+
|
|
|
+ .author-box {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+
|
|
|
+ .author-avatar {
|
|
|
+ width: 40rpx;
|
|
|
+ height: 40rpx;
|
|
|
+ border-radius: 50%;
|
|
|
+ margin-right: 12rpx;
|
|
|
+ }
|
|
|
+
|
|
|
+ .author-name {
|
|
|
+ font-size: 24rpx;
|
|
|
+ color: #666666;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .study-btn-orange {
|
|
|
+ background: linear-gradient( 180deg, #FFA33B 0%, #F5723A 100%);
|
|
|
+ color: #FFFFFF;
|
|
|
+ font-size: 24rpx;
|
|
|
+ padding: 8rpx 24rpx;
|
|
|
+ border-radius: 86rpx;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- /* 课程列表 */
|
|
|
- .course-list {
|
|
|
- .course-item {
|
|
|
- display: flex;
|
|
|
- padding: 30rpx 0;
|
|
|
- &:last-child {
|
|
|
- border-bottom: none;
|
|
|
- }
|
|
|
-
|
|
|
- .item-thumb {
|
|
|
- width: 260rpx;
|
|
|
- height: 160rpx;
|
|
|
- border-radius: 20rpx;
|
|
|
- margin-right: 30rpx;
|
|
|
+ /* 商品列表网格 */
|
|
|
+ .product-grid {
|
|
|
+ display: flex;
|
|
|
+ flex-wrap: wrap;
|
|
|
+ padding: 0 30rpx;
|
|
|
+ justify-content: space-between;
|
|
|
+
|
|
|
+ .product-item {
|
|
|
+ width: 334rpx;
|
|
|
+ background-color: #FFFFFF;
|
|
|
+ border-radius: 20rpx;
|
|
|
+ margin-bottom: 24rpx;
|
|
|
+ overflow: hidden;
|
|
|
+
|
|
|
+ .product-img {
|
|
|
+ width: 100%;
|
|
|
+ height: 334rpx;
|
|
|
}
|
|
|
-
|
|
|
- .item-content {
|
|
|
- flex: 1;
|
|
|
- display: flex;
|
|
|
- flex-direction: column;
|
|
|
- justify-content: space-between;
|
|
|
-
|
|
|
- .item-title {
|
|
|
- font-size: 32rpx;
|
|
|
- color: #1A1A1A;
|
|
|
- font-weight: bold;
|
|
|
- line-height: 1.4;
|
|
|
+
|
|
|
+ .product-info {
|
|
|
+ padding: 20rpx;
|
|
|
+
|
|
|
+ .product-title {
|
|
|
+ font-size: 28rpx;
|
|
|
+ color: #333333;
|
|
|
+ font-weight: 500;
|
|
|
+ height: 80rpx;
|
|
|
+ line-height: 40rpx;
|
|
|
}
|
|
|
-
|
|
|
- .item-footer {
|
|
|
+
|
|
|
+ .price-row {
|
|
|
display: flex;
|
|
|
justify-content: space-between;
|
|
|
- align-items: center;
|
|
|
-
|
|
|
- .item-playback {
|
|
|
- font-size: 26rpx;
|
|
|
- color: #CCCCCC;
|
|
|
+ align-items: flex-end;
|
|
|
+ margin-top: 16rpx;
|
|
|
+
|
|
|
+ .price-box {
|
|
|
+ color: #FF5D32;
|
|
|
+ display: flex;
|
|
|
+ align-items: baseline;
|
|
|
+
|
|
|
+ .price-label {
|
|
|
+ font-size: 20rpx;
|
|
|
+ margin-right: 4rpx;
|
|
|
+ }
|
|
|
+
|
|
|
+ .price-symbol {
|
|
|
+ font-size: 24rpx;
|
|
|
+ font-weight: bold;
|
|
|
+ }
|
|
|
+
|
|
|
+ .price-value {
|
|
|
+ font-size: 32rpx;
|
|
|
+ font-weight: bold;
|
|
|
+ }
|
|
|
}
|
|
|
-
|
|
|
- .study-btn {
|
|
|
- padding: 12rpx 40rpx;
|
|
|
- background: #5B37FD;
|
|
|
- color: #FFFFFF;
|
|
|
- font-size: 28rpx;
|
|
|
- border-radius: 36rpx;
|
|
|
- font-weight: 500;
|
|
|
+
|
|
|
+ .add-btn {
|
|
|
+ width: 40rpx;
|
|
|
+ height: 40rpx;
|
|
|
+ image{
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
}
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .original-price {
|
|
|
+ font-size: 24rpx;
|
|
|
+ color: #BBBBBB;
|
|
|
+ text-decoration: line-through;
|
|
|
+ margin-top: 4rpx;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ .bottom-safe-area {
|
|
|
+ height: 40rpx;
|
|
|
+ padding-bottom: env(safe-area-inset-bottom);
|
|
|
+ }
|
|
|
+
|
|
|
+ .ellipsis-1 {
|
|
|
+ overflow: hidden;
|
|
|
+ text-overflow: ellipsis;
|
|
|
+ white-space: nowrap;
|
|
|
+ }
|
|
|
+
|
|
|
.ellipsis-2 {
|
|
|
display: -webkit-box;
|
|
|
-webkit-box-orient: vertical;
|
|
|
-webkit-line-clamp: 2;
|
|
|
overflow: hidden;
|
|
|
}
|
|
|
-
|
|
|
- .bottom-safe-area {
|
|
|
- height: 160rpx;
|
|
|
- }
|
|
|
</style>
|