|
|
@ -2,53 +2,74 @@ |
|
|
<v-page style="height:auto!important;min-height: 100%!important;"> |
|
|
<v-page style="height:auto!important;min-height: 100%!important;"> |
|
|
<v-header :title="$t('auth.a1')"></v-header> |
|
|
<v-header :title="$t('auth.a1')"></v-header> |
|
|
<main class=" m-lg bg-panel-3 rounded-md p-x-md box-shadow"> |
|
|
<main class=" m-lg bg-panel-3 rounded-md p-x-md box-shadow"> |
|
|
<view class="form-item border-b p-md m-b-md"> |
|
|
<!-- 姓名 --> |
|
|
<view class="label m-b-xs">{{$t('auth.a7')}}</view> |
|
|
|
|
|
<view class="input color-light" > |
|
|
|
|
|
<v-picker :value="form.country_id" @change="selectCountry" :list="countryList" range-value="id" range-label="name"> |
|
|
|
|
|
<v-input disabled :value="activeCountry.name" :placeholder="$t('auth.a8')"> |
|
|
|
|
|
<template #right> |
|
|
|
|
|
<van-icon class="color-default" name="arrow" /> |
|
|
|
|
|
</template> |
|
|
|
|
|
</v-input> |
|
|
|
|
|
</v-picker> |
|
|
|
|
|
</view> |
|
|
|
|
|
</view> |
|
|
|
|
|
<view class="form-item border-b p-md m-b-md"> |
|
|
<view class="form-item border-b p-md m-b-md"> |
|
|
<view class="label m-b-xs">{{$t('auth.a9')}}</view> |
|
|
<view class="label m-b-xs">{{$t('auth.a9')}}</view> |
|
|
<view class="input color-light"> |
|
|
<view class="input color-light"> |
|
|
<v-input v-model="form.realname" :placeholder="$t('auth.b0')"></v-input> |
|
|
<v-input v-model="form.realname" :placeholder="$t('auth.b0')"></v-input> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
<!-- 出生日期 --> |
|
|
<view class="form-item border-b p-md m-b-md"> |
|
|
<view class="form-item border-b p-md m-b-md"> |
|
|
<view class="label m-b-xs">{{$t('auth.c5')}}</view> |
|
|
<view class="label m-b-xs">{{$t('auth.c5')}}</view> |
|
|
<view class="input color-light"> |
|
|
<view class="input color-light"> |
|
|
<uni-datetime-picker type="date" :placeholder="$t('auth.d4')" :clear-icon="false" v-model="form.birthday" @maskClick="maskClick" /> |
|
|
<uni-datetime-picker type="date" :placeholder="$t('auth.d4')" :clear-icon="false" v-model="form.birthday" @maskClick="maskClick" /> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
<view class="form-item border-b p-md m-b-md"> |
|
|
<!-- 证件号类型 --> |
|
|
<view class="label m-b-xs">{{$t('auth.c6')}}</view> |
|
|
<view class="form-item border-b p-md m-b-md"> |
|
|
<view class="input color-light"> |
|
|
<view class="label m-b-xs">{{$t('auth.c6')}}</view> |
|
|
<uni-data-select |
|
|
<view class="input color-light"> |
|
|
:placeholder="$t('auth.d5')" |
|
|
<uni-data-select |
|
|
v-model="form.identification_type" |
|
|
:placeholder="$t('auth.d5')" |
|
|
:localdata="id_range" |
|
|
v-model="form.identification_type" |
|
|
@change="changeID" |
|
|
:localdata="id_range" |
|
|
></uni-data-select> |
|
|
@change="changeID" |
|
|
</view> |
|
|
></uni-data-select> |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
</view> |
|
|
|
|
|
<!-- 证件号 --> |
|
|
<view class="form-item border-b p-md m-b-md"> |
|
|
<view class="form-item border-b p-md m-b-md"> |
|
|
<view class="label m-b-xs">{{$t('auth.b1')}}</view> |
|
|
<view class="label m-b-xs">{{$t('auth.b1')}}</view> |
|
|
<view class="input color-light"> |
|
|
<view class="input color-light"> |
|
|
<v-input v-model="form.id_card" :placeholder="$t('auth.b2')"></v-input> |
|
|
<v-input v-model="form.id_card" :placeholder="$t('auth.b2')"></v-input> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
<!-- 居住地址 --> |
|
|
<view class="form-item border-b p-md m-b-md"> |
|
|
<view class="form-item border-b p-md m-b-md"> |
|
|
<view class="label m-b-xs">{{$t('auth.c7')}}</view> |
|
|
<view class="label m-b-xs">{{$t('auth.c7')}}</view> |
|
|
<view class="input color-light"> |
|
|
<view class="input color-light"> |
|
|
<v-input v-model="form.address" :placeholder="$t('auth.c8')"></v-input> |
|
|
<v-input v-model="form.address" :placeholder="$t('auth.c8')"></v-input> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
<!-- 城市 --> |
|
|
|
|
|
<!-- <view class="form-item border-b p-md m-b-md"> |
|
|
|
|
|
<view class="label m-b-xs">{{$t('auth.d7')}}</view> |
|
|
|
|
|
<view class="input color-light"> |
|
|
|
|
|
<v-input v-model="form.city" :placeholder="$t('auth.d8')"></v-input> |
|
|
|
|
|
</view> |
|
|
|
|
|
</view> --> |
|
|
|
|
|
<!-- 邮政区号 --> |
|
|
|
|
|
<!-- <view class="form-item border-b p-md m-b-md"> |
|
|
|
|
|
<view class="label m-b-xs">{{$t('auth.d9')}}</view> |
|
|
|
|
|
<view class="input color-light"> |
|
|
|
|
|
<v-input v-model="form.postal_code" :placeholder="$t('auth.d10')"></v-input> |
|
|
|
|
|
</view> |
|
|
|
|
|
</view> --> |
|
|
|
|
|
<!-- 国籍区号 --> |
|
|
|
|
|
<view class="form-item border-b p-md m-b-md"> |
|
|
|
|
|
<view class="label m-b-xs">{{$t('auth.a7')}}</view> |
|
|
|
|
|
<view class="input color-light" > |
|
|
|
|
|
<v-picker :value="form.country_id" @change="selectCountry" :list="countryList" range-value="id" range-label="name2"> |
|
|
|
|
|
<v-input disabled :value="activeCountry.name2" :placeholder="$t('auth.a8')"> |
|
|
|
|
|
<template #right> |
|
|
|
|
|
<van-icon class="color-default" name="arrow" /> |
|
|
|
|
|
</template> |
|
|
|
|
|
</v-input> |
|
|
|
|
|
</v-picker> |
|
|
|
|
|
</view> |
|
|
|
|
|
</view> |
|
|
|
|
|
<!-- 电话 --> |
|
|
<view class="form-item border-b p-md m-b-md"> |
|
|
<view class="form-item border-b p-md m-b-md"> |
|
|
<view class="label m-b-xs">{{$t('auth.c9')}}</view> |
|
|
<view class="label m-b-xs">{{$t('auth.c9')}}</view> |
|
|
<view class="input color-light"> |
|
|
<view class="input color-light"> |
|
|
@ -74,15 +95,17 @@ export default { |
|
|
detail: {}, |
|
|
detail: {}, |
|
|
countryList: [], |
|
|
countryList: [], |
|
|
form: { |
|
|
form: { |
|
|
id_card: "", |
|
|
area_code: "", |
|
|
realname: "", |
|
|
realname: "", |
|
|
birthday: "", |
|
|
birthday: "", |
|
|
identification_type: "", |
|
|
identification_type: "", |
|
|
|
|
|
id_card: "", |
|
|
|
|
|
address: "", |
|
|
|
|
|
// city: "", |
|
|
|
|
|
// postal_code: "", |
|
|
country_id: "", |
|
|
country_id: "", |
|
|
country_code: "", |
|
|
country_code: "", |
|
|
area_code: "", |
|
|
phone: "" |
|
|
address: "", |
|
|
|
|
|
phone: "" |
|
|
|
|
|
}, |
|
|
}, |
|
|
id_range: [{ value: 0, text: this.$t('auth.d1') },{ value: 1, text: this.$t('auth.d2') },{ value: 2, text: this.$t('auth.d3') }], |
|
|
id_range: [{ value: 0, text: this.$t('auth.d1') },{ value: 1, text: this.$t('auth.d2') },{ value: 2, text: this.$t('auth.d3') }], |
|
|
}; |
|
|
}; |
|
|
@ -108,7 +131,13 @@ export default { |
|
|
Member.getCountryCode() |
|
|
Member.getCountryCode() |
|
|
.then((res) => { |
|
|
.then((res) => { |
|
|
console.info(res) |
|
|
console.info(res) |
|
|
this.countryList = res.data; |
|
|
// this.countryList = res.data; |
|
|
|
|
|
this.countryList = res.data.map(item=>{ |
|
|
|
|
|
return { |
|
|
|
|
|
...item, |
|
|
|
|
|
name2: '+'+item.country_code+'('+item.name+')' |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
this.form.country_id = this.countryList[res.data.length-1].id; |
|
|
this.form.country_id = this.countryList[res.data.length-1].id; |
|
|
}) |
|
|
}) |
|
|
.catch(() => {}); |
|
|
.catch(() => {}); |
|
|
@ -120,16 +149,61 @@ export default { |
|
|
primaryAuth() { |
|
|
primaryAuth() { |
|
|
let data = this.form; |
|
|
let data = this.form; |
|
|
data.country_code = this.activeCountry.country_code; |
|
|
data.country_code = this.activeCountry.country_code; |
|
|
|
|
|
console.log(data); |
|
|
|
|
|
if(!data.realname){ |
|
|
|
|
|
uni.showToast({ |
|
|
|
|
|
title: this.$t('auth.b0'), |
|
|
|
|
|
icon: 'none' |
|
|
|
|
|
}) |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
if(!data.birthday){ |
|
|
|
|
|
uni.showToast({ |
|
|
|
|
|
title: this.$t('auth.d4'), |
|
|
|
|
|
icon: 'none' |
|
|
|
|
|
}) |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
if(data.identification_type===""){ |
|
|
|
|
|
uni.showToast({ |
|
|
|
|
|
title: this.$t('auth.d5')+this.$t('auth.c6'), |
|
|
|
|
|
icon: 'none' |
|
|
|
|
|
}) |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
if(!data.id_card){ |
|
|
|
|
|
uni.showToast({ |
|
|
|
|
|
title: this.$t('auth.b2'), |
|
|
|
|
|
icon: 'none' |
|
|
|
|
|
}) |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
if(!data.address){ |
|
|
|
|
|
uni.showToast({ |
|
|
|
|
|
title: this.$t('auth.c8'), |
|
|
|
|
|
icon: 'none' |
|
|
|
|
|
}) |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
if(!data.phone){ |
|
|
|
|
|
uni.showToast({ |
|
|
|
|
|
title: this.$t('auth.d0'), |
|
|
|
|
|
icon: 'none' |
|
|
|
|
|
}) |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
Profile.primaryAuth(data,{btn:this.$refs.btn}).then(() => { |
|
|
Profile.primaryAuth(data,{btn:this.$refs.btn}).then(() => { |
|
|
this.$toast.success(this.$t('auth.b4')); |
|
|
this.$toast.success(this.$t('auth.b4')); |
|
|
setTimeout(()=>{ |
|
|
setTimeout(()=>{ |
|
|
this.$back(); |
|
|
this.$back(); |
|
|
}, 1500) |
|
|
}, 1500) |
|
|
}).catch(()=>{}); |
|
|
}).catch(()=>{}); |
|
|
}, |
|
|
}, |
|
|
changeID(e){ |
|
|
changeID(e){ |
|
|
this.form.identification = this.id_range[e].text; |
|
|
console.log(e); |
|
|
} |
|
|
this.form.identification_type = this.id_range[e].text; |
|
|
|
|
|
} |
|
|
}, |
|
|
}, |
|
|
created() { |
|
|
created() { |
|
|
this.getAuthInfo(); |
|
|
this.getAuthInfo(); |
|
|
|