MyorderList.vue 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261
  1. <template>
  2. <view>
  3. <customNav :shownav="true" title="我的订单" tinColor="white" jiantou="1" ></customNav>
  4. <view v-if="orderList.length==0" class="contentColumnC">
  5. <image class="weishimingImage" src="/static/imags/dingdan.png" mode="widthFix"></image>
  6. <!-- <text class="meiyouText">{{$t('dache.yaoqingcwcz')}}</text> -->
  7. <text class="meiyouDDText">{{$t('order.dangqmydd')}}</text>
  8. </view>
  9. <view class="contentColumnC" v-for="(item,index) in orderList">
  10. <view class="contentColumnC ItemcentianV">
  11. <view class="contentInRowS" style="width: 100%;" @click="chakanditu(item)">
  12. <view class="contentInRowC sstibjv">
  13. <text class="shishiT">{{$t('dache.shishi')}}</text>
  14. </view>
  15. <view class="contentInRowC">
  16. <text style="font-size: 28rpx;color:#1A1A1A;">{{stateName(item.state)}}</text>
  17. </view>
  18. <view class="contentInRowR" style="align-items: center;">
  19. <text style="color: darkgray;font-size: 28rpx;">{{$t('dache.chakandit')}}</text>
  20. <image style="width: 30rpx;height: 30rpx;margin-right: 30rpx;" src="/static/imags/youjian@3x.png" mode="scaleToFill"></image>
  21. </view>
  22. </view>
  23. <view class="contentInRowS ItemmsgL" @click="chakanditu(item)">
  24. <view class="contentColumnC">
  25. <view class="contentInRowL">
  26. <text style="font-size: 40rpx;color:#1A1A1A;font-weight: bold;">{{item.distance}}</text>
  27. <text style="font-size: 28rpx;color:#1A1A1A;padding-top: 16rpx;">Km</text>
  28. </view>
  29. <text style="font-size: 28rpx;color:#1A1A1A;">{{$t('dache.quancheng')}}</text>
  30. </view>
  31. <!-- <view class="contentColumnC">
  32. <view class="contentInRowL">
  33. <text style="font-size: 40rpx;color:#1A1A1A;font-weight: bold;">10.3</text>
  34. <text style="font-size: 28rpx;color:#1A1A1A;padding-top: 16rpx;">Km</text>
  35. </view>
  36. <text style="font-size: 28rpx;color:#1A1A1A;">{{$t('dache.jiejiajuli')}}</text>
  37. </view> -->
  38. <view class="contentColumnC">
  39. <view class="contentInRowL">
  40. <text style="font-size: 40rpx;color:#E86E48;font-weight: bold;">{{item.amount}}</text>
  41. <text style="font-size: 28rpx;color:#E86E48;padding-top: 16rpx;">{{$t('api.huobidanwei')}}</text>
  42. </view>
  43. <text style="font-size: 28rpx;color:#E86E48;">{{$t('dache.yugudingdje')}}</text>
  44. </view>
  45. </view>
  46. <view class="contentInRowL ItemmsgL" style="margin-bottom: 20rpx;">
  47. <view class="contentColumn">
  48. <view class="contentInRowL" style="align-items: center;width:600rpx;">
  49. <text style="width: 16rpx;height: 16rpx;background-color:#54B798;"></text>
  50. <text class="text2row" style="font-size: 28rpx;color:#1A1A1A;padding-left: 6rpx;width: 520rpx;">{{item.boardingAddress}}</text>
  51. </view>
  52. <view class="contentInRowL" style="align-items: center;width:600rpx;">
  53. <text style="width: 16rpx;height: 16rpx;background-color:#E86E48;"></text>
  54. <text class="text2row" style="font-size: 28rpx;color:#1A1A1A;padding-left: 6rpx;width: 520rpx;">{{item.downAddress}}</text>
  55. </view>
  56. </view>
  57. </view>
  58. </view>
  59. </view>
  60. </view>
  61. </template>
  62. <script>
  63. import api from "@/pages/api/api.js"
  64. export default {
  65. data() {
  66. return {
  67. userInfo:'',
  68. page:1,
  69. orderList:[]
  70. }
  71. },
  72. onLoad() {
  73. this.userInfo = uni.getStorageSync('userInfo');
  74. console.log(this.userInfo);
  75. },
  76. onShow() {
  77. this.getOrderlist();
  78. },
  79. methods: {
  80. stateName(state){
  81. console.log(state);
  82. state=state*1;
  83. var str='';
  84. switch(state){
  85. case 0:
  86. str= "待司机接单";
  87. break;
  88. case 1:
  89. str= "司机已接单";
  90. break;
  91. case 2:
  92. str= "乘客已上车";
  93. break;
  94. case 3:
  95. str= "待支付";
  96. break;
  97. case 4:
  98. str= "已支付";
  99. break;
  100. case 5:
  101. str= "用户投诉";
  102. break;
  103. case 6:
  104. return "订单取消";
  105. break;
  106. case 7:
  107. str= "修改取消";
  108. break;
  109. default:
  110. break;
  111. }
  112. return str;
  113. },
  114. chakanditu(obj){
  115. uni.setStorageSync('TaxiOrder',obj);
  116. uni.navigateTo({
  117. url:'/pages/dache/Chakanditu'
  118. })
  119. },
  120. //net work ----------------------------
  121. getOrderlist(){
  122. console.log('-----getOrderlist')
  123. api('getUsTxorder',{
  124. page:1,
  125. size:20,
  126. state:'',
  127. type:1
  128. },res=>{
  129. console.log('getUsTxorder-------',res)
  130. if(res.data.code==200){
  131. this.orderList=res.data.data;
  132. }
  133. else{
  134. uni.showToast({
  135. title:'获取列表失败',//that.i18n('api.wangluoshibai'),
  136. icon: 'none',
  137. duration: 2500
  138. })
  139. }
  140. },failc=>{
  141. //console.log('getTaxiPrices----',failc)
  142. uni.showToast({
  143. title:'网络错误',//that.i18n('api.wangluoshibai'),
  144. icon: 'none',
  145. duration: 2500
  146. })
  147. })
  148. },
  149. },
  150. }
  151. </script>
  152. <style lang="scss">
  153. @import '@/common/common.scss';
  154. page{
  155. background-color: #F4F4F4;
  156. }
  157. .iconImg{
  158. margin-top: 20rpx;
  159. margin-bottom: 20rpx;
  160. width: 110rpx;
  161. height: 110rpx;
  162. border-radius: 55rpx;
  163. background-color: #1A1A1A;
  164. }
  165. .nameText{
  166. font-size: 32rpx;
  167. color: black;
  168. }
  169. .phoneText{
  170. font-size: 26rpx;
  171. color: black;
  172. }
  173. .drawerlist{
  174. width: 100%;
  175. height: 100rpx;
  176. align-items: center;
  177. border: solid lavender;
  178. border-width: 0px 0px 1rpx 0px;
  179. }
  180. .drawerlistIcon{
  181. padding-left: 30rpx;
  182. width: 60rpx;
  183. height: 60rpx;
  184. }
  185. .drawerlisttext{
  186. font-size: 26rpx;
  187. padding-left: 8rpx;
  188. }
  189. .weishimingImage{
  190. width: 30%;
  191. margin-top: 80rpx;
  192. }
  193. .meiyouText{
  194. margin-top: 20rpx;
  195. font-size: 32rpx;
  196. font-weight: bold;
  197. color:darkmagenta;
  198. }
  199. .meiyouDDText{
  200. margin-top: 20rpx;
  201. font-size: 32rpx;
  202. font-weight: bold;
  203. color:#1A1A1A;
  204. }
  205. .zhengzaijdV{
  206. border-radius: 20rpx;
  207. padding: 16rpx;
  208. width: 90%;
  209. background-color: #E86E48;
  210. }
  211. .zhengzaijdT{
  212. font-size: 32rpx;
  213. font-weight: bold;
  214. color:white;
  215. }
  216. .zhengzaijdD{
  217. font-size: 28rpx;
  218. color:lightgrey;
  219. }
  220. .ItemcentianV{
  221. margin-top: 20rpx;
  222. margin-bottom: 10rpx;
  223. width: 100%;
  224. background-color: white;
  225. border-radius: 20rpx;
  226. }
  227. .ItemmsgL{
  228. margin-top: 30rpx;
  229. width: 90%;
  230. }
  231. .sstibjv{
  232. min-width: 100rpx;
  233. height: 50rpx;
  234. background-size: 100% 100%;
  235. background-image: url('/static/imags/dache/ssbj@3x.png');
  236. }
  237. .shishiT{
  238. padding-left: 4rpx;
  239. padding-right: 4rpx;
  240. font-size: 24rpx;
  241. color: white;
  242. }
  243. .qushcBt{
  244. font-size: 32rpx;
  245. font-weight: bold;
  246. color: white;
  247. line-height: 60rpx;
  248. border-radius: 30rpx;
  249. padding-left: 22rpx;
  250. padding-right: 22rpx;
  251. text-align: center;
  252. background-color: #E86E48;
  253. }
  254. </style>