...
|
...
|
@@ -33,6 +33,7 @@ class UserModel |
|
|
// 处理个人详情数据
|
|
|
if (isset($userData['data']) && !empty($userData['data'])) {
|
|
|
$result = $userData['data'];
|
|
|
$result['gender'] = $result['gender'] == 1 ? '男' : '女';
|
|
|
$result['head_ico'] = Images::getImageUrl($result['head_ico'], 128, 128);
|
|
|
}
|
|
|
|
...
|
...
|
@@ -291,10 +292,10 @@ class UserModel |
|
|
} else if (empty($consignee)) {
|
|
|
$result['code'] = 403;
|
|
|
$result['message'] = '请输入收件人姓名';
|
|
|
} else if (!empty($email) && Helpers::verifyEmail($email)) {
|
|
|
} else if (!empty($email) && !Helpers::verifyEmail($email)) {
|
|
|
$result['code'] = 404;
|
|
|
$result['message'] = '输入的邮箱地址格式不正确';
|
|
|
} else if (!empty($mobile) && Helpers::verifyMobile($mobile)) {
|
|
|
} else if (!empty($mobile) && !Helpers::verifyMobile($mobile)) {
|
|
|
$result['code'] = 404;
|
|
|
$result['message'] = '输入的手机号码格式不正确';
|
|
|
} else {
|
...
|
...
|
@@ -302,7 +303,8 @@ class UserModel |
|
|
$address = UserData::saveAddressData($uid, $address, $area_code, $consignee, $email, $id, $mobile, $zip_code);
|
|
|
// 处理返回结果
|
|
|
if (isset($address['code']) && $address['code'] == 200) {
|
|
|
$result = $address['data'];
|
|
|
$result['code'] = $address['code'];
|
|
|
$result['message'] = $address['message'];
|
|
|
}
|
|
|
}
|
|
|
|
...
|
...
|
@@ -348,7 +350,20 @@ class UserModel |
|
|
|
|
|
// 处理意见反馈数据
|
|
|
if (isset($suggest['data']) && !empty($suggest['data'])) {
|
|
|
$result = $suggest['data'];
|
|
|
$one = array();
|
|
|
foreach ($suggest['data']['list'] as $val) {
|
|
|
$one = array();
|
|
|
$one['hasImage'] = $val['has_image'];
|
|
|
$one['imgUrl'] = Helpers::getImageUrl($val['cover_image'], 640, 240);
|
|
|
$one['title'] = $val['filter_content'];
|
|
|
$one['content'] = $val['reply_content'];
|
|
|
$one['good'] = $val['is_reliable'];
|
|
|
$one['bad'] = !$val['is_reliable'];
|
|
|
$one['goodNum'] = $val['reliable'];
|
|
|
$one['badNum'] = $val['unreliable'];
|
|
|
|
|
|
$result[] = $one;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
return $result;
|
...
|
...
|
|