[baozhangchao] 3 年前
父节点
当前提交
3800a4f558

+ 3
- 3
src/components/ButtontWX/index.jsx 查看文件

@@ -4,7 +4,7 @@ import withLayout from '@/layouts'
4 4
 import './style.less'
5 5
 
6 6
 export default (props) => {
7
-  const { butText, butWidth, butHeight, butFontSize, butBorderRadius, loading, onClick, formType, disabled, opacity } = props
7
+  const { butText, butWidth, butHeight, butFontSize, butBorderRadius, styleType, loading, onClick, formType, disabled, opacity } = props
8 8
   let butStyle = {
9 9
     width: `${butWidth || 100}px`,
10 10
     height: `${butHeight || 40}px`,
@@ -20,8 +20,8 @@ export default (props) => {
20 20
     onClick()
21 21
   }
22 22
   return (
23
-    <Button disabled={disabled} style={butStyle} onClick={onClicks} className='buttont-box' formType={formType || ''}  >
24
-      <View style={butStyle2}>{butText || ''}</View>
23
+    <Button disabled={disabled} style={butStyle} onClick={onClicks} className={`buttont-box ${styleType ? 'stypeType' : ''}`} formType={formType || ''}  >
24
+      <View style={butStyle2} className={`${styleType ? 'stypeType2' : ''}`}>{butText || ''}</View>
25 25
     </Button>
26 26
   )
27 27
 }

+ 8
- 0
src/components/ButtontWX/style.less 查看文件

@@ -2,9 +2,17 @@
2 2
   background: #ff703b;
3 3
   display: flex;
4 4
   margin: 1em auto;
5
+
5 6
   > View {
6 7
     margin: 0 auto;
7 8
     font-weight: 600;
8 9
     color: #ffffff;
9 10
   }
11
+  .stypeType2 {
12
+    color: #ff703b !important;
13
+  }
14
+}
15
+.stypeType {
16
+  border: 2px solid #ff703b !important;
17
+  background-color: #ffffff;
10 18
 }

+ 1
- 1
src/components/CarsListContent/index.jsx 查看文件

@@ -30,7 +30,7 @@ export default withLayout((props) => {
30 30
 
31 31
 
32 32
   const startReserve = (res) => {
33
-    Taro.navigateTo({ url: `/pages/OrderConfirmation/index?id${res}` })
33
+    Taro.navigateTo({ url: `/pages/OrderConfirmation/index?id=${res}` })
34 34
 
35 35
   }
36 36
   const goCarsInfo = (res) => {

+ 0
- 80
src/components/pickerTime/dateTimePicker.js 查看文件

@@ -1,80 +0,0 @@
1
-function withData (param) {
2
-  return param < 10 ? '0' + param : '' + param;
3
-}
4
-function getLoopArray (start, end) {
5
-  var start = start || 0;
6
-  var end = end || 1;
7
-  var array = [];
8
-  for (var i = start; i <= end; i++) {
9
-    array.push(withData(i));
10
-  }
11
-  return array;
12
-}
13
-function getMonthDay (year, month) {
14
-  var flag = year % 400 == 0 || (year % 4 == 0 && year % 100 != 0), array = null;
15
-
16
-  switch (month) {
17
-    case '01':
18
-    case '03':
19
-    case '05':
20
-    case '07':
21
-    case '08':
22
-    case '10':
23
-    case '12':
24
-      array = getLoopArray(1, 31)
25
-      break;
26
-    case '04':
27
-    case '06':
28
-    case '09':
29
-    case '11':
30
-      array = getLoopArray(1, 30)
31
-      break;
32
-    case '02':
33
-      array = flag ? getLoopArray(1, 29) : getLoopArray(1, 28)
34
-      break;
35
-    default:
36
-      array = '月份格式不正确,请重新输入!'
37
-  }
38
-  return array;
39
-}
40
-function getNewDateArry () {
41
-  // 当前时间的处理
42
-  var newDate = new Date();
43
-  var year = withData(newDate.getFullYear()),
44
-    mont = withData(newDate.getMonth() + 1),
45
-    date = withData(newDate.getDate()),
46
-    hour = withData(newDate.getHours()),
47
-    minu = withData(newDate.getMinutes()),
48
-    seco = withData(newDate.getSeconds());
49
-
50
-  return [year, mont, date, hour, minu, seco];
51
-}
52
-function dateTimePicker (startYear, endYear, date) {
53
-  // 返回默认显示的数组和联动数组的声明
54
-  var dateTime = [], dateTimeArray = [[], [], [], [], [], []];
55
-  var start = startYear || 1978;
56
-  var end = endYear || 2100;
57
-  // 默认开始显示数据
58
-  var defaultDate = date ? [...date.split(' ')[0].split('-'), ...date.split(' ')[1].split(':')] : getNewDateArry();
59
-  // 处理联动列表数据
60
-  /*年月日 时分秒*/
61
-  dateTimeArray[0] = getLoopArray(start, end);
62
-  dateTimeArray[1] = getLoopArray(1, 12);
63
-  dateTimeArray[2] = getMonthDay(defaultDate[0], defaultDate[1]);
64
-  dateTimeArray[3] = getLoopArray(0, 23);
65
-  dateTimeArray[4] = getLoopArray(0, 59);
66
-  dateTimeArray[5] = getLoopArray(0, 59);
67
-
68
-  dateTimeArray.forEach((current, index) => {
69
-    dateTime.push(current.indexOf(defaultDate[index]));
70
-  });
71
-
72
-  return {
73
-    dateTimeArray: dateTimeArray,
74
-    dateTime: dateTime
75
-  }
76
-}
77
-module.exports = {
78
-  dateTimePicker: dateTimePicker,
79
-  getMonthDay: getMonthDay
80
-}

+ 256
- 56
src/components/pickerTime/index.js 查看文件

@@ -1,63 +1,263 @@
1
-import dateTimePicker from './dateTimePicker.js'
2
-
3
-Page({
1
+// pages/components/datetime/index.js
2
+const date = new Date();
3
+Component({
4
+  properties: {
5
+    //返回格式  1、2019-09-09 12:00:00  2、2019/09/09 21:00:00 3、2019年01月01日 00:00:00 4、
6
+    showFormat: {
7
+      type: String,
8
+      value: 1
9
+    },
10
+    tips: {
11
+      type: String,
12
+      value: '请选择时间'
13
+    },
14
+    //选择设置选中项、展示项
15
+    multiIndex: {
16
+      type: Array,
17
+      value: [0, 0, 0, 0, 0, 0],
18
+    },
19
+    //年份起止 [起始年份,最大年份] 默认当前年
20
+    yearRange: {
21
+      type: Array,
22
+      value: [],
23
+    },
24
+    //显示格式 1所有带汉字  2 日期带汉字   3 只显示数字
25
+    isChinese: {
26
+      type: Number,
27
+      value: 2,
28
+    },
29
+  },
4 30
   data: {
5
-    date: '2018-10-01',
6
-    time: '12:00',
7
-    dateTimeArray: null,
8
-    dateTime: null,
9
-    dateTimeArray1: null,
10
-    dateTime1: null,
11
-    startYear: 2000,
12
-    endYear: 2050
31
+    time: '',
32
+    tipsBlock: false,
33
+    // multiArray: [years, months, days, hours, minutes],
34
+    // multiIndex: [0, 9, 16, 10, 17],
35
+    choose_year: '',
13 36
   },
14
-  onLoad () {
15
-    // 获取完整的年月日 时分秒,以及默认显示的数组
16
-    var obj = dateTimePicker.dateTimePicker(this.data.startYear, this.data.endYear);
17
-    var obj1 = dateTimePicker.dateTimePicker(this.data.startYear, this.data.endYear);
18
-    // 精确到分的处理,将数组的秒去掉
19
-    var lastArray = obj1.dateTimeArray.pop();
20
-    var lastTime = obj1.dateTime.pop();
21 37
 
22
-    this.setData({
23
-      dateTime: obj.dateTime,
24
-      dateTimeArray: obj.dateTimeArray,
25
-      dateTimeArray1: obj1.dateTimeArray,
26
-      dateTime1: obj1.dateTime
27
-    });
28
-  },
29
-  changeDate (e) {
30
-    this.setData({ date: e.detail.value });
31
-  },
32
-  changeTime (e) {
33
-    this.setData({ time: e.detail.value });
34
-  },
35
-  changeDateTime (e) {
36
-    this.setData({ dateTime: e.detail.value });
37
-  },
38
-  changeDateTime1 (e) {
39
-    this.setData({ dateTime1: e.detail.value });
40
-  },
41
-  changeDateTimeColumn (e) {
42
-    var arr = this.data.dateTime, dateArr = this.data.dateTimeArray;
38
+  methods: {
39
+    //格式整理
40
+    format: function (e) {
41
+      return e.replace(/[^0-9]/ig, "");
42
+    },
43
+    //返回格式整理
44
+    returnFormat: function (format, index, lastTime) {
45
+      for (let i = 0; i < this.data.multiIndex.length; i++) {
46
+        if (lastTime == undefined || lastTime == null || lastTime == '') {
47
+          lastTime = this.format(this.data.multiArray[i][index[i]])
48
+        } else {
49
+          if (i == 3) {
50
+            lastTime = lastTime + " " + this.format(this.data.multiArray[i][index[i]])
51
+          } else if (i > 3) {
52
+            lastTime = lastTime + ":" + this.format(this.data.multiArray[i][index[i]])
53
+          } else {
54
+            lastTime = lastTime + format + this.format(this.data.multiArray[i][index[i]])
55
+          }
56
+        }
57
+      }
58
+      return lastTime
59
+    },
60
+    //获取开始时间日期
61
+    bindMultiPickerChange: function (e) {
62
+      this.setData({
63
+        multiIndex: e.detail.value
64
+      })
65
+      const index = this.data.multiIndex;
66
+      var lastTime = '';
67
+      switch (Number(this.data.showFormat)) {
68
+        case 1:
69
+          lastTime = this.returnFormat('-', index, lastTime)
70
+          break;
71
+        case 2:
72
+          lastTime = this.returnFormat('/', index, lastTime)
73
+          break;
74
+        case 3:
75
+          for (let i = 0; i < this.data.multiIndex.length; i++) {
76
+            if (i == 3) {
77
+              lastTime = lastTime + " " + this.format(this.data.multiArray[i][index[i]])
78
+            } else if (i >= 3) {
79
+              lastTime = lastTime + ":" + this.format(this.data.multiArray[i][index[i]])
80
+            } else {
81
+              lastTime = lastTime + this.data.multiArray[i][index[i]]
82
+            }
83
+          }
84
+          break;
85
+        case 4:
86
+          lastTime = this.returnFormat('~', index, lastTime)
87
+          break;
88
+        case 5:
89
+          lastTime = this.returnFormat('*', index, lastTime)
90
+          break;
91
+        default:
92
+          for (let i = 0; i < this.data.multiIndex.length; i++) {
93
+            if (i == 3) {
94
+              lastTime = lastTime + " " + this.data.multiArray[i][index[i]]
95
+            } else {
96
+              lastTime = lastTime + this.data.multiArray[i][index[i]]
97
+            }
98
+          }
99
+          break;
100
+      }
43 101
 
44
-    arr[e.detail.column] = e.detail.value;
45
-    dateArr[2] = dateTimePicker.getMonthDay(dateArr[0][arr[0]], dateArr[1][arr[1]]);
102
+      this.setData({
103
+        time: lastTime,
104
+        tipsBlock: true
105
+      })
106
+      console.log(lastTime);
107
+      //子组件给父组件传递选择的时间
108
+      this.triggerEvent('onChange', { params: lastTime })
109
+    },
110
+    //监听picker的滚动事件
111
+    bindMultiPickerColumnChange: function (e) {
112
+      //获取年份
113
+      if (e.detail.column == 0) {
114
+        let choose_year = this.data.multiArray[e.detail.column][e.detail.value];
115
+        this.setData({
116
+          choose_year
117
+        })
118
+      }
119
+      if (e.detail.column == 1) {
120
+        let num = parseInt(this.data.multiArray[e.detail.column][e.detail.value]);
121
+        let temp = [];
122
+        if (num == 1 || num == 3 || num == 5 || num == 7 || num == 8 || num == 10 || num == 12) { //判断31天的月份
123
+          for (let i = 1; i <= 31; i++) {
124
+            if (i < 10) {
125
+              i = "0" + i;
126
+            }
127
+            if (Number(this.data.isChinese) == 3) {
128
+              temp.push("" + i);
129
+            } else {
130
+              temp.push("" + i + "日");
131
+            }
46 132
 
47
-    this.setData({
48
-      dateTimeArray: dateArr,
49
-      dateTime: arr
50
-    });
133
+          }
134
+          this.setData({
135
+            ['multiArray[2]']: temp
136
+          });
137
+        } else if (num == 4 || num == 6 || num == 9 || num == 11) { //判断30天的月份
138
+          for (let i = 1; i <= 30; i++) {
139
+            if (i < 10) {
140
+              i = "0" + i;
141
+            }
142
+            if (Number(this.data.isChinese) == 3) {
143
+              temp.push("" + i);
144
+            } else {
145
+              temp.push("" + i + "日");
146
+            }
147
+          }
148
+          this.setData({
149
+            ['multiArray[2]']: temp
150
+          });
151
+        } else if (num == 2) { //判断2月份天数
152
+          let year = parseInt(this.data.choose_year);
153
+          console.log(year);
154
+          if (((year % 400 == 0) || (year % 100 != 0)) && (year % 4 == 0)) {
155
+            for (let i = 1; i <= 29; i++) {
156
+              if (i < 10) {
157
+                i = "0" + i;
158
+              }
159
+              if (Number(this.data.isChinese) == 3) {
160
+                temp.push("" + i);
161
+              } else {
162
+                temp.push("" + i + "日");
163
+              }
164
+            }
165
+            this.setData({
166
+              ['multiArray[2]']: temp
167
+            });
168
+          } else {
169
+            for (let i = 1; i <= 28; i++) {
170
+              if (i < 10) {
171
+                i = "0" + i;
172
+              }
173
+              if (Number(this.data.isChinese) == 3) {
174
+                temp.push("" + i);
175
+              } else {
176
+                temp.push("" + i + "日");
177
+              }
178
+            }
179
+            this.setData({
180
+              ['multiArray[2]']: temp
181
+            });
182
+          }
183
+        }
184
+      }
185
+      var data = {
186
+        multiArray: this.data.multiArray,
187
+        multiIndex: this.data.multiIndex
188
+      };
189
+      data.multiIndex[e.detail.column] = e.detail.value;
190
+      this.setData(data);
191
+    },
192
+    getYear: function () {
193
+      const years = []
194
+      if (this.data.yearRange.length > 0) {
195
+        if (this.data.yearRange.length == 1) {
196
+          //获取年
197
+          for (let i = this.data.yearRange[0]; i <= date.getFullYear() + 5; i++) {
198
+            if (Number(this.data.isChinese) == 3) {
199
+              years.push("" + i);
200
+            } else {
201
+              years.push("" + i + "年");
202
+            }
203
+          }
204
+        } else {
205
+          //获取年
206
+          for (let i = this.data.yearRange[0]; i <= this.data.yearRange[1]; i++) {
207
+            if (Number(this.data.isChinese) == 3) {
208
+              years.push("" + i);
209
+            } else {
210
+              years.push("" + i + "年");
211
+            }
212
+            console.log(i)
213
+          }
214
+        }
215
+      } else {
216
+        //获取年
217
+        for (let i = date.getFullYear(); i <= date.getFullYear() + 5; i++) {
218
+          if (Number(this.data.isChinese) == 3) {
219
+            years.push("" + i);
220
+          } else {
221
+            years.push("" + i + "年");
222
+          }
223
+        }
224
+      }
225
+      return years
226
+    },
227
+    //获取日期 月 日
228
+    getDate: function (num, isChinese, Chinese) {
229
+      const dateNew = [];
230
+      for (let i = 1; i <= num; i++) {
231
+        if (i < 10) {
232
+          i = "0" + i;
233
+        }
234
+        if (Number(this.data.isChinese) == isChinese) {
235
+          dateNew.push("" + i);
236
+        } else {
237
+          dateNew.push("" + i + Chinese);
238
+        }
239
+      }
240
+      return dateNew;
241
+    },
242
+    //获取日期  时 分 秒
243
+    getDates: function (num, isChinese, Chinese) {
244
+      const dateNew = [];
245
+      for (let i = 0; i < num; i++) {
246
+        if (i < 10) {
247
+          i = "0" + i;
248
+        }
249
+        if (Number(this.data.isChinese) == isChinese) {
250
+          dateNew.push("" + i + Chinese);
251
+        } else {
252
+          dateNew.push("" + i);
253
+        }
254
+      }
255
+      return dateNew;
256
+    },
51 257
   },
52
-  changeDateTimeColumn1 (e) {
53
-    var arr = this.data.dateTime1, dateArr = this.data.dateTimeArray1;
54
-
55
-    arr[e.detail.column] = e.detail.value;
56
-    dateArr[2] = dateTimePicker.getMonthDay(dateArr[0][arr[0]], dateArr[1][arr[1]]);
57
-
258
+  ready: function (e) {
58 259
     this.setData({
59
-      dateTimeArray1: dateArr,
60
-      dateTime1: arr
61
-    });
62
-  }
63
-})
260
+      multiArray: [this.getYear(), this.getDate(12, 3, '月'), this.getDate(31, 3, '日'), this.getDates(24, 1, '时'), this.getDates(60, 1, '分')].slice(0, this.data.multiIndex.length),
261
+    })
262
+  },
263
+})

+ 6
- 8
src/components/pickerTime/index.wxml 查看文件

@@ -1,8 +1,6 @@
1
-<view class="tui-picker-content">
2
-  <view class="tui-picker-name">日期时间选择器(精确到分)</view>
3
-  <picker mode="multiSelector" value="{{dateTime1}}" bindchange="changeDateTime1" bindcolumnchange="changeDateTimeColumn1" range="{{dateTimeArray1}}">
4
-    <view class="tui-picker-detail">
5
-      选择日期时间: {{dateTimeArray1[0][dateTime1[0]]}}-{{dateTimeArray1[1][dateTime1[1]]}}-{{dateTimeArray1[2][dateTime1[2]]}} {{dateTimeArray1[3][dateTime1[3]]}}:{{dateTimeArray1[4][dateTime1[4]]}}
6
-    </view>
7
-  </picker>
8
-</view>
1
+<picker mode="multiSelector" bindchange="bindMultiPickerChange" bindcolumnchange="bindMultiPickerColumnChange" value="{{multiIndex}}" range="{{multiArray}}">
2
+  <view class="picker">
3
+    <text hidden="{{tipsBlock}}">{{tips}}</text>
4
+    {{time}}
5
+  </view>
6
+</picker>

+ 1
- 1
src/pages/FeedbackText/index.jsx 查看文件

@@ -54,7 +54,7 @@ export default withLayout((props) => {
54 54
       <View>
55 55
         <View className='components-page'>
56 56
 
57
-          <Textarea placeholder='请留下您宝贵的意见和建议!' className='components-page-TextareaCentent' autoHeight onInput={(e) => { setTextAreaValue(e.detail.value) }} />
57
+          <Textarea placeholder='请留下您宝贵的意见和建议!' className='components-page-TextareaCentent' autoHeight onInput={(e) => { setTextAreaValue(e?.detail?.value) }} />
58 58
         </View>
59 59
         <View className='buton-bottom-Feedback'>
60 60
           <ButtontWX disabled={loading} onClick={onSubmitClick} butText='提交' butWidth={350} butHeight={49} butFontSize={16} butBorderRadius={49} />

+ 1
- 1
src/pages/MoreCars/index.jsx 查看文件

@@ -22,7 +22,7 @@ export default withLayout((props) => {
22 22
 
23 23
 
24 24
   const handleSearch = (e) => {
25
-    console.log(e.detail.value)
25
+    console.log(e?.detail?.value)
26 26
   }
27 27
 
28 28
   const tabs = [

+ 1
- 6
src/pages/MyAddressList/AddressInfos/index.jsx 查看文件

@@ -21,7 +21,7 @@ export default withLayout((props) => {
21 21
 
22 22
   const formSubmit = e => {
23 23
 
24
-    const value = e.detail.value
24
+    const value = e?.detail?.value
25 25
     console.log(value)
26 26
     if (addressId) {
27 27
       addressUpdate(addressId, { address: value.address }).then((res) => {
@@ -75,11 +75,6 @@ export default withLayout((props) => {
75 75
             <View>详细地址:</View>
76 76
             <Textarea name='address' value={address} className='aTextareaCentent' placeholder='请输入地址信息' />
77 77
           </View>
78
-          {/* <View className='example-body'>
79
-          <View>是否设为默认地址:</View>
80
-
81
-          <Switch name='isDefault' onChange={handelSwitch} type='checkbox' />
82
-        </View> */}
83 78
           <View className='buton-bottom'>
84 79
             <ButtontWX onClick={formSubmit} formType='submit' butText='保存' butWidth={315} butHeight={49} butFontSize={16} butBorderRadius={49} />
85 80
           </View>

+ 38
- 38
src/pages/OrderConfirmation/index.jsx 查看文件

@@ -34,36 +34,36 @@ export default (props) => {
34 34
 
35 35
 
36 36
   const formSubmit = (e) => {
37
-    console.log('表单输入', e);
38
-    Taro.navigateTo({ url: `/pages/OrderInfo/index?goOrder=${id}` })
39
-    // generateOrder({
40
-    //   charges: 200,
41
-    //   price: 100,
42
-    //   amount: 20,
43
-    //   machineryId: '7cdf832d7a7af0c19ab33418e10e1a94',
44
-    //   machineryName: '第一台播种机',
45
-    //   machineryType: 'b4d183f684ed1f3d1cb2194c1975ae46',
46
-    //   typeName: '播种机',
47
-    //   address: '我是作业地址:房屋后面',
48
-    //   appontmentDate: new Date(),
49
-    // }).then(() => {
50
-    //   Taro.navigateTo({ url: `/pages/OrderInfo/index?goOrder=${id}` })
51
-
52
-    // })
37
+    console.log('表单输入', e?.detail?.value);
38
+    const { amount, appontmentDate, address } = e?.detail?.value
39
+    // Taro.navigateTo({ url: `/pages/OrderInfo/index?goOrder=${id}` })
40
+    generateOrder({
41
+      charges: carsInfo?.price * amount,
42
+      price: carsInfo?.price,
43
+      amount: amount || '',
44
+      machineryId: carsInfo?.machineryId,
45
+      machineryName: carsInfo?.name,
46
+      machineryType: carsInfo?.typeId,
47
+      typeName: carsInfo?.typeName,
48
+      address: address || '',
49
+      // appontmentDate: appontmentDate || '',
50
+      appontmentDate: '2022-03-25 08:00:00',
51
+    }).then((es) => {
52
+      // Taro.navigateTo({ url: `/pages/OrderInfo/index?orderId=${es.orderId}` })
53
+
54
+    })
53 55
   }
54 56
   useEffect(() => {
55
-    // if (id) {
56
-    //   getMachineryInfo(id, { location: sserLocation, attached: true }).then((e) => {
57
-    //     setCarsInfo(e)
58
-    //     console.log('e', e);
59
-    //   })
60
-    // }
61
-
62
-
63
-  })
57
+    if (id) {
58
+      getMachineryInfo(id, { location: sserLocation, attached: true }).then((e) => {
59
+        setCarsInfo(e)
60
+        console.log('e', e);
61
+      })
62
+    }
63
+  }, [id, sserLocation])
64 64
   const onTimeChange = (e) => {
65 65
     console.log('时间选择器', e);
66
-    setTimeSel(e.detail.value)
66
+    setTimeSel(e?.detail?.value)
67 67
 
68 68
   }
69 69
   const cancelPay = () => {
@@ -74,6 +74,7 @@ export default (props) => {
74 74
 
75 75
 
76 76
 
77
+
77 78
   return (
78 79
     <View className='page-index'>
79 80
       <View className='index-navbar'>
@@ -81,19 +82,20 @@ export default (props) => {
81 82
       </View>
82 83
       {/* <BottomMoadl frameTitle='支付方式' flag={showFrame} onRecommend={setRecommend} /> */}
83 84
       <View className='pagesBox'>
84
-        <Form onSubmit={formSubmit}  >
85
+        <Form onSubmit={formSubmit} >
85 86
           <View className='example-body-WorkingArea'>
86 87
             <View>作业面积/公顷</View>
87
-            <Input name='address' placeholder='请输入具体面积(公顷)' />
88
+            <Input name='amount' type='number' className='aTextareaCentent' placeholder='请输入地址信息' />
88 89
           </View>
89 90
           <View className='example-body-WorkingTime'>
90 91
             <View>作业时间:</View>
91 92
             <View className='example-body-WorkingTime-TimePicker'>
92 93
               <Image src={timeImage} />
94
+              {/* <mp-pickerTime tips='请选择时间' isChinese={1} onChange={myevent} /> */}
93 95
 
94
-              <Picker mode='date' onChange={onTimeChange}>
96
+              <Picker mode='date' name='appontmentDate' onChange={onTimeChange}>
95 97
                 <View className='picker' >
96
-                  请选择时间 {timeSel}
98
+                  {timeSel || '请选择日期'}
97 99
                 </View>
98 100
               </Picker>
99 101
             </View>
@@ -101,19 +103,17 @@ export default (props) => {
101 103
           </View>
102 104
           <View className='example-body-WorkingLocation'>
103 105
             <View>作业位置:</View>
104
-            <View className='example-body-WorkingLocation-info'>
106
+            <View className='example-body-WorkingLocation-info' onClick={() => { console.log('111111',); }}>
105 107
               <Image src={addresss} />
106
-              <View>这就是我的地址位置为位置位置位置位置为阿斯顿撒旦</View>
108
+              <Input name='address' disabled className='aTextareaCentent' value='1111111' placeholder='请输入地址信息' />
109
+
107 110
             </View>
108 111
           </View>
109
-
110
-          <View className='BottomtBut' >
111
-            <ButtontWX butText='确定' onClick={formSubmit} butWidth={346} butHeight={49} butFontSize={16} butBorderRadius={49} />
112
-
113
-            <ButtontWX butText='取消' onClick={cancelPay} butWidth={346} butHeight={49} butFontSize={16} butBorderRadius={49} />
112
+          <View className='BottomtBut-box'>
113
+            <ButtontWX onClick={formSubmit} formType='submit' butText='确定' butWidth={315} butHeight={49} butFontSize={16} butBorderRadius={49} />
114
+            <ButtontWX onClick={cancelPay} formType='submit' styleType butText='取消' butWidth={315} butHeight={49} butFontSize={16} butBorderRadius={49} />
114 115
           </View>
115 116
         </Form>
116
-
117 117
       </View>
118 118
 
119 119
     </View>

+ 11
- 8
src/pages/OrderConfirmation/style.less 查看文件

@@ -6,7 +6,6 @@
6 6
     font-weight: 600;
7 7
     > Input {
8 8
       padding: 10px 0;
9
-      height: 4vh;
10 9
       border-bottom: 1px solid rgba(0, 0, 0, 0.2);
11 10
       font-weight: 100;
12 11
     }
@@ -29,6 +28,9 @@
29 28
         height: 34px;
30 29
         padding-right: 15px;
31 30
       }
31
+      .picker {
32
+        font-weight: 100;
33
+      }
32 34
     }
33 35
   }
34 36
 
@@ -43,6 +45,8 @@
43 45
       border-bottom: 1px solid rgba(0, 0, 0, 0.2);
44 46
       margin: 1em auto;
45 47
       padding-bottom: 1em;
48
+      font-weight: 100;
49
+
46 50
       > Image {
47 51
         width: 34px;
48 52
         height: 34px;
@@ -53,15 +57,14 @@
53 57
         overflow: hidden;
54 58
         text-overflow: ellipsis;
55 59
         white-space: nowrap;
56
-        font-weight: 100;
57 60
         color: #000;
58 61
       }
59 62
     }
60 63
   }
61
-}
62
-
63
-.BottomtBut {
64
-  padding-top: 2em;
65
-  margin: 0 auto;
66
-  // display: flex;
64
+  .BottomtBut-box {
65
+    width: 94vw;
66
+    margin: 0 auto;
67
+    position: absolute;
68
+    bottom: 3em;
69
+  }
67 70
 }

+ 4
- 3
src/pages/UserLogin/index.jsx 查看文件

@@ -17,7 +17,7 @@ import './style.less'
17 17
 
18 18
 export default withLayout((props) => {
19 19
 
20
-  const { person, setUserPhoneInfo } = useModel('userData')
20
+  const { person, setPerson } = useModel('userData')
21 21
 
22 22
 
23 23
   const [countCenter, setCountCenter] = useState({
@@ -33,12 +33,12 @@ export default withLayout((props) => {
33 33
   const [InputCodeValue, setInputCodeValue] = useState('375501')
34 34
 
35 35
   const onInputPhone = (r) => {
36
-    setInputPhoneValue(r.detail.value)
36
+    setInputPhoneValue(r?.detail?.value)
37 37
     console.log("🚀 ~ file: index.jsx ~ line 26 ~ InputCodeValue", InputPhoneValue)
38 38
 
39 39
   }
40 40
   const onInputCode = (r) => {
41
-    setInputCodeValue(r.detail.value)
41
+    setInputCodeValue(r?.detail?.value)
42 42
 
43 43
   }
44 44
   //获取验证码
@@ -100,6 +100,7 @@ export default withLayout((props) => {
100 100
       } else {
101 101
         setUserPhone(person.personId, { captcha: InputCodeValue, phone: InputPhoneValue }).then((e) => {
102 102
           console.log('e', e);
103
+          setPerson({ ...person, phone: InputPhoneValue })
103 104
           Taro.reLaunch({ url: '/pages/index/index?tab=2&userOk' });
104 105
         })
105 106
         // console.log('person', person);

+ 1
- 1
src/pages/index/tabs/Homes.jsx 查看文件

@@ -38,7 +38,7 @@ export default withLayout((props) => {
38 38
 
39 39
 
40 40
   const handleSearch = (e) => {
41
-    console.log(e.detail.value)
41
+    console.log(e?.detail?.value)
42 42
   }
43 43
 
44 44
   const goToCarsList = () => {//更多

+ 1
- 1
src/pages/index/tabs/Mine.jsx 查看文件

@@ -131,7 +131,7 @@ export default withLayout((props) => {
131 131
                   <Image className='addresss-box-images' src={addresss} />
132 132
                   <View className='addresss-box-contents'>
133 133
                     <View className='addresss-box-contents-texts' >{addresInfo || '请填写详细地址'}</View>
134
-                    <View></View>
134
+                    <View> &gt;&gt;</View>
135 135
                   </View>
136 136
                 </View>
137 137
               </UserCellBox>

+ 2
- 2
src/pages/userInfo/index.jsx 查看文件

@@ -19,10 +19,10 @@ export default withLayout((props) => {
19 19
   const [phone, setPhone] = useState(person.phone)
20 20
   const [avatar, setAvatar] = useState(person.avatar)
21 21
   const changeName = (e) => {
22
-    setName(e.detail.value)
22
+    setName(e?.detail?.value)
23 23
   }
24 24
   const changePhone = (e) => {
25
-    setPhone(e.detail.value)
25
+    setPhone(e?.detail?.value)
26 26
   }
27 27
   const rulePhone = (val) => {
28 28
     if (!/^1[0-9]{10}$/.test(val)) {