Commit a797b86e by 姜雷

修改提示文字

parent 3828a0ec
......@@ -8,7 +8,7 @@ const path = config.SERVER_URL;
// 创建axios实例
const service = axios.create({
baseURL: path, // api的base_url
timeout: 10000,
timeout: 20000,
});
// request拦截器
service.interceptors.request.use(
......@@ -33,7 +33,7 @@ service.interceptors.request.use(
conf.params = data;
}
Toast.loading('Loading...', 10);
Toast.loading('Loading...', 99);
conf.headers = {
...conf.headers,
reqSource: 'wx',
......
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 RepairItem from './components/RepairItem';
import { fetchRepairList } from '../../api/index';
......
......@@ -154,7 +154,7 @@ class ReprtRepair extends Component {
if (!this.validateForm()) {
return;
}
Toast.loading('请求中', 99);
Toast.loading('', 99);
let formData = new FormData();
this.state.applyForm.uploadImg.map(i => {
if (i) {
......@@ -183,14 +183,16 @@ class ReprtRepair extends Component {
reportRepair(formData)
.then(res => {
console.log(res);
const { data } = res;
console.log('resetForm');
this.resetApplyForm();
Toast.hide();
Toast.success(res.msg);
Toast.success(data.msg);
})
.catch(err => {
console.log(err);
Toast.hide();
const { data } = err;
Toast.hide(data.msg || '提交失败!');
});
};
resetDialog = () => {
......
......@@ -59,9 +59,7 @@ class RepairItem extends Component {
? [
<div key="time" className={styles.listLine}>
<div className={styles.listLabel}>报修时间:</div>
<div className={styles.listValue}>
{formatDate(new Date(data.createDate), 'yyyy-MM-dd')}
</div>
<div className={styles.listValue}>{data.createDate}</div>
</div>,
<div key="area" className={styles.listLine}>
<div className={styles.listLine2ItemLeft}>
......@@ -105,9 +103,7 @@ class RepairItem extends Component {
: [
<div key="time" className={styles.listLine}>
<div className={styles.listLabel}>报修时间:</div>
<div className={styles.listValue}>
{formatDate(new Date(data.createDate), 'yyyy-MM-dd')}
</div>
<div className={styles.listValue}>{data.createDate}</div>
</div>,
<div key="name" className={styles.listLine}>
<div className={styles.listLine2ItemLeft}>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment