解决后台插件更新后无法正常使用的bug

This commit is contained in:
2021-01-03 17:55:04 +08:00
parent 894e59ca59
commit 29ab9e8a28

View File

@@ -9,6 +9,8 @@
namespace app\model; namespace app\model;
use app\facade\Cache;
/** /**
* 扩展模型 * 扩展模型
*/ */
@@ -22,6 +24,14 @@ class Addons extends \think\Model {
'config' => 'json' 'config' => 'json'
]; ];
public static function onAfterWrite($addons){
Cache::delete('sentcms_hooks');
}
public static function onAfterDelete($addons){
Cache::delete('sentcms_hooks');
}
protected function setStatusAttr($value) { protected function setStatusAttr($value) {
return $value ? $value : 0; return $value ? $value : 0;
} }