teaching-case.vue 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207
  1. <template>
  2. <view class="teaching_case" @click="gotoTeDetail">
  3. <view class="img cell-img">
  4. <!-- <slot name="img"></slot> -->
  5. <image src="../../static/yym/Rectangle23.png" mode="aspectFill"></image>
  6. </view>
  7. <view class="right">
  8. <view class="title">
  9. <view v-if="!item.btn" class="tag bqZ-font">类型</view>
  10. <view v-else class="tag bqZ-font" >类型</view>
  11. <text class="btn-font" v-if="!item.btn" style="font-size: 33rpx;">这是教研标题这是教研标题这是教研标题</text>
  12. <text class="three-font" v-else>这是活动活动活动活动活动活动活动活动活动</text>
  13. </view>
  14. <view v-if="!item.btn" class="introduce fz-font">
  15. 查看详情查看详情查看详情查看详情查看详情查看详情查看详情查看详情查看详情查看详情
  16. </view>
  17. <view v-else class="introduce fz-font">
  18. 活动描述活动描述活动描述活动描述活动描述活动描述活动描述
  19. </view>
  20. <view class="operate" v-if="!item.btn">
  21. <view class="left">
  22. <view class="opr" style="padding-right: 25rpx;">
  23. <uni-icons type="star" size="22"></uni-icons>
  24. <text class="fz-font">收藏</text>
  25. </view>
  26. <view class="opr">
  27. <uni-icons type="cloud-download" size="22"></uni-icons>
  28. <!-- <image src="../../static/yym/Vector (Stroke).png" style="width: 30rpx;height: 30rpx;" mode="aspectFill"></image> -->
  29. <text class="fz-font">订阅</text>
  30. </view>
  31. </view>
  32. <button class="btn sBtn-font" disableEventPropagation="true" @click.stop="join">立即参与</button>
  33. </view>
  34. <view class="operate" v-else>
  35. <view class="left">
  36. <view class="price num-font"><text class="three-font">¥</text> 188</view>
  37. <view class="pernum fz-font">已报名123人</view>
  38. </view>
  39. <button class="btn sBtn-font" @click.stop="actApply">立即报名</button>
  40. </view>
  41. </view>
  42. </view>
  43. </template>
  44. <script>
  45. export default {
  46. name:"teaching-case",
  47. props:{
  48. item:{
  49. type:Object,
  50. default (){
  51. return{
  52. btn:0 //0教研列表 1活动列表
  53. }
  54. }
  55. }
  56. },
  57. data() {
  58. return {
  59. };
  60. },
  61. methods:{
  62. gotoTeDetail(){
  63. if(this.item.btn){
  64. uni.navigateTo({
  65. url:"/pages/activityDetail/activityDetail"
  66. })
  67. }else{
  68. uni.navigateTo({
  69. url:"/pages/teachingDetail/teachingDetail"
  70. })
  71. }
  72. },
  73. join(){
  74. uni.navigateTo({
  75. url:'/pages/jys/jys'
  76. })
  77. },
  78. actApply(){
  79. uni.navigateTo({
  80. url:'/pages/hd/hd'
  81. })
  82. }
  83. }
  84. }
  85. </script>
  86. <style lang="scss">
  87. .teaching_case{
  88. display: flex;
  89. justify-content: space-between;
  90. margin-bottom: 10px;
  91. background-color: #ffffff;
  92. padding: 20rpx 30rpx;
  93. // padding-bottom: 20rpx;
  94. .img{
  95. width: 160rpx;
  96. height: 160rpx;
  97. image{
  98. width: 100%;
  99. height:100%;
  100. }
  101. }
  102. .right{
  103. padding-left: 15px;
  104. flex: 1;
  105. // height: 300px;
  106. width: 100rpx;
  107. display: flex;
  108. flex-direction: column;
  109. // align-content: flex-end ;
  110. justify-content: space-between;
  111. // align-content: space-between;
  112. .title{
  113. display: flex;
  114. align-items: center;
  115. margin-bottom: 5px;
  116. // margin-bottom: 10rpx;
  117. .tag{
  118. border: 1px #00b2b6 solid;
  119. // font-size: 12px;
  120. width: 64rpx;
  121. height: 38rpx;
  122. display: flex;
  123. white-space: nowrap;
  124. justify-content: center;
  125. align-items: center;
  126. // padding: 2px 4px;
  127. padding: 1rpx 6rpx;
  128. border-radius: 3px;
  129. margin-right: 10rpx;
  130. color: #00b2b6;
  131. }
  132. text{
  133. font-weight: bold;
  134. overflow: hidden;
  135. text-overflow:ellipsis;
  136. white-space: nowrap;
  137. }
  138. }
  139. .introduce{
  140. // font-size: 28rpx;
  141. color: #a7a7a7;
  142. // padding: 20rpx 0;
  143. overflow: hidden;
  144. text-overflow:ellipsis;
  145. white-space: nowrap;
  146. }
  147. .operate{
  148. display: flex;
  149. justify-content: space-between;
  150. align-items: flex-end;
  151. // align-items: baseline;
  152. .left{
  153. display: flex;
  154. // justify-content: space-between;
  155. // align-items: center;
  156. // align-items: baseline;
  157. // width: 200rpx;
  158. .opr{
  159. display: flex;
  160. align-items: center;
  161. text{
  162. padding-left: 3rpx;
  163. color: #666666;
  164. }
  165. }
  166. .pernum{
  167. color: #666666;
  168. // font-size: 30rpx;
  169. }
  170. .price{
  171. // font-size: 40rpx;
  172. font-weight: bold;
  173. color: #f8a551;
  174. padding-right: 10rpx;
  175. }
  176. }
  177. .btn{
  178. z-index: 5;
  179. // font-size: 12px;
  180. background-color: #3081e8;
  181. color: #fff;
  182. border-radius: 30px;
  183. margin: 0;
  184. float: right;
  185. height: 28px;
  186. line-height: 28px;
  187. // margin-top: 10px;
  188. // padding: 0 15rpx;
  189. letter-spacing:1px;
  190. }
  191. }
  192. }
  193. }
  194. </style>