Commit 832b38d7 by 冷斌

测试

短信验证
parent 5cb7b949
......@@ -124,10 +124,6 @@ class GoodsAction extends Action
$this->assign("bestVideo", $bestVideo);
$this->assign('sort_type', $sort_type);
$this->assign("sple_score", $sple_score);
var_dump($data);
die;
//如果是ajax并且为h5访问 直接输出后边的数据
if ($this->isAjax() && $this->is_wap) {
$html = $this->fetch('index_w3g_ajax');
......@@ -139,6 +135,106 @@ class GoodsAction extends Action
$this->display();
}
public function index2()
{
if ($_GET['type']) {
$ranking_list = D('Goods')->getRankGoods();
//dump($ranking_list);
$this->assign('ranking_list', $ranking_list['data']);
} else {
$map = "status=1 AND is_del=0 AND mhm_id=" . $this->mhm_id;
$orders = array(
'default' => 'ctime DESC',
'price_up' => 'price ASC',
'price_down' => 'price DESC',
'new' => 'ctime DESC',
);
$limit = 20;
$sort_type = t($_GET['sort_type']);
//获取分类列表
$cate_id = t($_GET['cateId']);
if ($cate_id > 0) {
$cateId = explode(",", $cate_id);
}
$search = t($_GET['search']);
if ($search) {
$map .= " AND title like '%$search%'";
}
//判断获取分类来源
if ($this->is_pc) {
$good_category = D('GoodsCategory', 'mall')->getTopCategory($this->mhm_id);
$this->assign('good_category', $good_category);
} else {
$cateData = model('CategoryTree')->setTable('goods_category')->getNetworkList(0,0,1,$this->mhm_id);
$this->assign('cateData', $cateData);
}
if ($cateId) {
$title = D('GoodsCategory', 'mall')->where('goods_category_id=' . end($cateId))->getField("title");
$this->assign('title', $title);
$this->assign('cate_id_str', $cateId);
$selCate = M("goods_category")->where(array('pid' => $cateId[0], 'mhm_id'=>$this->mhm_id))->field("goods_category_id,title")->findALL();
$this->assign('category_two', $selCate);
}
if ($cateId[1]) {
$selChildCate = M("goods_category")->where(array('pid' => $cateId[1], 'mhm_id'=>$this->mhm_id))->field("goods_category_id,title")->findALL();
$this->assign('category_three', $selChildCate);
}
$this->assign('cateId', $cateId[0]);
$this->assign('cate_id', $cateId[1]);
$this->assign('cate_ids', $cateId[2]);
if ($cateId > 0) {
$good_category = implode(',', $cateId);
$map .= " AND fullcategorypath like '%,$good_category,%'";
}
if ($sort_type) {
switch ($sort_type) {
case '1':
$map .= " AND is_best = $sort_type";
$order = 'best_sort desc';
break;
case 'hot':
$order = $orders[$sort_type];
break;
case 'price_up':
$order = $orders[$sort_type];
break;
case 'price_down':
$order = $orders[$sort_type];
break;
default;
}
}
if ($_GET['lower']) {
list($lower, $toper) = explode(',', $_GET['lower']);
if ($toper && $lower >= 1) {
$map .= " AND (t_price >= $lower AND t_price <= $toper)";
}
}
$data = D('Goods')->getList($map, $order, $limit);
if ($data['data']) {
$this->assign('data', $data);
$this->assign('listData', $data['data']);
}
}
//兑换比例
$split_score = model('Xdata')->get("admin_Config:rechargeIntoConfig");
unset($split_score['rechange_default']);
$sple_score = array_filter(explode(':', $split_score['sple_score']))[1] / array_filter(explode(':', $split_score['sple_score']))[0];
$html = $this->fetch('index_w3g_ajax');
$data['data'] = $html;
echo json_encode($data);
exit();
}
/**
* @name 获取商品详情
*/
......
......@@ -14,6 +14,7 @@ return array(
'school/Index/index' => SITE_URL.'/school.html',//机构
'classroom/Teacher/index' => SITE_URL.'/teacher.html',//讲师
'mall/Goods/index' => SITE_URL.'/mall.html',//积分商城
'mall/Goods/index2' => SITE_URL.'/mall2.html',//积分商城
'wenda/Index/index' => SITE_URL.'/question.html',//问答
'exams/Index/index' => SITE_URL.'/exam.html',//考试
'group/Index/index' => SITE_URL.'/group.html',//小组
......@@ -158,4 +159,4 @@ return array(
'exams/Index/pay' => SITE_URL.'/pay/exams_[vst].html',
)
);
\ No newline at end of file
);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment