From 42adf7605b0d7f272e1f26b22e5b92c00b293d80 Mon Sep 17 00:00:00 2001 From: yangfeng <wanwan926_4@163.com> Date: 星期五, 22 三月 2024 15:35:52 +0800 Subject: [PATCH] 登录页面接口、订单管理列表页面接口先跟进aps项目接口联调及部分代码删减 --- src/views/other/login/index.vue | 25 +++++++++++-------------- 1 files changed, 11 insertions(+), 14 deletions(-) diff --git a/src/views/other/login/index.vue b/src/views/other/login/index.vue index 794c981..0d8cfde 100644 --- a/src/views/other/login/index.vue +++ b/src/views/other/login/index.vue @@ -148,28 +148,25 @@ this.$refs.loginForm.validate((valid) => { if (valid) { // 鐧诲綍 - // 娉ㄦ剰 杩欓噷鐨勬紨绀烘病鏈変紶楠岃瘉鐮� - // 鍏蜂綋闇�瑕佷紶閫掔殑鏁版嵁璇疯嚜琛屼慨鏀逛唬鐮� login({ username: this.formLogin.username, password: this.formLogin.password, captcha: this.formLogin.code, captchaId: this.captchaId - }).then((rsp) => { - // 閲嶅畾鍚戝璞′笉瀛樺湪鍒欒繑鍥為《灞傝矾寰� - if (rsp != "") { - // this.$message.warning(rsp); - this.error = "濉叆淇℃伅閿欒锛岃妫�鏌ワ紒" - let _this = this - setTimeout(function () { - _this.error = "" - }, 3000) - if (rsp.indexOf("楠岃瘉鐮侀敊璇�") > -1) { + }).then((res) => { + if (res.code == 200) { + this.$message.success("鐧诲綍鎴愬姛") + this.$router.push({ path: "/orderManageModule/orderManage" }) + localStorage.setItem("token", res.data.token) + localStorage.setItem("username", res.data.user.username) + localStorage.setItem("uuid", res.data.user.id) + } else { + this.$message.warning(res.msg) + if (res.msg == "楠岃瘉鐮侀敊璇�") { this.getCaptchaData() } - return } - this.$router.push({ path: "/commonWeb" }) + console.log(res, "dddd") }) } else { // 鐧诲綍琛ㄥ崟鏍¢獙澶辫触 -- Gitblit v1.8.0