From 2b506494d7c73a3978004bd0b32a5d0783b25efa Mon Sep 17 00:00:00 2001 From: wang-hao-jie <1550036656@qq.com> Date: 星期四, 25 八月 2022 18:00:28 +0800 Subject: [PATCH] 默认更改列表 --- src/views/login.vue | 82 +++++++++++++++++++++++----------------- 1 files changed, 47 insertions(+), 35 deletions(-) diff --git a/src/views/login.vue b/src/views/login.vue index bc0cce4..1041cd8 100644 --- a/src/views/login.vue +++ b/src/views/login.vue @@ -10,7 +10,7 @@ <Col class="content"> <div> <Header /> - <div v-if="!socialLogining"> + <div v-if="!socialLogining" style="margin-top: 150px"> <Form ref="usernameLoginForm" :model="form" @@ -18,6 +18,9 @@ class="form" v-if="tabName == 'username'" > + <FormItem> + <h1 style="margin-left: 40%;">鐧� 闄�</h1> + </FormItem> <FormItem prop="username"> <Input v-model="form.username" @@ -39,34 +42,34 @@ autocomplete="off" /> </FormItem> - <!--<FormItem prop="imgCode">--> - <!--<Row--> - <!--type="flex"--> - <!--justify="space-between"--> - <!--style="align-items: center; overflow: hidden"--> - <!-->--> - <!--<Input--> - <!--v-model="form.imgCode"--> - <!--size="large"--> - <!--clearable--> - <!--placeholder="璇疯緭鍏ュ浘鐗囬獙璇佺爜"--> - <!--:maxlength="10"--> - <!--class="input-verify"--> - <!--/>--> - <!--<div--> - <!--class="code-image"--> - <!--style="position: relative; font-size: 12px"--> - <!-->--> - <!--<Spin v-if="loadingCaptcha" fix></Spin>--> - <!--<img--> - <!--:src="captchaImg"--> - <!--@click="getCaptchaImg"--> - <!--alt="鍔犺浇楠岃瘉鐮佸け璐�"--> - <!--style="width: 110px; cursor: pointer; display: block"--> - <!--/>--> - <!--</div>--> - <!--</Row>--> - <!--</FormItem>--> + <FormItem prop="imgCode"> + <Row + type="flex" + justify="space-between" + style="align-items: center; overflow: hidden" + > + <Input + v-model="form.imgCode" + size="large" + clearable + placeholder="璇疯緭鍏ュ浘鐗囬獙璇佺爜" + :maxlength="10" + class="input-verify" + /> + <div + class="code-image" + style="position: relative; font-size: 12px" + > + <Spin v-if="loadingCaptcha" fix></Spin> + <img + :src="captchaImg" + @click="getCaptchaImg" + alt="鍔犺浇楠岃瘉鐮佸け璐�" + style="width: 110px; cursor: pointer; display: block" + /> + </div> + </Row> + </FormItem> </Form> <!--<Row justify="space-between" align="middle">--> @@ -121,6 +124,7 @@ <!--</VueFurcateTree>--> <!--</div>--> + </template> @@ -191,6 +195,7 @@ } ], showMore: false, + code:"", captchaId: "", captchaImg: "", loadingCaptcha: true, @@ -207,6 +212,7 @@ password: "", code: "", }, + showChangePass: false, }; }, methods: { @@ -215,7 +221,8 @@ initCaptcha().then((res) => { this.loadingCaptcha = false; if (res.success) { - this.captchaId = res.result; + this.code = res.result.code; + this.captchaId = res.result.captchaId; this.captchaImg = drawCodeImage + this.captchaId; } }); @@ -284,6 +291,11 @@ }, submitLogin() { if (this.tabName == "username") { + if(this.code.toUpperCase()!=this.form.imgCode.toUpperCase()){ + this.$Message.error("楠岃瘉鐮侀敊璇�"); + this.getCaptchaImg(); + return + } this.loading = true; login({ username: this.form.username, @@ -478,16 +490,16 @@ }); }, test() { - this.$Notice.info({ - title: "娴嬭瘯浣撻獙璐﹀彿", - desc: "璐﹀彿锛歵est鎴杢est2<br>瀵嗙爜锛�123456", - }); + // this.$Notice.info({ + // title: "娴嬭瘯浣撻獙璐﹀彿", + // desc: "璐﹀彿锛歵est鎴杢est2<br>瀵嗙爜锛�123456", + // }); }, }, mounted() { //this.showNotice(); this.relatedLogin(); - //this.getCaptchaImg(); + this.getCaptchaImg(); }, }; </script> -- Gitblit v1.9.1