ZZ há 1 mês atrás
pai
commit
ece284470e

+ 39 - 0
mer_mer_admin/src/views/systemSetting/modifyStoreInfo/index.vue

@@ -132,6 +132,45 @@
               >
               </el-switch>
             </el-form-item>
+            <el-form-item label="首单立减:" prop="alertStock">
+              <el-input-number
+                v-model.trim="merInfoForm.alertStock"
+                :min="1"
+                :max="9999"
+                label="起送费"
+              ></el-input-number>
+            </el-form-item>
+            <el-form-item label="起送费:" prop="alertStock">
+              <el-input-number
+                v-model.trim="merInfoForm.alertStock"
+                :min="1"
+                :max="9999"
+                label="起送费"
+              ></el-input-number>
+            </el-form-item>
+            <el-form-item label="配送费开关:" prop="alertStock">
+              <el-switch
+                v-model="merInfoForm.isTakeTheir"
+                :active-value="true"
+                :inactive-value="false"
+                active-text="开启"
+                inactive-text="关闭"
+              >
+              </el-switch>
+            </el-form-item>
+            <el-form-item label="是否减免配送费:" prop="electrPrintingSwitch" v-if="merInfoForm.isTakeTheir">
+              <el-radio-group v-model="merInfoForm.electrPrintingSwitch">
+                <el-radio :label="0">全免</el-radio>
+                <el-radio :label="1">免部分</el-radio>
+              </el-radio-group>
+              <el-input-number
+                v-if="merInfoForm.electrPrintingSwitch === 1"
+                v-model.trim="merInfoForm.alertStock"
+                :min="1"
+                :max="9999"
+                label="起送费"
+              ></el-input-number>
+            </el-form-item>
             <el-form-item label="小票打印开关:" prop="receiptPrintingSwitch">
               <el-radio-group v-model="merInfoForm.receiptPrintingSwitch">
                 <!--                  小票打印开关:0关闭,1=手动打印,2=自动打印,3=自动和手动-->

+ 21 - 0
mer_plat_admin/src/api/rider.js

@@ -355,3 +355,24 @@ export function merCategoryListApi() {
     method: 'get',
   });
 }
+
+/**
+ * @description 配送费设置 -- 详情
+ */
+export function configApi() {
+  return request({
+    url: '/admin/platform/rider/getFeeDetail',
+    method: 'get',
+  });
+}
+
+/**
+ * @description 配送费设置 -- 表单提交
+ */
+export function configUpdateApi(data) {
+  return request({
+    url: '/admin/platform/rider/addFee',
+    method: 'post',
+    data,
+  });
+}

+ 6 - 0
mer_plat_admin/src/router/modules/rider.js

@@ -31,6 +31,12 @@ const riderRouter = {
       name: 'RiderApplication',
       component: () => import('@/views/rider/application'),
       meta: { title: '骑手入驻申请', icon: '' },
+    },
+    {
+      path: 'deliverySetting',
+      name: 'deliverySetting',
+      component: () => import('@/views/rider/deliverySetting'),
+      meta: { title: '配送费设置', icon: '' },
     }
   ],
 };

+ 151 - 0
mer_plat_admin/src/views/rider/deliverySetting/index.vue

@@ -0,0 +1,151 @@
+<template>
+  <div class="divBox">
+    <el-card class="box-card" :bordered="false" shadow="never" :body-style="{ padding: '40px 50px' }">
+      <el-form
+        ref="promoterForm"
+        :model="promoterForm"
+        :rules="rules"
+        label-width="200px"
+        class="demo-promoterForm"
+        v-loading="loading"
+      >
+        <el-form-item prop="basicFee">
+          <span slot="label">
+            <span>基础配送费:</span>
+            <el-tooltip class="item" effect="dark" content="骑手基础配送费" placement="top-start">
+              <i class="el-icon-warning-outline" />
+            </el-tooltip>
+          </span>
+          <el-input-number
+            v-model.trim="promoterForm.basicFee"
+            placeholder="骑手基础配送费"
+            :min="0"
+            :max="100"
+            class="selWidth"
+          ></el-input-number>
+          <span>元</span>
+        </el-form-item>
+        <el-form-item prop="distanceInKm">
+          <span slot="label">
+            <span>设置配送距离:</span>
+            <el-tooltip
+              class="item"
+              effect="dark"
+              content="设置配送距离"
+              placement="top-start"
+            >
+              <i class="el-icon-warning-outline" />
+            </el-tooltip>
+          </span>
+          <el-input-number
+            v-model.trim="promoterForm.distanceInKm"
+            :min="0"
+            :max="8"
+            class="selWidth"
+            placeholder="设置配送距离"
+          ></el-input-number>
+          <span>km</span>
+        </el-form-item>
+        <el-form-item prop="feePerKm">
+          <span slot="label">
+            <span>超过距离配送费用:</span>
+            <el-tooltip
+              class="item"
+              effect="dark"
+              content="设置超过距离配送费用"
+              placement="top-start"
+            >
+              <i class="el-icon-warning-outline" />
+            </el-tooltip>
+          </span>
+          <el-input-number
+            v-model.trim="promoterForm.feePerKm"
+            :min="0"
+            :max="100"
+            class="selWidth"
+            placeholder="设置超过距离配送费用"
+          ></el-input-number>
+          <span>元</span>
+        </el-form-item>
+
+        <el-form-item>
+          <el-button
+            type="primary"
+            :loading="loading"
+            @click="submitForm('promoterForm')"
+            v-hasPermi="['platform:rider:fee:add']"
+            >提交</el-button
+          >
+        </el-form-item>
+      </el-form>
+    </el-card>
+  </div>
+</template>
+
+<script>
+// +---------------------------------------------------------------------
+// | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
+// +---------------------------------------------------------------------
+// | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
+// +---------------------------------------------------------------------
+// | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
+// +---------------------------------------------------------------------
+// | Author: CRMEB Team <admin@crmeb.com>
+// +---------------------------------------------------------------------
+import { configApi, configUpdateApi } from '@/api/rider';
+import * as selfUtil from '@/utils/ZBKJIutil.js';
+import { checkPermi } from '@/utils/permission'; // 权限判断函数
+import { Debounce } from '@/utils/validate';
+export default {
+  name: 'deliverySetting',
+  data() {
+    return {
+      promoterForm: {},
+      loading: false,
+      rules: {
+        basicFee: [{ required: true, message: '请设置骑手基础费用', trigger: 'change' }],
+        distanceInKm: [{ required: true, message: '请设置公里数', trigger: 'blur' }],
+        feePerKm: [{ required: true, message: '请输入每公里费用', trigger: 'blur' }],
+      },
+    };
+  },
+  mounted() {
+    if (checkPermi(['platform:rider:fee:add'])) this.getDetal();
+  },
+  methods: {
+    checkPermi,
+    getDetal() {
+      this.loading = true;
+      configApi()
+        .then((res) => {
+          this.loading = false;
+          this.promoterForm = res;
+        })
+        .catch((res) => {
+          this.loading = false;
+          this.$message.error(res.message);
+        });
+    },
+    submitForm: Debounce(function (formName) {
+      this.$refs[formName].validate((valid) => {
+        if (valid) {
+          this.loading = true;
+          configUpdateApi(this.promoterForm)
+            .then((res) => {
+              this.loading = false;
+              this.getDetal();
+              this.$message.success('提交成功');
+            })
+            .catch((err) => {
+              this.loading = false;
+            });
+        } else {
+          return false;
+        }
+      });
+    }),
+  },
+};
+</script>
+
+<style scoped lang="scss"></style>

+ 20 - 0
mer_uniapp/api/rider.js

@@ -0,0 +1,20 @@
+// +----------------------------------------------------------------------
+// | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
+// +----------------------------------------------------------------------
+// | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
+// +----------------------------------------------------------------------
+// | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
+// +----------------------------------------------------------------------
+// | Author: CRMEB Team <admin@crmeb.com>
+// +----------------------------------------------------------------------
+
+
+import request from "@/utils/request.js";
+
+/**
+ * 骑手订单列表
+ * @param object data
+ */
+export function getRiderList(data) {
+	return request.get('order/riderOrderTakinglist', data);
+}

+ 127 - 8
mer_uniapp/components/riderOrder/index.vue

@@ -9,21 +9,50 @@
 			</view>
 		</view>
 		<view class="order-content">
-			<view style="margin-bottom: 39rpx;">
+			<view class="order-info">
+				<text class="store-name">{{orderInfo.merName}}</text>
+
+				<view class="scroll-container">
+					<view class="item" v-for="(item, index) in orderInfo.orderInfoList" :key="index">
+						<image :src="item.image" />
+						<text>{{item.productName}}x{{item.payNum}}</text>
+					</view>
+				</view>
+
+				<view class="container2">
+					<view style="border-right: 2rpx solid #D5D6DC">
+						<image src="/static/img/ic-iphone1.png" class="image2" />
+						<text style="margin: 0 19rpx 0 15rpx;">联系商家</text>
+					</view>
+					<view>
+						<text>客户姓名:{{orderInfo.name}}</text>
+					</view>
+					<view>
+						<image src="/static/img/phone.png" class="image2" />
+						<text style="margin-left: 15rpx">联系客户</text>
+					</view>
+				</view>
+			</view>
+			<view class="bold-size flex-y-center" style="margin: 19rpx 0;">
+				<view class="icon-info"></view>
+				<text>配送详情</text>
+			</view>
+			<view style="padding-bottom: 39rpx;position: relative;" id="myLineRef">
+				<view class="line"></view>
 				<view class="box-item">
 					<view class="bold-size">
-						<text class="order-icon">取</text>{{orderInfo.shopName}}
+						<text class="order-icon">取</text>{{orderInfo.merName}}
 					</view>
-					<view class="order-dis">{{orderInfo.shopDistance}} m</view>
+					<!-- <view class="order-dis">{{orderInfo.shopDistance}} m</view> -->
 				</view>
-				<text class="onBold-size"><text class="order-icon" style="opacity: 0">取</text>{{orderInfo.shopAddress}}</text>
+				<text class="onBold-size"><text class="order-icon" style="opacity: 0">取</text>{{orderInfo.merAddress}}</text>
 			</view>
 			<view>
 				<view class="box-item">
 					<view class="bold-size">
 						<text class="order-icon">送</text>{{orderInfo.userAddress}}
 					</view>
-					<view class="order-dis">{{orderInfo.userDistance}} m</view>
+					<!-- <view class="order-dis">{{orderInfo.userDistance}} m</view> -->
 				</view>
 				<text class="onBold-size"><text class="order-icon" style="opacity: 0">送</text>备注:{{orderInfo.userRemarks}}</text>
 			</view>
@@ -50,17 +79,27 @@
 		},
 		data() {
 			return {
-
+				lineHeight: 0,
 			}
 		},
+		mounted() {
+			const that = this;
+			this.$nextTick(() => {
+				const query = uni.createSelectorQuery().in(this);
+				query.select('#myLineRef').boundingClientRect(data => {
+					that.lineHeight = data.height;
+				}).exec();
+			});
+		},
 		methods: {
-
+			formSubmit() {
+				this.$emit('orderCilck', this.orderInfo.id);
+			}
 		}
 	}
 </script>
 
 <style scoped lang="scss">
-
 	.order-item {
 		background-color: #fff;
 		border-radius: 23rpx;
@@ -76,6 +115,9 @@
 	}
 
 	.bold-size {
+		white-space: nowrap;
+		overflow: hidden;
+		text-overflow: ellipsis;
 		font-weight: 500;
 		font-size: 27rpx;
 		color: #141414;
@@ -96,6 +138,69 @@
 			justify-content: space-between;
 			margin-bottom: 10rpx;
 		}
+
+		.order-info {
+			width: 100%;
+			background: #F8F9FB;
+			padding: 19rpx 38rpx 45rpx 19rpx;
+
+			.store-name {
+				font-weight: 600;
+				font-size: 27rpx;
+				color: #141414;
+			}
+
+			.scroll-container {
+				display: flex;
+				flex-wrap: nowrap;
+				margin: 20rpx 0;
+				overflow-x: auto;
+				/* 允许水平滚动 */
+				white-space: nowrap;
+				/* 防止项目换行 */
+				-webkit-overflow-scrolling: touch;
+				/* 在iOS上平滑滚动 */
+
+				.item {
+					display: flex;
+					flex-direction: column;
+					align-items: center;
+					justify-content: center;
+					margin-right: 19rpx;
+
+					image {
+						width: 115rpx;
+						height: 115rpx;
+					}
+
+					text {
+						font-weight: 400;
+						font-size: 21rpx;
+						color: #141414;
+						margin-top: 9rpx;
+					}
+				}
+			}
+
+			.container2 {
+				display: flex;
+				justify-content: space-between;
+				align-items: center;
+				font-weight: 500;
+				font-size: 21rpx;
+				color: #141414;
+
+				view {
+					display: flex;
+					align-items: center;
+				}
+
+				.image2 {
+					width: 42rpx;
+					height: 42rpx;
+				}
+			}
+		}
 	}
 
 	.order-dis {
@@ -132,4 +237,18 @@
 			}
 		}
 	}
+
+	.icon-info {
+		width: 8rpx;
+		height: 31rpx;
+		background: $bg-color-primary;
+		margin-right: 15rpx;
+	}
+	
+	.line {
+		position: absolute;
+		width: 2rpx;
+		height: 100%;
+		border-left: 2rpx dashed $bg-color-primary;
+	}
 </style>

+ 38 - 9
mer_uniapp/pages.json

@@ -88,6 +88,13 @@
 					// #endif
 				}
 			}
+		},
+		{
+			"path": "pages/rider_index/index",
+			"style": {
+				"navigationStyle": "custom",
+				"navigationBarTitleText": "骑手"
+			}
 		}
 	],
 	"subPackages": [{
@@ -992,15 +999,6 @@
 						// #endif
 					}
 				}
-			    ,{
-                    "path" : "index-bak/index-bak",
-                    "style" :                                                                                    
-                {
-                    "navigationBarTitleText": "",
-                    "enablePullDownRefresh": false
-                }
-                
-                }
             ]
 		},
 		{
@@ -1308,6 +1306,37 @@
 			]
 		},
 		{
+			"root": "pages/rider",
+			"name": "rider",
+			"pages": [{
+					"path": "rider_shipping/index",
+					"style": {
+						"navigationBarTitleText": "接单",
+						"app-plus": {
+							// #ifdef APP-PLUS
+							"titleNView": {
+								"type": "default"
+							}
+							// #endif
+						}
+					}
+				},
+				{
+					"path": "rider_me/index",
+					"style": {
+						"navigationBarTitleText": "我的",
+						"app-plus": {
+							// #ifdef APP-PLUS
+							"titleNView": {
+								"type": "default"
+							}
+							// #endif
+						}
+					}
+				}
+			]
+		},
+		{
 			"root": "pages/admin/",
 			"name": "admin",
 			"pages": [{

+ 23 - 59
mer_uniapp/pages/index/index.vue

@@ -25,8 +25,7 @@
 
 			<!-- banner轮播图 -->
 			<view style="margin-top: 10rpx;">
-				<swiper :indicator-dots="indicatorDots" :autoplay="autoplay" :interval="interval" :duration="duration"
-					circular="true">
+				<swiper :indicator-dots="indicatorDots" :autoplay="autoplay" :interval="interval" :duration="duration" circular="true">
 					<block v-for="(item,index) in bannerList" :key='item.id'>
 						<swiper-item catchtouchmove='catchTouchMove'>
 							<view class="swiper-item">
@@ -72,48 +71,9 @@
 			<!-- 九宫格 -->
 			<view class="content-tab">
 				<view class="tab-list">
-					<view class="tab-item">
-						<image class="tab-image" src="/static/img/img1.png" mode="widthFix"></image>
-						<text class="tab-text">外卖</text>
-					</view>
-					<view class="tab-item">
-						<image class="tab-image" src="/static/img/img2.png" mode="widthFix"></image>
-						<text class="tab-text">表白墙</text>
-					</view>
-					<view class="tab-item">
-						<image class="tab-image" src="/static/img/img3.png" mode="widthFix"></image>
-						<text class="tab-text">游戏搭子</text>
-					</view>
-					<view class="tab-item">
-						<image class="tab-image" src="/static/img/img4.png" mode="widthFix"></image>
-						<text class="tab-text">二手交易</text>
-					</view>
-					<view class="tab-item">
-						<image class="tab-image" src="/static/img/img5.png" mode="widthFix"></image>
-						<text class="tab-text">代取快递</text>
-					</view>
-				</view>
-
-				<view class="tab-list">
-					<view class="tab-item">
-						<image class="tab-image imgs" src="/static/img/img6.png" mode="widthFix"></image>
-						<text class="tab-text2">宵夜江湖</text>
-					</view>
-					<view class="tab-item">
-						<image class="tab-image imgs" src="/static/img/img7.png" mode="widthFix"></image>
-						<text class="tab-text2">炸鸡汉堡</text>
-					</view>
-					<view class="tab-item">
-						<image class="tab-image imgs" src="/static/img/img8.png" mode="widthFix"></image>
-						<text class="tab-text2">奶茶甜点</text>
-					</view>
-					<view class="tab-item">
-						<image class="tab-image imgs" src="/static/img/img9.png" mode="widthFix"></image>
-						<text class="tab-text2">超市便利</text>
-					</view>
-					<view class="tab-item">
-						<image class="tab-image imgs" src="/static/img/ic-random.png" mode="widthFix"></image>
-						<text class="tab-text" style="color: #FF9805;font-weight: 600; font-size: 27rpx;">今日吃啥</text>
+					<view class="tab-item flex-col flex-between-center" v-for="(item, index) in cateList" :key="index" @tap="onCateListClick(item.link)">
+						<image class="tab-image" :style="{width: !item.isHighLight ? '80rpx' : ''}" :src="item.icon" mode="widthFix"></image>
+						<text :class="item.isHighLight || item.color ? 'tab-text' : 'tab-text2' " :style="{color: item.color || ''}">{{item.name}}</text>
 					</view>
 				</view>
 
@@ -131,7 +91,7 @@
 
 				<view style="display: flex;">
 
-					<view @click="getDetils(item)" class="goods-list" v-for="item in proList" :key="item.id">
+					<view class="goods-list" v-for="item in proList" :key="item.id">
 						<view style="display: flex;">
 							<view style="margin-right: 20rpx;">
 								<image :src="item.image" style="width: 134rpx;height: 134rpx;border-radius: 12rpx;">
@@ -155,8 +115,7 @@
 
 			<!-- 销量排行 -->
 			<view class="tab-list" style="margin-top: 10rpx;">
-				<view :class=" item.checked ? 'tab-item2' : 'tab-item2-false' " v-for="item in labelList" :key="item.id"
-					@click="item2Click(item)">{{item.label}}</view>
+				<view :class=" item.checked ? 'tab-item2' : 'tab-item2-false' " v-for="item in labelList" :key="item.id" @click="item2Click(item)">{{item.label}}</view>
 			</view>
 
 			<view class="content-goods2" v-for="item in merchantList" :key="item.id" @click="merchantTab(item)">
@@ -223,6 +182,7 @@
 				duration: 500, //滑动动画时长
 				bannerList: [],
 				messageList: [],
+				cateList: [],
 				proList: [],
 				labelList: [{
 					id: 1,
@@ -278,13 +238,6 @@
 			})
 		},
 		methods: {
-			// 跳转商品详情
-			getDetils(item){
-				console.log(item)
-				uni.navigateTo({
-						url:`/pages/goods/goods_details/index?id=${item.productId}&mt=0&iSshop=1`
-				})
-			},
 			getAddressInfo(latitude, longitude) {
 				let that = this;
 				const qqmapsdk = new QQMapWX({
@@ -320,6 +273,13 @@
 					this.bannerList = res.data.banner;
 					this.proList = res.data.proList;
 					this.messageList = res.data.headline;
+					this.cateList = res.data.cateList;
+					this.cateList.push({
+						id: 999,
+						name: '今日吃啥',
+						icon: '/static/img/ic-random.png',
+						color: '#FF9805'
+					})
 					// this.messageList = [{"id":2,"title":"绿草地活动大促,消费满三十减十五"},{"id":3,"title":"绿草地活动大促,消费满三十减十五33333"}];
 					console.log("this.messageList--", this.messageList)
 					this.startScroll();
@@ -355,7 +315,6 @@
 				}
 			},
 			merchantTab(item) {
-				
 				let opitem=JSON.stringify(item)
 				let cid=item.cid
 				uni.setStorageSync('merId', JSON.parse(JSON.stringify(item.id)))
@@ -365,6 +324,11 @@
 					 url: `/pages/goods_cate/index?id=${item.id}`
 					
 				})
+			},
+			onCateListClick(url) {
+				uni.navigateTo({
+					url: url || ''
+				})
 			}
 		},
 	}
@@ -477,7 +441,7 @@
 	}
 
 	.tab-item {
-		width: 19%;
+		width: 18%;
 		/* 5个元素平分宽度,留1%作为间隙 */
 		margin-bottom: 20rpx;
 		/* 底部间距 */
@@ -501,7 +465,7 @@
 	.tab-text {
 		display: block;
 		font-size: 27rpx;
-		font-weight: 500;
+		font-weight: 600;
 		color: #141414;
 		margin-top: 10rpx;
 	}
@@ -655,10 +619,10 @@
 		overflow: hidden;
 		text-overflow: ellipsis;
 	}
-	
+
 	.newsTitle {
 		font-size: 23rpx;
 		color: #646464;
 		margin-top: 2rpx;
 	}
-</style>
+</style>

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

@@ -0,0 +1,117 @@
+<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>

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

@@ -0,0 +1,181 @@
+<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>
+		<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 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'
+	import riderOrder from "@/components/riderOrder/index.vue";
+	var statusBarHeight = uni.getSystemInfoSync().statusBarHeight + 'px';
+	let app = getApp();
+	export default {
+		components: {
+			riderOrder,
+		},
+		data() {
+			return {
+				statusBarHeight: app.globalData.statusBarHeight,
+				navigationBarHeight: 112,
+				// footerList: [{
+				// 		pagePath: "/pages/goods/order_confirm/index",
+				// 		iconPath: require("./static/ddh.png"),
+				// 		selectedIconPath: require("./static/ddl.png"),
+				// 		text: "订单",
+				// 		role: '0'
+				// 	},
+				// 	{
+				// 		pagePath: "/pages/admin/order/index",
+				// 		iconPath: require("./static/wdh.png"),
+				// 		selectedIconPath: require("./static/wdl.png"),
+				// 		text: "我的",
+				// 		role: '1'
+				// 	}
+				// ],
+				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">
+	.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>

+ 402 - 0
mer_uniapp/pages/rider_index/index.vue

@@ -0,0 +1,402 @@
+<template>
+	<view class="container" :style="{height: winHeight + 'px'}">
+		<!-- 状态栏高度 -->
+		<view :style="{ height: `${statusBarHeight}px`, width: '100%', backgroundColor: '#FF6702' }"></view>
+		<!-- 导航栏 -->
+		<view :style="{ height: `${navigationBarHeight}rpx`,lineHeight: `${navigationBarHeight}rpx`}" class="order-nav">
+			<!-- <view class="back-button" @tap="handBack()"></view> -->
+			{{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"></rider-order>
+				</view>
+			</scroll-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>
+		<!-- </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 {
+		getRiderList
+	} from '@/api/rider.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 {
+		components: {
+			riderOrder,
+		},
+		data() {
+			return {
+				winHeight: 0,
+				activeRouter: '/pages/rider/rider_shipping/index',
+				activeRole: '0',
+				riderStatus: 1,
+				isReceiveId: null,
+				domTopData: [{
+						id: 1,
+						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"),
+						selectedIconPath: require("./static/ddl.png"),
+						text: "订单",
+						role: '0'
+					},
+					{
+						pagePath: "/pages/rider/rider_me/index",
+						iconPath: require("./static/wdh.png"),
+						selectedIconPath: require("./static/wdl.png"),
+						text: "我的",
+						role: '1'
+					}
+				],
+				statusBarHeight: app.globalData.statusBarHeight,
+				navigationBarHeight: 112,
+				riderData: [], // 订单数组
+				loading: false, //是否加载中
+				loadend: false, //是否加载完毕
+				loadTitle: '加载更多', //提示语
+				page: 1,
+				limit: 20
+			}
+		},
+		methods: {
+			goRouter(item) {
+				if (this.activeRouter == item.pagePath) return
+				this.activeRouter = item.pagePath
+				this.activeRole = item.role
+				// uni.redirectTo({
+				// 	url: item.pagePath,
+				// 	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({
+						url: '/pages/user/index'
+					});
+				}
+			},
+			goOrderClick(id) {
+				this.isReceiveId = id
+				console.log(id)
+			}
+		},
+		onLoad(options) {
+			let that = this
+			// 隐藏TabBar
+			uni.hideTabBar({});
+			uni.getSystemInfo({
+				success: function(res) {
+					that.winHeight = res.windowHeight
+				},
+			});
+			this.getRiderDataList()
+		},
+		mounted() {
+
+		},
+	}
+</script>
+
+<style scoped lang="scss">
+	.container {
+		display: flex;
+		align-items: center;
+		flex-direction: column;
+		justify-content: space-between;
+		overflow: hidden;
+		position: relative;
+	}
+
+	.content-dom {
+		width: 100%;
+		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;
+		font-size: 35rpx;
+		margin-top: -2rpx;
+		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;
+		}
+	}
+
+	.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>

BIN
mer_uniapp/pages/rider_index/static/ddh.png


BIN
mer_uniapp/pages/rider_index/static/ddl.png


BIN
mer_uniapp/pages/rider_index/static/run-errands.png


BIN
mer_uniapp/pages/rider_index/static/wdh.png


BIN
mer_uniapp/pages/rider_index/static/wdl.png


BIN
mer_uniapp/pages/rider_index/static/withdrawal.png


+ 7 - 6
mer_uniapp/pages/user/index.vue

@@ -63,9 +63,10 @@
 		<view class="item-settled">
 			<image @tap="menusTap('/pages/users/settled/index')" src="/static/img/ic-settled-left.png" style="width: 350rpx;height: 116rpx;"></image>
 
-			<image src="/static/img/ic-bg-line.png" style="width: 4rpx;height: 154rpx;margin: 0 20rpx;"></image>
-			<image v-if="!userInfo.isRider" @tap="menusRider('/pages/users/user_rider/index')" src="/static/img/ic-settled-right.png" style="width: 350rpx;height: 116rpx;"></image>
-			<image v-else @tap="" src="/static/img/go-shipping.png" style="width: 350rpx;height: 116rpx;"></image>
+			<image src="/static/img/ic-bg-line.png" style="width: 10rpx;height: 154rpx;margin: 0 20rpx;"></image>
+			<image v-if="!userInfo.isRider" @tap="menusRider('/pages/users/user_rider/index')" src="/static/img/ic-settled-right.png"
+			 style="width: 350rpx;height: 116rpx;"></image>
+			<image v-else @tap="menusRider('/pages/rider_index/index', true)" src="/static/img/go-shipping.png" style="width: 350rpx;height: 116rpx;"></image>
 		</view>
 
 		<view class="item-features" v-if="isLogin">
@@ -217,12 +218,12 @@
 				toLogin();
 			},
 			// 跳转骑手
-			menusRider(url) {
+			menusRider(url, falg) {
 				if (!this.isLogin) {
 					this.openAuto();
 				} else {
 					if (url === '') return
-					this.$util.navigateTo(url);
+					falg ? uni.reLaunch({url: url}) : this.$util.navigateTo(url)
 				}
 			},
 			// 编辑页面
@@ -441,7 +442,7 @@
 		color: #2E261E;
 		line-height: 38rpx;
 	}
-	
+
 	.go-img {
 		background: linear-gradient(135deg, #FED0A7 0%, #FFF3E2 52%, #FAEDD3 100%);
 		border-radius: 8rpx;

BIN
mer_uniapp/static/img/phone.png