应用校验提示优化

This commit is contained in:
gongfuxiang 2019-08-18 00:01:57 +08:00
parent 2fa4bea0d8
commit 7a6689da89
2 changed files with 8 additions and 3 deletions

View File

@ -140,10 +140,14 @@ class Plugins extends Common
*/
private function PluginsCheck($pluginsname, $pluginscontrol, $pluginsaction)
{
$is_enable = PluginsService::PluginsField($pluginsname, 'is_enable');
if($is_enable['data'] != 1)
$ret = PluginsService::PluginsField($pluginsname, 'is_enable');
if($ret['data'] === null)
{
return DataReturn('应用异常或未启用', -10);
return DataReturn('应用未安装['.$pluginsname.']', -10);
}
if($ret['data'] != 1)
{
return DataReturn('应用未启用['.$pluginsname.']', -10);
}
return DataReturn('验证成功', 0);
}

View File

@ -134,6 +134,7 @@ class PluginsService
* @desc description
* @param [string] $plugins [应用标记]
* @param [string] $field [字段名称]
* @return [mixed] [不存在返回null, 则原始数据]
*/
public static function PluginsField($plugins, $field)
{