teacherClassroom.vue 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205
  1. <template>
  2. <view class="container">
  3. <view class="top">
  4. <text class="title"><text class="title-brown">健康生活方式</text>大讲堂</text>
  5. <image class="top-bg" src="/static/assets/famous1.png"></image>
  6. <view class="txt">
  7. <view>让医学回归生活化,</view>
  8. <view>以健康的生活方式,</view>
  9. <view>改善健康困扰,重拾晚年幸福!</view>
  10. </view>
  11. </view>
  12. <view class="container-body">
  13. <image class="bg" src="/static/assets/bg-class.png"></image>
  14. <text class="title">上医有话说</text>
  15. <!-- <view class="card-box">
  16. <view class="bar">
  17. <image class="" src="/static/assets/bar.png"></image>
  18. <view class="tit">科学养生 | 名师首发</view>
  19. </view>
  20. <view class="img">
  21. <image src="/static/assets/class.png"></image>
  22. </view>
  23. </view> -->
  24. <view class="card-box" v-for="(item,index) in cardList" :key="index" @click="goLearn">
  25. <view class="bar">
  26. <image src="/static/assets/bar.png" mode="widthFix"></image>
  27. <view class="tit">{{item.title}}</view>
  28. </view>
  29. <view class="img">
  30. <image :src="item.img" mode="widthFix"></image>
  31. </view>
  32. </view>
  33. </view>
  34. </view>
  35. </template>
  36. <script>
  37. export default {
  38. data() {
  39. return {
  40. cardList: [{
  41. title: '科学养生 | 名师首发',
  42. img: '/static/assets/class.png'
  43. }
  44. // , {
  45. // title: '科学养生 | 名师首发',
  46. // img: '/static/assets/class.png'
  47. // }, {
  48. // title: '科学养生 | 名师首发',
  49. // img: '/static/assets/class.png'
  50. // }, {
  51. // title: '科学养生 | 名师首发',
  52. // img: '/static/assets/class.png'
  53. // }
  54. , {
  55. title: '科学养生 | 名师首发',
  56. img: '/static/assets/class.png'
  57. }
  58. ]
  59. }
  60. },
  61. computed: {
  62. },
  63. onLoad(option) {
  64. },
  65. methods: {
  66. goLearn() {
  67. uni.navigateTo({
  68. url: '/pages_manage/learn'
  69. })
  70. },
  71. }
  72. }
  73. </script>
  74. <style lang="scss" scoped>
  75. .container {
  76. background-color: #f6e5db;
  77. min-height: 100vh;
  78. .top {
  79. position: relative;
  80. z-index: 1;
  81. font-size: 78rpx;
  82. font-weight: 900;
  83. text-align: center;
  84. padding: 34rpx 0;
  85. .title {
  86. background: linear-gradient(to right, #333032, #5f3b32);
  87. -webkit-background-clip: text;
  88. background-clip: text;
  89. -webkit-text-fill-color: transparent;
  90. position: relative;
  91. z-index: 2;
  92. .title-brown {
  93. -webkit-text-stroke: 2rpx #fff;
  94. text-shadow: 2rpx 2rpx 4rpx rgba(183, 94, 52, 0.5);
  95. background: linear-gradient(to bottom, #c47243, #b0592a);
  96. -webkit-background-clip: text;
  97. background-clip: text;
  98. -webkit-text-fill-color: transparent;
  99. }
  100. }
  101. .top-bg {
  102. position: absolute;
  103. top: 0;
  104. left: 0;
  105. width: 100%;
  106. z-index: 0;
  107. }
  108. .txt {
  109. font-style: italic;
  110. text-align: left;
  111. color: #fff;
  112. font-size: 36rpx;
  113. font-weight: 500;
  114. position: absolute;
  115. left: 8%;
  116. top: 172rpx;
  117. text-shadow:
  118. 0 0 1rpx #b0663c,
  119. 1rpx 1rpx 10rpx rgba(183, 0, 3, 0.3);
  120. }
  121. }
  122. .container-body {
  123. margin-top: 250rpx;
  124. min-height: calc(100vh - 250rpx);
  125. padding: 50rpx 24rpx;
  126. display: flex;
  127. flex-direction: column;
  128. align-items: center;
  129. position: relative;
  130. z-index: 1;
  131. .bg {
  132. position: absolute;
  133. top: 0;
  134. left: 0;
  135. width: 100%;
  136. height: 100%;
  137. object-fit: cover;
  138. z-index: -1;
  139. }
  140. .title {
  141. font-size: 70rpx;
  142. font-weight: 900;
  143. background: linear-gradient(to bottom, #c47243, #b0592a);
  144. -webkit-background-clip: text;
  145. background-clip: text;
  146. -webkit-text-fill-color: transparent;
  147. -webkit-text-stroke: 2rpx #fff;
  148. text-shadow: 2rpx 2rpx 4rpx rgba(183, 94, 52, 0.5);
  149. }
  150. .card-box {
  151. width: 100%;
  152. margin-top: 30rpx;
  153. .bar {
  154. position: relative;
  155. image {
  156. position: absolute;
  157. width: 100%;
  158. height: 100%;
  159. z-index: -1;
  160. }
  161. .tit {
  162. text-align: center;
  163. line-height: 90rpx;
  164. color: #fff;
  165. font-weight: 500;
  166. font-size: 36rpx;
  167. }
  168. }
  169. .img {
  170. margin-top: -8rpx;
  171. padding: 24rpx;
  172. background-color: #fff;
  173. border-radius: 0 0 20rpx 20rpx;
  174. image {
  175. width: 100%;
  176. height: 100%;
  177. }
  178. }
  179. }
  180. }
  181. }
  182. </style>