移除地区的校验,不需要填地区

This commit is contained in:
2026-07-27 12:18:03 +08:00
parent 25f2ba4c03
commit c4ec7828bd
10 changed files with 25 additions and 223 deletions

View File

@@ -1221,11 +1221,10 @@ SQL;
$phone = trim(strval($request->post('phone', '')));
$receiverName = trim(strval($request->post('receiver_name', '')));
$region = MallAddress::normalizeRegion($request->post('region', ''));
$detailAddress = trim(strval($request->post('detail_address', '')));
$defaultSetting = strval($request->post('default_setting', '0')) === '1' ? 1 : 0;
if ($phone === '' || $receiverName === '' || $detailAddress === '' || $region === '' || $region === null) {
if ($phone === '' || $receiverName === '' || $detailAddress === '') {
return $this->error(__('Missing required fields'));
}
@@ -1239,7 +1238,6 @@ SQL;
'playx_user_asset_id' => $assetId,
'receiver_name' => $receiverName,
'phone' => $phone,
'region' => $region,
'detail_address' => $detailAddress,
'default_setting' => $defaultSetting,
'create_time' => time(),
@@ -1290,9 +1288,6 @@ SQL;
if ($request->post('receiver_name', null) !== null) {
$updates['receiver_name'] = trim(strval($request->post('receiver_name', '')));
}
if ($request->post('region', null) !== null) {
$updates['region'] = MallAddress::normalizeRegion($request->post('region', ''));
}
if ($request->post('detail_address', null) !== null) {
$updates['detail_address'] = trim(strval($request->post('detail_address', '')));
}