You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
79 lines
1.3 KiB
79 lines
1.3 KiB
2 months ago
|
<?php
|
||
|
|
||
|
declare(strict_types=1);
|
||
|
|
||
|
|
||
|
namespace app\recommend\info;
|
||
|
|
||
|
use longbingcore\permissions\PermissionAbstract;
|
||
|
|
||
|
/**
|
||
|
* 商城模块功能权限
|
||
|
* Class PermissionAppstore
|
||
|
*/
|
||
|
class PermissionRecommend extends PermissionAbstract {
|
||
|
|
||
|
const tabbarKey = null;
|
||
|
//后台管理菜单对应key[必填] , 当前模块文件夹名称
|
||
|
const adminMenuKey = 'recommend';
|
||
|
public $saasKey ;
|
||
|
const apiPaths = [];
|
||
|
|
||
|
|
||
|
public function __construct($uniacid,$infoConfigOptions=[],$saasKey='RECOMMEND')
|
||
|
{
|
||
|
|
||
|
$this->saasKey = longbing_get_auth_prefix($saasKey) ;
|
||
|
|
||
|
parent::__construct($uniacid, self::tabbarKey, self::adminMenuKey, $this->saasKey, self::apiPaths , $infoConfigOptions);
|
||
|
}
|
||
|
|
||
|
|
||
|
/**
|
||
|
* 返回saas端授权结果
|
||
|
* @return bool
|
||
|
*/
|
||
|
public function sAuth(): bool
|
||
|
{
|
||
|
|
||
|
return $this->sassValue == 1 ? true : false;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* 返回p端授权结果
|
||
|
* @return bool
|
||
|
*/
|
||
|
public function pAuth(): bool
|
||
|
{
|
||
|
|
||
|
if (!$this->sAuth()) {
|
||
|
|
||
|
return false;
|
||
|
};
|
||
|
|
||
|
return true;
|
||
|
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* 返回c端授权结果
|
||
|
*
|
||
|
* @param int $user_id
|
||
|
* @return bool
|
||
|
* @author ArtizanZhang
|
||
|
* @DataTime: 2019/12/9 17:13
|
||
|
*/
|
||
|
public function cAuth(int $user_id): bool
|
||
|
{
|
||
|
|
||
|
return true;
|
||
|
|
||
|
}
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
}
|