123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173 |
- /**
- * 这里是uni-app内置的常用样式变量
- *
- * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
- * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
- *
- */
- /**
- * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
- *
- * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
- */
- /* 颜色变量 */
- /* 行为相关颜色 */
- /* 文字基本颜色 */
- /* 背景颜色 */
- /* 边框颜色 */
- /* 尺寸变量 */
- /* 文字尺寸 */
- /* 图片尺寸 */
- /* Border Radius */
- /* 水平间距 */
- /* 垂直间距 */
- /* 透明度 */
- /* 文章场景相关 */
- .container {
- min-height: 100vh;
- background: linear-gradient(180deg, #eaf6ff 0%, #f7f8fa 100%);
- padding-bottom: 120rpx;
- }
- .spacer {
- height: 60rpx;
- padding-top: 40px;
- }
- .search-bar {
- display: flex;
- align-items: center;
- background: #fff;
- border-radius: 40rpx;
- box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.06);
- padding: 0 32rpx;
- margin: 0 auto 24rpx auto;
- width: 80vw;
- max-width: 600rpx;
- height: 80rpx;
- }
- input {
- flex: 1;
- border: none;
- background: transparent;
- font-size: 30rpx;
- height: 80rpx;
- }
- .iconfont {
- color: #bbb;
- font-size: 36rpx;
- margin-left: 10rpx;
- }
- .category-tabs {
- display: flex;
- margin: 20rpx 0 0 0;
- background: #fff;
- border-radius: 20rpx;
- overflow-x: auto;
- box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.03);
- }
- .tab {
- flex: 1;
- text-align: center;
- padding: 20rpx 0;
- font-size: 30rpx;
- color: #666;
- position: relative;
- white-space: nowrap;
- }
- .tab.active {
- color: #3498db;
- font-weight: bold;
- }
- .tab.active::after {
- content: "";
- position: absolute;
- left: 50%;
- bottom: 0;
- transform: translateX(-50%);
- width: 40rpx;
- height: 6rpx;
- background: #3498db;
- border-radius: 3rpx;
- }
- .course-grid {
- display: grid;
- grid-template-columns: repeat(2, 1fr);
- gap: 32rpx;
- padding: 32rpx 24rpx 0 24rpx;
- }
- .card {
- background: #fff;
- border-radius: 20rpx;
- box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.08);
- overflow: hidden;
- transition: transform 0.2s;
- display: flex;
- flex-direction: column;
- min-height: 380rpx;
- }
- .card:active {
- transform: scale(0.98);
- }
- .cover {
- width: 100%;
- height: 140rpx;
- background-color: #f5f5f5;
- border-radius: 20rpx 20rpx 0 0;
- }
- .content {
- flex: 1;
- display: flex;
- flex-direction: column;
- justify-content: space-between;
- padding: 20rpx 16rpx 16rpx 16rpx;
- }
- .title {
- font-size: 28rpx;
- font-weight: 600;
- margin-bottom: 8rpx;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- }
- .desc {
- font-size: 24rpx;
- color: #888;
- margin-bottom: 12rpx;
- display: -webkit-box;
- -webkit-line-clamp: 2;
- -webkit-box-orient: vertical;
- overflow: hidden;
- }
- .price-row {
- display: flex;
- justify-content: space-between;
- align-items: center;
- }
- .price {
- color: #e74c3c;
- font-size: 28rpx;
- font-weight: bold;
- }
- .sales {
- font-size: 24rpx;
- color: #999;
- }
- .loading-container,
- .error-container {
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- padding: 40rpx;
- }
- .error-text {
- color: #e74c3c;
- font-size: 28rpx;
- margin-bottom: 20rpx;
- }
- .retry-btn {
- background: #3498db;
- color: #fff;
- padding: 16rpx 32rpx;
- border-radius: 30rpx;
- font-size: 28rpx;
- }
|