1. 修改 app/common/repositories/system/groupData/GroupDataRepository.php
文件第90行
注釋圖中紅框中的代碼
修改后的內容如下
public function checkData(array $data, array $fieldRule)
{
foreach ($fieldRule as $rule) {
// if (!isset($data[$rule['field']]) || $data[$rule['field']] === '') {
// throw new ValidateException($rule['name'] . '不能為空');
// }
if ($rule['type'] === 'number' && $data[$rule['field']] < 0)
throw new ValidateException($rule['name'] . '不能小于0');
}
}
2. 重啟 swoole 服務
3. 修改自己添加的菜單按鈕,刪除 key 中的內容
通過以上步驟 自定義的個人中心菜單就展示出來了
