소스 검색

1.完善普通客户表单录入页面
2.完成登记成功页面
3.完成登记失败页面
4.完善其他逻辑
5.页面测试

306132416@qq.com 6 년 전
부모
커밋
c26175367d

+ 14 - 0
pages.json

@@ -7,6 +7,13 @@
 			}
 		},
 		{
+			"path": "pages/index/successPage/index",
+			"style": {
+				"navigationBarTitleText": "个人信息"
+			}
+		},
+		
+		{
 			"path": "pages/auth/index",
 			"style": {
 				"navigationBarTitleText": "授权页面"
@@ -23,7 +30,14 @@
 			"style": {
 				"navigationBarTitleText": "个人信息"
 			}
+		},
+		{
+			"path": "pages/index/failPage/index",
+			"style": {
+				"navigationBarTitleText": "个人信息"
+			}
 		}
+		
 	],
 	"globalStyle": {
 		"navigationBarTextStyle": "black",

+ 39 - 10
pages/index/customPage/index.vue

@@ -55,7 +55,7 @@
 				<text>行业</text>
 			</view>
 			<view class="info-value-box">
-				  <picker @change="bindPickerChange($event,'trade')"  :range="tradeArray" class="select-box">
+				  <picker @change="bindPickerChange($event,'trade')"  :range="tradeArray" class="select-box" name="trade">
 				        <view class="uni-input">{{tradeValue}}</view>
 				  </picker>
 			</view>		
@@ -67,7 +67,7 @@
 				<text>职业</text>
 			</view>
 			<view class="info-value-box">
-				  <picker @change="bindPickerChange($event,'profession')"  :range="professionArray" class="select-box">
+				  <picker @change="bindPickerChange($event,'profession')"  :range="professionArray" class="select-box" name="profession">
 				        <view class="uni-input">{{professionValue}}</view>
 				  </picker>
 			</view>		
@@ -79,7 +79,7 @@
 				<text>参观目的</text>
 			</view>
 			<view class="info-value-box">
-				  <picker @change="bindPickerChange($event,'ends')" :range="endsArray" class="select-box">
+				  <picker @change="bindPickerChange($event,'ends')" :range="endsArray" class="select-box" name="ends">
 				        <view class="uni-input">{{endsValue}}</view>
 				  </picker>
 			</view>		
@@ -90,7 +90,7 @@
 				<text>您目前从事的家具品牌</text>
 			</view>
 			<view class="info-value-box">
-				<input type="text" placeholder="请输入您目前从事的家具品牌" name="selfName">
+				<input type="text" placeholder="请输入您目前从事的家具品牌">
 			</view>		
 		</view>
 		
@@ -182,14 +182,25 @@
 			  			checkType: "notnull",
 			  			errorMsg: "姓名不能为空"
 			  		},
-			  		{
-			  			name: "dealerName",
-			  			checkType: "notnull",
-			  			errorMsg: "经销商姓名不能为空"
-			  		},
+					{
+						name: "trade",
+						checkType: "notnull",
+						errorMsg: "行业不能为空"
+					},
+					{
+						name: "profession",
+						checkType: "notnull",
+						errorMsg: "职业不能为空"
+					},
+					{
+						name: "ends",
+						checkType: "notnull",
+						errorMsg: "参观目的不能为空"
+					},
 			  	];
 			  	//进行表单检查
 			  	var formData = e.detail.value;
+				console.log(formData)
 			  	var checkRes = graceChecker.check(formData, rule);
 			  	if (checkRes) {
 					this.txt === '请选择' ? 
@@ -197,7 +208,7 @@
 						title: '请选择地区',
 						icon: "none"
 					}):
-					console.log('pass')
+					this.submitRequest();
 			  	} else {
 			  		uni.showToast({
 			  			title: graceChecker.error,
@@ -205,6 +216,24 @@
 			  		});
 			  	}
 			  },
+			submitRequest(){
+				this.goCustomCardPage('0')
+			},  
+			goCustomCardPage(type){
+				type === '1' ? 
+				uni.redirectTo({
+					url: '/pages/index/successPage/index?types='+'custom', //游客成功页面
+					success: res => {},
+					fail: () => {},
+					complete: () => {}
+				}):
+				uni.redirectTo({
+					url: '/pages/index/failPage/index', //失败页面
+					success: res => {},
+					fail: () => {},
+					complete: () => {}
+				});
+			}  
 		}
 	}
 </script>

+ 19 - 1
pages/index/dealerPage/index.vue

@@ -153,7 +153,7 @@
 						title: '请选择地区',
 						icon: "none"
 					}):
-					console.log('pass')
+					this.submitRequest();
 			  	} else {
 			  		uni.showToast({
 			  			title: graceChecker.error,
@@ -161,6 +161,24 @@
 			  		});
 			  	}
 			  },
+			  submitRequest(){
+			  	this.goCustomCardPage('0')
+			  },  
+			  goCustomCardPage(type){
+			  	type === '1' ? 
+			  	uni.redirectTo({
+			  		url: '/pages/index/successPage/index?types='+'dealer', //游客成功页面
+			  		success: res => {},
+			  		fail: () => {},
+			  		complete: () => {}
+			  	}):
+			  	uni.redirectTo({
+			  		url: '/pages/index/failPage/index', //失败页面
+			  		success: res => {},
+			  		fail: () => {},
+			  		complete: () => {}
+			  	});
+			  }  
 		}
 	}
 </script>

+ 64 - 0
pages/index/failPage/index.vue

@@ -0,0 +1,64 @@
+<template>
+	
+	<view class="content">
+		 <view class="fail-bg-box" :style="{backgroundImage: 'url('+imageURL+')'}">
+			 <view class="title-font">科尔卡诺展会入场登记</view>
+			 <view>尊敬的客户</view>
+			 <view>此展馆只招待VIP客户,为您带来不便,敬请谅解</view>
+			 <view>如有疑问请到前台咨询</view>
+		 </view>
+	</view>
+	
+</template>
+
+<script>
+	export default {
+		components: {
+		},
+		data() {
+			return {
+				imageURL:'/static/fail.png',
+				pageTypes:'',
+			}
+		},
+		onLoad() {
+		},
+		onShow() {
+		},
+		methods: {
+		}
+	}
+</script>
+
+<style>
+	 page{
+		background: #f7f7f7!important;
+	 }
+	.content {
+		width: 100%;
+		/* height: 100%; */
+		display: flex;
+		flex-direction: column;
+		align-items: center;
+		/* justify-content: center; */
+	}
+	.fail-bg-box {
+		width: 100%;
+		height: 600rpx;
+		background-size: 100%;
+		background-repeat: no-repeat;
+		margin-top: 3%;
+		display: flex;
+		flex-direction: column;
+		align-items: center;
+		font-size: 28rpx;
+		color: #fff;
+	}
+	.title-font {
+		font-size: 32rpx;
+		margin-top: 10%;
+		margin-bottom: 15%;
+		opacity: .9;
+	}
+	
+</style>

+ 139 - 0
pages/index/successPage/index.vue

@@ -0,0 +1,139 @@
+<template>
+	
+	<view class="content">
+		 <view class="success-bg-box" :style="{backgroundImage: 'url('+imageURL+')'}">
+			 <view class="title-font">科尔卡诺展会入场登记</view>
+			 <view class="number-box">编号:1523</view>
+			 <view v-show="pageTypes==='custom'">
+				 <view class="show-tips-box">请将此编码,展示给工作人员,</view>
+				 <view class="show-tips-box">方可入内,截图无效。</view>
+			 </view>
+		     <view v-show="pageTypes==='dealer'">
+				 <view class="show-tips-box">尊敬的超级VIP客户,请将此编码,</view>
+				 <view class="show-tips-box">展示给工作人员,方可入内,截图无效。</view>
+		     </view> 
+		 </view>
+		 <view class="phone-box">
+			 <view class="phone-value-box">您的专属顾问:{{salePhone}} (张经理)</view>
+			 <view class="phone-tips">请保存此电话,展馆内有问题均可咨询!</view>
+			 <button type="primary" @tap="callPhone">拨打</button>
+		 </view>
+		 <view class="footer-box">
+			 <view>登记时间:{{registerDate}}</view>
+		 </view>
+	</view>
+	
+</template>
+
+<script>
+	export default {
+		components: {
+		},
+		data() {
+			return {
+				imageURL:'/static/dealer-success.png',
+				pageTypes:'custom',
+				salePhone:'13652320120',
+				registerDate:'2020-07-06 12:12'
+			}
+		},
+		onLoad(option) {
+			this.pageTypes = option.types;
+		},
+		onShow() {
+		},
+		methods: {
+			callPhone(){
+				let that = this;
+				uni.makePhoneCall({
+					phoneNumber: that.salePhone
+				})
+			}
+		}
+	}
+</script>
+
+<style>
+	 page{
+		background: #f7f7f7!important;
+	 }
+	.content {
+		width: 100%;
+		/* height: 100%; */
+		display: flex;
+		flex-direction: column;
+		align-items: center;
+		/* justify-content: center; */
+	}
+	.success-bg-box {
+		width: 100%;
+		height: 500rpx;
+		background-size: 100%;
+		background-repeat: no-repeat;
+		margin-top: 3%;
+		display: flex;
+		flex-direction: column;
+		align-items: center;
+		font-size: 28rpx;
+		color: #fff;
+	}
+	.title-font {
+		font-size: 32rpx;
+		margin-top: 10%;
+		margin-bottom:8%;
+		opacity: .9;
+	}
+	.number-box {
+		font-size: 66rpx;
+		color: #FFFFFF;
+		font-weight: bold;
+		margin-bottom: 10%;
+	}
+	.show-tips-box {
+		opacity: 0.8;
+		font-size: 28rpx;
+		color: #FFFFFF;
+		letter-spacing: 0.3rpx;
+		text-align: center;
+	}
+	.phone-box {
+		width: 89%;
+		height: 360rpx;
+		background: #fff;
+		display: flex;
+		flex-direction: column;
+		align-items: center;
+		z-index: 99;
+		margin-top: -10px;
+	}
+	.phone-value-box {
+		font-size: 28rpx;
+		color: #4E4E4E;
+		margin-top: 10%;
+		margin-bottom: 3%;
+	}
+	.phone-tips {
+		font-size: 24rpx;
+		color: #4E4E4E;
+	}
+	.phone-box button {
+		width: 25%;
+		height: 60rpx;
+		line-height: 60rpx;
+		font-size: 24rpx;
+		border-radius: 50rpx;
+		background-image: linear-gradient(-135deg, #43DC7A 0%, #0EBD66 100%)!important;
+		margin-top: 10%;
+	}
+	.footer-box {
+		width: 100%;
+		position: fixed;
+		bottom: 3%;
+		height: 50rpx;
+		line-height: 50rpx;
+		font-size: 24rpx;
+		color: #B7B7B7;
+		letter-spacing: 0.26rpx;
+		text-align: center;
+	}
+</style>

BIN
static/dealer-success.png


BIN
static/fail.png


BIN
static/require-icon.png


BIN
static/uni.ttf


BIN
static/用户失败.png


BIN
static/用户成功.png


BIN
static/经销商成功.png


BIN
static/选择 copy.png