request->get(); $where = ['adminId' => $this->adminId]; $list = AddressClass::getAddressList($where); util::success($list); } //地址列表 ssh 20221003 public function actionAdd() { $post = Yii::$app->request->post(); $post['sjId'] = $this->sjId; $post['mainId'] = $this->mainId; $post['shopId'] = $this->shopId; AddressClass::addData($post); util::complete(); } //修改地址 ssh 20221003 public function actionUpdate() { $post = Yii::$app->request->post(); $id = $post['id'] ?? 0; unset($post['id']); $address = AddressClass::getById($id, true); if ($address->mainId != $this->mainId) { util::fail('没有权限修改'); } AddressClass::updateById($id, $post); util::complete(); } }