listBlock1.vue 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228
  1. <template>
  2. <!-- <view class="teaching_case" v-for="(i,index) in classList" :key="index + 'a'" @click="" :data-index="index"> -->
  3. <view class="listBlock1">
  4. <view class="img cell-img">
  5. <!-- 课程图片 -->
  6. <slot name="pic"></slot>
  7. <!-- <image :src="i.img" v-if="!item.btn" mode="aspectFill"></image> -->
  8. </view>
  9. <view class="right">
  10. <view class="">
  11. <view class="title">
  12. <view v-if="!item.btn" class="tag bqZ-font">类型</view>
  13. <text class="btn-font" v-if="!item.btn" style="">
  14. <!-- 课程名称 -->
  15. <slot name="tit"></slot>
  16. <!-- {{i.className}} -->
  17. </text>
  18. </view>
  19. <view v-if="!item.btn" class="introduce fwb-font">
  20. <!-- 简介 -->
  21. <slot name="intro"></slot>
  22. <!-- {{ i.intro }} -->
  23. </view>
  24. </view>
  25. <view class="operate">
  26. <view class="left">
  27. <view class="opr" style="padding-right: 25rpx">
  28. <view class="icon">
  29. <!-- 收藏按钮 -->
  30. <slot name="Sicon"></slot>
  31. <!-- <image src="http://43.139.158.220:5007/img/static/yym/Star 1 (Stroke).png"
  32. style="width: 28rpx; height: 26rpx" mode="aspectFill"></image> -->
  33. </view>
  34. <text class="fz-font">收藏</text>
  35. </view>
  36. <view class="opr">
  37. <view class="icon">
  38. <!-- 订阅按钮 -->
  39. <slot name="Dicon"></slot>
  40. <!-- <image src="http://43.139.158.220:5007/img/static/yym/Vector (Stroke).png"
  41. style="width: 22rpx; height: 26rpx" mode="aspectFill"></image> -->
  42. </view>
  43. <text class="fz-font">订阅</text>
  44. </view>
  45. </view>
  46. <view class="">
  47. <!-- 立即参与按钮 -->
  48. <slot name="btn"></slot>
  49. <!-- <button class="btn sBtn-font" disableEventPropagation="true" @click.stop="join">
  50. 立即参与
  51. </button> -->
  52. </view>
  53. </view>
  54. </view>
  55. </view>
  56. </template>
  57. <script>
  58. export default {
  59. name:"listBlock1",
  60. data() {
  61. return {
  62. };
  63. },
  64. methods:{
  65. join() {
  66. const value = this.$store.state.user.openid;
  67. if (value == '') {
  68. uni.navigateTo({
  69. url: "/pages/login_Wechat/login_Wechat",
  70. });
  71. return 1;
  72. } else {
  73. //推荐课程
  74. const urls = [
  75. "https://szptxnjys.yuketang.cn/pro/portal/about/szpt-99Q00351166273N",
  76. "https://szptxnjys.yuketang.cn/pro/portal/about/szpt-99Q00330324841N",
  77. "https://szptxnjys.yuketang.cn/pro/portal/about/szpt-99Q00231455802N",
  78. "https://szptxnjys.yuketang.cn/pro/portal/about/szpt-99Q00406339964N",
  79. ];
  80. let index = this.indexId;
  81. if (index >= 0 && index < urls.length) {
  82. const url = urls[index];
  83. uni.navigateTo({
  84. url: "/pages/skipone/skipone?url=" + encodeURIComponent(url),
  85. });
  86. }
  87. }
  88. },
  89. }
  90. }
  91. </script>
  92. <style lang="scss">
  93. .listBlock1{
  94. display: flex;
  95. justify-content: space-between;
  96. background-color: #ffffff;
  97. padding: 20rpx 30rpx;
  98. .img {
  99. width: 160rpx;
  100. height: 160rpx;
  101. image {
  102. width: 100%;
  103. height: 100%;
  104. border-radius: 10rpx;
  105. }
  106. }
  107. .right {
  108. padding-left: 20rpx;
  109. flex: 1;
  110. // height: 300px;
  111. width: 100rpx;
  112. display: flex;
  113. flex-direction: column;
  114. // align-content: flex-end ;
  115. justify-content: space-between;
  116. // align-content: space-between;
  117. .title {
  118. display: flex;
  119. justify-content: flex-start;
  120. align-items: center;
  121. margin-bottom: 15rpx;
  122. // margin-bottom: 10rpx;
  123. text {
  124. font-weight: bold;
  125. overflow: hidden;
  126. text-overflow: ellipsis;
  127. white-space: nowrap;
  128. }
  129. }
  130. .introduce {
  131. // font-size: 28rpx;
  132. color: #a7a7a7;
  133. // padding: 20rpx 0;
  134. // width: 560rpx;
  135. height: 40rpx;
  136. overflow: hidden;
  137. text-overflow: ellipsis;
  138. white-space: nowrap;
  139. }
  140. .operate {
  141. display: flex;
  142. justify-content: space-between;
  143. // align-items: baseline;
  144. align-items: flex-end;
  145. .left {
  146. display: flex;
  147. // justify-content: space-between;
  148. // align-items: center;
  149. align-items: baseline;
  150. // width: 200rpx;
  151. .opr {
  152. display: flex;
  153. align-items: center;
  154. .icon {
  155. width: 32rpx;
  156. height: 32rpx;
  157. display: flex;
  158. justify-content: center;
  159. align-items: center;
  160. }
  161. text {
  162. padding-left: 3rpx;
  163. color: #666666;
  164. }
  165. }
  166. }
  167. .btn {
  168. z-index: 5;
  169. border: none;
  170. padding: 0;
  171. text-align: center;
  172. // padding: 8px, 24px, 8px, 24px;
  173. background-color: rgba(48, 129, 232, 1);
  174. color: #fff;
  175. border-radius: 100rpx;
  176. float: right;
  177. width: 144rpx;
  178. height: 48rpx;
  179. line-height: 48rpx;
  180. letter-spacing: 1px;
  181. }
  182. }
  183. }
  184. .tag {
  185. border: 1px #00b2b6 solid;
  186. flex-shrink: 0;
  187. letter-spacing: 2rpx;
  188. width: 64rpx;
  189. height: 32rpx;
  190. display: flex;
  191. white-space: nowrap;
  192. justify-content: center;
  193. align-items: center;
  194. border-radius: 4rpx;
  195. margin-right: 10rpx;
  196. color: #00b2b6;
  197. line-height: 32rpx;
  198. }
  199. }
  200. </style>