diff --git a/app/admin/controller/Wxserve.php b/app/admin/controller/Wxserve.php index 5ab8ed96..ec802f44 100644 --- a/app/admin/controller/Wxserve.php +++ b/app/admin/controller/Wxserve.php @@ -12,15 +12,6 @@ use think\response\Json; class Wxserve extends Controller { - public function index(): Json - { - $appid = ['wxd87b1a7332d974d0', 'wxe3ed157849bd07b5', 'wx896520d9d03f108f', 'wx35f6c598106b9149', 'wx3f8c109fa934324f']; - $appid = array_merge($appid, ['wx1814307a39775007', 'wx74c7a92ae5ffbcb6', 'wx50b90d4df20da3ec', 'wxe843b6d7a4bd3389']); - $obj = new Server(); - $data = $obj->applySetOrderPathInfo($appid); - return $this->renderSuccess(['result' => $data]); - } - /** * @notes:生成授权二维码 * @return Json diff --git a/app/api/controller/Wxserver.php b/app/api/controller/Wxserver.php index 14cfe05d..5b8f48cf 100644 --- a/app/api/controller/Wxserver.php +++ b/app/api/controller/Wxserver.php @@ -3,24 +3,25 @@ declare (strict_types=1); namespace app\api\controller; +use app\common\library\wxserver\Server; use app\common\model\WxserverAccount; use cores\BaseController; use think\db\exception\DataNotFoundException; use think\db\exception\DbException; use think\db\exception\ModelNotFoundException; use think\facade\Db; +use think\response\Json; class Wxserver extends BaseController { - public function index() + public function index(): Json { - $appid = 'wx74c7a92ae5ffbcb6'; - $obj = new \app\common\library\wxserver\Server(); - $arr = $obj->release('wxe3ed157849bd07b5'); - $arr2 = $obj->release('wx896520d9d03f108f'); - return $this->renderSuccess(['arr' => $arr, 'arr2' => $arr2]); - + $appid = ['wxd87b1a7332d974d0', 'wxe3ed157849bd07b5', 'wx896520d9d03f108f', 'wx35f6c598106b9149', 'wx3f8c109fa934324f']; + $appid = array_merge($appid, ['wx1814307a39775007', 'wx74c7a92ae5ffbcb6', 'wx50b90d4df20da3ec', 'wxe843b6d7a4bd3389']); + $obj = new Server(); + $data = $obj->applySetOrderPathInfo($appid); + return $this->renderSuccess(['result' => $data]); } public function verifyTicket()