Browse Source

注册页面新增手机号和区号

master
liaoxinyu 4 weeks ago
parent
commit
774cd3aad5
  1. 3
      src/i18n/en.json
  2. 3
      src/i18n/tw.json
  3. 37
      src/views/signUp/index.vue

3
src/i18n/en.json

@ -188,7 +188,8 @@
"c12": "Rejection Information",
"c13": "Withdrawal password",
"c14": "Please fill in the withdrawal password",
"c15": "Reset withdrawal password"
"c15": "Reset withdrawal password",
"c16": "Please select an area code."
},
"exchange": {
"search": "Search",

3
src/i18n/tw.json

@ -189,7 +189,8 @@
"c12": "駁回信息",
"c13": "提款密碼",
"c14": "請填写提款密碼",
"c15": "重置提款密碼"
"c15": "重置提款密碼",
"c16": "請選擇區號"
},
"exchange": {
"search": "蒐索",

37
src/views/signUp/index.vue

@ -36,6 +36,19 @@
<input type="email" name="email" class="form-control" :placeholder="$t('login.pleaseEmail')" v-model="user.email" :data-has="$t('login.pleaseEmail')" :data-message="$t('login.invalidEmail')" />
</div>
</div>
<div class="tab-pane fade" :class="{show:registerType == 1, active:registerType == 1}" v-if="registerType==1" id="phone" role="tabpanel" aria-labelledby="phone-tab">
<div class="form-group">
<div class="d-flex">
<div class="mr-2">
<el-select v-model="user.country_id" filterable :placeholder="$t('login.country')">
<el-option v-for="(item, index) in cacheOption" :key="index" :value="`${item.id}`" :label="`+${item.country_code} ${item.name} ${item.code}`"></el-option>
</el-select>
</div>
<input type="text" name="phone" class="form-control" :placeholder="$t('login.enterMobile')" v-model="user.phone" :data-has="$t('login.enterMobile')"/>
</div>
</div>
</div>
<!-- phone number -->
<div class="tab-pane fade" :class="{show:registerType == 2, active:registerType == 2}" v-if="registerType==2" id="phone" role="tabpanel" aria-labelledby="phone-tab">
<div class="form-group">
@ -315,6 +328,26 @@ export default {
1000
);
return;
}
if (this.user.phone=="") {
this.$message(
{
type: "warning",
message: this.$t("common.enterPhone") + "!"
},
1000
);
return;
}
if (this.user.country_id == "") {
this.$message(
{
type: "warning",
message: this.$t("common.c16") + "!"
},
1000
);
return;
}
// if(this.withdrawal_psw==""){
// this.$message(
@ -356,6 +389,8 @@ export default {
email: this.user.email,
gc_code: this.user.gc_code,
gc_key: this.gc_key,
phone: this.user.phone,
country_code: this.user.country_id,
token
}).then(data => {
// console.log(res,1111);
@ -560,6 +595,8 @@ export default {
case 1:
data.type = `2`;
data.account = this.user.email;
data.phone = this.user.phone;
data.country_code = this.user.country_id;
break;
default:

Loading…
Cancel
Save