<?php
/**
 * 限时促销
 * @Copyright (C) 2016 汉潮 All rights reserved.
 * @License http://www.hanchao9999.com
 * @Author zhaoh <1070309178@qq.com>
 */
namespace Home\Controller;
use Think\Controller;
class PromotSaleController extends BaseController{
    public function index(){
		$getdata = I('param.');
		//限时促销信息
		$map['is_limit_time']=1;
		$map['pid']=0;
		$map['start_time']=array('lt',NOW_TIME);
		$map['end_time']=array('gt',NOW_TIME);
		$act_info=M('PromotAct')->where($map)->field(true)->find();
		if(empty($act_info)){$this->error('暂无促销活动',U('Index/index'));}
		$this->assign('act_info',$act_info);
		
		//限时商品信息
		$getdata['act_id'] = $act_info['id'];
		$data = D('Common/Promot')->get_promot_goods($getdata);
		$this->assign('order', $data['order']);
		$this->assign($data['goods_info']);
        $this->assign('tplseo_title', $act_info['act_name'] . '_限时促销' . '_' . C('WEB_SITE_TITLE'));
        $this->assign('tplseo_keywords', $act_info['act_name'] . '_限时促销' . '_' . C('WEB_SITE_TITLE'));
        $this->assign('tplseo_description', $act_info['act_name'] . '_限时促销' . '_' . C('WEB_SITE_TITLE'));
        $this->display();
    }
}
?>