修复内容报错

This commit is contained in:
liaofei 2020-01-04 10:55:22 +08:00
parent caf64b5266
commit 2662168258
4 changed files with 167 additions and 132 deletions

View File

@ -30,6 +30,7 @@ class AgentManage extends AuthController
$this->assign('store_brokerage_statu', sysConfig('store_brokerage_statu')); $this->assign('store_brokerage_statu', sysConfig('store_brokerage_statu'));
return $this->fetch(); return $this->fetch();
} }
public function get_spread_list() public function get_spread_list()
{ {
$where = Util::getMore([ $where = Util::getMore([
@ -61,12 +62,14 @@ class AgentManage extends AuthController
* 一级推荐人页面 * 一级推荐人页面
* @return mixed * @return mixed
*/ */
public function stair($uid = ''){ public function stair($uid = '')
{
if ($uid == '') return $this->failed('参数错误'); if ($uid == '') return $this->failed('参数错误');
$this->assign('uid', $uid ?: 0); $this->assign('uid', $uid ?: 0);
$this->assign('year', getMonth()); $this->assign('year', getMonth());
return $this->fetch(); return $this->fetch();
} }
/* /*
* 统计推广订单 * 统计推广订单
* @param int $uid * @param int $uid
@ -79,7 +82,8 @@ class AgentManage extends AuthController
return $this->fetch(); return $this->fetch();
} }
public function get_stair_order_list(){ public function get_stair_order_list()
{
$where = Util::getMore([ $where = Util::getMore([
['uid', $this->request->param('uid', 0)], ['uid', $this->request->param('uid', 0)],
['data', ''], ['data', ''],
@ -257,10 +261,11 @@ class AgentManage extends AuthController
return JsonService::fail('查看推广二维码失败!', ['line' => $e->getLine(), 'meassge' => $e->getMessage()]); return JsonService::fail('查看推广二维码失败!', ['line' => $e->getLine(), 'meassge' => $e->getMessage()]);
} }
} }
/*
/**
* 解除单个用户的推广权限 * 解除单个用户的推广权限
* @param int $uid * @param int $uid
* */ */
public function delete_spread($uid = 0) public function delete_spread($uid = 0)
{ {
if (!$uid) return JsonService::fail('缺少参数'); if (!$uid) return JsonService::fail('缺少参数');
@ -270,9 +275,9 @@ class AgentManage extends AuthController
return JsonService::fail('解除失败'); return JsonService::fail('解除失败');
} }
/* /**
* 清除推广人 * 清除推广人
* */ */
public function empty_spread($uid = 0) public function empty_spread($uid = 0)
{ {
if (!$uid) return JsonService::fail('缺少参数'); if (!$uid) return JsonService::fail('缺少参数');
@ -282,11 +287,13 @@ class AgentManage extends AuthController
else else
return JsonService::fail('清除失败'); return JsonService::fail('清除失败');
} }
/** /**
* 个人资金详情页面 * 个人资金详情页面
* @return mixed * @return mixed
*/ */
public function now_money($uid = ''){ public function now_money($uid = '')
{
if ($uid == '') return $this->failed('参数错误'); if ($uid == '') return $this->failed('参数错误');
$list = UserBill::where('uid', $uid)->where('category', 'now_money') $list = UserBill::where('uid', $uid)->where('category', 'now_money')
->field('mark,pm,number,add_time') ->field('mark,pm,number,add_time')

View File

@ -13,7 +13,7 @@
<div class="ibox-content"> <div class="ibox-content">
<ul class="folder-list m-b-md"> <ul class="folder-list m-b-md">
{volist name="tree" id="vo"} {volist name="tree" id="vo"}
<li class="p-xxs"><a href="{:Url('article.article/index',array('pid'=>$vo.id))}">{$vo.level|str_repeat='.....',###}{$vo.title}</a></li> <li class="p-xxs"><a href="{:Url('article.article/index',array('pid'=>$vo.id))}">{$vo.html}{$vo.title}</a></li>
{/volist} {/volist}
</ul> </ul>
</div> </div>

View File

@ -194,3 +194,31 @@ if (!function_exists('set_file_url')) {
return $siteUrl . $image; return $siteUrl . $image;
} }
} }
if (!function_exists('sort_list_tier')) {
/**
* 分级排序
* @param $data
* @param int $pid
* @param string $field
* @param string $pk
* @param string $html
* @param int $level
* @param bool $clear
* @return array
*/
function sort_list_tier($data, $pid = 0, $field = 'pid', $pk = 'id', $html = '|-----', $level = 1, $clear = true)
{
static $list = [];
if ($clear) $list = [];
foreach ($data as $k => $res) {
if ($res[$field] == $pid) {
$res['html'] = str_repeat($html, $level);
$list[] = $res;
unset($data[$k]);
sort_list_tier($data, $res[$pk], $field, $pk, $html, $level + 1, false);
}
}
return $list;
}
}