diff --git a/app/Http/Admin/Services/User.php b/app/Http/Admin/Services/User.php index 5595d59b..22e4f258 100644 --- a/app/Http/Admin/Services/User.php +++ b/app/Http/Admin/Services/User.php @@ -5,6 +5,7 @@ namespace App\Http\Admin\Services; use App\Builders\UserList as UserListBuilder; use App\Caches\User as UserCache; use App\Library\Paginator\Query as PaginateQuery; +use App\Library\Utils\Password as PasswordUtil; use App\Models\Account as AccountModel; use App\Models\User as UserModel; use App\Repos\Account as AccountRepo; @@ -69,7 +70,11 @@ class User extends Service $account = new AccountModel(); + $salt = PasswordUtil::salt(); + $password = PasswordUtil::hash($password, $salt); + $account->phone = $phone; + $account->salt = $salt; $account->password = $password; $account->create(); @@ -191,7 +196,9 @@ class User extends Service } if (!empty($post['password'])) { - $data['password'] = $validator->checkPassword($post['password']); + $post['password'] = $validator->checkPassword($post['password']); + $data['salt'] = PasswordUtil::salt(); + $data['password'] = PasswordUtil::hash($post['password'], $data['salt']); } $account->update($data); diff --git a/app/Http/Admin/Views/order/macro.volt b/app/Http/Admin/Views/order/macro.volt index e7b73190..c2455b6b 100644 --- a/app/Http/Admin/Views/order/macro.volt +++ b/app/Http/Admin/Views/order/macro.volt @@ -44,7 +44,7 @@ {% elseif value == 'vip' %} 会员 {% elseif value == 'reward' %} - 打赏 + 赞赏 {% elseif value == 'test' %} 测试 {% endif %} diff --git a/app/Http/Admin/Views/order/search.volt b/app/Http/Admin/Views/order/search.volt index b637425d..42ae4f38 100644 --- a/app/Http/Admin/Views/order/search.volt +++ b/app/Http/Admin/Views/order/search.volt @@ -23,7 +23,7 @@