Complaints.php
1.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?php
namespace Home;
use LibModels\Web\Home\ComplaintsData;
use Configs\ChannelConfig;
/**
* 个人中心-我的投诉
*/
class ComplaintsModel
{
public static function getComplaintsList($uid, $page, $limit)
{
$complaints = array();
$complaintsInfo = ComplaintsData::getComplaintsList($uid, $page, $limit);
if (isset($complaintsInfo['data']['complaintList']) && $complaintsInfo['data']['complaintList']) {
foreach ($complaintsInfo['data']['complaintList'] as $ck => $cv) {
$complaints[$ck]['id'] = $cv['id'];
$complaints[$ck]['title'] = $cv['title'];
$complaints[$ck]['target'] = $cv['customer'];
$complaints[$ck]['type'] = ChannelConfig::$complaintType[$cv['complaintsType']];
$complaints[$ck]['order'] = $cv['orderCode'];
$complaints[$ck]['time'] = $cv['createTime'];
$complaints[$ck]['question'] = $cv['content'];
$complaints[$ck]['reply'] = $cv['reply'];
$complaints[$ck]['replyTime'] = $cv['replyTime'];
$complaints[$ck]['revoke'] = ($cv['status'] == -1) ? true : false;
}
$complaints['pager']['total'] = $complaintsInfo['data']['total'];
$complaints['pager']['pageTotal'] = $complaintsInfo['data']['page_total'];
$complaints['pager']['page'] = $complaintsInfo['data']['page'];
}
else {
$complaints = array('empty' => '您尚未投诉任何内容');
}
return $complaints;
}
}