index.vue 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  1. <template>
  2. <view>
  3. <!-- 状态栏高度 -->
  4. <view :style="{ height: `${statusBarHeight}px`, backgroundColor: '#FF6702' }"></view>
  5. <!-- 导航栏 -->
  6. <view :style="{ height: `${navigationBarHeight}rpx`,lineHeight: `${navigationBarHeight}rpx`}" class="order-nav">
  7. <!-- <view class="back-button" @tap="handBack()"></view> -->
  8. 接单
  9. </view>
  10. <scroll-view scroll-y="true">
  11. <view v-for="item in riderData" :key="item.id" style="margin: 10rpx 0;">
  12. <rider-order :orderInfo="item"></rider-order>
  13. </view>
  14. </scroll-view>
  15. <!-- 底部导航 -->
  16. <view class="page-footer">
  17. <view class="foot-item" :class="item.pagePath == activeRouter?'active':''" v-for="(item,index) in footerList" :key="index"
  18. @click="goRouter(item)">
  19. <block v-if="item.pagePath == activeRouter">
  20. <image :src="item.selectedIconPath"></image>
  21. <view class="txt">{{item.text}}</view>
  22. </block>
  23. <block v-else>
  24. <image :src="item.iconPath"></image>
  25. <view class="txt">{{item.text}}</view>
  26. </block>
  27. </view>
  28. </view>
  29. </view>
  30. </template>
  31. <script>
  32. import {
  33. registerVerify,
  34. } from '@/api/api.js';
  35. import {
  36. Debounce
  37. } from '@/utils/validate.js'
  38. import riderOrder from "@/components/riderOrder/index.vue";
  39. var statusBarHeight = uni.getSystemInfoSync().statusBarHeight + 'px';
  40. let app = getApp();
  41. export default {
  42. components: {
  43. riderOrder,
  44. },
  45. data() {
  46. return {
  47. statusBarHeight: app.globalData.statusBarHeight,
  48. navigationBarHeight: 112,
  49. // footerList: [{
  50. // pagePath: "/pages/goods/order_confirm/index",
  51. // iconPath: require("./static/ddh.png"),
  52. // selectedIconPath: require("./static/ddl.png"),
  53. // text: "订单",
  54. // role: '0'
  55. // },
  56. // {
  57. // pagePath: "/pages/admin/order/index",
  58. // iconPath: require("./static/wdh.png"),
  59. // selectedIconPath: require("./static/wdl.png"),
  60. // text: "我的",
  61. // role: '1'
  62. // }
  63. // ],
  64. riderData: [{
  65. cost: '2.00',
  66. time: '12:00',
  67. shopName: '吉啊婆麻辣烫',
  68. shopDistance: 500,
  69. shopAddress: '梨园2楼7号橱窗',
  70. userAddress: '雅苑3栋209b1001室',
  71. userDistance: 0,
  72. userRemarks: '老板,多放点辣椒!辣死我',
  73. },
  74. {
  75. cost: '2.00',
  76. time: '12:00',
  77. shopName: '吉啊婆麻辣烫',
  78. shopDistance: 500,
  79. shopAddress: '梨园2楼7号橱窗',
  80. userAddress: '雅苑3栋209b1001室',
  81. userDistance: 0,
  82. userRemarks: '老板,多放点辣椒!辣死我',
  83. },
  84. {
  85. cost: '2.00',
  86. time: '12:00',
  87. shopName: '吉啊婆麻辣烫',
  88. shopDistance: 500,
  89. shopAddress: '梨园2楼7号橱窗',
  90. userAddress: '雅苑3栋209b1001室',
  91. userDistance: 0,
  92. userRemarks: '老板,多放点辣椒!辣死我',
  93. },
  94. {
  95. cost: '2.00',
  96. time: '12:00',
  97. shopName: '吉啊婆麻辣烫',
  98. shopDistance: 500,
  99. shopAddress: '梨园2楼7号橱窗',
  100. userAddress: '雅苑3栋209b1001室',
  101. userDistance: 0,
  102. userRemarks: '老板,多放点辣椒!辣死我',
  103. }
  104. ]
  105. }
  106. },
  107. methods: {
  108. },
  109. onLoad(options) {},
  110. mounted() {
  111. },
  112. }
  113. </script>
  114. <style scoped lang="scss">
  115. .order-nav {
  116. font-weight: 500;
  117. font-size: 35rpx;
  118. color: #FFFFFF;
  119. position: relative;
  120. background-color: #FF6702;
  121. display: flex;
  122. align-items: center;
  123. justify-content: center;
  124. .back-button {
  125. position: absolute;
  126. left: 20rpx;
  127. }
  128. }
  129. .page-footer {
  130. position: fixed;
  131. bottom: 0;
  132. z-index: 9;
  133. display: flex;
  134. align-items: center;
  135. justify-content: space-around;
  136. width: 100%;
  137. height: calc(100rpx+ constant(safe-area-inset-bottom)); ///兼容 IOS<11.2/
  138. height: calc(100rpx + env(safe-area-inset-bottom)); ///兼容 IOS>11.2/
  139. box-sizing: border-box;
  140. border-top: solid 1rpx #F3F3F3;
  141. background-color: #fff;
  142. // box-shadow: 0px 0px 17rpx 1rpx rgba(206, 206, 206, 0.32);
  143. padding-bottom: constant(safe-area-inset-bottom); ///兼容 IOS<11.2/
  144. padding-bottom: env(safe-area-inset-bottom); ///兼容 IOS>11.2/
  145. .foot-item {
  146. display: flex;
  147. width: max-content;
  148. align-items: center;
  149. justify-content: center;
  150. flex-direction: column;
  151. position: relative;
  152. padding: 0 20rpx;
  153. margin-top: 18rpx;
  154. &.active {
  155. color: $bg-color-primary
  156. }
  157. }
  158. .foot-item image {
  159. height: 50rpx;
  160. width: 50rpx;
  161. text-align: center;
  162. margin: 0 auto;
  163. }
  164. .foot-item .txt {
  165. font-size: 27rpx;
  166. margin-top: 8rpx;
  167. }
  168. }
  169. </style>