record.vue 5.6 KB

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