help.vue 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. <template>
  2. <view style="position: relative;">
  3. <u-navbar title="助学活动" background="{ background: '#ffffff',opacity:0.4; }"></u-navbar>
  4. <view style="width: 100%;position: fixed;top: 0;z-index: 300;"><image src="/static/bg_help.jpg" style="width: 100%;" mode="widthFix"></image></view>
  5. <view style="padding: 20rpx;" :style="'margin-top:' + imgHeight + 'px'">
  6. <view class="activity_box" v-for="(item, index) in list" :key="index">
  7. <view class="box_title" style="display: flex;align-items: center;justify-content: space-between;">
  8. <view>{{ item.activityName }}</view>
  9. <view><u-icon name="info-circle" color="#2F4379" size="28" @click="openActivesList(item)"></u-icon></view>
  10. </view>
  11. <view><image :src="$method.splitImgHost()" style="width: 100%;height: 330rpx;"></image></view>
  12. <u-row>
  13. <u-col span="6">
  14. <view class="box_title">{{ $method.timestampToTime(item.startTime) }}至{{ $method.timestampToTime(item.endTime) }}</view>
  15. </u-col>
  16. <u-col span="6" text-align="right">
  17. <view style="padding: 8rpx;"><view class="boxbtn" @click="uploadActives">立即参与</view></view>
  18. </u-col>
  19. </u-row>
  20. </view>
  21. </view>
  22. <u-popup v-model="show" mode="bottom" border-radius="14">
  23. <header style="text-align: center;margin-top: 10rpx;color: #2F4379;font-size: 30rpx;font-weight: bold;">参与活动课程列表</header>
  24. <view style="padding: 24rpx;">
  25. <view v-for="(item,index) in activeSList" :key="index" style="padding: 12rpx;display: flex;margin-bottom: 8rpx;border-radius: 32rpx;box-shadow: 0rpx 0rpx 16rpx 4rpx rgba(145,156,178,0.1);background-color: #fff;" @click="jumpPages(item)">
  26. <image style="width:278rpx;height:134rpx;margin-right: 23rpx;" :src="$method.splitImgHost(item.coverUrl)" mode=""></image>
  27. <view style="font-size: 30rpx;color: #2f4379;font-weight: 500;">
  28. {{item.courseName}}
  29. </view>
  30. </view>
  31. </view>
  32. </u-popup>
  33. </view>
  34. </template>
  35. <script>
  36. export default {
  37. data() {
  38. return {
  39. list: [],
  40. imgHeight: 0,
  41. activeSList: [],
  42. show: false
  43. };
  44. },
  45. onLoad(option) {
  46. this.getAtionlist();
  47. },
  48. onShow() {
  49. let w = uni.getSystemInfoSync().windowWidth;
  50. this.imgHeight = w / (750 / 375) - 68;
  51. },
  52. methods: {
  53. getAtionlist() {
  54. this.$api.configurationlist().then(res => {
  55. this.list = res.data.rows;
  56. });
  57. },
  58. uploadActives() {},
  59. openActivesList(option) {
  60. console.log(option)
  61. this.activeSList = option.courses
  62. this.show = true
  63. },
  64. jumpPages(option){
  65. this.$navTo.togo('/pages2/course/detail', {
  66. id: option.courseId
  67. });
  68. return;
  69. },
  70. }
  71. };
  72. </script>
  73. <style>
  74. .u-border-bottom:after,
  75. .u-border-left:after,
  76. .u-border-right:after,
  77. .u-border-top-bottom:after,
  78. .u-border-top:after,
  79. .u-border:after {
  80. border: none !important;
  81. }
  82. </style>
  83. <style scope>
  84. .boxbtn {
  85. width: 132rpx;
  86. height: 40rpx;
  87. background: rgba(249, 96, 10, 0.6);
  88. border-radius: 20rpx;
  89. font-size: 24rpx;
  90. color: #ffffff;
  91. float: right;
  92. text-align: center;
  93. line-height: 40rpx;
  94. }
  95. .box_title {
  96. font-size: 24rpx;
  97. font-family: PingFang SC;
  98. font-weight: 500;
  99. color: #2f4379;
  100. padding: 15rpx;
  101. }
  102. .activity_box {
  103. width: 100%;
  104. height: 466rpx;
  105. background: #ffffff;
  106. box-shadow: 0rpx 0rpx 16rpx 4rpx rgba(145, 156, 178, 0.1);
  107. border-radius: 32rpx;
  108. position: relative;
  109. margin-bottom: 20rpx;
  110. }
  111. page {
  112. background: #ffffff;
  113. }
  114. </style>