|
@@ -6,6 +6,7 @@ import { typeList, vehiclelist } from '../../utils/tools/config';
|
|
|
import { getNumHourse, removeNull } from "../../utils/tools";
|
|
|
import { detailsAdd } from "../../utils/servers/servers";
|
|
|
import Right from '../../image/right.png';
|
|
|
+import Icons from '../../image/returns.png';
|
|
|
import dayjs from "dayjs";
|
|
|
import './index.less';
|
|
|
|
|
@@ -134,7 +135,9 @@ class Modal extends Component {
|
|
|
});
|
|
|
if (v.error.length === 0) {
|
|
|
this.props.onClose()
|
|
|
- Taro.setStorageSync('location', { start: data.startDistrict, end: data.endDistrict })
|
|
|
+ if (type == 1) {
|
|
|
+ Taro.setStorageSync('location', { start: data.startDistrict, end: data.endDistrict })
|
|
|
+ }
|
|
|
} else {
|
|
|
Taro.showToast({
|
|
|
title: v.error[0].message,
|
|
@@ -183,7 +186,9 @@ class Modal extends Component {
|
|
|
let obj = {
|
|
|
type: typeList[e.detail.value]
|
|
|
}
|
|
|
+ console.log(this.props.visible, "======", e.detail.value)
|
|
|
if (this.props.visible == "add" && e.detail.value == 0) {
|
|
|
+ console.log("--")
|
|
|
let location = Taro.getStorageSync('location')
|
|
|
if (location) {
|
|
|
obj.startDistrict = location.start
|
|
@@ -284,8 +289,7 @@ class Modal extends Component {
|
|
|
}}
|
|
|
|
|
|
/>
|
|
|
- <Image src={Right} className='ricon' mode='aspectFit' onClick={this.swap.bind(this)} />
|
|
|
- {/* <Text style={{ fontSize: "30px", padding: "0 5px" }}>⇀</Text> */}
|
|
|
+ <Image src={Icons} className='icons' mode='aspectFit' onClick={this.swap.bind(this)} />
|
|
|
<AtInput name="endDistrict" className="pin" type='text' placeholder='目的地' value={data.endDistrict}
|
|
|
onChange={e => {
|
|
|
this.setState({
|