Commit 5fab8c61 by lujunyi

默认密码同手机号

parent 936755af
......@@ -23,7 +23,6 @@
use Dcat\Admin\Widgets\Alert;
use Dcat\EasyExcel\Excel;
use Illuminate\Http\Request;
use Illuminate\Support\Str;
// 药店
class PharmacyController extends AdminController
......@@ -250,7 +249,7 @@ protected function form()
$admin = new Administrator();
$admin->username = $mobile; // 药店手机号作为管理员账号
$admin->name = $name; // 药店名称当做用户的姓名
$admin->password = bcrypt(Str::random(10)); // 设置管理员密码
$admin->password = bcrypt($mobile); // 设置管理员密码,默认同手机号
$admin->pharmacy_id = $pharmacyId; // 药店ID
$admin->save(); // 保存新管理员
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment