|
|
|
@ -56,6 +56,22 @@ |
|
|
|
</view> |
|
|
|
</template> |
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="form-item m-b-md p-b-xs"> |
|
|
|
<view> |
|
|
|
<view class="label m-b-xs">{{$t('reg.a2')}}</view> |
|
|
|
<view class="d-flex align-center login_box3"> |
|
|
|
<view style="width: 30%;margin-right: 20rpx;"> |
|
|
|
<el-select v-model="form.country_id" filterable :placeholder="$t('auth.SelectAreaCode')" no-match-text="No matching data"> |
|
|
|
<el-option v-for="(item, index) in countryList" :key="index" :value="`${item.id}`" :label="`+${item.country_code} ${item.name}`"></el-option> |
|
|
|
</el-select> |
|
|
|
</view> |
|
|
|
<v-input style="width: 380rpx;" v-model="form.phone" class="color-light" :placeholder="$t('reg.a3')"> |
|
|
|
</v-input> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
<!--图形验证码--> |
|
|
|
<view class="form-item m-b-md p-b-xs" > |
|
|
|
<view class="label m-b-xs black">{{$t('homeNewText.ee6')}}</view> |
|
|
|
@ -150,7 +166,9 @@ |
|
|
|
</template> |
|
|
|
<script> |
|
|
|
import Member from "@/api/member"; |
|
|
|
import serve from "@/api/serve/index"; |
|
|
|
import app from "app.js"; |
|
|
|
import { mapState, mapActions } from "vuex"; |
|
|
|
import tfVerifyImg from '@/components/tf-verify-img/tf-verify-img.vue'; |
|
|
|
|
|
|
|
export default { |
|
|
|
@ -159,7 +177,7 @@ export default { |
|
|
|
form: { |
|
|
|
type: 2, |
|
|
|
country_code: "", |
|
|
|
country_id: 1, |
|
|
|
country_id: "", |
|
|
|
account: "", |
|
|
|
code: "", |
|
|
|
password: "", |
|
|
|
@ -167,6 +185,7 @@ export default { |
|
|
|
password_confirmation: "", |
|
|
|
invite_code: "", |
|
|
|
gr_code: "", |
|
|
|
phone:"" |
|
|
|
}, |
|
|
|
captcha: '', |
|
|
|
Graph_che:'', |
|
|
|
@ -189,6 +208,9 @@ export default { |
|
|
|
|
|
|
|
}, |
|
|
|
computed: { |
|
|
|
...mapState({ |
|
|
|
countryList: "countryList", |
|
|
|
}), |
|
|
|
}, |
|
|
|
components:{tfVerifyImg}, |
|
|
|
methods: { |
|
|
|
@ -214,12 +236,21 @@ export default { |
|
|
|
this.$toast(this.$t('reg.c7')); |
|
|
|
return; |
|
|
|
} |
|
|
|
if(!this.form.phone){ |
|
|
|
this.$toast(this.$t('auth.d12')); |
|
|
|
return; |
|
|
|
} |
|
|
|
if(!this.form.country_id){ |
|
|
|
this.$toast(this.$t('auth.d14')); |
|
|
|
return; |
|
|
|
} |
|
|
|
// if (!this.form.withdrawal_psw) { |
|
|
|
// this.$toast(this.$t('common.c14')); |
|
|
|
// return; |
|
|
|
// } |
|
|
|
this.form.type=this.form.type |
|
|
|
this.form.country_code = this.country_code || 86; |
|
|
|
// this.form.country_code = this.country_code || 86; |
|
|
|
this.form.country_code = this.form.country_id || 86; |
|
|
|
|
|
|
|
Member.register(this.form).then((res) => { |
|
|
|
|
|
|
|
@ -293,7 +324,7 @@ export default { |
|
|
|
|
|
|
|
//注册完成后登录 |
|
|
|
login(){ |
|
|
|
let data={type: 2,account:this.form.account,password: this.form.password} |
|
|
|
let data={type: 2,account:this.form.account,password: this.form.password,phone: this.form.phone,country_id:this.form.country_id} |
|
|
|
Member.login(this.form) |
|
|
|
.then((res) => { |
|
|
|
this.loginSuccess(res.data); |
|
|
|
@ -329,10 +360,19 @@ export default { |
|
|
|
}); |
|
|
|
this.showVerify = false; |
|
|
|
this.sendAAA = true; |
|
|
|
} |
|
|
|
}, |
|
|
|
...mapActions({ |
|
|
|
setCountryList: "countryList", |
|
|
|
}), |
|
|
|
getCountry() { |
|
|
|
serve.get("/getCountryList").then((res) => { |
|
|
|
this.setCountryList(res.data); |
|
|
|
}); |
|
|
|
}, |
|
|
|
}, |
|
|
|
mounted() { |
|
|
|
this.gett_gc_code(); |
|
|
|
this.getCountry(); |
|
|
|
}, |
|
|
|
onLoad(query){ |
|
|
|
this.query = query |
|
|
|
|