record.vue 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248
  1. <template>
  2. <view class="intro-page common">
  3. <view class="top-class"></view>
  4. <view class="title">
  5. <view class="logo-container">
  6. <image class="logo-text" @click="openDetail" src="https://hyscancode.oss-cn-hangzhou.aliyuncs.com/xiaochengxu/xhc/common/logo.png" />
  7. </view>
  8. <view class="title-1">
  9. <view class="title-image-2"></view>
  10. </view>
  11. </view>
  12. <view class="head">
  13. <u-row class="row-class" justify="flex-end">
  14. <u-col span="4">
  15. <image class="logo-rules-2" @click="openDetail" src="https://hyscancode.oss-cn-hangzhou.aliyuncs.com/xiaochengxu/xhc/common/rules.png" />
  16. </u-col>
  17. </u-row>
  18. </view>
  19. <!-- 公司简介内容卡片 -->
  20. <view class="content-2">
  21. <view class="content-title">
  22. 扫码记录
  23. </view>
  24. <view class="content_text">
  25. <view class="filter-btn-group " style="margin: 30rpx 0rpx">
  26. <view class="row-text">发放状态:</view>
  27. <view v-for="(item, idx) in filterOptions" :key="idx"
  28. :class="['filter-btn', filterStatus === item.value ? 'active' : '']"
  29. @click="onFilterChange(item.value)">
  30. {{ item.label }}
  31. </view>
  32. </view>
  33. <view class="filter-btn-group list-title">
  34. <view class="son">
  35. 奖品名称
  36. </view>
  37. <view class="son">
  38. 中奖时间
  39. </view>
  40. <view class="son">
  41. 兑换状态
  42. </view>
  43. <view>
  44. 操作
  45. </view>
  46. </view>
  47. <view class="content-list">
  48. <image v-if="list == null || list.length == 0 " style="height: 240rpx;margin-top: 140rpx"
  49. src="https://hyscancode.oss-cn-hangzhou.aliyuncs.com/xiaochengxu/qilang/noData.png"
  50. mode="heightFix"></image>
  51. <template v-for="(item, index) in list">
  52. <view class="row-one" :key="index">
  53. <view class="filter-btn-group">
  54. <view class="son" v-if="item.prize_type === 2">
  55. 再来一包
  56. </view>
  57. <view class="son" v-else-if="item.prize_type === 4">
  58. {{item.prize_detail}}积分
  59. </view>
  60. <view class="son" v-else>
  61. {{ item.prize_name }}
  62. </view>
  63. <view class="son">
  64. {{ item.zhongjiang_time }}
  65. </view>
  66. <view class="son">
  67. {{ item.duijiang_status }}
  68. </view>
  69. <view class="detail-btn" @click="toggleDetail(index)">
  70. 详情
  71. </view>
  72. </view>
  73. <!-- 只有当 detailVisible 为 true 时才显示 detail 部分 -->
  74. <view class="detail" v-if="item.detailVisible">
  75. <view class="text-one">
  76. 详情:{{item.prize_detail}}
  77. </view>
  78. <view class="text-two">
  79. 发放时间:{{ item.send_time != undefined ? item.send_time : '--' }} <!-- 这里可以填入合适的数据 -->
  80. </view>
  81. </view>
  82. </view>
  83. </template>
  84. </view>
  85. </view>
  86. </view>
  87. <view class="return_view">
  88. <view class="return-button" @click="goBack">返回</view>
  89. </view>
  90. </view>
  91. </template>
  92. <script>
  93. import {
  94. scanQuery
  95. } from '@/api/scan'
  96. import recordMixin from '@/mixins/recordMixin.js'
  97. export default {
  98. mixins: [recordMixin],
  99. onLoad() {
  100. this.scanCode = uni.getStorageSync('scanCode');
  101. // 调用 mixin 中的通用方法
  102. this.baseInitGetlist(scanQuery);
  103. },
  104. methods: {
  105. onFilterChange(val) {
  106. this.filterStatus = val;
  107. this.baseInitGetlist(scanQuery);
  108. },
  109. initGetlist() {
  110. // 调用 mixin 中的通用方法
  111. this.baseInitGetlist(scanQuery);
  112. },
  113. openDetail() {
  114. uni.navigateTo({
  115. url: '/pages/xhc/index/rules'
  116. });
  117. },
  118. }
  119. }
  120. </script>
  121. <style lang="scss" scoped>
  122. @import url('../../../static/scss/common_xhc.css');
  123. .row-class {
  124. height: 80rpx;
  125. }
  126. .cardTop{
  127. background-image:
  128. url("https://hyscancode.oss-cn-hangzhou.aliyuncs.com/xiaochengxu/cjx/smjl.png");
  129. }
  130. .theme-text {
  131. height: 10vh;
  132. text-align: center;
  133. line-height: 11vh;
  134. .textImage {
  135. height: 80rpx;
  136. width: 400rpx;
  137. }
  138. }
  139. .content {
  140. height: 68vh;
  141. padding: 10rpx 24rpx;
  142. overflow: auto;
  143. align-items: center;
  144. justify-content: center;
  145. border-radius: 48px;
  146. background: #FDE2B1;
  147. border: 6px solid #FB911b;
  148. margin: 10vh 40rpx 0rpx;
  149. }
  150. .filter-btn-group {
  151. display: flex;
  152. justify-content: flex-start;
  153. align-items: center;
  154. gap: 24rpx;
  155. margin: 10rpx 0 10rpx 0;
  156. }
  157. .filter-btn {
  158. padding: 4rpx 20rpx;
  159. border: 2rpx solid #F8D994;
  160. color: #F8D994;
  161. font-size: 28rpx;
  162. transition: all 0.2s;
  163. }
  164. .filter-btn.active {
  165. background: #F8D994;
  166. color: #000000;
  167. border: 2rpx solid #f9f9f9;
  168. }
  169. .row-text {
  170. font-weight: bold;
  171. font-size: 14px;
  172. color: #F8D994 ;
  173. }
  174. .list-title {
  175. font-weight: bold;
  176. font-size: 28rpx;
  177. color: #F8D994 ;
  178. }
  179. .son {
  180. width: 140rpx;
  181. }
  182. .row-one {
  183. font-weight: 400;
  184. font-size: 28rpx;
  185. color: #ff9800 ;
  186. }
  187. .detail {
  188. background-image: url("https://hyscancode.oss-cn-hangzhou.aliyuncs.com/xiaochengxu/qilang/detailImg.png");
  189. background-size: cover;
  190. /* 确保背景图片自适应填充整个容器 */
  191. background-position: inherit;
  192. /* 背景图片居中显示 */
  193. background-repeat: no-repeat;
  194. /* 防止背景图重复 */
  195. height: 134rpx;
  196. .text-one {
  197. height: 70rpx;
  198. line-height: 90rpx;
  199. text-align: left;
  200. margin-left: 20rpx;
  201. }
  202. .text-two {
  203. text-align: left;
  204. height: 60rpx;
  205. line-height: 60rpx;
  206. margin-left: 20rpx;
  207. }
  208. }
  209. .detail-btn {
  210. color: #F94C28;
  211. }
  212. .content-list {
  213. overflow: auto;
  214. text-align: center;
  215. height: calc(100% - 160rpx);
  216. }
  217. </style>