Skip to content

Commit 438ead7

Browse files
committed
Merge branch 'master' of https://gitee.com/zhijiantianya/ruoyi-vue-pro into feature/bpm-back
2 parents 779d897 + c86d9fa commit 438ead7

File tree

53 files changed

+2681
-1274
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+2681
-1274
lines changed

.env.dev

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ ENV = 'development'
55
VUE_APP_TITLE = 芋道管理系统
66

77
# 芋道管理系统/开发环境
8-
VUE_APP_BASE_API = 'http://192.168.225.2'
8+
VUE_APP_BASE_API = 'http://localhost:48080'
99

1010
# 路由懒加载
1111
VUE_CLI_BABEL_TRANSPILE_MODULES = true

.npmrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
phantomjs_cdnurl=http://cnpmjs.org/downloads
2+
chromedriver_cdnurl=http://cdn.npm.taobao.org/dist/chromedriver
3+
sass_binary_site=https://npm.taobao.org/mirrors/node-sass/
4+
registry=https://registry.npmmirror.com

package.json

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
"build:dev": "vue-cli-service build --mode dev",
1313
"build:demo1024": "vue-cli-service build --mode demo1024",
1414
"preview": "node build/index.js --preview",
15-
"lint": "eslint --ext .js,.vue src"
15+
"lint": "eslint --ext .js,.vue src",
16+
"clean": "rimraf node_modules"
1617
},
1718
"husky": {
1819
"hooks": {
@@ -62,11 +63,11 @@
6263
"vue-router": "3.4.9",
6364
"vuedraggable": "2.24.3",
6465
"vuex": "3.6.0",
65-
"bpmn-js-token-simulation": "^0.10.0",
66-
"min-dash": "^3.5.2",
67-
"xml-js": "^1.6.11",
68-
"@babel/parser": "^7.7.4",
69-
"throttle-debounce": "^2.1.0"
66+
"bpmn-js-token-simulation": "0.10.0",
67+
"min-dash": "3.5.2",
68+
"xml-js": "1.6.11",
69+
"@babel/parser": "7.7.4",
70+
"throttle-debounce": "2.1.0"
7071
},
7172
"devDependencies": {
7273
"@vue/cli-plugin-babel": "4.4.6",

src/api/login.js

Lines changed: 72 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
import request from '@/utils/request'
2+
import {getRefreshToken} from "@/utils/auth";
3+
import service from "@/utils/request";
24

35
// 登录方法
46
export function login(username, password, code, uuid) {
@@ -26,7 +28,7 @@ export function getInfo() {
2628
// 退出方法
2729
export function logout() {
2830
return request({
29-
url: '/system/logout',
31+
url: '/system/auth/logout',
3032
method: 'post'
3133
})
3234
}
@@ -75,3 +77,72 @@ export function socialBindLogin(type, code, state, username, password) {
7577
}
7678
})
7779
}
80+
81+
// 获取登录验证码
82+
export function sendSmsCode(mobile, scene) {
83+
return request({
84+
url: '/system/auth/send-sms-code',
85+
method: 'post',
86+
data: {
87+
mobile,
88+
scene
89+
}
90+
})
91+
}
92+
93+
// 短信验证码登录
94+
export function smsLogin(mobile, code) {
95+
return request({
96+
url: '/system/auth/sms-login',
97+
method: 'post',
98+
data: {
99+
mobile,
100+
code
101+
}
102+
})
103+
}
104+
105+
// 刷新访问令牌
106+
export function refreshToken() {
107+
return service({
108+
url: '/system/auth/refresh-token?refreshToken=' + getRefreshToken(),
109+
method: 'post'
110+
})
111+
}
112+
113+
// ========== OAUTH 2.0 相关 ==========
114+
115+
export function getAuthorize(clientId) {
116+
return request({
117+
url: '/system/oauth2/authorize?clientId=' + clientId,
118+
method: 'get'
119+
})
120+
}
121+
122+
export function authorize(responseType, clientId, redirectUri, state,
123+
autoApprove, checkedScopes, uncheckedScopes) {
124+
// 构建 scopes
125+
const scopes = {};
126+
for (const scope of checkedScopes) {
127+
scopes[scope] = true;
128+
}
129+
for (const scope of uncheckedScopes) {
130+
scopes[scope] = false;
131+
}
132+
// 发起请求
133+
return service({
134+
url: '/system/oauth2/authorize',
135+
headers:{
136+
'Content-type': 'application/x-www-form-urlencoded',
137+
},
138+
params: {
139+
response_type: responseType,
140+
client_id: clientId,
141+
redirect_uri: redirectUri,
142+
state: state,
143+
auto_approve: autoApprove,
144+
scope: JSON.stringify(scopes)
145+
},
146+
method: 'post'
147+
})
148+
}

src/api/system/oauth2/oauth2Client.js

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
import request from '@/utils/request'
2+
3+
// 创建 OAuth2 客户端
4+
export function createOAuth2Client(data) {
5+
return request({
6+
url: '/system/oauth2-client/create',
7+
method: 'post',
8+
data: data
9+
})
10+
}
11+
12+
// 更新 OAuth2 客户端
13+
export function updateOAuth2Client(data) {
14+
return request({
15+
url: '/system/oauth2-client/update',
16+
method: 'put',
17+
data: data
18+
})
19+
}
20+
21+
// 删除 OAuth2 客户端
22+
export function deleteOAuth2Client(id) {
23+
return request({
24+
url: '/system/oauth2-client/delete?id=' + id,
25+
method: 'delete'
26+
})
27+
}
28+
29+
// 获得 OAuth2 客户端
30+
export function getOAuth2Client(id) {
31+
return request({
32+
url: '/system/oauth2-client/get?id=' + id,
33+
method: 'get'
34+
})
35+
}
36+
37+
// 获得 OAuth2 客户端分页
38+
export function getOAuth2ClientPage(query) {
39+
return request({
40+
url: '/system/oauth2-client/page',
41+
method: 'get',
42+
params: query
43+
})
44+
}

src/api/system/oauth2/oauth2Token.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import request from '@/utils/request'
2+
3+
// 获得访问令牌分页
4+
export function getAccessTokenPage(query) {
5+
return request({
6+
url: '/system/oauth2-token/page',
7+
method: 'get',
8+
params: query
9+
})
10+
}
11+
12+
// 删除访问令牌
13+
export function deleteAccessToken(accessToken) {
14+
return request({
15+
url: '/system/oauth2-token/delete?accessToken=' + accessToken,
16+
method: 'delete'
17+
})
18+
}

src/api/system/session.js

Lines changed: 0 additions & 18 deletions
This file was deleted.

src/assets/images/bg-mobile.png

10.8 KB
Loading

src/assets/images/bg.png

63.3 KB
Loading

src/assets/images/icon.png

229 Bytes
Loading

0 commit comments

Comments
 (0)