Commit 284ea16d authored by 沈良进's avatar 沈良进

save

parent 99ca8227
...@@ -185,6 +185,7 @@ ...@@ -185,6 +185,7 @@
v-model="loginMsg.PassWord" v-model="loginMsg.PassWord"
type="PassWord" type="PassWord"
autocomplete="off" autocomplete="off"
placeholder="請輸入密碼"
:rules="[(val) => !!val || '請輸入密碼']" :rules="[(val) => !!val || '請輸入密碼']"
ref="pwd" ref="pwd"
/> />
......
...@@ -90,13 +90,63 @@ ...@@ -90,13 +90,63 @@
label="发送验证码" label="发送验证码"
@click="sendVerify" @click="sendVerify"
/> />
<div v-else class="mt q-mb-sm"> <div
@click="sendVerify" v-else class="mt q-mb-sm">
<q-input outlined v-model="loginMsg.Code" type="text" /> <q-input outlined v-model="loginMsg.Code" type="text" />
<div class="q-mt-sm" :class="cutDown ? 'text-grey-6' : ''"> <div class="q-mt-sm" :class="cutDown ? 'text-grey-6' : ''">
{{ cutDown ? cutDown + "秒后可重新发送" : "重新發送驗證碼" }} {{ cutDown ? cutDown + "秒后可重新发送" : "重新發送驗證碼" }}
</div> </div>
</div> </div>
</div> </div>
<q-input
filled
v-model="loginMsg.Mailbox"
class="q-mt-xl"
label="輸入郵箱"
style="ime-mode: disabled"
aria-autocomplete="off"
:rules="[
(val) =>
/^[a-zA-Z0-9]+([-_.][A-Za-zd]+)*@([a-zA-Z0-9]+[-.])+[A-Za-zd]{2,5}$/.test(
val
) || '請輸入正確的郵箱地址',
]"
>
<template
v-slot:after
>
<q-btn
unelevated
color="text-white bg-secondary"
:disable="
!/^[a-zA-Z0-9]+([-_.][A-Za-zd]+)*@([a-zA-Z0-9]+[-.])+[A-Za-zd]{2,5}$/.test(
loginMsg.Mailbox
) || cutDown > 0
"
style="height: 46px; margin-top: -10px"
filled
:loading="inSending"
:label="
!isSend
? '发送验证码'
: cutDown > 0
? cutDown + '秒'
: '重新發送'
"
@click="sendVerify"
/>
</template>
</q-input>
<div
class="q-mt-md"
>
<verify-code
:digit="6"
hint="請輸入正確的驗證碼"
ref="verify"
v-model="loginMsg.MailCode"
></verify-code>
</div>
<div class="q-mb-xl"> <div class="q-mb-xl">
<q-btn <q-btn
color="primary" color="primary"
...@@ -114,10 +164,11 @@ ...@@ -114,10 +164,11 @@
<script> <script>
import QrcodeVue from "qrcode.vue"; import QrcodeVue from "qrcode.vue";
import verifyCode from "src/components/auth/verifyCode.vue";
export default { export default {
name: "Login", name: "Login",
components: { components: {
QrcodeVue, QrcodeVue,verifyCode
}, },
data() { data() {
return { return {
...@@ -135,6 +186,7 @@ export default { ...@@ -135,6 +186,7 @@ export default {
logo: "", logo: "",
flag: 2, flag: 2,
mylabel: "注销账户", mylabel: "注销账户",
inSending: false,
}; };
}, },
created() {}, created() {},
...@@ -142,7 +194,7 @@ export default { ...@@ -142,7 +194,7 @@ export default {
}, },
methods: { methods: {
sendVerify() { sendVerify() {
if(this.inSending) return if(this.inSending || this.cutDown) return
this.inSending = true this.inSending = true
if (this.verifyEmail()) { if (this.verifyEmail()) {
this.apipost('directCustomer_post_SendMail', {Mailbox: this.loginMsg.EMail, SendType: 4}, (res) => { this.apipost('directCustomer_post_SendMail', {Mailbox: this.loginMsg.EMail, SendType: 4}, (res) => {
......
...@@ -55,7 +55,6 @@ ...@@ -55,7 +55,6 @@
font-size: 28px; font-size: 28px;
cursor: pointer; cursor: pointer;
} }
.login-box .q-field__control { .login-box .q-field__control {
height: 46px; height: 46px;
} }
...@@ -75,27 +74,54 @@ ...@@ -75,27 +74,54 @@
<div class="login-box" :class="$q.platform.is.desktop ? 'login-box-pc' : ''"> <div class="login-box" :class="$q.platform.is.desktop ? 'login-box-pc' : ''">
<div class="f34 bold">修改邮箱</div> <div class="f34 bold">修改邮箱</div>
<div class="login_row"> <div class="login_row">
<div class="form-group"> <q-input
<div class="login_labelName">輸入郵箱</div> filled
<q-input outlined v-model="loginMsg.EMail" /> v-model="loginMsg.EMail"
<div class="primary q-mt-sm" v-show="tips">邮箱格式有误,请核实</div> class="q-mt-xl"
</div> label="輸入郵箱"
<div> style="ime-mode: disabled"
<q-btn aria-autocomplete="off"
v-if="!isSend" class="q-mb-lg" :rules="[
unelevated (val) =>
color="grey-3" /^[a-zA-Z0-9]+([-_.][A-Za-zd]+)*@([a-zA-Z0-9]+[-.])+[A-Za-zd]{2,5}$/.test(
style="width: 100%; color: #8B8B8B !important; height: 50px; margin-top: 20px" val
filled ) || '請輸入正確的郵箱地址',
label="发送验证码" ]"
@click="sendVerify" >
/> <template
<div v-else class="mt q-mb-sm"> v-slot:after
<q-input outlined v-model="loginMsg.Code" type="text" /> >
<div class="q-mt-sm" :class="cutDown ? 'text-grey-6' : ''"> <q-btn
{{ cutDown ? cutDown + "秒后可重新发送" : "重新發送驗證碼" }} unelevated
</div> color="text-white bg-secondary"
</div> :disable="
!/^[a-zA-Z0-9]+([-_.][A-Za-zd]+)*@([a-zA-Z0-9]+[-.])+[A-Za-zd]{2,5}$/.test(
loginMsg.EMail
) || cutDown > 0
"
style="height: 46px; margin-top: -10px"
filled
:loading="inSending"
:label="
!isSend
? '发送验证码'
: cutDown > 0
? cutDown + '秒'
: '重新發送'
"
@click="sendVerify"
/>
</template>
</q-input>
<div
class="q-mt-md"
>
<verify-code
:digit="6"
hint="請輸入正確的驗證碼"
ref="verify"
v-model="loginMsg.Code"
></verify-code>
</div> </div>
<div class="q-mb-xl"> <div class="q-mb-xl">
<q-btn <q-btn
...@@ -114,10 +140,11 @@ ...@@ -114,10 +140,11 @@
<script> <script>
import QrcodeVue from "qrcode.vue"; import QrcodeVue from "qrcode.vue";
import verifyCode from "src/components/auth/verifyCode.vue";
export default { export default {
name: "Login", name: "Login",
components: { components: {
QrcodeVue, QrcodeVue,verifyCode
}, },
data() { data() {
return { return {
...@@ -135,6 +162,7 @@ export default { ...@@ -135,6 +162,7 @@ export default {
logo: "", logo: "",
flag: 2, flag: 2,
mylabel: "修改邮箱", mylabel: "修改邮箱",
inSending: false,
}; };
}, },
created() {}, created() {},
...@@ -142,7 +170,7 @@ export default { ...@@ -142,7 +170,7 @@ export default {
}, },
methods: { methods: {
sendVerify() { sendVerify() {
if(this.inSending) return if(this.inSending || this.cutDown) return
this.inSending = true this.inSending = true
if (this.verifyEmail()) { if (this.verifyEmail()) {
this.apipost('directCustomer_post_SendMail', {Mailbox: this.loginMsg.EMail, SendType: 5}, (res) => { this.apipost('directCustomer_post_SendMail', {Mailbox: this.loginMsg.EMail, SendType: 5}, (res) => {
......
...@@ -14,9 +14,6 @@ ...@@ -14,9 +14,6 @@
padding: 0 35px; padding: 0 35px;
line-height: 42px; line-height: 42px;
} }
::v-deep .q-field__control {
height: 40px;
}
.title { .title {
margin-top: 20px; margin-top: 20px;
margin-bottom: 10px; margin-bottom: 10px;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment