YanXue.vue 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. <template>
  2. <view class="box">
  3. <u-navbar :autoBack="true" title="文物研学" bgColor="rgba(255,255,255,0)" :placeholder="true" titleStyle="font-weight:bold;color:#000000"></u-navbar>
  4. <view v-for="item in research" :key="item.id" class="yx_box" @click="application(item.id)">
  5. <view style="position: absolute; left: 6rpx; top: 6rpx">
  6. <image style="width: 160rpx; height: 240rpx" :src="item.image"></image>
  7. </view>
  8. <view style="margin-left: 200rpx">
  9. <view class="wwd">{{ item.title }}</view>
  10. <view class="time">活动时间:{{ item.start_time.split(' ')[0] }}</view>
  11. </view>
  12. <view class="baoming">
  13. <text>报名</text>
  14. <image style="margin-left: 10rpx; width: 32rpx; height: 32rpx" src="/static/img/arrow-right-line.png"></image>
  15. </view>
  16. </view>
  17. </view>
  18. </template>
  19. <script>
  20. let that;
  21. export default {
  22. data() {
  23. return {
  24. research: []
  25. };
  26. },
  27. onLoad() {
  28. that = this;
  29. this.activityLists();
  30. },
  31. methods: {
  32. // 文物研学
  33. activityLists() {
  34. this.$api.activityLists({ main_body_id: 1, type: 1 }, function (res) {
  35. // console.log(res, '文物研学');
  36. that.research = res.data;
  37. });
  38. },
  39. application(id) {
  40. uni.navigateTo({
  41. url: '/index_fenbao/HuoHuaLiYong/YanXue/XiangQing?id=' + id
  42. });
  43. }
  44. }
  45. };
  46. </script>
  47. <style>
  48. .box {
  49. width: 100%;
  50. padding-bottom: 50rpx;
  51. background-image: url('https://huli-app.wenlvti.net/app_static/WenWuGuanJia/image/xbg_2.png');
  52. background-size: 100% 100%;
  53. background-attachment: fixed;
  54. background-repeat: repeat-y;
  55. height: 100%;
  56. }
  57. .yx_box {
  58. position: relative;
  59. width: 670rpx;
  60. height: 252rpx;
  61. display: flex;
  62. align-items: center;
  63. margin: auto;
  64. margin-top: 34rpx;
  65. background-image: url('https://huli-app.wenlvti.net/app_static/WenWuGuanJia/image/hh_item_bg.png');
  66. background-size: 100% 100%;
  67. }
  68. .wwd {
  69. font-size: 36rpx;
  70. font-weight: 400;
  71. color: #444444;
  72. line-height: 52rpx;
  73. }
  74. .time {
  75. font-size: 28rpx;
  76. color: rgba(68, 68, 68, 0.6);
  77. line-height: 44rpx;
  78. margin-top: 12rpx;
  79. }
  80. .baoming {
  81. display: flex;
  82. width: 116rpx;
  83. height: 56rpx;
  84. line-height: 56rpx;
  85. justify-content: center;
  86. align-items: center;
  87. margin-left: 32rpx;
  88. font-size: 28rpx;
  89. color: #eba869;
  90. border: 2rpx solid #eba869;
  91. }
  92. </style>