|
|
@@ -20,8 +20,14 @@ class CpController extends BaseController
|
|
|
$search = $get['search'] ?? '';
|
|
|
$mainId = $this->mainId ?? 0;
|
|
|
$where = [];
|
|
|
+ $requestType = $get['del'] ?? 'cp';
|
|
|
$where['mainId'] = $mainId;
|
|
|
- $where['delStatus'] = 0;
|
|
|
+ if ($requestType == 'cp') {
|
|
|
+ $where['delStatus'] = 0;
|
|
|
+ }
|
|
|
+ if ($requestType == 'del') {
|
|
|
+ $where['delStatus'] = 1;
|
|
|
+ }
|
|
|
if (!empty($search)) {
|
|
|
if (stringUtil::isLetter($search)) {
|
|
|
$where['py'] = ['like', $search];
|
|
|
@@ -94,7 +100,7 @@ class CpController extends BaseController
|
|
|
{
|
|
|
$get = Yii::$app->request->get();
|
|
|
$id = $get['id'] ?? 0;
|
|
|
- $cp = CpClass::getById($id,true);
|
|
|
+ $cp = CpClass::getById($id, true);
|
|
|
if (isset($cp->mainId) == false || $cp->mainId != $this->mainId) {
|
|
|
util::fail('无法查看');
|
|
|
}
|