master
wangxinglong 2022-01-19 15:43:40 +08:00
parent 211774d08b
commit 15c8111584
4 changed files with 21 additions and 1 deletions

View File

@ -97,6 +97,11 @@ class Business extends Base
return $this->json(0, 'success', $list);
}
//商家不能指派代理商
$roles = explode(",", $this->auth['roles']);
$this->data["isAdmin"] = in_array(Member::MANAGER_ROLE_ID, $roles);
return $this->view();
}
@ -449,7 +454,7 @@ class Business extends Base
return $this->error("商家信息错误");
}
$qrData = $this->request->domain() . "/business_code_to_coupon_list?business_code=" . $businessCode;
$w = 3000;//尺寸
$logoImg = app()->getRootPath().'public/static/images/icon-logo.jpg';

View File

@ -62,8 +62,10 @@ class Index extends Base
$menus = CmsRepository::getInstance()->getMenuList(Menu::TYPE_MENU, Menu::SHOW_YES)->toArray();
$userId = $this->auth['user_id'] ?? 0;
$menus = CmsRepository::getInstance()->handMenuRule($userId, $menus);
$menus = CmsRepository::getInstance()->buildMenuChild(0, $menus, 'child');
$res['menuInfo'] = $menus;
return json($res);

View File

@ -64,10 +64,21 @@ trait MenuTrait
$name = $name.':index';
}
if (!in_array($name, $rules)) {
unset($menus[$k]);
}
}else{
$name = $m['name'];
$nameArr = explode(':', $name);
if (count($nameArr) <= 1) {
$name = $name.':index';
}
if (!in_array($name, $rules)) {
unset($menus[$k]);
}
}
}
return $menus;
}

View File

@ -55,7 +55,9 @@
<a class="layui-btn layui-btn-primary layui-btn-xs" data-href="/manager/business/business-deduction-list.html?business_code={{d.business_code}}" data-title="【{{ d.business_name }}】扣费记录" lay-event="">扣费记录</a>
<a class="layui-btn layui-btn-primary layui-btn-xs" data-href="/manager/business/business-recharge-list.html?business_code={{d.business_code}}" data-title="【{{ d.business_name }}】充值记录" lay-event="">充值记录</a>
<a class="layui-btn layui-btn-primary layui-btn-xs" data-href="/manager/business/business-detail.html?business_code={{d.business_code}}" data-title="【{{ d.business_name }}】基本资料" lay-event="">基本资料</a>
{if $isAdmin}
<a class="layui-btn layui-btn-primary layui-btn-xs" data-href="/manager/business/assign.html?business_code={{d.business_code}}" data-title="给【{{ d.business_name }}】指派代理商" lay-event="">指派代理商</a>
{/if}
<a class="layui-btn layui-btn-primary layui-btn-xs" target="_blank" href="/manager/business/downloadWriteOffCode?business_code={{d.business_code}}">下载核销二维码</a>
<a class="layui-btn layui-btn-xs" href="javascript:;" layuimini-content-href="/manager/business/recharge-behalf.html?business_code={{d.business_code}}" data-title="给【{{ d.business_name }}】充值" >代为充值</a>
</script>