Commit 2890bc4d by 冷斌

设置

parent ad74c6c0
...@@ -160,6 +160,64 @@ class HomeAction extends UserAction ...@@ -160,6 +160,64 @@ class HomeAction extends UserAction
$this->display(); $this->display();
} }
public function orderList()
{
$limit = 1000;
$orderby = t($_GET['orderby']);
$orderby = $orderby ? $orderby : 1;
if ($orderby) {
if ($orderby != 0) {
$map['pay_status'] = $orderby;
}
}
$map['uid'] = intval($this->mid);
$map['is_del'] = intval(0);
$order = 'ctime DESC';
$table = 'zy_order_course';
$ordertype = 'course';
$check_type = 'zy_video';
if ($_GET['ordertype'] == 'course') {
$table = 'zy_order_course';
} else if ($_GET['ordertype'] == 'live') {
$ordertype = 'live';
$table = 'zy_order_live';
$check_type = 'zy_live';
} else if ($_GET['ordertype'] == 'teacher') {
$ordertype = 'teacher';
$table = 'zy_order_teacher';
$check_type = 'zy_line_course';
} else if ($_GET['ordertype'] == 'album') {
$ordertype = 'album';
$table = 'zy_order_album';
$check_type = 'zy_album';
} else if ($_GET['ordertype'] == 'classes') {
$ordertype = 'classes';
$table = 'zy_order_classes';
$check_type = 'zy_classes';
} else if ($_GET['ordertype'] == 'exams') {
$ordertype = 'exams';
$table = 'exams_paper_order';
$check_type = 'exams';
}
$data = M($table)->where($map)->order($order)->findPage($limit);
if ($data['data']) {
$data['data'] = $this->haddleData($data['data'], $table);
}
$this->assign("orderby", $orderby);
$this->assign("check_type", $check_type);
$this->assign("ordertype", $ordertype);
$this->assign("uid", $this->mid);
$this->assign("data", $data);
echo json_encode($data['data']);
exit();
}
/** /**
* 会员中心订单--列表处理 * 会员中心订单--列表处理
* @return void * @return void
...@@ -168,7 +226,7 @@ class HomeAction extends UserAction ...@@ -168,7 +226,7 @@ class HomeAction extends UserAction
{ {
// H5页面 // H5页面
if (!$this->is_pc) { if (!$this->is_pc) {
$limit = 6; $limit = 1000;
$orderby = t($_GET['orderby']); $orderby = t($_GET['orderby']);
$orderby = $orderby ? $orderby : 1; $orderby = $orderby ? $orderby : 1;
if ($orderby) { if ($orderby) {
......
...@@ -208,6 +208,7 @@ ...@@ -208,6 +208,7 @@
}, },
listItem: function () { listItem: function () {
return function (opt) { return function (opt) {
console.log(this.innerTab, this.tab);
return opt.options ? opt.options[this.innerTab].items : opt.items return opt.options ? opt.options[this.innerTab].items : opt.items
} }
}, },
...@@ -225,6 +226,7 @@ ...@@ -225,6 +226,7 @@
}, },
onInnerTab: function (tab) { onInnerTab: function (tab) {
console.log(tab);
this.innerTab = tab this.innerTab = tab
} }
}, },
......
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