LuckyDrawEventsDetail.vue 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. <template>
  2. <view>
  3. <view class="">
  4. <cu-custom :isBack="true" bgColor="bg-gradual-blue">
  5. <block slot="backText">返回</block>
  6. <block slot="content">活动详情</block>
  7. <!-- <block slot="right" >
  8. <view @click="bm()">
  9. 报名
  10. </view>
  11. </block> -->
  12. </cu-custom>
  13. </view>
  14. <view class="cu-card article">
  15. <view class="cu-item shadow">
  16. <!-- 活动名称 -->
  17. <view class="title">
  18. <view class="text-center"> {{dataDetail.name}} </view>
  19. </view>
  20. <!-- 活动详情 -->
  21. <view class="content">
  22. <view class="desc">
  23. <view class="text-content"> {{dataDetail.detail}} </view>
  24. </view>
  25. </view>
  26. <!-- 图片 -->
  27. <view class="content">
  28. <image style="width: 100%;" src="/static/lucky_draw_events.png" mode="widthFix"></image>
  29. </view>
  30. <view class=" padding-lr" :key="'00'" :id="'00'">
  31. <view class="cu-bar solid-bottom bg-white">
  32. <view class="action">
  33. <text class="cuIcon-present text-red"></text>
  34. <text class="text-red" style="margin-left: 2upx;" @click="toLottery()">
  35. 中奖信息
  36. </text>
  37. </view>
  38. <view class="action">
  39. <text class="text-grey" style="" @click="toLottery()">
  40. 活动详情
  41. </text>
  42. </view>
  43. </view>
  44. </view>
  45. <view class="padding-top padding-lr" v-for="(item,index) in dataDetail.luckyDrawAwardsDTOList" :key="index" :id="'main-'+index">
  46. <view class="cu-bar solid-bottom bg-white">
  47. <view class="action">
  48. <text class="cuIcon-present text-green"></text>
  49. <text class="text-green" style="margin-left: 2upx;">
  50. {{item.name}}
  51. </text>
  52. <text class="text-blue" style="margin-left: 20upx;">
  53. {{item.prizeName}}
  54. </text>
  55. <view class="action" style="margin-left: 20upx;">
  56. <view class="cu-tag round bg-green sm">{{item.number}}件</view>
  57. </view>
  58. </view>
  59. </view>
  60. </view>
  61. <view class=" margin-top" style="padding-left: 10px;padding-right: 10px;">
  62. <button style="width: 100%;" class='cu-btn lg bg-gradual-blue shadow ' @click="signUp()">报名</button>
  63. </view>
  64. </view>
  65. </view>
  66. </view>
  67. </template>
  68. <script>
  69. import LuckyDrawEventsService from '@/api/test/luckyDraw/LuckyDrawEventsService'
  70. export default {
  71. data() {
  72. return {
  73. list: [],
  74. dataDetail: {}
  75. };
  76. },
  77. luckyDrawEventsService: null,
  78. onLoad(option) {
  79. this.luckyDrawEventsService = new LuckyDrawEventsService()
  80. let { eventId } = option
  81. this.init(eventId)
  82. },
  83. onReady() {
  84. },
  85. methods: {
  86. // 数据初始化方法
  87. init(id) {
  88. this.luckyDrawEventsService.queryById(id).then(({data}) => {
  89. this.dataDetail = data
  90. })
  91. },
  92. // 跳转活动报名页面 参数eventId为活动id
  93. signUp() {
  94. uni.navigateTo({
  95. url: '/pages/test/luckyDraw/LuckyDrawRegister?eventId='+this.dataDetail.id
  96. })
  97. },
  98. // 跳转活动中奖信息页面 参数eventId为活动id
  99. toLottery() {
  100. uni.navigateTo({
  101. url: '/pages/test/luckyDraw/LuckyDrawShowList?eventId='+this.dataDetail.id
  102. })
  103. }
  104. },
  105. }
  106. </script>