郭鹏飞 8 hónapja
szülő
commit
44cea54bdd

+ 58 - 0
src/api/address.js

@@ -0,0 +1,58 @@
+import request from "@/utils/request.js";
+
+// 设置默认地址
+export function defaultAddr(data) {
+    return request({
+        method: 'post',
+        url: '/tAddress/defaultAddress',
+        data
+    });
+}
+
+// 添加地址
+export function netAddressAdd(data) {
+    return request({
+        method: 'post',
+        url: '/tAddress/save',
+        data
+    });
+}
+
+// 修改地址
+export function netAddressUpdate(data) {
+    return request({
+        method: 'post',
+        url: '/tAddress/update',
+        data
+    });
+}
+
+// 删除地址
+export function netAddressDel(data) {
+    return request({
+        method: 'delete',
+        url: '/tAddress/delete',
+        data,
+        header: {
+            'content-type': 'application/x-www-form-urlencoded'
+        }
+    });
+}
+
+// 地址列表
+export function getAddrList(data) {
+    return request({
+        method: 'get',
+        url: '/tAddress/getByOpenId',
+        data
+    });
+}
+
+// 地址详情
+export function getAddrById(data) {
+    return request({
+        method: 'get',
+        url: '/tAddress/getById',
+        data
+    });
+}

+ 5 - 107
src/api/index.js

@@ -93,42 +93,6 @@ export function getInfo(data) {
     });
     });
 }
 }
 
 
-// 添加地址
-export function addUpdate(data) {
-    return request({
-        method: 'post',
-        url: '/tAddress/save',
-        data
-    });
-}
-
-//修改地址
-export function updateAdd(data) {
-    return request({
-        method: 'post',
-        url: '/tAddress/update',
-        data
-    });
-}
-
-// 地址列表
-export function addList(data) {
-    return request({
-        method: 'get',
-        url: '/tAddress/getByOpenId',
-        data
-    });
-}
-
-// 地址详情
-export function addDetails(data) {
-    return request({
-        method: 'get',
-        url: '/tAddress/getById',
-        data
-    });
-}
-
 // 微信支付验证
 // 微信支付验证
 export function getSignature(data) {
 export function getSignature(data) {
     return request({
     return request({
@@ -138,36 +102,6 @@ export function getSignature(data) {
     });
     });
 }
 }
 
 
-// 删除地址
-export function delAdd(data) {
-    return request({
-        method: 'delete',
-        url: '/tAddress/delete',
-        data,
-        header: {
-            'content-type': 'application/x-www-form-urlencoded'
-        }
-    });
-}
-
-// 设置默认地址
-export function defaultAdd(data) {
-    return request({
-        method: 'post',
-        url: '/tAddress/defaultAddress',
-        data
-    });
-}
-
-// 添加商户
-export function addEngineer(data) {
-    return request({
-        method: 'post',
-        url: '/api/js/v1/wx/add',
-        data
-    });
-}
-
 // 添加免车费
 // 添加免车费
 export function freeFare(data) {
 export function freeFare(data) {
     return request({
     return request({
@@ -178,7 +112,7 @@ export function freeFare(data) {
 }
 }
 
 
 // 上下岗
 // 上下岗
-export function work(data) {
+export function netStaffWork(data) {
     return request({
     return request({
         method: 'post',
         method: 'post',
         url: '/api/js/v1/wx/post',
         url: '/api/js/v1/wx/post',
@@ -195,15 +129,6 @@ export function getMerchantData(data) {
     });
     });
 }
 }
 
 
-// 修改商户信息
-export function updateEngine(data) {
-    return request({
-        method: 'post',
-        url: '/api/js/v1/wx/update',
-        data
-    });
-}
-
 // 订单-分类
 // 订单-分类
 export function getStatusList(data) {
 export function getStatusList(data) {
     return request({
     return request({
@@ -438,15 +363,6 @@ export function getwxQrCode(data) {
     });
     });
 }
 }
 
 
-// 获取优惠券v
-export function add(data) {
-    return request({
-        method: 'post',
-        url: '/businessDevelopment/add',
-        data
-    });
-}
-
 // 投诉举报
 // 投诉举报
 export function complain(data) {
 export function complain(data) {
     return request({
     return request({
@@ -555,8 +471,8 @@ export function verification(data) {
     });
     });
 }
 }
 
 
-// 查看客户评论
-export function selectApp(data) {
+// 获取员工工作数据
+export function getStaffWorkData(data) {
     return request({
     return request({
         method: 'get',
         method: 'get',
         url: '/tJsDay/selectApp',
         url: '/tJsDay/selectApp',
@@ -582,24 +498,6 @@ export function logout(data) {
     });
     });
 }
 }
 
 
-// 招商已提交信息
-export function businessDevelopment(data) {
-    return request({
-        method: 'get',
-        url: '/businessDevelopment/getByOpenId',
-        data
-    });
-}
-
-// 招商已提交信息
-export function businessupdate(data) {
-    return request({
-        method: 'post',
-        url: '/businessDevelopment/update',
-        data
-    });
-}
-
 // 获取银行卡列表
 // 获取银行卡列表
 export function bankList(data) {
 export function bankList(data) {
     return request({
     return request({
@@ -636,8 +534,8 @@ export function getRecommendList(data) {
     });
     });
 }
 }
 
 
-// 获取订单数量
-export function waitOrder(data) {
+// 获取订单数量-待接单
+export function getWaitOrder(data) {
     return request({
     return request({
         method: 'get',
         method: 'get',
         url: '/api/order/v1/wx/waitOrder',
         url: '/api/order/v1/wx/waitOrder',

+ 46 - 0
src/api/staff.js

@@ -0,0 +1,46 @@
+import request from "@/utils/request.js";
+
+// 新增招商信息
+export function netBusinessAdd(data) {
+    return request({
+        method: 'post',
+        url: '/businessDevelopment/add',
+        data
+    });
+}
+
+// 获取招商信息
+export function getBusinessByOpenId(data) {
+    return request({
+        method: 'get',
+        url: '/businessDevelopment/getByOpenId',
+        data
+    });
+}
+
+// 更新招商信息
+export function netBusinessUpdate(data) {
+    return request({
+        method: 'post',
+        url: '/businessDevelopment/update',
+        data
+    });
+}
+
+// 添加商户(技师)信息
+export function netStaffAdd(data) {
+    return request({
+        method: 'post',
+        url: '/api/js/v1/wx/add',
+        data
+    });
+}
+
+// 修改商户(技师)信息
+export function netStaffUpdate(data) {
+    return request({
+        method: 'post',
+        url: '/api/js/v1/wx/update',
+        data
+    });
+}

+ 0 - 188
src/components/date/select_time.vue

@@ -1,188 +0,0 @@
-<template>
-	<view class="time_box">
-		<view class="content">
-			<view class="title">
-				选择上门时间
-			</view>
-			<view class="center">
-				<view class="left">
-					<!-- <view class="item select_day" :class="currentDay == index?'select_day':''" v-for="(item,index) in day" :key="index"
-						@click="selectDay(item,index)"> -->
-					<view class="item select_day">
-						<!-- {{item.title}} -->今天
-					</view>
-				</view>
-				<view class="right">
-					<view class="item" :class="currentTime == index?'active':''" v-for="(item,index) in time" :key="index"
-						@click="selectTime(item,index)">
-						{{item.value}}
-					</view>
-				</view>
-			</view>
-			<view class="bottom">
-				<view class="btn" v-if="selectTim" @click="selectDate">
-					{{selectDay}} {{selectTim}}
-				</view>
-				<view class="btn" v-else>
-					选择上门时间
-				</view>
-			</view>
-		</view>
-	</view>
-</template>
-
-<script>
-	export default {
-		data() {
-			return {
-				day: [{
-						title: '今天',
-						type: 0
-					},
-					// {
-					// 	title: '明天',
-					// 	type: 1
-					// }, {
-					// 	title: '后天',
-					// 	type: 2
-					// },
-				],
-				time: [{
-						value: '15:00-17:00'
-					},
-					{
-						value: '15:00-17:00'
-					},
-					{
-						value: '15:00-17:00'
-					},
-					{
-						value: '15:00-17:00'
-					},
-					{
-						value: '15:00-17:00'
-					},
-					{
-						value: '15:00-17:00'
-					}
-				],
-				currentDay: null,
-				currentTime: null,
-				selectDay: '',
-				selectTim: ''
-			}
-		},
-		methods: {
-			// selectDay(item, index) {
-			// 	// this.currentDay = index
-			// 	let today = new Date();
-			// 	this.currentDay = today.toISOString().slice(0, 10);
-			// 	console.log(this.currentDay)
-			// },
-			selectTime(item, index) {
-				this.currentTime = index
-				this.selectTim = item.value
-				let today = new Date();
-				this.selectDay = today.toISOString().slice(0, 10);
-			},
-			selectDate() {
-				let date = this.selectDay + ' ' + this.selectTim
-				this.$emit('dateSend', date);
-			}
-		}
-	}
-</script>
-
-<style lang="scss" scoped>
-	.time_box {
-		width: 100vw;
-		height: 100vh;
-		position: fixed;
-		top: 0;
-		left: 0;
-		z-index: 10075;
-		background: rgba(0, 0, 0, 0.4);
-
-		.content {
-			width: 100%;
-			position: fixed;
-			bottom: 0;
-			left: 0;
-
-			.title {
-				width: 100%;
-				height: 92rpx;
-				background: #E6F8F7;
-				border-radius: 24rpx 24rpx 0px 0px;
-				display: flex;
-				justify-content: center;
-				align-items: center;
-				font-weight: 600;
-			}
-
-			.center {
-				height: 782rpx;
-				display: flex;
-
-				.left {
-					width: 220rpx;
-					height: 100%;
-					background: #F7F7F7;
-
-					.item {
-						width: 100%;
-						height: 76rpx;
-						display: flex;
-						align-items: center;
-						justify-content: center;
-						font-size: 28rpx;
-						color: #000000;
-					}
-
-					.select_day {
-						background: #FFFFFF;
-					}
-				}
-
-				.right {
-					flex: 1;
-					background: #FFFFFF;
-
-					.item {
-						width: 100%;
-						height: 76rpx;
-						display: flex;
-						align-items: center;
-						justify-content: center;
-						font-size: 28rpx;
-						color: #999999;
-					}
-
-					.active {
-						color: #000000;
-					}
-				}
-			}
-
-			.bottom {
-				height: 116rpx;
-				background: #FFFFFF;
-				border-top: 1px solid #EEEEEE;
-				padding: 20rpx 40rpx;
-				box-sizing: border-box;
-
-				.btn {
-					width: 100%;
-					height: 76rpx;
-					background: #00B8B0;
-					border-radius: 106rpx;
-					font-size: 32rpx;
-					color: #FFFFFF;
-					display: flex;
-					justify-content: center;
-					align-items: center;
-				}
-			}
-		}
-	}
-</style>

+ 10 - 39
src/pages.json

@@ -7,13 +7,9 @@
 	},
 	},
 	"pages": [
 	"pages": [
 		{
 		{
-			"path": "pages/demo/order-detail",
+			"path": "pages/demo/coupon",
 			"style": {
 			"style": {
-				"navigationBarTitleText": "广誉源",
-				"app-plus": {
-					"softinputNavBar": "none",
-					"titleNView": false
-				}  
+				"navigationBarTitleText": "广誉源"
 			}
 			}
 		},
 		},
 		{
 		{
@@ -304,43 +300,25 @@
 				}  
 				}  
 			}
 			}
 		},
 		},
-		//商户中心
 		{
 		{
-			"path": "pages/my/engineerCenter",
+			"path": "pages/staff/index",
 			"style": {
 			"style": {
 				"navigationBarTitleText": "商户中心",
 				"navigationBarTitleText": "商户中心",
-				"navigationBarBackgroundColor": "#2cb8d4",
-				"navigationBarTextStyle": "white",
-				"app-plus": {
-					"softinputNavBar": "none",
-					"titleNView": false
-				}  
+				"navigationStyle": "default"
 			}
 			}
 		},
 		},
-		//招商合作
 		{
 		{
-			"path": "pages/join/teamwork",
+			"path": "pages/join/team",
 			"style": {
 			"style": {
 				"navigationBarTitleText": "招商合作",
 				"navigationBarTitleText": "招商合作",
-				"navigationBarBackgroundColor": "#2cb8d4",
-				"navigationBarTextStyle": "white",
-				"app-plus": {
-					"softinputNavBar": "none",
-					"titleNView": false
-				}  
+				"navigationStyle": "default"
 			}
 			}
 		},
 		},
-		//商户入住
 		{
 		{
-			"path": "pages/join/first_join",
+			"path": "pages/join/staff",
 			"style": {
 			"style": {
 				"navigationBarTitleText": "商户入驻",
 				"navigationBarTitleText": "商户入驻",
-				"navigationBarBackgroundColor": "#2cb8d4",
-				"navigationBarTextStyle": "white",
-				"app-plus": {
-					"softinputNavBar": "none",
-					"titleNView": false
-				}  
+				"navigationStyle": "default" 
 			}
 			}
 		},
 		},
 		//编辑资料
 		//编辑资料
@@ -382,17 +360,10 @@
 				}  
 				}  
 			}
 			}
 		},
 		},
-		//投诉举报
 		{
 		{
-			"path": "pages/join/feedback",
+			"path": "pages/my/feedback",
 			"style": {
 			"style": {
-				"navigationBarTitleText": "投诉举报",
-				"navigationBarBackgroundColor": "#2cb8d4",
-				"navigationBarTextStyle": "white",
-				"app-plus": {
-					"softinputNavBar": "none",
-					"titleNView": false
-				}  
+				"navigationBarTitleText": "投诉举报"
 			}
 			}
 		},
 		},
 		//充值
 		//充值

+ 7 - 8
src/pages/address/address-edit.vue

@@ -70,11 +70,10 @@
 
 
 <script>
 <script>
 import {
 import {
-    addUpdate,
-    updateAdd,
-    addDetails,
-    defaultAdd
-} from '@/api/index';
+    getAddrById,
+    netAddressAdd,
+    netAddressUpdate,
+} from '@/api/address';
 export default {
 export default {
     data() {
     data() {
         return {
         return {
@@ -120,7 +119,7 @@ export default {
 	},
 	},
     methods: {
     methods: {
         getData() {
         getData() {
-            addDetails({
+            getAddrById({
                 id: this.query.id
                 id: this.query.id
             }).then(res => {
             }).then(res => {
                 this.form = res.data.data;
                 this.form = res.data.data;
@@ -144,14 +143,14 @@ export default {
         },
         },
         onSubmit() {
         onSubmit() {
             this.$refs.uForm.validate().then(res => {
             this.$refs.uForm.validate().then(res => {
-                let api = addUpdate;
+                let api = netAddressAdd;
                 let params = {
                 let params = {
                     ...this.form,
                     ...this.form,
                     type: this.isDefault ? 1: 0,
                     type: this.isDefault ? 1: 0,
                     openid: uni.getStorageSync('wx_copenid'),
                     openid: uni.getStorageSync('wx_copenid'),
                 };
                 };
                 // console.log('保存', params);
                 // console.log('保存', params);
-                if (this.query.id) api = updateAdd;
+                if (this.query.id) api = netAddressUpdate;
                 api(params).then(res => {
                 api(params).then(res => {
                     uni.$u.toast(res.data.msg);
                     uni.$u.toast(res.data.msg);
                     if (res.data.code == 200) {
                     if (res.data.code == 200) {

+ 8 - 15
src/pages/address/index.vue

@@ -50,12 +50,11 @@
 
 
 <script>
 <script>
 import {
 import {
-	delAdd,
-	addList,
-	defaultAdd,
-	addDetails,
+	getAddrList,
+	defaultAddr,
 	updateOrder,
 	updateOrder,
-} from '@/api/index.js';
+	netAddressDel,
+} from '@/api/address';
 export default {
 export default {
 	data() {
 	data() {
 		return {
 		return {
@@ -65,13 +64,7 @@ export default {
 		}
 		}
 	},
 	},
 	computed: {
 	computed: {
-		initParams() {
-			let params = {
-				appUserId: uni.getStorageSync('user')?.userInfo?.id,
-				// defaultFlag: 1
-			};
-			return params;
-		}
+		
 	},
 	},
 	onLoad(query) {
 	onLoad(query) {
 		this.query = query;
 		this.query = query;
@@ -88,7 +81,7 @@ export default {
 				size: pageSize,
 				size: pageSize,
 				openId: uni.getStorageSync('wx_copenid'),
 				openId: uni.getStorageSync('wx_copenid'),
 			}
 			}
-			addList(params).then(res => {
+			getAddrList(params).then(res => {
 				if (res.data.code === 200) {
 				if (res.data.code === 200) {
 					this.selected = res.data.data.find(item => item.type == 1)?.id;
 					this.selected = res.data.data.find(item => item.type == 1)?.id;
 					this.$refs.paging.complete(res.data.data);
 					this.$refs.paging.complete(res.data.data);
@@ -99,7 +92,7 @@ export default {
 		},
 		},
 		// 设置默认
 		// 设置默认
 		onChange(e) {
 		onChange(e) {
-			defaultAdd({
+			defaultAddr({
 				id: e,
 				id: e,
 				openId: uni.getStorageSync('wx_copenid'),
 				openId: uni.getStorageSync('wx_copenid'),
 			}).then(res => {
 			}).then(res => {
@@ -127,7 +120,7 @@ export default {
 				content: `确定要删除该条数据吗?`,
 				content: `确定要删除该条数据吗?`,
 				success: (res) => {
 				success: (res) => {
 					if (res.confirm) {
 					if (res.confirm) {
-						delAdd({ idList: item.id }).then(res => {
+						netAddressDel({ idList: item.id }).then(res => {
 							uni.$u.toast(res.data.msg);
 							uni.$u.toast(res.data.msg);
 							if (res.data.code == 200) {
 							if (res.data.code == 200) {
 								this.$refs.paging.reload();
 								this.$refs.paging.reload();

+ 0 - 24
src/pages/demo/settings.vue

@@ -32,15 +32,6 @@
                 @click="onLogout"
                 @click="onLogout"
             ></u-button>
             ></u-button>
         </view>
         </view>
-
-        <ServiceTimePicker
-            ref="stp"
-            :duration="120"
-            :bookedTimes="occupiedTimes"
-            startHour="09:00"
-            endHour="21:00"
-            @confirm="handleTimeConfirm"
-        ></ServiceTimePicker>
     </view>
     </view>
 </template>
 </template>
 
 
@@ -49,9 +40,7 @@ import {
     logout,
     logout,
     getInfo,
     getInfo,
 } from '@/api/index.js';
 } from '@/api/index.js';
-import ServiceTimePicker from '@/components/picker/service-time.vue';
 export default {
 export default {
-    components: { ServiceTimePicker },
     data() {
     data() {
         return {
         return {
             dataInfo: {
             dataInfo: {
@@ -60,23 +49,12 @@ export default {
                 createTime: '2025.10.01',
                 createTime: '2025.10.01',
                 mobile: ''
                 mobile: ''
             },
             },
-
-            occupiedTimes: [
-                // 场景:晚上18:00 到 20:00 有人预约了
-                // 此时,如果你选 17:00 (17+2=19:00),因为19:00>18:00,产生交集,17:00应该不可选
-                // 如果你选 16:00 (16+2=18:00),刚好接上,通常可选(看你的边界逻辑,我的代码里是允许接触的)
-                { start: '2026-01-03 19:00', end: '2026-01-03 20:00' }
-            ],
         }
         }
     },
     },
     onShow() {
     onShow() {
 		this.getData();
 		this.getData();
     },
     },
     methods: {
     methods: {
-        handleTimeConfirm(val) {
-            // val 是一个数组: ['2026-01-02 12:10', '2026-01-02 14:10']
-            console.log('获取到的数据:', val);
-        },
 		// 用户数据
 		// 用户数据
 		getData() {
 		getData() {
 			this.dataInfo = {};
 			this.dataInfo = {};
@@ -94,8 +72,6 @@ export default {
             });
             });
         },
         },
         onLogout() {
         onLogout() {
-            this.$refs.stp.show = true;
-            return;
             uni.showModal({
             uni.showModal({
 				title: '确定退出登录吗',
 				title: '确定退出登录吗',
 				success: (res) => {
 				success: (res) => {

+ 7 - 23
src/pages/identify/city.vue

@@ -6,37 +6,21 @@
 	export default {
 	export default {
 		data() {
 		data() {
 			return {
 			return {
-				type:''
+				type: ''
 			}
 			}
 		},
 		},
 		onLoad(options) {
 		onLoad(options) {
-			if(options.type=='indent'){
-				this.type = options.type
-			}
-			// 计算出可用高度
-			// this.windowHeight = uni.getSystemInfoSync().windowHeight-100+"px";
+			this.type = options.type
 		},
 		},
 		methods: {
 		methods: {
 			// 选中事件
 			// 选中事件
 			select(data) {
 			select(data) {
-				if(this.type== 'indent'){
-					uni.setStorage({
-						key: 'jsCity',
-						data: data.name,
-						success: function () {
-							uni.navigateBack()
-						}
-					});
-				}else{
-					uni.setStorage({
-						key: 'selectCity',
-						data: data.name,
-						success: function () {
-							uni.navigateBack()
-						}
-					});
+				if (this.type == 'indent') {
+                    uni.setStorageSync('jsCity', data.name);
+				} else {
+                    uni.setStorageSync('selectCity', data.name);
 				}
 				}
-				
+				uni.navigateBack();
 			}
 			}
 		}
 		}
 	}
 	}

+ 4 - 2
src/pages/identify/identify.vue

@@ -187,9 +187,11 @@
 		engineerDetails,
 		engineerDetails,
 		addOrder,
 		addOrder,
 		getInfo,
 		getInfo,
-		addList,
 		getCityList
 		getCityList
 	} from '@/api/index'
 	} from '@/api/index'
+	import {
+		getAddrList,
+	} from '@/api/address';
 	export default {
 	export default {
 		mixins: [MescrollMixin], // 使用mixin
 		mixins: [MescrollMixin], // 使用mixin
 		// components: {
 		// components: {
@@ -512,7 +514,7 @@
 				var data = {
 				var data = {
 					openId: uni.getStorageSync('wx_copenid'),
 					openId: uni.getStorageSync('wx_copenid'),
 				}
 				}
-				addList(data).then(res => {
+				getAddrList(data).then(res => {
 					if (res.data.data[0]) {
 					if (res.data.data[0]) {
 						this.isAddress = true
 						this.isAddress = true
 					} else {
 					} else {

+ 350 - 339
src/pages/identify/pay_order.vue

@@ -45,7 +45,7 @@
 					</view>
 					</view>
 				</view>
 				</view>
 				<view class="time_coupon">
 				<view class="time_coupon">
-					<view class="select_coupon" @click="isSelectDate = true">
+					<view class="select_coupon" @click="onSelectTime">
 						<text>预约时间 <text class="red">*</text> </text>
 						<text>预约时间 <text class="red">*</text> </text>
 						<view class="right" v-if="preferential>0">-{{preferential}}元
 						<view class="right" v-if="preferential>0">-{{preferential}}元
 							<image src="/static/identify/more.png" mode="" />
 							<image src="/static/identify/more.png" mode="" />
@@ -130,352 +130,334 @@
 			</view>
 			</view>
 		</view>
 		</view>
 
 
-		<selectTime @dateSend="onSelect" v-if="isSelectDate" />
+		<ServiceTimePicker
+            ref="stp"
+            startHour="09:00"
+            endHour="21:00"
+            :duration="120"
+            :bookedTimes="bookedTimes"
+            @confirm="onTimeConfirm"
+        ></ServiceTimePicker>
 	</view>
 	</view>
-
 </template>
 </template>
 
 
 <script>
 <script>
-	import wx from 'weixin-js-sdk'
-	import selectTime from '@/components/date/select_time.vue'
-	import {
-		orderDeatails,
-		getInfo,
-		payoff,
-		pay,
-		getSignature,
-		getCoupon,
-		getFareSetting,
-		verification
-	} from '@/api/index.js'
-	export default {
-		components: {
-			selectTime
-		},
-		data() {
-			return {
-				form: {
-					dMoney: 0,
-					cOpenId: uni.getStorageSync('wx_copenid'),
-				},
-				query: {},
-				details: {},
-				// 变量
-				orderType: '',
-				dBalance: 0, //账户余额
-				dTotalMoney: 0,
-				totalPrice: '', //总金额
-				preferential: '', //优惠金额
-				priceDifference: '', //升级差价
-				// 交通费
-				baseFare: '', //起步价
-				baseDistance: '', //起步距离
-				additionalFarePer: '', //超出费用
-				// 优惠劵
-				couponId: '',
-				couponNum: 0,
-				couponReceiveId: '', //优惠券id
-				// 服务时间
-				isSelectDate: false,
-				// 支付计时
-				remainingTime: '',
-				// 支付方式 
-				selectedPayment: null, 
+import wx from 'weixin-js-sdk';
+import ServiceTimePicker from '@/components/picker/service-time.vue';
+import {
+	orderDeatails,
+	getInfo,
+	payoff,
+	pay,
+	getSignature,
+	getCoupon,
+	getFareSetting,
+	verification
+} from '@/api/index.js';
+export default {
+	components: {
+		ServiceTimePicker
+	},
+	data() {
+		return {
+			form: {
+				dMoney: 0,
+				cOpenId: uni.getStorageSync('wx_copenid'),
+			},
+			query: {},
+			details: {},
+			// 变量
+			orderType: '',
+			dBalance: 0, //账户余额
+			dTotalMoney: 0,
+			totalPrice: '', //总金额
+			preferential: '', //优惠金额
+			priceDifference: '', //升级差价
+			// 交通费
+			baseFare: '', //起步价
+			baseDistance: '', //起步距离
+			additionalFarePer: '', //超出费用
+			// 优惠劵
+			couponId: '',
+			couponNum: 0,
+			couponReceiveId: '', //优惠券id
+			// 服务时间
+			bookedTimes: [
+				// { start: '2026-01-03 19:00', end: '2026-01-03 20:00' }
+			],
+			// 支付计时
+			remainingTime: '',
+			// 支付方式 
+			selectedPayment: null, 
+		}
+	},
+	onLoad(query) {
+		this.query = query;
+
+		wx.checkJsApi({
+			jsApiList: ['chooseImage'], 
+			success: (res) => {
+				// 以键值对的形式返回,可用的api值true,不可用为false
+				// 如:{"checkResult":{"chooseImage":true},"errMsg":"checkJsApi:ok"}
 			}
 			}
+		});
+	},
+	onShow() {
+		this.getInfo()
+		this.getOrder()
+		this.getCoupon()
+
+		let couponData = uni.getStorageSync('couponData');
+		if (couponData) {
+			this.couponId = couponData.id
+			this.verification()
+		}
+	},
+	methods: {
+		getInfo() {
+			getInfo().then(res => {
+				this.dBalance = res.data.data.dBalance.toFixed(2)
+			})
 		},
 		},
-		onLoad(query) {
-			this.query = query;
-
-			wx.checkJsApi({
-				jsApiList: ['chooseImage'], 
-				success: (res) => {
-					// 以键值对的形式返回,可用的api值true,不可用为false
-					// 如:{"checkResult":{"chooseImage":true},"errMsg":"checkJsApi:ok"}
+		getCoupon() {
+			let params = {
+				openid: uni.getStorageSync('wx_copenid')
+			}
+			getCoupon(params).then(res => {
+				if (res.data.data.length > 0) {
+					this.couponNum = res.data.data.length
+				} else {
+					this.couponNum = 0
 				}
 				}
-			});
+			})
 		},
 		},
-		onShow() {
-			this.getInfo()
-			this.getOrder()
-			this.getCoupon()
-
-			let couponData = uni.getStorageSync('couponData');
-			if (couponData) {
-				this.couponId = couponData.id
-				this.verification()
+		getOrder() {
+			let params = {
+				orderNo: this.query.orderNo,
+				couponReceiveId: this.couponId
 			}
 			}
-		},
-		methods: {
-			getInfo() {
-				getInfo().then(res => {
-					this.dBalance = res.data.data.dBalance.toFixed(2)
-				})
-			},
-			getCoupon() {
-				let params = {
-					openid: uni.getStorageSync('wx_copenid')
-				}
-				getCoupon(params).then(res => {
-					if (res.data.data.length > 0) {
-						this.couponNum = res.data.data.length
-					} else {
-						this.couponNum = 0
+			orderDeatails(params).then(res => {
+				console.log(res)
+				if (res.data.code === 200) {
+					this.details = {
+						...res.data.data.records[0],
+						distance: res.data.data.records[0].distance.toFixed(2)
 					}
 					}
-				})
-			},
-			getOrder() {
-				let params = {
-					orderNo: this.query.orderNo,
-					couponReceiveId: this.couponId
+					// 这四个值相关 orderType 2: 现金
+					this.orderType = this.details.orderType;
+					this.totalPrice = this.details.totalPrice;
+					this.dTotalMoney = this.details.dTotalMoney;
+					this.priceDifference = this.details.priceDifference;
+					// 支付倒计时
+					this.remainingTime = res.data.data.records[0].remainingTime;
+					// 获取部门车费
+					this.fareSetting(res.data.data.records[0].deptId);
 				}
 				}
-				orderDeatails(params).then(res => {
-					console.log(res)
-					if (res.data.code === 200) {
-						this.details = {
-							...res.data.data.records[0],
-							distance: res.data.data.records[0].distance.toFixed(2)
-						}
-						// 这四个值相关 orderType 2: 现金
-						this.orderType = this.details.orderType;
-						this.totalPrice = this.details.totalPrice;
-						this.dTotalMoney = this.details.dTotalMoney;
-						this.priceDifference = this.details.priceDifference;
-						// 支付倒计时
-						this.remainingTime = res.data.data.records[0].remainingTime;
-						// 获取部门车费
-						this.fareSetting(res.data.data.records[0].deptId);
-					}
+			})
+		},
+		// 获取部门车费
+		fareSetting(id) {
+			let params = {
+				deptId: id,
+				enable: 1
+			}
+			getFareSetting(params).then(res => {
+				this.baseFare = res.data.data.records[0].baseFare
+				this.baseDistance = res.data.data.records[0].baseDistance
+				this.additionalFarePer = res.data.data.records[0].additionalFarePer
+			})
+		},
+		// 服务时间
+		onSelectTime() {
+            this.$refs.stp.show = true;
+		},
+		onTimeConfirm(e) {
+			console.log(e)
+		},
+		onRefresh() {
+			this.remainingTime = 0
+		},
+		selectCoupon() {
+			if (this.remainingTime > 0) {
+				uni.navigateTo({
+					url: '/pages/my/coupon?title=select'
 				})
 				})
-			},
-			// 获取部门车费
-			fareSetting(id) {
-				let params = {
-					deptId: id,
-					enable: 1
-				}
-				getFareSetting(params).then(res => {
-					this.baseFare = res.data.data.records[0].baseFare
-					this.baseDistance = res.data.data.records[0].baseDistance
-					this.additionalFarePer = res.data.data.records[0].additionalFarePer
+			} else {
+				uni.showToast({
+					title: '已过期,请重新下单',
+					icon: 'none'
 				})
 				})
-			},
-			onSelect(e) {
-				console.log(e)
-				this.isSelectDate = false
-			},
-			onRefresh() {
-				this.remainingTime = 0
-			},
-			selectCoupon() {
-				if (this.remainingTime > 0) {
-					uni.navigateTo({
-						url: '/pages/my/coupon?title=select'
-					})
-				} else {
-					uni.showToast({
-						title: '已过期,请重新下单',
-						icon: 'none'
-					})
-				}
-			},
-			changeAddress(id) {
-				let str = uni.$u.queryParams({
-					name: '支付订单',
-					orderNo: id
-				});
-				uni.navigateTo({
-					url: `/pages/address/index${str}`
+			}
+		},
+		changeAddress(id) {
+			let str = uni.$u.queryParams({
+				name: '支付订单',
+				orderNo: id
+			});
+			uni.navigateTo({
+				url: `/pages/address/index${str}`
+			})
+		},
+		//选择支付方式
+		onRadioChange(e) {
+			this.selectedPayment = e.target.value
+		},
+		// 支付
+		goPay() {
+			this.form.dMoney = this.totalPrice
+			if (this.remainingTime == 0) {
+				uni.showToast({
+					title: '订单已过期',
+					icon: 'none'
 				})
 				})
-			},
-			//选择支付方式
-			onRadioChange(e) {
-				this.selectedPayment = e.target.value
-			},
-			// 支付
-			goPay() {
-				this.form.dMoney = this.totalPrice
-				if (this.remainingTime == 0) {
-					uni.showToast({
-						title: '订单已过期',
-						icon: 'none'
-					})
-					return;
-				}
-				if (this.selectedPayment == null) {
-					uni.showToast({
-						title: '请选择支付方式',
-						icon: 'none'
-					})
-				} else if (this.selectedPayment == 1) {
-					//微信支付 
-					this.weixinPay()
-				} else if (this.selectedPayment == 2) {
-					//余额支付
-					this.nowYuyue()
-				} else if (this.selectedPayment == 3){
-					this.rmbPay()
-				}
-			},
-			//微信支付
-			weixinPay() {
-				let params = {
-					cId: this.details.cId,
-					payType: this.selectedPayment,
-					couponReceiveId: this.couponReceiveId,
-					preferential: this.preferential, //优惠金额
-					totalPrice: this.totalPrice, //总金额
-				}
-				let url = 'https://test.baoxianzhanggui.com/fragrance/'
-				payoff(params).then(res => {
-					let payConfig = JSON.parse(res.data.data)
-					getSignature(url).then(res => {
-						this.wxconfig = res.data
-						wx.config({
-							beta: true,
-							debug: false,
-							appId: this.wxconfig.appId, // 公众号ID 
-							// appId: uni.getAppBaseInfo().host.appId, // 公众号ID 
-							timestamp: this.wxconfig.timestamp, // 时间戳,自1970年以来的秒数
-							nonceStr: this.wxconfig.nonceStr, // 随机串
-							signature: this.wxconfig.sign, // 微信签名方式
-							jsApiList: ['getBrandWCPayRequest']
-						});
-						var vm = this
-						wx.invoke(
-							'getBrandWCPayRequest', 
-							// 下面参数内容都是后台返回的
-							{ 
-								'appId': payConfig.appid, // 公众号名称,由商户传入
-								'timeStamp': payConfig.timeStamp, // 时间戳
-								'nonceStr': payConfig.nonceStr, // 随机串
-								'package': payConfig.package, // 预支付id
-								'signType': payConfig.signType, // 微信签名方式
-								'paySign': payConfig.paySign, // 微信签名
-							},
-							function(res) {
-								// 使用以上方式判断前端返回,微信团队郑重提示:res.err_msg将在用户支付成功后返回ok,但并不保证它绝对可靠。
-
-								// JSON.stringify(res);
-								if (res.err_msg == "get_brand_wcpay_request:ok") {
-
-									vm.$message.success(
-										"支付成功") // 使用alert来弹窗 支付成功  是没有反应的。所以这里改为框架页面的弹窗就好了。注意必须要上这个微信浏览器内置事件外 转this指向才能弹窗
-									// vm.isDisabledSubmitBtn = false;
-									uni.switchTab({
-										url: '../order/order',
-									})
-								} else if (res.err_msg == "get_brand_wcpay_request:cancel") {
-									uni.showToast({
-										title: '已取消支付',
-										icon: 'none'
-									})
-									// alert('支付取消');
-									// vm.isDisabledSubmitBtn = false;
-
-								} else {
-									alert('付款失败');
-									// vm.isDisabledSubmitBtn = false;
-								}
-							}
-						)
-					})
+				return;
+			}
+			if (this.selectedPayment == null) {
+				uni.showToast({
+					title: '请选择支付方式',
+					icon: 'none'
 				})
 				})
-			},
-			//拉取微信支付的方法
-			pullWchatPay(data) {
-				var that = this;
-				let onBridgeReady = () => {
-					if (WeixinJSBridge && appId) {
-						WeixinJSBridge.invoke(
-							'getBrandWCPayRequest', {
-								appId: data.appId,
-								nonceStr: data.nonceStr,
-								package: data.package,
-								paySign: data.paySign,
-								signType: data.signType,
-								timeStamp: data.timeStamp
-							},
-							function(res) {
-								console.log('调起支付时的警告');
-								if (res.err_msg === 'get_brand_wcpay_request:ok') {
-									_this.payType = 0;
-									console.log('支付成功回调')
-								} else {
-									console.log('支付失败')
-								}
-							}
-						)
-					}
-				}
-				// 检测支付环境中的 WeixinJSBridge
-				if (typeof WeixinJSBridge == "undefined") {
-					if (document.addEventListener) {
-						//android机型,调取支付支付环境偶尔有延迟,这里增加延时器处理
-						var timev = setTimeout(() => {
-							clearTimeout(timev)
-							document.addEventListener('WeixinJSBridgeReady', onBridgeReady(),
-								false);
-						}, 1000)
-					} else if (document.attachEvent) {
-						document.attachEvent('WeixinJSBridgeReady', onBridgeReady());
-						document.attachEvent('onWeixinJSBridgeReady', onBridgeReady());
-					}
-				} else {
-					onBridgeReady();
-				}
-			},
-			//账号余额支付
-			nowYuyue() {
-				if (parseInt(this.dBalance) < parseInt(this.totalPrice)) {
-					uni.showModal({
-						title: '账户余额不足',
-						content: '请充值',
-						success: function(res) {
-							if (res.confirm) {
-								uni.navigateTo({
-									url: '../my/pay?name=充值'
-								})
-							} else if (res.cancel) {}
-						}
+			} else if (this.selectedPayment == 1) {
+				//微信支付 
+				this.weixinPay()
+			} else if (this.selectedPayment == 2) {
+				//余额支付
+				this.nowYuyue()
+			} else if (this.selectedPayment == 3){
+				this.rmbPay()
+			}
+		},
+		//微信支付
+		weixinPay() {
+			let params = {
+				cId: this.details.cId,
+				payType: this.selectedPayment,
+				couponReceiveId: this.couponReceiveId,
+				preferential: this.preferential, //优惠金额
+				totalPrice: this.totalPrice, //总金额
+			}
+			let url = 'https://test.baoxianzhanggui.com/fragrance/'
+			payoff(params).then(res => {
+				let payConfig = JSON.parse(res.data.data)
+				getSignature(url).then(res => {
+					this.wxconfig = res.data
+					wx.config({
+						beta: true,
+						debug: false,
+						appId: this.wxconfig.appId, // 公众号ID 
+						// appId: uni.getAppBaseInfo().host.appId, // 公众号ID 
+						timestamp: this.wxconfig.timestamp, // 时间戳,自1970年以来的秒数
+						nonceStr: this.wxconfig.nonceStr, // 随机串
+						signature: this.wxconfig.sign, // 微信签名方式
+						jsApiList: ['getBrandWCPayRequest']
 					});
 					});
-				} else {
-					var data = {
-						cId: this.details.cId,
-						payType: this.selectedPayment,
-						couponReceiveId: this.couponReceiveId,
-						preferential: this.preferential, //优惠金额
-						totalPrice: this.totalPrice, //总金额
-					}
-					payoff(data).then(res => {
-						if (res.data.code == 200) {
-							uni.showToast({
-								title: '支付成功!',
-							})
-							setTimeout(() => {
+					var vm = this
+					wx.invoke(
+						'getBrandWCPayRequest', 
+						// 下面参数内容都是后台返回的
+						{ 
+							'appId': payConfig.appid, // 公众号名称,由商户传入
+							'timeStamp': payConfig.timeStamp, // 时间戳
+							'nonceStr': payConfig.nonceStr, // 随机串
+							'package': payConfig.package, // 预支付id
+							'signType': payConfig.signType, // 微信签名方式
+							'paySign': payConfig.paySign, // 微信签名
+						},
+						function(res) {
+							// 使用以上方式判断前端返回,微信团队郑重提示:res.err_msg将在用户支付成功后返回ok,但并不保证它绝对可靠。
+
+							// JSON.stringify(res);
+							if (res.err_msg == "get_brand_wcpay_request:ok") {
+
+								vm.$message.success(
+									"支付成功") // 使用alert来弹窗 支付成功  是没有反应的。所以这里改为框架页面的弹窗就好了。注意必须要上这个微信浏览器内置事件外 转this指向才能弹窗
+								// vm.isDisabledSubmitBtn = false;
 								uni.switchTab({
 								uni.switchTab({
 									url: '../order/order',
 									url: '../order/order',
 								})
 								})
-							}, 2000)
-						} else {
-							uni.showToast({
-								icon: 'error',
-								title: res.data.msg,
-							})
-						}
+							} else if (res.err_msg == "get_brand_wcpay_request:cancel") {
+								uni.showToast({
+									title: '已取消支付',
+									icon: 'none'
+								})
+								// alert('支付取消');
+								// vm.isDisabledSubmitBtn = false;
 
 
-					})
+							} else {
+								alert('付款失败');
+								// vm.isDisabledSubmitBtn = false;
+							}
+						}
+					)
+				})
+			})
+		},
+		//拉取微信支付的方法
+		pullWchatPay(data) {
+			var that = this;
+			let onBridgeReady = () => {
+				if (WeixinJSBridge && appId) {
+					WeixinJSBridge.invoke(
+						'getBrandWCPayRequest', {
+							appId: data.appId,
+							nonceStr: data.nonceStr,
+							package: data.package,
+							paySign: data.paySign,
+							signType: data.signType,
+							timeStamp: data.timeStamp
+						},
+						function(res) {
+							console.log('调起支付时的警告');
+							if (res.err_msg === 'get_brand_wcpay_request:ok') {
+								_this.payType = 0;
+								console.log('支付成功回调')
+							} else {
+								console.log('支付失败')
+							}
+						}
+					)
 				}
 				}
-			},
-			//现金支付
-			rmbPay(){
-				let params = {
+			}
+			// 检测支付环境中的 WeixinJSBridge
+			if (typeof WeixinJSBridge == "undefined") {
+				if (document.addEventListener) {
+					//android机型,调取支付支付环境偶尔有延迟,这里增加延时器处理
+					var timev = setTimeout(() => {
+						clearTimeout(timev)
+						document.addEventListener('WeixinJSBridgeReady', onBridgeReady(),
+							false);
+					}, 1000)
+				} else if (document.attachEvent) {
+					document.attachEvent('WeixinJSBridgeReady', onBridgeReady());
+					document.attachEvent('onWeixinJSBridgeReady', onBridgeReady());
+				}
+			} else {
+				onBridgeReady();
+			}
+		},
+		//账号余额支付
+		nowYuyue() {
+			if (parseInt(this.dBalance) < parseInt(this.totalPrice)) {
+				uni.showModal({
+					title: '账户余额不足',
+					content: '请充值',
+					success: function(res) {
+						if (res.confirm) {
+							uni.navigateTo({
+								url: '../my/pay?name=充值'
+							})
+						} else if (res.cancel) {}
+					}
+				});
+			} else {
+				var data = {
 					cId: this.details.cId,
 					cId: this.details.cId,
 					payType: this.selectedPayment,
 					payType: this.selectedPayment,
 					couponReceiveId: this.couponReceiveId,
 					couponReceiveId: this.couponReceiveId,
 					preferential: this.preferential, //优惠金额
 					preferential: this.preferential, //优惠金额
 					totalPrice: this.totalPrice, //总金额
 					totalPrice: this.totalPrice, //总金额
 				}
 				}
-				payoff(params).then(res => {
+				payoff(data).then(res => {
 					if (res.data.code == 200) {
 					if (res.data.code == 200) {
 						uni.showToast({
 						uni.showToast({
 							title: '支付成功!',
 							title: '支付成功!',
@@ -491,28 +473,57 @@
 							title: res.data.msg,
 							title: res.data.msg,
 						})
 						})
 					}
 					}
-				
+
 				})
 				})
-			},
-			verification() {
-				let params = {
-					cId: this.details.cId,
-					couponReceiveId: this.couponId
-				}
-				verification(params).then(res => {
-					if (res.data.msg == '不满足优惠券门槛金额') {
-						uni.showToast({
-							title: res.data.msg,
-							icon: 'none'
+			}
+		},
+		//现金支付
+		rmbPay(){
+			let params = {
+				cId: this.details.cId,
+				payType: this.selectedPayment,
+				couponReceiveId: this.couponReceiveId,
+				preferential: this.preferential, //优惠金额
+				totalPrice: this.totalPrice, //总金额
+			}
+			payoff(params).then(res => {
+				if (res.data.code == 200) {
+					uni.showToast({
+						title: '支付成功!',
+					})
+					setTimeout(() => {
+						uni.switchTab({
+							url: '../order/order',
 						})
 						})
-					}
-					this.couponReceiveId = res.data.data.couponReceiveId
-					this.preferential = res.data.data.preferential
-					this.totalPrice = res.data.data.totalPrice
-				})
-			},
-		}
+					}, 2000)
+				} else {
+					uni.showToast({
+						icon: 'error',
+						title: res.data.msg,
+					})
+				}
+			
+			})
+		},
+		verification() {
+			let params = {
+				cId: this.details.cId,
+				couponReceiveId: this.couponId
+			}
+			verification(params).then(res => {
+				if (res.data.msg == '不满足优惠券门槛金额') {
+					uni.showToast({
+						title: res.data.msg,
+						icon: 'none'
+					})
+				}
+				this.couponReceiveId = res.data.data.couponReceiveId
+				this.preferential = res.data.data.preferential
+				this.totalPrice = res.data.data.totalPrice
+			})
+		},
 	}
 	}
+}
 </script>
 </script>
 
 
 <style lang="scss" scoped>
 <style lang="scss" scoped>

+ 5 - 3
src/pages/index/details.vue

@@ -154,10 +154,12 @@
 	import {
 	import {
 		projectDetails,
 		projectDetails,
 		engineerDetails,
 		engineerDetails,
-		addList,
 		addOrder,
 		addOrder,
 		engineer
 		engineer
-	} from '../../api/index'
+	} from '@/api/index'
+	import {
+		getAddrList,
+	} from '@/api/address';
 	export default {
 	export default {
 		data() {
 		data() {
 			return {
 			return {
@@ -351,7 +353,7 @@
 				var data = {
 				var data = {
 					openId: uni.getStorageSync('wx_copenid'),
 					openId: uni.getStorageSync('wx_copenid'),
 				}
 				}
-				addList(data).then(res => {
+				getAddrList(data).then(res => {
 					if (res.data.data[0]) {
 					if (res.data.data[0]) {
 						this.isAddress = true
 						this.isAddress = true
 					} else {
 					} else {

+ 0 - 423
src/pages/join/first_join.vue

@@ -1,423 +0,0 @@
-<template>
-	<view class="join">
-		<view class="banner">
-			<image src="../../static/other/banner.png" mode=""></image>
-		</view>
-		<view class="top">
-			<view class="content">
-				<view class="page-section">
-					<view class="name">您的姓名</view>
-					<view class="inp">
-						<!-- <input class="weui-input" v-model="form.cName" placeholder="请输入姓名,最多四个字" /> -->
-						<u-input v-model="form.cName" :type="type" placeholder="输入您的姓名" maxlength='4' />
-					</view>
-				</view>
-				<view class="page-section">
-					<view class="name">您的性别</view>
-					<u-radio-group v-model="form.nSex">
-						<u-radio v-for="(item, index) in sex" :key="index" 
-							:name="item.value" :label="item.label" 
-							:customStyle="{ margin: '0 12rpx' }"
-						/>
-					</u-radio-group>
-				</view>
-				<view class="page-section">
-					<view class="name">手机号:</view>
-					<view class="inp">
-						<!-- <input class="weui-input" v-model="form.cPhone" placeholder="请输入手机号" /> -->
-						<u-input v-model="form.cPhone" placeholder="请输入手机号" maxlength='11' />
-					</view>
-				</view>
-				<view class="page-section">
-					<view class="name">入驻城市</view>
-					<view class="inp select" @click="show = true">
-						<text>{{form.city}}</text>
-						<img src="../../static/identify/down.png" alt="" />
-						<!-- <view class="city" @click="selectCity" v-if="form.city == ''">
-							入驻城市
-						</view>
-						<view class="city" @click="selectCity" v-else>
-							{{form.city}}
-						</view> -->
-						<!-- 	<view class="city" v-if="form.city == ''">
-							选择所在城市(自动定位)
-						</view> -->
-						<!-- <view class="city" v-else  @click="goCity"> -->
-						<!-- <view class="city" v-else>
-							{{form.city}}市
-						</view> -->
-						<!-- <input class="weui-input" v-model="form.cNickName" placeholder="请输入昵称" /> -->
-						<!-- <u-input v-model="form.cNickName" :type="type" placeholder="请输入昵称" maxlength = '4'/> -->
-					</view>
-					<u-picker :show="show" :columns="[cityList]" keyName="label" 
-						@cancel="show = false" @confirm="onSelect"
-					></u-picker>
-				</view>
-				<!-- <view class="page-section">
-					<view class="name">您所在的位置:</view>
-					<view class="weui-cells weui-cells_after-title location" @click="getAddress">
-						<text class="point" v-if="!form.address">请选择</text>
-						<text class="point active" v-else>{{form.address}}{{form.name}}</text>
-					</view>
-				</view> -->
-				<view class="updata" style="border:0;">
-					<view class="name">工作形象照</view>
-					<view class="title">
-						请上传本人近期照片,图片大小不超过10M (建议清晰正脸照)
-					</view>
-					<view class="images">
-						<Upload
-							:maxCount="2"
-							@fileList="onUpload($event, 'cImgList')"
-						/>
-					</view>
-				</view>
-				
-			</view>
-			<view class="submits">
-				<text>平台不会通过任何渠道泄漏你的个人信息,请放心输入</text>
-				<view class="btn" @click="submit">
-					申请成为商户
-				</view>
-			</view>
-		</view>
-	</view>
-</template>
-
-<script>
-	import {
-		addEngineer,
-		project,
-		getInfo,
-		imgUpload,
-		getCityList
-	} from '../.././api/index.js'
-	import Upload from '@/components/upload/index.vue';
-	export default {
-		components: {
-			Upload
-		},
-		data() {
-			return {
-				cityList: [],
-				show: false,
-				isLogin: false,
-				type: 'text',
-				isShow: false,
-				sex: [
-					{
-						value: 1,
-						label: '男'
-					},
-					{
-						value: 0,
-						label: '女'
-					}
-				],
-				form: {
-					id: '',
-					cName: '',
-					cNickName: '',
-					cPortrait: '',
-					cPhone: '',
-					cJianjie: '',
-					nSex: 0,
-					cSfzImg: [],
-					cImgList: [],
-					latitude: '',
-					longitude: '',
-					name: '0',
-					address: '',
-					cOpenId: '',
-					cBhList: '',
-					city: '请选择'
-				},
-				token: '',
-			}
-		},
-		onLoad() {
-			uni.getStorage({
-				key: 'access-token',
-				success() {
-					this.isLogin = true
-				}
-			})
-		},
-		onShow() {
-			this.getinfo()
-			this.getCity()
-
-			// let city = uni.getStorageSync('selectCity')
-			// let lastCity = city.charAt(city.length - 1)
-			// lastCity == '市' ? this.form.city = city.slice(0, -1) : this.form.city = city
-			// this.form.city = uni.getStorageSync('selectCity')
-		},
-		methods: {
-			// upload事件
-			onUpload(e, t) {
-				this.form[t] = e.map(item => item.url);
-			},
-			goCity() {
-				uni.navigateTo({
-					url: '/pages/identify/city?type=' + 'indent'
-				})
-			},
-			getAddress() {
-				uni.chooseLocation({
-					success: res => {
-						this.form.name = res.name;
-						this.form.latitude = res.latitude;
-						this.form.longitude = res.longitude;
-						// this.form.address = res.address
-					}
-				});
-			},
-			getinfo() {
-				getInfo().then(res => {
-					if (res.data.code == 200) {
-						this.isLogin = true
-						// this.info = res.data.data,
-						// this.dBalance = res.data.data.dBalance.toFixed(2)
-					} else if (res.data.code == 401) {
-						uni.showModal({
-							title: '请先登录!',
-							success: (res) => {
-								if (res.confirm) {
-									uni.switchTab({
-										url: '/pages/my/my'
-									})
-								} else if (res.cancel) {
-									return
-								}
-							}
-						})
-					}
-				})
-			},
-			//提交
-			submit() {
-				// var openids = uni.getStorageSync('wx_copenid')
-				// this.form.cOpenId = openids
-				// this.form.cAddress =this.form.cAddress
-				// this.form.cSfzImg = this.idCard
-				// that.data.form.cBhList = that.data.form.cBhList.join(", ")
-				if (this.form.cName == '') {
-					uni.showToast({
-						title: '请输入您的姓名',
-						icon: 'none'
-					})
-					return
-				}
-				if (!/^1[3456789]\d{9}$/.test(this.form.cPhone)) {
-					uni.showToast({
-						title: '请输入正确的手机号',
-						icon: 'none'
-					});
-					return;
-				}
-				if (this.form.city == '') {
-					uni.showToast({
-						title: '请选择所在城市',
-						icon: 'none'
-					});
-					return
-				}
-				if (this.form.cImgList.length < 1) {
-					uni.showToast({
-						title: '最少上传一张生活照片',
-						icon: 'none'
-					});
-					return
-				} else {
-					addEngineer(this.form).then(res => {
-						if (res.data.code == 200) {
-							uni.showToast({
-								title: "申请成功",
-							})
-							setTimeout(() => {
-								uni.navigateBack()
-							}, 1000)
-						} else if (res.data.code == 401) {
-							uni.showModal({
-								title: '请先登录!',
-								success: (res) => {
-									if (res.confirm) {
-										uni.switchTab({
-											url: '/pages/my/my'
-										})
-									} else if (res.cancel) {
-										return
-									}
-
-								}
-							})
-						} else {
-							uni.showToast({
-								title: res.data.msg,
-								icon: 'none'
-							})
-						}
-					})
-				}
-			},
-			getCity() {
-				getCityList().then(res => {
-					this.cityList = res.data.data.map(({
-						deptId,
-						deptName
-					}) => ({
-						value: deptId,
-						label: deptName
-					}))
-				});
-			},
-			selectCity() {
-				this.show = true
-			},
-			onSelect(e) {
-				this.form.city = e.value[0].label
-				this.form.deptId = e.value[0].value
-			},
-		},
-		mounted() {
-			this.token = uni.getStorageSync('access-token'); // 假设token保存在本地缓存中
-		}
-	}
-</script>
-
-<style lang="scss" scoped>
-	::v-deep .uni-input-wrapper {
-		width: 150px;
-		text-align: right;
-	}
-
-	::v-deep .u-input__input {
-		min-height: 14px !important;
-	}
-
-	.join {
-		width: 100%;
-
-		.banner {
-			width: 100%;
-			height: 424rpx;
-
-			image {
-				width: 100%;
-				height: 100%;
-			}
-		}
-
-		.top {
-			width: 100%;
-			height: 100px;
-			padding: 32rpx;
-			box-sizing: border-box;
-			margin-top: 44rpx;
-			background-color: #FDFDFD;
-
-			.content {
-				width: 100%;
-				height: auto;
-				padding: 24rpx 32rpx;
-				box-sizing: border-box;
-				background: #FFFFFF;
-				box-shadow: 0px 4px 12px 0px rgba(209, 168, 88, 0.1);
-				border-radius: 24px 24px 24px 24px;
-
-				.page-section {
-					width: 100%;
-					 margin-bottom: 32rpx;
-					// height: 80rpx;
-					// padding: 20rpx 0px;
-					// display: flex;
-					// align-items: center;
-					// justify-content: space-between;
-					// border-bottom: 1px solid #ccc;
-					font-size: 28rpx;
-
-					.name {
-						width: 31%;
-					}
-
-					.inp {
-						width: 100%;
-						height: 64rpx;
-						border-radius: 8rpx 8rpx 8rpx 8rpx;
-						border: 2rpx solid #EEEEEE;
-						padding: 0px 24rpx;
-						box-sizing: border-box;
-						margin-top: 20rpx;
-						//
-						::v-deep .u-input {
-							width: 100% !important;
-							height: 100% !important;
-
-							.u-input__input {
-								width: 100% !important;
-								height: 100% !important;
-
-								.uni-input-wrapper {
-									width: 100% !important;
-									height: 100% !important;
-									text-align: left;
-								}
-							}
-						}
-					}
-					.select{
-						width: 100%;
-						display: flex;
-						justify-content: space-between;
-						align-items: center;
-						text{
-							width: auto;
-							color: #333333;
-						}
-						img{
-							width: 28rpx;
-							height: 28rpx;
-						}
-					}
-				}
-
-				.updata {
-					margin-top: 20rpx;
-					width: 100%;
-					font-size: 28rpx;
-
-					.images {
-						margin-top: 20rpx;
-					}
-					.title{
-						font-size: 22rpx;
-						color: #999999;
-					}
-				}
-
-			}
-
-			.submits {
-				width: 100%;
-				margin-top: 28rpx;
-				text{
-					display: block;
-					width: 100%;
-					text-align: center;
-					font-size: 22rpx;
-					color: #999999;
-				}
-				.btn {
-					width: 90%;
-					height: 84rpx;
-					text-align: center;
-					background: linear-gradient( 90deg, #BFA061 0%, #BD9961 100%);
-					border-radius: 14rpx 14rpx 14rpx 14rpx;
-					margin: 16rpx auto;
-					line-height: 84rpx;
-					color: #ffffff;
-				}
-			}
-		}
-	}
-</style>

+ 389 - 0
src/pages/join/staff.vue

@@ -0,0 +1,389 @@
+<template>
+	<view class="join">
+		<view class="banner">
+			<image src="/static/other/banner.png" mode=""></image>
+		</view>
+		<view class="top">
+			<view class="content">
+				<view class="page-section">
+					<view class="name">您的姓名</view>
+					<view class="inp">
+						<!-- <input class="weui-input" v-model="form.cName" placeholder="请输入姓名,最多四个字" /> -->
+						<u-input v-model="form.cName" :type="type" placeholder="输入您的姓名" maxlength='4' />
+					</view>
+				</view>
+				<view class="page-section">
+					<view class="name">您的性别</view>
+					<u-radio-group v-model="form.nSex">
+						<u-radio v-for="(item, index) in sex" :key="index" 
+							:name="item.value" :label="item.label" 
+							:customStyle="{ margin: '0 12rpx' }"
+						/>
+					</u-radio-group>
+				</view>
+				<view class="page-section">
+					<view class="name">手机号:</view>
+					<view class="inp">
+						<!-- <input class="weui-input" v-model="form.cPhone" placeholder="请输入手机号" /> -->
+						<u-input v-model="form.cPhone" placeholder="请输入手机号" maxlength='11' />
+					</view>
+				</view>
+				<view class="page-section">
+					<view class="name">入驻城市</view>
+					<view class="inp select" @click="show = true">
+						<text>{{form.city}}</text>
+						<img src="/static/identify/down.png" alt="" />
+						<!-- <view class="city" @click="selectCity" v-if="form.city == ''">
+							入驻城市
+						</view>
+						<view class="city" @click="selectCity" v-else>
+							{{form.city}}
+						</view> -->
+						<!-- 	<view class="city" v-if="form.city == ''">
+							选择所在城市(自动定位)
+						</view> -->
+						<!-- <view class="city" v-else  @click="goCity"> -->
+						<!-- <view class="city" v-else>
+							{{form.city}}市
+						</view> -->
+						<!-- <input class="weui-input" v-model="form.cNickName" placeholder="请输入昵称" /> -->
+						<!-- <u-input v-model="form.cNickName" :type="type" placeholder="请输入昵称" maxlength = '4'/> -->
+					</view>
+					<u-picker :show="show" :columns="[cityList]" keyName="label" 
+						@cancel="show = false" @confirm="onSelect"
+					></u-picker>
+				</view>
+				<!-- <view class="page-section">
+					<view class="name">您所在的位置:</view>
+					<view class="weui-cells weui-cells_after-title location" @click="getAddress">
+						<text class="point" v-if="!form.address">请选择</text>
+						<text class="point active" v-else>{{form.address}}{{form.name}}</text>
+					</view>
+				</view> -->
+				<view class="updata" style="border:0;">
+					<view class="name">工作形象照</view>
+					<view class="title">
+						请上传本人近期照片,图片大小不超过10M (建议清晰正脸照)
+					</view>
+					<view class="images">
+						<Upload
+							:maxCount="2"
+							@fileList="onUpload($event, 'cImgList')"
+						/>
+					</view>
+				</view>
+			</view>
+
+			<view class="submits">
+				<text>平台不会通过任何渠道泄漏你的个人信息,请放心输入</text>
+				<view class="btn" @click="submit">
+					申请成为商户
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+import {
+	getInfo,
+	getCityList,
+} from '@/api/index';
+import {
+	netStaffAdd,
+} from '@/api/staff';
+import Upload from '@/components/upload/index.vue';
+export default {
+	components: {
+		Upload
+	},
+	data() {
+		return {
+			cityList: [],
+			show: false,
+			isLogin: false,
+			type: 'text',
+			isShow: false,
+			sex: [
+				{
+					value: 1,
+					label: '男'
+				},
+				{
+					value: 0,
+					label: '女'
+				}
+			],
+			form: {
+				id: '',
+				cName: '',
+				cNickName: '',
+				cPortrait: '',
+				cPhone: '',
+				cJianjie: '',
+				nSex: 0,
+				cSfzImg: [],
+				cImgList: [],
+				latitude: '',
+				longitude: '',
+				name: '0',
+				address: '',
+				cOpenId: '',
+				cBhList: '',
+				city: '请选择'
+			},
+			token: '',
+		}
+	},
+	onLoad() {
+		this.isLogin = !!uni.getStorageSync('access-token');
+	},
+	onShow() {
+		this.getinfo()
+		this.getCity()
+
+		// let city = uni.getStorageSync('selectCity')
+		// let lastCity = city.charAt(city.length - 1)
+		// lastCity == '市' ? this.form.city = city.slice(0, -1) : this.form.city = city
+		// this.form.city = uni.getStorageSync('selectCity')
+	},
+	methods: {
+		// upload事件
+		onUpload(e, t) {
+			this.form[t] = e.map(item => item.url);
+		},
+		goCity() {
+			uni.navigateTo({
+				url: '/pages/identify/city?type=' + 'indent'
+			})
+		},
+		getAddress() {
+			uni.chooseLocation({
+				success: res => {
+					this.form.name = res.name;
+					this.form.latitude = res.latitude;
+					this.form.longitude = res.longitude;
+					// this.form.address = res.address
+				}
+			});
+		},
+		getinfo() {
+			getInfo().then(res => {
+				if (res.data.code == 200) {
+					this.isLogin = true
+					// this.info = res.data.data,
+					// this.dBalance = res.data.data.dBalance.toFixed(2)
+				} else if (res.data.code == 401) {
+					uni.showModal({
+						title: '请先登录!',
+						success: (res) => {
+							if (res.confirm) {
+								uni.switchTab({
+									url: '/pages/my/my'
+								})
+							} else if (res.cancel) {
+								return
+							}
+						}
+					})
+				}
+			})
+		},
+		//提交
+		submit() {
+			// var openids = uni.getStorageSync('wx_copenid')
+			// this.form.cOpenId = openids
+			// this.form.cAddress =this.form.cAddress
+			// this.form.cSfzImg = this.idCard
+			// that.data.form.cBhList = that.data.form.cBhList.join(", ")
+			if (this.form.cName == '') {
+				uni.showToast({
+					title: '请输入您的姓名',
+					icon: 'none'
+				})
+				return
+			}
+			if (!/^1[3456789]\d{9}$/.test(this.form.cPhone)) {
+				uni.showToast({
+					title: '请输入正确的手机号',
+					icon: 'none'
+				});
+				return;
+			}
+			if (this.form.city == '') {
+				uni.showToast({
+					title: '请选择所在城市',
+					icon: 'none'
+				});
+				return
+			}
+			if (this.form.cImgList.length < 1) {
+				uni.showToast({
+					title: '最少上传一张生活照片',
+					icon: 'none'
+				});
+				return
+			} else {
+				netStaffAdd(this.form).then(res => {
+					if (res.data.code == 200) {
+						uni.showToast({
+							title: "申请成功",
+						})
+						setTimeout(() => {
+							uni.navigateBack()
+						}, 1000)
+					} else if (res.data.code == 401) {
+						uni.showModal({
+							title: '请先登录!',
+							success: (res) => {
+								if (res.confirm) {
+									uni.switchTab({
+										url: '/pages/my/my'
+									})
+								} else if (res.cancel) {
+									return
+								}
+
+							}
+						})
+					} else {
+						uni.showToast({
+							title: res.data.msg,
+							icon: 'none'
+						})
+					}
+				})
+			}
+		},
+		getCity() {
+			getCityList().then(res => {
+				this.cityList = res.data.data.map(({
+					deptId,
+					deptName
+				}) => ({
+					value: deptId,
+					label: deptName
+				}))
+			});
+		},
+		selectCity() {
+			this.show = true
+		},
+		onSelect(e) {
+			this.form.city = e.value[0].label
+			this.form.deptId = e.value[0].value
+		},
+	},
+	mounted() {
+		this.token = uni.getStorageSync('access-token'); // 假设token保存在本地缓存中
+	}
+}
+</script>
+
+<style lang="scss" scoped>
+.join {
+	min-height: 100vh;
+
+	.banner {
+		width: 100%;
+		height: 424rpx;
+
+		image {
+			width: 100%;
+			height: 100%;
+		}
+	}
+
+	.top {
+		width: 100%;
+		height: 100px;
+		padding: 32rpx;
+		box-sizing: border-box;
+		margin-top: 44rpx;
+		background-color: #FDFDFD;
+
+		.content {
+			width: 100%;
+			height: auto;
+			padding: 24rpx 32rpx;
+			box-sizing: border-box;
+			background: #FFFFFF;
+			box-shadow: 0 4rpx 12rpx 0 rgba(209, 168, 88, 0.1);
+			border-radius: 24rpx;
+
+			.page-section {
+				width: 100%;
+				font-size: 28rpx;
+				margin-bottom: 32rpx;
+
+				.name {
+					width: 31%;
+					margin-bottom: 20rpx;
+				}
+
+				.inp {
+					width: 100%;
+				}
+
+				.select{
+					width: 100%;
+					padding: 12rpx 18rpx;
+					border-radius: 8rpx;
+					border: 2rpx solid #dadbde;
+					display: flex;
+					align-items: center;
+					justify-content: space-between;
+
+					text {
+						width: auto;
+						color: #333333;
+						font-size: 30rpx;
+					}
+
+					img {
+						width: 24rpx;
+						height: 24rpx;
+					}
+				}
+			}
+
+			.updata {
+				margin-top: 20rpx;
+				width: 100%;
+				font-size: 28rpx;
+
+				.images {
+					margin-top: 20rpx;
+				}
+				.title{
+					font-size: 22rpx;
+					color: #999999;
+				}
+			}
+
+		}
+
+		.submits {
+			width: 100%;
+			margin-top: 28rpx;
+			text{
+				display: block;
+				width: 100%;
+				text-align: center;
+				font-size: 22rpx;
+				color: #999999;
+			}
+			.btn {
+				width: 100%;
+				height: 84rpx;
+				text-align: center;
+				background: linear-gradient(90deg, #BFA061 0%, #BD9961 100%);
+				border-radius: 14rpx;
+				margin: 16rpx auto;
+				line-height: 84rpx;
+				color: #ffffff;
+			}
+		}
+	}
+}
+</style>

+ 63 - 29
src/pages/demo/business.vue → src/pages/join/team.vue

@@ -1,9 +1,9 @@
 <template>
 <template>
     <view class="page-container">
     <view class="page-container">
-        <u-navbar title="招商加盟" :autoBack="true" placeholder bgColor="#fff"></u-navbar>
+        <!-- <u-navbar title="招商加盟" :autoBack="true" placeholder bgColor="#fff"></u-navbar> -->
 
 
         <view class="banner-box">
         <view class="banner-box">
-            <image src="https://via.placeholder.com/750x400/1a1a1a/e1b876?text=MERCHANTS+TO+JOIN" mode="widthFix"
+            <image src="/static/other/work.png" mode="widthFix"
                 class="banner-img"></image>
                 class="banner-img"></image>
         </view>
         </view>
 
 
@@ -18,9 +18,9 @@
                         class="input-gray"></u-input>
                         class="input-gray"></u-input>
                 </u-form-item>
                 </u-form-item>
 
 
-                <u-form-item prop="intro">
+                <u-form-item prop="resource">
                     <view class="label" slot="label">城市资源介绍</view>
                     <view class="label" slot="label">城市资源介绍</view>
-                    <u-textarea v-model="form.intro" placeholder="请输入城市资源介绍" border="none" height="80"
+                    <u-textarea v-model="form.resource" placeholder="请输入城市资源介绍" border="none" height="80"
                         class="input-gray"></u-textarea>
                         class="input-gray"></u-textarea>
                 </u-form-item>
                 </u-form-item>
 
 
@@ -29,9 +29,9 @@
                     <u-input v-model="form.name" placeholder="请输入您的名字" border="none" class="input-gray"></u-input>
                     <u-input v-model="form.name" placeholder="请输入您的名字" border="none" class="input-gray"></u-input>
                 </u-form-item>
                 </u-form-item>
 
 
-                <u-form-item prop="phone">
+                <u-form-item prop="phoneNum">
                     <view class="label required" slot="label">手机号</view>
                     <view class="label required" slot="label">手机号</view>
-                    <u-input v-model="form.phone" placeholder="请输入您的手机号" type="number" border="none"
+                    <u-input v-model="form.phoneNum" placeholder="请输入您的手机号" type="number" border="none"
                         class="input-gray"></u-input>
                         class="input-gray"></u-input>
                 </u-form-item>
                 </u-form-item>
 
 
@@ -40,28 +40,28 @@
                     <u-input v-model="form.company" placeholder="请输入公司名称" border="none" class="input-gray"></u-input>
                     <u-input v-model="form.company" placeholder="请输入公司名称" border="none" class="input-gray"></u-input>
                 </u-form-item>
                 </u-form-item>
 
 
-                <u-form-item prop="hasExp">
+                <u-form-item prop="isMassage">
                     <view class="label" slot="label">是否从事过按摩行业</view>
                     <view class="label" slot="label">是否从事过按摩行业</view>
-                    <u-radio-group v-model="form.hasExp" activeColor="#e1b876">
-                        <u-radio label="是" name="yes" customStyle="margin-right: 40px"></u-radio>
-                        <u-radio label="否" name="no"></u-radio>
+                    <u-radio-group v-model="form.isMassage" activeColor="#e1b876">
+                        <u-radio label="是" :name="1" customStyle="margin-right: 40px"></u-radio>
+                        <u-radio label="否" :name="0"></u-radio>
                     </u-radio-group>
                     </u-radio-group>
                 </u-form-item>
                 </u-form-item>
 
 
-                <u-form-item prop="expYears">
+                <u-form-item prop="years">
                     <view class="label" slot="label">有几年按摩行业管理经验</view>
                     <view class="label" slot="label">有几年按摩行业管理经验</view>
-                    <u-radio-group v-model="form.expYears" activeColor="#e1b876">
-                        <u-radio label="1-3年" name="1-3" customStyle="margin-right: 20px"></u-radio>
-                        <u-radio label="4-10年" name="4-10" customStyle="margin-right: 20px"></u-radio>
-                        <u-radio label="10年以上" name="10+"></u-radio>
+                    <u-radio-group v-model="form.years" activeColor="#e1b876">
+                        <u-radio label="1-3年" name="1" customStyle="margin-right: 20px"></u-radio>
+                        <u-radio label="4-10年" name="2" customStyle="margin-right: 20px"></u-radio>
+                        <u-radio label="10年以上" name="3"></u-radio>
                     </u-radio-group>
                     </u-radio-group>
                 </u-form-item>
                 </u-form-item>
 
 
-                <u-form-item prop="hasStore">
+                <u-form-item prop="isEntity">
                     <view class="label" slot="label">是否正在经营实体门店</view>
                     <view class="label" slot="label">是否正在经营实体门店</view>
-                    <u-radio-group v-model="form.hasStore" activeColor="#e1b876">
-                        <u-radio label="是" name="yes" customStyle="margin-right: 40px"></u-radio>
-                        <u-radio label="否" name="no"></u-radio>
+                    <u-radio-group v-model="form.isEntity" activeColor="#e1b876">
+                        <u-radio label="是" :name="1" customStyle="margin-right: 40px"></u-radio>
+                        <u-radio label="否" :name="0"></u-radio>
                     </u-radio-group>
                     </u-radio-group>
                 </u-form-item>
                 </u-form-item>
 
 
@@ -77,54 +77,88 @@
 </template>
 </template>
 
 
 <script>
 <script>
+import {
+    netBusinessAdd,
+    netBusinessUpdate,
+    getBusinessByOpenId,
+} from '@/api/staff';
 export default {
 export default {
     data() {
     data() {
         return {
         return {
             form: {
             form: {
                 city: '',
                 city: '',
-                intro: '',
                 name: '',
                 name: '',
-                phone: '',
+                years: '',
                 company: '',
                 company: '',
-                hasExp: '',
-                expYears: '',
-                hasStore: ''
+                isEntity: '',
+                resource: '',
+                phoneNum: '',
+                isMassage: '',
             },
             },
             rules: {
             rules: {
 				city: [
 				city: [
 					{
 					{
 						required: true,
 						required: true,
-						message: '请输入首选城市',
+						message: '请输入意向代理城市',
 						trigger: ['blur', 'change']
 						trigger: ['blur', 'change']
 					}
 					}
 				],
 				],
 				name: [
 				name: [
 					{
 					{
 						required: true,
 						required: true,
-						message: '请输入名',
+						message: '请输入名',
 						trigger: ['blur', 'change']
 						trigger: ['blur', 'change']
 					}
 					}
 				],
 				],
-				phone: [
+				phoneNum: [
 					{
 					{
 						required: true,
 						required: true,
 						message: '请输入手机号',
 						message: '请输入手机号',
 						trigger: ['blur', 'change']
 						trigger: ['blur', 'change']
+					},
+                    {
+                        pattern: /^1([3589]\d|4[01456879]|6[0-9]|7[0-8])\d{8}$/, 
+                        message: '请输入正确的手机号格式', 
+                        trigger: ['blur', 'change']
 					}
 					}
 				]
 				]
 			}
 			}
         };
         };
+    },
+    onShow() {
+        this.getData();
     },
     },
 	onReady() {
 	onReady() {
 		// 页面加载完成后为表单设置规则
 		// 页面加载完成后为表单设置规则
 		this.$refs.uForm.setRules(this.rules);
 		this.$refs.uForm.setRules(this.rules);
 	},
 	},
     methods: {
     methods: {
+        getData() {
+            let params = {
+                openId: uni.getStorageSync('wx_copenid')
+            }
+            getBusinessByOpenId(params).then(res => {
+                if (res.data.code === 200 && res.data.data) {
+                    this.form = res.data.data;
+                }
+            });
+        },
         onSubmit() {
         onSubmit() {
 			this.$refs.uForm.validate().then(res => {
 			this.$refs.uForm.validate().then(res => {
-				uni.$u.toast('校验通过')
+                let api = netBusinessAdd;
+                if (this.form.id) api = netBusinessUpdate;
+                api(this.form).then(res => {
+                    uni.$u.toast(res.data.msg);
+                    if (res.data.code == 200) {
+                        setTimeout(() => {
+                            uni.navigateBack();
+                        }, 1000);
+                    } else {
+                        
+                    }
+                });
 			}).catch(errors => {
 			}).catch(errors => {
-				uni.$u.toast('校验失败')
+				// uni.$u.toast('校验失败')
 			})
 			})
 		}
 		}
     }
     }

+ 0 - 349
src/pages/join/teamwork.vue

@@ -1,349 +0,0 @@
-<template>
-	<view class="team_work">
-		<view class="banner">
-			<image src="../../static/other/work.jpg" mode=""></image>
-		</view>
-		<view class="content">
-			<view class="center">
-				<view class="title">
-					欢迎申请城市合伙人,请填写申请信息
-				</view>
-				<view class="city">
-					<view class="left">
-						<span>*</span>
-						意向代理城市(中国)
-					</view>
-					<view class="right">
-						<u-input v-model="form.city" :type="type" placeholder="请输入城市名" maxlength='4' />
-					</view>
-				</view>
-				<view class="introduce">
-					城市资源介绍
-					<view class="inp">
-						<textarea v-model="form.resource" cols="30" rows="3" placeholder="请输入城市资源介绍"></textarea>
-					</view>
-				</view>
-				<view class="city">
-					<view class="left">
-						<span>*</span>
-						合伙人姓名
-					</view>
-					<view class="right">
-						<u-input v-model="form.name" :type="type" placeholder="请输入姓名" maxlength='4' />
-					</view>
-				</view>
-				<view class="city">
-					<view class="left">
-						<span>*</span>
-						手机
-					</view>
-					<view class="right">
-						<u-input v-model="form.phoneNum" type="number" placeholder="请输入手机号码" />
-					</view>
-				</view>
-				<view class="city">
-					<view class="left">
-						公司
-					</view>
-					<view class="right">
-						<u-input v-model="form.company" :type="type" placeholder="请输入公司名称" />
-					</view>
-				</view>
-				<view class="select">
-					<view class="head">是否从事过按摩行业</view>
-					<u-radio-group v-model="form.isMassage">
-						<u-radio v-for="(item, index) in isWork" :key="index" 
-							:name="item.value" :label="item.name"
-							:customStyle="{ margin: '0 12rpx' }"
-						/>
-					</u-radio-group>
-				</view>
-				<view class="select">
-					<view class="head">有几年按摩行业管理经验</view>
-					<u-radio-group v-model="form.years">
-						<u-radio v-for="(item, index) in workYear" :key="index" 
-							:name="item.value" :label="item.name"
-							:customStyle="{ margin: '0 12rpx' }"
-						/>
-					</u-radio-group>
-				</view>
-				<view class="select">
-					<view class="head">是否正在经营实体门店</view>
-					<u-radio-group v-model="form.isEntity">
-						<u-radio v-for="(item, index) in isWork" :key="index"  
-							:name="item.value" :label="item.name"
-							:customStyle="{ margin: '0 12rpx' }"
-						/>
-					</u-radio-group>
-				</view>
-				<view class="btn_box">
-					<view class="">
-						提交后,我们会尽快和您取得联系。
-					</view>
-					<view class="btn" @click="submit">
-						{{title}}
-					</view>
-				</view>
-			</view>
-
-		</view>
-	</view>
-</template>
-
-<script>
-	import {
-		add,
-		businessDevelopment,
-		businessupdate
-	} from '../../api/index'
-	export default {
-		data() {
-			return {
-				type: '',
-				isWork: [
-					{
-						name: '是',
-						value: 1
-					},
-					{
-						name: '否',
-						value: 0
-					}
-				],
-				workYear: [{
-						name: '1-3年',
-						value: '1'
-					},
-					{
-						name: '4-10年',
-						value: '2'
-					},
-					{
-						name: '10年以上',
-						value: '2'
-					}
-				],
-				form: {
-					city: '',
-					company: '',
-					isEntity: null,
-					isMassage: null,
-					name: '',
-					phoneNum: '',
-					resource: '',
-					years: null,
-					id: ''
-				},
-				title: '提交',
-				updateId:''
-			}
-		},
-		methods: {
-			getData() {
-				let data = {}
-				data.openId = uni.getStorageSync('wx_copenid')
-				businessDevelopment(data).then(res => {
-					if (res.data.code === 200 && res.data.data) {
-						this.form = res.data.data
-						this.form.id = res.data.data.id
-						this.title = '修改'
-					}
-				})
-			},
-			submit() {
-				if (this.form.city == '') {
-					uni.showToast({
-						title: '请填写意向代理城市',
-						icon: 'none'
-					})
-					return
-				} else if (this.form.name == '') {
-					uni.showToast({
-						title: '请填写姓名',
-						icon: 'none'
-					})
-					return
-				} else if (this.form.phoneNum == '') {
-					uni.showToast({
-						title: '请填写手机号码',
-						icon: 'none'
-					})
-					return
-				} else if (!/^1[3456789]\d{9}$/.test(this.form.phoneNum)) {
-					uni.showToast({
-						title: '请输入正确的手机号',
-						icon: 'none'
-					});
-					return;
-				} else {
-					if (this.title == '提交') {
-						add(this.form).then(res => {
-							if (res.data.code == 200) {
-								uni.showToast({
-									title: '已提交',
-									icon: 'none'
-								})
-								setTimeout(() => {
-									uni.navigateBack()
-								}, 1000)
-							} else {
-								uni.showToast({
-									title: res.data.msg,
-									icon: 'none'
-								})
-							}
-						})
-					}else{
-						businessupdate(this.form).then(res =>{
-							if (res.data.code == 200) {
-								uni.showToast({
-									title: '已修改',
-									icon: 'none'
-								})
-								setTimeout(() => {
-									uni.navigateBack()
-								}, 1000)
-							} else {
-								uni.showToast({
-									title: res.data.msg,
-									icon: 'none'
-								})
-							}
-						})
-					}
-				}
-			}
-		},
-		onShow() {
-			this.getData()
-			// uni.setStorageSync('access-token', 'eyJhbGciOiJIUzUxMiJ9.eyJ0ZjoiOiIwOGExYmJiNi1kY2ExLTRlYzktOWZlMy1kM2M3MTY1MmI0MWUifQ.ovvnC3-KzZ-c5BHfzB_5AtU4OKjHoMmHyOY5Y-YRsoJ14zkoGfqHpdBHgln6jhnsdIHNebsNspNNq_7-Mrl3Dw')
-		}
-	}
-</script>
-
-<style lang="scss" scoped>
-	::v-deep .uni-input-wrapper {
-		width: 150px;
-		text-align: right;
-		font-weight: 400;
-	}
-
-	.team_work {
-		width: 100%;
-		height: 100%;
-		display: flex;
-		flex-direction: column;
-		overflow-y: auto;
-
-		.banner {
-			width: 100%;
-
-			image {
-				width: 100%;
-			}
-		}
-
-		.content {
-			width: 100%;
-			flex: 1;
-			padding: 0px 20rpx;
-			box-sizing: border-box;
-			background-color: #f7f7f7;
-			position: relative;
-			display: flex;
-			justify-content: center;
-
-			.center {
-				width: 93%;
-				padding: 30rpx;
-				padding-bottom: 50px;
-				box-sizing: border-box;
-				background-color: #fff;
-				border-radius: 10rpx;
-				position: absolute;
-				top: -30px;
-
-				.title {
-					border-bottom: 1px solid #ccc;
-					padding: 20rpx 0px;
-					font-size: 30rpx;
-					font-weight: 700;
-				}
-
-				.city {
-					padding: 16rpx 0px;
-					font-size: 30rpx;
-					font-weight: 700;
-					border-bottom: 1px solid #ccc;
-					display: flex;
-					justify-content: space-between;
-					align-items: center;
-					box-sizing: border-box;
-
-					.left {
-						width: 60%;
-
-						span {
-							color: red;
-							margin-right: 10rpx;
-						}
-					}
-
-					.right {
-						flex: 1;
-					}
-				}
-
-				.introduce {
-					font-size: 30rpx;
-					font-weight: 700;
-					padding-top: 10px;
-
-					textarea {
-						width: 100%;
-						height: 80px;
-						background-color: #f9f9f9;
-						border-radius: 10px;
-						padding: 15rpx;
-						box-sizing: border-box;
-						font-size: 26rpx;
-						font-weight: 400;
-						margin-top: 10px;
-					}
-				}
-
-				.select {
-					border-bottom: 1px solid #ccc;
-					padding: 20rpx 0px;
-
-					.head {
-						margin-bottom: 10rpx;
-						font-size: 30rpx;
-						font-weight: 700;
-					}
-				}
-			}
-
-			.btn_box {
-				margin-top: 20px;
-				width: 100%;
-				height: 50px;
-				font-size: 26rpx;
-				display: flex;
-				flex-direction: column;
-				align-items: center;
-
-				.btn {
-					width: 95%;
-					height: 40px;
-					text-align: center;
-					background: linear-gradient(to right, #35c99d, #27aea7);
-					margin: 10px auto;
-					line-height: 40px;
-					border-radius: 10px;
-					color: #fcfdff;
-				}
-			}
-		}
-	}
-</style>

+ 1 - 1
src/pages/login/wxLogin.vue

@@ -51,7 +51,7 @@
 			},
 			},
 			login() {
 			login() {
 				if(this.look){
 				if(this.look){
-				 window.location.href = 'https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxa72f643173a90106&redirect_uri=https://test.baoxianzhanggui.com/fragrance/&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect'
+				 	window.location.href = 'https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxa72f643173a90106&redirect_uri=https://test.baoxianzhanggui.com/fragrance/&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect'
 				}else{
 				}else{
 					uni.showToast({
 					uni.showToast({
 						title: '请同意《用户协议》和《隐私政策》',
 						title: '请同意《用户协议》和《隐私政策》',

+ 19 - 30
src/pages/my/coupon.vue

@@ -4,32 +4,31 @@
 			<view class="none" v-if="couponList.length == 0">
 			<view class="none" v-if="couponList.length == 0">
 				暂无优惠券
 				暂无优惠券
 			</view>
 			</view>
-			<view class="coupon" v-else>
-				<view class="item" v-for="(item,index) in couponList" :key="item.id">
+			<view class="coupon" v-if="couponList.length === 0">
+				<view class="item" v-for="(item, index) in 10" :key="item.id">
 					<view class="left">
 					<view class="left">
 						<!-- <text v-if="item.discountType==2">折扣</text> 
 						<!-- <text v-if="item.discountType==2">折扣</text> 
 						<text v-else> 满减</text> --> 
 						<text v-else> 满减</text> --> 
 						<!-- ¥{{item.discountValue}} <br /> -->
 						<!-- ¥{{item.discountValue}} <br /> -->
 						<text v-if="item.discountType == 3">¥{{item.discountValue}}<br/></text>
 						<text v-if="item.discountType == 3">¥{{item.discountValue}}<br/></text>
 						<text v-else>{{item.rebValue}}折</text>
 						<text v-else>{{item.rebValue}}折</text>
-						
 					</view>
 					</view>
 					<view class="right" v-if="item.discountType == 3">
 					<view class="right" v-if="item.discountType == 3">
-							满{{item.thresholdAmount}}减{{item.discountValue}} <br/>
-							有效期至{{item.expirationTimeString}}
+						满{{item.thresholdAmount}}减{{item.discountValue}} <br/>
+						有效期至{{item.expirationTimeString}}
 					</view>
 					</view>
 					<view class="right" v-else>
 					<view class="right" v-else>
-							满{{item.thresholdAmount}}可用 <br/>
-							有效期至{{item.expirationTimeString}}
+						满{{item.thresholdAmount}}可用 <br/>
+						有效期至{{item.expirationTimeString}}
 					</view>
 					</view>
 					<view class="one_btn" @click.stop="goIdentify(item)">
 					<view class="one_btn" @click.stop="goIdentify(item)">
-						<!-- <image src="../../static/index/one.png" mode=""></image> -->
+						<!-- <image src="/static/index/one.png" mode=""></image> -->
 						立即使用
 						立即使用
 					</view>
 					</view>
 				</view>
 				</view>
 			</view>
 			</view>
 
 
-			<!-- 			<view class="coupon" v-for="(item,index) in couponList" :key="index" v-else>
+			<!-- <view class="coupon" v-for="(item,index) in couponList" :key="index" v-else>
 				<view class="top">
 				<view class="top">
 					<view class="left">
 					<view class="left">
 						¥<text>{{item.discountValue}}</text>
 						¥<text>{{item.discountValue}}</text>
@@ -59,7 +58,7 @@
 <script>
 <script>
 	import {
 	import {
 		getCoupon
 		getCoupon
-	} from '../../api/index'
+	} from '@/api/index';
 	export default {
 	export default {
 		data() {
 		data() {
 			return {
 			return {
@@ -68,9 +67,16 @@
 				title: ''
 				title: ''
 			}
 			}
 		},
 		},
+		onLoad(options) {
+			if (options) {
+				this.title = options.title
+			}
+		},
+		onShow() {
+			this.getCouponList()
+		},
 		methods: {
 		methods: {
 			getCouponList() {
 			getCouponList() {
-				var that = this
 				var openid = {
 				var openid = {
 					openid: uni.getStorageSync('wx_copenid')
 					openid: uni.getStorageSync('wx_copenid')
 				}
 				}
@@ -82,13 +88,8 @@
 			},
 			},
 			goIdentify(item) {
 			goIdentify(item) {
 				if (this.title == 'select') {
 				if (this.title == 'select') {
-					uni.setStorage({
-						key: 'couponData',
-						data: item,
-						success: function() {
-							uni.navigateBack()
-						}
-					});
+                    uni.setStorageSync('couponData', item);
+					uni.navigateBack();
 					// uni.navigateTo({
 					// uni.navigateTo({
 					// 	url: `/pages/identify/pay_order?couponId=${item.id}&couponMoney=${item.discountValue}`
 					// 	url: `/pages/identify/pay_order?couponId=${item.id}&couponMoney=${item.discountValue}`
 					// })
 					// })
@@ -96,29 +97,17 @@
 					// uni.navigateBack({
 					// uni.navigateBack({
 					// 	delta: 1
 					// 	delta: 1
 					// })
 					// })
-
 				} else {
 				} else {
 					uni.switchTab({
 					uni.switchTab({
 						url: '/pages/identify/identify'
 						url: '/pages/identify/identify'
 					})
 					})
 				}
 				}
-
 			}
 			}
-		},
-		onLoad(options) {
-			if (options) {
-				this.title = options.title
-			}
-		},
-		onShow() {
-			this.getCouponList()
-
 		}
 		}
 	}
 	}
 </script>
 </script>
 
 
 <style lang="scss" scoped>
 <style lang="scss" scoped>
-	/* pages/my/coupon/coupon.wxss */
 	.coupon_page {
 	.coupon_page {
 		width: 100vw;
 		width: 100vw;
 		height: 100vh;
 		height: 100vh;

+ 0 - 0
src/pages/join/feedback.vue → src/pages/my/feedback.vue


+ 8 - 7
src/pages/my/indent.vue

@@ -132,13 +132,14 @@
 
 
 <script>
 <script>
 	import {
 	import {
-		addEngineer,
+		getCityList,
 		getProjectList,
 		getProjectList,
-		updateEngine,
 		getMerchantData,
 		getMerchantData,
-		imgUpload,
-		getCityList
-	} from '@/api/index.js'
+	} from '@/api/index';
+	import {
+		netStaffAdd,
+		netStaffUpdate,
+	} from '@/api/staff';
 	import Upload from '@/components/upload/index.vue';
 	import Upload from '@/components/upload/index.vue';
 	export default {
 	export default {
 		components: {
 		components: {
@@ -302,7 +303,7 @@
 				this.form.cSfzImg = this.form.cSfzImg.split(',')
 				this.form.cSfzImg = this.form.cSfzImg.split(',')
 				this.form.cImgList = this.form.cImgList.split(',')
 				this.form.cImgList = this.form.cImgList.split(',')
 				if (this.title == '编辑资料') {
 				if (this.title == '编辑资料') {
-					updateEngine(this.form).then(res => {
+					netStaffUpdate(this.form).then(res => {
 						if (res.data.code == 200) {
 						if (res.data.code == 200) {
 							uni.showToast({
 							uni.showToast({
 								title: "修改成功",
 								title: "修改成功",
@@ -318,7 +319,7 @@
 						}
 						}
 					})
 					})
 				} else {
 				} else {
-					addEngineer(this.form).then(res => {
+					netStaffAdd(this.form).then(res => {
 						if (res.data.code == 200) {
 						if (res.data.code == 200) {
 							uni.showToast({
 							uni.showToast({
 								title: "添加成功",
 								title: "添加成功",

+ 4 - 4
src/pages/my/my.vue

@@ -148,10 +148,10 @@ export default {
 			],
 			],
 			moreFunctions: [
 			moreFunctions: [
 				{ title: '地址管理', icon: '/static/other/address.png', path: '/pages/address/index' },
 				{ title: '地址管理', icon: '/static/other/address.png', path: '/pages/address/index' },
-				{ title: '招商合作', icon: '/static/other/feedback.png', path: '/pages/join/teamwork' },
-				{ title: '商户入驻', icon: '/static/other/home.png', path: '/pages/join/first_join' },
-				{ title: '商户中心', icon: '/static/other/personal.png', path: '/pages/my/engineerCenter' },
-				{ title: '投诉举报', icon: '/static/other/complain.png', path: '/pages/join/feedback' },
+				{ title: '招商合作', icon: '/static/other/feedback.png', path: '/pages/join/team' },
+				{ title: '商户入驻', icon: '/static/other/home.png', path: '/pages/join/staff' },
+				{ title: '商户中心', icon: '/static/other/personal.png', path: '/pages/staff/index' },
+				{ title: '投诉举报', icon: '/static/other/complain.png', path: '/pages/my/feedback' },
 			],
 			],
 			// 弹窗
 			// 弹窗
 			modalText: {
 			modalText: {

+ 140 - 237
src/pages/my/engineerCenter.vue → src/pages/staff/index.vue

@@ -12,9 +12,9 @@
 					{{address}}
 					{{address}}
 				</view>
 				</view>
 			</view>
 			</view>
-			<!-- <view class="right" @click="getAddress">
+			<view class="right" @click="getAddress">
 				更换位置
 				更换位置
-			</view> -->
+			</view>
 		</view>
 		</view>
 		<view class="jsdata">
 		<view class="jsdata">
 			<view class="num">
 			<view class="num">
@@ -24,7 +24,7 @@
 				</view>
 				</view>
 				<view class="item">
 				<view class="item">
 					<text>本月在线时长</text>
 					<text>本月在线时长</text>
-					<text class="amount"><span>{{onLine.toFixed(2)}}</span>时</text>
+					<text class="amount"><span>{{onLine}}</span>时</text>
 				</view>
 				</view>
 				<view class="item">
 				<view class="item">
 					<text>本月营业额</text>
 					<text>本月营业额</text>
@@ -52,23 +52,20 @@
 		<view class="warn">
 		<view class="warn">
 			<view class="top">
 			<view class="top">
 				<view class="work is_work" v-if="isWork">
 				<view class="work is_work" v-if="isWork">
-					<image src="../../static/identify/work.png" mode=""></image>
+					<image src="/static/identify/work.png" mode=""></image>
 					在线中
 					在线中
 				</view>
 				</view>
 				<view class="work" v-else>
 				<view class="work" v-else>
-					<image src="../../static/identify/rest.png" mode=""></image>
+					<image src="/static/identify/rest.png" mode=""></image>
 					休息中
 					休息中
 				</view>
 				</view>
 
 
-				<view class="goWork" v-if="isWork" @click="cutWork">
-					下线
-				</view>
-				<view class="goWork" v-else @click="cutWork">
-					上线
+				<view class="goWork" @click="onWork">
+					{{ isWork ? '下线' : '上线'  }}
 				</view>
 				</view>
 			</view>
 			</view>
-			<view class="bottom" @click="warn">
-				<!-- <image src="../../static/other/warn.png" mode=""></image> -->
+			<view class="bottom" @click="onWarning">
+				<!-- <image src="/static/other/warn.png" mode=""></image> -->
 				报警/求助
 				报警/求助
 			</view>
 			</view>
 		</view>
 		</view>
@@ -78,24 +75,24 @@
 			</view>
 			</view>
 			<view class="fun_box">
 			<view class="fun_box">
 				<view class="function" @click="goOrder">
 				<view class="function" @click="goOrder">
-					<image src="../../static/other/order.png" mode=""></image>
+					<image src="/static/other/order.png" mode=""></image>
 					<span class="order_num" v-if="orderNum>0">{{orderNum}}</span>
 					<span class="order_num" v-if="orderNum>0">{{orderNum}}</span>
 					订单
 					订单
 				</view>
 				</view>
 				<view class="function" @click="goFree">
 				<view class="function" @click="goFree">
-					<image src="../../static/other/set.png" mode=""></image>
+					<image src="/static/other/set.png" mode=""></image>
 					设置免车费
 					设置免车费
 				</view>
 				</view>
 				<view class="function" @click="goEdit">
 				<view class="function" @click="goEdit">
-					<image src="../../static/other/edit.png" mode=""></image>
+					<image src="/static/other/edit.png" mode=""></image>
 					编辑资料
 					编辑资料
 				</view>
 				</view>
 				<view class="function" @click="qrCodeShow">
 				<view class="function" @click="qrCodeShow">
-					<image src="../../static/other/code.png" mode=""></image>
+					<image src="/static/other/code.png" mode=""></image>
 					我的分销码
 					我的分销码
 				</view>
 				</view>
 				<view class="function" @click="qrCodeShow">
 				<view class="function" @click="qrCodeShow">
-					<image src="../../static/other/contract.png" mode=""></image>
+					<image src="/static/other/contract.png" mode=""></image>
 					合同签订
 					合同签订
 				</view>
 				</view>
 			</view>
 			</view>
@@ -109,7 +106,7 @@
 					<image src="/static/other/code_logo.png" mode=""></image>
 					<image src="/static/other/code_logo.png" mode=""></image>
 				</view>
 				</view>
 				<view class="title">扫码下单 一键预约</view>
 				<view class="title">扫码下单 一键预约</view>
-				<image :src="urlView" mode=""></image>
+				<image :src="qrCode" mode=""></image>
 				<view class="foot">多名技师|在线接单</view>
 				<view class="foot">多名技师|在线接单</view>
 			</view>
 			</view>
 		</view>
 		</view>
@@ -134,51 +131,47 @@
 			</view>
 			</view>
 		</view>
 		</view>
 		<view class="order">
 		<view class="order">
-			<view class="change">
-				<view class="state" :class="index==active?'active':''" v-for="(item,index) in statusList" :key="item.value"
-					@click="switchState(item,index)">
-					{{item.label}}
-				</view>
+			<view class="tab-box">
+				<u-tabs keyName="label" lineColor="#03C8BE" :list="tabList" @change="onTabChange"></u-tabs>
 			</view>
 			</view>
-			<mescroll-uni class="list" :fixed="false" ref="mescrollRef" @up="getOrderList" @init="mescrollInit">
-			</mescroll-uni>
+			<z-paging ref="paging" :fixed="false" 
+				:paging-style="{'height': '30vh'}"
+				v-model="orderList" 
+				@query="queryList">
+
+			</z-paging>
 		</view>
 		</view>
 	</view>
 	</view>
 </template>
 </template>
 
 
 <script>
 <script>
-	import MescrollMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js";
 	import {
 	import {
-		getwxQrCode,
-		freeFare,
-		getMerchantData,
-		work,
-		selectApp,
-		alertOrder,
 		getInfo,
 		getInfo,
+		alertOrder,
+		getwxQrCode,
+		getWaitOrder,
 		getJsLocation,
 		getJsLocation,
-		waitOrder,
-	} from '../../api/index.js'
+		getMerchantData,
+		netStaffWork,
+		getStaffWorkData,
+	} from '@/api/index';
 	export default {
 	export default {
-		mixins: [MescrollMixin], // 使用mixin
 		data() {
 		data() {
 			return {
 			return {
 				isWork: false,
 				isWork: false,
-				urlView: '',
+				// 二维码
+				qrCode: '',
 				isQrcodeShow: false,
 				isQrcodeShow: false,
-				id: '',
-				infoData: {},
-				jsData: {},
 				money: {},
 				money: {},
+				jsData: {},
+				infoData: {},
+				cJsId: '',
 				onLine: '',
 				onLine: '',
 				address: '',
 				address: '',
-				latitude: '',
-				longitude: '',
-				name: '',
-				isAddBlank: false,
 				orderNum: 0,
 				orderNum: 0,
-				cJsId: '',
-				statusList: [{
+				isAddBlank: false,
+				active: 0,
+				tabList: [{
 						label: '全部',
 						label: '全部',
 						value: 1
 						value: 1
 					},
 					},
@@ -190,10 +183,6 @@
 						label: '已完成',
 						label: '已完成',
 						value: 3
 						value: 3
 					},
 					},
-					{
-						label: '待付款',
-						value: 4
-					},
 					{
 					{
 						label: '已取消',
 						label: '已取消',
 						value: 5
 						value: 5
@@ -203,46 +192,105 @@
 						value: 6
 						value: 6
 					}
 					}
 				],
 				],
-				active: 0,
-				downOption: {
-					use: false
-				},
+				orderList: []
 			}
 			}
 		},
 		},
+		onShow() {
+			this.getData()
+			this.getWork()
+			this.getInfo()
+			this.getwxQrCode()
+		},
 		methods: {
 		methods: {
-			//添加银行卡
+			getData() {
+				let params = {
+					cOpenId: uni.getStorageSync('wx_copenid')
+				}
+				getMerchantData(params).then(res => {
+					if (res.data.code == 200 && res.data.data) {
+						this.cJsId = res.data.data.id
+						this.address = res.data.data.name
+						this.infoData = res.data.data
+						if (res.data.data.nStatus2 == '-1') { //未上岗
+							this.isWork = false
+						} else if (res.data.data.nStatus2 == '0') { //以上
+							this.isWork = true
+						}
+						// 获取待接单数量
+						getWaitOrder({ cJsId: this.cJsId }).then(res => {
+							this.orderNum = res.data.data
+						})
+					}
+				})
+			},
+			getInfo() {
+				getInfo().then(res => {
+					this.money = res.data.data
+				})
+			},
+			getWork() {
+				let params = {
+					openId: uni.getStorageSync('wx_copenid')
+				}
+				getStaffWorkData(params).then(res => {
+					if (res.data.code === 200) {
+						this.jsData = res.data.data
+						this.onLine = (this.jsData.onLine / 60).toFixed(2)
+					}
+				});
+			},
+			getwxQrCode() {
+				getwxQrCode({ openId: uni.getStorageSync('wx_copenid') }).then(res => {
+					let TICKET = res.data.ticket
+					this.qrCode = 'https://mp.weixin.qq.com/cgi-bin/showqrcode?ticket=' + TICKET
+				})
+			},
+			// 获取数据
+			queryList(pageNo, pageSize) {
+				let params = {
+					current: pageNo,
+					size: pageSize,
+					openId: uni.getStorageSync('wx_copenid'),
+				}
+				// getAddrList(params).then(res => {
+				// 	if (res.data.code === 200) {
+				// 		this.selected = res.data.data.find(item => item.type == 1)?.id;
+				// 		this.$refs.paging.complete(res.data.data);
+				// 	} else {
+				// 		this.$refs.paging.complete(false);
+				// 	}
+				// });
+			},
+			// 添加银行卡
 			addBlank() {
 			addBlank() {
 				uni.navigateTo({
 				uni.navigateTo({
-					url: './add_blank'
+					url: '/pages/my/add_blank'
 				})
 				})
 				this.isAddBlank = false
 				this.isAddBlank = false
 			},
 			},
-			//更换位置
+			// 更换位置
 			getAddress() {
 			getAddress() {
 				uni.chooseLocation({
 				uni.chooseLocation({
 					success: res => {
 					success: res => {
 						this.address = res.address;
 						this.address = res.address;
-						this.latitude = res.latitude;
-						this.longitude = res.longitude;
-						this.name = res.name
-						let data = {
+
+						let params = {
+							name: res.name,
 							address: this.address,
 							address: this.address,
-							name: this.name,
-							latitude: this.latitude,
-							longitude: this.longitude,
+							latitude: res.latitude,
+							longitude: res.longitude,
 							cOpenId: uni.getStorageSync('wx_copenid')
 							cOpenId: uni.getStorageSync('wx_copenid')
 						}
 						}
-						getJsLocation(data).then(res => {
-							this.getIsWork()
-						})
+						// 更新商户的位置
+						getJsLocation(params).then(res => {
+							this.getData();
+						});
 					}
 					}
 				});
 				});
 			},
 			},
-			//报警
-			warn() {
-				let data = {}
-				data.jsId = this.id
-				alertOrder(data).then(res => {
+			// 报警
+			onWarning() {
+				alertOrder({ jsId: this.cJsId }).then(res => {
 					if (res.data.code == 200) {
 					if (res.data.code == 200) {
 						uni.showToast({
 						uni.showToast({
 							title: '已通知地区负责人',
 							title: '已通知地区负责人',
@@ -256,16 +304,6 @@
 					}
 					}
 				})
 				})
 			},
 			},
-			getInfo() {
-				getInfo().then(res => {
-
-					this.money = res.data.data
-
-				})
-			},
-			alertOrder() {
-				// alertOrder
-			},
 			goWithdraw() {
 			goWithdraw() {
 				if (this.money.getAmount <= 0) {
 				if (this.money.getAmount <= 0) {
 					uni.showToast({
 					uni.showToast({
@@ -274,31 +312,21 @@
 					})
 					})
 				} else {
 				} else {
 					uni.navigateTo({
 					uni.navigateTo({
-						url: './withdraw'
+						url: '/pages/my/withdraw'
 					})
 					})
 				}
 				}
-
 			},
 			},
-			selectApp() {
-				let data = {}
-				data.openId = uni.getStorageSync('wx_copenid')
-				selectApp(data).then(res => {
-					this.jsData = res.data.data,
-						this.onLine = this.jsData.onLine / 60
-				})
-			},
-			cutWork() {
-				let data = {}
-				data.id = this.id
-				data.nStatus2 = this.isWork ? '-1' : '0'
-				// data.nStatus = 
-				work(data).then(res => {
+			onWork() {
+				netStaffWork({
+					id: this.cJsId,
+					nStatus2: this.isWork ? '-1' : '0'
+				}).then(res => {
 					if (res.data.code == 200) {
 					if (res.data.code == 200) {
 						uni.showToast({
 						uni.showToast({
 							title: '设置成功',
 							title: '设置成功',
 							icon: 'none'
 							icon: 'none'
 						})
 						})
-						this.getIsWork()
+						this.getData()
 					} else {
 					} else {
 						uni.showToast({
 						uni.showToast({
 							title: res.data.msg,
 							title: res.data.msg,
@@ -307,81 +335,29 @@
 					}
 					}
 				})
 				})
 			},
 			},
-			getIsWork() {
-				var openid = {
-					cOpenId: uni.getStorageSync('wx_copenid')
-				}
-				getMerchantData(openid).then(res => {
-					console.log(res)
-					if (res.data.code == 200 && res.data.data) {
-						this.cJsId = res.data.data.id
-						this.address = res.data.data.name
-						this.infoData = res.data.data
-						this.id = res.data.data.id
-						if (res.data.data.nStatus2 == '-1') { //未上岗
-							this.isWork = false
-						} else if (res.data.data.nStatus2 == '0') { //以上
-							this.isWork = true
-						}
-						let data = {
-							cJsId: this.cJsId
-						}
-						waitOrder(data).then(res => {
-							console.log(res)
-							this.orderNum = res.data.data
-						})
-					}
-				})
-			},
 			qrCodeShow() {
 			qrCodeShow() {
 				this.isQrcodeShow = !this.isQrcodeShow
 				this.isQrcodeShow = !this.isQrcodeShow
 			},
 			},
-			getwxQrCode() {
-				var openId = {
-					openId: uni.getStorageSync('wx_copenid')
-				}
-				getwxQrCode(openId).then(res => {
-					let TICKET = res.data.ticket
-					this.urlView = 'https://mp.weixin.qq.com/cgi-bin/showqrcode?ticket=' + TICKET
-				})
-			},
 			goEdit() {
 			goEdit() {
 				uni.navigateTo({
 				uni.navigateTo({
-					url: './indent?title=编辑资料'
+					url: '/pages/my/indent?title=编辑资料'
 				})
 				})
 			},
 			},
 			goOrder() {
 			goOrder() {
 				uni.navigateTo({
 				uni.navigateTo({
-					url: './js_order'
+					url: '/pages/my/js_order'
 				})
 				})
 			},
 			},
 			goFree() {
 			goFree() {
 				uni.navigateTo({
 				uni.navigateTo({
-					url: './free_fare'
+					url: '/pages/my/free_fare'
 				})
 				})
 			},
 			},
-			getOrderNum() {
-				console.log(this.cJsId)
-
-			},
-			switchState(item, index) {
-				this.active = index
+			onTabChange(e) {
+				console.log(e)
+				// this.active = e.index;
 			},
 			},
-			//获取订单列表
-			getOrderList(){
-				
-			}
-		},
-		onShow() {
-			// this.mescroll.resetUpScroll()
-			this.getwxQrCode()
-			this.getIsWork()
-			this.selectApp()
-			this.getInfo()
-		},
-		mounted() {
-			this.mescroll.optDown.use = false
-		},
+		}
 	}
 	}
 </script>
 </script>
 
 
@@ -392,12 +368,10 @@
 		padding: 30rpx 38rpx;
 		padding: 30rpx 38rpx;
 		box-sizing: border-box;
 		box-sizing: border-box;
 		background: linear-gradient(152deg, #DCFFF8 0%, #F1FEFF 100%);
 		background: linear-gradient(152deg, #DCFFF8 0%, #F1FEFF 100%);
-
 	}
 	}
 
 
 	.head {
 	.head {
 		width: 100%;
 		width: 100%;
-		// height: 158rpx;
 		display: flex;
 		display: flex;
 		align-items: center;
 		align-items: center;
 		background: #FFFFFF;
 		background: #FFFFFF;
@@ -602,14 +576,14 @@
 			}
 			}
 
 
 			.goWork {
 			.goWork {
-				width: 100rpx;
 				height: 50rpx;
 				height: 50rpx;
-				background: linear-gradient(to right, #35c99d, #27aea7);
 				color: #fff;
 				color: #fff;
 				text-align: center;
 				text-align: center;
 				line-height: 50rpx;
 				line-height: 50rpx;
+				flex-shrink: 0;
+				padding: 0 32rpx;
 				border-radius: 98rpx;
 				border-radius: 98rpx;
-				padding: 0px 32rpx;
+				background: linear-gradient(to right, #35c99d, #27aea7);
 			}
 			}
 
 
 			.work {
 			.work {
@@ -703,69 +677,6 @@
 				}
 				}
 			}
 			}
 		}
 		}
-
-	}
-
-	.list {
-		// width: calc(100% - 60rpx);
-		width: 100%;
-		// height: 70vh;
-		border-top-left-radius: 30rpx;
-		border-top-right-radius: 30rpx;
-		// padding: 0 30rpx;
-		margin-top: 30rpx;
-		display: flex;
-		justify-content: space-between;
-		flex-wrap: wrap;
-
-		.item {
-			width: 100%;
-			height: 80rpx;
-			line-height: 100rpx;
-			position: relative;
-			text-align: center;
-			// background-color: #c0edf6;
-			background-color: #fff;
-			padding: 20rpx;
-			border-radius: 20rpx;
-			margin-bottom: 10px;
-			display: flex;
-			justify-content: space-between;
-			align-items: center;
-			box-sizing: border-box;
-
-			.left {
-				display: flex;
-				align-items: center;
-				height: 100%;
-
-				image {
-					width: 50rpx;
-					height: 50rpx;
-					margin-right: 20rpx;
-				}
-			}
-
-			.right {
-				width: 40rpx;
-				height: 40rpx;
-
-				image {
-					width: 40rpx;
-					height: 40rpx;
-				}
-			}
-
-
-			view {
-				font-size: 30rpx;
-				color: #333;
-				height: 30rpx;
-				line-height: 30rpx;
-			}
-
-		}
-
 	}
 	}
 
 
 	.qr_code {
 	.qr_code {
@@ -921,22 +832,14 @@
 	}
 	}
 
 
 	.order {
 	.order {
-		width: 100%;
+		margin-top: 24rpx;
 		background: #FFFFFF;
 		background: #FFFFFF;
 		box-shadow: 0px 4rpx 12rpx 0px rgba(88, 209, 187, 0.1);
 		box-shadow: 0px 4rpx 12rpx 0px rgba(88, 209, 187, 0.1);
 		border-radius: 20rpx;
 		border-radius: 20rpx;
-		margin-top: 24rpx;
-		padding: 24rpx 0px;
-		box-sizing: border-box;
 
 
-		.change {
-			width: 100%;
-			display: flex;
-			align-items: center;
-			justify-content: space-between;
-			box-sizing: border-box;
-			padding: 0px 32rpx;
-			border-bottom: 2px solid #EEEEEE;
+		.tab-box {
+			padding: 0 32rpx;
+			border-bottom: 2rpx solid #EEEEEE;
 
 
 			.state {
 			.state {
 				// flex: 1;
 				// flex: 1;

BIN
src/static/other/work.jpg


BIN
src/static/other/work.png


+ 0 - 7
src/store/modules/user.js

@@ -34,11 +34,8 @@ const user = {
 		login({ commit, dispatch }, payload) {
 		login({ commit, dispatch }, payload) {
 			return new Promise((resolve, reject) => {
 			return new Promise((resolve, reject) => {
 				let { isBack = 0, ...forms } = payload;
 				let { isBack = 0, ...forms } = payload;
-				// deviceId和loginCity,为业务注销账号时增加
 				let params = {
 				let params = {
 					...forms,
 					...forms,
-					deviceId: uni.getStorageSync('deviceId'),
-					loginCity: uni.getStorageSync('city')
 				};
 				};
 				clientLoginNew(params).then((res) => {
 				clientLoginNew(params).then((res) => {
 					if (res.code == 200) {
 					if (res.code == 200) {
@@ -55,10 +52,6 @@ const user = {
 						commit('SET_USER', res.result)
 						commit('SET_USER', res.result)
 						commit('SET_TOKEN', res.result.token)
 						commit('SET_TOKEN', res.result.token)
 						commit('SET_REFRESH_TOKEN', res.result.refreshToken)
 						commit('SET_REFRESH_TOKEN', res.result.refreshToken)
-						commit('SET_AREACODE', { 
-							params: { areaCname: uni.getStorageSync('city') },
-							storageKey: 'cityCode'
-						})
 						
 						
 						uni.showToast({
 						uni.showToast({
 							icon: 'none',
 							icon: 'none',