helpDetail.vue 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252
  1. <template>
  2. <view style="position: relative;">
  3. <u-navbar title=" " background="{ background: '#ffffff',opacity:0.4; }"></u-navbar>
  4. <view style="width: 100%;height: 375rpx;position: fixed;top: 0;z-index: 300;">
  5. <image :src="pageInfo.activityLogo !== null ? $method.splitImgHost(pageInfo.activityLogo) : '@/static/bg_help.jpg'" style="width: 100%;height: 100%;"></image>
  6. <view class="fotPost">
  7. <view style="display: flex;align-items: center;">
  8. <image style="width: 23rpx;height: 27rpx;margin-right: 5rpx;" src="@/static/clock@3x.png" mode=""></image>
  9. <view style="color: #fff;font-weight: 500;font-size: 30rpx;">距结束 {{ dstime }}</view>
  10. </view>
  11. <view style="display: flex;align-items: center;padding-right: 20rpx;">
  12. <view style="color: #fff;font-weight: 500;font-size: 30rpx;">
  13. 剩余名额:
  14. <text style="font-weight: bold;margin-left: 9rpx;">{{ pageInfo.quantity - pageInfo.userNumber }}</text>
  15. </view>
  16. </view>
  17. </view>
  18. </view>
  19. <view style="padding: 20rpx;padding-top: 0!important;" :style="'margin-top:' + imgHeight + 'px'">
  20. <view class="activity_box">
  21. <button class="clasTys" open-type="share"><image style="width: 100%;height: 100%;position: absolute;top: 0;left: 0;z-index: 99;" src="@/static/shares@3x.png" mode=""></image></button>
  22. <text class="titleIns">活动介绍</text>
  23. <view class="texts">活动名称:{{ pageInfo.activityName }}</view>
  24. <view class="texts">活动类型:{{pageInfo.activityType === 0 ? '优惠券':pageInfo.activityType === 1 ? '折扣券':pageInfo.activityType === 2 ? '线上直播':pageInfo.activityType === 3 ? '定价':pageInfo.activityType === 4 ? '优惠':pageInfo.activityType === 5 ? '折扣':'未知'}}</view>
  25. <view class="texts" style="margin-bottom: 46rpx;">
  26. 活动时间:{{ $method.timestampToTime(pageInfo.startTime) }} ~ {{ $method.timestampToTime(pageInfo.endTime) }}
  27. </view>
  28. <text class="titleIns">活动详情</text>
  29. <view class="acDetail"><image style="width: 100%;" :src="$method.splitImgHost(pageInfo.activityContentUrl)" mode="widthFix"></image></view>
  30. </view>
  31. <view class="classTs" style="margin-left: 25rpx;">活动课程</view>
  32. <view class="lisboxsz">
  33. <view class="listSty" v-for="(item, index) in pageInfo.courseList" :key="index" @click="jumpCourse(item.courseId)">
  34. <view class="imgboxsfot"><image style="width: 100%;height: 100%;" :src="$method.splitImgHost(item.coverUrl)" mode=""></image></view>
  35. <view class="textsFot">{{ item.courseName }}</view>
  36. <view class="fotStys">
  37. <view class="dis_fu">
  38. <view class="leftImgs"><image style="width: 100%;height: 100%;" src="@/static/people.png" mode=""></image></view>
  39. <view class="rightNums">2023</view>
  40. </view>
  41. <view class="dis_fu">
  42. <view class="riTs">活动价</view>
  43. <view class="PriceStsy">¥{{ item.price }}</view>
  44. </view>
  45. </view>
  46. </view>
  47. </view>
  48. </view>
  49. </view>
  50. </template>
  51. <script>
  52. export default {
  53. data() {
  54. return {
  55. imgHeight: 0,
  56. pageInfo: {},
  57. dstime: null
  58. };
  59. },
  60. onLoad(option) {
  61. this.getAtionlist(option.id);
  62. },
  63. onShow() {
  64. let w = uni.getSystemInfoSync().windowWidth;
  65. this.imgHeight = w / (750 / 375) - 78;
  66. },
  67. onShareAppMessage: function(res) {
  68. return {
  69. title: '助学活动',
  70. path: `/pages2/wd/helpDetail?id=${this.pageInfo.id}`
  71. };
  72. },
  73. mounted() {},
  74. methods: {
  75. getAtionlist(int) {
  76. this.$api.configurationlist({ id: int }).then(res => {
  77. this.pageInfo = res.data.rows[0];
  78. this.djStime(res.data.rows[0].endTime);
  79. });
  80. },
  81. jumpCourse(int) {
  82. this.$navTo.togo('/pages2/course/detail', {
  83. id: int
  84. });
  85. return;
  86. },
  87. djStime(v) {
  88. var self = this;
  89. setInterval(() => {
  90. self.dstime = self.$method.GetRTime(v);
  91. }, 1000);
  92. },
  93. }
  94. };
  95. </script>
  96. <style>
  97. .u-border-bottom:after,
  98. .u-border-left:after,
  99. .u-border-right:after,
  100. .u-border-top-bottom:after,
  101. .u-border-top:after,
  102. .u-border:after {
  103. border: none !important;
  104. }
  105. </style>
  106. <style scope>
  107. .boxbtn {
  108. width: 132rpx;
  109. height: 40rpx;
  110. background: rgba(249, 96, 10, 0.6);
  111. border-radius: 20rpx;
  112. font-size: 24rpx;
  113. color: #ffffff;
  114. float: right;
  115. text-align: center;
  116. line-height: 40rpx;
  117. }
  118. .box_title {
  119. font-size: 24rpx;
  120. font-family: PingFang SC;
  121. font-weight: 500;
  122. color: #2f4379;
  123. padding: 15rpx;
  124. }
  125. .activity_box {
  126. width: 100%;
  127. /* height: 466rpx; */
  128. background: #ffffff;
  129. box-shadow: 0rpx 0rpx 16rpx 4rpx rgba(145, 156, 178, 0.1);
  130. border-radius: 32rpx;
  131. position: relative;
  132. margin-bottom: 20rpx;
  133. padding: 20rpx;
  134. }
  135. .clasTys {
  136. background-color: #fff;
  137. width: 52rpx;
  138. height: 52rpx;
  139. position: absolute;
  140. border-radius: 50%;
  141. overflow: hidden;
  142. top: 20rpx;
  143. right: 20rpx;
  144. box-shadow: 0rpx 0rpx 16rpx 4rpx rgba(11, 208, 120, 0.2);
  145. }
  146. .clasTys::after{
  147. border: none;
  148. }
  149. .titleIns {
  150. height: 46rpx;
  151. line-height: 46rpx;
  152. padding: 0rpx 17rpx;
  153. border-radius: 23rpx;
  154. background-color: #fff;
  155. box-shadow: 0rpx 0rpx 16rpx 4rpx rgba(145, 156, 178, 0.1);
  156. color: #32467b;
  157. font-size: 30rpx;
  158. font-weight: bold;
  159. margin-bottom: 15rpx;
  160. display: inline-block;
  161. }
  162. .texts {
  163. margin-left: 14rpx;
  164. margin-bottom: 21rpx;
  165. color: #32467b;
  166. font-weight: 500;
  167. font-size: 24rpx;
  168. }
  169. .fotPost {
  170. width: 100%;
  171. display: flex;
  172. padding: 13rpx 35rpx;
  173. align-items: center;
  174. background-image: linear-gradient(transparent, rgba(0, 0, 0, 0.4));
  175. position: absolute;
  176. bottom: 0rpx;
  177. justify-content: space-between;
  178. }
  179. .acDetail {
  180. width: 100%;
  181. /* height: auto; */
  182. }
  183. .lisboxsz {
  184. padding: 0rpx 14rpx;
  185. display: flex;
  186. justify-content: space-between;
  187. flex-wrap: wrap;
  188. }
  189. .classTs {
  190. margin-bottom: 16rpx;
  191. color: #32467b;
  192. font-size: 24rpx;
  193. font-weight: bold;
  194. }
  195. .listSty {
  196. flex-shrink: 1;
  197. width: 331rpx;
  198. height: 230rpx;
  199. margin-bottom: 28rpx;
  200. }
  201. .imgboxsfot {
  202. width: 100%;
  203. height: 160rpx;
  204. box-shadow: 0rpx 6rpx 6rpx 0rpx rgba(47, 67, 121, 0.08);
  205. }
  206. .textsFot {
  207. font-size: 24rpx;
  208. color: #666;
  209. font-weight: 500;
  210. display: -webkit-box;
  211. overflow: hidden;
  212. text-overflow: ellipsis;
  213. word-wrap: break-word;
  214. white-space: normal !important;
  215. -webkit-line-clamp: 1;
  216. -webkit-box-orient: vertical;
  217. }
  218. .fotStys {
  219. display: flex;
  220. align-items: center;
  221. justify-content: space-between;
  222. }
  223. .dis_fu {
  224. display: flex;
  225. align-items: center;
  226. }
  227. .leftImgs {
  228. width: 22rpx;
  229. height: 16rpx;
  230. margin-right: 9rpx;
  231. line-height: 16rpx;
  232. }
  233. .rightNums {
  234. color: #999;
  235. font-size: 20rpx;
  236. }
  237. .riTs {
  238. font-weight: 500;
  239. font-size: 16rpx;
  240. color: #e91313;
  241. margin-right: 9rpx;
  242. }
  243. .PriceStsy {
  244. font-size: 24rpx;
  245. color: #e91313;
  246. font-weight: bold;
  247. }
  248. page {
  249. background: #ffffff;
  250. }
  251. </style>