Browse Source

后台登录

aleyds 1 year ago
parent
commit
8c9e31c952
4 changed files with 24 additions and 24 deletions
  1. 4 4
      src/api/login.js
  2. 1 1
      src/api/menu.js
  3. 14 14
      src/api/system/user.js
  4. 5 5
      src/views/system/user/index.vue

+ 4 - 4
src/api/login.js

@@ -9,7 +9,7 @@ export function login(username, password, code, uuid) {
     uuid
   }
   return request({
-    url: '/system/auth/login',
+    url: '/merchant/merchantAuth/login',
     headers: {
       isToken: false
     },
@@ -21,7 +21,7 @@ export function login(username, password, code, uuid) {
 // 注册方法
 export function register(data) {
   return request({
-    url: '/system/user/register',
+    url: '/merchant/user/register',
     headers: {
       isToken: false
     },
@@ -33,7 +33,7 @@ export function register(data) {
 // 获取用户详细信息
 export function getInfo() {
   return request({
-    url: '/system/user/getInfo',
+    url: '/merchant/merchantSysuser/getInfo',
     method: 'get'
   })
 }
@@ -41,7 +41,7 @@ export function getInfo() {
 // 退出方法
 export function logout() {
   return request({
-    url: '/system/auth/logout',
+    url: '/merchant/merchantAuth/logout',
     method: 'post'
   })
 }

+ 1 - 1
src/api/menu.js

@@ -3,7 +3,7 @@ import request from '@/utils/request'
 // 获取路由
 export const getRouters = () => {
   return request({
-    url: '/system/menu/getRouters',
+    url: '/merchant/merchantSysmenu/getRouters',
     method: 'get'
   })
 }

+ 14 - 14
src/api/system/user.js

@@ -4,7 +4,7 @@ import { parseStrEmpty } from "@/utils/ruoyi";
 // 查询用户列表
 export function listUser(query) {
   return request({
-    url: '/system/user/list',
+    url: '/merchant/merchantSysuser/pageList',
     method: 'get',
     params: query
   })
@@ -13,7 +13,7 @@ export function listUser(query) {
 // 查询用户详细
 export function getUser(userId) {
   return request({
-    url: '/system/user/' + parseStrEmpty(userId),
+    url: '/merchant/merchantSysuser/' + parseStrEmpty(userId),
     method: 'get'
   })
 }
@@ -21,7 +21,7 @@ export function getUser(userId) {
 // 新增用户
 export function addUser(data) {
   return request({
-    url: '/system/user',
+    url: '/merchant/merchantSysuser',
     method: 'post',
     data: data
   })
@@ -30,7 +30,7 @@ export function addUser(data) {
 // 修改用户
 export function updateUser(data) {
   return request({
-    url: '/system/user',
+    url: '/merchant/merchantSysuser',
     method: 'put',
     data: data
   })
@@ -39,7 +39,7 @@ export function updateUser(data) {
 // 删除用户
 export function delUser(userId) {
   return request({
-    url: '/system/user/' + userId,
+    url: '/merchant/merchantSysuser/' + userId,
     method: 'delete'
   })
 }
@@ -51,7 +51,7 @@ export function resetUserPwd(userId, password) {
     password
   }
   return request({
-    url: '/system/user/resetPwd',
+    url: '/merchant/merchantSysuser/resetPwd',
     method: 'put',
     data: data
   })
@@ -64,7 +64,7 @@ export function changeUserStatus(userId, status) {
     status
   }
   return request({
-    url: '/system/user/changeStatus',
+    url: '/merchant/merchantSysuser/changeStatus',
     method: 'put',
     data: data
   })
@@ -73,7 +73,7 @@ export function changeUserStatus(userId, status) {
 // 查询用户个人信息
 export function getUserProfile() {
   return request({
-    url: '/system/user/profile',
+    url: '/merchant/merchantSysuser/profile',
     method: 'get'
   })
 }
@@ -81,7 +81,7 @@ export function getUserProfile() {
 // 修改用户个人信息
 export function updateUserProfile(data) {
   return request({
-    url: '/system/user/profile',
+    url: '/merchant/merchantSysuser/profile',
     method: 'put',
     data: data
   })
@@ -94,7 +94,7 @@ export function updateUserPwd(oldPassword, newPassword) {
     newPassword
   }
   return request({
-    url: '/system/user/profile/updatePwd',
+    url: '/merchant/merchantSysuser/profile/updatePwd',
     method: 'put',
     params: data
   })
@@ -103,7 +103,7 @@ export function updateUserPwd(oldPassword, newPassword) {
 // 用户头像上传
 export function uploadAvatar(data) {
   return request({
-    url: '/system/user/profile/avatar',
+    url: '/merchant/merchantSysuser/profile/avatar',
     method: 'post',
     data: data
   })
@@ -112,7 +112,7 @@ export function uploadAvatar(data) {
 // 查询授权角色
 export function getAuthRole(userId) {
   return request({
-    url: '/system/user/authRole/' + userId,
+    url: '/merchant/merchantSysuser/authRole/' + userId,
     method: 'get'
   })
 }
@@ -120,7 +120,7 @@ export function getAuthRole(userId) {
 // 保存授权角色
 export function updateAuthRole(data) {
   return request({
-    url: '/system/user/authRole',
+    url: '/merchant/merchantSysuser/authRole',
     method: 'put',
     params: data
   })
@@ -129,7 +129,7 @@ export function updateAuthRole(data) {
 // 查询部门下拉树结构
 export function deptTreeSelect() {
   return request({
-    url: '/system/user/deptTree',
+    url: '/merchant/merchantSysdept/treeselect',
     method: 'get'
   })
 }

+ 5 - 5
src/views/system/user/index.vue

@@ -138,8 +138,8 @@
 
         <el-table v-loading="loading" :data="userList" @selection-change="handleSelectionChange">
           <el-table-column type="selection" width="50" align="center" />
-          <el-table-column label="用户编号" align="center" key="userId" prop="userId" v-if="columns[0].visible" />
-          <el-table-column label="用户名称" align="center" key="userName" prop="userName" v-if="columns[1].visible" :show-overflow-tooltip="true" />
+          <el-table-column label="用户编号" align="center" key="userId" prop="id" v-if="columns[0].visible" />
+          <el-table-column label="用户名称" align="center" key="userName" prop="name" v-if="columns[1].visible" :show-overflow-tooltip="true" />
           <el-table-column label="用户昵称" align="center" key="nickName" prop="nickName" v-if="columns[2].visible" :show-overflow-tooltip="true" />
           <el-table-column label="部门" align="center" key="deptName" prop="dept.deptName" v-if="columns[3].visible" :show-overflow-tooltip="true" />
           <el-table-column label="手机号码" align="center" key="phonenumber" prop="phonenumber" v-if="columns[4].visible" width="120" />
@@ -471,8 +471,8 @@ export default {
     getList() {
       this.loading = true;
       listUser(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
-          this.userList = response.rows;
-          this.total = response.total;
+          this.userList = response.data.rows;
+          this.total = response.data.total;
           this.loading = false;
         }
       );
@@ -673,4 +673,4 @@ export default {
     }
   }
 };
-</script>
+</script>