Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
fe-app-h5
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
万亚飞
fe-app-h5
Commits
a7e1d712
Commit
a7e1d712
authored
May 28, 2019
by
万亚飞
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
316586ea
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
33 additions
and
20 deletions
+33
-20
fetch.js
src/api/fetch.js
+8
-2
JobList.js
src/pages/user/JobList.js
+0
-1
Train.js
src/pages/user/Train.js
+5
-2
addMaterial.js
src/pages/user/addMaterial.js
+4
-1
native.js
src/static/js/native.js
+11
-8
tools.js
src/utils/tools.js
+5
-6
No files found.
src/api/fetch.js
View file @
a7e1d712
...
@@ -6,7 +6,13 @@ import { Toast } from 'antd-mobile';
...
@@ -6,7 +6,13 @@ import { Toast } from 'antd-mobile';
import
{
getParameterByName
}
from
'../utils/common'
;
import
{
getParameterByName
}
from
'../utils/common'
;
export
default
function
ajax
(
apiKey
,
options
)
{
export
default
function
ajax
(
apiKey
,
options
)
{
const
uid
=
storage
.
getSS
(
'urlQuery'
)
?
storage
.
getSS
(
'urlQuery'
).
uid
:
''
;
const
userInfo
=
storage
.
getSS
(
'urlQuery'
);
const
uinfo
=
userInfo
?
{
uid
:
userInfo
.
uid
,
accessToken
:
userInfo
.
accessToken
}
:
''
;
// console.log(uid);
// console.log(uid);
const
option
=
Object
.
assign
(
const
option
=
Object
.
assign
(
{},
{},
...
@@ -26,7 +32,7 @@ export default function ajax(apiKey, options) {
...
@@ -26,7 +32,7 @@ export default function ajax(apiKey, options) {
const
data
=
Object
.
assign
({},
options
.
data
||
{});
const
data
=
Object
.
assign
({},
options
.
data
||
{});
// ENV === 'development' && (data.uid = storage.getLS('uid'));
// ENV === 'development' && (data.uid = storage.getLS('uid'));
const
contentType
=
option
.
contentType
===
'json'
?
'application/json'
:
'application/x-www-form-urlencoded;charset=utf-8'
;
const
contentType
=
option
.
contentType
===
'json'
?
'application/json'
:
'application/x-www-form-urlencoded;charset=utf-8'
;
let
headers
=
Object
.
assign
({},
{
'Content-Type'
:
contentType
,
uid
}
,
option
.
headers
);
let
headers
=
Object
.
assign
({},
{
'Content-Type'
:
contentType
},
uinfo
,
option
.
headers
);
const
axiosConfig
=
Object
.
assign
(
const
axiosConfig
=
Object
.
assign
(
{},
{},
{
{
...
...
src/pages/user/JobList.js
View file @
a7e1d712
...
@@ -73,7 +73,6 @@ class JobList extends Component {
...
@@ -73,7 +73,6 @@ class JobList extends Component {
};
};
}
}
componentWillMount
()
{
componentWillMount
()
{
const
_this
=
this
;
document
.
title
=
'职业背景'
;
document
.
title
=
'职业背景'
;
this
.
setState
({
this
.
setState
({
tabIndex
:
parseInt
(
getParameterByName
(
'index'
,
location
.
href
))
||
0
tabIndex
:
parseInt
(
getParameterByName
(
'index'
,
location
.
href
))
||
0
...
...
src/pages/user/Train.js
View file @
a7e1d712
...
@@ -161,12 +161,15 @@ class Train extends Component {
...
@@ -161,12 +161,15 @@ class Train extends Component {
fetch
(
subType
,
{
fetch
(
subType
,
{
data
:
param
,
data
:
param
,
success
:
res
=>
{
success
:
res
=>
{
Toast
.
info
(
`
${
str
}
成功`
);
Toast
.
info
(
`
${
str
}
成功,请刷新列表页查看`
);
fetch
(
'fetchTrainList'
,
{
loading
:
false
});
app
().
downRefresh
(
true
);
app
().
downRefresh
(
true
);
app
().
notRefresh
(
true
);
app
().
notRefresh
(
true
);
setTimeout
(()
=>
{
setTimeout
(()
=>
{
history
.
back
();
history
.
back
();
},
2
000
);
},
3
000
);
}
}
});
});
}
}
...
...
src/pages/user/addMaterial.js
View file @
a7e1d712
...
@@ -160,7 +160,10 @@ class AddMaterial extends Component {
...
@@ -160,7 +160,10 @@ class AddMaterial extends Component {
fetch
(
`
${
subType
}${
this
.
state
.
materialType
}
`
,
{
fetch
(
`
${
subType
}${
this
.
state
.
materialType
}
`
,
{
data
:
param
,
data
:
param
,
success
:
res
=>
{
success
:
res
=>
{
Toast
.
info
(
`
${
str
}
成功`
);
Toast
.
info
(
`
${
str
}
成功,请刷新列表页查看`
);
fetch
(
'fetchJobList'
,
{
loading
:
false
});
setTimeout
(()
=>
{
setTimeout
(()
=>
{
history
.
back
();
history
.
back
();
},
3000
);
},
3000
);
...
...
src/static/js/native.js
View file @
a7e1d712
...
@@ -293,18 +293,21 @@ export default function() {
...
@@ -293,18 +293,21 @@ export default function() {
sendDataToOC
(
parmas
);
sendDataToOC
(
parmas
);
},
300
);
},
300
);
};
};
native
.
goPage
=
function
(
pageName
,
url
)
{
native
.
goPage
=
function
(
url
)
{
setTimeout
(
function
()
{
setTimeout
(
function
()
{
var
parmas
=
{
};
var
parmas
=
{
parmas
.
cmd
=
{};
url
:
'http'
,
parmas
.
cmd
.
params
=
''
;
cmd
:
{
parmas
.
cmd
.
action_name
=
pageName
;
params
:
{
url
:
url
},
parmas
.
url
=
url
;
action_name
:
''
}
console
.
log
(
parmas
)
;
}
;
sendDataToExp
(
parmas
);
sendDataToExp
(
parmas
);
},
300
);
},
300
);
};
};
native
.
toPage
=
function
(
url
)
{
sendDataToExp
(
url
);
};
native
.
setParams
=
function
(
action_name
,
params
,
_url
)
{
native
.
setParams
=
function
(
action_name
,
params
,
_url
)
{
setParams
(
action_name
,
params
,
_url
);
setParams
(
action_name
,
params
,
_url
);
};
};
...
...
src/utils/tools.js
View file @
a7e1d712
...
@@ -52,12 +52,11 @@ export function getImgNaturalDimensions(imgSrc, callback) {
...
@@ -52,12 +52,11 @@ export function getImgNaturalDimensions(imgSrc, callback) {
// }
// }
return
[
nWidth
,
nHeight
];
return
[
nWidth
,
nHeight
];
}
}
export
function
linkTo
(
url
,
isReplace
)
{
export
function
linkTo
(
url
)
{
if
(
isReplace
)
{
location
.
replace
(
url
);
}
else
{
location
.
href
=
url
;
location
.
href
=
url
;
}
// alert(`${location.origin}${url}`);
// alert(`${location.origin}${url}`);
// app().goPage('壹点零', `${location.origin}${url}`);
// alert(`${location.origin}${url}`);
// app().goPage(`${location.origin}${url}`);
// alert(`${location.origin}${url}`);
// app().gotoOCChat('壹点零', `${location.origin}${url}`);
}
}
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