Browse Source

日期布局已修改、注册页面已隐藏邀请码、注册页面新增手机号

master
liaoxinyu 1 week ago
parent
commit
59381411ab
  1. 1
      i18n/lang/en.json
  2. 1
      i18n/lang/zh-TW.json
  3. 26
      pages/auth/primary.vue
  4. 56
      pages/reg/index.vue

1
i18n/lang/en.json

@ -42,6 +42,7 @@
"service": "Service", "service": "Service",
"toDwon": "Do you want to go to the download page", "toDwon": "Do you want to go to the download page",
"toDwon1": "Do you want to go to the authentication page", "toDwon1": "Do you want to go to the authentication page",
"date1": "Please enter the date.",
"a0": "Please enter the purchase code", "a0": "Please enter the purchase code",
"a1": "Copy succeeded", "a1": "Copy succeeded",
"a2": "copy failed", "a2": "copy failed",

1
i18n/lang/zh-TW.json

@ -42,6 +42,7 @@
"service": "客服", "service": "客服",
"toDwon": "是否前往下載頁", "toDwon": "是否前往下載頁",
"toDwon1": "是否前往認證頁", "toDwon1": "是否前往認證頁",
"date1": "請輸入日期",
"a0": "請輸入申購碼", "a0": "請輸入申購碼",
"a1": "複製成功", "a1": "複製成功",
"a2": "複製失敗", "a2": "複製失敗",

26
pages/auth/primary.vue

@ -25,8 +25,9 @@
<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.d0')}}</view> <view class="label m-b-xs">{{$t('auth.d0')}}</view>
<view class="input color-light"> <view class="input color-light">
<uni-datetime-picker type="date" :placeholder="$t('common.c8')" start="1873-1-01" :end="new Date().toLocaleDateString()" <!-- <uni-datetime-picker type="date" :placeholder="$t('common.c8')" start="1873-1-01" :end="new Date().toLocaleDateString()"
:clear-icon="false" v-model="form.birthday" /> :clear-icon="false" v-model="form.birthday" /> -->
<input v-model="form.birthday" @input="formatDateInput" :placeholder="$t('common.date1')"></input>
</view> </view>
</view> </view>
<!-- 证件号类型 --> <!-- 证件号类型 -->
@ -71,7 +72,7 @@
</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" v-if="0">
<view class="label m-b-xs">{{$t('auth.SelectAreaCode')}}</view> <view class="label m-b-xs">{{$t('auth.SelectAreaCode')}}</view>
<view class="input color-light" > <view class="input color-light" >
<v-picker :value="form.country_id" @change="selectCountry" :list="countryList" range-value="id" range-label="name2"> <v-picker :value="form.country_id" @change="selectCountry" :list="countryList" range-value="id" range-label="name2">
@ -84,7 +85,7 @@
</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" v-if="0">
<view class="label m-b-xs">{{$t('auth.d11')}}</view> <view class="label m-b-xs">{{$t('auth.d11')}}</view>
<view class="input color-light"> <view class="input color-light">
<v-input v-model="form.phone" :placeholder="$t('auth.d12')"></v-input> <v-input v-model="form.phone" :placeholder="$t('auth.d12')"></v-input>
@ -151,6 +152,23 @@ export default {
}, },
}, },
methods: { methods: {
formatDateInput(e) {
let value = e.target.value;
// 1. 线
value = value.replace(/[^\d-]/g, '');
// 2. 线4线7线
if (/^\d{4}$/.test(value)) {
value = value + '-';
} else if (/^\d{4}-\d{2}$/.test(value)) {
value = value + '-';
}
// 3. 10
if (value.length > 10) value = value.slice(0, 10);
// 4. 使 nextTick
this.$nextTick(() => {
this.form.birthday = value;
});
},
getAuthInfo() { getAuthInfo() {
Profile.getAuthInfo().then((res) => { Profile.getAuthInfo().then((res) => {
this.detail = res.data; this.detail = res.data;

56
pages/reg/index.vue

@ -68,6 +68,19 @@
</view> </view>
</template> </template>
</view> </view>
<view class="form-item border-b m-b-md p-b-xs">
<view>
<view class="label m-b-xs">{{$t('reg.a2')}}</view>
<v-input v-model="form.phone" class="color-light" :placeholder="$t('reg.a3')">
<template #left>
<v-country ref="country" style="width: 80rpx;height: 40rpx;border: 1px solid #ccc;text-align: center;line-height: 40rpx;"
@country_code="country_code=$event" class="m-r-xs" v-model="form.country_id" />
</template>
</v-input>
</view>
</view>
<!--图形验证码--> <!--图形验证码-->
<view class="form-item border-b m-b-md p-b-xs" > <view class="form-item border-b m-b-md p-b-xs" >
<view class="label m-b-xs">{{$t('homeNewText.ee6')}}</view> <view class="label m-b-xs">{{$t('homeNewText.ee6')}}</view>
@ -83,27 +96,11 @@
<v-input class="color-light" v-model="form.code" :placeholder="$t('reg.a7')"> <v-input class="color-light" v-model="form.code" :placeholder="$t('reg.a7')">
<template #right> <template #right>
<!-- 手机 --> <!-- 手机 -->
<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-show="form.type==1"
url="/register/sendSmsCode"
:data="{
phone:form.account,
country_code:country_code || 86,
type:1
}"
></v-code>
<!-- 邮箱 --> <!-- 邮箱 -->
<v-code <v-code url="/register/sendEmailCode"
url="/register/sendEmailCode" :data="{email:form.account,type:1,gc_code: form.gr_code,gc_key: gc_key,}"
:data="{ v-show="form.type==2" @reGetGraphChe="reGetGraphChe"></v-code>
email:form.account,
type:1,
gc_code: form.gr_code,
gc_key: gc_key,
}"
v-show="form.type==2"
@reGetGraphChe="reGetGraphChe"
></v-code>
<!-- <v-code <!-- <v-code
url="/register/sendEmailCode" url="/register/sendEmailCode"
:data="{ :data="{
@ -140,11 +137,11 @@
<view class="label m-b-xs color-light">{{$t('common.c13')}}</view> <view class="label m-b-xs color-light">{{$t('common.c13')}}</view>
<v-input class="color-light" v-model="form.withdrawal_psw" type="password" :placeholder="$t('common.c14')"></v-input> <v-input class="color-light" v-model="form.withdrawal_psw" type="password" :placeholder="$t('common.c14')"></v-input>
</view> </view>
<view class="form-item border-b m-b-md p-b-xs"> <!-- <view class="form-item border-b m-b-md p-b-xs">
<view class="label m-b-xs">{{$t('reg.c6')}}</view> <view class="label m-b-xs">{{$t('reg.c6')}}</view>
<!-- <v-input class="color-light" :disabled="query.invite_code?true:false" v-model="form.invite_code" :placeholder="`${$t('reg.c7')}(${$t('reg.b4')})`"></v-input> --> <v-input class="color-light" :disabled="query.invite_code?true:false" v-model="form.invite_code" :placeholder="`${$t('reg.c7')}(${$t('reg.b4')})`"></v-input>
<v-input class="color-light" :disabled="query.invite_code?true:false" v-model="form.invite_code" :placeholder="`${$t('reg.c7')}`"></v-input> <v-input class="color-light" :disabled="query.invite_code?true:false" v-model="form.invite_code" :placeholder="`${$t('reg.c7')}`"></v-input>
</view> </view> -->
<view class="tips d-flex m-b-md fn-sm"> <view class="tips d-flex m-b-md fn-sm">
<van-checkbox <van-checkbox
:value="check" :value="check"
@ -193,7 +190,8 @@ export default {
password_confirmation: "", password_confirmation: "",
invite_code: "", invite_code: "",
gr_code: "", gr_code: "",
withdrawal_psw:"" withdrawal_psw:"",
phone:""
}, },
captcha: '', captcha: '',
Graph_che:'', Graph_che:'',
@ -237,10 +235,10 @@ export default {
} }
return; return;
} }
if (!this.form.invite_code) { // if (!this.form.invite_code) {
this.$toast(this.$t('reg.c7')); // this.$toast(this.$t('reg.c7'));
return; // return;
} // }
if (!this.form.withdrawal_psw) { if (!this.form.withdrawal_psw) {
this.$toast(this.$t('common.c14')); this.$toast(this.$t('common.c14'));
return; return;
@ -320,7 +318,7 @@ export default {
// //
login(){ 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) Member.login(this.form)
.then((res) => { .then((res) => {
this.loginSuccess(res.data); this.loginSuccess(res.data);

Loading…
Cancel
Save