12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- <?php
- namespace app\admin\controller\order;
- use app\admin\controller\AuthController;
- use crmeb\services\JsonService as Json;
- use crmeb\services\UtilService as Util;
- class Package extends AuthController
- {
- public function index()
- {
- $where = Util::getMore([
- ['data', ''],
- ['key', ''],
- ['paid',-1],
- ['status',-4],
- ], $this->request);
- $where['data'] = trim($where['data']);
- $this->assign('where', $where);
- $this->assign(\app\models\store\Package::orderlist($where));
- return $this->fetch();
- }
- public function setstatus()
- {
- $data = Util::getMore([
- ['status',2],
- ], $this->request);
- if(cache('id_'.input('id',0))) return Json::fail('处理中,请不要重复点');
- cache('id_'.input('id',0),1);
- if($data['status']==2)
- {
- $rs = \app\models\store\Package::take_out(input('id',0));
- }
- else
- {
- $rs = \app\models\store\Package::invalid(input('id',0),input('re',''));
- }
- if ($rs) return $this->successful('审核成功!');
- else
- {
- cache('id_'.input('id',0),null);
- return $this->failed(\app\models\store\Package::getErrorInfo());
- }
- }
- }
|