|
@@ -28,6 +28,10 @@ class Shop extends Start_Controller {
|
|
|
else if($arg == 'rows')//修改
|
|
|
{
|
|
|
$this->_rows();
|
|
|
+ }
|
|
|
+ else if($arg == 'pxsort')//修改
|
|
|
+ {
|
|
|
+ $this->_pxsort();
|
|
|
}
|
|
|
else if($arg == 'code')//修改
|
|
|
{
|
|
@@ -39,6 +43,17 @@ class Shop extends Start_Controller {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ public function _pxsort(){
|
|
|
+ $user = $this->user->get_api($_SESSION['api']);
|
|
|
+ if(empty($user)){
|
|
|
+ die;
|
|
|
+ }
|
|
|
+ $id = $this->input->post('id', TRUE);
|
|
|
+ $px = $this->input->post('px', TRUE);
|
|
|
+ $this->shop->save(array('px'=>$px),$id);
|
|
|
+ echo json_encode(array('code'=>0,'msg'=>'修改成功'));exit;
|
|
|
+ }
|
|
|
+
|
|
|
//管理
|
|
|
public function _index()
|
|
|
{
|
|
@@ -103,6 +118,7 @@ class Shop extends Start_Controller {
|
|
|
}else{
|
|
|
$info_list[$key]['status'] = 'inactive';
|
|
|
}
|
|
|
+ $info_list[$key]['px'] = "<input value=".$value['px']." onchange='edit_px(this)' data-id= '".$value['id']."' class='px_do' />";
|
|
|
}
|
|
|
$total = $this->shop->find_count($where);
|
|
|
$pagenum = ceil($total/$perpage);
|