|
@@ -8,42 +8,11 @@
|
|
{{activeRole == '0' ? '接单' : '我的' }}
|
|
{{activeRole == '0' ? '接单' : '我的' }}
|
|
</view>
|
|
</view>
|
|
<!-- <view class="content-dom"> -->
|
|
<!-- <view class="content-dom"> -->
|
|
- <view v-if="activeRole == '0'" style="width: 100%;height: 100%;display: flex;flex-direction: column;overflow: hidden;">
|
|
|
|
- <view class="dom-top">
|
|
|
|
- <view class="dom-item" v-for="(item, index) in domTopData" :key="index" @tap="statusClick(item.id)">
|
|
|
|
- <text :class="item.id === riderStatus ? 'active-dom-top' : ''">{{item.name}}</text>
|
|
|
|
- </view>
|
|
|
|
- </view>
|
|
|
|
- <scroll-view scroll-y style="overflow: hidden;">
|
|
|
|
- <view v-for="item in riderData" :key="item.id" style="margin: 10rpx 0;">
|
|
|
|
- <rider-order :orderInfo="item" @orderCilck="goOrderClick" :statusId="riderStatus"></rider-order>
|
|
|
|
- </view>
|
|
|
|
- </scroll-view>
|
|
|
|
|
|
+ <view v-if="activeRole == '0'">
|
|
|
|
+ <rider-shipping></rider-shipping>
|
|
</view>
|
|
</view>
|
|
- <view v-if="activeRole == '1'" style="position: relative;flex: 1;width: 100%;">
|
|
|
|
- <view class="item-me-bg"></view>
|
|
|
|
- <view class="item-me">
|
|
|
|
- <view class="item-row">
|
|
|
|
- <view>
|
|
|
|
- <view class="row-je">2031.7</view>
|
|
|
|
- <view class="row-jf">累计小费</view>
|
|
|
|
- </view>
|
|
|
|
- <view style="width: 2rpx;height: 96rpx;border: 2rpx solid #D6D7DC;margin: 0 80rpx"></view>
|
|
|
|
- <view>
|
|
|
|
- <view class="row-je">68</view>
|
|
|
|
- <view class="row-jf">跑腿订单</view>
|
|
|
|
- </view>
|
|
|
|
- </view>
|
|
|
|
- <view class="item-column">
|
|
|
|
- <view v-for="(item, index) in riderInfo" :key="index" class="column-box" :style="{paddingTop: index !== 0 ? '27rpx' : ''}"
|
|
|
|
- @tap="onRiderClick(item.id)">
|
|
|
|
- <view class="column-name">
|
|
|
|
- <image :src="item.img"></image>{{item.name}}
|
|
|
|
- </view>
|
|
|
|
- <view class='iconfont icon-jiantou ' style="font-size: 30rpx;"></view>
|
|
|
|
- </view>
|
|
|
|
- </view>
|
|
|
|
- </view>
|
|
|
|
|
|
+ <view v-if="activeRole == '1'">
|
|
|
|
+ <rider-me></rider-me>
|
|
</view>
|
|
</view>
|
|
<!-- </view> -->
|
|
<!-- </view> -->
|
|
<!-- 底部导航 -->
|
|
<!-- 底部导航 -->
|
|
@@ -64,62 +33,22 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
- import {
|
|
|
|
- registerVerify,
|
|
|
|
- } from '@/api/api.js';
|
|
|
|
- import {
|
|
|
|
- getRiderList
|
|
|
|
- } from '@/api/rider.js';
|
|
|
|
- import {
|
|
|
|
- Debounce
|
|
|
|
- } from '@/utils/validate.js'
|
|
|
|
import riderOrder from "@/components/riderOrder/index.vue";
|
|
import riderOrder from "@/components/riderOrder/index.vue";
|
|
|
|
+ import riderShipping from "./components/rider_shipping/index.vue";
|
|
|
|
+ import riderMe from "./components/rider_me/index.vue";
|
|
var statusBarHeight = uni.getSystemInfoSync().statusBarHeight + 'px';
|
|
var statusBarHeight = uni.getSystemInfoSync().statusBarHeight + 'px';
|
|
let app = getApp();
|
|
let app = getApp();
|
|
export default {
|
|
export default {
|
|
components: {
|
|
components: {
|
|
riderOrder,
|
|
riderOrder,
|
|
|
|
+ riderShipping,
|
|
|
|
+ riderMe
|
|
},
|
|
},
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
winHeight: 0,
|
|
winHeight: 0,
|
|
activeRouter: '/pages/rider/rider_shipping/index',
|
|
activeRouter: '/pages/rider/rider_shipping/index',
|
|
activeRole: '0',
|
|
activeRole: '0',
|
|
- riderStatus: 1,
|
|
|
|
- isReceiveId: null,
|
|
|
|
- domTopData: [{
|
|
|
|
- id: 1,
|
|
|
|
- name: '待接单'
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- id: 8,
|
|
|
|
- name: '待取货'
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- id: 4,
|
|
|
|
- name: '配送中'
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- id: 5,
|
|
|
|
- name: '已完成'
|
|
|
|
- }
|
|
|
|
- ],
|
|
|
|
- riderInfo: [{
|
|
|
|
- id: 1,
|
|
|
|
- name: '跑腿记录',
|
|
|
|
- img: require('./static/run-errands.png'),
|
|
|
|
- pagePath: ''
|
|
|
|
- }, {
|
|
|
|
- id: 2,
|
|
|
|
- name: '提现',
|
|
|
|
- img: require('./static/withdrawal.png'),
|
|
|
|
- pagePath: ''
|
|
|
|
- }, {
|
|
|
|
- id: 3,
|
|
|
|
- name: '返回用户端',
|
|
|
|
- img: require('./static/run-errands.png'),
|
|
|
|
- pagePath: ''
|
|
|
|
- }],
|
|
|
|
footerList: [{
|
|
footerList: [{
|
|
pagePath: "/pages/rider/rider_shipping/index",
|
|
pagePath: "/pages/rider/rider_shipping/index",
|
|
iconPath: require("./static/ddh.png"),
|
|
iconPath: require("./static/ddh.png"),
|
|
@@ -155,43 +84,6 @@
|
|
// animationType: 'none' // 关闭默认的滑动效果
|
|
// animationType: 'none' // 关闭默认的滑动效果
|
|
// });
|
|
// });
|
|
},
|
|
},
|
|
- /**
|
|
|
|
- * 获取订单列表
|
|
|
|
- */
|
|
|
|
- getRiderDataList: function() {
|
|
|
|
- let that = this;
|
|
|
|
- if (that.loadend) return;
|
|
|
|
- if (that.loading) return;
|
|
|
|
- that.loading = true;
|
|
|
|
- that.loadTitle = "加载更多";
|
|
|
|
- getRiderList({
|
|
|
|
- status: that.riderStatus,
|
|
|
|
- page: that.page,
|
|
|
|
- limit: that.limit
|
|
|
|
- }).then(res => {
|
|
|
|
- let list = res.data.list || [];
|
|
|
|
- let loadend = list.length < that.limit;
|
|
|
|
- that.riderData = that.$util.SplitArray(list, that.riderData);
|
|
|
|
- that.$set(that, 'riderData', that.riderData);
|
|
|
|
- that.loadend = loadend;
|
|
|
|
- that.loading = false;
|
|
|
|
- that.loadTitle = loadend ? "我也是有底线的" : '加载更多';
|
|
|
|
- that.page = that.page + 1;
|
|
|
|
- }).catch(err => {
|
|
|
|
- that.loading = false;
|
|
|
|
- that.loadTitle = "加载更多";
|
|
|
|
- })
|
|
|
|
- },
|
|
|
|
- /**
|
|
|
|
- * 切换类型
|
|
|
|
- */
|
|
|
|
- statusClick: function(status) {
|
|
|
|
- if (status == this.riderStatus) return;
|
|
|
|
- this.page = 1;
|
|
|
|
- this.riderStatus = status;
|
|
|
|
- this.loadend = false;
|
|
|
|
- this.getRiderDataList();
|
|
|
|
- },
|
|
|
|
onRiderClick(id) {
|
|
onRiderClick(id) {
|
|
if (id === 3) {
|
|
if (id === 3) {
|
|
uni.switchTab({
|
|
uni.switchTab({
|
|
@@ -199,10 +91,6 @@
|
|
});
|
|
});
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- goOrderClick(id) {
|
|
|
|
- this.isReceiveId = id
|
|
|
|
- console.log(id)
|
|
|
|
- }
|
|
|
|
},
|
|
},
|
|
onLoad(options) {
|
|
onLoad(options) {
|
|
let that = this
|
|
let that = this
|
|
@@ -236,38 +124,6 @@
|
|
flex: 1;
|
|
flex: 1;
|
|
}
|
|
}
|
|
|
|
|
|
- .dom-top {
|
|
|
|
- width: 100%;
|
|
|
|
- height: 96rpx;
|
|
|
|
- font-weight: 400;
|
|
|
|
- font-size: 27rpx;
|
|
|
|
- color: #141414;
|
|
|
|
- background-color: #fff;
|
|
|
|
- // padding: 19rpx 115rpx 38rpx 115rpx;
|
|
|
|
- display: flex;
|
|
|
|
- align-items: center;
|
|
|
|
- justify-content: space-between;
|
|
|
|
-
|
|
|
|
- .dom-item {
|
|
|
|
- flex: 1;
|
|
|
|
- text-align: center;
|
|
|
|
- height: 96rpx;
|
|
|
|
- display: flex;
|
|
|
|
- align-items: center;
|
|
|
|
- justify-content: center;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- .active-dom-top {
|
|
|
|
- color: $bg-color-primary;
|
|
|
|
- border-bottom: 9rpx solid $bg-color-primary;
|
|
|
|
- border-bottom-top-radius: 6rpx;
|
|
|
|
- border-bottom-bottom-radius: 6rpx;
|
|
|
|
- border-bottom-left-radius: 6rpx;
|
|
|
|
- border-bottom-right-radius: 6rpx;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
.order-nav {
|
|
.order-nav {
|
|
width: 100%;
|
|
width: 100%;
|
|
font-weight: 500;
|
|
font-weight: 500;
|
|
@@ -330,77 +186,4 @@
|
|
margin-top: 8rpx;
|
|
margin-top: 8rpx;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
- .item-me-bg {
|
|
|
|
- position: absolute;
|
|
|
|
- top: 0;
|
|
|
|
- width: 100%;
|
|
|
|
- height: 80rpx;
|
|
|
|
- background-color: $bg-color-primary;
|
|
|
|
- z-index: 1;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- .item-me {
|
|
|
|
- position: relative;
|
|
|
|
- top: 0;
|
|
|
|
- z-index: 9999;
|
|
|
|
- padding: 0 19rpx;
|
|
|
|
-
|
|
|
|
- .item-row {
|
|
|
|
- width: 100%;
|
|
|
|
- height: 304rpx;
|
|
|
|
- text-align: center;
|
|
|
|
- background-color: #fff;
|
|
|
|
- border-radius: 23rpx;
|
|
|
|
- display: flex;
|
|
|
|
- align-items: center;
|
|
|
|
- justify-content: center;
|
|
|
|
- margin-bottom: 20rpx;
|
|
|
|
-
|
|
|
|
- .row-je {
|
|
|
|
- font-weight: 500;
|
|
|
|
- font-size: 46rpx;
|
|
|
|
- color: #141414;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- .row-jf {
|
|
|
|
- font-weight: 400;
|
|
|
|
- font-size: 27rpx;
|
|
|
|
- color: #999999;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- .item-column {
|
|
|
|
- width: 100%;
|
|
|
|
- background-color: #fff;
|
|
|
|
- border-radius: 23rpx;
|
|
|
|
- padding: 20rpx 0 96rpx 39rpx;
|
|
|
|
- display: flex;
|
|
|
|
- flex-direction: column;
|
|
|
|
- align-items: center;
|
|
|
|
-
|
|
|
|
- .column-box {
|
|
|
|
- width: 100%;
|
|
|
|
- padding: 0 39rpx 27rpx 0;
|
|
|
|
- border-bottom: 2rpx solid #D6D7DC;
|
|
|
|
- display: flex;
|
|
|
|
- align-items: center;
|
|
|
|
- justify-content: space-between;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- .column-name {
|
|
|
|
- display: flex;
|
|
|
|
- align-items: center;
|
|
|
|
- font-weight: 500;
|
|
|
|
- font-size: 27rpx;
|
|
|
|
- color: #141414;
|
|
|
|
-
|
|
|
|
- image {
|
|
|
|
- width: 38.5rpx;
|
|
|
|
- height: 38.5rpx;
|
|
|
|
- margin-right: 20rpx;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
</style>
|
|
</style>
|