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

save

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