Browse Source

Merge branch 'master' of http://git.liuniu946.com/xuhaolan/lishang

hwq 4 years ago
parent
commit
f15dccb8a3
1 changed files with 18 additions and 12 deletions
  1. 18 12
      pages/public/register.vue

+ 18 - 12
pages/public/register.vue

@@ -21,13 +21,17 @@
 				<view class="login_img"><image src="/static/icon/img07.png"></image></view>
 				<view class="login_name"><input class="uni-input" type="text" v-model="invitation" focus placeholder="请输入邀请码" /></view>
 			</view>
-			<!-- <view class="login_input flex">
+			<view class="login_input flex">
 				<view class="login_img"><image src="/static/icon/img06.png"></image></view>
 				<view class="login_name flex">
 					<input class="uni-input width" v-model="code" focus placeholder="请输入验证码" />
 					<view class="code" @click="verification">{{ countDown == 0 ? '验证码' : countDown }}</view>
 				</view>
-			</view> -->
+			</view>
+			<view class="login_input flex">
+				<view class="login_img"><image src="/static/icon/img04.png"></image></view>
+				<view class="login_name"><input class="uni-input" type="password" v-model="tradersPassword" 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" hover-class="none" @click="login">返回登录</button></view>
 		</view>
@@ -45,6 +49,7 @@ export default {
 			code: '', //验证码
 			time: '', //保存倒计时对象
 			countDown: 0 ,//倒计时
+			tradersPassword:123456//交易密码 
 		};
 	},
 	onLoad() {
@@ -83,19 +88,20 @@ export default {
 				obj.$api.msg('两次密码不正确');
 				return;
 			}
-			// if ((obj.invitation = '')) {
-			// 	obj.$api.msg('请输入邀请码');
-			// 	return;
-			// }
-			// if (obj.code == '') {
-			// 	obj.$api.msg('请输入验证码');
-			// 	return;
-			// }
+			if ((obj.invitation = '')) {
+				obj.$api.msg('请输入邀请码');
+				return;
+			}
+			if (obj.code == '') {
+				obj.$api.msg('请输入验证码');
+				return;
+			}
 			register({
 				account: obj.phone, //账号
-				// captcha: obj.code, //验证码
+				captcha: obj.code, //验证码
 				password: obj.password ,//密码
-				spread:this.invitation//上级推广人
+				spread:this.invitation,//上级推广人
+				trade_password: obj.tradersPassword,
 			}).then(function(e) {
 				uni.showToast({
 					title:'注册成功',