diff --git a/src/api/modules/mer_admin.js b/src/api/modules/mer_admin.js index 378d992..b7e7607 100644 --- a/src/api/modules/mer_admin.js +++ b/src/api/modules/mer_admin.js @@ -15,9 +15,8 @@ export const mer_admin = { * @returns */ loginByAccount: (params) => { - return $http.post(`/auth/login`, { + return $http.post(`/admin-api/auth/login`, { ...params, - type: 1, }); }, loginByMobile: (params) => { @@ -155,5 +154,4 @@ export const mer_admin = { params: { id }, }); }, - }; diff --git a/src/views/common/login.vue b/src/views/common/login.vue index b763c0e..8b921b9 100644 --- a/src/views/common/login.vue +++ b/src/views/common/login.vue @@ -3,9 +3,7 @@
-

- 大妈集市商户端 -

+

大妈集市商户端

@@ -13,6 +11,12 @@
@@ -144,6 +190,7 @@ import { getUUID } from "@/utils"; export default { data() { return { + value: true, loginWay: "code_login", loginType: "教育局", mobileCodeCountDown: 0, @@ -256,6 +303,31 @@ export default { }); }); }, + handleLogin() { + const _loginTypeMapper = { + 管理员: "ROLE_ADMIN", + 教育局: "ROLE_EDU", + 学校: "ROLE_SCHOOL", + 教师: "ROLE_TEACHER", + }; + this.$refs["dataForm"].validate((valid) => { + console.log("账号密码登录"); + this.$api.mer_admin + .loginByAccount({ + // role: _loginTypeMapper[this.loginType], + userName: this.dataForm.userName, + password: this.dataForm.password, + }) + .then(({ data }) => { + console.log("data", data); + this.$cookie.set("token", data.data.token); + this.$router.replace({ name: "home" }); + }) + .catch((err) => { + console.log(err); + }); + }); + }, //获取短信验证码 getCode() { //正则表达式校验手机号是否合法 diff --git a/src/views/modules/logistics-fare/logistics-template/index.vue b/src/views/modules/logistics-fare/logistics-template/index.vue index 2086987..4049b63 100644 --- a/src/views/modules/logistics-fare/logistics-template/index.vue +++ b/src/views/modules/logistics-fare/logistics-template/index.vue @@ -21,10 +21,7 @@ > - + 搜索 + 重置 添加运费模板