Authored by Rock Zhang

修复地址有关接口,修复意见反馈有关bug

... ... @@ -303,8 +303,8 @@ class UserData
{
$param = array();
$param['address'] = $address;
$param['areaCode'] = $areaCode;
$param['addresseeName'] = $consignee;
$param['area_code'] = $areaCode;
$param['addressee_name'] = $consignee;
$param['email'] = $email;
if (!empty($id)) { // 修改
... ...
... ... @@ -244,14 +244,14 @@ class HomeController extends AbstractAction
*
* 暂时使用老的,因后面APP、PC、WAP会进行一次改版
*/
public function messageAction() {
/*public function messageAction() {
$page = $this->get('page', 1);
$size = $this->get('size', 10);
$messages = UserModel::getMessageData($this->_uid, $page, $size);
print_r($messages);
}
}*/
/**
* 地址管理
... ...
... ... @@ -357,7 +357,18 @@ class UserModel
// 处理地址数据
if ($address && !isset($address['code'])) {
$result = $address;
$one = array();
foreach ($address as $val) {
$one = array();
$one['consignee'] = $val['addresseeName'];
$one['mobile'] = $val['mobile'];
$one['area'] = $val['area']['parent']['parent']['caption'] . $val['area']['parent']['caption'] . $val['area']['caption'];
$one['address'] = $val['address'];
$one['address_id'] = $val['id'];
$one['area_code'] = $val['areaCode'];
$result[] = $one;
}
}
return $result;
... ... @@ -520,8 +531,9 @@ class UserModel
$one['imgUrl'] = Helpers::getImageUrl($val['cover_image'], 640, 240);
$one['title'] = $val['filter_content'];
$one['content'] = $val['reply_content'];
$one['good'] = (bool)($val['is_reliable']);
$one['bad'] = !$one['good'];
$one['good'] = ($val['is_reliable'] == 1);
$one['bad'] = ($val['is_reliable'] == 2);
$one['none'] = ($val['is_reliable'] == 0);
$result[] = $one;
}
... ...