activityTemplate.vue 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. <template>
  2. <view class="container container-activity-template">
  3. <text class="title">{{ activityName }}</text>
  4. <block v-if="dataList.length > 0">
  5. <view class="lable-title lable-box">
  6. <text v-for="item in lableList" :key="item">{{ item }}</text>
  7. </view>
  8. <view v-for="item in dataList" :key="item.id" class="lable-box lable-content">
  9. <text>{{ item.RealName }}</text>
  10. <text>{{ item.CompanyName }}</text>
  11. <text>{{ item.IsMeeting == 1 ? "是" : "否" }}</text>
  12. <text>{{ item.SigninTime }}</text>
  13. </view>
  14. <view class="ButtonText" @click="viewDetailsHandler"> 查看活动详情 </view>
  15. </block>
  16. <view class="nodata" v-else>
  17. <image src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/act_search.png" mode="" class="nodata_ico"></image>
  18. <text>无名下客户报名本场活动</text>
  19. </view>
  20. </view>
  21. </template>
  22. <script>
  23. import { MsgTemplate } from "@/config/api.js";
  24. export default {
  25. data() {
  26. return {
  27. lableList: ["姓名", "公司名", "是否到会", "签到时间"],
  28. dataList: [],
  29. activityId: 0,
  30. detailId: 0,
  31. activityName: "",
  32. };
  33. },
  34. methods: {
  35. async getDetail() {
  36. const res = await MsgTemplate.activity_signinDetail({
  37. ActivityId: this.detailId,
  38. });
  39. if (res.Ret === 200) {
  40. this.dataList = res.Data.List || [];
  41. this.activityId = res.Data.ActivityId;
  42. this.activityName = res.Data.ActivityName;
  43. }
  44. },
  45. viewDetailsHandler() {
  46. uni.navigateTo({ url: "/activityPages/activityDetail/activityDetail?id=" + this.activityId });
  47. },
  48. },
  49. onLoad(optios) {
  50. this.detailId = Number(optios.id) || 0;
  51. this.detailId && this.getDetail();
  52. },
  53. };
  54. </script>
  55. <style scoped lang="scss">
  56. .container-activity-template {
  57. padding: 30rpx;
  58. .title {
  59. font-weight: 500;
  60. font-size: 42rpx;
  61. line-height: 60rpx;
  62. color: #333333;
  63. margin-bottom: 50rpx;
  64. }
  65. .lable-title {
  66. height: 60rpx;
  67. border-top: 1px solid #dcdfe6;
  68. border-bottom: 1px solid #dcdfe6;
  69. border-left: 1px solid #dcdfe6;
  70. background: #ebeef5;
  71. color: #333333;
  72. }
  73. .lable-box {
  74. display: flex;
  75. font-size: 24rpx;
  76. text {
  77. display: flex;
  78. align-items: center;
  79. justify-content: center;
  80. border-right: 1px solid #dcdfe6;
  81. overflow: hidden;
  82. }
  83. text:nth-child(1) {
  84. width: 127rpx;
  85. }
  86. text:nth-child(2) {
  87. width: 220rpx;
  88. }
  89. text:nth-child(3) {
  90. width: 121rpx;
  91. }
  92. text:nth-child(4) {
  93. flex: 1;
  94. text-align: center;
  95. }
  96. }
  97. .lable-content {
  98. height: 90rpx;
  99. border-top: 1px solid #dcdfe6;
  100. border-bottom: 1px solid #dcdfe6;
  101. border-left: 1px solid #dcdfe6;
  102. margin-top: -2rpx;
  103. }
  104. .ButtonText {
  105. display: flex;
  106. align-items: center;
  107. justify-content: center;
  108. width: 304rpx;
  109. height: 78rpx;
  110. margin: 50rpx auto 0;
  111. background: #3385ff;
  112. border-radius: 4rpx;
  113. color: #fff;
  114. font-size: 32rpx;
  115. }
  116. }
  117. </style>