You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

преди 2 години
преди 2 години
преди 2 години
преди 2 години
преди 2 години
преди 2 години
преди 2 години
преди 2 години
преди 2 години
преди 2 години
преди 2 години
преди 2 години
преди 2 години
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  1. <template>
  2. <view class="selectCar-box">
  3. <view class="item" v-for="(item,i) in state.list" :key="i">
  4. <view class="iten-left">
  5. <image :src="`${$imgUrl}che.png`" mode=""></image>
  6. <text>{{item.vehiclePlate}}</text>
  7. </view>
  8. <view class="choose-item" @click="choose(i,item)">
  9. <view class="active" v-if="flag==i">
  10. </view>
  11. </view>
  12. </view>
  13. </view>
  14. </template>
  15. <script lang="ts" setup>
  16. import {
  17. reactive,
  18. ref
  19. } from "vue"
  20. import {
  21. navTo
  22. } from "@/utils/utils"
  23. import {
  24. onLoad,
  25. onShow
  26. } from "@dcloudio/uni-app";
  27. import {
  28. orderList
  29. } from "@/utils/network/api.js";
  30. import {
  31. request
  32. } from "@/utils/network/request.js";
  33. import {
  34. msg
  35. } from "@/utils/utils";
  36. import {
  37. getItem,
  38. StorageKeys,
  39. setItem
  40. } from "@/utils/storage";
  41. import {
  42. stringToJson
  43. } from "@/utils/network/encryption";
  44. const state = reactive({
  45. list:[]
  46. });
  47. onLoad(() => {
  48. quanCheckActionTrue().then((item :any) => {
  49. state.list = item.data
  50. console.log(item)
  51. })
  52. });
  53. const quanCheckActionTrue = () => {
  54. var data = {
  55. opId: getItem(StorageKeys.OpenId),
  56. source: 'WECHAT',
  57. tabIndex: '0',
  58. orderStep: '11',
  59. isValueCard: '2'
  60. };
  61. const options = {
  62. type: 2,
  63. data: data,
  64. method: "POST",
  65. showLoading: true,
  66. };
  67. return new Promise(async (resolve, reject) => {
  68. const res = await request(orderList, options);
  69. const data = stringToJson(res.bizContent);
  70. resolve(data);
  71. }).catch((error) => {
  72. reject(error);
  73. });
  74. }
  75. const list = reactive([{
  76. name: "A12345"
  77. },
  78. {
  79. name: "B12345"
  80. },
  81. {
  82. name: "C12345"
  83. },
  84. ])
  85. const flag = ref('0')
  86. const choose = (i, item) => {
  87. flag.value = i
  88. console.log("选择得数据", item);
  89. navTo('/after-sale/card-loss-reporting/cardloss-confirm')
  90. }
  91. </script>
  92. <style>
  93. page {
  94. width: 100%;
  95. height: 100%;
  96. background-color: #EEF7F7;
  97. }
  98. </style>
  99. <style lang="scss" scoped>
  100. .selectCar-box {
  101. // width: 100%;
  102. height: 100%;
  103. padding: 30rpx;
  104. .item {
  105. padding: 20rpx;
  106. display: flex;
  107. justify-content: space-between;
  108. align-items: center;
  109. height: 130rpx;
  110. background: #FFFFFF;
  111. box-shadow: 0rpx 2rpx 6rpx 0rpx rgba(223, 223, 223, 0.8);
  112. border-radius: 20rpx;
  113. margin-bottom: 30rpx;
  114. .iten-left {
  115. display: flex;
  116. align-items: center;
  117. image {
  118. width: 150rpx;
  119. height: 90rpx;
  120. }
  121. text {
  122. margin-left: 20rpx;
  123. font-size: 32rpx;
  124. font-family: Noto Sans S Chinese;
  125. font-weight: 400;
  126. color: #333333;
  127. }
  128. }
  129. .choose-item {
  130. width: 44rpx;
  131. height: 44rpx;
  132. background: #FFFFFF;
  133. border: 2rpx solid #00B38B;
  134. border-radius: 50%;
  135. margin-right: 20rpx;
  136. display: flex;
  137. justify-content: center;
  138. align-items: center;
  139. box-sizing: content-box;
  140. }
  141. .active {
  142. width: 34rpx;
  143. height: 34rpx;
  144. background: #00B38B;
  145. border-radius: 50%;
  146. }
  147. }
  148. }
  149. </style>