您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. <template>
  2. <view class="content">
  3. <view class="list-item" v-for="(item,index) in state.tableData">
  4. <view><text>卡号:</text><text>{{item.cardId}}</text></view>
  5. <view><text>反白时间:</text><text>{{item.createTime}}</text></view>
  6. <view><text>反白原因:</text><text>{{item.reasonOut}}</text></view>
  7. <view><text>下黑时间:</text><text>{{item.creationTime}}</text></view>
  8. <view><text>下黑原因:</text><text>{{item.reasonIn}}</text></view>
  9. <view><text>黑名单类型:</text><text>{{item.typeC}}</text></view>
  10. <view><text>状态:</text><text>{{item.status == '1'?'在黑':'已反白'}}</text></view>
  11. </view>
  12. <view class="no" v-if="state.tableData.length==0">暂无黑名单</view>
  13. </view>
  14. </template>
  15. <script setup lang="ts">
  16. import { reactive } from "vue";
  17. import { onLoad } from "@dcloudio/uni-app";
  18. import { blackApi } from "@/utils/network/api.js";
  19. import { request } from "@/utils/network/request.js";
  20. import { stringToJson } from "@/utils/network/encryption.js";
  21. import { getItem } from "@/utils/storage";
  22. const state = reactive({
  23. vehiclePlate: "",
  24. vehiclePlateColor: "",
  25. tableData: [],
  26. blackStatus: []
  27. });
  28. onLoad((option : any) => {
  29. console.log("option", option)
  30. let black = getItem('key')['BLACKLIST_TYPE'];
  31. for (var k = 0; k < black.length; k++) {
  32. let obj = {};
  33. obj['value'] = black[k]['code']
  34. obj['text'] = black[k]['name']
  35. state.blackStatus.push(obj)
  36. }
  37. console.log("black", state.blackStatus)
  38. state.vehiclePlate = option.vehiclePlate;
  39. state.vehiclePlateColor = option.vehiclePlateColor;
  40. list()
  41. })
  42. const list = () => {
  43. const options = {
  44. type: 2,
  45. data: {
  46. "vehiclePlate": state.vehiclePlate,
  47. "vehiclePlateColor": state.vehiclePlateColor
  48. },
  49. method: 'POST',
  50. showLoading: true,
  51. }
  52. request(blackApi, options).then((res) => {
  53. const data = stringToJson(res.bizContent);
  54. const getData = data.blackCards;
  55. for (var i = 0; i < getData.length; i++) {
  56. for (var m = 0; m < state.blackStatus.length; m++) {
  57. if (getData[i]['type'] == state.blackStatus[m]['value']) {
  58. getData[i]['typeC'] = state.blackStatus[m]['text']
  59. break;
  60. }
  61. }
  62. }
  63. state.tableData = data.blackCards
  64. console.log("圈存金额查询2", data)
  65. })
  66. }
  67. </script>
  68. <style scoped>
  69. .content {
  70. padding-bottom: 20rpx;
  71. background-color: #EEF7F7;
  72. padding-top: 20rpx;
  73. min-height: 100vh;
  74. }
  75. .list-item {
  76. width: 95%;
  77. border-radius: 10rpx;
  78. margin: 30rpx auto;
  79. font-size: 28rpx;
  80. border: 1rpx solid #ccc;
  81. padding: 12rpx;
  82. box-sizing: border-box;
  83. background-color: white;
  84. }
  85. .list-item>view {
  86. margin-bottom: 10rpx;
  87. width: 94%;
  88. }
  89. .no {
  90. text-align: center;
  91. padding-top: 100rpx;
  92. }
  93. </style>