index.vue 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. <template>
  2. <view>
  3. <view class="content">
  4. <u-search placeholder="请输入搜索内容" @custom="data" v-model="keyword"></u-search>
  5. </view>
  6. <view class="content-one" v-for="(item,index) in datalist" :key="index">
  7. <view class="content-one-view">
  8. </view>
  9. <view class="content-one-text">获得奖励:{{item.money}}元</view>
  10. <!-- <view class="content-one-time">2020-10-28</view> -->
  11. <view class="content-two">
  12. <view>
  13. 轮胎型号
  14. </view>
  15. <view>
  16. {{item.tireModel}}
  17. </view>
  18. </view>
  19. <view class="content-two">
  20. <view>
  21. 扫码胎号
  22. </view>
  23. <view>
  24. {{item.tyreNum}}
  25. </view>
  26. </view>
  27. <view class="content-two">
  28. <view>
  29. 奖励类型
  30. </view>
  31. <view>
  32. {{item.getWay}}
  33. </view>
  34. </view>
  35. <view class="content-two">
  36. <view>
  37. 获得时间
  38. </view>
  39. <view>
  40. {{item.createTime}}
  41. </view>
  42. </view>
  43. </view>
  44. </view>
  45. </template>
  46. <script>
  47. import {
  48. request
  49. } from '../../../common/request/request'
  50. require("promise.prototype.finally").shim()
  51. export default {
  52. data() {
  53. return {
  54. datalist: [
  55. ],
  56. input: '',
  57. keyword: ''
  58. }
  59. },
  60. methods: {
  61. data(e) {
  62. this.input = e
  63. request({
  64. url: '/myPage/getPageScanRewordList',
  65. method: 'post',
  66. data: {
  67. storeId:this.$store.state.storeInfo.storeId,
  68. userId:this.$store.state.storeInfo.userId,
  69. 'current': '1',
  70. 'size': '10',
  71. 'searchKey': this.input
  72. }
  73. }).then(res => {
  74. this.datalist = res.data.data
  75. // 判断扫码类型
  76. for (var i = 0; i < res.data.data.length; i++) {
  77. if (res.data.data[i].getWay == 0) {
  78. this.getWay = "车主扫码"
  79. } else {
  80. this.getWay = "门店扫码"
  81. }
  82. }
  83. }).catch(err => {
  84. })
  85. .finally(() => {
  86. setTimeout(() => {
  87. uni.hideLoading();
  88. this.loading = false;
  89. }, 1000)
  90. })
  91. }
  92. }
  93. }
  94. </script>
  95. <style lang="scss" scoped>
  96. .content {
  97. margin-top: 30rpx;
  98. }
  99. .content-one {
  100. width: 690rpx;
  101. // height: 338rpx;
  102. background: #FFFFFF;
  103. box-shadow: 0px 0px 24px 0px rgba(101, 176, 249, 0.41);
  104. border-radius: 20px;
  105. margin: 0 auto;
  106. margin-top: 50rpx;
  107. }
  108. .content-one-view {
  109. width: 6rpx;
  110. height: 30rpx;
  111. background: #0292FD;
  112. position: relative;
  113. top: 20rpx;
  114. left: 30rpx;
  115. }
  116. .content-one-text {
  117. position: relative;
  118. top: -8rpx;
  119. left: 60rpx;
  120. font-size: 24rpx;
  121. font-weight: bold;
  122. color: #000;
  123. }
  124. .content-one-time {
  125. position: relative;
  126. top: -40rpx;
  127. left: 530rpx;
  128. font-size: 16rpx;
  129. color: #626262;
  130. }
  131. .content-two {
  132. font-size: 24rpx;
  133. color: #6A6A6A;
  134. display: flex;
  135. justify-content: space-between;
  136. width: 600rpx;
  137. margin: 0 auto;
  138. }
  139. .content-two>view:nth-child(2) {
  140. margin-bottom: 20rpx;
  141. }
  142. </style>