schedule-item.vue 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  1. <template>
  2. <view class="schedule-item" :class="{ 'f-index': scene === 'index' }" @click="onJumpDetail">
  3. <view class="b-cover">
  4. <image style="width: 100%; height: 100%" :src="item.cover_url" mode="aspectFill"></image>
  5. </view>
  6. <view class="b-main">
  7. <text class="text_23">{{ item.name }}</text>
  8. <view class="b-price">
  9. <!-- <view class="s-payment" :class="{ 'f-small': textCost }">{{ goodsPrice(item.price) }}</view> -->
  10. <view class="aa" style="display: flex; margin-top: 70rpx; width: 150rpx">
  11. <view lines="1" class="text_25">会员价</view>
  12. <view lines="1" class="text_26">¥{{ item.price }}</view>
  13. </view>
  14. <!-- <view class="s-vip-price" v-if="item.card_price > 0 && !iphonePlatform">会员价 ¥{{ item.card_price }}</view> -->
  15. <button bindtap="onClick" class="button_6">
  16. <text lines="1" class="text_27">立即报名</text>
  17. </button>
  18. </view>
  19. <!-- 分类 -->
  20. <!-- <view class="b-info">
  21. <view class="s-category">{{ item.category_name }}</view>
  22. <view class="b-counter">
  23. <view class="s-learn">{{ item.count_user }}人参加</view>
  24. </view>
  25. </view> -->
  26. </view>
  27. </view>
  28. </template>
  29. <script>
  30. import mixinsGoods from '@/mixins/goods.js';
  31. export default {
  32. name: 'schedule-item',
  33. mixins: [mixinsGoods],
  34. props: {
  35. item: {
  36. type: Object,
  37. default: null
  38. },
  39. scene: {
  40. type: String,
  41. default: null
  42. }
  43. },
  44. data() {
  45. return {};
  46. },
  47. methods: {
  48. onJumpDetail() {
  49. uni.navigateTo({
  50. url: '/pages/schedule/detail?sid=' + this.item.id
  51. });
  52. }
  53. }
  54. };
  55. </script>
  56. <style>
  57. .button_6 {
  58. background-color: rgba(202, 86, 66, 1);
  59. border-radius: 10rpx;
  60. height: 44rpx;
  61. display: flex;
  62. flex-direction: column;
  63. width: 129rpx;
  64. margin: 70rpx 18rpx 0 50rpx;
  65. }
  66. .text_27 {
  67. color: rgba(248, 226, 175, 1);
  68. font-size: 24rpx;
  69. white-space: nowrap;
  70. line-height: 45rpx;
  71. margin-left: -10rpx;
  72. }
  73. .text_23 {
  74. width: 110rpx;
  75. height: 26rpx;
  76. overflow-wrap: break-word;
  77. color: rgba(49, 37, 32, 1);
  78. font-size: 28rpx;
  79. font-family: SourceHanSansCN-Regular;
  80. font-weight: normal;
  81. text-align: left;
  82. white-space: nowrap;
  83. line-height: 28rpx;
  84. margin-left: 1rpx;
  85. }
  86. .text_25 {
  87. width: 60rpx;
  88. height: 20rpx;
  89. overflow-wrap: break-word;
  90. color: rgba(202, 86, 66, 1);
  91. font-size: 20rpx;
  92. font-family: SourceHanSansCN-Regular;
  93. font-weight: normal;
  94. text-align: left;
  95. white-space: nowrap;
  96. line-height: 20rpx;
  97. margin-top: 2rpx;
  98. }
  99. .text_26 {
  100. width: 56rpx;
  101. height: 22rpx;
  102. overflow-wrap: break-word;
  103. color: rgba(202, 86, 66, 1);
  104. font-size: 28rpx;
  105. font-family: SourceHanSansCN-Bold;
  106. font-weight: 700;
  107. text-align: left;
  108. white-space: nowrap;
  109. line-height: 28rpx;
  110. }
  111. .schedule-item {
  112. padding: 20rpx;
  113. background: #fff;
  114. display: flex;
  115. align-items: center;
  116. }
  117. .schedule-item:last-child {
  118. margin-bottom: 0;
  119. }
  120. .schedule-item.f-index .b-main .b-title {
  121. max-width: 370upx;
  122. }
  123. .schedule-item .b-cover {
  124. width: 220rpx;
  125. height: 160rpx;
  126. }
  127. .schedule-item .b-cover image {
  128. width: 100%;
  129. height: 100%;
  130. }
  131. .schedule-item .b-main {
  132. flex: 1;
  133. margin-left: 20upx;
  134. }
  135. .schedule-item .b-main .b-title {
  136. font-size: 30upx;
  137. color: #333;
  138. max-width: 530upx;
  139. display: inline-block;
  140. }
  141. .schedule-item .b-main .b-price {
  142. margin-top: 16upx;
  143. display: flex;
  144. align-items: center;
  145. }
  146. .schedule-item .b-main .b-price .s-payment {
  147. margin-right: 20upx;
  148. font-size: 36upx;
  149. font-weight: bold;
  150. color: #dd524d;
  151. }
  152. .schedule-item .b-main .b-price .s-payment.f-small {
  153. font-size: 28upx;
  154. }
  155. .schedule-item .b-main .b-price .s-vip-price {
  156. margin-right: 20upx;
  157. font-size: 26upx;
  158. color: #f0ad4e;
  159. }
  160. .schedule-item .b-main .b-price .s-vip-free {
  161. margin-right: 20upx;
  162. padding: 6upx 10upx;
  163. font-size: 24upx;
  164. color: #555;
  165. background: #f0ad4e;
  166. border-radius: 5upx;
  167. }
  168. .schedule-item .b-main .b-info {
  169. margin-top: 16upx;
  170. display: flex;
  171. align-items: center;
  172. justify-content: space-between;
  173. }
  174. .schedule-item .b-main .b-info .s-category {
  175. font-size: 26upx;
  176. color: #666;
  177. }
  178. .schedule-item .b-main .b-info .b-counter {
  179. display: flex;
  180. align-items: center;
  181. }
  182. .schedule-item .b-main .b-info .b-counter .s-like {
  183. font-size: 24upx;
  184. color: #999;
  185. }
  186. .schedule-item .b-main .b-info .b-counter .s-learn {
  187. margin-left: 20upx;
  188. font-size: 24upx;
  189. color: #999;
  190. }
  191. </style>