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 година
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  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=""></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. 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 flag = ref('0')
  76. const choose = (i, item) => {
  77. console.log(item.cardId)
  78. navTo(`/after-sale/equipment-upgrade/upgrade-confirm?id=${item.id}`)
  79. }
  80. </script>
  81. <style>
  82. page {
  83. width: 100%;
  84. height: 100%;
  85. background-color: #EEF7F7;
  86. }
  87. </style>
  88. <style lang="scss" scoped>
  89. .flex {
  90. display: flex;
  91. justify-content: center;
  92. }
  93. .selectCar-box {
  94. // width: 100%;
  95. height: 100%;
  96. padding: 30rpx;
  97. .item {
  98. padding: 20rpx;
  99. display: flex;
  100. justify-content: space-between;
  101. align-items: center;
  102. height: 130rpx;
  103. background: #FFFFFF;
  104. box-shadow: 0rpx 2rpx 6rpx 0rpx rgba(223, 223, 223, 0.8);
  105. border-radius: 20rpx;
  106. margin-bottom: 30rpx;
  107. .iten-left {
  108. display: flex;
  109. align-items: center;
  110. image {
  111. width: 150rpx;
  112. height: 90rpx;
  113. }
  114. text {
  115. margin-left: 20rpx;
  116. font-size: 32rpx;
  117. font-family: Noto Sans S Chinese;
  118. font-weight: 400;
  119. color: #333333;
  120. }
  121. }
  122. .choose-item {
  123. width: 44rpx;
  124. height: 44rpx;
  125. background: #FFFFFF;
  126. border: 2rpx solid #00B38B;
  127. border-radius: 50%;
  128. margin-right: 20rpx;
  129. display: flex;
  130. justify-content: center;
  131. align-items: center;
  132. box-sizing: content-box;
  133. }
  134. .active {
  135. width: 34rpx;
  136. height: 34rpx;
  137. background: #00B38B;
  138. border-radius: 50%;
  139. }
  140. }
  141. }
  142. </style>