Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
luqiao-admin-mobile
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
杨子
luqiao-admin-mobile
Commits
aba9e965
Commit
aba9e965
authored
Apr 26, 2019
by
杨子
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改接口url为jeeplus固定格式
parent
baee629e
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
12 deletions
+12
-12
list.service.ts
src/app/core/services/list/list.service.ts
+5
-5
delon.module.ts
src/app/delon.module.ts
+1
-4
login.component.ts
src/app/routes/passport/login/login.component.ts
+6
-3
No files found.
src/app/core/services/list/list.service.ts
View file @
aba9e965
import
{
Injectable
}
from
'@angular/core'
;
import
{
Injectable
,
Inject
}
from
'@angular/core'
;
import
{
_HttpClient
}
from
'@delon/theme'
;
import
{
DA_SERVICE_TOKEN
,
ITokenService
}
from
'@delon/auth'
;
@
Injectable
({
providedIn
:
'root'
,
})
export
class
ListService
{
constructor
(
private
http
:
_HttpClient
)
{}
constructor
(
@
Inject
(
DA_SERVICE_TOKEN
)
private
tokenService
:
ITokenService
,
private
http
:
_HttpClient
)
{}
private
url
=
`asset/a/asset/assets/data;JSESSIONID=
${
this
.
tokenService
.
get
().
token
}
?_ajax=true&mobileLogin=true`
;
/**
*获取资产台账列表
*
...
...
@@ -15,7 +16,6 @@ export class ListService {
* @memberof ListService
*/
getKindAssetList
(
kindAsset
:
number
)
{
const
url
=
'asset/a/asset/assets/data?kindAsset='
+
kindAsset
;
return
this
.
http
.
get
(
url
);
return
this
.
http
.
get
(
this
.
url
,
{
kindAsset
},
{
responseType
:
'json'
});
}
}
src/app/delon.module.ts
View file @
aba9e965
...
...
@@ -53,10 +53,7 @@ export function fnDelonAuthConfig(): DelonAuthConfig {
...
new
DelonAuthConfig
(),
...({
login_url
:
'/passport/login'
,
token_send_key
:
'JSESSIONID'
,
token_send_place
:
'url'
,
token_send_template
:
'${token}'
,
ignores
:
[
/
\/
login/
,
/^assets
\/
/
,
/passport
\/
/
],
ignores
:
[
/
\/
login/
,
/assets
\/
/
,
/passport
\/
/
],
}
as
DelonAuthConfig
),
};
}
...
...
src/app/routes/passport/login/login.component.ts
View file @
aba9e965
...
...
@@ -21,7 +21,7 @@ export class UserLoginComponent implements OnDestroy {
type
=
0
;
constructor
(
private
httpClient
:
HttpClient
,
private
httpClient
:
HttpClient
,
fb
:
FormBuilder
,
modalSrv
:
NzModalService
,
private
router
:
Router
,
...
...
@@ -106,7 +106,10 @@ export class UserLoginComponent implements OnDestroy {
// 然一般来说登录请求不需要校验,因此可以在请求URL加上:`/login?_allow_anonymous=true` 表示不触发用户 Token 校验
this
.
http
.
post
(
`asset/a/login?__ajax=true&username=
${
this
.
userName
.
value
}
&password=
${
this
.
password
.
value
}
&mobileLogin=true`
,{})
.
post
(
`asset/a/login?__ajax=true&username=
${
this
.
userName
.
value
}
&password=
${
this
.
password
.
value
}
&mobileLogin=true`
,
{},
)
.
subscribe
((
res
:
any
)
=>
{
if
(
res
.
success
!==
true
)
{
this
.
error
=
res
.
msg
;
...
...
@@ -115,7 +118,7 @@ export class UserLoginComponent implements OnDestroy {
// 清空路由复用信息
this
.
reuseTabService
.
clear
();
// 设置用户Token信息
res
.
body
.
token
=
res
.
body
.
JSESSIONID
;
res
.
body
.
token
=
res
.
body
.
JSESSIONID
;
this
.
tokenService
.
set
(
res
.
body
);
// 重新获取 StartupService 内容,我们始终认为应用信息一般都会受当前用户授权范围而影响
this
.
startupSrv
.
load
().
then
(()
=>
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment