Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
H
h5-base
Project
Project
Details
Activity
Releases
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
new-sing
h5-base
Commits
28766d5c
Commit
28766d5c
authored
Sep 29, 2019
by
IvyXia123
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cookie
parent
9dbed645
Changes
4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
22 deletions
+5
-22
index.html
dist/index.html
+1
-1
app.8bf13f62b5ba2865ec24.js
dist/static/js/app.8bf13f62b5ba2865ec24.js
+1
-0
app.9d1398a59d3230f33440.js
dist/static/js/app.9d1398a59d3230f33440.js
+0
-1
index.js
src/service/index.js
+3
-20
No files found.
dist/index.html
View file @
28766d5c
...
...
@@ -11,4 +11,4 @@
position
:
fixed
;
background
:
#f4f4f4
;
}
/* html{font-size: 1px;} */
</style><link
href=
static/css/app.ed6d1273dc8c2d144766934b011e5890.css
rel=
stylesheet
></head><body><div
id=
app
></div><script
src=
https://res.wx.qq.com/open/js/jweixin-1.3.2.js
></script><script></script><script
type=
text/javascript
src=
static/js/manifest.73b4e03dd1137dd81f8b.js
></script><script
type=
text/javascript
src=
static/js/vendor.0c1d6ebbba685002d59c.js
></script><script
type=
text/javascript
src=
static/js/app.9d1398a59d3230f33440.js
></script></body></html>
\ No newline at end of file
/* html{font-size: 1px;} */
</style><link
href=
static/css/app.ed6d1273dc8c2d144766934b011e5890.css
rel=
stylesheet
></head><body><div
id=
app
></div><script
src=
https://res.wx.qq.com/open/js/jweixin-1.3.2.js
></script><script></script><script
type=
text/javascript
src=
static/js/manifest.73b4e03dd1137dd81f8b.js
></script><script
type=
text/javascript
src=
static/js/vendor.0c1d6ebbba685002d59c.js
></script><script
type=
text/javascript
src=
static/js/app.8bf13f62b5ba2865ec24.js
></script></body></html>
\ No newline at end of file
dist/static/js/app.8bf13f62b5ba2865ec24.js
0 → 100644
View file @
28766d5c
This diff is collapsed.
Click to expand it.
dist/static/js/app.9d1398a59d3230f33440.js
deleted
100644 → 0
View file @
9dbed645
This diff is collapsed.
Click to expand it.
src/service/index.js
View file @
28766d5c
...
...
@@ -17,35 +17,18 @@ axios.interceptors.request.use(
// 获取token
// process.env.versionTime
let
versiontime
=
'09021400'
;
// alert(window.navigator.userAgent.split('=')[1]);
// const token = window.navigator.userAgent.split('=')[1] ? 'Bearer ' + window.navigator.userAgent.split('=')[1] : localStorage.getItem('cc_token');
const
token
=
common
.
getUrlParam
().
token
||
localStorage
.
getItem
(
'cc_token'
);
const
token
=
window
.
navigator
.
userAgent
.
split
(
'='
)[
1
]
?
'Bearer '
+
window
.
navigator
.
userAgent
.
split
(
'='
)[
1
]
:
localStorage
.
getItem
(
'cc_token'
);
alert
(
token
)
// 设置参数格式
if
(
!
config
.
headers
[
'Content-Type'
])
{
config
.
headers
=
{
"Content-Type"
:
"application/json;charset=utf-8"
};
}
/* if(token) {
console.log(99999)
config.headers = {
'cookie': 'base_api_session'
};
}*/
// 添加token到headers
if
(
token
)
{
// config.headers.token = token
config
.
headers
=
{
"token"
:
token
,
}
document
.
cookie
=
'base_api_session='
+
token
.
split
(
' '
)[
1
]
config
.
headers
.
token
=
token
}
/*if(window.navigator.userAgent.split('=')[1]) {
config.headers.Cookie = 'base_api_session' + window.navigator.userAgent.split('=')[1]
}*/
// 鉴权参数设置
if
(
config
.
method
===
'get'
&&
config
.
url
!==
'/api/admin/login'
)
{
config
.
params
=
config
.
params
||
{};
...
...
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