|
|
@@ -9,6 +9,7 @@ use LinFly\Annotation\Attributes\Route\Controller;
|
|
|
use LinFly\Annotation\Attributes\Route\GetMapping;
|
|
|
use LinFly\Annotation\Attributes\Route\Middleware;
|
|
|
use support\Request;
|
|
|
+use support\Response;
|
|
|
use Webman\RedisQueue\Redis;
|
|
|
|
|
|
|
|
|
@@ -22,10 +23,15 @@ class Home extends Base
|
|
|
protected array $noNeedLogin = ["getHomeData"];
|
|
|
|
|
|
#[GetMapping("data")]
|
|
|
- public function getHomeData(Request $request)
|
|
|
+ public function getHomeData(Request $request): Response
|
|
|
{
|
|
|
try {
|
|
|
- return $this->success("ok");
|
|
|
+ $resp = (new BaseData)->config([
|
|
|
+ "appid" => sConf("wechat.appid"),
|
|
|
+ "secret" => sConf("wechat.secret"),
|
|
|
+ "account" => sConf("wechat.shop_id"),
|
|
|
+ ])->token()->getStoreCategoryTemplate(6005001);
|
|
|
+ return $this->success("ok",$resp);
|
|
|
} catch (\Throwable $th) {
|
|
|
return error($th->getMessage());
|
|
|
}
|