|
@@ -15,16 +15,16 @@
|
|
<view class="register-row clearfix">
|
|
<view class="register-row clearfix">
|
|
<view class="register-from">
|
|
<view class="register-from">
|
|
<view class="label">邮箱:</view>
|
|
<view class="label">邮箱:</view>
|
|
- <input class="row-input" type="text" v-model="registerEmail" @input="registerEmailInput" placeholder="请输入您的常用邮箱" maxlength="30"/>
|
|
|
|
|
|
+ <input class="row-input" type="text" v-model="registerEmail" @blur="registerEmailInput" placeholder="请输入您的常用邮箱" maxlength="30"/>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="register-row clearfix">
|
|
<view class="register-row clearfix">
|
|
<view class="register-from code">
|
|
<view class="register-from code">
|
|
<view class="label">邮箱验证码:</view>
|
|
<view class="label">邮箱验证码:</view>
|
|
- <input class="row-input" type="text" v-model="regEmailCode" placeholder="请输入邮箱验证码" maxlength="6"/>
|
|
|
|
|
|
+ <input class="row-input" type="text" v-model="regEmailCode" placeholder="请输入邮箱验证码" maxlength="4"/>
|
|
</view>
|
|
</view>
|
|
<view class="register-from btn" :class="[isEmialDisabled === true ? 'disabled' : 'none']">
|
|
<view class="register-from btn" :class="[isEmialDisabled === true ? 'disabled' : 'none']">
|
|
- <button class="row-input" type="button" @click.stop="getEmailCode" :disabled="isEmialDisabled">{{emialCodecount}}</button>
|
|
|
|
|
|
+ <button class="row-input" type="button" @click.stop="getEmailCode" :disabled="isEmialDisabled">{{codeText}}</button>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="register-row clearfix">
|
|
<view class="register-row clearfix">
|
|
@@ -40,7 +40,7 @@
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="register-row clearfix">
|
|
<view class="register-row clearfix">
|
|
- <view class="register-btn" @click="registerStepsfirst()">下一步</view>
|
|
|
|
|
|
+ <view class="register-btn" @click="registerStepsfirst">下一步</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="register-main clearfix" v-if="tabCurrentIndex === 2">
|
|
<view class="register-main clearfix" v-if="tabCurrentIndex === 2">
|
|
@@ -59,13 +59,13 @@
|
|
<view class="register-row clearfix">
|
|
<view class="register-row clearfix">
|
|
<view class="register-from">
|
|
<view class="register-from">
|
|
<view class="label">手机号:</view>
|
|
<view class="label">手机号:</view>
|
|
- <input class="row-input" type="number" v-model="registerEmail" placeholder="请输入手机号" maxlength="11"/>
|
|
|
|
|
|
+ <input class="row-input" type="number" v-model="registerMobile" placeholder="请输入手机号" maxlength="11"/>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="register-row clearfix">
|
|
<view class="register-row clearfix">
|
|
<view class="register-from imgcode">
|
|
<view class="register-from imgcode">
|
|
<view class="label">图形验证码:</view>
|
|
<view class="label">图形验证码:</view>
|
|
- <input class="row-input" type="text" v-model="regEmailCode" placeholder="请输入图形验证码" maxlength="6"/>
|
|
|
|
|
|
+ <input class="row-input" type="text" v-model="imageCode" @blur="checkImgCode" placeholder="请输入图形验证码" maxlength="6"/>
|
|
</view>
|
|
</view>
|
|
<view class="register-from img-btn">
|
|
<view class="register-from img-btn">
|
|
<view class="vscodeimg">
|
|
<view class="vscodeimg">
|
|
@@ -80,14 +80,14 @@
|
|
<view class="register-row clearfix">
|
|
<view class="register-row clearfix">
|
|
<view class="register-from code">
|
|
<view class="register-from code">
|
|
<view class="label">短信验证码:</view>
|
|
<view class="label">短信验证码:</view>
|
|
- <input class="row-input" type="text" v-model="regEmailCode" placeholder="请输入短信验证码" maxlength="6"/>
|
|
|
|
|
|
+ <input class="row-input" type="text" v-model="mobileCode" placeholder="请输入短信验证码" maxlength="6"/>
|
|
</view>
|
|
</view>
|
|
- <view class="register-from btn" :class="[isDisabled === true ? 'disabled' : 'none']">
|
|
|
|
- <button class="row-input" type="button" @click.stop="getEmailCode" :disabled="isDisabled">获取验证码</button>
|
|
|
|
|
|
+ <view class="register-from btn" :class="[isMobileDisabled === true ? 'disabled' : 'none']">
|
|
|
|
+ <button class="row-input" type="button" @click.stop="getMobileCode" :disabled="isMobileDisabled">获取验证码</button>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="register-row clearfix">
|
|
<view class="register-row clearfix">
|
|
- <view class="register-btn" @click="steps(3)">下一步</view>
|
|
|
|
|
|
+ <view class="register-btn" @click="registerStepsTwo">下一步</view>
|
|
</view>
|
|
</view>
|
|
<view class="register-row clearfix">
|
|
<view class="register-row clearfix">
|
|
<view class="register-btn none" @click="steps(1)">上一步</view>
|
|
<view class="register-btn none" @click="steps(1)">上一步</view>
|
|
@@ -265,7 +265,7 @@
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="register-row ">
|
|
<view class="register-row ">
|
|
- <view class="register-btn sub">提交审核</view>
|
|
|
|
|
|
+ <view class="register-btn sub" @click.stop="registerStepsSub">提交审核</view>
|
|
</view>
|
|
</view>
|
|
<view class="register-row clearfix">
|
|
<view class="register-row clearfix">
|
|
<view class="register-btn none" @click="steps(2)">上一步</view>
|
|
<view class="register-btn none" @click="steps(2)">上一步</view>
|
|
@@ -287,7 +287,14 @@
|
|
import uniTag from '@/components/uni-tag/uni-tag.vue';
|
|
import uniTag from '@/components/uni-tag/uni-tag.vue';
|
|
import authorize from '@/common/config/authorize.js'
|
|
import authorize from '@/common/config/authorize.js'
|
|
import URLCONFIG from '@/common/config/config.js'
|
|
import URLCONFIG from '@/common/config/config.js'
|
|
- import { getEmailCode } from "@/api/utils.js";
|
|
|
|
|
|
+ import { organizationRegister } from "@/api/use.js"
|
|
|
|
+ import {
|
|
|
|
+ queryEmailCode,
|
|
|
|
+ queryMobileCode,
|
|
|
|
+ ueryVerificationCode,
|
|
|
|
+ checkVerificationCode,
|
|
|
|
+ queryVerificationCode
|
|
|
|
+ } from "@/api/utils.js"
|
|
var self;
|
|
var self;
|
|
export default{
|
|
export default{
|
|
components:{
|
|
components:{
|
|
@@ -296,12 +303,20 @@
|
|
},
|
|
},
|
|
data() {
|
|
data() {
|
|
return{
|
|
return{
|
|
- registerEmail:'', //注册邮箱
|
|
|
|
- regEmailCode:'', //邮箱验证码
|
|
|
|
- isEmialDisabled: true,
|
|
|
|
- count: '',
|
|
|
|
- emialCodecount: '获取验证码',
|
|
|
|
- emialTimer: null,
|
|
|
|
|
|
+ registerEmail:'', //注册邮箱
|
|
|
|
+ regEmailCode:'', //邮箱验证码
|
|
|
|
+ isEmialDisabled: true, //验证码按钮控制
|
|
|
|
+ isMobileDisabled: true, //手机验证码按钮控制
|
|
|
|
+ count: '', //倒计时
|
|
|
|
+ codeText: '获取验证码',
|
|
|
|
+ codeTime: null,
|
|
|
|
+ password:'', //密码
|
|
|
|
+ passwordCheck:'', //校验密码
|
|
|
|
+ clubName:'', //机构名称
|
|
|
|
+ clubContact:'', //联系人
|
|
|
|
+ registerMobile:'', //联系人手机号
|
|
|
|
+ mobileCode:'', //手机验证码
|
|
|
|
+ imageCode:'', //图形验证码
|
|
isDisabled:true,
|
|
isDisabled:true,
|
|
tabCurrentIndex:1,
|
|
tabCurrentIndex:1,
|
|
isShowInput:false,
|
|
isShowInput:false,
|
|
@@ -358,9 +373,70 @@
|
|
methods:{
|
|
methods:{
|
|
registerStepsfirst(){
|
|
registerStepsfirst(){
|
|
if( this.registerEmail == ''){
|
|
if( this.registerEmail == ''){
|
|
- this.$util.msg('请输入邮箱地址',3000);
|
|
|
|
|
|
+ this.$util.msg('请输入邮箱地址',2000);
|
|
return
|
|
return
|
|
}
|
|
}
|
|
|
|
+ if(!this.$reg.isEmail(this.registerEmail)){
|
|
|
|
+ this.$util.msg('请输入正确的邮箱地址',2000);
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if( this.regEmailCode == ''){
|
|
|
|
+ this.$util.msg('请输入邮箱验证码',2000);
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if(!this.$reg.isEmailCode(this.regEmailCode)){
|
|
|
|
+ this.$util.msg('请输入正确验证码',2000);
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if( this.password == ''){
|
|
|
|
+ this.$util.msg('请输入密码',2000);
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if(!this.$reg.checkPwd(this.password)){
|
|
|
|
+ this.$util.msg('密码必须为8-16位字母数字的组合',2000);
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if( this.passwordCheck != this.password){
|
|
|
|
+ this.$util.msg('两次输入的密码不一致',2000);
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ this.tabCurrentIndex = 2
|
|
|
|
+ this.getVerificationCode()
|
|
|
|
+ },
|
|
|
|
+ registerStepsTwo(){
|
|
|
|
+ if( this.clubName == ''){
|
|
|
|
+ this.$util.msg('请输入机构名称',2000);
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if( this.clubContact == ''){
|
|
|
|
+ this.$util.msg('请输入联系人名称',2000);
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if( this.registerMobile == ''){
|
|
|
|
+ this.$util.msg('请输入手机号',2000);
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if(!this.$reg.isMobile(this.registerMobile)){
|
|
|
|
+ this.$util.msg('手机格式不正确',2000);
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if( this.mobileCode == ''){
|
|
|
|
+ this.$util.msg('请输入手机验证码',2000);
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if(!this.$reg.isMobileCode(this.mobileCode)){
|
|
|
|
+ this.$util.msg('请输入正确验证码',2000);
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ this.tabCurrentIndex = 3
|
|
|
|
+ },
|
|
|
|
+ registerStepsSub(){
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+ getVerificationCode(){
|
|
|
|
+ this.$api.get(queryVerificationCode,{}, res => {
|
|
|
|
+ console.log(res)
|
|
|
|
+ })
|
|
},
|
|
},
|
|
getEmailCode(){
|
|
getEmailCode(){
|
|
if(!this.$reg.isEmail(this.registerEmail)){
|
|
if(!this.$reg.isEmail(this.registerEmail)){
|
|
@@ -368,71 +444,70 @@
|
|
console.log(this.$reg.isEmail(this.registerEmail))
|
|
console.log(this.$reg.isEmail(this.registerEmail))
|
|
return
|
|
return
|
|
}
|
|
}
|
|
- this.$api.get(getEmailCode,{email:this.registerEmail,status:2}, res => {
|
|
|
|
|
|
+ this.$api.get(queryEmailCode,{email:this.registerEmail,status:2}, res => {
|
|
console.log(res)
|
|
console.log(res)
|
|
})
|
|
})
|
|
const TIME_COUNT = 120;
|
|
const TIME_COUNT = 120;
|
|
- if (!this.emialTimer) {
|
|
|
|
|
|
+ if (!this.codeTime) {
|
|
this.count = TIME_COUNT;
|
|
this.count = TIME_COUNT;
|
|
this.isEmialDisabled = false;
|
|
this.isEmialDisabled = false;
|
|
- this.emialTimer = setInterval(() => {
|
|
|
|
|
|
+ this.codeTime = setInterval(() => {
|
|
if (this.count > 1 && this.count <= TIME_COUNT) {
|
|
if (this.count > 1 && this.count <= TIME_COUNT) {
|
|
this.count--
|
|
this.count--
|
|
- this.emialCodecount = this.count +'s'
|
|
|
|
|
|
+ this.codeText = this.count +'s'
|
|
} else {
|
|
} else {
|
|
this.isEmialDisabled = true;
|
|
this.isEmialDisabled = true;
|
|
- clearInterval(this.emialTimer)
|
|
|
|
- this.emialTimer = null
|
|
|
|
- this.emialCodecount = '获取验证码'
|
|
|
|
|
|
+ clearInterval(this.codeTime)
|
|
|
|
+ this.codeTime = null
|
|
|
|
+ this.codeText = '获取验证码'
|
|
}
|
|
}
|
|
},1000)
|
|
},1000)
|
|
}
|
|
}
|
|
this.isEmialDisabled = true;
|
|
this.isEmialDisabled = true;
|
|
},
|
|
},
|
|
|
|
+ getMobileCode(){
|
|
|
|
+ if(!this.$reg.isMobile(this.registerMobile)){
|
|
|
|
+ this.$util.msg('请输入正确的手机号',3000);
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ this.$api.get(queryMobileCode,{email:this.registerEmail,status:2}, res => {
|
|
|
|
+ console.log(res)
|
|
|
|
+ })
|
|
|
|
+ const TIME_COUNT = 120;
|
|
|
|
+ if (!this.codeTime) {
|
|
|
|
+ this.count = TIME_COUNT;
|
|
|
|
+ this.isMobileDisabled = false;
|
|
|
|
+ this.codeTime = setInterval(() => {
|
|
|
|
+ if (this.count > 1 && this.count <= TIME_COUNT) {
|
|
|
|
+ this.count--
|
|
|
|
+ this.codeText = this.count +'s'
|
|
|
|
+ } else {
|
|
|
|
+ this.isMobileDisabled = true;
|
|
|
|
+ clearInterval(this.codeTime)
|
|
|
|
+ this.codeTime = null
|
|
|
|
+ this.codeText = '获取验证码'
|
|
|
|
+ }
|
|
|
|
+ },1000)
|
|
|
|
+ }
|
|
|
|
+ this.isMobileDisabled = true;
|
|
|
|
+ },
|
|
|
|
+ checkImgCode(e){
|
|
|
|
+ this.$api.get(checkVerificationCode,{imagecode:imageCode}, res => {
|
|
|
|
+ console.log(res)
|
|
|
|
+ this.isMobileDisabled = false
|
|
|
|
+ })
|
|
|
|
+ },
|
|
registerEmailInput(e){
|
|
registerEmailInput(e){
|
|
console.log(this.$reg.isEmail(e.detail.value))
|
|
console.log(this.$reg.isEmail(e.detail.value))
|
|
this.registerEmail = e.detail.value;
|
|
this.registerEmail = e.detail.value;
|
|
- if(!this.registerEmail){
|
|
|
|
- this.isEmialDisabled = true
|
|
|
|
|
|
+ if(!this.$reg.isEmail(this.registerEmail)){
|
|
|
|
+ this.$util.msg('请输入正确的邮箱地址',2000);
|
|
|
|
+ this.isEmialDisabled = true
|
|
|
|
+ return
|
|
}else{
|
|
}else{
|
|
this.isEmialDisabled = false
|
|
this.isEmialDisabled = false
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- goregister() {
|
|
|
|
- self.$api.get('/register/isEnabled',{userOrganizeID:self.userOrganizeID,invitationCode:self.invitationCode}, res => {
|
|
|
|
- if (res.code == "1") {
|
|
|
|
- //查看此微信用户是否已经授权过
|
|
|
|
- authorize.getSetting().then(res =>{
|
|
|
|
- // console.log('是否已授权',res);//0:为取消授权 1:为已授权 2:为未操作
|
|
|
|
- if(res == 2){
|
|
|
|
- self.isUserInfo = true
|
|
|
|
- }else{
|
|
|
|
- self.isUserInfo = false
|
|
|
|
- self.wxGetUserInfo()
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- }else if(res.code =='0'){
|
|
|
|
- self.toestText ='请输入邀请码';
|
|
|
|
- self.alertText ='邀请码';
|
|
|
|
- self.telPhone = res.msg;
|
|
|
|
- self.isToast = true;
|
|
|
|
- }else if(res.code =='-2'){
|
|
|
|
- self.toestText ='邀请码已失效';
|
|
|
|
- self.alertText ='新邀请码';
|
|
|
|
- self.telPhone = res.msg;
|
|
|
|
- self.isToast = true;
|
|
|
|
- }else if(res.code =='-3'){
|
|
|
|
- self.toestText ='邀请码已被使用';
|
|
|
|
- self.alertText ='新邀请码';
|
|
|
|
- self.telPhone = res.msg;
|
|
|
|
- self.isToast = true;
|
|
|
|
- }else{
|
|
|
|
- uni.showToast({icon:'none', title: res.msg, duration: 3000});
|
|
|
|
- self.isUserInfo = false
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- },
|
|
|
|
-
|
|
|
|
// 三级联动选择
|
|
// 三级联动选择
|
|
showMulLinkageThreePicker() {
|
|
showMulLinkageThreePicker() {
|
|
this.isShowInput = true
|
|
this.isShowInput = true
|