|
@@ -55,15 +55,15 @@
|
|
</template>
|
|
</template>
|
|
</el-input>
|
|
</el-input>
|
|
<div style="margin-bottom: 10px; text-align: left">
|
|
<div style="margin-bottom: 10px; text-align: left">
|
|
- <el-button link type="primary" @click="clickForgotPassword"
|
|
|
|
|
|
+ <!-- <el-button link type="primary" @click="clickForgotPassword"
|
|
>忘记密码?
|
|
>忘记密码?
|
|
- </el-button>
|
|
|
|
|
|
+ </el-button> -->
|
|
</div>
|
|
</div>
|
|
<el-button
|
|
<el-button
|
|
size="large"
|
|
size="large"
|
|
style="width: 100%"
|
|
style="width: 100%"
|
|
type="primary"
|
|
type="primary"
|
|
- @click="submit"
|
|
|
|
|
|
+ @click="loginSubmit"
|
|
>登录
|
|
>登录
|
|
</el-button>
|
|
</el-button>
|
|
</el-form>
|
|
</el-form>
|
|
@@ -120,6 +120,35 @@ const checkForm = () => {
|
|
};
|
|
};
|
|
|
|
|
|
const userStore = useUserStore();
|
|
const userStore = useUserStore();
|
|
|
|
+const loginSubmit = () => {
|
|
|
|
+ // console.log("3333");
|
|
|
|
+ checkForm();
|
|
|
|
+ const params = {
|
|
|
|
+ codeRs: form.codeRs,
|
|
|
|
+ password: form.password,
|
|
|
|
+ };
|
|
|
|
+ loginApi(params).then(res => {
|
|
|
|
+ // console.log("11111111111111", res);
|
|
|
|
+ localStorage.clear();
|
|
|
|
+ userStore.setUserInfo(res);
|
|
|
|
+ systemConfig.setConfig(res.userConfigJson);
|
|
|
|
+ router.push("/dashboard");
|
|
|
|
+ // if (!checkPasswordStrength(params.password) && !isDev) {
|
|
|
|
+ // changePassword(false).then(newPassword => {
|
|
|
|
+ // form.password = newPassword;
|
|
|
|
+ // submit();
|
|
|
|
+ // });
|
|
|
|
+ // } else {
|
|
|
|
+ // changeToken();
|
|
|
|
+ // const url = XEUtils.parseUrl(window.location.href);
|
|
|
|
+ // if (url.searchQuery?.redirect) {
|
|
|
|
+ // location.href = url.search.replace("?redirect=", "");
|
|
|
|
+ // } else {
|
|
|
|
+ // router.push("/dashboard");
|
|
|
|
+ // }
|
|
|
|
+ // }
|
|
|
|
+ });
|
|
|
|
+};
|
|
const submit = () => {
|
|
const submit = () => {
|
|
checkForm();
|
|
checkForm();
|
|
const params = {
|
|
const params = {
|