盲盒转盘优化-调试

This commit is contained in:
2025-10-24 20:58:31 +08:00
parent 3b22f8d134
commit e7a17bb34e
2 changed files with 35 additions and 6 deletions

View File

@@ -35,6 +35,9 @@ class SysSet extends adminApi
'10' => '邀请奖励',
'11' => '二级密码',
];
public $noAdminConfigType = [
'1' => '基础设置',
];
public function _initialize()
{
@@ -45,14 +48,18 @@ class SysSet extends adminApi
* 类型列表
*/
public function type_list(){
$configType = $this->configType;
if($this->auth->isSuperAdmin()){
$configType = $this->configType;
}else{
$configType = $this->noAdminConfigType;
}
$list = [];
$i=0;
foreach ($configType as $k=>$v){
$list[$i]['id'] = $k;
$list[$i]['name'] = $v;
$i++;
}
foreach ($configType as $k=>$v){
$list[$i]['id'] = $k;
$list[$i]['name'] = $v;
$i++;
}
return V(1,"成功", $list);
}