Commit dc9efaa6ce9783dd263867a6de43190cee326773

Authored by wangfan
1 parent 0e4aa73b

manager-invitation

@@ -59,7 +59,7 @@ Page({ @@ -59,7 +59,7 @@ Page({
59 latitude:res.data.lat, 59 latitude:res.data.lat,
60 longitude:res.data.long, 60 longitude:res.data.long,
61 }, 61 },
62 - timeStr:util.unixtoTime(res.data.arrival_time,'MM-DD 星期WW HH:II') 62 + timeStr:util.unixtoTime(res.data.arrival_time,this.data.tpl.timeStr)
63 }) 63 })
64 }) 64 })
65 }else{ 65 }else{
@@ -128,7 +128,7 @@ Page({ @@ -128,7 +128,7 @@ Page({
128 128
129 }, 129 },
130 bindMultiPickerColumnChange(e){ 130 bindMultiPickerColumnChange(e){
131 - console.log(e); 131 + //console.log(e);
132 if(e.detail.column==1){ 132 if(e.detail.column==1){
133 this.setData({ 133 this.setData({
134 [`pickerValue[1]`]:e.detail.value, 134 [`pickerValue[1]`]:e.detail.value,
@@ -137,8 +137,10 @@ Page({ @@ -137,8 +137,10 @@ Page({
137 } 137 }
138 }, 138 },
139 bindMultiPickerChange(e){ 139 bindMultiPickerChange(e){
  140 + console.log(e);
140 this.setData({ 141 this.setData({
141 - pickerValue:e.detail.value 142 + pickerValue:e.detail.value,
  143 + timeStr:util.unixtoTime(this.getTimeStr(e.detail.value),this.data.tpl.timeStr)
142 }) 144 })
143 this.checkHasSubmit() 145 this.checkHasSubmit()
144 }, 146 },
@@ -173,12 +175,16 @@ Page({ @@ -173,12 +175,16 @@ Page({
173 }) 175 })
174 this.checkHasSubmit() 176 this.checkHasSubmit()
175 }, 177 },
176 - getTimeStr(){  
177 - if(this.data.pickerValue[0]>-1){ 178 + getTimeStr(pickerValue=''){
  179 + if(pickerValue.length<1){
  180 + pickerValue=this.data.pickerValue;
  181 + }
  182 + if(pickerValue[0]>-1){
178 let d=new Date(); 183 let d=new Date();
179 let y=d.getFullYear(); 184 let y=d.getFullYear();
180 - let md=this.data.pickerData[0][this.data.pickerValue[0]].substr(0,5);  
181 - let t=this.data.pickerData[2][this.data.pickerValue[2]]; 185 + let md=this.data.pickerData[0][pickerValue[0]].substr(0,5);
  186 + let t=this.data.pickerData[2][pickerValue[2]];
  187 + console.log(y+'-'+md+' '+t+':00')
182 return util.timetouUnix(y+'-'+md+' '+t+':00'); 188 return util.timetouUnix(y+'-'+md+' '+t+':00');
183 }else{ 189 }else{
184 return this.data.form.time; 190 return this.data.form.time;
@@ -18,10 +18,12 @@ @@ -18,10 +18,12 @@
18 range="{{pickerData}}" 18 range="{{pickerData}}"
19 > 19 >
20 <view class="picker"> 20 <view class="picker">
  21 + <!--
21 <block wx:if="{{pickerValue[0]>-1}}"> 22 <block wx:if="{{pickerValue[0]>-1}}">
22 {{pickerData[0][pickerValue[0]]}} {{pickerData[1][pickerValue[1]]}} {{pickerData[2][pickerValue[2]]}} 23 {{pickerData[0][pickerValue[0]]}} {{pickerData[1][pickerValue[1]]}} {{pickerData[2][pickerValue[2]]}}
23 </block> 24 </block>
24 - <text wx:elif="{{timeStr}}">{{timeStr}}</text> 25 + -->
  26 + <text wx:if="{{timeStr}}">{{timeStr}}</text>
25 <text class="placeholder-class" wx:else="">请输入预订时间</text> 27 <text class="placeholder-class" wx:else="">请输入预订时间</text>
26 </view> 28 </view>
27 </picker> 29 </picker>