This commit is contained in:
commie
2025-11-23 01:01:52 +08:00
parent 6ec389ff41
commit 0783e46b4b
21 changed files with 6409 additions and 1264 deletions
+19 -3
View File
@@ -10,7 +10,11 @@
marginTop: '20rpx',
minWidth: '200rpx',
}" ref="registerForm">
<u-form-item prop="phoneNumber" label="手机号码">
<u-form-item prop="email" label="邮箱" v-if="userInfo.type == 'email'">
<u-input v-model="userInfo.email" border="surround" placeholder="请输入邮箱" clearable>
</u-input>
</u-form-item>
<u-form-item prop="phoneNumber" label="手机号码" v-if="userInfo.type == 'mobile'">
<u-input v-model="userInfo.phoneNumber" border="surround" placeholder="请输入手机号码" clearable>
<view slot="prefix" class="phoneNumber_areacode" @click="showPicker">
<text class="areacode_content">+{{ userInfo.areaCode }}</text>
@@ -50,6 +54,7 @@
email: "",
areaCode: "86",
invitationCode: "",
type:'email',
},
checked: [true],
rules: {
@@ -60,6 +65,12 @@
trigger: ["blur", "change"],
pattern: /^\d{11}$/,
}, ],
email: [{
type: "email",
required: true,
message: "请输入邮箱",
trigger: ["blur", "change"]
}, ],
},
isRegister: true,
pageStatus: "normal",
@@ -67,15 +78,20 @@
},
onLoad(param) {
this.isRegister = JSON.parse(param.isRegister);
if(process.env.NODE_ENV == 'development'){
this.userInfo.email = "commiu@outlook.com";
}
},
methods: {
sendSms() {
this.$refs.registerForm.validate().then((valid) => {
const options = {
phoneNumber: this.userInfo.phoneNumber,
mobile: this.userInfo.mobile,
email: this.userInfo.email,
areaCode: `+${this.userInfo.areaCode}`,
usedFor: this.isRegister ? SmsUserFor.Register : SmsUserFor.Reset,
event: this.isRegister ? 'register' : "reset_pwd",
invitationCode: this.userInfo.invitationCode,
type:this.userInfo.type
};
businessSendSms(options)
.then(() => {