作者 sgj
1 个管道 的构建 失败 耗费 7 秒

志愿者修改

... ... @@ -60,6 +60,18 @@ class ClockController extends AdminBaseController
->join('volunteer v','v.user_id=c.user_id')
->where($map)
->find();
if(empty($data['user_start'])){
$data['user_start']='';
}else{
$data['user_start']=date('Y-m-d H:i:s',$data['user_start']);
}
if(empty($data['user_end'])){
$data['user_end']='';
}else{
$data['user_end']=date('Y-m-d H:i:s',$data['user_end']);
}
$this->assign('data', $data);
return $this->fetch();
}
... ...
... ... @@ -98,4 +98,26 @@ class TeamController extends AdminBaseController
$this->error('操作失败');
}
}
/**
* 添加团队
* @return mixed
*/
public function addTeam(){
return $this->fetch();
}
/**
* 提交信息
*/
public function addPost(){
$data=input('');
$info=db('team')->insert($data);
if (!empty($info)){
$this->success('操作成功!');
}
}
}
\ No newline at end of file
... ...
... ... @@ -64,21 +64,21 @@
<th width="100">用户开始打卡时间<span class="form-required">*</span></th>
<td>
<input class="form-control" type="text" name="user_start"
type="time" id="title" value="{:date('Y-m-d H:i:s',$data.user_start)}" placeholder="请输入"/>
type="time" id="title" value="{$data.user_start}" placeholder="请输入"/>
</td>
</tr>
<tr>
<th width="100">用户结束打卡时间<span class="form-required">*</span></th>
<td>
<if condition="$data.user_end==0">
<if condition="empty($data.user_end)">
<input class="form-control" type="text" name="user_end"
type="time" value="{:date('Y-m-d H:i:s',$data.user_end)}" placeholder="请输入"/>
type="time" value="" placeholder="请输入"/>
<else />
<input class="form-control" type="text" name="user_end"
type="time" value="{:date('Y-m-d H:i:s',$data.user_end)}" placeholder="请输入"/>
type="time" value="{$data.user_end}" placeholder="请输入"/>
</if>
</td>
</td>
... ... @@ -92,8 +92,6 @@
<label><input type="radio" name="status" value="3" <eq name="$data.status" value="2">checked</eq> >未完成</label>
</td>
</tr>
</table>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
... ...
<include file="public@header"/>
</head>
<body>
<!--<script type="text/html" id="photos-item-tpl">-->
<!--<li id="saved-image{id}">-->
<!--<input id="photo-{id}" type="hidden" name="photo_urls[]" value="{filepath}">-->
<!--<input class="form-control" id="photo-{id}-name" type="text" name="photo_names[]" value="{name}"-->
<!--style="width: 200px;" title="图片名称">-->
<!--<img id="photo-{id}-preview" src="{url}" style="height:36px;width: 36px;"-->
<!--onclick="imagePreviewDialog(this.src);">-->
<!--<a href="javascript:uploadOneImage('图片上传','#photo-{id}');">替换</a>-->
<!--<a href="javascript:(function(){$('#saved-image{id}').remove();})();">移除</a>-->
<!--</li>-->
<!--</script>-->
<div class="wrap js-check-wrap">
<ul class="nav nav-tabs">
<li><a href="{:url('index')}">团队列表</a></li>
<!-- <li>
<a href="{:url('add')}">添加活动</a>
</li>-->
<li class="active"><a href="#">编辑团队</a></li>
</ul>
<form action="{:url('addPost')}" method="post" class="form-horizontal js-ajax-form margin-top-20">
<div class="row">
<div class="col-md-9">
<table class="table table-bordered">
<tr>
<th width="100">名称<span class="form-required">*</span></th>
<td>
<input class="form-control" type="text" name="name"
id="title" value="" placeholder="请输入名称"/>
</td>
</tr>
<tr>
<th width="100">内容<span class="form-required">*</span></th>
<td>
<script type="text/plain" id="content" name="content"></script>
</td>
</tr>
</table>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<button type="submit" class="btn btn-primary js-ajax-submit">{:lang('SAVE')}</button>
<a class="btn btn-default" href="javascript:history.back(-1);">{:lang('BACK')}</a>
</div>
</div>
</div>
<div class="col-md-3">
<table class="table table-bordered">
<tr>
<th>缩略图<span class="form-required">(335px*220px)</span></th>
</tr>
<tr>
<td>
<div style="text-align: center;">
<input type="hidden" name="pic" id="thumbnail"
value="{$data.pic|default=''}">
<a href="javascript:uploadOneImage('image upload','#thumbnail');">
<if condition="empty($data['pic'])">
<img src="__TMPL__/public/assets/images/default-thumbnail.png"
id="thumbnail-preview"
width="135" style="cursor: pointer"/>
<else/>
<img src="{:cmf_get_image_url($data.pic)}"
id="thumbnail-preview"
width="135" style="cursor: pointer"/>
</if>
</a>
<input type="button" class="btn btn-sm btn-cancel-thumbnail"
value="取消图片">
</div>
</td>
</tr>
<tr>
<th><b>城市</b></th>
</tr>
<tr>
<td>
<input class="form-control" type="text" name="city"
value="">
</td>
</tr>
</table>
</div>
</div>
</form>
</div>
<script type="text/javascript" src="__STATIC__/js/admin.js"></script>
<script type="text/javascript">
//编辑器路径定义
var editorURL = GV.WEB_ROOT;
</script>
<script type="text/javascript" src="__STATIC__/js/ueditor/ueditor.config.js"></script>
<script type="text/javascript" src="__STATIC__/js/ueditor/ueditor.all.min.js"></script>
<script type="text/javascript">
$(function () {
editorcontent = new baidu.editor.ui.Editor();
editorcontent.render('content');
try {
editorcontent.sync();
} catch (err) {
}
$('.btn-cancel-thumbnail').click(function () {
$('#thumbnail-preview').attr('src', '__TMPL__/public/assets/images/default-thumbnail.png');
$('#thumbnail').val('');
});
$('.btn-cancel-thumbnail1').click(function () {
$('#thumbnail-preview1').attr('src', '__TMPL__/public/assets/images/default-thumbnail.png');
$('#thumbnail1').val('');
});
});
</script>
</body>
</html>
... ...
... ... @@ -4,7 +4,7 @@
<div class="wrap js-check-wrap">
<ul class="nav nav-tabs">
<li class="active"><a href="{:url('index')}">团队列表</a></li>
<!--<li><a href="{:url('add')}">添加</a></li>-->
<li><a href="{:url('addteam')}">添加团队</a></li>
</ul>
<!-- <form class="well form-inline margin-top-20" method="post" action="{:url('activity/index')}">
关键字:
... ...