|
|
|
@ -954,12 +954,23 @@ class ToolController extends ThinkController {
|
|
|
|
|
}
|
|
|
|
|
if ($data['limit_time_type'] == 'week') {
|
|
|
|
|
$data['limit_time_type'] = '每周,';
|
|
|
|
|
$remarkStr = '周'.$data['limit_time_type_remark'];
|
|
|
|
|
}
|
|
|
|
|
if ($data['limit_time_type'] == 'month') {
|
|
|
|
|
$data['limit_time_type'] = '每月,';
|
|
|
|
|
$remarkStr = $data['limit_time_type_remark'].'号';
|
|
|
|
|
}
|
|
|
|
|
if ($data['limit_time_type'] == 'fix') {
|
|
|
|
|
$data['limit_time_type'] = '特殊,';
|
|
|
|
|
$remarks = str_split($data['limit_time_type_remark'], 1);
|
|
|
|
|
$remarkStr = '';
|
|
|
|
|
foreach($remarks as $keyR => $remark) {
|
|
|
|
|
if ($keyR == 3 || $keyR == 5){
|
|
|
|
|
$remarkStr .= $remark. '-';
|
|
|
|
|
}else {
|
|
|
|
|
$remarkStr .= $remark;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if ($data['limit_type'] == 'force') {
|
|
|
|
|
$datas[$key]['limit_type'] = '强制模式';
|
|
|
|
@ -1000,9 +1011,10 @@ class ToolController extends ThinkController {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$datas[$key]['pay_type'] = $pay_type;
|
|
|
|
|
$datas[$key]['limit_rule'] = $limit_rule;
|
|
|
|
|
$datas[$key]['limit_time'] = $data['limit_time_type'] .$data['limit_time_type_remark'].' '.$startTimeStr.'~'.$endTimeStr;
|
|
|
|
|
$datas[$key]['limit_time'] = $data['limit_time_type'] .$remarkStr.' '.$startTimeStr.'~'.$endTimeStr;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
//分页
|
|
|
|
@ -1012,7 +1024,6 @@ class ToolController extends ThinkController {
|
|
|
|
|
if ($page) {
|
|
|
|
|
$this->assign('_page', $page);
|
|
|
|
|
}
|
|
|
|
|
var_dump($payType);
|
|
|
|
|
if (empty($payType)) {
|
|
|
|
|
$this->assign('pay_type', " ");
|
|
|
|
|
}else {
|
|
|
|
@ -1116,7 +1127,8 @@ class ToolController extends ThinkController {
|
|
|
|
|
if (empty($_REQUEST['day_remark'])) {
|
|
|
|
|
return $this->error('每月限制时间未确定');
|
|
|
|
|
}else {
|
|
|
|
|
$data['limit_time_type_remark'] = $_REQUEST['day_remark'];
|
|
|
|
|
$fixStr = str_replace('-','',$_REQUEST['day_remark']);
|
|
|
|
|
$data['limit_time_type_remark'] = $fixStr;
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
@ -1242,9 +1254,10 @@ class ToolController extends ThinkController {
|
|
|
|
|
if (empty($_REQUEST['day_remark'])) {
|
|
|
|
|
return $this->error('每月限制时间未确定');
|
|
|
|
|
}else {
|
|
|
|
|
$confInfo['limit_time_type_remark'] = $_REQUEST['day_remark'];
|
|
|
|
|
$fixStr = str_replace('-','',$_REQUEST['day_remark']);
|
|
|
|
|
$confInfo['limit_time_type_remark'] = $fixStr;
|
|
|
|
|
}
|
|
|
|
|
$confInfo['limit_time_type_remark'] = $_REQUEST['day_remark'];
|
|
|
|
|
// $confInfo['limit_time_type_remark'] = $_REQUEST['day_remark'];
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
$confInfo['limit_time_type'] = $limit_time_type;
|
|
|
|
@ -1262,6 +1275,19 @@ class ToolController extends ThinkController {
|
|
|
|
|
|
|
|
|
|
$end_time = $data['end_time'];
|
|
|
|
|
$monthDay = $this->getMonthDay();
|
|
|
|
|
if ($data['limit_time_type'] == 'fix') {
|
|
|
|
|
$remarks = str_split($data['limit_time_type_remark'], 1);
|
|
|
|
|
$remarkStr = '';
|
|
|
|
|
foreach($remarks as $keyR => $remark) {
|
|
|
|
|
if ($keyR == 3 || $keyR == 5){
|
|
|
|
|
$remarkStr .= $remark. '-';
|
|
|
|
|
}else {
|
|
|
|
|
$remarkStr .= $remark;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
$data['limit_time_type_remark'] = $remarkStr;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$this->assign('monthday', $monthDay);
|
|
|
|
|
$this->assign('startTime', $start_time);
|
|
|
|
|
$this->assign('endTime', $end_time);
|
|
|
|
@ -1284,7 +1310,7 @@ class ToolController extends ThinkController {
|
|
|
|
|
public function getMonthDay() {
|
|
|
|
|
$arr = [];
|
|
|
|
|
for ($i = 1;$i < 32; $i++ ) {
|
|
|
|
|
$arr[] = $i.'号';
|
|
|
|
|
$arr[] = $i;
|
|
|
|
|
}
|
|
|
|
|
return $arr;
|
|
|
|
|
|
|
|
|
|