mirror of
https://gitee.com/zongzhige/shopxo.git
synced 2024-11-29 18:39:16 +08:00
地址优化
This commit is contained in:
parent
234d207873
commit
b32b948197
@ -77,10 +77,8 @@ class UserAddress extends Common
|
||||
// 关闭头尾
|
||||
'is_header' => 0,
|
||||
'is_footer' => 0,
|
||||
|
||||
// 加载地图
|
||||
'is_load_map_api' => MyC('home_user_address_map_status'),
|
||||
|
||||
// 编辑器文件存放地址
|
||||
'editor_path_type' => ResourcesService::EditorPathTypeValue(UserAddressService::EditorAttachmentPathType($this->user['id'])),
|
||||
];
|
||||
|
@ -52,15 +52,15 @@
|
||||
{{if MyC('home_user_address_idcard_status') eq 1}}
|
||||
<div class="am-alert am-alert-secondary">
|
||||
<div class="am-form-group">
|
||||
<label>{{:MyLang('common_service.useraddress.form_item_idcard_name')}}<span class="am-form-group-label-tips">{{:MyLang('common_service.useraddress.form_item_idcard_name_tips')}}</span></label>
|
||||
<label>{{:MyLang('common_service.useraddress.form_item_idcard_name')}}<span class="am-form-group-label-tips-must">*</span><span class="am-form-group-label-tips">{{:MyLang('common_service.useraddress.form_item_idcard_name_tips')}}</span></label>
|
||||
<input type="text" name="idcard_name" placeholder="{{:MyLang('common_service.useraddress.form_item_idcard_name')}}" minlength="0" maxlength="16" data-validation-message="{{:MyLang('common_service.useraddress.form_item_idcard_name_message')}}" class="am-radius" {{if !empty($data['idcard_name'])}} value="{{$data.idcard_name}}"{{/if}} />
|
||||
</div>
|
||||
<div class="am-form-group">
|
||||
<label>{{:MyLang('common_service.useraddress.form_item_idcard_number')}}<span class="am-form-group-label-tips">{{:MyLang('common_service.useraddress.form_item_idcard_number_tips')}}</span></label>
|
||||
<label>{{:MyLang('common_service.useraddress.form_item_idcard_number')}}<span class="am-form-group-label-tips-must">*</span><span class="am-form-group-label-tips">{{:MyLang('common_service.useraddress.form_item_idcard_number_tips')}}</span></label>
|
||||
<input type="text" name="idcard_number" placeholder="{{:MyLang('common_service.useraddress.form_item_idcard_number')}}" minlength="0" maxlength="18" data-validation-message="{{:MyLang('common_service.useraddress.form_item_idcard_number_message')}}" class="am-radius" {{if !empty($data['idcard_number'])}} value="{{$data.idcard_number}}"{{/if}} />
|
||||
</div>
|
||||
<div class="am-form-group plug-file-upload-view">
|
||||
<label>{{:MyLang('common_service.useraddress.form_item_idcard_images')}}<span class="am-form-group-label-tips">{{:MyLang('common_service.useraddress.form_item_idcard_images_tips')}}</span></label>
|
||||
<label>{{:MyLang('common_service.useraddress.form_item_idcard_images')}}<span class="am-form-group-label-tips-must">*</span><span class="am-form-group-label-tips">{{:MyLang('common_service.useraddress.form_item_idcard_images_tips')}}</span></label>
|
||||
<div class="am-nbfc user-address-idcard-images">
|
||||
<div class="am-fl">
|
||||
<ul class="plug-file-upload-view images-idcard_front" data-form-name="idcard_front" data-max-number="1" data-dialog-type="images">
|
||||
|
@ -2146,13 +2146,13 @@ return [
|
||||
'form_item_address' => 'Detailed Address',
|
||||
'form_item_address_message' => 'Detailed address format is between 1 and 80 characters',
|
||||
'form_item_idcard_name' => 'ID Card Name',
|
||||
'form_item_idcard_name_tips' => 'Optional, please be consistent with the uploaded ID name',
|
||||
'form_item_idcard_name_tips' => 'please be consistent with the uploaded ID name',
|
||||
'form_item_idcard_name_message' => 'The name format of ID card can be up to 16 characters',
|
||||
'form_item_idcard_number' => 'ID No',
|
||||
'form_item_idcard_number_tips' => 'Optional, please be consistent with the uploaded ID number',
|
||||
'form_item_idcard_number_tips' => 'please be consistent with the uploaded ID number',
|
||||
'form_item_idcard_number_message' => 'ID card number format can be up to 18 characters',
|
||||
'form_item_idcard_images' => 'ID Card Photo',
|
||||
'form_item_idcard_images_tips' => 'For selective transmission, please use the original ID card to shoot, and the picture should be clear',
|
||||
'form_item_idcard_images_tips' => 'Please use the original ID card to shoot, and the picture should be clear',
|
||||
'form_item_idcard_front_button_name' => 'Upload IDCard Front Pictures',
|
||||
'form_item_idcard_back_button_name' => 'Upload IDCard Back Pictures',
|
||||
'form_item_idcard_no_user_tips' => 'Associate users before uploading ID card images',
|
||||
|
@ -2152,13 +2152,13 @@ return [
|
||||
'form_item_address' => '详细地址',
|
||||
'form_item_address_message' => '详细地址格式1~80个字符之间',
|
||||
'form_item_idcard_name' => '身份证姓名',
|
||||
'form_item_idcard_name_tips' => '选填,请务必与上传的身份证件姓名保持一致',
|
||||
'form_item_idcard_name_tips' => '请务必与上传的身份证件姓名保持一致',
|
||||
'form_item_idcard_name_message' => '身份证姓名格式最多16个字符',
|
||||
'form_item_idcard_number' => '身份证号码',
|
||||
'form_item_idcard_number_tips' => '选填,请务必与上传的身份证件号码保持一致',
|
||||
'form_item_idcard_number_tips' => '请务必与上传的身份证件号码保持一致',
|
||||
'form_item_idcard_number_message' => '身份证号码格式最多18个字符',
|
||||
'form_item_idcard_images' => '身份证照片',
|
||||
'form_item_idcard_images_tips' => '选传,请使用身份证原件拍摄,图片要清晰',
|
||||
'form_item_idcard_images_tips' => '请使用身份证原件拍摄,图片要清晰',
|
||||
'form_item_idcard_front_button_name' => '上传人像面图片',
|
||||
'form_item_idcard_back_button_name' => '上传国微面图片',
|
||||
'form_item_idcard_no_user_tips' => '先关联用户后再上传身份证图片',
|
||||
|
@ -349,14 +349,34 @@ class UserAddressService
|
||||
'city' => intval($params['city']),
|
||||
'county' => isset($params['county']) ? intval($params['county']) : 0,
|
||||
'address' => $params['address'],
|
||||
'lng' => isset($params['lng']) ? floatval($params['lng']) : 0,
|
||||
'lat' => isset($params['lat']) ? floatval($params['lat']) : 0,
|
||||
'idcard_name' => empty($params['idcard_name']) ? '' : $params['idcard_name'],
|
||||
'idcard_number' => empty($params['idcard_number']) ? '' : $params['idcard_number'],
|
||||
'idcard_front' => $attachment['data']['idcard_front'],
|
||||
'idcard_back' => $attachment['data']['idcard_back'],
|
||||
'is_default' => $is_default,
|
||||
];
|
||||
// 坐标
|
||||
if(array_key_exists('lng', $params))
|
||||
{
|
||||
$data['lng'] = isset($params['lng']) ? floatval($params['lng']) : 0;
|
||||
}
|
||||
if(array_key_exists('lat', $params))
|
||||
{
|
||||
$data['lat'] = isset($params['lat']) ? floatval($params['lat']) : 0;
|
||||
}
|
||||
// 身份证信息
|
||||
if(array_key_exists('idcard_name', $params))
|
||||
{
|
||||
$data['idcard_name'] = empty($params['idcard_name']) ? '' : $params['idcard_name'];
|
||||
}
|
||||
if(array_key_exists('idcard_number', $params))
|
||||
{
|
||||
$data['idcard_number'] = empty($params['idcard_number']) ? '' : $params['idcard_number'];
|
||||
}
|
||||
if(array_key_exists('idcard_front', $params))
|
||||
{
|
||||
$data['idcard_front'] = $attachment['data']['idcard_front'];
|
||||
}
|
||||
if(array_key_exists('idcard_back', $params))
|
||||
{
|
||||
$data['idcard_back'] = $attachment['data']['idcard_back'];
|
||||
}
|
||||
|
||||
// 用户地址保存前钩子
|
||||
$hook_name = 'plugins_service_user_address_save_begin';
|
||||
|
Loading…
Reference in New Issue
Block a user