6
0
Fork 0
release
panliang 2022-06-10 15:46:44 +08:00
parent 2a2c467291
commit 8cddb906f5
2 changed files with 3 additions and 3 deletions

View File

@ -112,13 +112,13 @@ class MiniprogramController extends Controller
$old_user = User::where('phone', $phone)->where('status', User::STATUS_ACTIVE)->where('id', '!=', $user->id)->first();
if ($old_user) {
// 禁用新用户
// throw new BizException('手机号已经注册');
throw new BizException('手机号已经注册');
// $user->update([
// 'phone' => '',
// 'status' => User::STATUS_DISABLED,
// 'status_remark' => '手机号重复: ' . $phone
// ]);
$user = $old_user;
// $user = $old_user;
} else {
$user->update([
'phone' => $phone,

View File

@ -66,7 +66,7 @@ class ProductSkuController extends Controller
$user = $request->user();
$spu = ProductSpu::with(['specs', 'features'])->findOrFail($id);
$sku = $spu->skus()->with(['buynote'])->online()->first();
$sku = $spu->skus()->with(['buynote', 'spu'])->online()->first();
if (!$sku) {
throw new BizException('商品sku未上架');
}