ZZ 1 mesiac pred
rodič
commit
493d856862

+ 2 - 2
mer_uniapp/api/merchant.js

@@ -47,7 +47,7 @@ export function getMerIndexInfoApi(id) {
  * @param Obj data
  */
 export function getMerSearchApi(data) {
-  return request.get(`merchant/search/list`, data, {noAuth:true});
+  return request.get(`merchant/search/list/v1`, data, {noAuth:true});
 }
 
 /**
@@ -79,7 +79,7 @@ export function getMerStreetApi(data) {
  * @param Obj data
  */
 export function getMerProListApi(data) {
-  return request.get(`product/merchant/pro/list`, data , {noAuth:true});
+  return request.get(`product/merchant/pro/list/v1`, data , {noAuth:true});
 }
 
 /**

+ 1 - 1
mer_uniapp/api/product.js

@@ -86,7 +86,7 @@ export function getCategoryList() {
  * @param object data
  */
 export function productList(data) {
-	return request.get('product/list', data, {
+	return request.get('product/list/v1', data, {
 		noAuth: true
 	});
 }

+ 0 - 117
mer_uniapp/pages/rider/rider_me/index.vue

@@ -1,117 +0,0 @@
-<template>
-	<view>
-		<!-- 状态栏高度 -->
-		<view :style="{ height: `${statusBarHeight}px`, backgroundColor: '#FF6702' }"></view>
-
-		<!-- 导航栏 -->
-		<view :style="{ height: `${navigationBarHeight}rpx`,lineHeight: `${navigationBarHeight}rpx`}" class="order-nav">
-			<!-- <view class="back-button" @tap="handBack()"></view> -->
-			我的
-		</view>
-		<view></view>
-
-		<!-- 底部导航 -->
-		<view class="page-footer">
-			<view class="foot-item" :class="item.pagePath == activeRouter?'active':''" v-for="(item,index) in footerList" :key="index"
-			 @click="goRouter(item)">
-				<block v-if="item.pagePath == activeRouter">
-					<image :src="item.selectedIconPath"></image>
-					<view class="txt">{{item.text}}</view>
-				</block>
-				<block v-else>
-					<image :src="item.iconPath"></image>
-					<view class="txt">{{item.text}}</view>
-				</block>
-			</view>
-		</view>
-	</view>
-</template>
-
-<script>
-	import {
-		registerVerify,
-	} from '@/api/api.js';
-	import {
-		Debounce
-	} from '@/utils/validate.js'
-	var statusBarHeight = uni.getSystemInfoSync().statusBarHeight + 'px';
-	let app = getApp();
-	export default {
-		data() {
-			return {
-				statusBarHeight: app.globalData.statusBarHeight,
-				navigationBarHeight: 112
-			}
-		},
-		methods: {
-
-		},
-		onLoad(options) {},
-		mounted() {
-
-		},
-	}
-</script>
-
-<style scoped lang="scss">
-	.order-nav {
-		font-weight: 500;
-		font-size: 35rpx;
-		color: #FFFFFF;
-		position: relative;
-		background-color: #FF6702;
-		display: flex;
-		align-items: center;
-		justify-content: center;
-
-		.back-button {
-			position: absolute;
-			left: 20rpx;
-		}
-	}
-
-	.page-footer {
-		position: fixed;
-		bottom: 0;
-		z-index: 9;
-		display: flex;
-		align-items: center;
-		justify-content: space-around;
-		width: 100%;
-		height: calc(100rpx+ constant(safe-area-inset-bottom)); ///兼容 IOS<11.2/
-		height: calc(100rpx + env(safe-area-inset-bottom)); ///兼容 IOS>11.2/
-		box-sizing: border-box;
-		border-top: solid 1rpx #F3F3F3;
-		background-color: #fff;
-		// box-shadow: 0px 0px 17rpx 1rpx rgba(206, 206, 206, 0.32);
-		padding-bottom: constant(safe-area-inset-bottom); ///兼容 IOS<11.2/
-		padding-bottom: env(safe-area-inset-bottom); ///兼容 IOS>11.2/
-
-		.foot-item {
-			display: flex;
-			width: max-content;
-			align-items: center;
-			justify-content: center;
-			flex-direction: column;
-			position: relative;
-			padding: 0 20rpx;
-			margin-top: 18rpx;
-
-			&.active {
-				color: $bg-color-primary
-			}
-		}
-
-		.foot-item image {
-			height: 50rpx;
-			width: 50rpx;
-			text-align: center;
-			margin: 0 auto;
-		}
-
-		.foot-item .txt {
-			font-size: 27rpx;
-			margin-top: 8rpx;
-		}
-	}
-</style>

+ 0 - 84
mer_uniapp/pages/rider/rider_shipping/index.vue

@@ -1,84 +0,0 @@
-<template>
-	<view>
-		<scroll-view scroll-y="true">
-			<view v-for="item in riderData" :key="item.id" style="margin: 10rpx 0;">
-				<rider-order :orderInfo="item"></rider-order>
-			</view>
-		</scroll-view>
-	</view>
-</template>
-
-<script>
-	import {
-		registerVerify,
-	} from '@/api/api.js';
-	import {
-		Debounce
-	} from '@/utils/validate.js'
-	import riderOrder from "@/components/riderOrder/index.vue";
-	var statusBarHeight = uni.getSystemInfoSync().statusBarHeight + 'px';
-	let app = getApp();
-	export default {
-		name: 'riderShipping',
-		components: {
-			riderOrder,
-		},
-		data() {
-			return {
-				statusBarHeight: app.globalData.statusBarHeight,
-				navigationBarHeight: 112,
-				riderData: [{
-						cost: '2.00',
-						time: '12:00',
-						shopName: '吉啊婆麻辣烫',
-						shopDistance: 500,
-						shopAddress: '梨园2楼7号橱窗',
-						userAddress: '雅苑3栋209b1001室',
-						userDistance: 0,
-						userRemarks: '老板,多放点辣椒!辣死我',
-					},
-					{
-						cost: '2.00',
-						time: '12:00',
-						shopName: '吉啊婆麻辣烫',
-						shopDistance: 500,
-						shopAddress: '梨园2楼7号橱窗',
-						userAddress: '雅苑3栋209b1001室',
-						userDistance: 0,
-						userRemarks: '老板,多放点辣椒!辣死我',
-					},
-					{
-						cost: '2.00',
-						time: '12:00',
-						shopName: '吉啊婆麻辣烫',
-						shopDistance: 500,
-						shopAddress: '梨园2楼7号橱窗',
-						userAddress: '雅苑3栋209b1001室',
-						userDistance: 0,
-						userRemarks: '老板,多放点辣椒!辣死我',
-					},
-					{
-						cost: '2.00',
-						time: '12:00',
-						shopName: '吉啊婆麻辣烫',
-						shopDistance: 500,
-						shopAddress: '梨园2楼7号橱窗',
-						userAddress: '雅苑3栋209b1001室',
-						userDistance: 0,
-						userRemarks: '老板,多放点辣椒!辣死我',
-					}
-				]
-			}
-		},
-		methods: {
-
-		},
-		onLoad(options) {},
-		mounted() {
-
-		},
-	}
-</script>
-
-<style scoped lang="scss">
-</style>

+ 144 - 0
mer_uniapp/pages/rider_index/components/rider_me/index.vue

@@ -0,0 +1,144 @@
+<template>
+	<view class="container">
+		<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>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				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: ''
+				}],
+			}
+		},
+		methods: {
+
+			onRiderClick(id) {
+				if (id === 3) {
+					uni.switchTab({
+						url: '/pages/user/index'
+					})
+				}
+			}
+		},
+		onLoad(options) {},
+	}
+</script>
+
+<style scoped lang="scss">
+	.container {
+		position: relative;
+		flex: 1;
+		width: 100%;
+	}
+
+	.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>

+ 150 - 0
mer_uniapp/pages/rider_index/components/rider_shipping/index.vue

@@ -0,0 +1,150 @@
+<template>
+	<view class="container">
+		<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>
+</template>
+
+<script>
+	import {
+		getRiderList
+	} from '@/api/rider.js';
+	import riderOrder from "@/components/riderOrder/index.vue";
+	let app = getApp();
+	export default {
+		name: 'riderShipping',
+		components: {
+			riderOrder,
+		},
+		data() {
+			return {
+				riderData: [], // 订单数组
+				loading: false, //是否加载中
+				loadend: false, //是否加载完毕
+				loadTitle: '加载更多', //提示语
+				page: 1,
+				limit: 20,
+				isReceiveId: null,
+				riderStatus: 1,
+				domTopData: [{
+						id: 1,
+						name: '待接单'
+					},
+					{
+						id: 8,
+						name: '待取货'
+					},
+					{
+						id: 4,
+						name: '配送中'
+					},
+					{
+						id: 5,
+						name: '已完成'
+					}
+				],
+			}
+		},
+		methods: {
+			/**
+			 * 切换类型
+			 */
+			statusClick: function(status) {
+				if (status == this.riderStatus) return;
+				this.page = 1;
+				this.riderStatus = status;
+				this.loadend = false;
+				this.getRiderDataList();
+			},
+			/**
+			 * 获取订单列表
+			 */
+			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 = "加载更多";
+				})
+			},
+			goOrderClick(id) {
+				this.isReceiveId = id
+				console.log(id)
+			}
+		},
+		onLoad(options) {
+			this.getRiderDataList()
+		},
+		mounted() {
+
+		},
+	}
+</script>
+
+<style scoped lang="scss">
+	.container {
+		width: 100%;
+		height: 100%;
+		display: flex;
+		flex-direction: column;
+		overflow: hidden;
+	}
+
+	.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;
+	}
+</style>

+ 8 - 225
mer_uniapp/pages/rider_index/index.vue

@@ -8,42 +8,11 @@
 			{{activeRole == '0' ? '接单' : '我的' }}
 		</view>
 		<!-- <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 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> -->
 		<!-- 底部导航 -->
@@ -64,62 +33,22 @@
 </template>
 
 <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 riderShipping from "./components/rider_shipping/index.vue";
+	import riderMe from "./components/rider_me/index.vue";
 	var statusBarHeight = uni.getSystemInfoSync().statusBarHeight + 'px';
 	let app = getApp();
 	export default {
 		components: {
 			riderOrder,
+			riderShipping,
+			riderMe
 		},
 		data() {
 			return {
 				winHeight: 0,
 				activeRouter: '/pages/rider/rider_shipping/index',
 				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: [{
 						pagePath: "/pages/rider/rider_shipping/index",
 						iconPath: require("./static/ddh.png"),
@@ -155,43 +84,6 @@
 				// 	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) {
 				if (id === 3) {
 					uni.switchTab({
@@ -199,10 +91,6 @@
 					});
 				}
 			},
-			goOrderClick(id) {
-				this.isReceiveId = id
-				console.log(id)
-			}
 		},
 		onLoad(options) {
 			let that = this
@@ -236,38 +124,6 @@
 		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 {
 		width: 100%;
 		font-weight: 500;
@@ -330,77 +186,4 @@
 			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>