history.vue 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. <template>
  2. <view class="content">
  3. <homenav :iStatusBarHeight="iStatusBarHeight" :title="'历史查询'"></homenav>
  4. <view class="box">
  5. <view class="historyLine" v-for="(item,index) in historyList" @click="goDetail(item)">
  6. <view class="historyLineCar">
  7. <view class="historyLogoBox">
  8. <image :src="item.logo" mode="" class="historylinecarImg"></image>
  9. </view>
  10. <view>
  11. <view class="historylinecar">{{item.title}}</view>
  12. <view style="display: flex;justify-content: space-between;">
  13. <view class="historyLineVin">
  14. <view class="vinms" v-if="item.ifVin">VIN</view>
  15. <view class="vinNum" v-if="item.ifVin">{{item.vin}}</view>
  16. </view>
  17. <view class="time">{{item.createTime.slice(0,10)}}</view>
  18. </view>
  19. </view>
  20. </view>
  21. </view>
  22. <nodata v-if="historyList.length==0&&loading"></nodata>
  23. </view>
  24. </view>
  25. </template>
  26. <script>
  27. import homenav from "../../components/homenav/nav.vue"
  28. import nodata from '../../components/nodata/nodata.vue'
  29. export default {
  30. components: {
  31. homenav,nodata
  32. },
  33. data() {
  34. return {
  35. historyList:[],
  36. iStatusBarHeight:'',
  37. loading:false,
  38. }
  39. },
  40. onLoad(opt) {
  41. this.iStatusBarHeight = uni.getSystemInfoSync().statusBarHeight;
  42. this.queryHistory()
  43. },
  44. methods: {
  45. goDetail(e){
  46. uni.navigateTo({
  47. url:'/pages/index/goodsList?nLevelID='+e.nLevelID+'&logo='+e.logo+'&value='+e.title+'&id='+e.groupID+'&isVin='+e.ifVin+'&vin='+e.vin
  48. })
  49. },
  50. queryHistory(){
  51. this.loading=false;
  52. this.$http2('queryHistory', {
  53. },'POST').then(res => {
  54. this.loading=true;
  55. this.historyList=res.data
  56. })
  57. },
  58. }
  59. }
  60. </script>
  61. <style scoped>
  62. .box{
  63. padding: 0 24rpx;
  64. }
  65. .historylinecarImg{
  66. width: 54rpx;
  67. height: 54rpx;
  68. }
  69. .historylinecar{
  70. font-weight: 400;font-size: 26rpx;
  71. color: #1A1A1A;
  72. line-height: 46rpx;width: 636rpx;
  73. }
  74. .historyLine{
  75. padding: 30rpx 0;border-top: 1rpx solid #EEEEEE;
  76. }
  77. .historyLineCar{
  78. display: flex;justify-content: space-between;
  79. }
  80. .vinms{
  81. width: 38rpx;
  82. height: 26rpx;
  83. background: linear-gradient(224deg, #FFDA28 0%, #FFBF35 100%);
  84. border-radius: 4rpx;
  85. text-align: center;
  86. line-height: 26rpx;
  87. font-weight: 600;
  88. color: #FFFFFF;
  89. font-size: 18rpx;
  90. margin-top: 2rpx;
  91. }
  92. .historyLineVin{
  93. display: flex;
  94. }
  95. .vinNum{
  96. font-weight: 400;font-size: 22rpx;padding-left: 10rpx;
  97. color: #999999;line-height: 30rpx;
  98. }
  99. .historyLogoBox{
  100. display: flex;align-items: center;
  101. }
  102. .time{
  103. font-size: 24rpx;
  104. color: #999;
  105. }
  106. </style>