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.

refund-deposit-card-selectCar.vue 3.7KB

1 rok temu
1 rok temu
1 rok temu
1 rok temu
1 rok temu
1 rok temu
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183
  1. <template>
  2. <!-- <nav-bar title="储值卡圈存-退款-选择车辆"></nav-bar> -->
  3. <view class="selectCar-box">
  4. <view v-if="state.list&&state.list.length>0" @click="choose(i,item)" class="item" v-for="(item,i) in state.list" :key="i">
  5. <view class="iten-left">
  6. <image :src="`${$imgUrl}che.png`" mode="aspectFill"></image>
  7. <text>{{item.vehiclePlate}}</text>
  8. </view>
  9. <view class="choose-item">
  10. <view class="active" v-if="flag==i">
  11. </view>
  12. </view>
  13. </view>
  14. <view v-else>
  15. <empty title='暂无找到相关车辆信息' />
  16. </view>
  17. </view>
  18. </template>
  19. <script setup lang="ts">
  20. import empty from "@/components/empty/empty.vue";
  21. import {
  22. reactive,
  23. ref
  24. } from "vue"
  25. import {
  26. navTo,msg
  27. } from "@/utils/utils"
  28. import {
  29. onLoad,
  30. } from "@dcloudio/uni-app";
  31. import {
  32. orderList
  33. } from "@/utils/network/api.js";
  34. import {
  35. request
  36. } from "@/utils/network/request.js";
  37. import {
  38. getItem,
  39. StorageKeys,
  40. } from "@/utils/storage";
  41. import {
  42. stringToJson
  43. } from "@/utils/network/encryption";
  44. const state = reactive({
  45. list: [] ,//车辆list
  46. });
  47. const flag = ref('0') //默认选择0
  48. onLoad(() => {
  49. quanCheckActionTrue().then((item: any) => {
  50. state.list = item.data
  51. })
  52. });
  53. const quanCheckActionTrue = () => {
  54. let source = ""
  55. // #ifdef MP-ALIPAY
  56. source ="ALI"
  57. // #endif
  58. // #ifdef MP-WEIXIN
  59. source ="WECHAT"
  60. // #endif
  61. var data = {
  62. opId: getItem(StorageKeys.OpenId),
  63. source: source, //渠道为小程序
  64. tabIndex: '0', //0全部
  65. orderStep: '11', //11 为已完成”
  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. console.log("item",item)
  85. navTo(`/subpackage/orders/refund-deposit-card?cardId=${item.cardId}`)
  86. }
  87. </script>
  88. <style>
  89. page {
  90. width: 100%;
  91. height: 100%;
  92. display: flex;
  93. flex-direction: column;
  94. background-color: #F3F3F3;
  95. }
  96. </style>
  97. <style lang="scss" scoped>
  98. .flex {
  99. display: flex;
  100. justify-content: center;
  101. }
  102. .selectCar-box {
  103. // width: 100%;
  104. height: 100%;
  105. padding: 30rpx;
  106. background-color: #EEF7F7;
  107. .item {
  108. padding: 20rpx;
  109. display: flex;
  110. justify-content: space-between;
  111. align-items: center;
  112. height: 130rpx;
  113. background: #FFFFFF;
  114. box-shadow: 0rpx 2rpx 6rpx 0rpx rgba(223, 223, 223, 0.8);
  115. border-radius: 20rpx;
  116. margin-bottom: 30rpx;
  117. .iten-left {
  118. display: flex;
  119. align-items: center;
  120. image {
  121. width: 150rpx;
  122. height: 90rpx;
  123. }
  124. text {
  125. margin-left: 20rpx;
  126. font-size: 32rpx;
  127. font-family: Noto Sans S Chinese;
  128. font-weight: 400;
  129. color: #333333;
  130. }
  131. }
  132. .choose-item {
  133. width: 44rpx;
  134. height: 44rpx;
  135. background: #FFFFFF;
  136. border: 2rpx solid #00B38B;
  137. border-radius: 50%;
  138. margin-right: 20rpx;
  139. display: flex;
  140. justify-content: center;
  141. align-items: center;
  142. box-sizing: content-box;
  143. }
  144. .active {
  145. width: 34rpx;
  146. height: 34rpx;
  147. background: #00B38B;
  148. border-radius: 50%;
  149. }
  150. }
  151. }
  152. .submit {
  153. height: 80rpx;
  154. background: linear-gradient(-90deg, #43A1E0 0%, #13E7C1 100%);
  155. box-shadow: 0rpx 4rpx 11rpx 1rpx rgba(223, 223, 223, 0.5);
  156. border-radius: 40rpx;
  157. font-size: 32rpx;
  158. font-family: Microsoft YaHei;
  159. font-weight: 400;
  160. color: #FFFFFF;
  161. line-height: 80rpx;
  162. position: fixed;
  163. bottom: 70rpx;
  164. width: 670rpx;
  165. left: 50%;
  166. transform: translate(-50%);
  167. text-align: center;
  168. }
  169. </style>