Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tl_estate
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hujun
tl_estate
Commits
65f6e3fb
Commit
65f6e3fb
authored
Dec 15, 2017
by
clone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
banner pc后台
parent
b0bfb948
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
261 additions
and
181 deletions
+261
-181
banner.php
application/index/controller/banner.php
+10
-9
Basic.php
application/index/extend/Basic.php
+97
-0
banner.html
application/index/view/banner/banner.html
+9
-100
frame_tpl.html
application/index/view/global/frame_tpl.html
+2
-2
member.html
application/index/view/member/member.html
+28
-30
member1.html
application/index/view/member/member1.html
+0
-31
member23.html
application/index/view/member/member23.html
+34
-0
route.php
application/route.php
+3
-2
public.css
public/resource/css/public.css
+2
-2
banner.js
public/resource/js/banner.js
+40
-0
user.js
public/resource/js/user.js
+5
-4
banner_template_tpl.html
public/resource/template/banner_template_tpl.html
+29
-0
user_template_tpl.html
public/resource/template/user_template_tpl.html
+2
-1
No files found.
application/index/controller/banner.php
View file @
65f6e3fb
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
namespace
app\index\controller
;
namespace
app\index\controller
;
use
app\index\extend\Basic
;
use
app\model\BannerModel
;
use
app\model\BannerModel
;
use
think\Controller
;
use
think\Controller
;
...
@@ -12,31 +13,31 @@ use think\Controller;
...
@@ -12,31 +13,31 @@ use think\Controller;
* Time : 15:12
* Time : 15:12
* Intro:
* Intro:
*/
*/
class
banner
class
Banner
extends
Basic
{
{
protected
$bannerModel
;
protected
$bannerModel
;
public
function
__construct
()
public
function
__construct
()
{
{
// $this->bannerModel = new BannerModel();
$this
->
bannerModel
=
new
BannerModel
();
}
public
function
index
(){
echo
1111111111
;
exit
;
}
}
/**
/**
* 查询banner列表
* 查询banner列表
* @return \think\Response
* @return \think\Response
*/
*/
public
function
getBannerList
()
public
function
index
()
{
{
echo
111111111
;
exit
;
return
view
(
"banner/banner"
);
return
view
(
"banner/banner"
);
/* $field = "id,title,pic_path,url,sort,is_show,create_time,update_time";
}
public
function
getBannerList
(){
$field
=
"id,title,pic_path,url,sort,hits,is_show,up_user,create_time,update_time"
;
$params
[
'is_show'
]
=
array
(
"eq"
,
0
);
$params
[
'is_show'
]
=
array
(
"eq"
,
0
);
$result
=
$this
->
bannerModel
$result
=
$this
->
bannerModel
->
getBannerList
(
1
,
15
,
"sort desc"
,
$field
,
$params
);
->
getBannerList
(
1
,
15
,
"sort desc"
,
$field
,
$params
);
return $this->response("200", "request success", $result);
*/
return
$this
->
response
(
"200"
,
"request success"
,
$result
);
}
}
...
...
application/index/extend/Basic.php
0 → 100644
View file @
65f6e3fb
<?php
namespace
app\index\extend
;
/**
* Created by PhpStorm.
* User: zw
* Date: 2017/12/4
* Time: 9:35
* 基类
*/
use
think\Controller
;
use
think\Request
;
use
think\Response
;
class
Basic
extends
Controller
{
/**
* 访问请求对象
* @var Request
*/
public
$request
;
public
$params
;
/**
* 基础接口SDK
* @param Request|null $request
*/
public
function
__construct
(
Request
$request
=
null
)
{
// CORS 跨域 Options 检测响应
$this
->
corsOptionsHandler
();
// 输入对象
$this
->
request
=
is_null
(
$request
)
?
Request
::
instance
()
:
$request
;
if
(
strtoupper
(
$this
->
request
->
method
())
===
"GET"
)
{
$this
->
params
=
$this
->
request
->
param
();
}
elseif
(
strtoupper
(
$this
->
request
->
method
())
===
"POST"
)
{
$this
->
params
=
$this
->
request
->
param
()
!=
null
?
$this
->
request
->
param
()
:
null
;
}
}
/**
* 输出返回数据
* @param string $msg 提示消息内容
* @param string $code 业务状态码
* @param mixed $data 要返回的数据
* @param string $type 返回类型 JSON XML
* @return Response
*/
public
function
response
(
$code
=
'SUCCESS'
,
$msg
,
$data
=
[],
$type
=
'json'
)
{
$result
=
[
'code'
=>
$code
,
'msg'
=>
$msg
,
'data'
=>
$data
,
'type'
=>
strtolower
(
$type
)
];
return
Response
::
create
(
$result
,
$type
);
}
/**
* Cors Options 授权处理
*/
public
static
function
corsOptionsHandler
()
{
if
(
request
()
->
isOptions
())
{
header
(
'Access-Control-Allow-Origin:*'
);
header
(
'Access-Control-Allow-Headers:Accept,Referer,Host,Keep-Alive,User-Agent,X-Requested-With,Cache-Control,Content-Type,Cookie,token'
);
header
(
'Access-Control-Allow-Credentials:true'
);
header
(
'Access-Control-Allow-Methods:GET,POST,OPTIONS'
);
header
(
'Access-Control-Max-Age:1728000'
);
header
(
'Content-Type:text/plain charset=UTF-8'
);
header
(
'Content-Length: 0'
,
true
);
header
(
'status: 204'
);
header
(
'HTTP/1.0 204 No Content'
);
exit
;
}
}
/**
* Cors Request Header信息
* @return array
*/
public
static
function
corsRequestHander
()
{
return
[
'Access-Control-Allow-Origin'
=>
'*'
,
'Access-Control-Allow-Credentials'
=>
true
,
'Access-Control-Allow-Methods'
=>
'GET,POST,OPTIONS'
,
'Access-Defined-X-Support'
=>
'service@cuci.cc'
,
'Access-Defined-X-Servers'
=>
'Guangzhou Cuci Technology Co. Ltd'
,
];
}
}
application/index/view/banner/banner.html
View file @
65f6e3fb
...
@@ -38,41 +38,8 @@
...
@@ -38,41 +38,8 @@
<th>
操作
</th>
<th>
操作
</th>
</tr>
</tr>
</thead>
</thead>
<tbody>
<tbody
id=
"banner_list"
>
<tr>
<td>
刘女士
</td>
<td>
<img
src=
"/adsimg/20171117215901.jpg"
class=
"diagram-image"
>
</td>
<td>
刘丹丹
</td>
<td>
张大大
</td>
<td>
Thornton
</td>
<td>
张大大
</td>
<td>
<a
class=
"btn1 btn-success "
href=
"#modal-do"
data-toggle=
"modal"
>
编辑
</a>
<a
class=
"btn1 btn-danger "
href=
"#modal-delete"
data-toggle=
"modal"
onclick=
"show_details(2244)"
>
删除
</a>
</td>
</tr>
<tr>
<td>
李楠楠
</td>
<td>
Jac12413ob
</td>
<td>
Thornton
</td>
<td>
刘丹丹
</td>
<td>
张大大
</td>
<td>
Thornton
</td>
<td>
<a
class=
"btn1 btn-success "
href=
"#modal-do"
data-toggle=
"modal"
>
编辑
</a>
<a
class=
"btn1 btn-danger"
href=
"#modal-delete"
data-toggle=
"modal"
onclick=
"show_details(2244)"
>
删除
</a>
</td>
</tr>
</tbody>
</tbody>
</table>
</table>
...
@@ -97,63 +64,6 @@
...
@@ -97,63 +64,6 @@
</div>
</div>
<!-- /#wrapper -->
<!-- /#wrapper -->
<!-- /#编辑模态框 -->
<div
class=
"modal fade"
id=
"modal-do"
tabindex=
"-1"
role=
"dialog"
aria-labelledby=
"myModalLabel"
aria-hidden=
"true"
>
<div
class=
"modal-dialog"
>
<div
class=
"modal-content"
>
<div
class=
"modal-header"
>
<button
type=
"button"
class=
"close"
data-dismiss=
"modal"
aria-hidden=
"true"
>
×
</button>
<h4
class=
"modal-title"
>
编辑
</h4>
</div>
<div
class=
"modal-body"
>
<form
class=
"form-horizontal"
action=
"/agents/add_user"
method=
"post"
onsubmit=
"return check()"
>
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label"
>
标题:
</label>
<div
class=
"col-sm-9"
>
<input
type=
"text"
class=
"form-control btn6"
name=
"title"
id=
"inputEmail3"
placeholder=
"请输入标题"
>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label"
>
备注:
</label>
<div
class=
"col-sm-9"
>
<input
type=
"text"
class=
"form-control btn6"
name=
"title"
placeholder=
"请输入备注"
>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label"
>
链接:
</label>
<div
class=
"col-sm-9"
>
<input
type=
"text"
class=
"form-control btn6"
name=
"title"
autocomplete=
"off"
>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label"
>
图片:
</label>
<div
class=
"col-sm-9"
>
<a
class=
"file-input-wrapper btn"
><input
id=
"img"
name=
"img"
type=
"file"
></a>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label"
>
排序:
</label>
<div
class=
"col-sm-9"
>
<input
type=
"text"
class=
"form-control btn6"
name=
"title"
autocomplete=
"off"
>
</div>
</div>
</form>
</div>
<div
class=
"modal-footer"
>
<button
type=
"button"
class=
"btn btn-default"
data-dismiss=
"modal"
>
关闭
</button>
<button
type=
"button"
class=
"btn btn-primary"
>
提交
</button>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal -->
</div>
<!-- /#删除模态框 -->
<!-- /#删除模态框 -->
<div
class=
"modal fade"
id=
"modal-delete"
tabindex=
"-1"
role=
"dialog"
aria-labelledby=
"myModalLabel"
aria-hidden=
"true"
>
<div
class=
"modal fade"
id=
"modal-delete"
tabindex=
"-1"
role=
"dialog"
aria-labelledby=
"myModalLabel"
aria-hidden=
"true"
>
<div
class=
"modal-dialog"
>
<div
class=
"modal-dialog"
>
...
@@ -182,7 +92,7 @@
...
@@ -182,7 +92,7 @@
</div>
<!-- /.modal -->
</div>
<!-- /.modal -->
</div>
</div>
<!-- /#新增广告模态框 -->
<!-- /#新增
编辑
广告模态框 -->
<div
class=
"modal fade"
id=
"modal-add-do"
tabindex=
"-1"
role=
"dialog"
aria-labelledby=
"myModalLabel"
aria-hidden=
"true"
>
<div
class=
"modal fade"
id=
"modal-add-do"
tabindex=
"-1"
role=
"dialog"
aria-labelledby=
"myModalLabel"
aria-hidden=
"true"
>
<div
class=
"modal-dialog"
>
<div
class=
"modal-dialog"
>
<div
class=
"modal-content"
>
<div
class=
"modal-content"
>
...
@@ -194,8 +104,7 @@
...
@@ -194,8 +104,7 @@
新增广告
新增广告
</h4>
</h4>
</div>
</div>
<div
class=
"modal-body"
>
<div
class=
"modal-body"
style=
"height: 350px"
>
<form
class=
"form-horizontal"
action=
"/agents/add_user"
method=
"post"
onsubmit=
"return check()"
>
<div
class=
"form-group"
>
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label"
>
标题:
</label>
<label
class=
"col-sm-3 control-label"
>
标题:
</label>
<div
class=
"col-sm-9"
>
<div
class=
"col-sm-9"
>
...
@@ -217,7 +126,9 @@
...
@@ -217,7 +126,9 @@
<div
class=
"form-group"
>
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label"
>
图片:
</label>
<label
class=
"col-sm-3 control-label"
>
图片:
</label>
<div
class=
"col-sm-9"
>
<div
class=
"col-sm-9"
>
<a
class=
"file-input-wrapper btn"
><input
id=
"img1"
name=
"img"
type=
"file"
></a>
<input
readonly=
"readonly"
type=
"text"
name=
"cover_image"
id=
"cover_image"
class=
"require"
/>
<button
class=
"button6 banner_img"
type=
"button"
>
选择图片
</button>
<span
class=
"tip"
>
建议尺寸288x320
</span>
</div>
</div>
</div>
</div>
<div
class=
"form-group"
>
<div
class=
"form-group"
>
...
@@ -226,14 +137,12 @@
...
@@ -226,14 +137,12 @@
<input
type=
"text"
class=
"form-control btn6"
name=
"title"
autocomplete=
"off"
>
<input
type=
"text"
class=
"form-control btn6"
name=
"title"
autocomplete=
"off"
>
</div>
</div>
</div>
</div>
</form>
</div>
</div>
<div
class=
"modal-footer"
>
<div
class=
"modal-footer"
>
<button
type=
"button"
class=
"btn btn-default"
data-dismiss=
"modal"
>
关闭
<button
type=
"button"
class=
"btn btn-default"
data-dismiss=
"modal"
>
关闭
</button>
</button>
<button
type=
"button"
class=
"btn btn-primary"
>
<button
type=
"button"
class=
"btn btn-primary"
id=
"save_banner"
>
提交
确认
</button>
</button>
</div>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal-content -->
...
...
application/index/view/global/frame_tpl.html
View file @
65f6e3fb
...
@@ -2,8 +2,8 @@
...
@@ -2,8 +2,8 @@
<html
lang=
"en-us"
>
<html
lang=
"en-us"
>
<head>
<head>
{include file="global/header_tpl" /}
{include file="global/header_tpl" /}
<link
rel=
"stylesheet"
href=
"
../../../..
/resource/css/bootstrap.css"
type=
"text/css"
/>
<link
rel=
"stylesheet"
href=
"/resource/css/bootstrap.css"
type=
"text/css"
/>
<link
rel=
"stylesheet"
href=
"
../../../..
/resource/css/public.css"
type=
"text/css"
/>
<link
rel=
"stylesheet"
href=
"/resource/css/public.css"
type=
"text/css"
/>
</head>
</head>
<body>
<body>
...
...
application/index/view/member/member.html
View file @
65f6e3fb
<!DOCTYPE html>
{layout name="global/frame_tpl" /}
<html
lang=
"en"
>
<input
type=
"hidden"
class=
"page-load"
id=
"user"
/>
<head>
<meta
charset=
"UTF-8"
>
<title>
Title
</title>
<link
rel=
"stylesheet"
href=
"../../../../resource/css/bootstrap.css"
type=
"text/css"
/>
<script
src=
"../../../../resource/lib/js/jquery-2.0.3.min.js"
></script>
<script
src=
"../../../../resource/lib/js/bootstrap.min.js"
></script>
</head>
<body
style=
"height: 100%"
>
<!-- Large modal -->
<button
type=
"button"
class=
"btn btn-primary"
data-toggle=
"modal"
data-target=
".bs-example-modal-lg"
>
Large modal
</button>
<div
class=
"modal fade bs-example-modal-lg"
tabindex=
"-1"
role=
"dialog"
aria-labelledby=
"myLargeModalLabel"
>
<div
class=
"modal-dialog modal-lg"
role=
"document"
>
<div
class=
"modal-content"
>
...
</div>
</div>
</div>
<!-- Small modal -->
<link
rel=
"stylesheet"
href=
"../../../../resource/css/bootstrap-combined.min.css"
type=
"text/css"
/>
<button
type=
"button"
class=
"btn btn-primary"
data-toggle=
"modal"
data-target=
".bs-example-modal-sm"
>
Small modal
</button>
<link
rel=
"stylesheet"
href=
"../../../../resource/css/bootstrap-datetimepicker.min.css"
type=
"text/css"
/>
<label>
编辑:
</label>
<?php
create_editor('describe');
?>
<input
readonly=
"readonly"
type=
"text"
name=
"cover_image"
id=
"cover_image"
class=
"require"
/>
<button
class=
"button6 Bannertu"
type=
"button"
>
选择图片
</button>
<span
class=
"tip"
>
建议尺寸288x320
</span>
Copy
Copy
<button
type=
"button"
class=
"btn btn-default"
aria-label=
"Left Align"
>
<span
class=
"glyphicon glyphicon-align-left"
aria-hidden=
"true"
></span>
</button>
<button
type=
"button"
class=
"btn btn-default btn-lg"
>
<span
class=
"glyphicon glyphicon-star"
aria-hidden=
"true"
></span>
Star
</button>
<div
class=
"modal fade bs-example-modal-sm"
tabindex=
"-1"
role=
"dialog"
aria-labelledby=
"mySmallModalLabel"
>
<div
id=
"datetimepicker"
class=
"input-append date"
>
<div
class=
"modal-dialog modal-sm"
role=
"document"
>
<input
type=
"text"
></input>
<div
class=
"modal-content"
>
<span
class=
"add-on"
>
...
<i
data-time-icon=
"icon-time"
data-date-icon=
"icon-calendar"
></i>
</div>
</span>
</div>
</div>
</div>
\ No newline at end of file
</body>
</html>
\ No newline at end of file
application/index/view/member/member1.html
deleted
100644 → 0
View file @
b0bfb948
{layout name="global/frame_tpl" /}
<input
type=
"hidden"
class=
"page-load"
id=
"user"
/>
<link
rel=
"stylesheet"
href=
"../../../../resource/css/bootstrap-combined.min.css"
type=
"text/css"
/>
<link
rel=
"stylesheet"
href=
"../../../../resource/css/bootstrap-datetimepicker.min.css"
type=
"text/css"
/>
<label>
编辑:
</label>
<?php
create_editor('describe');
?>
<input
readonly=
"readonly"
type=
"text"
name=
"cover_image"
id=
"cover_image"
class=
"require"
/>
<button
class=
"button6 Bannertu"
type=
"button"
>
选择图片
</button>
<span
class=
"tip"
>
建议尺寸288x320
</span>
Copy
<button
type=
"button"
class=
"btn btn-default"
aria-label=
"Left Align"
>
<span
class=
"glyphicon glyphicon-align-left"
aria-hidden=
"true"
></span>
</button>
<button
type=
"button"
class=
"btn btn-default btn-lg"
>
<span
class=
"glyphicon glyphicon-star"
aria-hidden=
"true"
></span>
Star
</button>
<div
id=
"datetimepicker"
class=
"input-append date"
>
<input
type=
"text"
></input>
<span
class=
"add-on"
>
<i
data-time-icon=
"icon-time"
data-date-icon=
"icon-calendar"
></i>
</span>
</div>
\ No newline at end of file
application/index/view/member/member23.html
0 → 100644
View file @
65f6e3fb
<!DOCTYPE html>
<html
lang=
"en"
>
<head>
<meta
charset=
"UTF-8"
>
<title>
Title
</title>
<link
rel=
"stylesheet"
href=
"../../../../resource/css/bootstrap.css"
type=
"text/css"
/>
<script
src=
"../../../../resource/lib/js/jquery-2.0.3.min.js"
></script>
<script
src=
"../../../../resource/lib/js/bootstrap.min.js"
></script>
</head>
<body
style=
"height: 100%"
>
<!-- Large modal -->
<button
type=
"button"
class=
"btn btn-primary"
data-toggle=
"modal"
data-target=
".bs-example-modal-lg"
>
Large modal
</button>
<div
class=
"modal fade bs-example-modal-lg"
tabindex=
"-1"
role=
"dialog"
aria-labelledby=
"myLargeModalLabel"
>
<div
class=
"modal-dialog modal-lg"
role=
"document"
>
<div
class=
"modal-content"
>
...
</div>
</div>
</div>
<!-- Small modal -->
<button
type=
"button"
class=
"btn btn-primary"
data-toggle=
"modal"
data-target=
".bs-example-modal-sm"
>
Small modal
</button>
<div
class=
"modal fade bs-example-modal-sm"
tabindex=
"-1"
role=
"dialog"
aria-labelledby=
"mySmallModalLabel"
>
<div
class=
"modal-dialog modal-sm"
role=
"document"
>
<div
class=
"modal-content"
>
...
</div>
</div>
</div>
</body>
</html>
\ No newline at end of file
application/route.php
View file @
65f6e3fb
...
@@ -49,12 +49,13 @@ Route::group('app', [
...
@@ -49,12 +49,13 @@ Route::group('app', [
Route
::
group
(
'index'
,
[
Route
::
group
(
'index'
,
[
/*
'member' => [ 'index/member.index/member', [ 'method' => 'get' ] ],
'member'
=>
[
'index/member.index/member'
,
[
'method'
=>
'get'
]
],
'preview_list'
=>
[
'index/member.index/preview_list'
,
[
'method'
=>
'get'
]
],
'preview_list'
=>
[
'index/member.index/preview_list'
,
[
'method'
=>
'get'
]
],
'consumer_list'
=>
[
'index/member.index/consumer_list'
,
[
'method'
=>
'get'
]
],
'consumer_list'
=>
[
'index/member.index/consumer_list'
,
[
'method'
=>
'get'
]
],
'diagram_list'
=>
[
'index/member.index/diagram_list'
,
[
'method'
=>
'get'
]
],
'diagram_list'
=>
[
'index/member.index/diagram_list'
,
[
'method'
=>
'get'
]
],
'entrust_list' => [ 'index/member.index/entrust_list', [ 'method' => 'get' ] ],
*/
'entrust_list'
=>
[
'index/member.index/entrust_list'
,
[
'method'
=>
'get'
]
],
'banner'
=>
[
'index/banner/index'
,
[
'method'
=>
'get'
]
],
'banner'
=>
[
'index/banner/index'
,
[
'method'
=>
'get'
]
],
'bannerList'
=>
[
'index/banner/getBannerList'
,
[
'method'
=>
'post'
]
],
]);
]);
...
...
public/resource/css/public.css
View file @
65f6e3fb
body
{
body
{
width
:
1335px
;
width
:
1335px
!important
;
margin
:
0
;
margin
:
0
;
margin
:
0
auto
;
margin
:
0
auto
;
background-color
:
#F2F2F2
;
background-color
:
#F2F2F2
;
list-style
:
none
list-style
:
none
;
padding-right
:
0px
!important
;
padding-right
:
0px
!important
;
}
}
a
:hover
{
a
:hover
{
...
...
public/resource/js/banner.js
0 → 100644
View file @
65f6e3fb
/**
* Created by zw on 2017/12/15.
*/
define
([
'doT'
,
'text!temp/banner_template_tpl.html'
,
'ckfinder'
,
'ckfinderStart'
,
'css!style/home.css'
,
'bootstrapJs'
],
function
(
doT
,
template
)
{
var
banner
=
{
init
:
function
()
{
//初始化dot
$
(
"body"
).
append
(
template
)
banner
.
event
()
banner
.
getBannerList
()
},
event
:
function
()
{
/*上传图片控件*/
$
(
".banner_img"
).
click
(
function
()
{
BrowseServer
(
'cover_image'
);
})
$
(
"#save_banner"
).
click
(
function
()
{
alert
(
"1111111"
);
})
},
/*获取banner list*/
getBannerList
:
function
()
{
$
.
ajax
({
url
:
'/index/bannerList'
,
type
:
'POST'
,
async
:
true
,
data
:
{
id
:
1
},
dataType
:
'json'
,
success
:
function
(
data
)
{
var
temp
=
document
.
getElementById
(
'banner_list_tpl'
).
innerHTML
var
doTtmpl
=
doT
.
template
(
temp
)
$
(
"#banner_list"
).
append
(
doTtmpl
(
data
))
}
})
}
}
return
banner
});
public/resource/js/user.js
View file @
65f6e3fb
...
@@ -7,24 +7,25 @@ define (['doT', 'text!temp/user_templete_tpl.html','ckfinder','ckfinderStart', '
...
@@ -7,24 +7,25 @@ define (['doT', 'text!temp/user_templete_tpl.html','ckfinder','ckfinderStart', '
user
.
getList
();
user
.
getList
();
user
.
event
();
user
.
event
();
//时间控件初始化
//时间控件初始化
$
(
'#datetimepicker'
).
datetimepicker
({
/*
$('#datetimepicker').datetimepicker({
format: 'yyyy-MM-dd',
format: 'yyyy-MM-dd',
language: 'zh-CN',
language: 'zh-CN',
pickTime: false
pickTime: false
}).on('changeDate',function(){
}).on('changeDate',function(){
$(this).datetimepicker('hide');
$(this).datetimepicker('hide');
});
});
*/
},
},
event
:
function
()
{
event
:
function
()
{
$
(
".Bannertu"
).
click
(
function
()
{
$
(
".Bannertu"
).
click
(
function
()
{
alert
(
1111
);
BrowseServer
(
'cover_image'
);
BrowseServer
(
'cover_image'
);
});
});
},
},
getList
:
function
()
{
getList
:
function
()
{
var
temp
=
document
.
getElementById
(
'user_index_tpl'
).
innerHTML
;
/*
var temp = document.getElementById ('user_index_tpl').innerHTML;
var doTtmpl = doT.template (temp);
var doTtmpl = doT.template (temp);
$
(
"body"
).
append
(
doTtmpl
());
$ ("body").append (doTtmpl ());
*/
}
}
}
}
return
user
;
return
user
;
...
...
public/resource/template/banner_template_tpl.html
0 → 100644
View file @
65f6e3fb
<script
id=
"banner_list_tpl"
type=
"text/template"
>
[
%
if
(
it
.
data
.
length
>
0
)
{
%
]
[
%
for
(
var
i
=
0
,
len
=
it
.
data
.
length
;
i
<
len
;
i
++
){
%
]
<
tr
>
<
td
>
[
%=
it
.
data
[
i
][
"title"
]
%
]
<
/td
>
<
td
>
<
img
src
=
"[%= it.data[i]['pic_path'] %]"
class
=
"diagram-image"
>
<
/td
>
<
td
>
[
%=
it
.
data
[
i
][
"url"
]
%
]
<
/td
>
<
td
>
[
%=
it
.
data
[
i
][
"sort"
]
%
]
<
/td
>
<
td
>
[
%=
it
.
data
[
i
][
"hits"
]
%
]
<
/td
>
<
td
>
[
%=
it
.
data
[
i
][
"up_user"
]
%
]
<
/td
>
<
td
>
<
a
class
=
"btn1 btn-success "
href
=
"#modal-do"
data
-
toggle
=
"modal"
>
编辑
<
/a
>
<
a
class
=
"btn1 btn-danger "
href
=
"#modal-delete"
data
-
toggle
=
"modal"
>
删除
<
/a
>
<
/td
>
<
/tr
>
[
%
}
%
]
[
%
}
else
{
%
]
<
tr
>
<
td
colspan
=
"7"
style
=
"text-align:center;"
>
暂无数据
<
/td
>
<
/tr
>
[
%
}
%
]
</script>
public/resource/template/user_templ
e
te_tpl.html
→
public/resource/template/user_templ
a
te_tpl.html
View file @
65f6e3fb
<script
id=
"
us
er_index_tpl"
type=
"text/template"
>
<script
id=
"
bann
er_index_tpl"
type=
"text/template"
>
this
is
template
block
this
is
template
block
</script>
</script>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment