mirror of
https://gitee.com/huangge1199_admin/vue-pro.git
synced 2024-11-26 01:01:52 +08:00
多模块重构 9:调整的请求 URL
This commit is contained in:
parent
bdcf00d8a0
commit
2b630ef3f2
@ -9,7 +9,7 @@ export function login(username, password, code, uuid) {
|
||||
uuid
|
||||
}
|
||||
return request({
|
||||
url: '/login',
|
||||
url: '/system/login',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
@ -18,7 +18,7 @@ export function login(username, password, code, uuid) {
|
||||
// 获取用户详细信息
|
||||
export function getInfo() {
|
||||
return request({
|
||||
url: '/get-permission-info',
|
||||
url: '/system/get-permission-info',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
@ -26,7 +26,7 @@ export function getInfo() {
|
||||
// 退出方法
|
||||
export function logout() {
|
||||
return request({
|
||||
url: '/logout',
|
||||
url: '/system/logout',
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
@ -42,7 +42,7 @@ export function getCodeImg() {
|
||||
// 社交授权的跳转
|
||||
export function socialAuthRedirect(type, redirectUri) {
|
||||
return request({
|
||||
url: '/social-auth-redirect?type=' + type + '&redirectUri=' + redirectUri,
|
||||
url: '/system/social-auth-redirect?type=' + type + '&redirectUri=' + redirectUri,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
@ -50,7 +50,7 @@ export function socialAuthRedirect(type, redirectUri) {
|
||||
// 社交登录,使用 code 授权码
|
||||
export function socialLogin(type, code, state) {
|
||||
return request({
|
||||
url: '/social-login',
|
||||
url: '/system/social-login',
|
||||
method: 'post',
|
||||
data: {
|
||||
type,
|
||||
@ -63,7 +63,7 @@ export function socialLogin(type, code, state) {
|
||||
// 社交登录,使用 code 授权码 + + 账号密码
|
||||
export function socialLogin2(type, code, state, username, password) {
|
||||
return request({
|
||||
url: '/social-login2',
|
||||
url: '/system/social-login2',
|
||||
method: 'post',
|
||||
data: {
|
||||
type,
|
||||
@ -78,7 +78,7 @@ export function socialLogin2(type, code, state, username, password) {
|
||||
// 社交绑定,使用 code 授权码
|
||||
export function socialBind(type, code, state) {
|
||||
return request({
|
||||
url: '/social-bind',
|
||||
url: '/system/social-bind',
|
||||
method: 'post',
|
||||
data: {
|
||||
type,
|
||||
@ -91,7 +91,7 @@ export function socialBind(type, code, state) {
|
||||
// 取消社交绑定
|
||||
export function socialUnbind(type, unionId) {
|
||||
return request({
|
||||
url: '/social-unbind',
|
||||
url: '/system/social-unbind',
|
||||
method: 'delete',
|
||||
data: {
|
||||
type,
|
||||
|
@ -3,7 +3,7 @@ import request from '@/utils/request'
|
||||
// 获取路由
|
||||
export const getRouters = () => {
|
||||
return request({
|
||||
url: '/list-menus',
|
||||
url: '/system/list-menus',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
@ -18,6 +18,10 @@ const mutations = {
|
||||
const actions = {
|
||||
loadDictDatas({ commit }) {
|
||||
listSimpleDictDatas().then(response => {
|
||||
// 如果未加载到数据,则直接返回
|
||||
if (!response.data) {
|
||||
return;
|
||||
}
|
||||
// 设置数据
|
||||
const dictDataMap = {}
|
||||
response.data.forEach(dictData => {
|
||||
|
@ -9,7 +9,7 @@ axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8'
|
||||
// 创建axios实例
|
||||
const service = axios.create({
|
||||
// axios中请求配置有baseURL选项,表示请求URL公共部分
|
||||
baseURL: process.env.VUE_APP_BASE_API + '/api/', // 此处的 /api/ 地址,原因是后端的基础路径为 /api/
|
||||
baseURL: process.env.VUE_APP_BASE_API + '/admin-api/', // 此处的 /admin-api/ 地址,原因是后端的基础路径为 /admin-api/
|
||||
// 超时
|
||||
timeout: 10000
|
||||
})
|
||||
|
2
更新日志.md
2
更新日志.md
@ -22,12 +22,12 @@
|
||||
*【重构】大模块按照多 Maven Module 的方式拆分,提升可维护性,为后续重构 onemall 提供基础
|
||||
*【重构】Spring Security 支持读取多种用户类型,从不同的数据库表,从而实现单项目提供管理后台、用户 APP 的不同 RESTful API 接口
|
||||
|
||||
|
||||
### 🐞 Bug Fixes
|
||||
|
||||
*【修复】用户无权限访问 指定 API 时,未返回 FORBIDDEN 结果码
|
||||
*【修复】定时任务刷新本地缓存时,无租户上线文,导致查询报错
|
||||
*【修复】配置中心只加载了删除的配置
|
||||
*【修复】管理后台 UI 超时登录后,返回登陆界面时,由于未登陆加载不到字典数据,导致报错的问题
|
||||
|
||||
### 🔨 Dependency Upgrades
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user