Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  1. <template>
  2. <view class="selectCar-box">
  3. <view v-if="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 class="flex">
  14. 暂无车辆订单信息
  15. </view>
  16. </view>
  17. </template>
  18. <script lang="ts" setup>
  19. import {
  20. reactive,
  21. ref
  22. } from "vue"
  23. import {
  24. navTo
  25. } from "@/utils/utils"
  26. import {
  27. onLoad,
  28. onShow
  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. 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. 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',
  65. orderStep: '11',
  66. isValueCard: '',
  67. orderStatus: "1",
  68. isAfter: true,
  69. };
  70. const options = {
  71. type: 2,
  72. data: data,
  73. method: "POST",
  74. showLoading: true,
  75. };
  76. return new Promise(async (resolve, reject) => {
  77. const res = await request(orderList, options);
  78. const data = stringToJson(res.bizContent);
  79. resolve(data);
  80. }).catch((error) => {
  81. reject(error);
  82. });
  83. }
  84. const flag = ref('0')
  85. const choose = (i, item) => {
  86. console.log(item.cardId)
  87. navTo(`/subpackage/after-sale/equipment-upgrade/upgrade-confirm?id=${item.id}`)
  88. }
  89. </script>
  90. <style>
  91. page {
  92. width: 100%;
  93. height: 100%;
  94. background-color: #EEF7F7;
  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. .item {
  107. padding: 20rpx;
  108. display: flex;
  109. justify-content: space-between;
  110. align-items: center;
  111. height: 130rpx;
  112. background: #FFFFFF;
  113. box-shadow: 0rpx 2rpx 6rpx 0rpx rgba(223, 223, 223, 0.8);
  114. border-radius: 20rpx;
  115. margin-bottom: 30rpx;
  116. .iten-left {
  117. display: flex;
  118. align-items: center;
  119. image {
  120. width: 150rpx;
  121. height: 90rpx;
  122. }
  123. text {
  124. margin-left: 20rpx;
  125. font-size: 32rpx;
  126. font-family: Noto Sans S Chinese;
  127. font-weight: 400;
  128. color: #333333;
  129. }
  130. }
  131. .choose-item {
  132. width: 44rpx;
  133. height: 44rpx;
  134. background: #FFFFFF;
  135. border: 2rpx solid #00B38B;
  136. border-radius: 50%;
  137. margin-right: 20rpx;
  138. display: flex;
  139. justify-content: center;
  140. align-items: center;
  141. box-sizing: content-box;
  142. }
  143. .active {
  144. width: 34rpx;
  145. height: 34rpx;
  146. background: #00B38B;
  147. border-radius: 50%;
  148. }
  149. }
  150. }
  151. </style>