|
|
@ -207,8 +207,17 @@ class PromoteController extends BaseController
|
|
|
|
$this->assign('todayAddSpendData', $todayAddSpendData);
|
|
|
|
$this->assign('todayAddSpendData', $todayAddSpendData);
|
|
|
|
$this->assign('mounthAddSpendData', $mounthAddSpendData);
|
|
|
|
$this->assign('mounthAddSpendData', $mounthAddSpendData);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$promoteBelong = M('promote', 'tab_')->where(['id'=>get_pid()])->getField('company_belong');
|
|
|
|
|
|
|
|
if ($promoteBelong == 1 || $promoteBelong == 2) {
|
|
|
|
|
|
|
|
$compang_belongs = 1;
|
|
|
|
|
|
|
|
}else {
|
|
|
|
|
|
|
|
$compang_belongs = 2;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 规则弹窗事宜
|
|
|
|
// 规则弹窗事宜
|
|
|
|
$rules = M("document_pop_rules")
|
|
|
|
$rules = M("document_pop_rules")
|
|
|
|
|
|
|
|
->where(['belongs' => $compang_belongs])
|
|
|
|
//->where("(type = 1 and pop_time = {$currentTime}) or (type = 2 and pop_time = {$week})")
|
|
|
|
//->where("(type = 1 and pop_time = {$currentTime}) or (type = 2 and pop_time = {$week})")
|
|
|
|
->order("sort asc, id desc")
|
|
|
|
->order("sort asc, id desc")
|
|
|
|
->limit('0, 5')
|
|
|
|
->limit('0, 5')
|
|
|
@ -216,12 +225,6 @@ class PromoteController extends BaseController
|
|
|
|
$this->assign("rules", $rules);
|
|
|
|
$this->assign("rules", $rules);
|
|
|
|
$this->assign("rules_count", count($rules));
|
|
|
|
$this->assign("rules_count", count($rules));
|
|
|
|
|
|
|
|
|
|
|
|
$promoteBelong = M('promote', 'tab_')->where(['id'=>get_pid()])->getField('company_belong');
|
|
|
|
|
|
|
|
if ($promoteBelong == 1 || $promoteBelong == 2) {
|
|
|
|
|
|
|
|
$compang_belongs = 1;
|
|
|
|
|
|
|
|
}else {
|
|
|
|
|
|
|
|
$compang_belongs = 2;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
$belongs = M("document_pop_rules")
|
|
|
|
$belongs = M("document_pop_rules")
|
|
|
|
->where(['belongs' => $compang_belongs])->count();
|
|
|
|
->where(['belongs' => $compang_belongs])->count();
|
|
|
|
if (intval($belongs) > 0) {
|
|
|
|
if (intval($belongs) > 0) {
|
|
|
|