小程序用户改用门店登录
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -7,7 +7,6 @@ use App\Http\Requests\Customer\CustomerLevelFormRequest;
|
||||
use App\Models\CustomerLevelModel;
|
||||
use App\Models\NoticeModel;
|
||||
use App\Models\StoreModel;
|
||||
use App\Models\UserModel;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
@@ -114,18 +113,13 @@ class CustomerLevelController extends BaseController
|
||||
}
|
||||
|
||||
/**
|
||||
* 上浮比例变更后,给该等级下正常门店绑定的正常用户生成价格变更通知
|
||||
* 上浮比例变更后,给该等级下全部正常门店生成价格变更通知
|
||||
*/
|
||||
private function notifyPriceChange(CustomerLevelModel $level): void
|
||||
{
|
||||
$userIds = UserModel::query()
|
||||
->where('status', UserModel::STATUS_NORMAL)
|
||||
->whereIn('store_id', function ($q) use ($level) {
|
||||
$q->select('id')
|
||||
->from('store')
|
||||
->where('status', StoreModel::STATUS_NORMAL)
|
||||
->where('level_id', $level->id);
|
||||
})
|
||||
$storeIds = StoreModel::query()
|
||||
->where('status', StoreModel::STATUS_NORMAL)
|
||||
->where('level_id', $level->id)
|
||||
->pluck('id');
|
||||
|
||||
$content = mb_substr(
|
||||
@@ -134,9 +128,9 @@ class CustomerLevelController extends BaseController
|
||||
500
|
||||
);
|
||||
|
||||
foreach ($userIds as $userId) {
|
||||
foreach ($storeIds as $storeId) {
|
||||
NoticeModel::create([
|
||||
'user_id' => $userId,
|
||||
'store_id' => $storeId,
|
||||
'type' => NoticeModel::TYPE_PRICE,
|
||||
'title' => '商品价格变更',
|
||||
'content' => $content,
|
||||
|
||||
@@ -1,80 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Customer;
|
||||
|
||||
use App\Exceptions\RepositoryException;
|
||||
use App\Http\Requests\Customer\MiniUserBindRequest;
|
||||
use App\Models\StoreModel;
|
||||
use App\Models\UserModel;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Http\Request;
|
||||
use Modules\AnnoRoute\Attribute\GetRoute;
|
||||
use Modules\AnnoRoute\Attribute\PutRoute;
|
||||
use Modules\AnnoRoute\Attribute\RequestAttribute;
|
||||
use Modules\Common\Http\Controllers\BaseController;
|
||||
|
||||
/**
|
||||
* 小程序用户管理(用户由小程序登录自动生成,后台只做绑定与状态管理,无增删)
|
||||
*/
|
||||
#[RequestAttribute('/customer/miniUser', 'customer.miniUser')]
|
||||
class MiniUserController extends BaseController
|
||||
{
|
||||
protected array $searchField = [
|
||||
'store_id' => '=',
|
||||
'status' => '=',
|
||||
];
|
||||
|
||||
protected array $quickSearchField = ['nickname', 'phone'];
|
||||
|
||||
/** 小程序用户列表 */
|
||||
#[GetRoute(authorize: 'query')]
|
||||
public function query(Request $request): JsonResponse
|
||||
{
|
||||
$params = $request->all();
|
||||
$pageSize = $params['pageSize'] ?? 10;
|
||||
$data = $this->buildSearch($params, UserModel::query()->with('store:id,name'))
|
||||
->orderBy('id', 'desc')
|
||||
->paginate($pageSize)
|
||||
->toArray();
|
||||
return $this->success($data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 绑定门店(一个门店可绑多个账号,一个账号只绑一个门店)
|
||||
*/
|
||||
#[PutRoute(route: '/{id}/bind', authorize: 'bind', where: ['id' => '[0-9]+'])]
|
||||
public function bind(int $id, MiniUserBindRequest $request): JsonResponse
|
||||
{
|
||||
$validated = $request->validated();
|
||||
$user = UserModel::find($id);
|
||||
if (empty($user)) {
|
||||
throw new RepositoryException('用户不存在');
|
||||
}
|
||||
$store = StoreModel::find((int) $validated['store_id']);
|
||||
if (empty($store)) {
|
||||
throw new RepositoryException('门店不存在');
|
||||
}
|
||||
$user->store_id = $store->id;
|
||||
$user->save();
|
||||
return $this->success();
|
||||
}
|
||||
|
||||
/** 启用/停用 */
|
||||
#[PutRoute(route: '/{id}/status', authorize: 'update', where: ['id' => '[0-9]+'])]
|
||||
public function status(int $id, Request $request): JsonResponse
|
||||
{
|
||||
$data = $request->validate([
|
||||
'status' => 'required|integer|in:0,1',
|
||||
], [
|
||||
'status.required' => '状态不能为空',
|
||||
'status.in' => '状态值不正确',
|
||||
]);
|
||||
$user = UserModel::find($id);
|
||||
if (empty($user)) {
|
||||
throw new RepositoryException('用户不存在');
|
||||
}
|
||||
$user->status = (int) $data['status'];
|
||||
$user->save();
|
||||
return $this->success();
|
||||
}
|
||||
}
|
||||
@@ -14,7 +14,7 @@ use Modules\AnnoRoute\Attribute\RequestAttribute;
|
||||
use Modules\Common\Http\Controllers\BaseController;
|
||||
|
||||
/**
|
||||
* 通知管理(小程序端消息;user_id=0 为全员广播)
|
||||
* 通知管理(小程序端消息;store_id=0 为全员广播)
|
||||
*/
|
||||
#[RequestAttribute('/customer/notice', 'customer.notice')]
|
||||
class NoticeController extends BaseController
|
||||
@@ -22,7 +22,7 @@ class NoticeController extends BaseController
|
||||
protected array $searchField = [
|
||||
'type' => '=',
|
||||
'is_read' => '=',
|
||||
'user_id' => '=',
|
||||
'store_id' => '=',
|
||||
];
|
||||
|
||||
protected array $quickSearchField = ['title', 'content'];
|
||||
@@ -40,7 +40,7 @@ class NoticeController extends BaseController
|
||||
return $this->success($data);
|
||||
}
|
||||
|
||||
/** 发布通知(user_id=0 全员广播) */
|
||||
/** 发布通知(store_id=0 全员广播) */
|
||||
#[PostRoute(authorize: 'create')]
|
||||
public function create(NoticeFormRequest $request): JsonResponse
|
||||
{
|
||||
|
||||
@@ -15,7 +15,7 @@ use Modules\AnnoRoute\Attribute\RequestAttribute;
|
||||
use Modules\Common\Http\Controllers\BaseController;
|
||||
|
||||
/**
|
||||
* 门店管理(小程序下单主体,即客户)
|
||||
* 门店管理(小程序下单主体,即客户;门店账号即小程序登录账号)
|
||||
*/
|
||||
#[RequestAttribute('/customer/store', 'customer.store')]
|
||||
class StoreController extends BaseController
|
||||
@@ -23,13 +23,14 @@ class StoreController extends BaseController
|
||||
protected array $searchField = [
|
||||
'name' => 'like',
|
||||
'code' => 'like',
|
||||
'username' => 'like',
|
||||
'level_id' => '=',
|
||||
'status' => '=',
|
||||
];
|
||||
|
||||
protected array $quickSearchField = ['name', 'code', 'contact', 'phone'];
|
||||
protected array $quickSearchField = ['name', 'code', 'username', 'contact', 'phone'];
|
||||
|
||||
/** 门店列表(含等级名回显) */
|
||||
/** 门店列表(含等级名回显;密码永不回显) */
|
||||
#[GetRoute(authorize: 'query')]
|
||||
public function query(Request $request): JsonResponse
|
||||
{
|
||||
@@ -42,17 +43,18 @@ class StoreController extends BaseController
|
||||
return $this->success($data);
|
||||
}
|
||||
|
||||
/** 创建门店 */
|
||||
/** 创建门店(同时设置小程序登录账号与初始密码) */
|
||||
#[PostRoute(authorize: 'create')]
|
||||
public function create(StoreFormRequest $request): JsonResponse
|
||||
{
|
||||
$validated = $request->validated();
|
||||
$validated['code'] = generate_unique_code(StoreModel::class);
|
||||
$validated['password'] = password_hash((string) $validated['password'], PASSWORD_DEFAULT);
|
||||
StoreModel::create($validated);
|
||||
return $this->success();
|
||||
}
|
||||
|
||||
/** 编辑门店 */
|
||||
/** 编辑门店(密码留空则不修改) */
|
||||
#[PutRoute(route: '/{id}', authorize: 'update', where: ['id' => '[0-9]+'])]
|
||||
public function update(int $id, StoreFormRequest $request): JsonResponse
|
||||
{
|
||||
@@ -60,7 +62,13 @@ class StoreController extends BaseController
|
||||
if (empty($model)) {
|
||||
throw new RepositoryException('门店不存在');
|
||||
}
|
||||
$model->update($request->validated());
|
||||
$validated = $request->validated();
|
||||
if (empty($validated['password'])) {
|
||||
unset($validated['password']);
|
||||
} else {
|
||||
$validated['password'] = password_hash((string) $validated['password'], PASSWORD_DEFAULT);
|
||||
}
|
||||
$model->update($validated);
|
||||
return $this->success();
|
||||
}
|
||||
|
||||
|
||||
@@ -11,7 +11,6 @@ use App\Models\StoreModel;
|
||||
use App\Models\StoreOrderItemModel;
|
||||
use App\Models\StoreOrderModel;
|
||||
use App\Models\SupplierModel;
|
||||
use App\Models\UserModel;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
@@ -349,9 +348,9 @@ class DashboardController extends BaseController
|
||||
}
|
||||
|
||||
/**
|
||||
* 基础档案计数:在营门店 / 在售商品 / 合作供应商 / 小程序用户
|
||||
* 基础档案计数:在营门店 / 在售商品 / 合作供应商
|
||||
*
|
||||
* @return array{stores: int, products: int, suppliers: int, users: int}
|
||||
* @return array{stores: int, products: int, suppliers: int}
|
||||
*/
|
||||
private function archives(): array
|
||||
{
|
||||
@@ -359,7 +358,6 @@ class DashboardController extends BaseController
|
||||
'stores' => StoreModel::query()->where('status', StoreModel::STATUS_NORMAL)->count(),
|
||||
'products' => ProductModel::query()->where('status', ProductModel::STATUS_ON)->count(),
|
||||
'suppliers' => SupplierModel::query()->where('status', SupplierModel::STATUS_NORMAL)->count(),
|
||||
'users' => UserModel::query()->where('status', UserModel::STATUS_NORMAL)->count(),
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
@@ -2,13 +2,8 @@
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Http\Requests\UserRegisterRequest;
|
||||
use App\Models\UserModel;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Modules\AnnoRoute\Attribute\GetRoute;
|
||||
use Modules\AnnoRoute\Attribute\PostRoute;
|
||||
use Modules\AnnoRoute\Attribute\RequestAttribute;
|
||||
use Modules\Common\Trait\RequestJson;
|
||||
|
||||
@@ -17,7 +12,7 @@ class IndexController
|
||||
{
|
||||
use RequestJson;
|
||||
// 权限验证白名单
|
||||
protected array $noPermission = ['index', 'login', 'register', 'mail'];
|
||||
protected array $noPermission = ['index'];
|
||||
|
||||
/** 获取首页信息 */
|
||||
#[GetRoute('/index')]
|
||||
@@ -27,37 +22,4 @@ class IndexController
|
||||
|
||||
return $this->success(compact('web_setting'));
|
||||
}
|
||||
|
||||
/** 用户登录 */
|
||||
#[PostRoute('/login')]
|
||||
public function login(Request $request): JsonResponse
|
||||
{
|
||||
$credentials = $request->validate([
|
||||
'username' => 'required|min:4|alphaDash',
|
||||
'password' => 'required|min:4|alphaDash',
|
||||
]);
|
||||
if (Auth::guard('users')->attempt($credentials, true)) {
|
||||
$data = $request->user('users')
|
||||
->createToken($credentials['username'])
|
||||
->toArray();
|
||||
return $this->success($data, __('user.login_success'));
|
||||
}
|
||||
return $this->error(__('user.login_error'));
|
||||
}
|
||||
|
||||
/** 用户注册 */
|
||||
#[PostRoute('/register')]
|
||||
public function register(UserRegisterRequest $request): JsonResponse
|
||||
{
|
||||
$data = $request->validated();
|
||||
$model = new UserModel;
|
||||
$model->username = $data['username'];
|
||||
$model->password = password_hash($data['password'], PASSWORD_DEFAULT);
|
||||
$model->email = $data['email'];
|
||||
if ($model->save()) {
|
||||
return $this->success();
|
||||
}
|
||||
|
||||
return $this->error('创建用户失败');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,10 +3,7 @@
|
||||
namespace App\Http\Controllers\Mini;
|
||||
|
||||
use App\Exceptions\RepositoryException;
|
||||
use App\Http\Requests\UserUpdateInfoRequest;
|
||||
use App\Models\StoreModel;
|
||||
use App\Models\UserModel;
|
||||
use App\Services\WechatService;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Http\Request;
|
||||
use Modules\AnnoRoute\Attribute\GetRoute;
|
||||
@@ -15,113 +12,79 @@ use Modules\AnnoRoute\Attribute\PutRoute;
|
||||
use Modules\AnnoRoute\Attribute\RequestAttribute;
|
||||
|
||||
/**
|
||||
* 小程序认证
|
||||
* 小程序认证(门店 账号 + 密码 登录,不再使用微信能力)
|
||||
*/
|
||||
#[RequestAttribute('/mini', 'mini', authGuard: 'users')]
|
||||
class AuthController extends BaseMiniController
|
||||
{
|
||||
/** 小程序登录 */
|
||||
/** 门店登录(账号 + 密码) */
|
||||
#[PostRoute('/auth/login', authorize: false)]
|
||||
public function login(Request $request): JsonResponse
|
||||
{
|
||||
$validated = $request->validate([
|
||||
'code' => 'required|string'
|
||||
'username' => 'required|string|max:20',
|
||||
'password' => 'required|string|max:20',
|
||||
], [
|
||||
'code.required' => '登录参数格式错误',
|
||||
'code.string' => '登录参数格式错误',
|
||||
'username.required' => '请输入登录账号',
|
||||
'password.required' => '请输入登录密码',
|
||||
]);
|
||||
|
||||
$session = app(WechatService::class)->code2Session($validated['code']);
|
||||
$store = StoreModel::where('username', $validated['username'])->first();
|
||||
|
||||
$user = UserModel::where('openid', $session['openid'])->first();
|
||||
|
||||
if ($user === null || $user->status === UserModel::STATUS_DISABLED) {
|
||||
return $this->error('账号不存在或已被停用');
|
||||
if ($store === null || ! password_verify($validated['password'], (string) $store->password)) {
|
||||
return $this->error('账号或密码错误');
|
||||
}
|
||||
if ($store->status === StoreModel::STATUS_DISABLED) {
|
||||
return $this->error('账号已被停用,请联系客服处理');
|
||||
}
|
||||
|
||||
$user->last_login_at = date('Y-m-d H:i:s');
|
||||
$user->save();
|
||||
$token = $user->createToken($user->openid)->toArray();
|
||||
return $this->success([
|
||||
'token' => $token['plainTextToken'],
|
||||
'user' => $user->toArray(),
|
||||
], __('user.login_success'));
|
||||
$store->last_login_at = date('Y-m-d H:i:s');
|
||||
$store->save();
|
||||
|
||||
}
|
||||
|
||||
/** 小程序注册 */
|
||||
#[PostRoute('/auth/register', authorize: false)]
|
||||
public function register(Request $request): JsonResponse
|
||||
{
|
||||
$validated = $request->validate([
|
||||
'code' => 'required|string',
|
||||
'phoneCode' => 'required|string',
|
||||
'storeCode' => 'required|string'
|
||||
], [
|
||||
'code.required' => '注册参数格式错误',
|
||||
'code.string' => '注册参数格式错误',
|
||||
'phoneCode.required' => '注册参数格式错误',
|
||||
'phoneCode.string' => '注册参数格式错误',
|
||||
'storeCode.required' => '门店编码必须填写',
|
||||
'storeCode.string' => '注册参数格式错误',
|
||||
]);
|
||||
|
||||
$store = StoreModel::where('code', $validated['storeCode'])->first();
|
||||
if (!$store) {
|
||||
return $this->error('门店不存在!');
|
||||
}
|
||||
|
||||
// 通过 code 换取 openid、session_key、unionid
|
||||
$session = app(WechatService::class)->code2Session($validated['code']);
|
||||
|
||||
$user = UserModel::where('openid', $session['openid'])->first();
|
||||
|
||||
if ($user) {
|
||||
return $this->error('你的微信已经注册,请直接登录!');
|
||||
}
|
||||
|
||||
$userData = [
|
||||
'openid' => $session['openid'],
|
||||
'unionid' => $session['unionid'] ?? '',
|
||||
'username' => 'wx_'.uniqid(),
|
||||
'nickname' => '微信用户',
|
||||
'store_id' => $store->id,
|
||||
'avatar' => '',
|
||||
'password' => '',
|
||||
'last_login_at' => date('Y-m-d H:i:s'),
|
||||
];
|
||||
|
||||
$phone = app(WechatService::class)->getPhone($validated['phoneCode']);
|
||||
$userData['phone'] = $phone ?? '';
|
||||
|
||||
$user = UserModel::create($userData);
|
||||
|
||||
$token = $user->createToken($user->username)->toArray();
|
||||
$token = $store->createToken($store->username)->toArray();
|
||||
$store->load('level:id,name');
|
||||
|
||||
return $this->success([
|
||||
'token' => $token['plainTextToken'],
|
||||
'user' => $user->toArray(),
|
||||
'user' => $store->toArray(),
|
||||
], __('user.login_success'));
|
||||
}
|
||||
|
||||
/** 当前用户信息 */
|
||||
/** 当前门店信息(含客户等级) */
|
||||
#[GetRoute('/auth/info')]
|
||||
public function info(Request $request): JsonResponse
|
||||
{
|
||||
$user = UserModel::with(['store.level:id,name'])
|
||||
->find($request->user()->id);
|
||||
if ($user === null) {
|
||||
$store = StoreModel::with('level:id,name')->find($request->user()->id);
|
||||
if ($store === null) {
|
||||
throw new RepositoryException('账号不存在');
|
||||
}
|
||||
|
||||
return $this->success($user->toArray());
|
||||
return $this->success($store->toArray());
|
||||
}
|
||||
|
||||
#[PutRoute('auth/info')]
|
||||
public function setUserInfo(UserUpdateInfoRequest $request): JsonResponse
|
||||
/** 修改登录密码 */
|
||||
#[PutRoute('/auth/password')]
|
||||
public function setPassword(Request $request): JsonResponse
|
||||
{
|
||||
UserModel::where('user_id', auth('user')->id())->update($request->validated());
|
||||
$data = $request->validate([
|
||||
'oldPassword' => 'required|string|max:20',
|
||||
'newPassword' => 'required|string|min:6|max:20',
|
||||
'rePassword' => 'required|same:newPassword',
|
||||
], [
|
||||
'oldPassword.required' => '请输入原密码',
|
||||
'newPassword.required' => '请输入新密码',
|
||||
'newPassword.min' => '新密码至少 6 位',
|
||||
'rePassword.same' => '两次输入的密码不一致',
|
||||
]);
|
||||
|
||||
return $this->error('更新成功');
|
||||
$store = $this->currentStore($request);
|
||||
if (! password_verify($data['oldPassword'], (string) $store->password)) {
|
||||
return $this->error('原密码不正确');
|
||||
}
|
||||
|
||||
$store->password = password_hash($data['newPassword'], PASSWORD_DEFAULT);
|
||||
$store->save();
|
||||
|
||||
return $this->success([], '密码修改成功');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,6 @@ namespace App\Http\Controllers\Mini;
|
||||
|
||||
use App\Exceptions\RepositoryException;
|
||||
use App\Models\StoreModel;
|
||||
use App\Models\UserModel;
|
||||
use Illuminate\Http\Request;
|
||||
use Modules\Common\Http\Controllers\BaseController;
|
||||
use Modules\SystemUser\Models\SysAccessToken;
|
||||
@@ -13,71 +12,39 @@ use Modules\SystemUser\Models\SysAccessToken;
|
||||
* 小程序端控制器基类
|
||||
*
|
||||
* 无 #[RequestAttribute],不会被 AnnoRoute 注册为路由。
|
||||
* 提供当前用户获取与门店绑定前置校验。
|
||||
* 门店即用户:登录主体就是门店(store 表),提供当前门店获取与状态校验。
|
||||
*/
|
||||
abstract class BaseMiniController extends BaseController
|
||||
{
|
||||
/**
|
||||
* 当前小程序用户(auth:sanctum 注入的 tokenable)
|
||||
* 当前登录门店(auth:sanctum 注入的 tokenable)
|
||||
*/
|
||||
protected function currentUser(Request $request): UserModel
|
||||
protected function currentStore(Request $request): StoreModel
|
||||
{
|
||||
$user = UserModel::find($request->user()->id);
|
||||
if ($user === null || $user->status === UserModel::STATUS_DISABLED) {
|
||||
$store = StoreModel::find($request->user()->id);
|
||||
if ($store === null || $store->status === StoreModel::STATUS_DISABLED) {
|
||||
throw new RepositoryException('账号不存在或已被停用');
|
||||
}
|
||||
return $user;
|
||||
return $store;
|
||||
}
|
||||
|
||||
/**
|
||||
* 可选登录场景手动识别当前用户(路由关闭 authorize 时使用)
|
||||
* 可选登录场景手动识别当前门店(路由关闭 authorize 时使用)
|
||||
*
|
||||
* 手动解析 Bearer token;未携带 token、token 无效或非小程序用户时返回 null(不抛错)。
|
||||
* 手动解析 Bearer token;未携带 token、token 无效或非门店账号时返回 null(不抛错)。
|
||||
*/
|
||||
protected function optionalUser(Request $request): ?UserModel
|
||||
protected function optionalStore(Request $request): ?StoreModel
|
||||
{
|
||||
$token = $request->bearerToken();
|
||||
if (empty($token)) {
|
||||
return null;
|
||||
}
|
||||
$accessToken = SysAccessToken::findToken($token);
|
||||
if ($accessToken === null || $accessToken->tokenable_type !== UserModel::class) {
|
||||
if ($accessToken === null || $accessToken->tokenable_type !== StoreModel::class) {
|
||||
return null;
|
||||
}
|
||||
$user = UserModel::find($accessToken->tokenable_id);
|
||||
if ($user === null || $user->status === UserModel::STATUS_DISABLED) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return $user;
|
||||
}
|
||||
|
||||
/**
|
||||
* 门店端前置校验
|
||||
*/
|
||||
protected function ensureStoreBound(UserModel $user): StoreModel
|
||||
{
|
||||
if ($user->store_id <= 0) {
|
||||
throw new RepositoryException('尚未绑定门店,请联系客服处理');
|
||||
}
|
||||
$store = StoreModel::find($user->store_id);
|
||||
if ($store === null || $store->status !== StoreModel::STATUS_NORMAL) {
|
||||
throw new RepositoryException('门店不存在或已停用,请联系客服处理');
|
||||
}
|
||||
|
||||
return $store;
|
||||
}
|
||||
|
||||
/**
|
||||
* 用户当前绑定的正常门店(未绑定/已停用返回 null,不抛错)
|
||||
*/
|
||||
protected function boundStore(UserModel $user): ?StoreModel
|
||||
{
|
||||
if ($user->store_id <= 0) {
|
||||
return null;
|
||||
}
|
||||
$store = StoreModel::find($user->store_id);
|
||||
if ($store === null || $store->status !== StoreModel::STATUS_NORMAL) {
|
||||
$store = StoreModel::find($accessToken->tokenable_id);
|
||||
if ($store === null || $store->status === StoreModel::STATUS_DISABLED) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@@ -43,8 +43,7 @@ class BillController extends BaseMiniController
|
||||
'pageSize.max' => '每页数量最大 50',
|
||||
]);
|
||||
|
||||
$user = $this->currentUser($request);
|
||||
$store = $this->ensureStoreBound($user);
|
||||
$store = $this->currentStore($request);
|
||||
|
||||
$query = BillModel::query()
|
||||
->where('store_id', $store->id)
|
||||
@@ -100,8 +99,7 @@ class BillController extends BaseMiniController
|
||||
'category_id' => 'nullable|integer|min:0',
|
||||
]);
|
||||
|
||||
$user = $this->currentUser($request);
|
||||
$store = $this->ensureStoreBound($user);
|
||||
$store = $this->currentStore($request);
|
||||
|
||||
$ids = array_values(array_unique(array_filter(array_map('intval', explode(',', (string) $data['ids'])))));
|
||||
if ($ids === [] || count($ids) > 100) {
|
||||
@@ -131,8 +129,7 @@ class BillController extends BaseMiniController
|
||||
#[GetRoute('/bill/{id}', authorize: true, where: ['id' => '[0-9]+'])]
|
||||
public function detail(int $id, Request $request): JsonResponse
|
||||
{
|
||||
$user = $this->currentUser($request);
|
||||
$store = $this->ensureStoreBound($user);
|
||||
$store = $this->currentStore($request);
|
||||
|
||||
$bill = BillModel::with('purchase:id,purchase_no,purchase_date')
|
||||
->where('store_id', $store->id)
|
||||
|
||||
@@ -34,8 +34,7 @@ class CartController extends BaseMiniController
|
||||
#[PostRoute('/cart')]
|
||||
public function store(MiniCartRequest $request): JsonResponse
|
||||
{
|
||||
$user = $this->currentUser($request);
|
||||
$store = $this->ensureStoreBound($user);
|
||||
$store = $this->currentStore($request);
|
||||
if ($store->level_id <= 0 || $store->level === null) {
|
||||
return $this->error('门店未设置客户等级,无法加购,请联系客服');
|
||||
}
|
||||
@@ -48,9 +47,9 @@ class CartController extends BaseMiniController
|
||||
|
||||
$quantity = (string) $request->validated('quantity');
|
||||
|
||||
$cart = DB::transaction(function () use ($user, $productId, $quantity) {
|
||||
$cart = DB::transaction(function () use ($store, $productId, $quantity) {
|
||||
$row = CartModel::query()
|
||||
->where('user_id', $user->id)
|
||||
->where('store_id', $store->id)
|
||||
->where('product_id', $productId)
|
||||
->lockForUpdate()
|
||||
->first();
|
||||
@@ -67,7 +66,7 @@ class CartController extends BaseMiniController
|
||||
}
|
||||
|
||||
return CartModel::create([
|
||||
'user_id' => $user->id,
|
||||
'store_id' => $store->id,
|
||||
'product_id' => $productId,
|
||||
'quantity' => $quantity,
|
||||
]);
|
||||
@@ -85,11 +84,10 @@ class CartController extends BaseMiniController
|
||||
#[GetRoute('/cart', authorize: true)]
|
||||
public function index(Request $request): JsonResponse
|
||||
{
|
||||
$user = $this->currentUser($request);
|
||||
$store = $this->ensureStoreBound($user);
|
||||
$store = $this->currentStore($request);
|
||||
|
||||
$rows = CartModel::query()
|
||||
->where('user_id', $user->id)
|
||||
->where('store_id', $store->id)
|
||||
->orderBy('id', 'desc')
|
||||
->get();
|
||||
|
||||
@@ -174,12 +172,11 @@ class CartController extends BaseMiniController
|
||||
#[PutRoute('/cart/{id}', authorize: true, where: ['id' => '[0-9]+'])]
|
||||
public function update(int $id, MiniCartRequest $request): JsonResponse
|
||||
{
|
||||
$user = $this->currentUser($request);
|
||||
$this->ensureStoreBound($user);
|
||||
$store = $this->currentStore($request);
|
||||
|
||||
$row = CartModel::query()
|
||||
->where('id', $id)
|
||||
->where('user_id', $user->id)
|
||||
->where('store_id', $store->id)
|
||||
->first();
|
||||
if ($row === null) {
|
||||
throw new RepositoryException('购物车项不存在');
|
||||
@@ -197,12 +194,11 @@ class CartController extends BaseMiniController
|
||||
#[DeleteRoute('/cart/{id}', authorize: true, where: ['id' => '[0-9]+'])]
|
||||
public function destroy(int $id, Request $request): JsonResponse
|
||||
{
|
||||
$user = $this->currentUser($request);
|
||||
$this->ensureStoreBound($user);
|
||||
$store = $this->currentStore($request);
|
||||
|
||||
$deleted = CartModel::query()
|
||||
->where('id', $id)
|
||||
->where('user_id', $user->id)
|
||||
->where('store_id', $store->id)
|
||||
->delete();
|
||||
if ($deleted === 0) {
|
||||
throw new RepositoryException('购物车项不存在');
|
||||
@@ -217,10 +213,9 @@ class CartController extends BaseMiniController
|
||||
#[DeleteRoute('/cart', authorize: true)]
|
||||
public function clear(Request $request): JsonResponse
|
||||
{
|
||||
$user = $this->currentUser($request);
|
||||
$this->ensureStoreBound($user);
|
||||
$store = $this->currentStore($request);
|
||||
|
||||
CartModel::query()->where('user_id', $user->id)->delete();
|
||||
CartModel::query()->where('store_id', $store->id)->delete();
|
||||
|
||||
return $this->success([], '购物车已清空');
|
||||
}
|
||||
|
||||
@@ -11,34 +11,34 @@ use Modules\AnnoRoute\Attribute\PutRoute;
|
||||
use Modules\AnnoRoute\Attribute\RequestAttribute;
|
||||
|
||||
/**
|
||||
* 小程序通知(本人通知 + 全员广播)
|
||||
* 小程序通知(本店通知 + 全员广播)
|
||||
*
|
||||
* 广播已读处理:user_id=0 的广播是全局共享记录,直接改 is_read 会影响其他用户,
|
||||
* 因此标记已读时复制一条本人专属的已读记录(data.broadcast_from 记来源),
|
||||
* 广播已读处理:store_id=0 的广播是全局共享记录,直接改 is_read 会影响其他门店,
|
||||
* 因此标记已读时复制一条本店专属的已读记录(data.broadcast_from 记来源),
|
||||
* 列表查询时排除已有已读副本的广播。
|
||||
*/
|
||||
#[RequestAttribute('/mini', 'mini', authGuard: 'users')]
|
||||
class NoticeController extends BaseMiniController
|
||||
{
|
||||
/** 本人通知 + 全员广播(user_id in [0, 当前id]),分页 + unread_count */
|
||||
/** 本店通知 + 全员广播(store_id in [0, 当前id]),分页 + unread_count */
|
||||
#[GetRoute('/notice', authorize: true)]
|
||||
public function index(Request $request): JsonResponse
|
||||
{
|
||||
$user = $this->currentUser($request);
|
||||
$store = $this->currentStore($request);
|
||||
|
||||
// 本人已读过的广播来源ID(已读副本记录)
|
||||
// 本店已读过的广播来源ID(已读副本记录)
|
||||
$readBroadcastIds = NoticeModel::query()
|
||||
->where('user_id', $user->id)
|
||||
->where('store_id', $store->id)
|
||||
->whereNotNull('data->broadcast_from')
|
||||
->pluck('data')
|
||||
->map(static fn (?array $data) => $data['broadcast_from'] ?? null)
|
||||
->filter()
|
||||
->values();
|
||||
|
||||
$query = NoticeModel::query()->where(function ($q) use ($user, $readBroadcastIds) {
|
||||
$q->where('user_id', $user->id)
|
||||
$query = NoticeModel::query()->where(function ($q) use ($store, $readBroadcastIds) {
|
||||
$q->where('store_id', $store->id)
|
||||
->orWhere(function ($broadcastQuery) use ($readBroadcastIds) {
|
||||
$broadcastQuery->where('user_id', NoticeModel::BROADCAST_USER_ID);
|
||||
$broadcastQuery->where('store_id', NoticeModel::BROADCAST_STORE_ID);
|
||||
if ($readBroadcastIds->isNotEmpty()) {
|
||||
$broadcastQuery->whereNotIn('id', $readBroadcastIds->all());
|
||||
}
|
||||
@@ -55,24 +55,24 @@ class NoticeController extends BaseMiniController
|
||||
return $this->success($data);
|
||||
}
|
||||
|
||||
/** 标记已读(广播 → 复制本人已读副本;个人通知 → 直接更新) */
|
||||
/** 标记已读(广播 → 复制本店已读副本;定向通知 → 直接更新) */
|
||||
#[PutRoute('/notice/{id}/read', authorize: true, where: ['id' => '[0-9]+'])]
|
||||
public function read(int $id, Request $request): JsonResponse
|
||||
{
|
||||
$user = $this->currentUser($request);
|
||||
$store = $this->currentStore($request);
|
||||
|
||||
$notice = NoticeModel::whereIn('user_id', [NoticeModel::BROADCAST_USER_ID, $user->id])->find($id);
|
||||
$notice = NoticeModel::whereIn('store_id', [NoticeModel::BROADCAST_STORE_ID, $store->id])->find($id);
|
||||
if ($notice === null) {
|
||||
throw new RepositoryException('通知不存在');
|
||||
}
|
||||
|
||||
if ($notice->user_id === NoticeModel::BROADCAST_USER_ID) {
|
||||
$exists = NoticeModel::where('user_id', $user->id)
|
||||
if ($notice->store_id === NoticeModel::BROADCAST_STORE_ID) {
|
||||
$exists = NoticeModel::where('store_id', $store->id)
|
||||
->where('data->broadcast_from', $notice->id)
|
||||
->exists();
|
||||
if (! $exists) {
|
||||
NoticeModel::create([
|
||||
'user_id' => $user->id,
|
||||
'store_id' => $store->id,
|
||||
'type' => $notice->type,
|
||||
'title' => $notice->title,
|
||||
'content' => $notice->content,
|
||||
|
||||
@@ -30,8 +30,7 @@ class OrderController extends BaseMiniController
|
||||
#[PostRoute('/order', authorize: true)]
|
||||
public function store(MiniOrderRequest $request): JsonResponse
|
||||
{
|
||||
$user = $this->currentUser($request);
|
||||
$store = $this->ensureStoreBound($user);
|
||||
$store = $this->currentStore($request);
|
||||
$level = $store->level_id > 0 ? $store->level : null;
|
||||
if ($level === null) {
|
||||
throw new RepositoryException('门店未设置客户等级,无法下单,请联系客服');
|
||||
@@ -138,8 +137,7 @@ class OrderController extends BaseMiniController
|
||||
'pageSize.max' => '每页数量最大 50',
|
||||
]);
|
||||
|
||||
$user = $this->currentUser($request);
|
||||
$store = $this->ensureStoreBound($user);
|
||||
$store = $this->currentStore($request);
|
||||
|
||||
$query = StoreOrderModel::query()
|
||||
->where('store_id', $store->id)
|
||||
@@ -220,8 +218,7 @@ class OrderController extends BaseMiniController
|
||||
throw new RepositoryException('period 参数只能是 day/week/month');
|
||||
}
|
||||
|
||||
$user = $this->currentUser($request);
|
||||
$store = $this->ensureStoreBound($user);
|
||||
$store = $this->currentStore($request);
|
||||
|
||||
// 按数据库方言选择周期分组表达式(生产 MySQL / 测试 SQLite)
|
||||
$driver = DB::connection()->getDriverName();
|
||||
@@ -259,8 +256,7 @@ class OrderController extends BaseMiniController
|
||||
#[GetRoute('/order/{id}', authorize: true, where: ['id' => '[0-9]+'])]
|
||||
public function detail(int $id, Request $request): JsonResponse
|
||||
{
|
||||
$user = $this->currentUser($request);
|
||||
$store = $this->ensureStoreBound($user);
|
||||
$store = $this->currentStore($request);
|
||||
|
||||
$order = StoreOrderModel::with('items')
|
||||
->where('store_id', $store->id)
|
||||
@@ -276,8 +272,7 @@ class OrderController extends BaseMiniController
|
||||
#[PutRoute('/order/{id}/cancel', authorize: true, where: ['id' => '[0-9]+'])]
|
||||
public function cancel(int $id, Request $request): JsonResponse
|
||||
{
|
||||
$user = $this->currentUser($request);
|
||||
$store = $this->ensureStoreBound($user);
|
||||
$store = $this->currentStore($request);
|
||||
|
||||
$order = StoreOrderModel::where('store_id', $store->id)->find($id);
|
||||
if ($order === null) {
|
||||
|
||||
@@ -48,8 +48,7 @@ class PaymentController extends BaseMiniController
|
||||
#[GetRoute('/payment', authorize: true)]
|
||||
public function index(Request $request): JsonResponse
|
||||
{
|
||||
$user = $this->currentUser($request);
|
||||
$store = $this->ensureStoreBound($user);
|
||||
$store = $this->currentStore($request);
|
||||
|
||||
$query = PaymentModel::query()
|
||||
->where('store_id', $store->id)
|
||||
@@ -89,11 +88,10 @@ class PaymentController extends BaseMiniController
|
||||
'remark.max' => '备注超过最大长度',
|
||||
]);
|
||||
|
||||
$user = $this->currentUser($request);
|
||||
$store = $this->ensureStoreBound($user);
|
||||
$store = $this->currentStore($request);
|
||||
$billIds = array_map('intval', $data['bill_ids']);
|
||||
|
||||
$payment = DB::transaction(function () use ($store, $user, $data, $billIds) {
|
||||
$payment = DB::transaction(function () use ($store, $data, $billIds) {
|
||||
$bills = BillModel::query()
|
||||
->where('store_id', $store->id)
|
||||
->whereIn('id', $billIds)
|
||||
@@ -119,7 +117,6 @@ class PaymentController extends BaseMiniController
|
||||
$payment = PaymentModel::create([
|
||||
'payment_no' => app(BillNumberService::class)->make('ZF'),
|
||||
'store_id' => $store->id,
|
||||
'user_id' => $user->id,
|
||||
'amount' => $amount,
|
||||
'pay_method' => (int) $data['pay_method'],
|
||||
'voucher_ids' => array_map('intval', $data['voucher_ids']),
|
||||
@@ -144,8 +141,7 @@ class PaymentController extends BaseMiniController
|
||||
#[GetRoute('/payment/{id}', authorize: true, where: ['id' => '[0-9]+'])]
|
||||
public function detail(int $id, Request $request): JsonResponse
|
||||
{
|
||||
$user = $this->currentUser($request);
|
||||
$store = $this->ensureStoreBound($user);
|
||||
$store = $this->currentStore($request);
|
||||
|
||||
$payment = PaymentModel::query()
|
||||
->where('store_id', $store->id)
|
||||
|
||||
@@ -51,8 +51,7 @@ class ProductController extends BaseMiniController
|
||||
->paginate($pageSize);
|
||||
|
||||
// 当前门店的等级(售价 = 成本价 × (100 + 等级上浮比例) / 100)
|
||||
$user = $this->optionalUser($request);
|
||||
$store = $user !== null ? $this->boundStore($user) : null;
|
||||
$store = $this->optionalStore($request);
|
||||
$level = ($store !== null && $store->level_id > 0) ? $store->level : null;
|
||||
|
||||
$paginator->getCollection()->transform(
|
||||
@@ -70,7 +69,7 @@ class ProductController extends BaseMiniController
|
||||
}
|
||||
|
||||
/**
|
||||
* 商品详情(免登录浏览;登录门店按等级上浮比例显示换算价,未登录/未绑店/未设等级 price=null)
|
||||
* 商品详情(免登录浏览;登录门店按等级上浮比例显示换算价,未登录/未设等级 price=null)
|
||||
*/
|
||||
#[GetRoute('/product/{id}', authorize: false, where: ['id' => '[0-9]+'])]
|
||||
public function detail(int $id, Request $request): JsonResponse
|
||||
@@ -84,8 +83,7 @@ class ProductController extends BaseMiniController
|
||||
}
|
||||
|
||||
$price = null;
|
||||
$user = $this->optionalUser($request);
|
||||
$store = $user !== null ? $this->boundStore($user) : null;
|
||||
$store = $this->optionalStore($request);
|
||||
$level = ($store !== null && $store->level_id > 0) ? $store->level : null;
|
||||
if ($level !== null) {
|
||||
$price = CustomerLevelModel::calcLevelPrice($product->cost_price, $level->percent);
|
||||
|
||||
@@ -18,8 +18,7 @@ class StoreController extends BaseMiniController
|
||||
#[GetRoute('/store/info', authorize: true)]
|
||||
public function info(Request $request): JsonResponse
|
||||
{
|
||||
$user = $this->currentUser($request);
|
||||
$store = $this->ensureStoreBound($user);
|
||||
$store = $this->currentStore($request);
|
||||
|
||||
return $this->success([
|
||||
'id' => $store->id,
|
||||
@@ -46,8 +45,7 @@ class StoreController extends BaseMiniController
|
||||
'address.max' => '地址最长 255 个字符',
|
||||
]);
|
||||
|
||||
$user = $this->currentUser($request);
|
||||
$store = $this->ensureStoreBound($user);
|
||||
$store = $this->currentStore($request);
|
||||
|
||||
$store->update($data);
|
||||
|
||||
|
||||
@@ -26,9 +26,9 @@ class UploadController extends BaseMiniController
|
||||
'file.max' => '图片不能超过 5MB',
|
||||
]);
|
||||
|
||||
$user = $this->currentUser($request);
|
||||
$store = $this->currentStore($request);
|
||||
// 分组 4=用户上传,渠道 20=APP用户
|
||||
$result = app(SysFileService::class)->upload($data['file'], 4, 20, $user->id);
|
||||
$result = app(SysFileService::class)->upload($data['file'], 4, 20, $store->id);
|
||||
|
||||
return $this->success([
|
||||
'id' => $result['id'],
|
||||
|
||||
@@ -5,8 +5,8 @@ namespace App\Http\Controllers\Order;
|
||||
use App\Exceptions\RepositoryException;
|
||||
use App\Models\BillModel;
|
||||
use App\Models\NoticeModel;
|
||||
use App\Models\StoreModel;
|
||||
use App\Models\StoreOrderModel;
|
||||
use App\Models\UserModel;
|
||||
use App\Services\ItemImageResolver;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Http\Request;
|
||||
@@ -219,26 +219,27 @@ class StoreOrderController extends BaseController
|
||||
}
|
||||
|
||||
/**
|
||||
* 状态流转后通知门店用户
|
||||
* 状态流转后通知门店
|
||||
*/
|
||||
private function notifyStore(StoreOrderModel $order): void
|
||||
{
|
||||
$userIds = UserModel::query()
|
||||
->where('store_id', $order->store_id)
|
||||
->where('status', UserModel::STATUS_NORMAL)
|
||||
->pluck('id');
|
||||
$store = StoreModel::query()
|
||||
->where('id', $order->store_id)
|
||||
->where('status', StoreModel::STATUS_NORMAL)
|
||||
->first();
|
||||
if ($store === null) {
|
||||
return;
|
||||
}
|
||||
|
||||
$statusName = StoreOrderModel::STATUS_NAMES[$order->status] ?? (string) $order->status;
|
||||
foreach ($userIds as $userId) {
|
||||
NoticeModel::create([
|
||||
'user_id' => $userId,
|
||||
'type' => NoticeModel::TYPE_ORDER,
|
||||
'title' => '订单状态更新',
|
||||
'content' => mb_substr("您的订单 {$order->order_no} 状态已更新为「{$statusName}」", 0, 500),
|
||||
'data' => ['order_id' => $order->id],
|
||||
'is_read' => NoticeModel::UNREAD,
|
||||
]);
|
||||
}
|
||||
NoticeModel::create([
|
||||
'store_id' => $store->id,
|
||||
'type' => NoticeModel::TYPE_ORDER,
|
||||
'title' => '订单状态更新',
|
||||
'content' => mb_substr("您的订单 {$order->order_no} 状态已更新为「{$statusName}」", 0, 500),
|
||||
'data' => ['order_id' => $order->id],
|
||||
'is_read' => NoticeModel::UNREAD,
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -9,7 +9,6 @@ use App\Models\CustomerLevelModel;
|
||||
use App\Models\NoticeModel;
|
||||
use App\Models\ProductModel;
|
||||
use App\Models\StoreModel;
|
||||
use App\Models\UserModel;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
@@ -188,19 +187,14 @@ class ProductController extends BaseController
|
||||
->implode('、');
|
||||
$content = mb_substr('以下商品价格已调整:' . $productNames . ',下次登录小程序后按新价格显示', 0, 500);
|
||||
|
||||
// 成本价变更影响所有等级的售价:通知全部正常门店绑定的正常用户
|
||||
$userIds = UserModel::query()
|
||||
->where('status', UserModel::STATUS_NORMAL)
|
||||
->whereIn('store_id', function ($q) {
|
||||
$q->select('id')
|
||||
->from('store')
|
||||
->where('status', StoreModel::STATUS_NORMAL);
|
||||
})
|
||||
// 成本价变更影响所有等级的售价:通知全部正常门店
|
||||
$storeIds = StoreModel::query()
|
||||
->where('status', StoreModel::STATUS_NORMAL)
|
||||
->pluck('id');
|
||||
|
||||
foreach ($userIds as $userId) {
|
||||
foreach ($storeIds as $storeId) {
|
||||
NoticeModel::create([
|
||||
'user_id' => $userId,
|
||||
'store_id' => $storeId,
|
||||
'type' => NoticeModel::TYPE_PRICE,
|
||||
'title' => '商品价格变更',
|
||||
'content' => $content,
|
||||
|
||||
@@ -35,7 +35,7 @@ class PaymentController extends BaseController
|
||||
$params = $request->all();
|
||||
$pageSize = $params['pageSize'] ?? 10;
|
||||
$data = $this->buildSearch($params, PaymentModel::query()
|
||||
->with(['store:id,name', 'user:id,nickname', 'auditor:id,nickname'])
|
||||
->with(['store:id,name', 'auditor:id,nickname'])
|
||||
->withCount('bills'))
|
||||
->orderBy('status')
|
||||
->orderBy('id', 'desc')
|
||||
@@ -48,7 +48,7 @@ class PaymentController extends BaseController
|
||||
#[GetRoute(route: '/{id}', authorize: 'query', where: ['id' => '[0-9]+'])]
|
||||
public function detail(int $id): JsonResponse
|
||||
{
|
||||
$payment = PaymentModel::with(['store:id,name,contact,phone', 'user:id,nickname', 'auditor:id,nickname'])->find($id);
|
||||
$payment = PaymentModel::with(['store:id,name,contact,phone', 'auditor:id,nickname'])->find($id);
|
||||
if (empty($payment)) {
|
||||
throw new RepositoryException('支付记录不存在');
|
||||
}
|
||||
|
||||
@@ -1,68 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Http\Requests\UserUpdateInfoRequest;
|
||||
use App\Models\UserModel;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Http\Request;
|
||||
use Modules\Common\Trait\RequestJson;
|
||||
use Modules\AnnoRoute\Attribute\GetRoute;
|
||||
use Modules\AnnoRoute\Attribute\PostRoute;
|
||||
use Modules\AnnoRoute\Attribute\PutRoute;
|
||||
use Modules\AnnoRoute\Attribute\RequestAttribute;
|
||||
|
||||
#[RequestAttribute('/api/user', authGuard: 'users')]
|
||||
class UserController
|
||||
{
|
||||
use RequestJson;
|
||||
protected array $noPermission = ['refreshToken'];
|
||||
|
||||
#[GetRoute]
|
||||
public function getUserInfo(): JsonResponse
|
||||
{
|
||||
$info = auth()->user();
|
||||
return $this->success(compact('info'));
|
||||
}
|
||||
|
||||
#[PostRoute('/logout')]
|
||||
public function logout(): JsonResponse
|
||||
{
|
||||
$user_id = auth('users')->id();
|
||||
$model = new UserModel;
|
||||
if ($model->logout($user_id)) {
|
||||
return $this->success('退出登录成功');
|
||||
} else {
|
||||
return $this->error($model->getErrorMsg());
|
||||
}
|
||||
}
|
||||
|
||||
#[PutRoute]
|
||||
public function setUserInfo(UserUpdateInfoRequest $request): JsonResponse
|
||||
{
|
||||
UserModel::where('user_id', auth('user')->id())->update($request->validated());
|
||||
|
||||
return $this->error('更新成功');
|
||||
}
|
||||
|
||||
#[PostRoute('/setPwd')]
|
||||
public function setPassword(Request $request): JsonResponse
|
||||
{
|
||||
$data = $request->validate([
|
||||
'oldPassword' => 'required|string|max:20',
|
||||
'newPassword' => 'required|string|min:6|max:20',
|
||||
'rePassword' => 'required|same:newPassword',
|
||||
]);
|
||||
$user_id = auth('user')->id();
|
||||
$user = UserModel::query()->find($user_id);
|
||||
if (! password_verify($data['oldPassword'], $user['password'])) {
|
||||
return $this->error('旧密码不正确!');
|
||||
}
|
||||
$user->password = password_hash($data['newPassword'], PASSWORD_DEFAULT);
|
||||
if ($user->save()) {
|
||||
return $this->success('更新成功');
|
||||
}
|
||||
|
||||
return $this->error('更新失败');
|
||||
}
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Customer;
|
||||
|
||||
use Modules\Common\Http\Requests\BaseFormRequest;
|
||||
|
||||
/**
|
||||
* 小程序用户绑定 验证(绑定门店)
|
||||
*/
|
||||
class MiniUserBindRequest extends BaseFormRequest
|
||||
{
|
||||
protected $stopOnFirstFailure = true;
|
||||
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'store_id' => 'required|integer|min:1',
|
||||
];
|
||||
}
|
||||
|
||||
public function messages(): array
|
||||
{
|
||||
return [
|
||||
'store_id.required' => '绑定门店时必须选择门店',
|
||||
'store_id.min' => '门店ID不正确',
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -5,7 +5,7 @@ namespace App\Http\Requests\Customer;
|
||||
use Modules\Common\Http\Requests\BaseFormRequest;
|
||||
|
||||
/**
|
||||
* 通知 创建 验证(user_id 留空 = 全员广播)
|
||||
* 通知 创建 验证(store_id 留空 = 全员广播)
|
||||
*/
|
||||
class NoticeFormRequest extends BaseFormRequest
|
||||
{
|
||||
@@ -13,13 +13,13 @@ class NoticeFormRequest extends BaseFormRequest
|
||||
|
||||
protected function prepareForValidation(): void
|
||||
{
|
||||
$this->merge(['user_id' => (int) ($this->input('user_id') ?? 0)]);
|
||||
$this->merge(['store_id' => (int) ($this->input('store_id') ?? 0)]);
|
||||
}
|
||||
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'user_id' => 'required|integer|min:0',
|
||||
'store_id' => 'required|integer|min:0',
|
||||
'type' => 'required|string|in:order,price,system',
|
||||
'title' => 'required|string|max:100',
|
||||
'content' => 'nullable|string|max:500',
|
||||
|
||||
@@ -6,7 +6,7 @@ use Illuminate\Validation\Rule;
|
||||
use Modules\Common\Http\Requests\BaseFormRequest;
|
||||
|
||||
/**
|
||||
* 门店 创建/编辑 验证
|
||||
* 门店 创建/编辑 验证(登录账号唯一;密码创建必填,编辑留空不修改)
|
||||
*/
|
||||
class StoreFormRequest extends BaseFormRequest
|
||||
{
|
||||
@@ -14,8 +14,19 @@ class StoreFormRequest extends BaseFormRequest
|
||||
|
||||
public function rules(): array
|
||||
{
|
||||
$id = (int) $this->route('id', 0);
|
||||
|
||||
return [
|
||||
'name' => 'required|string|max:100',
|
||||
'username' => [
|
||||
'required',
|
||||
'string',
|
||||
'min:4',
|
||||
'max:20',
|
||||
'alpha_dash',
|
||||
Rule::unique('store', 'username')->ignore($id),
|
||||
],
|
||||
'password' => ($this->isMethod('post') ? 'required' : 'nullable') . '|string|min:6|max:20',
|
||||
'level_id' => 'required|integer|exists:customer_level,id',
|
||||
'contact' => 'nullable|string|max:50',
|
||||
'phone' => 'nullable|string|max:20',
|
||||
@@ -31,6 +42,14 @@ class StoreFormRequest extends BaseFormRequest
|
||||
return [
|
||||
'name.required' => '门店名称不能为空',
|
||||
'name.max' => '门店名称最长 100 个字符',
|
||||
'username.required' => '登录账号不能为空',
|
||||
'username.min' => '登录账号至少 4 个字符',
|
||||
'username.max' => '登录账号最长 20 个字符',
|
||||
'username.alpha_dash' => '登录账号只能由字母、数字、中划线、下划线组成',
|
||||
'username.unique' => '登录账号已被使用',
|
||||
'password.required' => '登录密码不能为空',
|
||||
'password.min' => '登录密码至少 6 位',
|
||||
'password.max' => '登录密码最长 20 位',
|
||||
'level_id.required' => '请选择客户等级',
|
||||
'level_id.exists' => '客户等级不存在',
|
||||
'payment_cycle_days.integer' => '回款周期必须为整数',
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class UserRegisterRequest extends FormRequest
|
||||
{
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'username' => 'required|min:4|alphaDash',
|
||||
'password' => 'required|min:4|alphaDash',
|
||||
'rePassword' => 'required|min:4|same:password',
|
||||
'email' => 'required|email',
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class UserUpdateInfoRequest extends FormRequest
|
||||
{
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'username' => 'required|min:4|max:20',
|
||||
'nickname' => 'required|min:4|max:20',
|
||||
'gender' => 'required',
|
||||
'email' => 'required|email',
|
||||
'avatar_id' => 'required|integer',
|
||||
'mobile' => 'required|regex:/^1[34578]\d{9}$/',
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -7,7 +7,7 @@ use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
|
||||
/**
|
||||
* 小程序购物车模型(门店订货车:按用户归属,同商品唯一行、加购合并数量)
|
||||
* 小程序购物车模型(门店订货车:按门店归属,同商品唯一行、加购合并数量)
|
||||
*/
|
||||
class CartModel extends Model
|
||||
{
|
||||
@@ -17,23 +17,23 @@ class CartModel extends Model
|
||||
protected $primaryKey = 'id';
|
||||
|
||||
protected $fillable = [
|
||||
'user_id',
|
||||
'store_id',
|
||||
'product_id',
|
||||
'quantity',
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'user_id' => 'integer',
|
||||
'store_id' => 'integer',
|
||||
'product_id' => 'integer',
|
||||
'quantity' => 'decimal:2',
|
||||
];
|
||||
|
||||
/**
|
||||
* 归属用户
|
||||
* 归属门店
|
||||
*/
|
||||
public function user(): BelongsTo
|
||||
public function store(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(UserModel::class, 'user_id', 'id');
|
||||
return $this->belongsTo(StoreModel::class, 'store_id', 'id');
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -6,7 +6,7 @@ use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
|
||||
/**
|
||||
* 通知模型(小程序端消息:订单 / 价格变更 / 系统;user_id=0 为全员广播)
|
||||
* 通知模型(小程序端消息:订单 / 价格变更 / 系统;store_id=0 为全员广播)
|
||||
*/
|
||||
class NoticeModel extends Model
|
||||
{
|
||||
@@ -22,14 +22,14 @@ class NoticeModel extends Model
|
||||
/** 已读 */
|
||||
public const READ = 1;
|
||||
|
||||
/** 全员广播时的 user_id 约定值 */
|
||||
public const BROADCAST_USER_ID = 0;
|
||||
/** 全员广播时的 store_id 约定值 */
|
||||
public const BROADCAST_STORE_ID = 0;
|
||||
|
||||
protected $table = 'notice';
|
||||
protected $primaryKey = 'id';
|
||||
|
||||
protected $fillable = [
|
||||
'user_id',
|
||||
'store_id',
|
||||
'type',
|
||||
'title',
|
||||
'content',
|
||||
@@ -41,15 +41,15 @@ class NoticeModel extends Model
|
||||
protected $casts = [
|
||||
'data' => 'array',
|
||||
'is_read' => 'integer',
|
||||
'user_id' => 'integer',
|
||||
'store_id' => 'integer',
|
||||
'read_at' => 'datetime',
|
||||
];
|
||||
|
||||
/**
|
||||
* 接收用户(user_id=0 表示全员广播,无对应用户)
|
||||
* 接收门店(store_id=0 表示全员广播,无对应门店)
|
||||
*/
|
||||
public function user(): BelongsTo
|
||||
public function store(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(UserModel::class, 'user_id', 'id');
|
||||
return $this->belongsTo(StoreModel::class, 'store_id', 'id');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -51,7 +51,6 @@ class PaymentModel extends Model
|
||||
protected $fillable = [
|
||||
'payment_no',
|
||||
'store_id',
|
||||
'user_id',
|
||||
'amount',
|
||||
'pay_method',
|
||||
'voucher_ids',
|
||||
@@ -64,7 +63,6 @@ class PaymentModel extends Model
|
||||
|
||||
protected $casts = [
|
||||
'store_id' => 'integer',
|
||||
'user_id' => 'integer',
|
||||
'amount' => 'decimal:2',
|
||||
'pay_method' => 'integer',
|
||||
'status' => 'integer',
|
||||
@@ -124,14 +122,6 @@ class PaymentModel extends Model
|
||||
return $this->hasMany(BillModel::class, 'payment_id', 'id');
|
||||
}
|
||||
|
||||
/**
|
||||
* 提交人(小程序用户)
|
||||
*/
|
||||
public function user(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(UserModel::class, 'user_id', 'id');
|
||||
}
|
||||
|
||||
/**
|
||||
* 审核人(后台系统用户)
|
||||
*/
|
||||
|
||||
+33
-12
@@ -3,17 +3,19 @@
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use Illuminate\Foundation\Auth\User as Authenticatable;
|
||||
use Illuminate\Notifications\Notifiable;
|
||||
use Laravel\Sanctum\HasApiTokens;
|
||||
|
||||
/**
|
||||
* 门店模型(小程序下单主体)
|
||||
* 门店模型(小程序下单主体,即客户;门店即用户,账号密码登录)
|
||||
*/
|
||||
class StoreModel extends Model
|
||||
class StoreModel extends Authenticatable
|
||||
{
|
||||
use SoftDeletes, HasFactory;
|
||||
use HasApiTokens, SoftDeletes, HasFactory, Notifiable;
|
||||
|
||||
/** 状态:停用 */
|
||||
public const STATUS_DISABLED = 0;
|
||||
@@ -26,6 +28,10 @@ class StoreModel extends Model
|
||||
protected $fillable = [
|
||||
'name',
|
||||
'code',
|
||||
'username',
|
||||
'password',
|
||||
'avatar',
|
||||
'last_login_at',
|
||||
'level_id',
|
||||
'contact',
|
||||
'phone',
|
||||
@@ -35,11 +41,18 @@ class StoreModel extends Model
|
||||
'remark',
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'password',
|
||||
'remember_token',
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'level_id' => 'integer',
|
||||
'payment_cycle_days' => 'integer',
|
||||
'total_purchase_amount' => 'decimal:2',
|
||||
'status' => 'integer',
|
||||
'last_login_at' => 'datetime:Y-m-d H:i:s',
|
||||
'created_at' => 'datetime:Y-m-d H:i:s',
|
||||
];
|
||||
|
||||
/**
|
||||
@@ -58,14 +71,6 @@ class StoreModel extends Model
|
||||
return $this->hasMany(StoreOrderModel::class, 'store_id', 'id');
|
||||
}
|
||||
|
||||
/**
|
||||
* 绑定本门店的小程序用户
|
||||
*/
|
||||
public function users(): HasMany
|
||||
{
|
||||
return $this->hasMany(UserModel::class, 'store_id', 'id');
|
||||
}
|
||||
|
||||
/**
|
||||
* 门店账单(采购单完成后按门店生成)
|
||||
*/
|
||||
@@ -73,4 +78,20 @@ class StoreModel extends Model
|
||||
{
|
||||
return $this->hasMany(BillModel::class, 'store_id', 'id');
|
||||
}
|
||||
|
||||
/**
|
||||
* 门店购物车
|
||||
*/
|
||||
public function carts(): HasMany
|
||||
{
|
||||
return $this->hasMany(CartModel::class, 'store_id', 'id');
|
||||
}
|
||||
|
||||
/**
|
||||
* 门店通知
|
||||
*/
|
||||
public function notices(): HasMany
|
||||
{
|
||||
return $this->hasMany(NoticeModel::class, 'store_id', 'id');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,12 +43,4 @@ class SupplierModel extends Model
|
||||
{
|
||||
return $this->hasMany(ProductModel::class, 'supplier_id', 'id');
|
||||
}
|
||||
|
||||
/**
|
||||
* 绑定本供应商的小程序用户
|
||||
*/
|
||||
public function users(): HasMany
|
||||
{
|
||||
return $this->hasMany(UserModel::class, 'supplier_id', 'id');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,68 +0,0 @@
|
||||
<?php
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
use Illuminate\Foundation\Auth\User as Authenticatable;
|
||||
use Illuminate\Notifications\Notifiable;
|
||||
use Laravel\Sanctum\HasApiTokens;
|
||||
|
||||
/**
|
||||
* APP 用户模型(小程序端:门店 / 供应商用户)
|
||||
*/
|
||||
class UserModel extends Authenticatable
|
||||
{
|
||||
use HasApiTokens, HasFactory, Notifiable;
|
||||
|
||||
/** 状态:停用 */
|
||||
public const int STATUS_DISABLED = 0;
|
||||
/** 状态:正常 */
|
||||
public const int STATUS_NORMAL = 1;
|
||||
|
||||
protected $table = 'user';
|
||||
|
||||
protected $primaryKey = 'id';
|
||||
|
||||
protected $hidden = [
|
||||
'password',
|
||||
'remember_token',
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'username',
|
||||
'email',
|
||||
'password',
|
||||
'nickname',
|
||||
'openid',
|
||||
'unionid',
|
||||
'phone',
|
||||
'avatar',
|
||||
'store_id',
|
||||
'status',
|
||||
'last_login_at',
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'email_verified_at' => 'datetime:Y-m-d H:i:s',
|
||||
'last_login_at' => 'datetime:Y-m-d H:i:s',
|
||||
'created_at' => 'datetime:Y-m-d H:i:s',
|
||||
'store_id' => 'integer',
|
||||
'status' => 'integer',
|
||||
];
|
||||
|
||||
/**
|
||||
* 关联门店
|
||||
*/
|
||||
public function store(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(StoreModel::class, 'store_id', 'id');
|
||||
}
|
||||
/**
|
||||
* 用户通知
|
||||
*/
|
||||
public function notices(): HasMany
|
||||
{
|
||||
return $this->hasMany(NoticeModel::class, 'user_id', 'id');
|
||||
}
|
||||
}
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
namespace App\Providers;
|
||||
|
||||
use App\Services\WechatService;
|
||||
use Barryvdh\DomPDF\Facade\Pdf;
|
||||
use Illuminate\Foundation\Exceptions\Handler as ExceptionsHandler;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
@@ -18,9 +17,6 @@ class AppServiceProvider extends ServiceProvider
|
||||
{
|
||||
|
||||
$this->app->bind(ExceptionsHandler::class, \App\Exceptions\ExceptionsHandler::class);
|
||||
|
||||
// 单例:测试通过 setHttpClient() 注入 Mock 后,控制器解析到同一实例
|
||||
$this->app->singleton(WechatService::class);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,99 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Services;
|
||||
|
||||
use App\Exceptions\RepositoryException;
|
||||
use EasyWeChat\Kernel\Exceptions\HttpException;
|
||||
use EasyWeChat\MiniApp\Application;
|
||||
use Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface;
|
||||
use Symfony\Contracts\HttpClient\HttpClientInterface;
|
||||
|
||||
/**
|
||||
* 微信小程序服务(基于 EasyWeChat 6.x)
|
||||
*
|
||||
* 封装 code2Session / 手机号解密;配置读取 site_config('wechatMini')
|
||||
* (后台「小程序设置」面板维护,存 sys_site_config 表)。
|
||||
*
|
||||
* 测试策略:通过 setHttpClient() 注入 Symfony MockHttpClient 拦截微信 HTTP 调用。
|
||||
*/
|
||||
class WechatService
|
||||
{
|
||||
private ?Application $app = null;
|
||||
|
||||
private ?HttpClientInterface $httpClient = null;
|
||||
|
||||
/**
|
||||
* 注入自定义 HttpClient(测试注入 MockHttpClient;注入后强制重建 Application)
|
||||
*/
|
||||
public function setHttpClient(HttpClientInterface $httpClient): void
|
||||
{
|
||||
$this->httpClient = $httpClient;
|
||||
$this->app = null;
|
||||
}
|
||||
|
||||
/**
|
||||
* code2Session:小程序 wx.login 的 code 换取 openid / session_key
|
||||
*
|
||||
* @param string $code wx.login 返回的临时登录凭证
|
||||
* @return array{openid: string, session_key: string, unionid?: string}
|
||||
*/
|
||||
public function code2Session(string $code): array
|
||||
{
|
||||
try {
|
||||
/** @var array{openid: string, session_key: string, unionid?: string} $session */
|
||||
$session = $this->app()->getUtils()->codeToSession($code);
|
||||
} catch (HttpException|TransportExceptionInterface $e) {
|
||||
throw new RepositoryException('微信登录失败:' . $e->getMessage());
|
||||
}
|
||||
|
||||
return $session;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取手机号:wx.getPhoneNumber 的 phoneCode 换取手机号
|
||||
*
|
||||
* @param string $phoneCode 手机号授权事件返回的动态令牌
|
||||
* @return string 用户手机号
|
||||
*/
|
||||
public function getPhone(string $phoneCode): string
|
||||
{
|
||||
try {
|
||||
$result = $this->app()->getUtils()->getPhoneNumber($phoneCode);
|
||||
} catch (HttpException|TransportExceptionInterface $e) {
|
||||
throw new RepositoryException('获取手机号失败:' . $e->getMessage());
|
||||
}
|
||||
|
||||
$phone = (string) ($result['phone_info']['phoneNumber']
|
||||
?? $result['phone_info']['purePhoneNumber']
|
||||
?? '');
|
||||
if ($phone === '') {
|
||||
throw new RepositoryException('获取手机号失败:微信未返回有效手机号');
|
||||
}
|
||||
|
||||
return $phone;
|
||||
}
|
||||
|
||||
/**
|
||||
* EasyWeChat 小程序应用实例(懒构建单例)
|
||||
*/
|
||||
protected function app(): Application
|
||||
{
|
||||
if ($this->app === null) {
|
||||
$config = (array) site_config('wechatMini', []);
|
||||
if (empty($config['appid']) || empty($config['secret'])) {
|
||||
throw new RepositoryException('微信小程序尚未配置(WECHAT_MINI_APPID / WECHAT_MINI_SECRET)');
|
||||
}
|
||||
|
||||
$this->app = new Application([
|
||||
'app_id' => (string) $config['appid'],
|
||||
'secret' => (string) $config['secret'],
|
||||
]);
|
||||
|
||||
if ($this->httpClient !== null) {
|
||||
$this->app->setHttpClient($this->httpClient);
|
||||
}
|
||||
}
|
||||
|
||||
return $this->app;
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -70,7 +70,7 @@ return [
|
||||
],
|
||||
'users' => [
|
||||
'driver' => 'eloquent',
|
||||
'model' => \App\Models\UserModel::class
|
||||
'model' => \App\Models\StoreModel::class
|
||||
],
|
||||
],
|
||||
|
||||
|
||||
@@ -23,6 +23,10 @@ class StoreModelFactory extends Factory
|
||||
return [
|
||||
'name' => '测试门店' . $seq,
|
||||
'code' => 'S' . str_pad((string) $seq, 6, '0', STR_PAD_LEFT),
|
||||
'username' => 'store' . $seq,
|
||||
'password' => password_hash('123456', PASSWORD_DEFAULT),
|
||||
'avatar' => '',
|
||||
'last_login_at' => null,
|
||||
'level_id' => 0,
|
||||
'contact' => '联系人' . $seq,
|
||||
'phone' => '138' . str_pad((string) $seq, 8, '0', STR_PAD_LEFT),
|
||||
@@ -41,6 +45,14 @@ class StoreModelFactory extends Factory
|
||||
return $this->state(fn () => ['status' => StoreModel::STATUS_DISABLED]);
|
||||
}
|
||||
|
||||
/**
|
||||
* 指定登录密码(明文,入库自动哈希)
|
||||
*/
|
||||
public function withPassword(string $password): static
|
||||
{
|
||||
return $this->state(fn () => ['password' => password_hash($password, PASSWORD_DEFAULT)]);
|
||||
}
|
||||
|
||||
/**
|
||||
* 指定回款周期(天)
|
||||
*/
|
||||
|
||||
@@ -1,55 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use App\Models\UserModel;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
/**
|
||||
* 小程序用户工厂(微信登录自动生成,供测试使用;无需 Faker)
|
||||
*
|
||||
* @extends Factory<UserModel>
|
||||
*/
|
||||
class UserModelFactory extends Factory
|
||||
{
|
||||
protected $model = UserModel::class;
|
||||
|
||||
private static int $sequence = 0;
|
||||
|
||||
public function definition(): array
|
||||
{
|
||||
$seq = ++self::$sequence;
|
||||
|
||||
return [
|
||||
'username' => null,
|
||||
'password' => null,
|
||||
'nickname' => '微信用户' . $seq,
|
||||
'email' => '',
|
||||
'openid' => 'openid_' . str_pad((string) $seq, 16, '0', STR_PAD_LEFT),
|
||||
'unionid' => '',
|
||||
'phone' => '',
|
||||
'avatar' => '',
|
||||
'store_id' => 0,
|
||||
'status' => UserModel::STATUS_NORMAL,
|
||||
'last_login_at' => null,
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* 已绑定门店的门店用户
|
||||
*/
|
||||
public function forStore(int $storeId): static
|
||||
{
|
||||
return $this->state(fn () => [
|
||||
'store_id' => $storeId,
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* 停用账号
|
||||
*/
|
||||
public function disabled(): static
|
||||
{
|
||||
return $this->state(fn () => ['status' => UserModel::STATUS_DISABLED]);
|
||||
}
|
||||
}
|
||||
@@ -12,30 +12,6 @@ return new class extends Migration
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
if (! Schema::hasTable('user')) {
|
||||
Schema::create('user', function (Blueprint $table) {
|
||||
$table->increments('id')->comment('用户ID');
|
||||
$table->string('username', 20)->nullable()->unique()->comment('用户名');
|
||||
$table->string('password', 100)->nullable()->comment('密码');
|
||||
$table->string('nickname', 20)->default('')->comment('昵称');
|
||||
$table->string('email', 50)->default('')->comment('邮箱');
|
||||
$table->timestamp('email_verified_at')->nullable();
|
||||
// 小程序用户扩展字段
|
||||
$table->string('openid', 64)->nullable()->unique()->comment('微信OpenID');
|
||||
$table->string('unionid', 64)->default('')->comment('微信UnionID');
|
||||
$table->string('phone', 20)->default('')->comment('手机号');
|
||||
$table->string('avatar', 255)->default('')->comment('头像');
|
||||
$table->integer('store_id')->default(0)->comment('关联门店ID');
|
||||
$table->integer('status')->default(1)->comment('状态(1正常 0停用)');
|
||||
$table->timestamp('last_login_at')->nullable()->comment('最后登录时间');
|
||||
$table->rememberToken();
|
||||
$table->timestamps();
|
||||
$table->index('store_id', 'user_type_index');
|
||||
$table->index('openid', 'user_openid_index');
|
||||
$table->comment('APP用户表(含小程序用户)');
|
||||
});
|
||||
}
|
||||
|
||||
// 客户等级表(价格体系按等级定价)
|
||||
if (! Schema::hasTable('customer_level')) {
|
||||
Schema::create('customer_level', function (Blueprint $table) {
|
||||
@@ -55,6 +31,11 @@ return new class extends Migration
|
||||
$table->increments('id')->comment('门店ID');
|
||||
$table->string('name', 100)->comment('门店名称');
|
||||
$table->string('code', 50)->unique()->comment('门店编码');
|
||||
// 登录账号字段(小程序端 账号 + 密码 登录)
|
||||
$table->string('username', 20)->unique()->comment('登录账号');
|
||||
$table->string('password', 100)->comment('登录密码');
|
||||
$table->string('avatar', 255)->default('')->comment('头像');
|
||||
$table->timestamp('last_login_at')->nullable()->comment('最后登录时间');
|
||||
$table->integer('level_id')->default(0)->comment('客户等级ID(决定商品价格)');
|
||||
$table->string('contact', 50)->default('')->comment('联系人');
|
||||
$table->string('phone', 20)->default('')->comment('联系电话');
|
||||
@@ -63,10 +44,11 @@ return new class extends Migration
|
||||
$table->decimal('total_purchase_amount', 12, 2)->default(0)->comment('总采购金额(只统计商品金额,账单支付后累加)');
|
||||
$table->integer('status')->default(1)->comment('状态(1正常 0停用)');
|
||||
$table->string('remark', 255)->nullable()->default('')->comment('备注');
|
||||
$table->rememberToken();
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
$table->index(['level_id', 'status'], 'store_level_status_index');
|
||||
$table->comment('门店表');
|
||||
$table->comment('门店表(门店即用户,账号密码登录)');
|
||||
});
|
||||
}
|
||||
|
||||
@@ -91,7 +73,7 @@ return new class extends Migration
|
||||
if (! Schema::hasTable('notice')) {
|
||||
Schema::create('notice', function (Blueprint $table) {
|
||||
$table->increments('id')->comment('通知ID');
|
||||
$table->integer('user_id')->default(0)->comment('接收用户ID(user表,0为全员广播)');
|
||||
$table->integer('store_id')->default(0)->comment('接收门店ID(store表,0为全员广播)');
|
||||
$table->string('type', 20)->default('system')->comment('通知类型(order订单 price价格 system系统)');
|
||||
$table->string('title', 100)->comment('标题');
|
||||
$table->string('content', 500)->default('')->comment('内容');
|
||||
@@ -99,7 +81,7 @@ return new class extends Migration
|
||||
$table->integer('is_read')->default(0)->comment('是否已读(1已读 0未读)');
|
||||
$table->timestamp('read_at')->nullable()->comment('阅读时间');
|
||||
$table->timestamps();
|
||||
$table->index(['user_id', 'is_read'], 'notice_user_read_index');
|
||||
$table->index(['store_id', 'is_read'], 'notice_store_read_index');
|
||||
$table->comment('消息通知表');
|
||||
});
|
||||
}
|
||||
@@ -110,7 +92,6 @@ return new class extends Migration
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('user');
|
||||
Schema::dropIfExists('customer_level');
|
||||
Schema::dropIfExists('store');
|
||||
Schema::dropIfExists('supplier');
|
||||
|
||||
@@ -8,19 +8,19 @@ return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
* 小程序购物车(门店订货车):按用户归属,同商品唯一行、加购合并累加
|
||||
* 小程序购物车(门店订货车):按门店归属,同商品唯一行、加购合并累加
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
if (! Schema::hasTable('cart')) {
|
||||
Schema::create('cart', function (Blueprint $table) {
|
||||
$table->increments('id')->comment('购物车项ID');
|
||||
$table->integer('user_id')->comment('用户ID(购物车归属者)');
|
||||
$table->integer('store_id')->comment('门店ID(购物车归属者)');
|
||||
$table->integer('product_id')->comment('商品ID');
|
||||
$table->decimal('quantity', 10, 2)->default(0)->comment('订货量');
|
||||
$table->timestamps();
|
||||
$table->unique(['user_id', 'product_id'], 'cart_user_product_unique');
|
||||
$table->index(['user_id', 'created_at'], 'cart_user_created_index');
|
||||
$table->unique(['store_id', 'product_id'], 'cart_store_product_unique');
|
||||
$table->index(['store_id', 'created_at'], 'cart_store_created_index');
|
||||
$table->comment('小程序购物车表(门店订货车)');
|
||||
});
|
||||
}
|
||||
|
||||
@@ -16,8 +16,7 @@ return new class extends Migration
|
||||
Schema::create('payment', function (Blueprint $table) {
|
||||
$table->increments('id')->comment('支付记录ID');
|
||||
$table->string('payment_no', 32)->unique()->comment('支付单号');
|
||||
$table->integer('store_id')->comment('门店ID');
|
||||
$table->integer('user_id')->default(0)->comment('提交人(小程序用户ID)');
|
||||
$table->integer('store_id')->comment('门店ID(提交门店即支付人)');
|
||||
$table->decimal('amount', 10, 2)->default(0)->comment('支付金额(= 关联账单总金额合计,提交时快照)');
|
||||
$table->integer('pay_method')->comment('支付方式(1微信 2支付宝 3对公汇款)');
|
||||
$table->string('voucher_ids', 255)->default('')->comment('汇款凭证图片ID(逗号分隔)');
|
||||
|
||||
@@ -135,17 +135,6 @@ class PermissionSeeder extends Seeder
|
||||
['type' => 'rule', 'key' => 'customer.level.delete', 'name' => '删除'],
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'route',
|
||||
'key' => 'customer.miniUser',
|
||||
'name' => '小程序用户',
|
||||
'path' => '/customer/mini-user',
|
||||
'children' => [
|
||||
['type' => 'rule', 'key' => 'customer.miniUser.query', 'name' => '查询'],
|
||||
['type' => 'rule', 'key' => 'customer.miniUser.update', 'name' => '启用停用'],
|
||||
['type' => 'rule', 'key' => 'customer.miniUser.bind', 'name' => '绑定主体'],
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'route',
|
||||
'key' => 'customer.notice',
|
||||
|
||||
@@ -16,8 +16,7 @@ class SysDataSeeder extends Seeder
|
||||
// 系统设置初始数据
|
||||
DB::table('sys_site_config_group')->insert([
|
||||
['id' => 1, 'title' => '网站设置', 'key' => 'web', 'remark' => '网站基础设置', 'created_at' => $date, 'updated_at' => $date],
|
||||
['id' => 2, 'title' => '小程序设置', 'key' => 'wechatMini', 'remark' => '小程序设置', 'created_at' => $date, 'updated_at' => $date],
|
||||
['id' => 3, 'title' => '业务配置', 'key' => 'services', 'remark' => '小程序设置', 'created_at' => $date, 'updated_at' => $date],
|
||||
['id' => 3, 'title' => '业务配置', 'key' => 'services', 'remark' => '业务附加配置', 'created_at' => $date, 'updated_at' => $date],
|
||||
['id' => 4, 'title' => '支付配置', 'key' => 'pay', 'remark' => '网站的支付配置', 'created_at' => $date, 'updated_at' => $date],
|
||||
]);
|
||||
DB::table('sys_site_config_items')->insert([
|
||||
@@ -25,8 +24,6 @@ class SysDataSeeder extends Seeder
|
||||
['id' => 2, 'group_id' => 1, 'key' => 'logo', 'title' => '网站LOGO', 'describe' => '网站的LOGO,用于标识网站', 'values' => 'https://file.xinadmin.cn/file/favicons.ico', 'type' => 'Input','options' => "", 'sort' => 1, 'created_at' => $date, 'updated_at' => $date,],
|
||||
['id' => 3, 'group_id' => 1, 'key' => 'subtitle', 'title' => '网站副标题', 'describe' => '网站副标题,展示在登录页面标题的下面', 'values' => 'Xin Admin 快速开发框架', 'type' => 'Input','options' => "", 'sort' => 2, 'created_at' => $date, 'updated_at' => $date,],
|
||||
['id' => 4, 'group_id' => 1, 'key' => 'describe', 'title' => '网站描述', 'describe' => '网站的基本描述', 'values' => '没有描述', 'type' => 'TextArea','options' => "", 'sort' => 2, 'created_at' => $date, 'updated_at' => $date],
|
||||
['id' => 5, 'group_id' => 2, 'key' => 'appid', 'title' => 'APPID', 'describe' => '小程序的APPID', 'values' => '没有描述', 'type' => 'Input','options' => "", 'sort' => 0, 'created_at' => $date, 'updated_at' => $date],
|
||||
['id' => 6, 'group_id' => 2, 'key' => 'secret', 'title' => 'SecretKey', 'describe' => '小程序的SecretKey', 'values' => '没有描述', 'type' => 'Input','options' => "", 'sort' => 1, 'created_at' => $date, 'updated_at' => $date],
|
||||
['id' => 7, 'group_id' => 3, 'key' => 'box_amount', 'title' => '周转筐金额', 'describe' => '周转筐的金额,用于附加业务金额的计算', 'values' => '', 'type' => 'InputNumber','props' => "min=0\nmax=10000\nstep=0.01", 'sort' => 0, 'created_at' => $date, 'updated_at' => $date],
|
||||
['id' => 8, 'group_id' => 3, 'key' => 'tray_amount', 'title' => '周转托盘金额', 'describe' => '周转托盘的金额,用于附加金额的计算', 'values' => '', 'type' => 'InputNumber','props' => "min=0\nmax=10000\nstep=0.01", 'sort' => 1, 'created_at' => $date, 'updated_at' => $date],
|
||||
['id' => 9, 'group_id' => 4, 'key' => 'wechat_qrcode', 'title' => '微信收款码', 'describe' => '微信收款码图片地址(在文件管理中上传收款码后复制图片链接,或直接填写文件ID),小程序付款页展示', 'values' => '', 'type' => 'Input','options' => "", 'sort' => 0, 'created_at' => $date, 'updated_at' => $date],
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
import"./rolldown-runtime-BgaNhQyE.js";import{Dr as e,t}from"./jsx-runtime-CRBytmvs.js";import{t as n}from"./button-BILozH6U.js";import{t as r}from"./card-DU2T2-YW.js";import{t as i}from"./result-D_u5wtF_.js";e();var a=t(),o=()=>(0,a.jsx)(r,{variant:`borderless`,children:(0,a.jsx)(i,{status:`403`,title:`403`,subTitle:`Sorry, you are not authorized to access this page.`,extra:(0,a.jsx)(n,{type:`primary`,children:`Back Home`})})});export{o as default};
|
||||
@@ -1 +0,0 @@
|
||||
import"./rolldown-runtime-BgaNhQyE.js";import{Dr as e,t}from"./jsx-runtime-CRBytmvs.js";import{t as n}from"./button-BILozH6U.js";import{t as r}from"./card-DU2T2-YW.js";import{t as i}from"./result-D_u5wtF_.js";e();var a=t(),o=()=>(0,a.jsx)(r,{variant:`borderless`,children:(0,a.jsx)(i,{status:`404`,title:`404`,subTitle:`Sorry, the page you visited does not exist.`,extra:(0,a.jsx)(n,{type:`primary`,children:`Back Home`})})});export{o as default};
|
||||
@@ -1 +0,0 @@
|
||||
import"./rolldown-runtime-BgaNhQyE.js";import{Dr as e,t}from"./jsx-runtime-CRBytmvs.js";import{t as n}from"./button-BILozH6U.js";import{t as r}from"./card-DU2T2-YW.js";import{t as i}from"./result-D_u5wtF_.js";e();var a=t(),o=()=>(0,a.jsx)(r,{variant:`borderless`,children:(0,a.jsx)(i,{status:`500`,title:`500`,subTitle:`Sorry, something went wrong.`,extra:(0,a.jsx)(n,{type:`primary`,children:`Back Home`})})});export{o as default};
|
||||
@@ -1 +0,0 @@
|
||||
import{i as e,t}from"./rolldown-runtime-BgaNhQyE.js";import{Dr as n,Ft as r}from"./jsx-runtime-CRBytmvs.js";var i=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M862 465.3h-81c-4.6 0-9 2-12.1 5.5L550 723.1V160c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v563.1L255.1 470.8c-3-3.5-7.4-5.5-12.1-5.5h-81c-6.8 0-10.5 8.1-6 13.2L487.9 861a31.96 31.96 0 0048.3 0L868 478.5c4.5-5.2.8-13.2-6-13.2z`}}]},name:`arrow-down`,theme:`outlined`}})),a=e(n()),o=e(i());function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s.apply(this,arguments)}var c=a.forwardRef((e,t)=>a.createElement(r,s({},e,{ref:t,icon:o.default})));export{c as t};
|
||||
@@ -1 +0,0 @@
|
||||
import{i as e,t}from"./rolldown-runtime-BgaNhQyE.js";import{Dr as n,Ft as r}from"./jsx-runtime-CRBytmvs.js";var i=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M868 545.5L536.1 163a31.96 31.96 0 00-48.3 0L156 545.5a7.97 7.97 0 006 13.2h81c4.6 0 9-2 12.1-5.5L474 300.9V864c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V300.9l218.9 252.3c3 3.5 7.4 5.5 12.1 5.5h81c6.8 0 10.5-8 6-13.2z`}}]},name:`arrow-up`,theme:`outlined`}})),a=e(n()),o=e(i());function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s.apply(this,arguments)}var c=a.forwardRef((e,t)=>a.createElement(r,s({},e,{ref:t,icon:o.default})));export{c as t};
|
||||
@@ -1 +0,0 @@
|
||||
import{i as e}from"./rolldown-runtime-BgaNhQyE.js";import{Dr as t,t as n}from"./jsx-runtime-CRBytmvs.js";import{t as r}from"./user-LBumqaa7.js";var i=e(t(),1),a=n(),o=({auth:e,children:t})=>{let n=r(e=>e.access);return(0,i.useMemo)(()=>!e||n.includes(e),[n,e])?(0,a.jsx)(a.Fragment,{children:t}):null};export{o as t};
|
||||
@@ -1 +0,0 @@
|
||||
import{i as e,t}from"./rolldown-runtime-BgaNhQyE.js";import{Dr as n,Ft as r}from"./jsx-runtime-CRBytmvs.js";var i=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`0 0 1024 1024`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z`}}]},name:`caret-down`,theme:`filled`}})),a=e(n()),o=e(i());function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s.apply(this,arguments)}var c=a.forwardRef((e,t)=>a.createElement(r,s({},e,{ref:t,icon:o.default})));export{c as t};
|
||||
File diff suppressed because one or more lines are too long
@@ -1 +0,0 @@
|
||||
import{i as e,t}from"./rolldown-runtime-BgaNhQyE.js";import{Dr as n,Ft as r}from"./jsx-runtime-CRBytmvs.js";var i=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z`}}]},name:`check-circle`,theme:`filled`}})),a=e(n()),o=e(i());function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s.apply(this,arguments)}var c=a.forwardRef((e,t)=>a.createElement(r,s({},e,{ref:t,icon:o.default})));export{c as t};
|
||||
@@ -1 +0,0 @@
|
||||
import{i as e,t}from"./rolldown-runtime-BgaNhQyE.js";import{Dr as n,Ft as r}from"./jsx-runtime-CRBytmvs.js";var i=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M699 353h-46.9c-10.2 0-19.9 4.9-25.9 13.3L469 584.3l-71.2-98.8c-6-8.3-15.6-13.3-25.9-13.3H325c-6.5 0-10.3 7.4-6.5 12.7l124.6 172.8a31.8 31.8 0 0051.7 0l210.6-292c3.9-5.3.1-12.7-6.4-12.7z`}},{tag:`path`,attrs:{d:`M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z`}}]},name:`check-circle`,theme:`outlined`}})),a=e(n()),o=e(i());function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s.apply(this,arguments)}var c=a.forwardRef((e,t)=>a.createElement(r,s({},e,{ref:t,icon:o.default})));export{c as t};
|
||||
@@ -1 +0,0 @@
|
||||
import{i as e,t}from"./rolldown-runtime-BgaNhQyE.js";import{Dr as n,Ft as r}from"./jsx-runtime-CRBytmvs.js";var i=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M682 455V311l-76 76v68c-.1 50.7-42 92.1-94 92a95.8 95.8 0 01-52-15l-54 55c29.1 22.4 65.9 36 106 36 93.8 0 170-75.1 170-168z`}},{tag:`path`,attrs:{d:`M833 446h-60c-4.4 0-8 3.6-8 8 0 140.3-113.7 254-254 254-63 0-120.7-23-165-61l-54 54a334.01 334.01 0 00179 81v102H326c-13.9 0-24.9 14.3-25 32v36c.1 4.4 2.9 8 6 8h408c3.2 0 6-3.6 6-8v-36c0-17.7-11-32-25-32H547V782c165.3-17.9 294-157.9 294-328 0-4.4-3.6-8-8-8zm13.1-377.7l-43.5-41.9a8 8 0 00-11.2.1l-129 129C634.3 101.2 577 64 511 64c-93.9 0-170 75.3-170 168v224c0 6.7.4 13.3 1.2 19.8l-68 68A252.33 252.33 0 01258 454c-.2-4.4-3.8-8-8-8h-60c-4.4 0-8 3.6-8 8 0 53 12.5 103 34.6 147.4l-137 137a8.03 8.03 0 000 11.3l42.7 42.7c3.1 3.1 8.2 3.1 11.3 0L846.2 79.8l.1-.1c3.1-3.2 3-8.3-.2-11.4zM417 401V232c0-50.6 41.9-92 94-92 46 0 84.1 32.3 92.3 74.7L417 401z`}}]},name:`audio-muted`,theme:`outlined`}})),a=e(n()),o=e(i());function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s.apply(this,arguments)}var c=a.forwardRef((e,t)=>a.createElement(r,s({},e,{ref:t,icon:o.default}))),l=e(t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M842 454c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8 0 140.3-113.7 254-254 254S258 594.3 258 454c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8 0 168.7 126.6 307.9 290 327.6V884H326.7c-13.7 0-24.7 14.3-24.7 32v36c0 4.4 2.8 8 6.2 8h407.6c3.4 0 6.2-3.6 6.2-8v-36c0-17.7-11-32-24.7-32H548V782.1c165.3-18 294-158 294-328.1zM512 624c93.9 0 170-75.2 170-168V232c0-92.8-76.1-168-170-168s-170 75.2-170 168v224c0 92.8 76.1 168 170 168zm-94-392c0-50.6 41.9-92 94-92s94 41.4 94 92v224c0 50.6-41.9 92-94 92s-94-41.4-94-92V232z`}}]},name:`audio`,theme:`outlined`}}))());function u(){return u=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u.apply(this,arguments)}var d=a.forwardRef((e,t)=>a.createElement(r,u({},e,{ref:t,icon:l.default}))),f=e(t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M899.1 869.6l-53-305.6H864c14.4 0 26-11.6 26-26V346c0-14.4-11.6-26-26-26H618V138c0-14.4-11.6-26-26-26H432c-14.4 0-26 11.6-26 26v182H160c-14.4 0-26 11.6-26 26v192c0 14.4 11.6 26 26 26h17.9l-53 305.6a25.95 25.95 0 0025.6 30.4h723c1.5 0 3-.1 4.4-.4a25.88 25.88 0 0021.2-30zM204 390h272V182h72v208h272v104H204V390zm468 440V674c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v156H416V674c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v156H202.8l45.1-260H776l45.1 260H672z`}}]},name:`clear`,theme:`outlined`}}))());function p(){return p=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},p.apply(this,arguments)}var m=a.forwardRef((e,t)=>a.createElement(r,p({},e,{ref:t,icon:f.default})));export{d as n,c as r,m as t};
|
||||
@@ -1 +0,0 @@
|
||||
import{i as e,t}from"./rolldown-runtime-BgaNhQyE.js";import{Dr as n,Ft as r}from"./jsx-runtime-CRBytmvs.js";var i=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z`}},{tag:`path`,attrs:{d:`M686.7 638.6L544.1 535.5V288c0-4.4-3.6-8-8-8H488c-4.4 0-8 3.6-8 8v275.4c0 2.6 1.2 5 3.3 6.5l165.4 120.6c3.6 2.6 8.6 1.8 11.2-1.7l28.6-39c2.6-3.7 1.8-8.7-1.8-11.2z`}}]},name:`clock-circle`,theme:`outlined`}})),a=e(n()),o=e(i());function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s.apply(this,arguments)}var c=a.forwardRef((e,t)=>a.createElement(r,s({},e,{ref:t,icon:o.default})));export{c as t};
|
||||
@@ -1 +0,0 @@
|
||||
import{i as e,t}from"./rolldown-runtime-BgaNhQyE.js";import{Dr as n,Ft as r}from"./jsx-runtime-CRBytmvs.js";var i=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{"fill-rule":`evenodd`,viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z`}}]},name:`close-circle`,theme:`filled`}})),a=e(n()),o=e(i());function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s.apply(this,arguments)}var c=a.forwardRef((e,t)=>a.createElement(r,s({},e,{ref:t,icon:o.default})));export{c as t};
|
||||
@@ -1 +0,0 @@
|
||||
import{i as e,t}from"./rolldown-runtime-BgaNhQyE.js";import{Dr as n,Ft as r}from"./jsx-runtime-CRBytmvs.js";var i=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{"fill-rule":`evenodd`,viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm0 76c-205.4 0-372 166.6-372 372s166.6 372 372 372 372-166.6 372-372-166.6-372-372-372zm128.01 198.83c.03 0 .05.01.09.06l45.02 45.01a.2.2 0 01.05.09.12.12 0 010 .07c0 .02-.01.04-.05.08L557.25 512l127.87 127.86a.27.27 0 01.05.06v.02a.12.12 0 010 .07c0 .03-.01.05-.05.09l-45.02 45.02a.2.2 0 01-.09.05.12.12 0 01-.07 0c-.02 0-.04-.01-.08-.05L512 557.25 384.14 685.12c-.04.04-.06.05-.08.05a.12.12 0 01-.07 0c-.03 0-.05-.01-.09-.05l-45.02-45.02a.2.2 0 01-.05-.09.12.12 0 010-.07c0-.02.01-.04.06-.08L466.75 512 338.88 384.14a.27.27 0 01-.05-.06l-.01-.02a.12.12 0 010-.07c0-.03.01-.05.05-.09l45.02-45.02a.2.2 0 01.09-.05.12.12 0 01.07 0c.02 0 .04.01.08.06L512 466.75l127.86-127.86c.04-.05.06-.06.08-.06a.12.12 0 01.07 0z`}}]},name:`close-circle`,theme:`outlined`}})),a=e(n()),o=e(i());function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s.apply(this,arguments)}var c=a.forwardRef((e,t)=>a.createElement(r,s({},e,{ref:t,icon:o.default})));export{c as t};
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +0,0 @@
|
||||
import{i as e,t}from"./rolldown-runtime-BgaNhQyE.js";import{Dr as n,Ft as r}from"./jsx-runtime-CRBytmvs.js";var i=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z`}}]},name:`delete`,theme:`outlined`}})),a=e(n()),o=e(i());function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s.apply(this,arguments)}var c=a.forwardRef((e,t)=>a.createElement(r,s({},e,{ref:t,icon:o.default})));export{c as t};
|
||||
File diff suppressed because one or more lines are too long
@@ -1 +0,0 @@
|
||||
import{i as e,t}from"./rolldown-runtime-BgaNhQyE.js";import{Dr as n,Ft as r}from"./jsx-runtime-CRBytmvs.js";var i=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z`}}]},name:`down`,theme:`outlined`}})),a=e(n()),o=e(i());function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s.apply(this,arguments)}var c=a.forwardRef((e,t)=>a.createElement(r,s({},e,{ref:t,icon:o.default})));export{c as t};
|
||||
@@ -1 +0,0 @@
|
||||
import{i as e,t}from"./rolldown-runtime-BgaNhQyE.js";import{Dr as n,Ft as r}from"./jsx-runtime-CRBytmvs.js";var i=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M505.7 661a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z`}}]},name:`download`,theme:`outlined`}})),a=e(n()),o=e(i());function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s.apply(this,arguments)}var c=a.forwardRef((e,t)=>a.createElement(r,s({},e,{ref:t,icon:o.default})));export{c as t};
|
||||
@@ -1 +0,0 @@
|
||||
import{i as e,t}from"./rolldown-runtime-BgaNhQyE.js";import{Dr as n,Ft as r}from"./jsx-runtime-CRBytmvs.js";var i=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M854.6 289.1a362.49 362.49 0 00-79.9-115.7 370.83 370.83 0 00-118.2-77.8C610.7 76.6 562.1 67 512 67c-50.1 0-98.7 9.6-144.5 28.5-44.3 18.3-84 44.5-118.2 77.8A363.6 363.6 0 00169.4 289c-19.5 45-29.4 92.8-29.4 142 0 70.6 16.9 140.9 50.1 208.7 26.7 54.5 64 107.6 111 158.1 80.3 86.2 164.5 138.9 188.4 153a43.9 43.9 0 0022.4 6.1c7.8 0 15.5-2 22.4-6.1 23.9-14.1 108.1-66.8 188.4-153 47-50.4 84.3-103.6 111-158.1C867.1 572 884 501.8 884 431.1c0-49.2-9.9-97-29.4-142zM512 880.2c-65.9-41.9-300-207.8-300-449.1 0-77.9 31.1-151.1 87.6-206.3C356.3 169.5 431.7 139 512 139s155.7 30.5 212.4 85.9C780.9 280 812 353.2 812 431.1c0 241.3-234.1 407.2-300 449.1zm0-617.2c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm79.2 255.2A111.6 111.6 0 01512 551c-29.9 0-58-11.7-79.2-32.8A111.6 111.6 0 01400 439c0-29.9 11.7-58 32.8-79.2C454 338.6 482.1 327 512 327c29.9 0 58 11.6 79.2 32.8C612.4 381 624 409.1 624 439c0 29.9-11.6 58-32.8 79.2z`}}]},name:`environment`,theme:`outlined`}})),a=e(n()),o=e(i());function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s.apply(this,arguments)}var c=a.forwardRef((e,t)=>a.createElement(r,s({},e,{ref:t,icon:o.default})));export{c as t};
|
||||
@@ -1 +0,0 @@
|
||||
import{i as e,t}from"./rolldown-runtime-BgaNhQyE.js";import{Dr as n,Ft as r}from"./jsx-runtime-CRBytmvs.js";var i=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z`}}]},name:`exclamation-circle`,theme:`filled`}})),a=e(n()),o=e(i());function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s.apply(this,arguments)}var c=a.forwardRef((e,t)=>a.createElement(r,s({},e,{ref:t,icon:o.default})));export{c as t};
|
||||
@@ -1 +0,0 @@
|
||||
import{i as e,t}from"./rolldown-runtime-BgaNhQyE.js";import{Dr as n,Ft as r}from"./jsx-runtime-CRBytmvs.js";var i=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z`}}]},name:`eye`,theme:`outlined`}})),a=e(n()),o=e(i());function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s.apply(this,arguments)}var c=a.forwardRef((e,t)=>a.createElement(r,s({},e,{ref:t,icon:o.default})));export{c as t};
|
||||
@@ -1 +0,0 @@
|
||||
import{i as e,t}from"./rolldown-runtime-BgaNhQyE.js";import{Dr as n,Ft as r}from"./jsx-runtime-CRBytmvs.js";var i=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M296 250c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H296zm184 144H296c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zm-48 458H208V148h560v320c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V108c0-17.7-14.3-32-32-32H168c-17.7 0-32 14.3-32 32v784c0 17.7 14.3 32 32 32h264c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm440-88H728v-36.6c46.3-13.8 80-56.6 80-107.4 0-61.9-50.1-112-112-112s-112 50.1-112 112c0 50.7 33.7 93.6 80 107.4V764H520c-8.8 0-16 7.2-16 16v152c0 8.8 7.2 16 16 16h352c8.8 0 16-7.2 16-16V780c0-8.8-7.2-16-16-16zM646 620c0-27.6 22.4-50 50-50s50 22.4 50 50-22.4 50-50 50-50-22.4-50-50zm180 266H566v-60h260v60z`}}]},name:`audit`,theme:`outlined`}})),a=e(n()),o=e(i());function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s.apply(this,arguments)}var c=a.forwardRef((e,t)=>a.createElement(r,s({},e,{ref:t,icon:o.default}))),l=e(t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{"fill-rule":`evenodd`,viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M880 912H144c-17.7 0-32-14.3-32-32V144c0-17.7 14.3-32 32-32h360c4.4 0 8 3.6 8 8v56c0 4.4-3.6 8-8 8H184v656h656V520c0-4.4 3.6-8 8-8h56c4.4 0 8 3.6 8 8v360c0 17.7-14.3 32-32 32zM770.87 199.13l-52.2-52.2a8.01 8.01 0 014.7-13.6l179.4-21c5.1-.6 9.5 3.7 8.9 8.9l-21 179.4c-.8 6.6-8.9 9.4-13.6 4.7l-52.4-52.4-256.2 256.2a8.03 8.03 0 01-11.3 0l-42.4-42.4a8.03 8.03 0 010-11.3l256.1-256.3z`}}]},name:`export`,theme:`outlined`}}))());function u(){return u=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u.apply(this,arguments)}var d=a.forwardRef((e,t)=>a.createElement(r,u({},e,{ref:t,icon:l.default}))),f=e(t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M688 312v-48c0-4.4-3.6-8-8-8H296c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8zm-392 88c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H296zm376 116c-119.3 0-216 96.7-216 216s96.7 216 216 216 216-96.7 216-216-96.7-216-216-216zm107.5 323.5C750.8 868.2 712.6 884 672 884s-78.8-15.8-107.5-44.5C535.8 810.8 520 772.6 520 732s15.8-78.8 44.5-107.5C593.2 595.8 631.4 580 672 580s78.8 15.8 107.5 44.5C808.2 653.2 824 691.4 824 732s-15.8 78.8-44.5 107.5zM761 656h-44.3c-2.6 0-5 1.2-6.5 3.3l-63.5 87.8-23.1-31.9a7.92 7.92 0 00-6.5-3.3H573c-6.5 0-10.3 7.4-6.5 12.7l73.8 102.1c3.2 4.4 9.7 4.4 12.9 0l114.2-158c3.9-5.3.1-12.7-6.4-12.7zM440 852H208V148h560v344c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V108c0-17.7-14.3-32-32-32H168c-17.7 0-32 14.3-32 32v784c0 17.7 14.3 32 32 32h272c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z`}}]},name:`file-done`,theme:`outlined`}}))());function p(){return p=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},p.apply(this,arguments)}var m=a.forwardRef((e,t)=>a.createElement(r,p({},e,{ref:t,icon:f.default})));export{d as n,c as r,m as t};
|
||||
@@ -1 +0,0 @@
|
||||
import{i as e,t}from"./rolldown-runtime-BgaNhQyE.js";import{Dr as n,Ft as r}from"./jsx-runtime-CRBytmvs.js";var i=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494z`}}]},name:`file`,theme:`outlined`}})),a=e(n()),o=e(i());function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s.apply(this,arguments)}var c=a.forwardRef((e,t)=>a.createElement(r,s({},e,{ref:t,icon:o.default})));export{c as t};
|
||||
File diff suppressed because one or more lines are too long
@@ -1 +0,0 @@
|
||||
import{i as e,t}from"./rolldown-runtime-BgaNhQyE.js";import{Dr as n,Ft as r}from"./jsx-runtime-CRBytmvs.js";var i=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M511.6 76.3C264.3 76.2 64 276.4 64 523.5 64 718.9 189.3 885 363.8 946c23.5 5.9 19.9-10.8 19.9-22.2v-77.5c-135.7 15.9-141.2-73.9-150.3-88.9C215 726 171.5 718 184.5 703c30.9-15.9 62.4 4 98.9 57.9 26.4 39.1 77.9 32.5 104 26 5.7-23.5 17.9-44.5 34.7-60.8-140.6-25.2-199.2-111-199.2-213 0-49.5 16.3-95 48.3-131.7-20.4-60.5 1.9-112.3 4.9-120 58.1-5.2 118.5 41.6 123.2 45.3 33-8.9 70.7-13.6 112.9-13.6 42.4 0 80.2 4.9 113.5 13.9 11.3-8.6 67.3-48.8 121.3-43.9 2.9 7.7 24.7 58.3 5.5 118 32.4 36.8 48.9 82.7 48.9 132.3 0 102.2-59 188.1-200 212.9a127.5 127.5 0 0138.1 91v112.5c.8 9 0 17.9 15 17.9 177.1-59.7 304.6-227 304.6-424.1 0-247.2-200.4-447.3-447.5-447.3z`}}]},name:`github`,theme:`outlined`}})),a=e(n()),o=e(i());function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s.apply(this,arguments)}var c=a.forwardRef((e,t)=>a.createElement(r,s({},e,{ref:t,icon:o.default}))),l=e(t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M536.1 273H488c-4.4 0-8 3.6-8 8v275.3c0 2.6 1.2 5 3.3 6.5l165.3 120.7c3.6 2.6 8.6 1.9 11.2-1.7l28.6-39c2.7-3.7 1.9-8.7-1.7-11.2L544.1 528.5V281c0-4.4-3.6-8-8-8zm219.8 75.2l156.8 38.3c5 1.2 9.9-2.6 9.9-7.7l.8-161.5c0-6.7-7.7-10.5-12.9-6.3L752.9 334.1a8 8 0 003 14.1zm167.7 301.1l-56.7-19.5a8 8 0 00-10.1 4.8c-1.9 5.1-3.9 10.1-6 15.1-17.8 42.1-43.3 80-75.9 112.5a353 353 0 01-112.5 75.9 352.18 352.18 0 01-137.7 27.8c-47.8 0-94.1-9.3-137.7-27.8a353 353 0 01-112.5-75.9c-32.5-32.5-58-70.4-75.9-112.5A353.44 353.44 0 01171 512c0-47.8 9.3-94.2 27.8-137.8 17.8-42.1 43.3-80 75.9-112.5a353 353 0 01112.5-75.9C430.6 167.3 477 158 524.8 158s94.1 9.3 137.7 27.8A353 353 0 01775 261.7c10.2 10.3 19.8 21 28.6 32.3l59.8-46.8C784.7 146.6 662.2 81.9 524.6 82 285 82.1 92.6 276.7 95 516.4 97.4 751.9 288.9 942 524.8 942c185.5 0 343.5-117.6 403.7-282.3 1.5-4.2-.7-8.9-4.9-10.4z`}}]},name:`history`,theme:`outlined`}}))());function u(){return u=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u.apply(this,arguments)}var d=a.forwardRef((e,t)=>a.createElement(r,u({},e,{ref:t,icon:l.default}))),f=e(t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z`}},{tag:`path`,attrs:{d:`M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z`}}]},name:`info-circle`,theme:`outlined`}}))());function p(){return p=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},p.apply(this,arguments)}var m=a.forwardRef((e,t)=>a.createElement(r,p({},e,{ref:t,icon:f.default})));export{d as n,c as r,m as t};
|
||||
@@ -1 +0,0 @@
|
||||
import{i as e}from"./rolldown-runtime-BgaNhQyE.js";import{Dr as t,Q as n,St as r,Vn as i,Z as a,at as o,lr as ee,p as te,u as ne,xt as s,yt as c,zn as l}from"./jsx-runtime-CRBytmvs.js";import{f as u,m as d,p as f}from"./tooltip-SaeG1Uv7.js";import{a as p,o as m}from"./style-BmYds38x.js";import{r as re,t as ie}from"./es-DGcDZmXr.js";var h=e(t());function g(e,t){let n=(0,h.useRef)([]),r=()=>{n.current.push(setTimeout(()=>{e.current?.input&&e.current?.input.getAttribute(`type`)===`password`&&e.current?.input.hasAttribute(`value`)&&e.current?.input.removeAttribute(`value`)}))};return(0,h.useEffect)(()=>(t&&r(),()=>n.current.forEach(e=>{e&&clearTimeout(e)})),[t]),r}function ae(e){return!!(e.prefix||e.suffix||e.allowClear||e.showCount)}var _=(0,h.forwardRef)((e,t)=>{let{prefixCls:_,bordered:oe=!0,status:se,size:ce,disabled:le,onBlur:ue,onFocus:v,suffix:y,allowClear:b,addonAfter:x,addonBefore:S,className:C,style:w,styles:T,rootClassName:E,onChange:D,classNames:O,variant:k,...A}=e,{getPrefixCls:j,direction:M,allowClear:N,autoComplete:P,className:F,style:I,classNames:L,styles:R}=l(`input`),z=j(`input`,_),B=(0,h.useRef)(null),V=c(z),[H,U]=m(z,E);p(z,V);let{compactSize:de,compactItemClassnames:fe}=a(z,M),W=n(e=>ce??de??e),pe=h.useContext(o),G=le??pe,me={...e,size:W,disabled:G},he=r(I),ge=r(w),[K,q]=s([L,O],[R,he,T,ge],{props:me}),{status:_e,hasFeedback:J,feedbackIcon:ve}=(0,h.useContext)(te),Y=u(_e,se);(0,h.useRef)(ae(e)||!!J);let X=g(B,!0),Z=e=>{X(),ue?.(e)},ye=e=>{X(),v?.(e)},be=e=>{X(),D?.(e)},xe=(J||y)&&h.createElement(h.Fragment,null,y,J&&ve),Se=re({allowClear:b,contextAllowClear:N,componentName:`Input`}),[Q,$]=ne(`input`,k,oe);return h.createElement(ie,{ref:ee(t,B),prefixCls:z,autoComplete:P,...A,disabled:G,onBlur:Z,onFocus:ye,style:q.root,styles:q,suffix:xe,allowClear:Se,className:i(C,E,U,V,fe,F,K.root),onChange:be,addonBefore:S&&h.createElement(d,{form:!0,space:!0},S),addonAfter:x&&h.createElement(d,{form:!0,space:!0},x),classNames:{...K,input:i({[`${z}-sm`]:W===`small`,[`${z}-lg`]:W===`large`,[`${z}-rtl`]:M===`rtl`},K.input,H),variant:i({[`${z}-${Q}`]:$},f(z,Y)),affixWrapper:i({[`${z}-affix-wrapper-sm`]:W===`small`,[`${z}-affix-wrapper-lg`]:W===`large`,[`${z}-affix-wrapper-rtl`]:M===`rtl`},H),wrapper:i({[`${z}-group-rtl`]:M===`rtl`},H),groupWrapper:i({[`${z}-group-wrapper-sm`]:W===`small`,[`${z}-group-wrapper-lg`]:W===`large`,[`${z}-group-wrapper-rtl`]:M===`rtl`,[`${z}-group-wrapper-${Q}`]:$},f(`${z}-group-wrapper`,Y,J),H)}})});export{g as n,_ as t};
|
||||
@@ -1,4 +0,0 @@
|
||||
import{i as e,t}from"./rolldown-runtime-BgaNhQyE.js";import{An as n,Dr as r,Ft as i,J as a}from"./jsx-runtime-CRBytmvs.js";var o=new n(`antMoveDownIn`,{"0%":{transform:`translate3d(0, 100%, 0)`,transformOrigin:`0 0`,opacity:0},"100%":{transform:`translate3d(0, 0, 0)`,transformOrigin:`0 0`,opacity:1}}),s=new n(`antMoveDownOut`,{"0%":{transform:`translate3d(0, 0, 0)`,transformOrigin:`0 0`,opacity:1},"100%":{transform:`translate3d(0, 100%, 0)`,transformOrigin:`0 0`,opacity:0}}),c=new n(`antMoveLeftIn`,{"0%":{transform:`translate3d(-100%, 0, 0)`,transformOrigin:`0 0`,opacity:0},"100%":{transform:`translate3d(0, 0, 0)`,transformOrigin:`0 0`,opacity:1}}),l=new n(`antMoveLeftOut`,{"0%":{transform:`translate3d(0, 0, 0)`,transformOrigin:`0 0`,opacity:1},"100%":{transform:`translate3d(-100%, 0, 0)`,transformOrigin:`0 0`,opacity:0}}),u=new n(`antMoveRightIn`,{"0%":{transform:`translate3d(100%, 0, 0)`,transformOrigin:`0 0`,opacity:0},"100%":{transform:`translate3d(0, 0, 0)`,transformOrigin:`0 0`,opacity:1}}),d=new n(`antMoveRightOut`,{"0%":{transform:`translate3d(0, 0, 0)`,transformOrigin:`0 0`,opacity:1},"100%":{transform:`translate3d(100%, 0, 0)`,transformOrigin:`0 0`,opacity:0}}),f={"move-up":{inKeyframes:new n(`antMoveUpIn`,{"0%":{transform:`translate3d(0, -100%, 0)`,transformOrigin:`0 0`,opacity:0},"100%":{transform:`translate3d(0, 0, 0)`,transformOrigin:`0 0`,opacity:1}}),outKeyframes:new n(`antMoveUpOut`,{"0%":{transform:`translate3d(0, 0, 0)`,transformOrigin:`0 0`,opacity:1},"100%":{transform:`translate3d(0, -100%, 0)`,transformOrigin:`0 0`,opacity:0}})},"move-down":{inKeyframes:o,outKeyframes:s},"move-left":{inKeyframes:c,outKeyframes:l},"move-right":{inKeyframes:u,outKeyframes:d}},p=(e,t)=>{let{antCls:n}=e,r=`${n}-${t}`,{inKeyframes:i,outKeyframes:o}=f[t];return[a(r,i,o,e.motionDurationMid),{[`
|
||||
${r}-enter,
|
||||
${r}-appear
|
||||
`]:{opacity:0,animationTimingFunction:e.motionEaseOutCirc},[`${r}-leave`]:{animationTimingFunction:e.motionEaseInOutCirc}}]},m=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z`}}]},name:`left`,theme:`outlined`}})),h=e(r()),g=e(m());function _(){return _=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_.apply(this,arguments)}var v=h.forwardRef((e,t)=>h.createElement(i,_({},e,{ref:t,icon:g.default})));export{p as n,v as t};
|
||||
@@ -1 +0,0 @@
|
||||
import{i as e,t}from"./rolldown-runtime-BgaNhQyE.js";import{Dr as n,Ft as r}from"./jsx-runtime-CRBytmvs.js";var i=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494zM504 618H320c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM312 490v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H320c-4.4 0-8 3.6-8 8z`}}]},name:`file-text`,theme:`outlined`}})),a=e(n()),o=e(i());function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s.apply(this,arguments)}var c=a.forwardRef((e,t)=>a.createElement(r,s({},e,{ref:t,icon:o.default}))),l=e(t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M574 665.4a8.03 8.03 0 00-11.3 0L446.5 781.6c-53.8 53.8-144.6 59.5-204 0-59.5-59.5-53.8-150.2 0-204l116.2-116.2c3.1-3.1 3.1-8.2 0-11.3l-39.8-39.8a8.03 8.03 0 00-11.3 0L191.4 526.5c-84.6 84.6-84.6 221.5 0 306s221.5 84.6 306 0l116.2-116.2c3.1-3.1 3.1-8.2 0-11.3L574 665.4zm258.6-474c-84.6-84.6-221.5-84.6-306 0L410.3 307.6a8.03 8.03 0 000 11.3l39.7 39.7c3.1 3.1 8.2 3.1 11.3 0l116.2-116.2c53.8-53.8 144.6-59.5 204 0 59.5 59.5 53.8 150.2 0 204L665.3 562.6a8.03 8.03 0 000 11.3l39.8 39.8c3.1 3.1 8.2 3.1 11.3 0l116.2-116.2c84.5-84.6 84.5-221.5 0-306.1zM610.1 372.3a8.03 8.03 0 00-11.3 0L372.3 598.7a8.03 8.03 0 000 11.3l39.6 39.6c3.1 3.1 8.2 3.1 11.3 0l226.4-226.4c3.1-3.1 3.1-8.2 0-11.3l-39.5-39.6z`}}]},name:`link`,theme:`outlined`}}))());function u(){return u=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u.apply(this,arguments)}var d=a.forwardRef((e,t)=>a.createElement(r,u({},e,{ref:t,icon:l.default})));export{c as n,d as t};
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +0,0 @@
|
||||
import{i as e,t}from"./rolldown-runtime-BgaNhQyE.js";import{Dr as n,Ft as r}from"./jsx-runtime-CRBytmvs.js";var i=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M820 436h-40c-4.4 0-8 3.6-8 8v40c0 4.4 3.6 8 8 8h40c4.4 0 8-3.6 8-8v-40c0-4.4-3.6-8-8-8zm32-104H732V120c0-4.4-3.6-8-8-8H300c-4.4 0-8 3.6-8 8v212H172c-44.2 0-80 35.8-80 80v328c0 17.7 14.3 32 32 32h168v132c0 4.4 3.6 8 8 8h424c4.4 0 8-3.6 8-8V772h168c17.7 0 32-14.3 32-32V412c0-44.2-35.8-80-80-80zM360 180h304v152H360V180zm304 664H360V568h304v276zm200-140H732V500H292v204H160V412c0-6.6 5.4-12 12-12h680c6.6 0 12 5.4 12 12v292z`}}]},name:`printer`,theme:`outlined`}})),a=e(n()),o=e(i());function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s.apply(this,arguments)}var c=a.forwardRef((e,t)=>a.createElement(r,s({},e,{ref:t,icon:o.default})));export{c as t};
|
||||
@@ -1 +0,0 @@
|
||||
import{i as e}from"./rolldown-runtime-BgaNhQyE.js";import{Dr as t,Ln as n,yr as r}from"./jsx-runtime-CRBytmvs.js";import{t as i}from"./config-provider-CqLGIhNd.js";var a=e(t());function o(e){return t=>a.createElement(i,{theme:{token:{motion:!1,zIndexPopupBase:0}}},a.createElement(e,{...t}))}var s=(e,t,i,s,c)=>o(o=>{let{prefixCls:l,style:u}=o,d=a.useRef(null),[f,p]=a.useState(0),[m,h]=a.useState(0),[g,_]=r(!1,o.open),{getPrefixCls:v}=a.useContext(n),y=v(s||`select`,l);a.useEffect(()=>{if(_(!0),typeof ResizeObserver<`u`){let e=new ResizeObserver(e=>{let t=e[0].target;p(t.offsetHeight+8),h(t.offsetWidth)}),t=setInterval(()=>{let n=c?`.${c(y)}`:`.${y}-dropdown`,r=d.current?.querySelector(n);r&&(clearInterval(t),e.observe(r))},10);return()=>{clearInterval(t),e.disconnect()}}},[y]);let b={...o,style:{...u,margin:0},open:g,getPopupContainer:()=>d.current};i&&(b=i(b)),t&&(b={...b,[t]:{overflow:{adjustX:!1,adjustY:!1}}});let x={paddingBottom:f,position:`relative`,minWidth:m};return a.createElement(`div`,{ref:d,style:x},a.createElement(e,{...b}))});export{o as n,s as t};
|
||||
@@ -1 +0,0 @@
|
||||
import{i as e,t}from"./rolldown-runtime-BgaNhQyE.js";import{Dr as n,Ft as r}from"./jsx-runtime-CRBytmvs.js";var i=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M824.8 613.2c-16-51.4-34.4-94.6-62.7-165.3C766.5 262.2 689.3 112 511.5 112 331.7 112 256.2 265.2 261 447.9c-28.4 70.8-46.7 113.7-62.7 165.3-34 109.5-23 154.8-14.6 155.8 18 2.2 70.1-82.4 70.1-82.4 0 49 25.2 112.9 79.8 159-26.4 8.1-85.7 29.9-71.6 53.8 11.4 19.3 196.2 12.3 249.5 6.3 53.3 6 238.1 13 249.5-6.3 14.1-23.8-45.3-45.7-71.6-53.8 54.6-46.2 79.8-110.1 79.8-159 0 0 52.1 84.6 70.1 82.4 8.5-1.1 19.5-46.4-14.5-155.8z`}}]},name:`qq`,theme:`outlined`}})),a=e(n()),o=e(i());function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s.apply(this,arguments)}var c=a.forwardRef((e,t)=>a.createElement(r,s({},e,{ref:t,icon:o.default})));export{c as t};
|
||||
@@ -1 +0,0 @@
|
||||
import{i as e,t}from"./rolldown-runtime-BgaNhQyE.js";import{Dr as n,Ft as r}from"./jsx-runtime-CRBytmvs.js";var i=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M917 211.1l-199.2 24c-6.6.8-9.4 8.9-4.7 13.6l59.3 59.3-226 226-101.8-101.7c-6.3-6.3-16.4-6.2-22.6 0L100.3 754.1a8.03 8.03 0 000 11.3l45 45.2c3.1 3.1 8.2 3.1 11.3 0L433.3 534 535 635.7c6.3 6.2 16.4 6.2 22.6 0L829 364.5l59.3 59.3a8.01 8.01 0 0013.6-4.7l24-199.2c.7-5.1-3.7-9.5-8.9-8.8z`}}]},name:`rise`,theme:`outlined`}})),a=e(n()),o=e(i());function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s.apply(this,arguments)}var c=a.forwardRef((e,t)=>a.createElement(r,s({},e,{ref:t,icon:o.default})));export{c as t};
|
||||
@@ -1 +0,0 @@
|
||||
import{i as e,t}from"./rolldown-runtime-BgaNhQyE.js";import{Dr as n,Ft as r}from"./jsx-runtime-CRBytmvs.js";var i=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z`}}]},name:`search`,theme:`outlined`}})),a=e(n()),o=e(i());function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s.apply(this,arguments)}var c=a.forwardRef((e,t)=>a.createElement(r,s({},e,{ref:t,icon:o.default})));export{c as t};
|
||||
@@ -1 +0,0 @@
|
||||
import{i as e,t}from"./rolldown-runtime-BgaNhQyE.js";import{Dr as n,Ft as r}from"./jsx-runtime-CRBytmvs.js";var i=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M882 272.1V144c0-17.7-14.3-32-32-32H174c-17.7 0-32 14.3-32 32v128.1c-16.7 1-30 14.9-30 31.9v131.7a177 177 0 0014.4 70.4c4.3 10.2 9.6 19.8 15.6 28.9v345c0 17.6 14.3 32 32 32h676c17.7 0 32-14.3 32-32V535a175 175 0 0015.6-28.9c9.5-22.3 14.4-46 14.4-70.4V304c0-17-13.3-30.9-30-31.9zM214 184h596v88H214v-88zm362 656.1H448V736h128v104.1zm234 0H640V704c0-17.7-14.3-32-32-32H416c-17.7 0-32 14.3-32 32v136.1H214V597.9c2.9 1.4 5.9 2.8 9 4 22.3 9.4 46 14.1 70.4 14.1s48-4.7 70.4-14.1c13.8-5.8 26.8-13.2 38.7-22.1.2-.1.4-.1.6 0a180.4 180.4 0 0038.7 22.1c22.3 9.4 46 14.1 70.4 14.1 24.4 0 48-4.7 70.4-14.1 13.8-5.8 26.8-13.2 38.7-22.1.2-.1.4-.1.6 0a180.4 180.4 0 0038.7 22.1c22.3 9.4 46 14.1 70.4 14.1 24.4 0 48-4.7 70.4-14.1 3-1.3 6-2.6 9-4v242.2zm30-404.4c0 59.8-49 108.3-109.3 108.3-40.8 0-76.4-22.1-95.2-54.9-2.9-5-8.1-8.1-13.9-8.1h-.6c-5.7 0-11 3.1-13.9 8.1A109.24 109.24 0 01512 544c-40.7 0-76.2-22-95-54.7-3-5.1-8.4-8.3-14.3-8.3s-11.4 3.2-14.3 8.3a109.63 109.63 0 01-95.1 54.7C233 544 184 495.5 184 435.7v-91.2c0-.3.2-.5.5-.5h655c.3 0 .5.2.5.5v91.2z`}}]},name:`shop`,theme:`outlined`}})),a=e(n()),o=e(i());function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s.apply(this,arguments)}var c=a.forwardRef((e,t)=>a.createElement(r,s({},e,{ref:t,icon:o.default})));export{c as t};
|
||||
@@ -1 +0,0 @@
|
||||
import{i as e,t}from"./rolldown-runtime-BgaNhQyE.js";import{Dr as n,Ft as r}from"./jsx-runtime-CRBytmvs.js";var i=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M832 312H696v-16c0-101.6-82.4-184-184-184s-184 82.4-184 184v16H192c-17.7 0-32 14.3-32 32v536c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V344c0-17.7-14.3-32-32-32zm-432-16c0-61.9 50.1-112 112-112s112 50.1 112 112v16H400v-16zm392 544H232V384h96v88c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-88h224v88c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-88h96v456z`}}]},name:`shopping`,theme:`outlined`}})),a=e(n()),o=e(i());function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s.apply(this,arguments)}var c=a.forwardRef((e,t)=>a.createElement(r,s({},e,{ref:t,icon:o.default})));export{c as t};
|
||||
File diff suppressed because one or more lines are too long
@@ -1 +0,0 @@
|
||||
import{i as e,t}from"./rolldown-runtime-BgaNhQyE.js";import{Dr as n,Ft as r}from"./jsx-runtime-CRBytmvs.js";var i=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M824.2 699.9a301.55 301.55 0 00-86.4-60.4C783.1 602.8 812 546.8 812 484c0-110.8-92.4-201.7-203.2-200-109.1 1.7-197 90.6-197 200 0 62.8 29 118.8 74.2 155.5a300.95 300.95 0 00-86.4 60.4C345 754.6 314 826.8 312 903.8a8 8 0 008 8.2h56c4.3 0 7.9-3.4 8-7.7 1.9-58 25.4-112.3 66.7-153.5A226.62 226.62 0 01612 684c60.9 0 118.2 23.7 161.3 66.8C814.5 792 838 846.3 840 904.3c.1 4.3 3.7 7.7 8 7.7h56a8 8 0 008-8.2c-2-77-33-149.2-87.8-203.9zM612 612c-34.2 0-66.4-13.3-90.5-37.5a126.86 126.86 0 01-37.5-91.8c.3-32.8 13.4-64.5 36.3-88 24-24.6 56.1-38.3 90.4-38.7 33.9-.3 66.8 12.9 91 36.6 24.8 24.3 38.4 56.8 38.4 91.4 0 34.2-13.3 66.3-37.5 90.5A127.3 127.3 0 01612 612zM361.5 510.4c-.9-8.7-1.4-17.5-1.4-26.4 0-15.9 1.5-31.4 4.3-46.5.7-3.6-1.2-7.3-4.5-8.8-13.6-6.1-26.1-14.5-36.9-25.1a127.54 127.54 0 01-38.7-95.4c.9-32.1 13.8-62.6 36.3-85.6 24.7-25.3 57.9-39.1 93.2-38.7 31.9.3 62.7 12.6 86 34.4 7.9 7.4 14.7 15.6 20.4 24.4 2 3.1 5.9 4.4 9.3 3.2 17.6-6.1 36.2-10.4 55.3-12.4 5.6-.6 8.8-6.6 6.3-11.6-32.5-64.3-98.9-108.7-175.7-109.9-110.9-1.7-203.3 89.2-203.3 199.9 0 62.8 28.9 118.8 74.2 155.5-31.8 14.7-61.1 35-86.5 60.4-54.8 54.7-85.8 126.9-87.8 204a8 8 0 008 8.2h56.1c4.3 0 7.9-3.4 8-7.7 1.9-58 25.4-112.3 66.7-153.5 29.4-29.4 65.4-49.8 104.7-59.7 3.9-1 6.5-4.7 6-8.7z`}}]},name:`team`,theme:`outlined`}})),a=e(n()),o=e(i());function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s.apply(this,arguments)}var c=a.forwardRef((e,t)=>a.createElement(r,s({},e,{ref:t,icon:o.default})));export{c as t};
|
||||
@@ -1 +0,0 @@
|
||||
import{i as e,t}from"./rolldown-runtime-BgaNhQyE.js";import{Dr as n,Ft as r}from"./jsx-runtime-CRBytmvs.js";var i=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M956.9 845.1L896.4 632V168c0-17.7-14.3-32-32-32h-704c-17.7 0-32 14.3-32 32v464L67.9 845.1C60.4 866 75.8 888 98 888h828.8c22.2 0 37.6-22 30.1-42.9zM200.4 208h624v395h-624V208zm228.3 608l8.1-37h150.3l8.1 37H428.7zm224 0l-19.1-86.7c-.8-3.7-4.1-6.3-7.8-6.3H398.2c-3.8 0-7 2.6-7.8 6.3L371.3 816H151l42.3-149h638.2l42.3 149H652.7z`}}]},name:`laptop`,theme:`outlined`}})),a=e(n()),o=e(i());function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s.apply(this,arguments)}var c=a.forwardRef((e,t)=>a.createElement(r,s({},e,{ref:t,icon:o.default}))),l=e(t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M832 112H724V72c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v40H500V72c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v40H320c-17.7 0-32 14.3-32 32v120h-96c-17.7 0-32 14.3-32 32v632c0 17.7 14.3 32 32 32h512c17.7 0 32-14.3 32-32v-96h96c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zM664 888H232V336h218v174c0 22.1 17.9 40 40 40h174v338zm0-402H514V336h.2L664 485.8v.2zm128 274h-56V456L544 264H360v-80h68v32c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-32h152v32c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-32h68v576z`}}]},name:`snippets`,theme:`outlined`}}))());function u(){return u=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u.apply(this,arguments)}var d=a.forwardRef((e,t)=>a.createElement(r,u({},e,{ref:t,icon:l.default}))),f=e(t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M400 317.7h73.9V656c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V317.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 163a8 8 0 00-12.6 0l-112 141.7c-4.1 5.3-.4 13 6.3 13zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z`}}]},name:`upload`,theme:`outlined`}}))());function p(){return p=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},p.apply(this,arguments)}var m=a.forwardRef((e,t)=>a.createElement(r,p({},e,{ref:t,icon:f.default})));export{d as n,c as r,m as t};
|
||||
@@ -1 +0,0 @@
|
||||
import{i as e,t}from"./rolldown-runtime-BgaNhQyE.js";import{Dr as n,Ft as r}from"./jsx-runtime-CRBytmvs.js";var i=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M858.5 763.6a374 374 0 00-80.6-119.5 375.63 375.63 0 00-119.5-80.6c-.4-.2-.8-.3-1.2-.5C719.5 518 760 444.7 760 362c0-137-111-248-248-248S264 225 264 362c0 82.7 40.5 156 102.8 201.1-.4.2-.8.3-1.2.5-44.8 18.9-85 46-119.5 80.6a375.63 375.63 0 00-80.6 119.5A371.7 371.7 0 00136 901.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8 2-77.2 33-149.5 87.8-204.3 56.7-56.7 132-87.9 212.2-87.9s155.5 31.2 212.2 87.9C779 752.7 810 825 812 902.2c.1 4.4 3.6 7.8 8 7.8h60a8 8 0 008-8.2c-1-47.8-10.9-94.3-29.5-138.2zM512 534c-45.9 0-89.1-17.9-121.6-50.4S340 407.9 340 362c0-45.9 17.9-89.1 50.4-121.6S466.1 190 512 190s89.1 17.9 121.6 50.4S684 316.1 684 362c0 45.9-17.9 89.1-50.4 121.6S557.9 534 512 534z`}}]},name:`user`,theme:`outlined`}})),a=e(n()),o=e(i());function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s.apply(this,arguments)}var c=a.forwardRef((e,t)=>a.createElement(r,s({},e,{ref:t,icon:o.default})));export{c as t};
|
||||
@@ -1 +0,0 @@
|
||||
import{i as e,t}from"./rolldown-runtime-BgaNhQyE.js";import{Dr as n,Ft as r}from"./jsx-runtime-CRBytmvs.js";var i=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`0 0 1024 1024`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M922.9 701.9H327.4l29.9-60.9 496.8-.9c16.8 0 31.2-12 34.2-28.6l68.8-385.1c1.8-10.1-.9-20.5-7.5-28.4a34.99 34.99 0 00-26.6-12.5l-632-2.1-5.4-25.4c-3.4-16.2-18-28-34.6-28H96.5a35.3 35.3 0 100 70.6h125.9L246 312.8l58.1 281.3-74.8 122.1a34.96 34.96 0 00-3 36.8c6 11.9 18.1 19.4 31.5 19.4h62.8a102.43 102.43 0 00-20.6 61.7c0 56.6 46 102.6 102.6 102.6s102.6-46 102.6-102.6c0-22.3-7.4-44-20.6-61.7h161.1a102.43 102.43 0 00-20.6 61.7c0 56.6 46 102.6 102.6 102.6s102.6-46 102.6-102.6c0-22.3-7.4-44-20.6-61.7H923c19.4 0 35.3-15.8 35.3-35.3a35.42 35.42 0 00-35.4-35.2zM305.7 253l575.8 1.9-56.4 315.8-452.3.8L305.7 253zm96.9 612.7c-17.4 0-31.6-14.2-31.6-31.6 0-17.4 14.2-31.6 31.6-31.6s31.6 14.2 31.6 31.6a31.6 31.6 0 01-31.6 31.6zm325.1 0c-17.4 0-31.6-14.2-31.6-31.6 0-17.4 14.2-31.6 31.6-31.6s31.6 14.2 31.6 31.6a31.6 31.6 0 01-31.6 31.6z`}}]},name:`shopping-cart`,theme:`outlined`}})),a=e(n()),o=e(i());function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s.apply(this,arguments)}var c=a.forwardRef((e,t)=>a.createElement(r,s({},e,{ref:t,icon:o.default}))),l=e(t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{"fill-rule":`evenodd`,viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M608 192a32 32 0 0132 32v160h174.81a32 32 0 0126.68 14.33l113.19 170.84a32 32 0 015.32 17.68V672a32 32 0 01-32 32h-96c0 70.7-57.3 128-128 128s-128-57.3-128-128H384c0 70.7-57.3 128-128 128s-128-57.3-128-128H96a32 32 0 01-32-32V224a32 32 0 0132-32zM256 640a64 64 0 000 128h1.06A64 64 0 00256 640m448 0a64 64 0 000 128h1.06A64 64 0 00704 640M576 256H128v384h17.12c22.13-38.26 63.5-64 110.88-64 47.38 0 88.75 25.74 110.88 64H576zm221.63 192H640v145.12A127.43 127.43 0 01704 576c47.38 0 88.75 25.74 110.88 64H896v-43.52zM500 448a12 12 0 0112 12v40a12 12 0 01-12 12H332a12 12 0 01-12-12v-40a12 12 0 0112-12zM308 320a12 12 0 0112 12v40a12 12 0 01-12 12H204a12 12 0 01-12-12v-40a12 12 0 0112-12z`}}]},name:`truck`,theme:`outlined`}}))());function u(){return u=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u.apply(this,arguments)}var d=a.forwardRef((e,t)=>a.createElement(r,u({},e,{ref:t,icon:l.default}))),f=e(t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 464H528V448h312v128zm0 264H184V184h656v200H496c-17.7 0-32 14.3-32 32v192c0 17.7 14.3 32 32 32h344v200zM580 512a40 40 0 1080 0 40 40 0 10-80 0z`}}]},name:`wallet`,theme:`outlined`}}))());function p(){return p=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},p.apply(this,arguments)}var m=a.forwardRef((e,t)=>a.createElement(r,p({},e,{ref:t,icon:f.default})));export{d as n,c as r,m as t};
|
||||
@@ -1 +0,0 @@
|
||||
import{i as e,t}from"./rolldown-runtime-BgaNhQyE.js";import{Dr as n,Ft as r}from"./jsx-runtime-CRBytmvs.js";var i=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M955.7 856l-416-720c-6.2-10.7-16.9-16-27.7-16s-21.6 5.3-27.7 16l-416 720C56 877.4 71.4 904 96 904h832c24.6 0 40-26.6 27.7-48zM480 416c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v184c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V416zm32 352a48.01 48.01 0 010-96 48.01 48.01 0 010 96z`}}]},name:`warning`,theme:`filled`}})),a=e(n()),o=e(i());function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s.apply(this,arguments)}var c=a.forwardRef((e,t)=>a.createElement(r,s({},e,{ref:t,icon:o.default})));export{c as t};
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +0,0 @@
|
||||
import{i as e}from"./rolldown-runtime-BgaNhQyE.js";import{Dr as t,t as n}from"./jsx-runtime-CRBytmvs.js";import{o as r}from"./chunk-KS7C4IRE-Zm15rq6F.js";import{t as i}from"./typography-DRFhazK9.js";import{t as a}from"./tooltip-SaeG1Uv7.js";import{t as o}from"./space-Cu4QVMgQ.js";import{t as s}from"./button-BILozH6U.js";import{t as c}from"./app-Bntg8WFU.js";import{t as l}from"./empty-_1ZFK8yy.js";import{t as u}from"./avatar-DPxbCsa4.js";import{t as d}from"./card-DU2T2-YW.js";import{t as f}from"./spin-CfJYIffX.js";import{t as p}from"./switch--LhkZymx.js";import{t as m}from"./tag-DBV1bHre.js";import{t as h}from"./theme-D5FZSALB.js";import{t as g}from"./useTranslation-DBl6NYjI.js";import{n as _,r as v}from"./agent-CCozney_.js";var y=e(t(),1),b=n(),{Title:x,Text:S,Paragraph:C}=i;function w(){let{t:e}=g(),{token:t}=h.useToken(),{message:n}=c.useApp(),i=r(),[w,T]=(0,y.useState)([]),[E,D]=(0,y.useState)(!1),O=(0,y.useCallback)(async()=>{D(!0);try{let e=await _();T(e.data.data??[])}finally{D(!1)}},[]);(0,y.useEffect)(()=>{O()},[O]);let k=async(t,r)=>{try{await v(t,{enabled:r}),T(e=>e.map(e=>e.id===t?{...e,enabled:r}:e)),n.success(e(`ai.agent.update.success`))}catch{n.error(e(`ai.agent.update.failed`))}};return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`flex-start`,marginBottom:t.marginLG},children:(0,b.jsxs)(`div`,{children:[(0,b.jsx)(x,{level:3,style:{marginBottom:t.marginXS},children:e(`ai.agent.page.title`)}),(0,b.jsx)(S,{type:`secondary`,children:e(`ai.agent.page.description`)})]})}),(0,b.jsx)(f,{spinning:E,children:w.length>0?(0,b.jsx)(`div`,{className:`flex flex-wrap gap-6`,children:w.map(n=>(0,b.jsx)(a,{title:n.description,children:(0,b.jsxs)(d,{hoverable:!0,variant:`borderless`,styles:{body:{width:300,padding:20,overflow:`hidden`}},children:[(0,b.jsxs)(`div`,{className:`flex justify-between items-center mb-2.5`,children:[(0,b.jsxs)(o,{align:`center`,children:[(0,b.jsx)(u,{src:n.icon,size:32}),(0,b.jsx)(`span`,{style:{fontWeight:700,fontSize:18},children:n.name})]}),(0,b.jsx)(p,{checked:n.enabled,size:`small`,onChange:e=>k(n.id,e)})]}),(0,b.jsx)(C,{type:`secondary`,ellipsis:{rows:2},style:{marginBottom:t.marginSM},children:n.description}),(0,b.jsx)(o,{size:[4,4],wrap:!0,children:n.tags?.map(e=>(0,b.jsx)(m,{color:`blue`,children:e},e))}),(0,b.jsx)(`div`,{style:{marginTop:t.marginSM},children:(0,b.jsx)(s,{type:`primary`,size:`small`,block:!0,onClick:()=>i(`/ai/chat?agent_id=${n.id}`),children:e(`ai.agent.goChat`)})})]})}))}):(0,b.jsx)(l,{description:e(`ai.agent.empty`)})})]})}export{w as default};
|
||||
@@ -1 +0,0 @@
|
||||
import{t as e}from"./request--UCyt0wo.js";async function t(){return e({url:`/ai/agent`,method:`get`})}async function n(t){return e({url:`/ai/agent/${t}`,method:`get`})}async function r(t,n){return e({url:`/ai/agent/${t}`,method:`put`,data:n})}export{t as n,r,n as t};
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +0,0 @@
|
||||
import{i as e}from"./rolldown-runtime-BgaNhQyE.js";import{Dr as t,Et as n,Ln as r,Ot as i,Tt as a,Vn as o,Wt as s,bt as c,nt as l,xt as u,yt as d,zn as f}from"./jsx-runtime-CRBytmvs.js";import{w as p}from"./tooltip-SaeG1Uv7.js";import{t as m}from"./CheckCircleFilled-DcF3PzkE.js";import{t as h}from"./CloseCircleFilled-C_pAsEWy.js";import{r as g}from"./PlusOutlined-B8K2rG8r.js";import{t as _}from"./ExclamationCircleFilled-B0FwC6ZE.js";import{_ as v,d as y,f as b,g as x,i as S,l as C,m as w,n as T,p as E,t as D,u as O}from"./context-D6bvp8kb.js";import{n as k,t as A}from"./useClosable-BLB2IUFV.js";import{t as j}from"./useModal-uyHD1DJx.js";var M=e(t()),N={info:M.createElement(v,null),success:M.createElement(m,null),error:M.createElement(h,null),warning:M.createElement(_,null),loading:M.createElement(l,null)};function P(e,t){return t===null||t===!1?null:t||M.createElement(g,{className:`${e}-close-icon`})}var F=4.5,I=`topRight`,L={offset:8},R=({children:e,prefixCls:t})=>{let n=d(t),[r,i]=C(t,n);return M.createElement(x,{classNames:{list:o(r,i,n)}},e)},z=(e,{prefixCls:t,key:n})=>M.createElement(R,{prefixCls:t,key:n},e),B=M.forwardRef((e,t)=>{let{top:n,bottom:i,prefixCls:s,getContainer:c,maxCount:l,rtl:d,onAllRemoved:p,stack:m,duration:h=F,pauseOnHover:g=!0,showProgress:_}=e,{getPrefixCls:v,getPopupContainer:x,direction:S}=f(`notification`),{notification:C}=(0,M.useContext)(r),T=s||v(`notification`),D=(0,M.useMemo)(()=>a(h)&&h>0?h:!1,[h]),[O,k]=u([C?.classNames,e?.classNames],[C?.styles,e?.styles],{props:e}),A=()=>b(n,i),j=()=>o({[`${T}-rtl`]:d??S===`rtl`}),N=()=>y(T),I=E(m,L),[R,B]=w({prefixCls:T,style:A,className:j,motion:N,closable:{closeIcon:P(T)},duration:D,getContainer:()=>c?.()||x?.()||document.body,maxCount:l,pauseOnHover:g,showProgress:_,classNames:O,styles:k,onAllRemoved:p,renderNotifications:z,stack:I});return M.useImperativeHandle(t,()=>({...R,prefixCls:T,notification:C})),B});function V(e){let t=M.useRef(null);p(`Notification`);let{notification:a}=M.useContext(r);return[M.useMemo(()=>{let r=r=>{if(!t.current)return;let{open:s,prefixCls:l,notification:u}=t.current,d=u?.className||{},f=u?.style||{},p=`${l}-notice`,{title:m,message:h,description:g,icon:_,type:v,btn:y,actions:b,className:x,style:S,role:C=`alert`,closeIcon:w,closable:T,classNames:E={},styles:D={},...j}=r,M=m??h,F=i(M),L=b??y,R=P(p,O(w,e,u)),[z,B,,V]=A(k({...e||{},...r}),k(a),{closable:!0,closeIcon:R}),H=z?{onClose:n(T)?T.onClose:void 0,closeIcon:B,...V}:!1,U=c(E,{props:r}),W=c(D,{props:r}),G=_||(v?N[v]:null),K=!_&&v?`${p}-icon-${v}`:void 0;return s({placement:e?.placement??I,...j,title:F?M:null,description:g,icon:G,actions:L,role:C,classNames:{...U,icon:o(K,U.icon)},styles:{...W,root:{...f,...W.root}},className:o({[`${p}-${v}`]:v},x,d),style:S,closable:H})},s={open:r,destroy:e=>{e===void 0?t.current?.destroy():t.current?.close(e)}};return[`success`,`info`,`warning`,`error`].forEach(e=>{s[e]=t=>r({...t,type:e})}),s},[e,a]),M.createElement(B,{key:`notification-holder`,...e,ref:t})]}function H(e){return V(e)}var U=s(`App`,e=>{let{componentCls:t,colorText:n,fontSize:r,lineHeight:i,fontFamily:a}=e;return{[t]:{color:n,fontSize:r,lineHeight:i,fontFamily:a,[`&${t}-rtl`]:{direction:`rtl`}}}},()=>({})),W=M.forwardRef((e,t)=>{let{prefixCls:n,children:r,className:i,rootClassName:a,message:s,notification:c,style:l,component:u=`div`}=e,{direction:d,getPrefixCls:m,className:h,style:g}=f(`app`),_=m(`app`,n),[v,y]=U(_),b=o(v,_,i,a,y,{[`${_}-rtl`]:d===`rtl`}),x=(0,M.useContext)(D),C=M.useMemo(()=>({message:{...x.message,...s},notification:{...x.notification,...c}}),[s,c,x.message,x.notification]),[w,E]=S(C.message),[O,k]=H(C.notification),[A,N]=j(),P=M.useMemo(()=>({message:w,notification:O,modal:A}),[w,O,A]);p(`App`)(!(y&&u===!1),`usage`,"When using cssVar, ensure `component` is assigned a valid React component string."),p(`App`)(!t||u!==!1,`usage`,"`ref` is not supported when `component` is `false`. Please provide a valid `component` instead.");let F=u===!1?M.Fragment:u,I={className:o(h,b),style:{...g,...l}};return M.createElement(T.Provider,{value:P},M.createElement(D.Provider,{value:C},M.createElement(F,{...u===!1?void 0:{...I,ref:t}},N,E,k,r)))}),G=()=>M.useContext(T),K=W;K.useApp=G;export{K as t};
|
||||
@@ -1 +0,0 @@
|
||||
import{i as e}from"./rolldown-runtime-BgaNhQyE.js";import{Dr as t,Et as n,Hn as r,Jn as i,Ln as a,Pn as o,Q as s,Tt as c,Vn as l,Wt as u,Zt as d,lr as f,st as p,xn as m,yt as h,zn as g}from"./jsx-runtime-CRBytmvs.js";import{r as _,t as v}from"./useBreakpoint-DLqc4AYE.js";import{t as y}from"./popover-BGq_MyT2.js";var b=e(t()),x=b.createContext({}),S=e=>{let{antCls:t,componentCls:n,iconCls:r,avatarBg:i,avatarColor:a,containerSize:s,containerSizeLG:c,containerSizeSM:l,textFontSize:u,textFontSizeLG:f,textFontSizeSM:p,iconFontSize:m,iconFontSizeLG:h,iconFontSizeSM:g,borderRadius:_,borderRadiusLG:v,borderRadiusSM:y,lineWidth:b,lineType:x}=e,S=(e,t,i,a)=>({width:e,height:e,borderRadius:`50%`,fontSize:t,[`&${n}-square`]:{borderRadius:a},[`&${n}-icon`]:{fontSize:i,[`> ${r}`]:{margin:0}}});return{[n]:{...d(e),position:`relative`,display:`inline-flex`,justifyContent:`center`,alignItems:`center`,overflow:`hidden`,color:a,whiteSpace:`nowrap`,textAlign:`center`,verticalAlign:`middle`,background:i,border:`${o(b)} ${x} transparent`,"&-image":{background:`transparent`},[`${t}-image-img`]:{display:`block`},...S(s,u,m,_),"&-lg":{...S(c,f,h,v)},"&-sm":{...S(l,p,g,y)},"> img":{display:`block`,width:`100%`,height:`100%`,objectFit:`cover`}}}},C=e=>{let{componentCls:t,groupBorderColor:n,groupOverlapping:r,groupSpace:i}=e;return{[`${t}-group`]:{display:`inline-flex`,[t]:{borderColor:n},"> *:not(:first-child)":{marginInlineStart:r}},[`${t}-group-popover`]:{[`${t} + ${t}`]:{marginInlineStart:i}}}},w=u(`Avatar`,e=>{let{colorTextLightSolid:t,colorTextPlaceholder:n}=e,r=m(e,{avatarBg:n,avatarColor:t});return[S(r),C(r)]},e=>{let{controlHeight:t,controlHeightLG:n,controlHeightSM:r,fontSize:i,fontSizeLG:a,fontSizeXL:o,fontSizeHeading3:s,marginXS:c,marginXXS:l,colorBorderBg:u}=e;return{containerSize:t,containerSizeLG:n,containerSizeSM:r,textFontSize:i,textFontSizeLG:i,textFontSizeSM:i,iconFontSize:Math.round((a+o)/2),iconFontSizeLG:s,iconFontSizeSM:i,groupSpace:l,groupOverlapping:-c,groupBorderColor:u}}),T=b.forwardRef((e,t)=>{let{prefixCls:i,shape:a,size:o,src:u,srcSet:d,icon:p,className:m,rootClassName:y,style:S,alt:C,draggable:T,children:E,crossOrigin:D,gap:O=4,onError:k,...A}=e,[j,M]=b.useState(1),[N,P]=b.useState(!1),[F,I]=b.useState(!0),L=b.useRef(null),R=b.useRef(null),z=f(t,L),{getPrefixCls:B,className:V,style:H}=g(`avatar`),U=b.useContext(x),W=()=>{if(!R.current||!L.current)return;let e=R.current.offsetWidth,t=L.current.offsetWidth;e!==0&&t!==0&&O*2<t&&M(t-O*2<e?(t-O*2)/e:1)};b.useEffect(()=>{P(!0)},[]),b.useEffect(()=>{I(!0),M(1)},[u]),b.useEffect(W,[O]);let G=()=>{k?.()!==!1&&I(!1)},K=s(e=>o??U?.size??e??`medium`),q=v(Object.keys(n(K)&&K||{}).some(e=>_.includes(e))),J=b.useMemo(()=>{if(!n(K))return{};let e=_.find(e=>q[e]),t=K[e];return t?{width:t,height:t,fontSize:t&&(p||E)?t/2:18}:{}},[q,K,p,E]),Y=B(`avatar`,i),X=h(Y),[Z,ee]=w(Y,X),te=l({[`${Y}-lg`]:K===`large`,[`${Y}-sm`]:K===`small`}),Q=b.isValidElement(u),ne=l(Y,te,V,`${Y}-${a||U?.shape||`circle`}`,{[`${Y}-image`]:Q||u&&F,[`${Y}-icon`]:!!p},ee,X,m,y,Z),re=c(K)?{width:K,height:K,fontSize:p?K/2:18}:{},$;if(typeof u==`string`&&F)$=b.createElement(`img`,{src:u,draggable:T,srcSet:d,onError:G,alt:C,crossOrigin:D});else if(Q)$=u;else if(p)$=p;else if(N||j!==1){let e=`scale(${j})`,t={msTransform:e,WebkitTransform:e,transform:e};$=b.createElement(r,{onResize:W},b.createElement(`span`,{className:`${Y}-string`,ref:R,style:t},E))}else $=b.createElement(`span`,{className:`${Y}-string`,style:{opacity:0},ref:R},E);return b.createElement(`span`,{...A,style:{...re,...J,...H,...S},className:ne,ref:z},$)}),E=e=>{let{size:t,shape:n}=b.useContext(x),r=b.useMemo(()=>({size:e.size||t,shape:e.shape||n}),[e.size,e.shape,t,n]);return b.createElement(x.Provider,{value:r},e.children)},D=e=>{let{getPrefixCls:t,direction:n}=b.useContext(a),{prefixCls:r,className:o,rootClassName:s,style:c,maxCount:u,maxStyle:d,size:f,shape:m,maxPopoverPlacement:g,maxPopoverTrigger:_,children:v,max:x}=e,S=t(`avatar`,r),C=`${S}-group`,D=h(S),[O,k]=w(S,D),A=l(C,{[`${C}-rtl`]:n===`rtl`},k,D,o,s,O),j=i(v).map((e,t)=>p(e,{key:`avatar-key-${t}`})),M=x?.count||u,N=j.length;if(M&&M<N){let e=j.slice(0,M),t=j.slice(M,N),n=x?.style||d,r=x?.popover?.trigger||_||`hover`,i=x?.popover?.placement||g||`top`,a={content:t,...x?.popover,placement:i,trigger:r,rootClassName:l(`${C}-popover`,x?.popover?.rootClassName)};return e.push(b.createElement(y,{key:`avatar-popover-key`,destroyOnHidden:!0,...a},b.createElement(T,{style:n},`+${N-M}`))),b.createElement(E,{shape:m,size:f},b.createElement(`div`,{className:A,style:c},e))}return b.createElement(E,{shape:m,size:f},b.createElement(`div`,{className:A,style:c},j))},O=T;O.Group=D;export{O as t};
|
||||
File diff suppressed because one or more lines are too long
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user