|
@@ -23,14 +23,15 @@ class Appointment extends Base
|
|
$this->json_error('提交失败:' . $validate->getError());
|
|
$this->json_error('提交失败:' . $validate->getError());
|
|
}
|
|
}
|
|
|
|
|
|
- $where = [];
|
|
|
|
- $addressIds = (new appointmentModel())->availableAddressIds();
|
|
|
|
- $where['id'] = ['in', $addressIds];
|
|
|
|
$pagenum = $this->request->param('pagenum', 20, 'intval');
|
|
$pagenum = $this->request->param('pagenum', 20, 'intval');
|
|
- $datalist = (new Address())->where($where)->paginate($pagenum, true);
|
|
|
|
|
|
+ $datalist = (new Address())->paginate($pagenum, true);
|
|
if (empty($datalist)) {
|
|
if (empty($datalist)) {
|
|
$this->json_error("没有数据");
|
|
$this->json_error("没有数据");
|
|
}
|
|
}
|
|
|
|
+ foreach ($datalist as $key => $item) {
|
|
|
|
+ $item['thumb'] = geturl($item->thumb, '', true);
|
|
|
|
+ $datalist[$key] = $item;
|
|
|
|
+ }
|
|
$this->json_success("查询成功", $datalist);
|
|
$this->json_success("查询成功", $datalist);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -47,11 +48,18 @@ class Appointment extends Base
|
|
$this->json_error('提交失败:' . $validate->getError());
|
|
$this->json_error('提交失败:' . $validate->getError());
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ $where = [];
|
|
|
|
+ $addressIds = (new appointmentModel())->availableAddressIds();
|
|
|
|
+ $where['id'] = ['in', $addressIds];
|
|
$pagenum = $this->request->param('pagenum', 20, 'intval');
|
|
$pagenum = $this->request->param('pagenum', 20, 'intval');
|
|
- $datalist = (new Address())->paginate($pagenum, true);
|
|
|
|
|
|
+ $datalist = (new Address())->where($where)->paginate($pagenum, true);
|
|
if (empty($datalist)) {
|
|
if (empty($datalist)) {
|
|
$this->json_error("没有数据");
|
|
$this->json_error("没有数据");
|
|
}
|
|
}
|
|
|
|
+ foreach ($datalist as $key => $item) {
|
|
|
|
+ $item['thumb'] = geturl($item->thumb, '', true);
|
|
|
|
+ $datalist[$key] = $item;
|
|
|
|
+ }
|
|
$this->json_success("查询成功", $datalist);
|
|
$this->json_success("查询成功", $datalist);
|
|
}
|
|
}
|
|
|
|
|