Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

refundPage-selectCar.vue 3.1KB

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