后臺(tái)添加會(huì)員權(quán)益報(bào)錯(cuò)問(wèn)題
問(wèn)題修復(fù):
修改文件:app\services\user\member\MemberRightServices
添加方法:
/**
* 添加權(quán)益內(nèi)容
* @param int $id
* @param array $data
* @return bool
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
*/
public function save_content(int $id, array $data)
{
if (!$id) throw new AdminException("id參數(shù)缺失");
if (!$data['content']) throw new AdminException("請(qǐng)?zhí)砑訖?quán)益內(nèi)容");
$this->dao->update($id, $data);
$right = $this->dao->get($id);
if ($right) {
$this->dao->cacheUpdate($right->toArray());
}
return true;
}
或者下載下面文件覆蓋