Commit 790ca82a by 赵增煜
parents f5b20fd2 144f5313
......@@ -40,6 +40,11 @@ protected function grid()
$grid->column('is_open')->using(PharmacyModel::IS_OPEN_MAP)->help('药店控制')->dot(PharmacyModel::IS_OPEN_MAP_COLOR);
$grid->column('is_auto')->using(PharmacyModel::IS_AUTO_MAP)->dot(PharmacyModel::IS_AUTO_MAP_COLOR);
$grid->column('name');
$grid->column('药师数量')->display(function () {
$num = PharmacistModel::where('pharmacy_id', $this->id)->count();
return $num;
});
// $grid->column('business_license')->image('', 50, 50);
// $grid->column('drug_biz_license')->image('', 50, 50);
// $grid->column('food_biz_license')->image('', 50, 50);
......
......@@ -49,7 +49,7 @@ public function upload(Request $request)
// 签名图片地址记录到数据库
$authInfo = auth('api')->user();
$doctor = DoctorModel::where('user_id', $authInfo->id)->first();
$doctor->signed_pic = $imageUrl;
$doctor->signed_pic = $path;
if ($doctor->save()) {
return $this->success(['message' => 'ok', 'url' => $imageUrl]);
......
......@@ -185,7 +185,7 @@ public function upload(Request $request)
$imageUrl = Storage::url($path);
// 签名图片地址记录到数据库
$pharmacist->signed_pic = $imageUrl;
$pharmacist->signed_pic = $path;
if ($pharmacist->save()) {
return $this->success(['message' => 'ok', 'url' => $imageUrl]);
}
......
......@@ -116,6 +116,7 @@ public function create(Request $request)
$pharmacy_id = $pharmacy->id;
$open_source = 1;
} elseif ($authInfo->last_login_type == User::LOGIN_TYPE_USER) {
return $this->failed('用户端暂时无法开处方');
$pharmacy = PharmacyModel::find($pharmacy_id);
if (! $pharmacy) {
return $this->failed('药店信息不存在');
......
......@@ -19,7 +19,7 @@ TZ=Asia/Shanghai
#
# 每分钟检测一次服务是否正常运行
* * * * * root /bin/date "+%Y-%m-%d %H:%M:%S" >> /tmp/test-crontab.log 2>&1
* * * * * www-data /bin/date "+%Y-%m-%d %H:%M:%S" >> /tmp/test-crontab.log 2>&1
* * * * * root /var/www/artisan schedule:run >> /tmp/schedule-run.log 2>&1
* * * * * www-data /var/www/artisan schedule:run >> /tmp/schedule-run.log 2>&1
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