lhl 7 mesi fa
parent
commit
64e7862792

+ 9 - 0
pages.json

@@ -187,6 +187,15 @@
 							"titleNView": false
 						}
 					}
+				},
+				{
+					"path": "smrz",
+					"style": {
+						"navigationBarTitleText": "实名认证",
+						"app-plus": {
+							"titleNView": false
+						}
+					}
 				}
 			]
 		}

+ 51 - 101
pages/public/login.vue

@@ -1,29 +1,28 @@
 <template>
 	<view class="container">
-		<view class="container_text">
-			<image class="banner-img" src="/static/img/img01.png" mode="scaleToFill"></image>
-			<view class="title-img">
-				<image class="title-image" src="../../static/img/login-title.png" mode=""></image>
+		<view class="logo-wrap">
+			<image class="logo" src="" mode=""></image>
+			<view class="name">
+				LOGO
 			</view>
 		</view>
-		<view class="loginTitle"><text>欢迎登录易趣CBB</text></view>
 		<view class="login_text">
 			<view class="login_input flex">
 				<view class="login_img">
-					<image src="../../static/icon/login_name.png" mode="heightFix"></image>
+					<image src="../../static/user/phone.png" mode="heightFix"></image>
 				</view>
 				<view class="login_name"><input class="uni-input" v-model="username" focus placeholder="请输入手机号" />
 				</view>
 			</view>
 			<view class="login_input flex">
 				<view class="login_img">
-					<image src="../../static/icon/login_pw.png" mode="heightFix"></image>
+					<image src="../../static/user/pas.png" mode="heightFix"></image>
 				</view>
 				<view class="login_name"><input class="uni-input" type="password" v-model="passward" focus
 						placeholder="请输入密码" /></view>
 			</view>
 			<view><button type="green" class="uni-button uni-button-green" :class="{uniButtonAction:logining}" @click="toLogin">登录</button></view>
-			<view><button type="green" class="uni-button uni-button-green uni-button-green-plain" plain="true"
+			<view><button type="green" class="uni-button  uni-button-green-plain" plain="true"
 					hover-class="none" @click="register">注册</button></view>
 			<navigator url="./forget">
 				<view class="forget">忘记密码</view>
@@ -233,54 +232,6 @@
 </script>
 
 <style lang="scss">
-	/* #ifdef APP-PLUS */
-
-	.ios_login {
-		width: 260rpx;
-		border-radius: 12rpx;
-		justify-content: center;
-		border: 1px solid #212121;
-		margin: 24rpx auto;
-		padding: 10rpx;
-		background-color: #212121;
-		color: #ffffff;
-
-		.loginIcon {
-			width: 50rpx;
-			height: 50rpx;
-		}
-
-		.weixin_text {
-			line-height: 1;
-			margin-left: 20rpx;
-			color: #ffffff !important;
-		}
-	}
-
-	/* #endif */
-	.ios_login {
-		width: 350rpx;
-		border-radius: 12rpx;
-		justify-content: center;
-		border: 1px solid #212121;
-		margin: 24rpx auto;
-		padding: 15rpx;
-		background-color: #212121;
-		color: #ffffff;
-		font-size: 32rpx;
-
-		.loginIcon {
-			font-size: 35rpx;
-			width: 35rpx;
-			height: 35rpx;
-		}
-
-		.weixin_text {
-			line-height: 1;
-			margin-left: 20rpx;
-			color: #ffffff !important;
-		}
-	}
 
 	page {
 		height: 100%;
@@ -289,47 +240,22 @@
 	.container {
 		width: 100%;
 		height: 100%;
-		background-size: 100%;
-	}
-
-	.container_text {
-		position: relative;
-		width: 100%;
-		height: 500rpx;
-		top: 0rpx;
-
-		.banner-img {
-			width: 100%;
-			height: 100%;
-		}
-
-		.title-img {
-			position: absolute;
-			left: 50%;
-			top: 100rpx;
-			margin-left: -130rpx;
-			width: 260rpx;
-			height: 156rpx;
-
-			.title-image {
-				width: 260rpx;
-				height: 156rpx;
-			}
-		}
+		background-image: url('../../static/user/login-bg.png');
+		background-size: 100% 100%;
 	}
 
 	.login_text {
-		margin: -100rpx 0 0;
+		// margin: -100rpx 0 0;
 		position: relative;
-		padding: 100rpx 102rpx;
-		background-color: #ffffff;
-		border-top-left-radius: 40rpx;
-		border-top-right-radius: 40rpx;
+		padding: 0rpx 72rpx;
+		// background-color: #ffffff;
+		// border-top-left-radius: 40rpx;
+		// border-top-right-radius: 40rpx;
 
 		.login_input {
-			border: 1px solid #f0f0f0;
+			border-bottom: 1px solid #f0f0f0;
 			padding: 20rpx;
-			border-radius: 99rpx;
+			// border-radius: 99rpx;
 			margin-bottom: 40rpx;
 			.login_img{
 				text-align: center;
@@ -349,7 +275,7 @@
 			}
 
 			.login_name {
-				color: #333333;
+				color: #fff;
 				flex-grow: 1;
 			}
 		}
@@ -390,25 +316,29 @@
 			font-size: 28rpx;
 			width: 100%;
 			text-align: right;
-			color: #999999;
+			color: #fff;
 		}
 
 		.uni-button-green {
-			color: #ffffff;
-			background-color: #db292b;
-			margin: 40rpx 10rpx;
-			border-radius: 50rpx;
+			width: 604rpx;
+			height: 90rpx;
+			background: #FFFFFF;
+			border-radius: 10rpx;
+			color:#222222;
+			margin: 40rpx auto;
 		}
 		.uni-button-action {
 			background-color:#eeeeee !important;
 		}
 
 		.uni-button-green-plain {
-			border: 1px solid #db292b;
-			margin: 40rpx 10rpx;
-			border-radius: 50rpx;
-			color: #db292b;
-			background-color: #ffffff;
+			width: 604rpx;
+			height: 90rpx;
+			border: 1px solid #fff;
+			margin: 40rpx auto;
+			border-radius: 10rpx;
+			color: #fff;
+			// background-color: #ffffff;
 		}
 
 		.uni-button {
@@ -425,4 +355,24 @@
 		color: white;
 		font-size: 40rpx;
 	}
+	.logo-wrap {
+		padding: 210rpx 0 150rpx;
+		.logo {
+			display: block;
+			width: 160rpx;
+			height: 160rpx;
+			border-radius: 50%;
+			background-color: #fff;
+			margin: auto;
+		}
+		.name {
+			width: 100rpx;
+			height: 28rpx;
+			font-size: 36rpx;
+			color: #FFFFFF;
+			text-align: center;
+			width: 100%;
+			padding-top: 20rpx;
+		}
+	}
 </style>

+ 49 - 30
pages/public/register.vue

@@ -1,19 +1,21 @@
 <template>
 	<view class="container">
-		<view class="container_text">
-			<image class="banner-img" src="/static/img/img02.png" mode="scaleToFill"></image>
+		<view class="logo-wrap">
+			<image class="logo" src="" mode=""></image>
+			<view class="name">
+				LOGO
+			</view>
 		</view>
 		<view class="login_text">
 			<view class="login_input flex">
 				<view class="login_img">
-					<!-- <image src="/static/icon/img03.png" mode="heightFix"></image> -->
-					+86
+					<image src="/static/user/phone.png" mode="heightFix"></image>
 				</view>
 				<view class="login_name"><input class="uni-input" v-model="phone" type="number" focus placeholder="请输入手机号" /></view>
 			</view>
 			<view class="login_input flex">
 				<view class="login_img">
-					<image src="/static/icon/login_pw2.png" mode="heightFix"></image>
+					<image src="/static/user/code.png" mode="heightFix"></image>
 				</view>
 				<view class="login_name flex">
 					<input class="uni-input width" v-model="code" focus placeholder="请输入验证码" />
@@ -22,14 +24,14 @@
 			</view>
 			<view class="login_input flex">
 				<view class="login_img">
-					<image src="/static/icon/login_pw.png" mode="heightFix"></image>
+					<image src="/static/user/pas.png" mode="heightFix"></image>
 				</view>
 				<view class="login_name"><input class="uni-input" type="password" v-model="password" focus
 						placeholder="请输入密码" /></view>
 			</view>
 			<view class="login_input flex">
 				<view class="login_img">
-					<image src="/static/icon/login_pw.png" mode="heightFix"></image>
+					<image src="/static/user/pas.png" mode="heightFix"></image>
 				</view>
 				<view class="login_name"><input class="uni-input" type="password" v-model="repassword" focus
 						placeholder="请重复输入密码" /></view>
@@ -37,13 +39,13 @@
 
 			<view class="login_input flex"  v-if="isShowIllegality">
 				<view class="login_img">
-					<image src="/static/icon/login_name.png" mode="heightFix"></image>
+					<image src="/static/user/spread.png" mode="heightFix"></image>
 				</view>
 				<view class="login_name"><input class="uni-input" type="text" v-model="invitation" focus
 						placeholder="请输入邀请码" /></view>
 			</view>
 			<view><button type="green" @click="register" class="uni-button uni-button-green">注册账号</button></view>
-			<view><button class="uni-button uni-button-green uni-button-green-plain" type="green" plain="true"
+			<view><button class="uni-button  uni-button-green-plain" type="green" plain="true"
 					hover-class="none" @click="login">返回登录</button></view>
 		</view>
 		<codeImage @openCode='getCode' loginType="register" @close='showAlert=false' :phone="phone" ref="alertImage" :show='showAlert'></codeImage>
@@ -192,7 +194,8 @@
 	.container {
 		width: 100%;
 		height: 100%;
-		background-size: 100%;
+		background-image: url('../../static/user/login-bg.png');
+		background-size: 100% 100%;
 	}
 
 	.container_text {
@@ -210,16 +213,10 @@
 	.login_text {
 		margin: -100rpx 0 0;
 		position: relative;
-		padding: 100rpx 102rpx;
-		background-color: #ffffff;
-		border-top-left-radius: 40rpx;
-		border-top-right-radius: 40rpx;
-
+		padding: 100rpx 72rpx;
 		.login_input {
-			border: 1px solid #f0f0f0;
-			padding: 20rpx;
-			border-radius: 99rpx;
-			margin-bottom: 40rpx;
+			border-bottom: 1px solid #fff;
+			padding: 30rpx 20rpx 20rpx;
 			.login_img{
 				text-align: center;
 				flex-shrink: 0;
@@ -239,7 +236,7 @@
 			}
 
 			.login_name {
-				color: #333333;
+				color: #fff;
 				flex-grow: 1;
 			}
 		}
@@ -284,18 +281,20 @@
 		}
 
 		.uni-button-green {
-			color: #ffffff;
-			background-color: #db292b;
-			margin: 40rpx 10rpx;
-			border-radius: 50rpx;
+			width: 100%;
+			background: #FFFFFF;
+			border-radius: 10rpx;
+			color:#222222;
+			margin: 40rpx auto;
 		}
 
 		.uni-button-green-plain {
-			border: 1px solid #db292b;
-			margin: 40rpx 10rpx;
-			border-radius: 50rpx;
-			color: #db292b;
-			background-color: #ffffff;
+			width: 100%;
+			border: 1px solid #fff;
+			margin: 40rpx auto;
+			border-radius: 10rpx;
+			color: #fff;
+			// background-color: #ffffff;
 		}
 
 		.uni-button {
@@ -317,7 +316,7 @@
 	}
 
 	.code {
-		color: #db292b;
+		color: #fff;
 		font-size: 23rpx;
 		border-left: 1px solid #eeeeee;
 		width: 150rpx;
@@ -329,4 +328,24 @@
 		height: 80rpx !important;
 		line-height: 80rpx !important;
 	}
+	.logo-wrap {
+		padding: 210rpx 0 150rpx;
+		.logo {
+			display: block;
+			width: 160rpx;
+			height: 160rpx;
+			border-radius: 50%;
+			background-color: #fff;
+			margin: auto;
+		}
+		.name {
+			width: 100rpx;
+			height: 28rpx;
+			font-size: 36rpx;
+			color: #FFFFFF;
+			text-align: center;
+			width: 100%;
+			padding-top: 20rpx;
+		}
+	}
 </style>

+ 291 - 0
pages/user/smrz.vue

@@ -0,0 +1,291 @@
+<template>
+	<view class="content">
+		<view class="" style="height: 20rpx;">
+
+		</view>
+		<view class="tab">
+			<view class="bd-wrap flex">
+				<view class="bg-name">
+					您的姓名:
+				</view>
+				<view class="bg-val">
+					<input type="text" value="" placeholder="请输入姓名" class="val-ipt" v-model="name"
+						ref="name" />
+				</view>
+			</view>
+			<view class="bd-wrap flex">
+				<view class="bg-name">
+					身份证号:
+				</view>
+				<view class="bg-val">
+					<input type="text" value="" placeholder="请输入身份证号" class="val-ipt" v-model="idcard"
+						ref="idcard" />
+				</view>
+			</view>
+			<view class="bd-wrap flex">
+				<view class="bg-name">
+					手机号:
+				</view>
+				<view class="bg-val">
+					<input type="text" value="" placeholder="请输入手机号" class="val-ipt" v-model="phone"
+						ref="idcard" />
+				</view>
+			</view>
+			<view class="bd-wrap flex">
+				<view class="bg-name">
+					验证码:
+				</view>
+				<view class="bg-val">
+					<input type="text" value="" placeholder="请输入验证码" class="val-ipt" v-model="code"
+						ref="idcard" />
+				</view>
+				<view class="code" @click="verification">{{ countDown == 0 ? '验证码' : countDown }}</view>
+			</view>
+			<view class="tit tit1">
+				身份证照片(正反两面)
+			</view>
+			<view class="" @click="imgsub('sfzz')">
+				<image :src="sfzz" mode="" class="sfz" v-if="sfzz"></image>
+				<image src="../../static/user/sfzz.png" mode="" class="sfz" v-else></image>
+			</view>
+			<view class="tip">
+				身份证头像面
+			</view>
+			<view class="" @click="imgsub('sfzf')">
+				<image :src="sfzf" mode="" class="sfz" v-if="sfzf"></image>
+				<image src="../../static/user/sfzf.png" mode="" class="sfz" v-else></image>
+			</view>
+
+			<view class="tip">
+				身份证国徽面
+			</view>
+		</view>
+		<view class="btm-btn" @click="bank">
+			确认
+		</view>
+		<codeImage @openCode='getCode' loginType="register" @close='showAlert=false' :phone="phone" ref="alertImage"
+			:show='showAlert'></codeImage>
+	</view>
+</template>
+<script>
+	import codeImage from '@/components/codeImage.vue';
+	import {
+		mapState,
+		mapMutations
+	} from 'vuex';
+	import {
+		upload
+	} from '@/api/order.js';
+	import {
+		enroll
+	} from '@/api/index.js'
+	import {
+		getLevelList,
+		bank,
+		bankInfo,
+		realName
+	} from '@/api/user.js'
+
+
+	export default {
+		components: {
+			codeImage
+		},
+		data() {
+			return {
+				countDown: 0,
+				name: '',
+				idcard: '',
+				sfzz: '',
+				sfzf: '',
+				code: '',
+				phone: '',
+				loading: false,
+				showAlert: false
+			};
+		},
+		onLoad(opt) {},
+		onShow() {
+
+		},
+		onReachBottom() {
+
+		},
+		computed: {
+			...mapState('user', ['userInfo'])
+		},
+		methods: {
+			// 发送验证码
+			getCode() {
+				const obj = this;
+				obj.countDown = 60;
+				obj.time = setInterval(() => {
+					obj.countDown--;
+				}, 1000);
+				//调用验证码接口
+			},
+			imgsub(name) {
+				console.log('上传头像')
+				upload({
+					filename: ''
+				}).then(data => {
+					console.log("data", data);
+					this.bankInfo[name] = data[0].url;
+				})
+			},
+			//发送验证码
+			verification() {
+				let obj = this;
+				if (this.phone == '') {
+					this.$api.msg('请输入电话号码');
+					return;
+				}
+				if (this.phone.length < 11) {
+					this.$api.msg('请输入正确的手机号');
+					return;
+				}
+				// 判断是否在倒计时
+				if (obj.countDown > 0) {
+					return false;
+				} else {
+					obj.showAlert = true;
+					obj.$refs.alertImage.getImage()
+				}
+			},
+			bank() {
+				let that = this
+				if (that.loading) {
+					return
+				}
+				if (that.name == '') {
+					return that.$api.msg('请输入您的姓名')
+				}
+				if (that.idcard == '') {
+					return that.$api.msg('请输入身份证号')
+				}
+				if (that.sfzz == '') {
+					return that.$api.msg('请上传身份证照片')
+				}
+				if (that.sfzf == '') {
+					return that.$api.msg('请上传身份证照片')
+				}
+				let data = {
+					real_name: that.name,
+					id_card: that.idcard,
+					id_card_front_image: that.sfzz,
+					id_card_back_image: that.sfzf
+				}
+				that.loading = true
+				realName(data).then(res => {
+					console.log(res);
+					uni.showToast({
+						title: '提交成功',
+						duration: 2000
+					});
+					setTimeout(() => {
+						uni.navigateBack()
+						that.loading = false
+					}, 1500)
+
+				}).catch(err => {
+					console.log('err');
+					that.loading = false
+				})
+			}
+		}
+	};
+</script>
+<style lang="scss" scoped>
+	page {
+		height: auto;
+		min-height: 100%;
+		background-color: #fff;
+	}
+
+	.tab {
+		width: 690rpx;
+		margin: auto;
+		// height: 606rpx;
+		background: #FFFFFF;
+		border-radius: 10rpx;
+		padding: 30rpx 0 99rpx;
+
+		.tit {
+			font-weight: 500;
+			font-size: 32rpx;
+			color: #222222;
+		}
+
+		.tit1 {
+			padding-top: 45rpx;
+		}
+	}
+
+	.bd-wrap {
+		// width: 690rpx;
+		// height: 100rpx;
+		padding: 20rpx 0;
+		background-color: #fff;
+		border-bottom: 1px solid #AEAEAE;
+		// line-height: 100rpx;
+		font-size: 32rpx;
+		position: relative;
+
+		.code {
+			color: $base-color;
+			font-size: 23rpx;
+			border-left: 1px solid #eeeeee;
+			width: 150rpx;
+			flex-shrink: 0;
+			text-align: center;
+		}
+
+		.bg-name {
+			width: 182rpx;
+			height: 100%;
+			flex-shrink: 0;
+			// padding-left: 20rpx;
+		}
+
+		.bg-val {
+			// width: 430rpx;
+			flex-grow: 1;
+			height: 100%;
+
+			.val-ipt {
+				width: 100%;
+				height: 100%;
+				// background-color: #009100;
+				padding-left: 10rpx;
+				padding-top: 10rpx;
+			}
+		}
+	}
+
+	.btm-btn {
+		width: 690rpx;
+		line-height: 80rpx;
+		background: #333333;
+		border-radius: 10rpx;
+		margin: auto;
+		font-size: 30rpx;
+		color: #FFFFFF;
+		text-align: center;
+	}
+
+	.sfz {
+		width: 300rpx;
+		height: 210rpx;
+		display: block;
+		margin: 35rpx auto;
+		border-radius: 35rpx;
+		border: #ececec 1px solid;
+	}
+
+	.tip {
+		text-align: center;
+		font-size: 26rpx;
+		font-weight: 500;
+		color: #333333;
+	}
+</style>

BIN
static/user/code.png


BIN
static/user/login-bg.png


BIN
static/user/pas.png


BIN
static/user/phone.png


BIN
static/user/sfzf.png


BIN
static/user/sfzz.png


BIN
static/user/spread.png