Exemple #1
0
 public function del()
 {
     $id = I('saleor_id');
     $saleslogic = new l\SalesLogic();
     $result = $saleslogic->delSaleor($id);
     S('sales', NULL);
     $data['message'] = $result['message'];
     $this->ajaxReturn($data, 'JSON');
 }
Exemple #2
0
 /**
  * 从缓存中读取品类数据   
  * @return array
  */
 public function getAllSales()
 {
     //电器品类初始化
     S('sales', null);
     if (!S('sales')) {
         $salesLogic = new l\SalesLogic();
         $salesData = $salesLogic->getSalesList($condition, null, 0);
         $sales_list = $salesData['datas'];
         $count = count($sales_list);
         for ($i = 0; $i < $count; $i++) {
             $salesName = $sales_list[$i]['saleor_name'];
             $salesNameList[$i] = $salesName;
             $salesNameMap[$salesName] = $sales_list[$i]['saleor_id'];
         }
         $salesMap['NameList'] = $salesNameList;
         $salesMap['Map'] = $salesNameMap;
         S('sales', $salesMap);
     }
     return S('sales');
 }