Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

refund-deposit-card-selectCar.vue 3.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  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. isAfter: true,
  67. };
  68. const options = {
  69. type: 2,
  70. data: data,
  71. method: "POST",
  72. showLoading: true,
  73. };
  74. return new Promise(async (resolve, reject) => {
  75. const res = await request(orderList, options);
  76. const data = stringToJson(res.bizContent);
  77. console.log("data",data)
  78. resolve(data);
  79. }).catch((error) => {
  80. reject(error);
  81. });
  82. }
  83. const choose = (i, item) => {
  84. flag.value = i
  85. console.log("item",item)
  86. navTo(`/subpackage/orders/refund-deposit-card?cardId=${item.cardId}`)
  87. }
  88. </script>
  89. <style>
  90. page {
  91. width: 100%;
  92. height: 100%;
  93. display: flex;
  94. flex-direction: column;
  95. background-color: #F3F3F3;
  96. }
  97. </style>
  98. <style lang="scss" scoped>
  99. .flex {
  100. display: flex;
  101. justify-content: center;
  102. }
  103. .selectCar-box {
  104. // width: 100%;
  105. height: 100%;
  106. padding: 30rpx;
  107. background-color: #EEF7F7;
  108. .item {
  109. padding: 20rpx;
  110. display: flex;
  111. justify-content: space-between;
  112. align-items: center;
  113. height: 130rpx;
  114. background: #FFFFFF;
  115. box-shadow: 0rpx 2rpx 6rpx 0rpx rgba(223, 223, 223, 0.8);
  116. border-radius: 20rpx;
  117. margin-bottom: 30rpx;
  118. .iten-left {
  119. display: flex;
  120. align-items: center;
  121. image {
  122. width: 150rpx;
  123. height: 90rpx;
  124. }
  125. text {
  126. margin-left: 20rpx;
  127. font-size: 32rpx;
  128. font-family: Noto Sans S Chinese;
  129. font-weight: 400;
  130. color: #333333;
  131. }
  132. }
  133. .choose-item {
  134. width: 44rpx;
  135. height: 44rpx;
  136. background: #FFFFFF;
  137. border: 2rpx solid #00B38B;
  138. border-radius: 50%;
  139. margin-right: 20rpx;
  140. display: flex;
  141. justify-content: center;
  142. align-items: center;
  143. box-sizing: content-box;
  144. }
  145. .active {
  146. width: 34rpx;
  147. height: 34rpx;
  148. background: #00B38B;
  149. border-radius: 50%;
  150. }
  151. }
  152. }
  153. .submit {
  154. height: 80rpx;
  155. background: linear-gradient(-90deg, #43A1E0 0%, #13E7C1 100%);
  156. box-shadow: 0rpx 4rpx 11rpx 1rpx rgba(223, 223, 223, 0.5);
  157. border-radius: 40rpx;
  158. font-size: 32rpx;
  159. font-family: Microsoft YaHei;
  160. font-weight: 400;
  161. color: #FFFFFF;
  162. line-height: 80rpx;
  163. position: fixed;
  164. bottom: 70rpx;
  165. width: 670rpx;
  166. left: 50%;
  167. transform: translate(-50%);
  168. text-align: center;
  169. }
  170. </style>