This commit is contained in:
2025-03-17 13:10:11 +08:00
parent 99abeea2e2
commit e3e9d990bb
6 changed files with 66 additions and 4 deletions
+11
View File
@@ -40,4 +40,15 @@ class Constants
self::CUSTOMER_FOLLOW_VISIT => '线下拜访',
self::CUSTOMER_FOLLOW_UP => '线上跟进',
];
//跟进类型
public const CUSTOMER_SEX_UNKNOWN = 0; // 未知
public const CUSTOMER_SEX_MAN = 1; // 男
public const CUSTOMER_SEX_WOMAN = 2; // 女
public const SEX = [
self::CUSTOMER_SEX_UNKNOWN => '未知',
self::CUSTOMER_SEX_MAN => '男',
self::CUSTOMER_SEX_WOMAN => '女',
];
}
+2 -1
View File
@@ -15,6 +15,7 @@
return [
// 全局中间件
'' => [
app\middleware\AuthMiddleware::class,
app\middleware\CrossDomain::class, // 全局跨域中间件
app\middleware\AuthMiddleware::class, // 鉴权中间件
]
];
+9
View File
@@ -14,6 +14,15 @@
use Webman\Route;
// 拦截所有OPTIONS请求并直接响应
//Route::options('[{path:.+}]', function () {
// return response('', 204)
// ->withHeaders(['Content-Type' => 'text/plain']);
//});
// 登录接口
Route::any('/login', [app\controller\UserController::class, 'login'])->middleware([app\middleware\CrossDomain::class]);
// 文件上传接口
Route::post('/upload', [app\controller\UploadController::class, 'upload']);