2 Commits

Author SHA1 Message Date
8e59702f0b 申请青年编委单独页面校验显示 2026-05-06 10:49:41 +08:00
ea1564018e 必填项 变成英文提示词 2026-05-06 09:52:32 +08:00
2 changed files with 21 additions and 7 deletions

View File

@@ -27,14 +27,13 @@
type="text"
v-model="formData.engName"
placeholder=""
required
autocomplete="off"
/>
</div>
<div class="form-group">
<label><span class="required-star">*</span> Email (QQ mail is not allowed)</label>
<input type="email" v-model="formData.email" placeholder="" required autocomplete="off" />
<input type="email" v-model="formData.email" placeholder="" autocomplete="off" />
</div>
<div class="form-group">
@@ -43,7 +42,6 @@
type="text"
v-model="formData.password"
placeholder=""
required
autocomplete="off"
/>
</div>
@@ -317,7 +315,22 @@ export default {
return;
}
const email = (this.formData.email || '').toLowerCase();
const engName = (this.formData.engName || '').trim();
if (!engName) {
this.alertError('Please enter your English name.');
return;
}
const emailRaw = (this.formData.email || '').trim();
if (!emailRaw) {
this.alertError('Please enter your email address.');
return;
}
const email = emailRaw.toLowerCase();
if (!/^[-._A-Za-z0-9]+@[A-Za-z0-9_-]+(\.[A-Za-z0-9_-]+)+$/.test(email)) {
this.alertError('Please enter a valid email address.');
return;
}
if (email.endsWith('@qq.com')) {
this.alertError('Registration failed: QQ email addresses are not accepted.');
return;
@@ -340,8 +353,8 @@ export default {
.post('api/Ucenter/submitApplyYboardForExpert', {
journal_id: this.journalId,
expert_id: this.expertId,
name: this.formData.engName,
email: this.formData.email,
name: engName,
email: emailRaw,
cv: this.uploadedCvPath,
password: this.formData.password
})

View File

@@ -171,6 +171,7 @@ import MailDetail from '../../components/page/components/email/MailDetail.vue';
export default {
data() {
return {
baseUrl: this.Common.baseUrl,
currentFolder: 'inbox',
searchKeyword: '',
syncLoading: false,
@@ -645,7 +646,7 @@ fetchLatestSingleMail(jEmailId, journalId) {
},
buildSseUrl(jEmailId) {
// 与现有 axios baseURL=/api + 相对路径 规则一致GET + query 传参
const base = `/api/${API.inboxSse}`;
const base = `${this.baseUrl}${API.inboxSse}`;
const q = new URLSearchParams({ j_email_id: String(jEmailId) }).toString();
return `${base}?${q}`;
},