mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-09-10 22:39:44 +08:00
[更新]更新系统模块及配置文件
This commit is contained in:
parent
34abaaedb5
commit
71b6ca76de
@ -45,7 +45,7 @@ class Auth extends BasicAdmin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 权限授权
|
* 权限授权
|
||||||
* @return void
|
* @return string|array
|
||||||
*/
|
*/
|
||||||
public function apply() {
|
public function apply() {
|
||||||
$auth_id = $this->request->get('id', '0');
|
$auth_id = $this->request->get('id', '0');
|
||||||
@ -77,6 +77,12 @@ class Auth extends BasicAdmin {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 节点数据拼装
|
||||||
|
* @param array $nodes
|
||||||
|
* @param int $level
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
protected function _filterNodes($nodes, $level = 1) {
|
protected function _filterNodes($nodes, $level = 1) {
|
||||||
foreach ($nodes as $key => &$node) {
|
foreach ($nodes as $key => &$node) {
|
||||||
if (!empty($node['_sub_']) && is_array($node['_sub_'])) {
|
if (!empty($node['_sub_']) && is_array($node['_sub_'])) {
|
||||||
|
@ -36,8 +36,8 @@ class Index extends BasicAdmin {
|
|||||||
*/
|
*/
|
||||||
public function index() {
|
public function index() {
|
||||||
Node::applyAuthNode();
|
Node::applyAuthNode();
|
||||||
$list = Db::name('SystemMenu')->field('title,id,pid,url,icon')->order('sort asc,id asc')->where('status', '1')->select();
|
$list = Db::name('SystemMenu')->where('status', '1')->order('sort asc,id asc')->select();
|
||||||
$menus = $this->_filter_menu(ToolsService::arr2tree($list));
|
$menus = $this->_filterMenu(ToolsService::arr2tree($list));
|
||||||
$this->assign('title', '后台管理');
|
$this->assign('title', '后台管理');
|
||||||
$this->assign('menus', $menus);
|
$this->assign('menus', $menus);
|
||||||
return view();
|
return view();
|
||||||
@ -48,10 +48,10 @@ class Index extends BasicAdmin {
|
|||||||
* @param array $menus
|
* @param array $menus
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
private function _filter_menu($menus) {
|
private function _filterMenu($menus) {
|
||||||
foreach ($menus as $key => &$menu) {
|
foreach ($menus as $key => &$menu) {
|
||||||
if (!empty($menu['sub'])) {
|
if (!empty($menu['sub'])) {
|
||||||
$menu['sub'] = $this->_filter_menu($menu['sub']);
|
$menu['sub'] = $this->_filterMenu($menu['sub']);
|
||||||
}
|
}
|
||||||
if (!empty($menu['sub'])) {
|
if (!empty($menu['sub'])) {
|
||||||
$menu['url'] = '#';
|
$menu['url'] = '#';
|
||||||
|
@ -104,6 +104,8 @@ class Menu extends BasicAdmin {
|
|||||||
}
|
}
|
||||||
$this->assign('nodes', array_column($nodes, 'node'));
|
$this->assign('nodes', array_column($nodes, 'node'));
|
||||||
$this->assign('menus', $menus);
|
$this->assign('menus', $menus);
|
||||||
|
}else{
|
||||||
|
$this->error('请不要改菜单构造!');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
// +----------------------------------------------------------------------
|
// +----------------------------------------------------------------------
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 小程序配置参数
|
* 公众号配置参数
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
return [
|
return [
|
||||||
|
@ -14,7 +14,6 @@
|
|||||||
|
|
||||||
namespace app\index\controller;
|
namespace app\index\controller;
|
||||||
|
|
||||||
use library\Http;
|
|
||||||
use think\Controller;
|
use think\Controller;
|
||||||
use think\Db;
|
use think\Db;
|
||||||
|
|
||||||
@ -28,34 +27,5 @@ class Index extends Controller {
|
|||||||
return view();
|
return view();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function test() {
|
|
||||||
$DEVICE_NO = 'kdt1080126';
|
|
||||||
$key = '20585';
|
|
||||||
$content = "";
|
|
||||||
$content .= "^Q +http://weixin.qq.com/r/2Eg2LkzEKRFWrQhN9123";
|
|
||||||
$result = $this->sendSelfFormatOrderInfo($DEVICE_NO, $key, 1, $content);
|
|
||||||
var_dump($result);
|
|
||||||
}
|
|
||||||
|
|
||||||
function sendSelfFormatOrderInfo($device_no, $key, $times, $orderInfo) { // $times打印次数
|
|
||||||
$selfMessage = array(
|
|
||||||
'deviceNo' => $device_no,
|
|
||||||
'printContent' => $orderInfo,
|
|
||||||
'key' => $key,
|
|
||||||
'times' => $times
|
|
||||||
);
|
|
||||||
$url = "http://open.printcenter.cn:8080/addOrder";
|
|
||||||
$options = [
|
|
||||||
'http' => [
|
|
||||||
'header' => "Content-type: application/x-www-form-urlencoded ",
|
|
||||||
'method' => 'POST',
|
|
||||||
'content' => http_build_query($selfMessage),
|
|
||||||
],
|
|
||||||
];
|
|
||||||
$context = stream_context_create($options);
|
|
||||||
$result = file_get_contents($url, false, $context);
|
|
||||||
|
|
||||||
return $result;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user