This commit is contained in:
gaofeng
2026-09-01 14:55:59 +08:00
parent e0aeff2af7
commit a49b52a3e2
4 changed files with 80 additions and 3 deletions

View File

@@ -15,3 +15,17 @@ WECHAT_MINI_APPID = your_jinan_mini_appid
WECHAT_MINI_SECRET = your_jinan_mini_secret
WECHAT_MINI_APPID_BJ = your_beijing_mini_appid
WECHAT_MINI_SECRET_BJ = your_beijing_mini_secret
APP_ANDROID_LATEST_VERSION_CODE = 0
APP_ANDROID_LATEST_VERSION_NAME =
APP_ANDROID_MINIMUM_VERSION_CODE = 0
APP_ANDROID_UPDATE_GATEWAY_URL = https://miniapi.jzvisa.cn/miniapi/app/update
APP_ANDROID_FALLBACK_URL =
APP_ANDROID_CHANGELOG =
APP_ANDROID_FORCE_UPDATE = false
APP_ANDROID_STORE_OFFICIAL_URL =
APP_ANDROID_STORE_HUAWEI_URL =
APP_ANDROID_STORE_XIAOMI_URL =
APP_ANDROID_STORE_OPPO_URL =
APP_ANDROID_STORE_VIVO_URL =
APP_ANDROID_STORE_TENCENT_URL =

View File

@@ -1,4 +1,13 @@
<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
use think\facade\Route;
@@ -12,3 +21,43 @@ Route::group('app', function () {
Route::get('visas/:product_id', 'AppCatalog/detail');
Route::get('visas', 'AppCatalog/visas');
});
Route::group(function () {
Route::get('index/home', 'Index/home');
Route::get('index/about', 'Index/about');
Route::get('index/legal', 'Index/legal');
Route::get('index/packages', 'Index/packages');
Route::get('index/countries', 'Index/countries');
Route::post('auth/sendSms', 'Auth/sendSms');
Route::post('auth/login', 'Auth/login');
Route::post('auth/wxPhoneLogin', 'Auth/wxPhoneLogin');
Route::get('auth/me', 'Auth/me');
Route::get('news/lists', 'News/lists');
Route::get('news/detail', 'News/detail');
Route::get('help/faqs', 'Help/faqs');
Route::get('order/lists', 'Order/lists');
Route::get('order/latest-evus', 'Order/latestEvus');
Route::get('order/detail', 'Order/detail');
Route::post('order/pay', 'Order/pay');
Route::post('order/addInvoice', 'Order/addInvoice');
Route::get('customer-center/applicants', 'CustomerCenter/applicants');
Route::get('customer-center/applications', 'CustomerCenter/applications');
Route::get('customer-center/orders', 'CustomerCenter/orders');
Route::post('customer-center/applicant/save', 'CustomerCenter/saveApplicant');
Route::post('customer-center/applicant/remove', 'CustomerCenter/removeApplicant');
Route::post('customer-center/applicant', 'CustomerCenter/applicant')->completeMatch();
Route::get('ocr/signature', 'Ocr/signature');
Route::post('upload/image', 'Upload/image');
Route::get('evus/correction', 'EvusCorrection/detail');
Route::post('evus/correction/submit', 'EvusCorrection/submit');
Route::post('evus/lookup', 'Evus/lookup');
Route::post('evus/apply', 'Evus/apply');
Route::post('esta/apply', 'Esta/apply');
})->namespace('app\\miniapi\\controller');

View File

@@ -1,7 +1,7 @@
<?php
declare(strict_types=1);
$routes = file_get_contents(__DIR__ . '/../route/app.php');
$routes = file_get_contents(__DIR__ . '/../app/miniapi/route/app.php');
if (!is_string($routes)) {
throw new RuntimeException('Unable to read route configuration');
}

View File

@@ -32,12 +32,26 @@ miniCorrectionAssertSame(
'Authenticated user ID must override an untrusted client value'
);
$routes = file_get_contents(__DIR__ . '/../route/app.php');
$routeFile = __DIR__ . '/../app/miniapi/route/app.php';
$routes = is_file($routeFile) ? file_get_contents($routeFile) : false;
if (!is_string($routes)
|| !str_contains($routes, "Route::get('evus/correction', 'EvusCorrection/detail');")
|| !str_contains($routes, "Route::post('evus/correction/submit', 'EvusCorrection/submit');")
) {
throw new RuntimeException('The miniapi must register explicit correction detail and submit routes');
throw new RuntimeException('The miniapi app must register explicit correction detail and submit routes in its multi-app route directory');
}
if (str_contains($routes, "Route::group('miniapi'")) {
throw new RuntimeException('App-specific routes must not repeat the miniapi application prefix');
}
if (!str_contains($routes, "Route::pattern(['product_id' => '[A-Za-z0-9_-]+']);")
|| !str_contains($routes, "Route::group('app', function () {")
|| !str_contains($routes, "Route::get('bootstrap', 'AppCatalog/bootstrap');")
|| !str_contains($routes, "Route::get('visas/:product_id', 'AppCatalog/detail');")
) {
throw new RuntimeException('The existing app catalog routes must remain available');
}
if (is_file(__DIR__ . '/../route/app.php')) {
throw new RuntimeException('Multi-app routes must not remain in the ignored project-level route directory');
}
$upload = file_get_contents(__DIR__ . '/../app/miniapi/controller/Upload.php');