瀏覽代碼

feat: NG-15: 新会员注册时增加国家与语言选项.

zhangl 1 年之前
父節點
當前提交
62e9005ed8
共有 1 個文件被更改,包括 16 次插入4 次删除
  1. 16 4
      frontendApi/modules/v1/controllers/SiteController.php

+ 16 - 4
frontendApi/modules/v1/controllers/SiteController.php

@@ -390,12 +390,24 @@ class SiteController extends BaseController
 
     public function actionGetInstance()
     {
-        $sign = [];
-        for ($i = 0; $i < 8; $i++) {
-            $sign[] = PageSnowFake::instance()->generateId();
+//        $sign = [];
+//        for ($i = 0; $i < 8; $i++) {
+//            $sign[] = PageSnowFake::instance()->generateId();
+//        }
+//
+//        return static::notice($sign);
+
+        $result = [];
+        $yearStart = 2024;
+        $yearEnd = 2029;
+        for ($y = $yearStart; $y <= $yearEnd; $y++) {
+            for ($i = 1; $i <= 12; $i++) {
+                $date = "{$y}-{$i}-01";
+                $result[] = strtotime($date);
+            }
         }
 
-        return static::notice($sign);
+        return static::notice($result);
     }
 
     public function actionCountries()