subject_429
This commit is contained in:
@@ -59,14 +59,12 @@
|
||||
placeholder="开始时间 ~ 结束时间" autocomplete="off"/>
|
||||
</div>
|
||||
<div class="am-para-inline" style="padding-top: 5px;">
|
||||
<a class="mr10 id-day-btn" href="javascript:void (0);" data-date="today"
|
||||
data-source="id-time">今天</a>
|
||||
<a class="mr10 id-day-btn" href="javascript:void (0);" data-date="yesterday"
|
||||
data-source="id-time">昨日</a>
|
||||
<a class="mr10 id-day-btn" href="javascript:void (0);" data-date="7day"
|
||||
data-source="id-time">最近7天</a>
|
||||
<a class="mr10 id-day-btn" href="javascript:void (0);" data-date="30day"
|
||||
data-source="id-time">最近30天</a>
|
||||
<a class="mr10 id-day-btn" href="javascript:void (0);" data-date="weeks"
|
||||
data-source="id-time">本周</a>
|
||||
<a class="mr10 id-day-btn" href="javascript:void (0);" data-date="month"
|
||||
data-source="id-time">本月</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -137,24 +135,27 @@
|
||||
elem: '#id-time', range: '~'
|
||||
});
|
||||
$('.id-day-btn').click(function () {
|
||||
var type = $(this).data('date'), date = '', d_obj = new Date();
|
||||
var type = $(this).data('date'), date = '', nowDate = new Date();
|
||||
var source_id = $(this).data('source') || 'id-time';
|
||||
var beginDate = '';
|
||||
var endDate = '';
|
||||
switch (type) {
|
||||
case 'today':
|
||||
date = d_obj.Format('yyyy-MM-dd');
|
||||
date = date + ' ~ ' + date;
|
||||
break;
|
||||
case 'yesterday':
|
||||
date = (new Date(d_obj.getTime() - 86400000)).Format('yyyy-MM-dd');
|
||||
date = date + ' ~ ' + date;
|
||||
beginDate = endDate = (new Date(nowDate.getTime() - 86400000)).Format('yyyy-MM-dd');
|
||||
break;
|
||||
case '7day':
|
||||
date = (new Date(d_obj.getTime() - 86400000 * 7)).Format('yyyy-MM-dd') + ' ~ ' + d_obj.Format('yyyy-MM-dd');
|
||||
case 'weeks':
|
||||
nowDate.setDate(nowDate.getDate() - nowDate.getDay() + 1);
|
||||
beginDate = nowDate.getFullYear() + "-" + (nowDate.getMonth() + 1) + "-" + nowDate.getDate();
|
||||
nowDate.setDate(nowDate.getDate() + 6);
|
||||
endDate = nowDate.getFullYear() + "-" + (nowDate.getMonth() + 1) + "-" + nowDate.getDate();
|
||||
break;
|
||||
case '30day':
|
||||
date = (new Date(d_obj.getTime() - 86400000 * 29)).Format('yyyy-MM-dd') + ' ~ ' + d_obj.Format('yyyy-MM-dd');
|
||||
case 'month':
|
||||
beginDate = nowDate.getFullYear() + "-" + (nowDate.getMonth() + 1) + "-01";
|
||||
var day = new Date(nowDate.getFullYear(), nowDate.getMonth() + 1, 0);
|
||||
endDate = nowDate.getFullYear() + "-" + (nowDate.getMonth() + 1) + "-" + day.getDate();
|
||||
break;
|
||||
}
|
||||
date = beginDate + ' ~ ' + endDate;
|
||||
$('#' + source_id).val(date);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -99,11 +99,11 @@
|
||||
<div class="am-form-group" style="margin-bottom: 0px;"></div>
|
||||
<div class="am-form-group fl">
|
||||
<div class="am-form-group" style="margin-bottom: 0px;"></div>
|
||||
<label class="am-para-label w100">订单时间:</label>
|
||||
<label class="am-para-label w100">创建时间:</label>
|
||||
<div class="am-form-group fl">
|
||||
<div class="am-para-inline w300">
|
||||
<input id="id-create-time" name="c_time" type="text" value="<?= $params['c_time'] ?>"
|
||||
placeholder="订单时间范围" autocomplete="off"/>
|
||||
placeholder="创建时间范围" autocomplete="off"/>
|
||||
</div>
|
||||
<div class="am-para-inline" style="padding-top: 5px;">
|
||||
<a class="mr10 id-day-btn" href="javascript:void (0);" data-date="today">今天</a>
|
||||
|
||||
@@ -179,7 +179,9 @@ class Subject extends Wxapp{
|
||||
$imgs = [];
|
||||
if(is_array($json_imgs)){
|
||||
foreach($json_imgs as $val){
|
||||
$val['img'] && $imgs[] = build_qiniu_image_url($val['img'],750);
|
||||
//$val['img'] && $imgs[] = build_qiniu_image_url($val['img'],750);
|
||||
$height = intval($val['height']);
|
||||
$val['img'] && $imgs[] = ['img' => build_qiniu_image_url($val['img'], 750), 'height' => $height];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -199,7 +201,7 @@ class Subject extends Wxapp{
|
||||
"type" => intval($row_sub["type"]),
|
||||
'imgs' => $imgs,
|
||||
'video' => $row_sub['video'],
|
||||
'status' => isset($v['status']) ? intval($v['status']) : 1,
|
||||
'status' => isset($row_sub['status']) ? intval($row_sub['status']) : 1,
|
||||
);
|
||||
|
||||
return $data;
|
||||
|
||||
Reference in New Issue
Block a user