Commit 6d31c533 authored by hujun's avatar hujun

商铺

parent 2de06152
<?php
/**
* Created by PhpStorm.
* User: hujun
* Date: 2018/1/17
* Time: 13:26
*/
namespace app\index\controller;
class BusinessDistrict
{
public function index() {
}
public function edit() {
}
public function del() {
}
}
\ No newline at end of file
<?php
/**
* Created by PhpStorm.
* User: fuju
* Date: 2018/1/17
* Time: 13:46
*/
namespace app\index\controller;
class Houses
{
public function index() {
return view('index');
}
public function edit() {
return view('edit');
}
public function del() {
}
}
\ No newline at end of file
...@@ -36,6 +36,12 @@ ...@@ -36,6 +36,12 @@
<li role="presentation"> <li role="presentation">
<a href="/admin.php/index/auth.html">权限管理</a> <a href="/admin.php/index/auth.html">权限管理</a>
</li> </li>
<li role="presentation">
<a href="/admin.php/index/houseList.html">商铺列表</a>
</li>
<li role="presentation">
<a href="/admin.php/index/houseEdit.html">新增商铺</a>
</li>
</ul> </ul>
</nav> </nav>
......
{layout name="global/frame_tpl" /}
<h1>商铺新增</h1>
\ No newline at end of file
{layout name="global/frame_tpl" /}
<h1>商铺列表</h1>
\ No newline at end of file
...@@ -75,7 +75,13 @@ Route::group('index', [ ...@@ -75,7 +75,13 @@ Route::group('index', [
'getAuth' => ['index/auth/getAuth', ['method' => 'get']], //权限列表 'getAuth' => ['index/auth/getAuth', ['method' => 'get']], //权限列表
'access' => ['index/auth/access', ['method' => 'get']], //权限分配 'access' => ['index/auth/access', ['method' => 'get']], //权限分配
'roleedit' => ['index/auth/roleedit', ['method' => 'get']], //编辑角色 'roleedit' => ['index/auth/roleedit', ['method' => 'get']], //编辑角色
'accessUser' => ['index/auth/accessUser', ['method' => 'get']], //成员授权 'accessUser' => ['index/auth/accessUser', ['method' => 'get']], //成员授权
'BusinessDistrict' => ['index/BusinessDistrict/index', ['method' => 'get']], //商圈列表
'editBusinessDistrict' => ['index/BusinessDistrict/index', ['method' => 'get']], //编辑商圈
'delBusinessDistrict' => ['index/BusinessDistrict/index', ['method' => 'get']], //删除商圈列表
'houseList' => ['index/Houses/index', ['method' => 'get']], //商铺列表
'houseEdit' => ['index/Houses/edit', ['method' => 'get']], //编辑商铺
'houseDel' => ['index/Houses/del', ['method' => 'get']], //删除商铺
]); ]);
......
define (['doT', 'text!temp/auth_template_tpl.html', 'css!style/home.css','pagination','bootstrapJs'], function (doT, template) {
auth = {
pageNo: 1, /*第几页*/
pageSize: 10, /*每页显示多少条*/
init: function () {
//初始化dot
$ ("body").append (template);
auth.getList ();
auth.event ();
},
event: function () {
},
getList: function (pageNo) {
auth.pageNo = pageNo;
var params = {};
params.pageNo = auth.pageNo;
params.pageSize = auth.pageSize;
$.ajax ({
url: '/index/getAuth.html',
type: 'GET',
async: true,
data: params,
dataType: 'json',
success: function (data) {
var temp = document.getElementById ('auth_list_tpl').innerHTML;
var doTtmpl = doT.template (temp);
$ ("#auth_list").html (doTtmpl (data.data));
/*分页代码*/
$ ("#pagediv").pagination ({
length: data.data.total,
current: pageNo,
every: auth.pageSize,
onClick: function (el) {
auth.getList (el.num.current);
}
});
}
});
}
};
return auth;
});
\ No newline at end of file
<script id="auth_list_tpl" type="text/template">
[% if(it) { %]
[% for(var item in it){ %]
<tr class="text-center">
<td>[%= it[item]['id'] %]</td>
<td>[%= it[item]['title'] %]</td>
<td>
[% if(it[item]['description']) { %]
[%= it[item]['description'] %]
[% } %]
</td>
<td>[%= it[item]["status"] %]</td>
<td>
<a title="编辑" class="btn btn-success btn-xs" href="/admin.php/index/roleedit?id=[%= it[item]['id']%].html" style="margin-right:6px;">编辑</a>
<a title="权限分配" class="btn btn-info btn-xs" href="/admin.php/index/access?id=[%= it[item]['id']%].html" style="margin-right:6px;">权限分配</a>
<a title="成员授权" class="btn btn-primary btn-xs" href="/admin.php/index/accessUser?id=[%= it[item]['id']%].html" style="margin-right:6px;">成员授权</a>
</td>
</tr>
[% } %]
[% }else{ %]
<tr>
<td colspan="8" style="text-align:center;"> 暂无数据</td>
</tr>
[% } %]
</script>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment