|
|
|
@ -70,29 +70,41 @@ |
|
|
|
</view> |
|
|
|
</template> |
|
|
|
</view> |
|
|
|
<!--图形验证码--> |
|
|
|
<view class="form-item border-b m-b-md p-b-xs"> |
|
|
|
<view class="label m-b-xs">Captcha</view> |
|
|
|
<v-input class="color-light" v-model="form.gr_code" placeholder='Please enter graphic results'> |
|
|
|
<template #right> |
|
|
|
<!-- 邮箱 --> |
|
|
|
<img :src="Graph_che" @click="gett_gc_code"> |
|
|
|
</template> |
|
|
|
</v-input> |
|
|
|
</view> |
|
|
|
<view class="form-item border-b m-b-md p-b-xs"> |
|
|
|
<view class="label m-b-xs">{{$t('reg.a6')}}</view> |
|
|
|
<v-input class="color-light" v-model="form.code" :placeholder="$t('reg.a7')"> |
|
|
|
<template #right> |
|
|
|
<!-- 手机 --> |
|
|
|
<v-code |
|
|
|
v-show="form.type==1" |
|
|
|
url="/register/sendSmsCode" |
|
|
|
:data="{ |
|
|
|
phone:form.account, |
|
|
|
country_code:country_code || 86, |
|
|
|
type:1 |
|
|
|
}" |
|
|
|
></v-code> |
|
|
|
<!-- 邮箱 --> |
|
|
|
<v-code |
|
|
|
url="/register/sendEmailCode" |
|
|
|
:data="{ |
|
|
|
email:form.account, |
|
|
|
type:1 |
|
|
|
}" |
|
|
|
v-show="form.type==2" |
|
|
|
></v-code> |
|
|
|
<v-code |
|
|
|
v-show="form.type==1" |
|
|
|
url="/register/sendSmsCode" |
|
|
|
:data="{ |
|
|
|
phone:form.account, |
|
|
|
country_code:country_code || 86, |
|
|
|
type:1 |
|
|
|
}" |
|
|
|
></v-code> |
|
|
|
<!-- 邮箱 --> |
|
|
|
<v-code |
|
|
|
url="/register/sendEmailCode" |
|
|
|
:data="{ |
|
|
|
email:form.account, |
|
|
|
gc_code: form.gr_code, |
|
|
|
gc_key: gc_key, |
|
|
|
type:1 |
|
|
|
}" |
|
|
|
v-show="form.type==2" |
|
|
|
></v-code> |
|
|
|
</template> |
|
|
|
</v-input> |
|
|
|
</view> |
|
|
|
@ -159,7 +171,11 @@ export default { |
|
|
|
password: "", |
|
|
|
password_confirmation: "", |
|
|
|
invite_code: "", |
|
|
|
gr_code: "", |
|
|
|
}, |
|
|
|
captcha: '', |
|
|
|
Graph_che:'', |
|
|
|
gc_key:'', // tuxiangyanzheng key |
|
|
|
check: false, |
|
|
|
agreement: {}, |
|
|
|
country_code:'' |
|
|
|
@ -230,6 +246,29 @@ export default { |
|
|
|
this.$toast(this.$t('reg.c5')); |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
//获取图形验证码 |
|
|
|
refreshCaptcha() { |
|
|
|
axios.get('/register/Graph_che') |
|
|
|
.then(response => { |
|
|
|
// 重新加载验证码图片 |
|
|
|
}) |
|
|
|
.catch(error => { |
|
|
|
console.log(error); |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
gett_gc_code(){ |
|
|
|
Member.Graph_che().then((res)=>{ |
|
|
|
console.log("gc",res.data.img) |
|
|
|
this.Graph_che = res.data.img; |
|
|
|
this.gc_key= res.data.key; |
|
|
|
}); |
|
|
|
//this.Graph_che = gc |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
//注册完成后登录 |
|
|
|
login(){ |
|
|
|
let data={type: 2,account:this.form.account,password: this.form.password} |
|
|
|
@ -255,7 +294,7 @@ export default { |
|
|
|
}, |
|
|
|
}, |
|
|
|
mounted() { |
|
|
|
|
|
|
|
this.gett_gc_code(); |
|
|
|
}, |
|
|
|
onLoad(query){ |
|
|
|
this.query = query |
|
|
|
|