help.vue 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  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;">
  5. <image src="/static/bg_help.jpg" style="width: 100%;" mode="widthFix"></image>
  6. </view>
  7. <view style="padding: 20rpx;" :style="'margin-top:'+imgHeight+'px'">
  8. <view class="activity_box" v-for="(item,index) in list" :key="index">
  9. <view class="box_title">
  10. “免费学”公益助学进行时
  11. </view>
  12. <view>
  13. <image src="http://192.168.0.222:8080/img/banner.png" style="width: 100%;height: 330rpx;"></image>
  14. </view>
  15. <u-row >
  16. <u-col span="6" >
  17. <view class="box_title">
  18. 2021-04-22至2021-05-01
  19. </view>
  20. </u-col>
  21. <u-col span="6" text-align="right">
  22. <view style="padding: 8rpx;">
  23. <view class="boxbtn">
  24. 立即参与
  25. </view>
  26. </view>
  27. </u-col>
  28. </u-row>
  29. </view>
  30. </view>
  31. </view>
  32. </template>
  33. <script>
  34. export default {
  35. data() {
  36. return {
  37. list:[1,1,1,1,1,1,1,1,1,1],
  38. imgHeight:0
  39. }
  40. },
  41. onLoad(option) {
  42. },
  43. onShow(){
  44. let w = uni.getSystemInfoSync().windowWidth
  45. this.imgHeight = w/(750/375)-68
  46. console.log(w,33)
  47. console.log(this.imgHeight,33)
  48. },
  49. methods: {
  50. },
  51. }
  52. </script>
  53. <style>
  54. .u-border-bottom:after, .u-border-left:after, .u-border-right:after, .u-border-top-bottom:after, .u-border-top:after, .u-border:after{
  55. border:none !important;
  56. }
  57. </style>
  58. <style scope>
  59. .boxbtn{
  60. width: 132rpx;
  61. height: 40rpx;
  62. background: rgba(249, 96, 10, 0.6);
  63. border-radius: 20rpx;
  64. font-size: 24rpx;
  65. color: #FFFFFF;
  66. float: right;
  67. text-align: center;
  68. line-height: 40rpx;
  69. }
  70. .box_title{
  71. font-size: 24rpx;
  72. font-family: PingFang SC;
  73. font-weight: 500;
  74. color: #2F4379;
  75. padding: 15rpx;
  76. }
  77. .activity_box{
  78. width: 100%;
  79. height: 466rpx;
  80. background: #FFFFFF;
  81. box-shadow: 0rpx 0rpx 16rpx 4rpx rgba(145, 156, 178, 0.1);
  82. border-radius: 32rpx;
  83. position: relative;
  84. margin-bottom: 20rpx;
  85. }
  86. page {
  87. background: #FFFFFF;
  88. }
  89. </style>