小程序登录优化

This commit is contained in:
liu
2026-08-10 08:55:22 +08:00
parent c6f69c5c55
commit df7631c7a9
25 changed files with 954 additions and 549 deletions
-14
View File
@@ -29,9 +29,7 @@ class UserModelFactory extends Factory
'unionid' => '',
'phone' => '',
'avatar' => '',
'type' => UserModel::TYPE_PENDING,
'store_id' => 0,
'supplier_id' => 0,
'status' => UserModel::STATUS_NORMAL,
'last_login_at' => null,
];
@@ -43,22 +41,10 @@ class UserModelFactory extends Factory
public function forStore(int $storeId): static
{
return $this->state(fn () => [
'type' => UserModel::TYPE_STORE,
'store_id' => $storeId,
]);
}
/**
* 已绑定供应商的供应商用户
*/
public function forSupplier(int $supplierId): static
{
return $this->state(fn () => [
'type' => UserModel::TYPE_SUPPLIER,
'supplier_id' => $supplierId,
]);
}
/**
* 停用账号
*/