Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
DataCenter_Core2.1_20190520
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
bltdc
DataCenter_Core2.1_20190520
Commits
e6eafd43
Commit
e6eafd43
authored
Feb 20, 2020
by
guanzhenshan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更改数据中心的cookie键名
parent
aee22f18
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
7 deletions
+7
-7
HomeController.cs
Bailun.DC.Web/Controllers/HomeController.cs
+1
-1
Index.cshtml
Bailun.DC.Web/Pages/Index.cshtml
+1
-1
Main.cshtml
Bailun.DC.Web/Views/Home/Main.cshtml
+1
-1
common.js
Bailun.DC.Web/wwwroot/js/common.js
+4
-4
No files found.
Bailun.DC.Web/Controllers/HomeController.cs
View file @
e6eafd43
...
@@ -63,7 +63,7 @@ namespace Bailun.DC.Web.Controllers
...
@@ -63,7 +63,7 @@ namespace Bailun.DC.Web.Controllers
var
isAllCompany
=
0
;
var
isAllCompany
=
0
;
//var user = Common.HttpHelper.NetHelper.Request("http://sso.bailuntec.com/GetUserResource");
//var user = Common.HttpHelper.NetHelper.Request("http://sso.bailuntec.com/GetUserResource");
var
cookie
=
HttpContext
.
Request
.
Cookies
[
"
t
oken"
];
var
cookie
=
HttpContext
.
Request
.
Cookies
[
"
BailunT
oken"
];
var
user
=
Common
.
HttpHelper
.
NetHelper
.
Request
(
"http://sso.bailuntec.com/GetUserResource"
,
new
string
[]
{
"Authorization"
},
new
string
[]
{
(
cookie
!=
null
?
cookie
:
""
)});
var
user
=
Common
.
HttpHelper
.
NetHelper
.
Request
(
"http://sso.bailuntec.com/GetUserResource"
,
new
string
[]
{
"Authorization"
},
new
string
[]
{
(
cookie
!=
null
?
cookie
:
""
)});
var
json
=
Newtonsoft
.
Json
.
Linq
.
JObject
.
Parse
(
user
);
var
json
=
Newtonsoft
.
Json
.
Linq
.
JObject
.
Parse
(
user
);
...
...
Bailun.DC.Web/Pages/Index.cshtml
View file @
e6eafd43
...
@@ -24,7 +24,7 @@
...
@@ -24,7 +24,7 @@
<script
src=
"css/hplus/js/jquery.min.js?v=2.1.4"
></script>
<script
src=
"css/hplus/js/jquery.min.js?v=2.1.4"
></script>
<script
src=
"~/js/jquery.cookie.js"
type=
"text/javascript"
></script>
<script
src=
"~/js/jquery.cookie.js"
type=
"text/javascript"
></script>
<script
src=
"~/js/common.js?20
190609001
"
type=
"text/javascript"
></script>
<script
src=
"~/js/common.js?20
200220002
"
type=
"text/javascript"
></script>
</head>
</head>
<body
class=
"fixed-sidebar full-height-layout gray-bg"
style=
"overflow:hidden"
>
<body
class=
"fixed-sidebar full-height-layout gray-bg"
style=
"overflow:hidden"
>
...
...
Bailun.DC.Web/Views/Home/Main.cshtml
View file @
e6eafd43
...
@@ -28,7 +28,7 @@
...
@@ -28,7 +28,7 @@
<script
src=
"/css/hplus/js/jquery.min.js?v=2.1.4"
></script>
<script
src=
"/css/hplus/js/jquery.min.js?v=2.1.4"
></script>
<script
src=
"/js/jquery.cookie.js"
type=
"text/javascript"
></script>
<script
src=
"/js/jquery.cookie.js"
type=
"text/javascript"
></script>
<script
src=
"/js/common.js?20
190613
001"
type=
"text/javascript"
></script>
<script
src=
"/js/common.js?20
200220
001"
type=
"text/javascript"
></script>
</head>
</head>
<body
class=
"fixed-sidebar full-height-layout gray-bg"
style=
"overflow:hidden"
>
<body
class=
"fixed-sidebar full-height-layout gray-bg"
style=
"overflow:hidden"
>
...
...
Bailun.DC.Web/wwwroot/js/common.js
View file @
e6eafd43
...
@@ -222,7 +222,7 @@ $.submit = function (data) {
...
@@ -222,7 +222,7 @@ $.submit = function (data) {
type
:
data
.
type
||
'GET'
,
type
:
data
.
type
||
'GET'
,
data
:
data
.
paramData
,
data
:
data
.
paramData
,
async
:
data
.
async
||
true
,
async
:
data
.
async
||
true
,
headers
:
{
Authorization
:
$
.
cookie
(
"
t
oken"
)},
headers
:
{
Authorization
:
$
.
cookie
(
"
BailunT
oken"
)},
beforeSend
:
function
(
request
)
{
beforeSend
:
function
(
request
)
{
if
(
!
data
.
noloading
)
if
(
!
data
.
noloading
)
{
{
...
@@ -317,11 +317,11 @@ function login() {
...
@@ -317,11 +317,11 @@ function login() {
var
token
=
getUrlParam
(
'token'
);
var
token
=
getUrlParam
(
'token'
);
if
(
token
!=
''
)
{
if
(
token
!=
''
)
{
$
.
cookie
(
'
token'
,
token
,
{
expires
:
1
});
$
.
cookie
(
'
BailunToken'
,
token
,
{
expires
:
1
,
domain
:
'bailuntec.com'
});
window
.
location
=
baseUrl
;
window
.
location
=
baseUrl
;
}
}
else
{
else
{
token
=
$
.
cookie
(
'
t
oken'
);
token
=
$
.
cookie
(
'
BailunT
oken'
);
if
(
token
==
''
||
token
==
undefined
||
token
==
null
)
{
if
(
token
==
''
||
token
==
undefined
||
token
==
null
)
{
window
.
location
=
"http://sso.bailuntec.com/?returnUrl="
+
baseUrl
;
window
.
location
=
"http://sso.bailuntec.com/?returnUrl="
+
baseUrl
;
...
@@ -331,6 +331,6 @@ function login() {
...
@@ -331,6 +331,6 @@ function login() {
}
}
function
logout
()
{
function
logout
()
{
$
.
removeCookie
(
'
t
oken'
);
$
.
removeCookie
(
'
BailunT
oken'
);
window
.
location
=
"http://sso.bailuntec.com/?returnUrl="
+
baseUrl
;
window
.
location
=
"http://sso.bailuntec.com/?returnUrl="
+
baseUrl
;
}
}
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