Selaa lähdekoodia

注册及修改

wgl 4 vuotta sitten
vanhempi
commit
9e734d9b0a

+ 1 - 1
config/project.js

@@ -1 +1 @@
-exports.name = 'business'
+exports.name = 'home'

+ 2 - 1
src/projects/business/views/Master/Attendance/Apply.vue

@@ -34,7 +34,8 @@
 				<h5>上传照片</h5>
 				<div class="fyy-upphoto">
 					<div class="mui-col-xs-3" v-for="(item,index) in picList">
-						<img :src="item" @click="delPic(item)" />
+						<img :src="item" />
+						<a class="mui-icon mui-icon-closeempty" @click="delPic(item)"></a>
 					</div>
 					<div class="mui-col-xs-3" @click="chooseImage">
 						<a><span class="mui-icon mui-icon-plusempty"></span></a>

+ 2 - 2
src/projects/business/views/Master/Attendance/Sign.vue

@@ -32,8 +32,8 @@
 				<h5>上传照片</h5>
 				<div class="fyy-upphoto">
 					<div class="mui-col-xs-3" v-for="(item,index) in picList">
-						<img :src="item" @click="delPic(item)" />
-						<a class="mui-icon mui-icon-closeempty" href=""></a>
+						<img :src="item" />
+						<a class="mui-icon mui-icon-closeempty" @click="delPic(item)"></a>
 					</div>
 					<div class="mui-col-xs-3" @click="chooseImage">
 						<a><span class="mui-icon mui-icon-plusempty"></span></a>

+ 177 - 1
src/projects/home/router/index.js

@@ -14,7 +14,7 @@ const routes = [
 		}
 	},
 
-	//微信页面
+	//用户基础页面
 	{
 		path: '/user',
 		component: () => import('../views/Layout.vue'),
@@ -127,6 +127,182 @@ const routes = [
 		]
 	},
 
+	//多场景注册
+	{
+		path: '/register',
+		component: () => import('../views/Layout.vue'),
+		children: [
+			//选择行业
+			{
+				path: 'home',
+				name: 'RegisterHome',
+				component: () => import('../views/Register/Home.vue'),
+				meta: {
+					requireAuth: false,
+					role: [],
+					title: '联系我们',
+				}
+			},
+
+			//工厂园区员工
+			{
+				path: 'business',
+				component: () => import('../views/Layout.vue'),
+				children: [
+					//选择单位
+					{
+						path: 'step1',
+						name: 'RegisterBusinessStep1',
+						component: () => import('../views/Register/Business/Step1.vue'),
+						meta: {
+							requireAuth: false,
+							role: [],
+							title: '选择单位',
+						}
+					},
+					//选择地区
+					{
+						path: 'step2',
+						name: 'RegisterBusinessStep2',
+						component: () => import('../views/Register/Business/Step2.vue'),
+						meta: {
+							requireAuth: false,
+							role: [],
+							title: '选择地区',
+						}
+					},
+					//选择部门-养老员工也可用
+					{
+						path: 'step3',
+						name: 'RegisterBusinessStep3',
+						component: () => import('../views/Register/Business/Step3.vue'),
+						meta: {
+							requireAuth: false,
+							role: [],
+							title: '选择部门',
+						}
+					},
+					//填写信息-养老员工也可用
+					{
+						path: 'step4',
+						name: 'RegisterBusinessStep4',
+						component: () => import('../views/Register/Business/Step4.vue'),
+						meta: {
+							requireAuth: false,
+							role: [],
+							title: '填写信息',
+						}
+					},
+				],
+			},
+
+			//社区住宅
+			{
+				path: 'residence',
+				component: () => import('../views/Layout.vue'),
+				children: [
+					//选择小区
+					{
+						path: 'step1',
+						name: 'RegisterResidenceStep1',
+						component: () => import('../views/Register/Residence/Step1.vue'),
+						meta: {
+							requireAuth: false,
+							role: [],
+							title: '选择小区',
+						}
+					},
+					//选择地区
+					{
+						path: 'step2',
+						name: 'RegisterResidenceStep2',
+						component: () => import('../views/Register/Residence/Step2.vue'),
+						meta: {
+							requireAuth: false,
+							role: [],
+							title: '选择地区',
+						}
+					},
+					//选择房号
+					{
+						path: 'step3',
+						name: 'RegisterResidenceStep3',
+						component: () => import('../views/Register/Residence/Step3.vue'),
+						meta: {
+							requireAuth: false,
+							role: [],
+							title: '选择房号',
+						}
+					},
+					//填写信息
+					{
+						path: 'step4',
+						name: 'RegisterResidenceStep4',
+						component: () => import('../views/Register/Residence/Step4.vue'),
+						meta: {
+							requireAuth: false,
+							role: [],
+							title: '填写信息',
+						}
+					},
+				],
+			},
+
+			//养老长者
+			{
+				path: 'pension',
+				component: () => import('../views/Layout.vue'),
+				children: [
+					//选择养老
+					{
+						path: 'step1',
+						name: 'RegisterPensionStep1',
+						component: () => import('../views/Register/Pension/Step1.vue'),
+						meta: {
+							requireAuth: false,
+							role: [],
+							title: '选择养老',
+						}
+					},
+					//养老机构筛选
+					{
+						path: 'step2',
+						name: 'RegisterPensionStep2',
+						component: () => import('../views/Register/Pension/step2.vue'),
+						meta: {
+							requireAuth: false,
+							role: [],
+							title: '养老机构筛选',
+						}
+					},
+					//选择房号
+					{
+						path: 'step3',
+						name: 'RegisterPensionStep3',
+						component: () => import('../views/Register/Pension/step3.vue'),
+						meta: {
+							requireAuth: false,
+							role: [],
+							title: '选择房号',
+						}
+					},
+					//填写信息
+					{
+						path: 'step4',
+						name: 'RegisterPensionStep4',
+						component: () => import('../views/Register/Pension/Step4.vue'),
+						meta: {
+							requireAuth: false,
+							role: [],
+							title: '填写信息',
+						}
+					},
+				],
+			},
+
+		],
+	}
+
 ]
 
 const router = new VueRouter({

+ 8 - 0
src/projects/home/views/Register/Business/Step1.vue

@@ -0,0 +1,8 @@
+<template>
+</template>
+
+<script>
+</script>
+
+<style>
+</style>

+ 8 - 0
src/projects/home/views/Register/Business/Step2.vue

@@ -0,0 +1,8 @@
+<template>
+</template>
+
+<script>
+</script>
+
+<style>
+</style>

+ 8 - 0
src/projects/home/views/Register/Business/Step3.vue

@@ -0,0 +1,8 @@
+<template>
+</template>
+
+<script>
+</script>
+
+<style>
+</style>

+ 8 - 0
src/projects/home/views/Register/Business/Step4.vue

@@ -0,0 +1,8 @@
+<template>
+</template>
+
+<script>
+</script>
+
+<style>
+</style>

+ 8 - 0
src/projects/home/views/Register/Home.vue

@@ -0,0 +1,8 @@
+<template>
+</template>
+
+<script>
+</script>
+
+<style>
+</style>

+ 8 - 0
src/projects/home/views/Register/Pension/Step1.vue

@@ -0,0 +1,8 @@
+<template>
+</template>
+
+<script>
+</script>
+
+<style>
+</style>

+ 8 - 0
src/projects/home/views/Register/Pension/Step4.vue

@@ -0,0 +1,8 @@
+<template>
+</template>
+
+<script>
+</script>
+
+<style>
+</style>

+ 8 - 0
src/projects/home/views/Register/Pension/step2.vue

@@ -0,0 +1,8 @@
+<template>
+</template>
+
+<script>
+</script>
+
+<style>
+</style>

+ 8 - 0
src/projects/home/views/Register/Pension/step3.vue

@@ -0,0 +1,8 @@
+<template>
+</template>
+
+<script>
+</script>
+
+<style>
+</style>

+ 8 - 0
src/projects/home/views/Register/Residence/Step1.vue

@@ -0,0 +1,8 @@
+<template>
+</template>
+
+<script>
+</script>
+
+<style>
+</style>

+ 8 - 0
src/projects/home/views/Register/Residence/Step2.vue

@@ -0,0 +1,8 @@
+<template>
+</template>
+
+<script>
+</script>
+
+<style>
+</style>

+ 8 - 0
src/projects/home/views/Register/Residence/Step3.vue

@@ -0,0 +1,8 @@
+<template>
+</template>
+
+<script>
+</script>
+
+<style>
+</style>

+ 8 - 0
src/projects/home/views/Register/Residence/Step4.vue

@@ -0,0 +1,8 @@
+<template>
+</template>
+
+<script>
+</script>
+
+<style>
+</style>

+ 17 - 15
src/projects/home/views/User/Login.vue

@@ -10,9 +10,9 @@
 					<h2>小鹏管家</h2>
 				</div>
 				<form class="mui-input-group vongi-login-form">
-					<div class="mui-input-row">
+					<!-- <div class="mui-input-row">
 						<input name="name" v-model="subForm.name" type="text" class="mui-input-clear" placeholder="请填写您的姓名">
-					</div>
+					</div> -->
 					<div class="mui-input-row">
 						<input name="phone" v-model="subForm.phone" type="text" class="mui-input-clear" placeholder="请输入手机号码">
 					</div>
@@ -90,10 +90,7 @@
 			//表单检测
 			checkForm() {
 				let phoneResult = checkPhone(this.subForm.phone);
-				if (!this.subForm.name) {
-					mui.toast('请输入您的姓名');
-					return false;
-				} else if (typeof phoneResult == 'string') {
+				if (typeof phoneResult == 'string') {
 					mui.toast(phoneResult);
 					return false;
 				} else {
@@ -156,15 +153,20 @@
 						openId: this.openId
 					}).then(response => {
 
-						this.set_token(response);
-						//上传头像					
-						this.$router.push({
-							name: 'UserUploadPhoto',
-							query: {
-								personId: this.personId,
-								project: this.$route.query.project
-							}
-						})
+						this.set_token(response.token);
+						if (response.personInfo.faceImageUrl) {
+							//跳转到项目主页上去
+							window.location.href = '../' + this.$route.query.project + '/#/master';
+						} else {
+							//上传头像					
+							this.$router.push({
+								name: 'UserUploadPhoto',
+								query: {
+									personId: this.personId,
+									project: this.$route.query.project
+								}
+							})
+						}
 
 						this.isLoading = false;
 					}).catch(error => {

+ 3 - 3
src/utils/isReachBottom.js

@@ -25,8 +25,8 @@ function isReachBottom() {
 	const scrollTop = getScrollTop() // 获取滚动条的高度
 	const winHeight = getWinHeight() // 一屏的高度
 	const scrollHeight = getScrollHeight() // 获取文档总高度
-	console.log('scrollTop:'+scrollTop+'/scrollHeight:'+scrollHeight+'/winHeight:'+winHeight)
-	return scrollTop >= parseInt(scrollHeight) - winHeight
+	console.log('scrollTop:' + scrollTop + '/scrollHeight:' + scrollHeight + '/winHeight:' + winHeight)
+	return scrollTop >= parseInt(scrollHeight) - 10 - winHeight
 }
 
-export default isReachBottom
+export default isReachBottom