teaching-case.vue 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. <template>
  2. <view class="teaching_case" @click="gotoTeDetail">
  3. <view class="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 class="tag">类型</view>
  10. <text>这是教研标题这是教研标题这是教研标题</text>
  11. </view>
  12. <view class="introduce">
  13. 查看详情查看详情查看详情查看详情查看详情查看详情查看详情查看详情查看详情查看详情
  14. </view>
  15. <view class="operate">
  16. <view class="left">
  17. <view class="">收藏</view>
  18. <view class="">订阅</view>
  19. </view>
  20. <button class="btn">立即参与</button>
  21. </view>
  22. </view>
  23. </view>
  24. </template>
  25. <script>
  26. export default {
  27. name:"teaching-case",
  28. data() {
  29. return {
  30. };
  31. },
  32. methods:{
  33. gotoTeDetail(){
  34. uni.navigateTo({
  35. url:"/pages/teachingDetail/teachingDetail"
  36. })
  37. }
  38. }
  39. }
  40. </script>
  41. <style lang="scss">
  42. .teaching_case{
  43. display: flex;
  44. justify-content: space-between;
  45. margin-bottom: 10px;
  46. background-color: #ffffff;
  47. padding: 0rpx 30rpx;
  48. padding-bottom: 20rpx;
  49. .img{
  50. width: 180rpx;
  51. height: 180rpx;
  52. image{
  53. width: 100%;
  54. height:100%;
  55. }
  56. }
  57. .right{
  58. padding-left: 15px;
  59. flex: 1;
  60. width: 100rpx;
  61. display: flex;
  62. flex-direction: column;
  63. align-content: flex-end ;
  64. .title{
  65. display: flex;
  66. margin-bottom: 5px;
  67. .tag{
  68. border: 1px #00b2b6 solid;
  69. font-size: 12px;
  70. display: flex;
  71. white-space: nowrap;
  72. justify-content: center;
  73. align-items: center;
  74. padding: 2px 4px;
  75. border-radius: 3px;
  76. margin-right: 10rpx;
  77. color: #00b2b6;
  78. }
  79. text{
  80. font-weight: bold;
  81. overflow: hidden;
  82. text-overflow:ellipsis;
  83. white-space: nowrap;
  84. }
  85. }
  86. .introduce{
  87. font-size: 16px;
  88. color: #a7a7a7;
  89. // padding: 20rpx 0;
  90. overflow: hidden;
  91. text-overflow:ellipsis;
  92. white-space: nowrap;
  93. }
  94. .operate{
  95. display: flex;
  96. justify-content: space-between;
  97. align-items: flex-end;
  98. .left{
  99. display: flex;
  100. justify-content: space-between;
  101. width: 200rpx;
  102. }
  103. .btn{
  104. width: 80px;
  105. font-size: 12px;
  106. background-color: #3081e8;
  107. color: #fff;
  108. border-radius: 30px;
  109. margin: 0;
  110. float: right;
  111. margin-top: 10px;
  112. }
  113. }
  114. }
  115. }
  116. </style>