index.wxml 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. <!--index.wxml-->
  2. <wxs src="../../wxs/tool.wxs" module="tool"></wxs>
  3. <view class="index">
  4. <scroll-view class="scroll-box" scroll-y="true" show-scrollbar="{{false}}" enhanced="true" bindscrolltolower="more">
  5. <view class="box theme-colors" style="padding-top:{{safeTop}};">
  6. <view class="address">
  7. <view class="z-flex-c" style="height: {{menuH}};box-sizing: content-box;">
  8. <image class="address-img z-padding-lr-32" src="../../static/index/address.png"></image>
  9. <text class="address-text">{{address.name}}</text>
  10. </view>
  11. <view class="z-font-24 job-text">工号:{{code}}</view>
  12. </view>
  13. <view class="last-site z-font-24 z-flex-c z-padding-lr-24 z-margin-t-16">
  14. <view>上次位置:{{lastAddress}}</view>
  15. <view bindtap="notice" class=" z-flex-0">
  16. <image class="update-img z-margin-r-8" src="../../static/index/update.png"></image>
  17. <text class="z-font-22 update-site-text">更新位置</text>
  18. </view>
  19. </view>
  20. <view class="z-flex-c-s-b serve-box z-margin-t-30">
  21. <view bind:tap="toServerTime" class="serve-t">服务时间</view>
  22. <view class="switch">
  23. <text class="z-font-26 underway">{{checked ? '接单中' : '休息中'}}</text>
  24. <van-switch active-color="#FF9600" inactive-color="#FFF" checked="{{ checked }}" bind:change="onChange" />
  25. </view>
  26. </view>
  27. </view>
  28. <view class="circle"></view>
  29. <!-- 公告 -->
  30. <view class="z-flex-c-s-b z-padding-lr-24 z-radius-8 notice-box" wx:if="{{config.skill_notice}}">
  31. <image class="notice-img z-margin-r-24" src="../../static/index/notice.png"></image>
  32. <van-notice-bar class="z-flex-1" color="#1677FF" background="#fff" text="{{config.skill_notice}}" />
  33. </view>
  34. <view class="z-flex-c-s-b z-margin-lr-32 waiting-box" bindtap="order">
  35. <view class="waiting-each">
  36. <view class="z-padding-t-16 z-text-c">待服务:{{orderCount[0].count || 0}}单</view>
  37. <view class="z-text-c z-padding-t-16 time-text">今天</view>
  38. </view>
  39. <view class="waiting-each">
  40. <view class="z-padding-t-16 z-text-c">待服务:{{orderCount[1].count || 0}}单</view>
  41. <view class="z-text-c z-padding-t-16 time-text">明天</view>
  42. </view>
  43. <view class="waiting-each">
  44. <view class="z-padding-t-16 z-text-c">待服务:{{orderCount[2].count || 0}}单</view>
  45. <view class="z-text-c z-padding-t-16 time-text">后天</view>
  46. </view>
  47. </view>
  48. <!-- 项目列表 -->
  49. <view class="item-list-box">
  50. <view class="z-padding-32 z-margin-t-32 item-each" wx:for="{{list}}" bindtap="detail" data-id="{{item.id}}">
  51. <view class="z-flex-c-s-b">
  52. <view class="item-each-text">
  53. <view>
  54. <text class="time-yy">预约时间</text>
  55. <text class="z-margin-l-16 type-text">{{item.orderDetail.name}}</text>
  56. </view>
  57. <!-- 时间 -->
  58. <view class="time z-margin-tb-16">
  59. <text class="time-date">{{tool.formatTime(item.starttime,'mm-dd')}}</text>
  60. <text class="z-margin-l-16 time-hour theme-color">{{tool.formatTime(item.starttime,'HH:MM')}}</text>
  61. </view>
  62. <!-- 价格 -->
  63. <view class="price-unit">¥ <text class="z-font-32 price-number">{{item.payprice}}</text> </view>
  64. </view>
  65. <image class="item-each-img" mode="aspectFill" src="{{tool.cdn(item.orderDetail.image)}}"></image>
  66. </view>
  67. <view class="z-margin-tb-30 wire"></view>
  68. <view class="item-underway z-flex-c-s-b">
  69. <view class="underway-text" wx:if="{{item.status == 2}}">待出发</view>
  70. <view class="underway-text" wx:if="{{item.status == 3}}">已出发</view>
  71. <view class="underway-text" wx:if="{{item.status == 4}}">已到达</view>
  72. <view class="underway-text" wx:if="{{item.status == 5}}">服务中</view>
  73. </view>
  74. </view>
  75. <van-empty description="暂无订单" wx:if="{{finish && list.length === 0}}" />
  76. <login wx:if="{{!token}}" />
  77. </view>
  78. </scroll-view>
  79. </view>
  80. <!-- 弹出层 -->
  81. <van-popup round show="{{ show }}" bind:close="onClose">
  82. <view class="popup-box">
  83. <image class="z-margin-t-40 location-img" src="../../static/index/location.png"></image>
  84. <view class="z-font-30 z-text-c z-margin-t-9">位置更新成功</view>
  85. <view class="z-margin-t-32 z-text-c location-btn" bind:tap="onClose">确定</view>
  86. </view>
  87. </van-popup>