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

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

1iuzhen



查看合并请求 !242
... ... @@ -80,7 +80,7 @@ class MemberSalesController extends HomeBaseController
</div>';
$this->sort_model[10] = '<div class="text_item no_margin form_options" data-validate="{validate}" data-type="10">
<p class="text_tit"><span class=" _validate">{name}</span>{must}</p>
<input type="text" name="" readonly="readonly" value="{value}" class="baby_input birthday" placeholder="请选择{name}" />
<input type="text" name="" readonly="readonly" id="birthday{key}" value="{value}" class="baby_input birthday" placeholder="请选择{name}" />
<img src="__TMPL__/public/mobile/images/youjiantou.png" class="jiantou" />
</div>';
$this->sort_model[11] = '<div class="text_item form_options" data-validate="{validate}" data-type="11">
... ... @@ -501,6 +501,9 @@ class MemberSalesController extends HomeBaseController
$html = str_replace('{img}',$img,$html);
$html = str_replace('{img_height}','height:auto;',$html);
}
if($formData['type'] == 10) {
$html = str_replace('{key}',$formData['id'],$html);
}
$html = str_replace('{value}',$formData['user_choose'],$html);
} else {
if($formData['type'] == 8) {
... ... @@ -509,6 +512,9 @@ class MemberSalesController extends HomeBaseController
$html = str_replace('{img}',$img,$html);
$html = str_replace('{img_height}','',$html);
}
if($formData['type'] == 10) {
$html = str_replace('{key}',$formData['id'],$html);
}
$html = str_replace('{value}','',$html);
}
return $html;
... ...
... ... @@ -162,17 +162,20 @@
var dt = new Date();
var df= [dt.getFullYear(), (dt.getMonth() + 1), dt.getDate()];
$('.birthday').on('focus',function() {
$('.birthday').on('focus',function(e) {
console.log(e)
var ele = e.currentTarget.id;
console.log(ele)
var obj = $(this);
var this_date = obj.val();
dt = new Date(Date.parse(this_date.replace('年','-').replace('月','-').replace('日','')))
df= [dt.getFullYear(), (dt.getMonth() + 1), dt.getDate()];
console.log(df);
timeInit(obj,df);
timeInit(obj,df,ele);
});
// 时间组件
function timeInit(obj,df) {
function timeInit(obj,df,el) {
weui.datePicker({
start: 2000,
end: 2030,
... ... @@ -185,7 +188,7 @@
var birthday = result[0].label + result[1].label + result[2].label;
obj.val(birthday)
},
id: 'datePicker'
id: el
});
}
... ...