作者 刘朕
1 个管道 的构建 通过 耗费 1 秒

合并分支 '1iuzhen' 到 'master'

1iuzhen



查看合并请求 !242
@@ -80,7 +80,7 @@ class MemberSalesController extends HomeBaseController @@ -80,7 +80,7 @@ class MemberSalesController extends HomeBaseController
80 </div>'; 80 </div>';
81 $this->sort_model[10] = '<div class="text_item no_margin form_options" data-validate="{validate}" data-type="10"> 81 $this->sort_model[10] = '<div class="text_item no_margin form_options" data-validate="{validate}" data-type="10">
82 <p class="text_tit"><span class=" _validate">{name}</span>{must}</p> 82 <p class="text_tit"><span class=" _validate">{name}</span>{must}</p>
83 - <input type="text" name="" readonly="readonly" value="{value}" class="baby_input birthday" placeholder="请选择{name}" /> 83 + <input type="text" name="" readonly="readonly" id="birthday{key}" value="{value}" class="baby_input birthday" placeholder="请选择{name}" />
84 <img src="__TMPL__/public/mobile/images/youjiantou.png" class="jiantou" /> 84 <img src="__TMPL__/public/mobile/images/youjiantou.png" class="jiantou" />
85 </div>'; 85 </div>';
86 $this->sort_model[11] = '<div class="text_item form_options" data-validate="{validate}" data-type="11"> 86 $this->sort_model[11] = '<div class="text_item form_options" data-validate="{validate}" data-type="11">
@@ -501,6 +501,9 @@ class MemberSalesController extends HomeBaseController @@ -501,6 +501,9 @@ class MemberSalesController extends HomeBaseController
501 $html = str_replace('{img}',$img,$html); 501 $html = str_replace('{img}',$img,$html);
502 $html = str_replace('{img_height}','height:auto;',$html); 502 $html = str_replace('{img_height}','height:auto;',$html);
503 } 503 }
  504 + if($formData['type'] == 10) {
  505 + $html = str_replace('{key}',$formData['id'],$html);
  506 + }
504 $html = str_replace('{value}',$formData['user_choose'],$html); 507 $html = str_replace('{value}',$formData['user_choose'],$html);
505 } else { 508 } else {
506 if($formData['type'] == 8) { 509 if($formData['type'] == 8) {
@@ -509,6 +512,9 @@ class MemberSalesController extends HomeBaseController @@ -509,6 +512,9 @@ class MemberSalesController extends HomeBaseController
509 $html = str_replace('{img}',$img,$html); 512 $html = str_replace('{img}',$img,$html);
510 $html = str_replace('{img_height}','',$html); 513 $html = str_replace('{img_height}','',$html);
511 } 514 }
  515 + if($formData['type'] == 10) {
  516 + $html = str_replace('{key}',$formData['id'],$html);
  517 + }
512 $html = str_replace('{value}','',$html); 518 $html = str_replace('{value}','',$html);
513 } 519 }
514 return $html; 520 return $html;
@@ -162,17 +162,20 @@ @@ -162,17 +162,20 @@
162 162
163 var dt = new Date(); 163 var dt = new Date();
164 var df= [dt.getFullYear(), (dt.getMonth() + 1), dt.getDate()]; 164 var df= [dt.getFullYear(), (dt.getMonth() + 1), dt.getDate()];
165 - $('.birthday').on('focus',function() { 165 + $('.birthday').on('focus',function(e) {
  166 + console.log(e)
  167 + var ele = e.currentTarget.id;
  168 + console.log(ele)
166 var obj = $(this); 169 var obj = $(this);
167 var this_date = obj.val(); 170 var this_date = obj.val();
168 dt = new Date(Date.parse(this_date.replace('年','-').replace('月','-').replace('日',''))) 171 dt = new Date(Date.parse(this_date.replace('年','-').replace('月','-').replace('日','')))
169 df= [dt.getFullYear(), (dt.getMonth() + 1), dt.getDate()]; 172 df= [dt.getFullYear(), (dt.getMonth() + 1), dt.getDate()];
170 console.log(df); 173 console.log(df);
171 - timeInit(obj,df); 174 + timeInit(obj,df,ele);
172 }); 175 });
173 176
174 // 时间组件 177 // 时间组件
175 - function timeInit(obj,df) { 178 + function timeInit(obj,df,el) {
176 weui.datePicker({ 179 weui.datePicker({
177 start: 2000, 180 start: 2000,
178 end: 2030, 181 end: 2030,
@@ -185,7 +188,7 @@ @@ -185,7 +188,7 @@
185 var birthday = result[0].label + result[1].label + result[2].label; 188 var birthday = result[0].label + result[1].label + result[2].label;
186 obj.val(birthday) 189 obj.val(birthday)
187 }, 190 },
188 - id: 'datePicker' 191 + id: el
189 }); 192 });
190 } 193 }
191 194