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.
32 lines
740 B
32 lines
740 B
<?php
|
|
|
|
namespace app\auth\model;
|
|
|
|
use think\model\concern\SoftDelete;
|
|
|
|
class AuthRuleParam extends Base
|
|
{
|
|
use SoftDelete;
|
|
|
|
/*
|
|
* 获取所有的参数
|
|
*/
|
|
public function getListByRule(){
|
|
$data = $this->where(array('uid' => $this->mid))->order('sort desc,id asc')->select();
|
|
|
|
if (empty($data)) {
|
|
return $data;
|
|
}
|
|
$ret=array();
|
|
foreach($data as $value){
|
|
$temp=['r' => $value->param_val, 'name' => $value->param_name];
|
|
if (!isset($thridarr[$value->rule_id])) {
|
|
$ret[$value->rule_id][] = $temp;
|
|
} else {
|
|
array_push($thridarr[$value->rule_id], $temp);
|
|
}
|
|
}
|
|
return $ret;
|
|
}
|
|
}
|