Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
cdsf-wx-app
Project
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
姜雷
cdsf-wx-app
Commits
a797b86e
Commit
a797b86e
authored
Oct 09, 2018
by
姜雷
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改提示文字
parent
3828a0ec
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
12 deletions
+10
-12
fetch.js
src/api/fetch.js
+2
-2
RepairList.js
src/containers/Repair/RepairList.js
+1
-1
ReprtRepair.js
src/containers/Repair/ReprtRepair.js
+5
-3
RepairItem.js
src/containers/Repair/components/RepairItem.js
+2
-6
No files found.
src/api/fetch.js
View file @
a797b86e
...
@@ -8,7 +8,7 @@ const path = config.SERVER_URL;
...
@@ -8,7 +8,7 @@ const path = config.SERVER_URL;
// 创建axios实例
// 创建axios实例
const
service
=
axios
.
create
({
const
service
=
axios
.
create
({
baseURL
:
path
,
// api的base_url
baseURL
:
path
,
// api的base_url
timeout
:
1
0000
,
timeout
:
2
0000
,
});
});
// request拦截器
// request拦截器
service
.
interceptors
.
request
.
use
(
service
.
interceptors
.
request
.
use
(
...
@@ -33,7 +33,7 @@ service.interceptors.request.use(
...
@@ -33,7 +33,7 @@ service.interceptors.request.use(
conf
.
params
=
data
;
conf
.
params
=
data
;
}
}
Toast
.
loading
(
'Loading...'
,
10
);
Toast
.
loading
(
'Loading...'
,
99
);
conf
.
headers
=
{
conf
.
headers
=
{
...
conf
.
headers
,
...
conf
.
headers
,
reqSource
:
'wx'
,
reqSource
:
'wx'
,
...
...
src/containers/Repair/RepairList.js
View file @
a797b86e
import
React
,
{
Component
}
from
'react'
;
import
React
,
{
Component
}
from
'react'
;
import
{
ListView
,
PullToRefresh
,
Modal
,
Toast
}
from
'antd-mobile'
;
import
{
PullToRefresh
,
Modal
,
Toast
}
from
'antd-mobile'
;
import
styles
from
'./style.css'
;
import
styles
from
'./style.css'
;
import
RepairItem
from
'./components/RepairItem'
;
import
RepairItem
from
'./components/RepairItem'
;
import
{
fetchRepairList
}
from
'../../api/index'
;
import
{
fetchRepairList
}
from
'../../api/index'
;
...
...
src/containers/Repair/ReprtRepair.js
View file @
a797b86e
...
@@ -154,7 +154,7 @@ class ReprtRepair extends Component {
...
@@ -154,7 +154,7 @@ class ReprtRepair extends Component {
if
(
!
this
.
validateForm
())
{
if
(
!
this
.
validateForm
())
{
return
;
return
;
}
}
Toast
.
loading
(
'
请求中
'
,
99
);
Toast
.
loading
(
''
,
99
);
let
formData
=
new
FormData
();
let
formData
=
new
FormData
();
this
.
state
.
applyForm
.
uploadImg
.
map
(
i
=>
{
this
.
state
.
applyForm
.
uploadImg
.
map
(
i
=>
{
if
(
i
)
{
if
(
i
)
{
...
@@ -183,14 +183,16 @@ class ReprtRepair extends Component {
...
@@ -183,14 +183,16 @@ class ReprtRepair extends Component {
reportRepair
(
formData
)
reportRepair
(
formData
)
.
then
(
res
=>
{
.
then
(
res
=>
{
console
.
log
(
res
);
console
.
log
(
res
);
const
{
data
}
=
res
;
console
.
log
(
'resetForm'
);
console
.
log
(
'resetForm'
);
this
.
resetApplyForm
();
this
.
resetApplyForm
();
Toast
.
hide
();
Toast
.
hide
();
Toast
.
success
(
res
.
msg
);
Toast
.
success
(
data
.
msg
);
})
})
.
catch
(
err
=>
{
.
catch
(
err
=>
{
console
.
log
(
err
);
console
.
log
(
err
);
Toast
.
hide
();
const
{
data
}
=
err
;
Toast
.
hide
(
data
.
msg
||
'提交失败!'
);
});
});
};
};
resetDialog
=
()
=>
{
resetDialog
=
()
=>
{
...
...
src/containers/Repair/components/RepairItem.js
View file @
a797b86e
...
@@ -59,9 +59,7 @@ class RepairItem extends Component {
...
@@ -59,9 +59,7 @@ class RepairItem extends Component {
?
[
?
[
<
div
key
=
"time"
className
=
{
styles
.
listLine
}
>
<
div
key
=
"time"
className
=
{
styles
.
listLine
}
>
<
div
className
=
{
styles
.
listLabel
}
>
报修时间:
<
/div
>
<
div
className
=
{
styles
.
listLabel
}
>
报修时间:
<
/div
>
<
div
className
=
{
styles
.
listValue
}
>
<
div
className
=
{
styles
.
listValue
}
>
{
data
.
createDate
}
<
/div
>
{
formatDate
(
new
Date
(
data
.
createDate
),
'yyyy-MM-dd'
)}
<
/div
>
<
/div>
,
<
/div>
,
<
div
key
=
"area"
className
=
{
styles
.
listLine
}
>
<
div
key
=
"area"
className
=
{
styles
.
listLine
}
>
<
div
className
=
{
styles
.
listLine2ItemLeft
}
>
<
div
className
=
{
styles
.
listLine2ItemLeft
}
>
...
@@ -105,9 +103,7 @@ class RepairItem extends Component {
...
@@ -105,9 +103,7 @@ class RepairItem extends Component {
:
[
:
[
<
div
key
=
"time"
className
=
{
styles
.
listLine
}
>
<
div
key
=
"time"
className
=
{
styles
.
listLine
}
>
<
div
className
=
{
styles
.
listLabel
}
>
报修时间:
<
/div
>
<
div
className
=
{
styles
.
listLabel
}
>
报修时间:
<
/div
>
<
div
className
=
{
styles
.
listValue
}
>
<
div
className
=
{
styles
.
listValue
}
>
{
data
.
createDate
}
<
/div
>
{
formatDate
(
new
Date
(
data
.
createDate
),
'yyyy-MM-dd'
)}
<
/div
>
<
/div>
,
<
/div>
,
<
div
key
=
"name"
className
=
{
styles
.
listLine
}
>
<
div
key
=
"name"
className
=
{
styles
.
listLine
}
>
<
div
className
=
{
styles
.
listLine2ItemLeft
}
>
<
div
className
=
{
styles
.
listLine2ItemLeft
}
>
...
...
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