Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

trajectory.vue 5.8KB

vor 1 Jahr
vor 1 Jahr
vor 1 Jahr
vor 1 Jahr
vor 1 Jahr
vor 1 Jahr
vor 1 Jahr
vor 1 Jahr
vor 1 Jahr
vor 1 Jahr
vor 1 Jahr
vor 1 Jahr
vor 1 Jahr
vor 1 Jahr
vor 1 Jahr
vor 1 Jahr
vor 1 Jahr
vor 1 Jahr
vor 1 Jahr
vor 1 Jahr
vor 1 Jahr
vor 1 Jahr
vor 1 Jahr
vor 1 Jahr
vor 1 Jahr
vor 1 Jahr
vor 1 Jahr
vor 1 Jahr
vor 1 Jahr
vor 1 Jahr
vor 1 Jahr
vor 1 Jahr
vor 1 Jahr
vor 1 Jahr
vor 1 Jahr
vor 1 Jahr
vor 1 Jahr
vor 1 Jahr
vor 1 Jahr
vor 1 Jahr
vor 1 Jahr
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228
  1. <template>
  2. <view class="content">
  3. <view class="des">请查收您的通行记忆,让每段行程都有意义。</view>
  4. <view class="choice-content">
  5. <view class="choice-car">
  6. <picker @change="bindPickerChange" :value="state.index" :range="state.array">
  7. <view class="uni-input">{{state.array[state.index]}}</view>
  8. </picker>
  9. </view>
  10. <view class="content-det">
  11. <view class="left">
  12. <view class="left-item">
  13. <image src="../../static/image/home-on.png" ></image>
  14. <view>
  15. <view class="data">{{state.msg.mileages}}km</view>
  16. <view>高速通行总里程</view>
  17. </view>
  18. </view>
  19. <view class="left-item">
  20. <image src="../../static/image/home-on.png" ></image>
  21. <view>
  22. <view class="data">{{state.msg.amounts/100}}元</view>
  23. <view>高速通行总金额</view>
  24. </view>
  25. </view>
  26. <view class="left-item">
  27. <image src="../../static/image/home-on.png" ></image>
  28. <view>
  29. <view class="data">{{state.msg.frequencys}}次</view>
  30. <view>高速通行总消费次数</view>
  31. </view>
  32. </view>
  33. <view class="left-item">
  34. <image src="../../static/image/home-on.png" ></image>
  35. <view>
  36. <view class="data">{{state.msg.cityQuantitys}}个</view>
  37. <view>高速通行曾抵达过的城市教</view>
  38. </view>
  39. </view>
  40. <view class="left-item" style="margin-bottom: 30rpx;">
  41. <image src="../../static/image/home-on.png"></image>
  42. <view>
  43. <view class="data">{{state.msg.frequenteds}}</view>
  44. <view>您最喜爱的目的地,曾累计到访过{{state.msg.frequentedQuantitys}}次</view>
  45. </view>
  46. </view>
  47. </view>
  48. <view class="right">
  49. <view>您超过了{{state.msg.ranking}}%的九州ETC用户</view>
  50. <image src="../../../static/image/home-on.png" mode="" ></image>
  51. <view class="see" @click="see()">查看我的轨迹图</view>
  52. </view>
  53. </view>
  54. </view>
  55. <view class="record" v-for="item in [state.msg.myTrajectoryStatisticsVos][0]">
  56. <view class="current">
  57. <text>{{item.accountDate}}月通行</text>
  58. <view class="more" @click="seeMonth()">查看历史月度统计 <image src="../../../static/image/icon-back.png"></image></view>
  59. </view>
  60. <view class="detail">本月九州ETC通行了{{item.frequency}}次高速通行查看历史月度统计要消费{{item.amount/100}}元要通行</view>
  61. </view>
  62. </view>
  63. </template>
  64. <script setup lang="ts">
  65. import { reactive } from "vue";
  66. import {request} from "@/utils/network/request.js";
  67. import {stringToJson} from "@/utils/network/encryption";
  68. import { onLoad} from "@dcloudio/uni-app";
  69. import {orderList,queryTrajectory} from "@/utils/network/api.js";
  70. import {getItem,StorageKeys} from "@/utils/storage";
  71. const state = reactive({
  72. array: [],
  73. index: 0,
  74. arrayVehicleId:[], //要传给后端的vehicleId
  75. msg:'',
  76. })
  77. onLoad((option : any) => {
  78. quanCheckActionTrue().then((item: any) => {
  79. for(var i=0;i<item.data.length;i++){
  80. state.array.push(item.data[i].vehiclePlate)
  81. state.arrayVehicleId.push(item.data[i].vehicleId)
  82. }
  83. getVehicleMsg();
  84. })
  85. })
  86. const quanCheckActionTrue = () => {
  87. var data = {
  88. opId: getItem(StorageKeys.OpenId),
  89. source: 'WECHAT', //渠道为小程序
  90. tabIndex: '0', //0全部
  91. orderStep: '11', //11 为已完成”
  92. };
  93. const options = {
  94. type: 2,
  95. data: data,
  96. method: "POST",
  97. showLoading: true,
  98. };
  99. return new Promise(async (resolve, reject) => {
  100. const res = await request(orderList, options);
  101. const data = stringToJson(res.bizContent);
  102. resolve(data);
  103. }).catch((error) => {
  104. reject(error);
  105. });
  106. }
  107. const bindPickerChange=(e)=> {
  108. state.index = e.detail.value;
  109. getVehicleMsg();
  110. }
  111. const see=()=>{
  112. // const aa="41,51"
  113. uni.navigateTo({
  114. url:`/subpackage/service/trajectory-map?data=${state.msg.provinces}&&mileages=${state.msg.mileages}&&ranking=${state.msg.ranking}`
  115. })
  116. }
  117. const seeMonth=()=>{
  118. uni.navigateTo({
  119. url:`./see-month?data=${encodeURIComponent(JSON.stringify(state.msg.myTrajectoryStatisticsVos))}`
  120. })
  121. }
  122. const getVehicleMsg = () => {
  123. const options = {
  124. type: 2,
  125. data: {
  126. vehicleId: state.arrayVehicleId[state.index],
  127. },
  128. method: "POST",
  129. showLoading: true,
  130. };
  131. request(queryTrajectory, options).then((res) => {
  132. const result = stringToJson(res.bizContent)
  133. state.msg=result
  134. console.log("getVehicleMsg",result);
  135. })
  136. };
  137. </script>
  138. <style scoped>
  139. .content{
  140. font-size: 32rpx;
  141. }
  142. .des{
  143. margin: 20rpx 0 20rpx 40rpx;
  144. }
  145. .choice-content{
  146. width:90%;
  147. margin: 0 auto;
  148. min-height:500rpx;
  149. box-shadow: 0px 0px 8px 2px rgb(218, 247, 247) inset;
  150. overflow: hidden;
  151. }
  152. .choice-car{
  153. width: 180rpx;
  154. background-color: rgb(158, 247, 247);
  155. margin-top: 30rpx;
  156. padding: 10rpx;
  157. }
  158. .left-item{
  159. display: flex;
  160. margin-bottom: 50rpx;
  161. }
  162. .left-item>image{
  163. width: 70rpx;
  164. height: 70rpx;
  165. display: inline-block;
  166. margin-right: 30rpx;
  167. flex-shrink: 0;
  168. }
  169. .data{
  170. font-weight: bold;
  171. }
  172. .content-det{
  173. padding: 30rpx;
  174. box-sizing: border-box;
  175. display: flex;
  176. }
  177. .right>image{
  178. width: 120rpx;
  179. height: 120rpx;
  180. display: inline-block;
  181. margin: 30rpx auto;
  182. margin-left: 40rpx;
  183. }
  184. .see{
  185. background-color: rgb(158, 247, 247);
  186. border-radius: 20rpx;
  187. text-align: center;
  188. height: 54rpx;
  189. line-height: 54rpx;
  190. font-size: 28rpx;
  191. }
  192. .left{
  193. flex: 2;
  194. }
  195. .right{
  196. flex: 1;
  197. }
  198. .record{
  199. width: 90%;
  200. min-height: 220rpx;
  201. box-shadow: 0px 0px 8px 2px rgb(218, 247, 247) inset;
  202. margin: 20rpx auto;
  203. padding: 30rpx;
  204. box-sizing: border-box;
  205. }
  206. .current{
  207. border-bottom: 1rpx solid #ccc;
  208. display: flex;
  209. justify-content: space-between;
  210. align-items: center;
  211. padding-bottom: 20rpx;
  212. }
  213. .more>image{
  214. transform: rotate(180deg);
  215. width: 30rpx;
  216. height: 30rpx;
  217. vertical-align: middle;
  218. }
  219. .detail{
  220. margin-top: 20rpx;
  221. line-height: 40rpx;
  222. }
  223. </style>