index.vue 2.9 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. console.log(e)
  63. this.input = e
  64. console.log(this.input)
  65. request({
  66. url: '/myPage/getPageScanRewordList',
  67. method: 'post',
  68. data: {
  69. storeId:this.$store.state.storeInfo.storeId,
  70. userId:this.$store.state.storeInfo.userId,
  71. 'current': '1',
  72. 'size': '10',
  73. 'searchKey': this.input
  74. }
  75. }).then(res => {
  76. console.log(res)
  77. this.datalist = res.data.data
  78. // 判断扫码类型
  79. for (var i = 0; i < res.data.data.length; i++) {
  80. if (res.data.data[i].getWay == 0) {
  81. this.getWay = "车主扫码"
  82. } else {
  83. this.getWay = "门店扫码"
  84. }
  85. }
  86. console.log(res.data.data)
  87. }).catch(err => {
  88. console.log(err)
  89. })
  90. .finally(() => {
  91. setTimeout(() => {
  92. uni.hideLoading();
  93. this.loading = false;
  94. }, 1000)
  95. })
  96. }
  97. }
  98. }
  99. </script>
  100. <style lang="scss" scoped>
  101. .content {
  102. margin-top: 30rpx;
  103. }
  104. .content-one {
  105. width: 690rpx;
  106. // height: 338rpx;
  107. background: #FFFFFF;
  108. box-shadow: 0px 0px 24px 0px rgba(101, 176, 249, 0.41);
  109. border-radius: 20px;
  110. margin: 0 auto;
  111. margin-top: 50rpx;
  112. }
  113. .content-one-view {
  114. width: 6rpx;
  115. height: 30rpx;
  116. background: #0292FD;
  117. position: relative;
  118. top: 20rpx;
  119. left: 30rpx;
  120. }
  121. .content-one-text {
  122. position: relative;
  123. top: -8rpx;
  124. left: 60rpx;
  125. font-size: 24rpx;
  126. font-weight: bold;
  127. color: #000;
  128. }
  129. .content-one-time {
  130. position: relative;
  131. top: -40rpx;
  132. left: 530rpx;
  133. font-size: 16rpx;
  134. color: #626262;
  135. }
  136. .content-two {
  137. font-size: 24rpx;
  138. color: #6A6A6A;
  139. display: flex;
  140. justify-content: space-between;
  141. width: 600rpx;
  142. margin: 0 auto;
  143. }
  144. .content-two>view:nth-child(2) {
  145. margin-bottom: 20rpx;
  146. }
  147. </style>