zxhxx 3 anos atrás
pai
commit
2aa3970f2b
1 arquivos alterados com 40 adições e 0 exclusões
  1. 40 0
      app/admin/controller/order/Package.php

+ 40 - 0
app/admin/controller/order/Package.php

@@ -0,0 +1,40 @@
+<?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',3],
+        ], $this->request);
+        if($data['status']==3)
+        {
+           $rs =  \app\models\store\Package::take(input('id',0));
+        }
+        else
+        {
+            $rs = \app\models\store\Package::invalid(input('id',0),input('re',''));
+        }
+
+        if ($rs) return $this->successful('审核成功!');
+        else return $this->failed('审核失败');
+
+    }
+}