record.vue 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201
  1. <template>
  2. <view class="container">
  3. <view class="header">
  4. <image src="../../static/images/skm_fn_bg.png" mode="aspectFill" class="bg-img"></image>
  5. <view class="info">
  6. <text class="num" v-if="list.length>0">{{list[0].total||0}}</text>
  7. <text class="num" v-else>0</text>
  8. <text class="desc">条记录</text>
  9. </view>
  10. </view>
  11. <view class="main">
  12. <view class="page-title flex-row-between">
  13. <view class="title">生成记录</view>
  14. </view>
  15. <view @click="viewRecords" :data-index='index' class="item flex-row" v-for="(item,index) in list" :key="item.id">
  16. <image :src="item.re_url" mode="aspectFit" class="type-img" ></image>
  17. <view class="info">
  18. <view class="title text-1">替换链接:{{item.url}}</view>
  19. <view class="desc flex-row-between">
  20. <text class="num">替换类型:{{item.type==1?'二维码':item.type==2?`${$test.$test}记录`:'链接'}}</text>
  21. <text class="time">{{item.create_time}}</text>
  22. </view>
  23. </view>
  24. </view>
  25. </view>
  26. </view>
  27. </template>
  28. <script>
  29. export default {
  30. data() {
  31. return {
  32. $test:this.$test.$test,
  33. list: [],
  34. total: 0,
  35. page:1,
  36. }
  37. },
  38. onLoad() {
  39. },
  40. onShow() {
  41. this.page=1;
  42. this.list=[];
  43. this.funeng_list();
  44. },
  45. onReachBottom(e) {
  46. this.funeng_list()
  47. },
  48. methods: {
  49. viewRecords(e){
  50. var index = e.currentTarget.dataset.index,
  51. qrcode =this.list[index].re_url,
  52. card_num =this.list[index].card_num;
  53. uni.navigateTo({
  54. url:"./results?type=2"+"&card_num="+card_num,
  55. })
  56. },
  57. funeng_list() {
  58. this.request({
  59. url: "picture/lists",
  60. data: {
  61. page: this.page,
  62. token: uni.getStorageSync("token"),
  63. },
  64. }).then(res => {
  65. console.log(res, "res")
  66. if (res.code === '200') {
  67. this.list = this.list.concat(res.data);
  68. this.page = this.page + 1;
  69. // this.list = res.data;
  70. // for (let i of res.data) {
  71. // this.total = this.total + i.scan_num;
  72. // }
  73. }
  74. });
  75. }
  76. }
  77. }
  78. </script>
  79. <style>
  80. .header {
  81. width: 100%;
  82. height: 198rpx;
  83. position: relative;
  84. }
  85. .header .bg-img {
  86. display: block;
  87. position: absolute;
  88. left: 0;
  89. top: 0;
  90. z-index: -1;
  91. width: 100%;
  92. height: 198rpx;
  93. }
  94. .header .info {
  95. width: 100%;
  96. height: 100%;
  97. display: flex;
  98. flex-flow: row nowrap;
  99. justify-content: center;
  100. align-items: center;
  101. }
  102. .header .info .num {
  103. font-size: 70rpx;
  104. font-weight: 700;
  105. font-family: DIN Alternate, DIN Alternate-Bold;
  106. color: #fff;
  107. line-height: 1;
  108. /* transform: scale(1, 1.3); */
  109. }
  110. .header .info .desc {
  111. font-size: 32rpx;
  112. line-height: 1;
  113. color: #fff;
  114. margin-top: 39rpx;
  115. }
  116. .main {
  117. background-color: #fff;
  118. border-radius: 20rpx 20rpx 0 0;
  119. margin-top: -20rpx;
  120. padding: 20rpx 40rpx 0;
  121. }
  122. .main .page-title {
  123. padding: 28rpx 0 40rpx;
  124. }
  125. .main .page-title .title {
  126. font-size: 36rpx;
  127. color: #262626;
  128. line-height: 50rpx;
  129. font-weight: 600;
  130. }
  131. .main .item {
  132. background-color: #fafafa;
  133. border-radius: 8rpx;
  134. padding: 40rpx 32rpx 40rpx 34rpx;
  135. margin-bottom: 40rpx;
  136. }
  137. .main .item .type-img {
  138. display: block;
  139. flex: none;
  140. width: 80rpx;
  141. height: 80rpx;
  142. margin-right: 26rpx;
  143. }
  144. .main .item .info {
  145. flex: auto;
  146. }
  147. .main .item .info .title {
  148. width: 538rpx;
  149. font-size: 30rpx;
  150. font-weight: 500;
  151. color: #323232;
  152. line-height: 42rpx;
  153. margin-bottom: 16rpx;
  154. }
  155. .main .item .info .desc {
  156. /* margin-top: 16rpx; */
  157. }
  158. .main .item .info .num {
  159. font-size: 28rpx;
  160. font-weight: 400;
  161. color: #3387FF;
  162. line-height: 40rpx;
  163. }
  164. .main .item .info .time {
  165. font-size: 28rpx;
  166. font-weight: 400;
  167. color: #999;
  168. line-height: 40rpx;
  169. padding-right: 24rpx;
  170. }
  171. </style>