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(); $old_user = User::where('phone', $phone)->where('status', User::STATUS_ACTIVE)->where('id', '!=', $user->id)->first();
if ($old_user) { if ($old_user) {
// 禁用新用户 // 禁用新用户
// throw new BizException('手机号已经注册'); throw new BizException('手机号已经注册');
// $user->update([ // $user->update([
// 'phone' => '', // 'phone' => '',
// 'status' => User::STATUS_DISABLED, // 'status' => User::STATUS_DISABLED,
// 'status_remark' => '手机号重复: ' . $phone // 'status_remark' => '手机号重复: ' . $phone
// ]); // ]);
$user = $old_user; // $user = $old_user;
} else { } else {
$user->update([ $user->update([
'phone' => $phone, 'phone' => $phone,

View File

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