From 6229483b0b1d1d26d9a76b8e7e87607259a289fb Mon Sep 17 00:00:00 2001 From: Tomas <tomasysh@gmail.com> Date: 星期二, 22 三月 2022 12:07:28 +0800 Subject: [PATCH] clean code: remove console.log() - 遺漏的檔案 --- PAMapp/pages/agentInfo/edit/_agentNo.vue | 41 ++++++++++++++++++++++++++++++++++++----- 1 files changed, 36 insertions(+), 5 deletions(-) diff --git a/PAMapp/pages/agentInfo/edit/_agentNo.vue b/PAMapp/pages/agentInfo/edit/_agentNo.vue index ae47457..7d3ebe8 100644 --- a/PAMapp/pages/agentInfo/edit/_agentNo.vue +++ b/PAMapp/pages/agentInfo/edit/_agentNo.vue @@ -1,5 +1,5 @@ <template> - <div class="edit-agent-info-page"> + <div class="edit-agent-info-page" v-if="!!agentInfo"> <el-row type="flex" @@ -64,6 +64,27 @@ :class="{'is-invalid': !phoneValid}" maxlength="10" minlength="10"></el-input> + </div> + </el-col> + </el-row> + + <el-row + type="flex" + class="pam-paragraph"> + <el-col :span="24" class="pam-field"> + <div class="pam-field__label pam-progress__label"> + <div> + <div class="pam-field__title mb-10"> + <i class="pam-icon icon-comment" + ></i>靽∠拳 + <span class="hint text--bold" v-show="!emailValid">靽∠拳�撘�炊</span> + <span class="hint text--bold" v-show="editInfoValue.email.length === 0">靽∠拳�敹‵</span> + </div> + </div> + <el-input + v-model="editInfoValue.email" + :class="{'is-invalid': !emailValid}" + ></el-input> </div> </el-col> </el-row> @@ -294,7 +315,8 @@ awards : '', communicationStyle: [] as string[], photoBase64 : '', - phoneNumber : '' + phoneNumber : '', + email : '', }; communicationStyleList: string[] = agentCommunicationStyleList; @@ -375,7 +397,8 @@ experiences : agentInfo.experiences || '', awards : agentInfo.awards || '', communicationStyle: agentInfo.communicationStyle || '', - photoBase64 : '' + photoBase64 : '', + email : agentInfo.email || '' }; this.editInfoValue = { @@ -386,6 +409,7 @@ } } + ////////////////////////////////////////////////////////////////////// editAgentInfoSetting(): void { @@ -393,7 +417,8 @@ ...this.editInfoValue, communicationStyle: this.editInfoValue.communicationStyle.join('��'), serveArea: this.editInfoValue.serveArea.join('��'), - } + }; + accountSettingService.editAgentInfoSetting(editSettingInfo).then((res: AgentInfoSetting) => { this.isInfoUpdate = true; this.updateConsultantDetail(editSettingInfo.agentNo); @@ -437,6 +462,11 @@ : true; } + get emailValid() { + const rule = /^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/; + return this.editInfoValue.email ? rule.test(this.editInfoValue.email) : true; + } + get isSubmitBtnDisabled(): boolean { const isFormValid = this.editInfoValue.name && this.editInfoValue.title @@ -447,7 +477,8 @@ && this.editInfoValue.phoneNumber.length && this.editInfoValue.seniorityYear && this.editInfoValue.expertise.length - && this.editInfoValue.communicationStyle.length; + && this.editInfoValue.communicationStyle.length + && this.editInfoValue.email.length; return !isFormValid } } -- Gitblit v1.8.0