Commit b66b8a69 by wanggang

修改后台BUG,细节

parent eb63d312
......@@ -9,8 +9,13 @@ class Banner extends AuthBase{
parent::_initialize();
}
public function index(){
$status = input('get.status');
$condition = [];
if($status){
$condition['status'] = $status;
}
$banner_model = model('banner');
$banner_list = $banner_model->order('created_at','desc')->select();
$banner_list = $banner_model->where($condition)->order('created_at','desc')->paginate(10,false,['query'=>['status'=>$status]]);
$this->assign('banner_list',$banner_list);
return $this -> fetch();
}
......
......@@ -60,6 +60,7 @@ class Guide extends AuthBase
'tags' => $data['tags'],
'title' => $data['title'],
'type' => $type,
'intro' => input('post.intro'),
'content' => htmlspecialchars($data['content'])
]);
if ($article->save()) {
......@@ -112,6 +113,7 @@ class Guide extends AuthBase
$condition = [
'tags' => $data['tags'],
'title' => $data['title'],
'intro' => input('post.intro'),
'type' => $type,
'content' => htmlspecialchars($data['content'])
];
......@@ -124,13 +126,13 @@ class Guide extends AuthBase
return view();
}
// 将资源目录该图的引用设为0
$resource_model = model('Resource');
$res = $resource_model->where('address',input('post.old_poster'))->setDec("use_num");
// $resource_model = model('Resource');
// $res = $resource_model->where('address',input('post.old_poster'))->setDec("use_num");
$condition['poster'] = $result['result']['url'];
}
$article = new PostModel($condition);
if ($article->save()) {
$res = model('post')->save($condition,['id'=>$id]);
if ($res) {
$this->redirect(url('@admin/Guide/index'));
} else {
return view();
......
......@@ -13,50 +13,86 @@ class Order extends AuthBase
// 订单列表
public function index(){
$status = input('get.status','-1');
$id = input('get.id');
$start_time = input('get.start_time');
$end_time = input('get.end_time');
$type = input('get.type');
$condition = [];
if($status!='-1'){
$condition['status']=$status;
}
$order_list = $this->order_model->where($condition)->order('created_at desc')->paginate(10,['query'=>['status'=>$status]]);
if($id){
$condition['id']=$id;
}
if($type){
$condition['type']=$type;
}
if($start_time&&$end_time){
$condition['created_at'] = ['between',[$start_time.' 00:00:00',$end_time.' 00:00:00']];
}else{
if($start_time){
$condition['created_at'] = ['>',$start_time.' 00:00:00'];
}elseif($end_time){
$condition['created_at'] = ['<',$end_time.' 00:00:00'];
}
}
$order_list = $this->order_model->where($condition)->order('created_at desc')->paginate(10,false,['query'=>['status'=>$status,'start_time'=>$start_time,'end_time'=>$end_time,'type'=>$type]]);
$this->assign("order_list",$order_list);
$this->assign("status",$status);
return $this->fetch();
}
// 退款审核
public function refund(){
$id = input('get.id');
$status = input('get.status','-1');
$condition = [];
if($status!='-1'){
$condition['status']=$status;
}
$refund_list = model('Refund')->where($condition)->order('created_at desc')->paginate(10,['query'=>['status'=>$status]]);
if($id){
$condition['id']=$id;
}
$refund_list = model('Refund')->where($condition)->order('created_at desc')->paginate(10,false,['query'=>['status'=>$status]]);
$this->assign('status',$status);
$this->assign('refund_list',$refund_list);
return $this->fetch();
}
// 评论审核
public function comment(){
$id = input('get.id');
$status = input('get.status','-1');
$condition = [];
if($status!='-1'){
$condition['status']=$status;
}
$comment_list = model('comment')->where($condition)->order('created_at desc')->paginate(10,['query'=>['status'=>$status]]);
if($id){
$condition['id']=$id;
}
$comment_list = model('comment')->where($condition)->order('created_at desc')->paginate(10,false,['query'=>['status'=>$status]]);
$this->assign('status',$status);
$this->assign('comment_list',$comment_list);
return $this->fetch();
}
public function commentStatus($status,$id){
$res = model('comment')->save(['status'=>$status],['id' => $id]);
$comment_model = model('comment');
$res = $comment_model->save(['status'=>$status],['id' => $id]);
if($status==2){
$is_comment = 3;
}elseif($status==3){
$is_comment = 2;
}
$status_str = array(
'1'=>'已退回重新审核该评论',
'2'=>'已审核通过该评论',
'3'=>'已设置该评论审核不通过'
'2'=>'请求成功,已审核通过该评论',
'3'=>'请求成功,该评论审核不通过'
);
if($res){
$this->success($status_str[$status],null,'',2);
$comment_info = $comment_model->get($id);
if($comment_info){
$set_order_res = model('order')->save(['is_comment'=>$is_comment],['id'=>$comment_info['order_id']]);
}
$this->success($status_str[$status]);
}else{
$this->error('修改失败,本次审核无效',null,'',2);
$this->error('修改失败,本次审核无效');
}
}
......
......@@ -35,9 +35,26 @@ class Project extends AuthBase
// $tag_arr = explode(',',$tags);
//
// });
$title = input('get.title','');
$project_list = $this->project_model->where('title','like',"%".$title."%")->order('created_at desc')->paginate(10,['query'=>['title'=>$title]]);
$title = input('get.title');
$type = input('get.type');
$catalog_id = input('get.catalog_id');
$condition = [];
if($title){
$condition['title'] = ['like',"%".$title."%"];
}
if($type){
$condition['type'] = $type;
}
if($catalog_id){
$condition['catalog_id'] = $catalog_id;
}
$catalog_list = $this->catalog_model->order('sort','asc')->select();
$this -> assign('catalog_list', $catalog_list);
$project_list =
$this->project_model
->where($condition)->order('created_at desc')
->paginate(10,false,['query'=>['title'=>$title,'type'=>$type,'catalog_id'=>$catalog_id]]);
$this->assign('project_list',$project_list);
return $this->fetch('');
}
......@@ -120,27 +137,26 @@ class Project extends AuthBase
$banners = [];
$project_info = $this->project_model -> find($id);
$old_banners = json_decode($project_info['banners']);
$old_banners = json_decode($project_info['banners_native']);
$old_poster = $project_info['poster'];
$old_kf_qrcode = $project_info['kf_qrcode'];
$resource_model = model('resource');
// $resource_model = model('resource');
if($data['type']==2){
if(input('file.kf_qrcode')){
$result = $upload->sava(input('file.kf_qrcode'));
if(!$result['error']){
$resource_model -> where('address',$old_kf_qrcode)->delete();
// $resource_model -> where('address',$old_kf_qrcode)->delete();
$kf_qrcode = $result['result']['url'];
$data['kf_qrcode'] = $kf_qrcode;
echo($kf_qrcode);
}
}
}
if(input('file.poster')){
$result = $upload->sava(input('file.poster'));
if(!$result['error']){
$resource_model -> where('address',$old_poster)->delete();
// $resource_model -> where('address',$old_poster)->delete();
$poster = $result['result']['url'];
$data['poster'] = $poster;
}
......@@ -154,7 +170,6 @@ class Project extends AuthBase
}
}
$data['banners'] = json_encode(array_merge($banners,$old_banners));
echo($data['banners']);
}
// $result = $upload -> sava(input('file.banners'));
......@@ -317,7 +332,6 @@ class Project extends AuthBase
}
public function addCatalogs(){
if (request()->isPost()) {
$data = array(
'name' => trim(input('post.name')),
'sort' => input('post.sort',0),
......@@ -371,8 +385,8 @@ class Project extends AuthBase
return view();
}
// 将资源目录该图的引用设为0
$resource_model = model('Resource');
$res = $resource_model->where('address',input('post.old_poster'))->setDec("use_num");
// $resource_model = model('Resource');
// $res = $resource_model->where('address',input('post.old_poster'))->setDec("use_num");
$data['poster'] = $result['result']['url'];
}
$res = $this->catalog_model->save($data,['id'=>$id]);
......@@ -389,9 +403,9 @@ class Project extends AuthBase
if($used>0){
$this->error('该分类下有项目,不可删除!','','',1);
}
$catalog_info = model('catalogs')->find($id);
$old_image = $banner_info['poster'];
model('resource') -> where('address',$old_image)->delete();
// $catalog_info = model('catalogs')->find($id);
// $old_image = $catalog_info['poster'];
// model('resource') -> where('address',$old_image)->delete();
$res = model('catalogs')->destroy($id);
if($res){
$this->success('删除成功','','',1);
......@@ -407,11 +421,11 @@ class Project extends AuthBase
$id = input('post.id');
$address = input('post.address');
$resource_model = model('resource');
$del_res = $resource_model -> where('address',$address)->delete();
// $resource_model = model('resource');
// $del_res = $resource_model -> where('address',$address)->delete();
$project_info = $this->project_model -> find($id);
$banners = json_decode($project_info['banners']);
$banners = json_decode($project_info['banners_native']);
$new_banners = array_merge(array_diff($banners, array($address)));
$up_res = 0;
if($new_banners!=$banners){
......@@ -425,7 +439,7 @@ class Project extends AuthBase
'data' => input('post.'),
'old_banners' => $banners,
'new_banner' => $new_banners,
'del_res' => $del_res
// 'del_res' => $del_res
);
}else{
return array(
......@@ -433,7 +447,7 @@ class Project extends AuthBase
'data' => input('post.'),
'old_banners' => $banners,
'new_banner' => $new_banners,
'del_res' => $del_res
// 'del_res' => $del_res
);
}
......
......@@ -17,8 +17,30 @@ class User extends AuthBase
parent::_initialize();
}
public function index(){
$nickname = input('get.nickname');
$is_vip = input('get.is_vip');
$start_time = input('get.start_time');
$end_time = input('get.end_time');
$condition = [];
if($nickname){
$condition['nickname'] = ['like','%'.$nickname.'%'];
}
if($is_vip){
$condition['is_vip'] = $is_vip;
}
if($start_time&&$end_time){
$condition['created_at'] = ['between',[$start_time.' 00:00:00',$end_time.' 00:00:00']];
}else{
if($start_time){
$condition['created_at'] = ['>',$start_time.' 00:00:00'];
}elseif($end_time){
$condition['created_at'] = ['<',$end_time.' 00:00:00'];
}
}
$user_model = model('user');
$user_list = $user_model->order('created_at desc')->paginate(10);
$user_list = $user_model->where($condition)->order('created_at desc')
->paginate(10,['query'=>['nickname'=>$nickname,'is_vip'=>$is_vip,'start_time'=>$start_time,'end_time'=>$end_time]]);
$this->assign('user_list',$user_list);
return $this->fetch();
......
......@@ -14,7 +14,7 @@
<section class="wrapper">
<h3 class="">
<a href="<?php echo url('@admin/Post/index')?>">
<i class="fa fa-angle-right"></i> <a href="{:url('admin/post/index')}">文章管理</a> <i class="fa fa-angle-right"></i> 发布文章
<i class="fa fa-angle-right"></i> <a href="{:url('admin/banner/index')}">轮播图管理</a> <i class="fa fa-angle-right"></i> 添加轮播图
</a>
</h3>
<hr>
......@@ -41,7 +41,7 @@
</div>
<div class="form-group">
<label for="title" class="col-sm-1 control-label text-right">文章类型</label>
<label for="title" class="col-sm-1 control-label text-right">Banner类型</label>
<div class="col-lg-10">
<select class="form-control" name="type" id="post_type">
<option value="1">小程序页面路径</option>
......
......@@ -7,7 +7,17 @@
<div class="row margin-bottom">
<div class="col-md-12">
<div class="">
<form class="form-inline pull-left" method="GET" id="order-search" action="<?php echo url('@admin/banner/index')?>">
<div class="form-group">
<select name="status" class="form-control" id="status">
<option value="">显示状态</option>
<option value="1" {if condition="input('status')=='1'"}selected{/if}>显示</option>
<option value="2" {if condition="input('status')=='2'"}selected{/if}>不显示</option>
</select>
</div>
<!--<button type="submit" class="btn btn-primary">搜索</button>-->
</form>
<div class="pull-right">
<a href="{:url('admin/banner/create')}" class="btn btn-success">添加轮播图</a>
</div>
</div>
......@@ -26,7 +36,7 @@
<!--</colgroup>-->
<thead>
<tr>
<th>#</th>
<th>ID</th>
<th>图片</th>
<th>类型</th>
<th>地址</th>
......@@ -38,7 +48,7 @@
<tbody>
{volist name="banner_list" id="vo" key="k" empty="暂时没有数据"}
<tr id="tr_{$vo.id}">
<td>{$k}</td>
<td>{$vo.id}</td>
<td><img src="{$vo.image}" style="width:170px" alt=""></td>
<td>
{if condition="$vo.type==1"}
......@@ -67,10 +77,18 @@
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
{$banner_list->render()}
</div>
</div>
</section>
<script type="text/javascript">
// 文档加载完毕之后,会进入该方法
$("#status").change(function(){
$("#order-search").submit();
});
$(function(){
$(".btn-delete").click(function(){
var _this = $(this);
......
......@@ -14,7 +14,7 @@
<section class="wrapper">
<h3 class="">
<a href="<?php echo url('@admin/Post/index')?>">
<i class="fa fa-angle-right"></i> <a href="{:url('admin/post/index')}">文章管理</a> <i class="fa fa-angle-right"></i> 发布文章
<i class="fa fa-angle-right"></i> <a href="{:url('admin/banner/index')}">轮播图管理</a> <i class="fa fa-angle-right"></i> 修改
</a>
</h3>
<hr>
......
......@@ -33,20 +33,26 @@
<div class="col-md-12">
<form name="myFrom" class="form-horizontal" enctype="multipart/form-data" method="POST" action="<?php echo url("@admin/Guide/create")?>" id="article-create-form">
<div class="form-group">
<label for="title" class="col-sm-1 control-label text-right">文章标题</label>
<div class="col-lg-10">
<input type="text" class="form-control validate[required]" name="title" id="title" placeholder="文章标题 ">
<label for="title" class="col-sm-2 control-label text-right">攻略标题</label>
<div class="col-sm-10 col-md-8 col-lg-6">
<input type="text" class="form-control validate[required]" name="title" id="title" placeholder="请输入美行攻略的标题">
</div>
</div>
<div class="form-group">
<label for="title" class="col-sm-1 control-label text-right" >文章封面</label>
<div class="col-lg-10">
<label for="title" class="col-sm-2 control-label text-right">攻略描述</label>
<div class="col-sm-10 col-md-8 col-lg-6">
<textarea name="intro" id="" cols="30" rows="3" class="form-control" placeholder="请输入美行攻略的简单描述"></textarea>
</div>
</div>
<div class="form-group">
<label for="title" class="col-sm-2 control-label text-right" >攻略封面</label>
<div class="col-sm-10 col-md-8 col-lg-6">
<input id="input-b1" name="poster" type="file">
</div>
</div>
<div class="form-group">
<label for="title" class="col-sm-1 control-label text-right">文章标签</label>
<div class="col-lg-10">
<label for="title" class="col-sm-2 control-label text-right">攻略标签</label>
<div class="col-sm-10 col-md-8 col-lg-6">
<input type="hidden" name="tags" id="tags" value="">
<select class="selectpicker form-control" id="tags_select" multiple data-live-search="true" onchange="setTags()">
{volist name="tag_list" name="tag_list" id="vo"}
......@@ -56,8 +62,8 @@
</div>
</div>
<div class="form-group">
<label for="title" class="col-sm-1 control-label text-right">文章类型</label>
<div class="col-lg-10">
<label for="title" class="col-sm-2 control-label text-right">攻略类型</label>
<div class="col-sm-10 col-md-8 col-lg-6">
<select class="form-control" name="type" id="post_type">
<option value="1">手动编写文章</option>
<option value="2">链接到网络文章</option>
......@@ -65,23 +71,24 @@
</div>
</div>
<div class="form-group" id="href" style="display: none">
<label for="title" class="col-sm-1 control-label text-right">请输入url</label>
<div class="col-lg-10">
<label for="title" class="col-sm-2 control-label text-right">请输入url</label>
<div class="col-sm-10 col-md-8 col-lg-6">
<input type="text" name="href" class="form-control">
<code>http:// + 网址 或 https:// + 网址</code>
</div>
</div>
<div class="form-group" id="content">
<label for="content" class="col-sm-1 control-label text-right">文章内容</label>
<div class="col-lg-10">
<label for="content" class="col-sm-2 control-label text-right">攻略详情</label>
<div class="col-sm-10 col-md-8 col-lg-6">
<!-- 加载编辑器的容器 -->
<script id="post_container" name="content" type="text/plain" style="width: 100%">
</script>
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-1 col-sm-10">
<button type="submit" class="btn btn-default" id="btn-save">提交</button>
<div class="col-sm-offset-2 col-sm-10">
<button type="submit" class="btn btn-success" id="btn-save">提交</button>
</div>
</div>
</form>
......
{layout name="public/layout_main"}
<section class="wrapper">
<h3><i class="fa fa-angle-right"></i> 文章管理</h3>
<h3><i class="fa fa-angle-right"></i> 美行攻略</h3>
<!-- 分割线 -->
<hr>
<div class="row margin-bottom">
<div class="col-md-12">
<form class="form-inline" method="GET" action="<?php echo url('@admin/Guide/index')?>">
<form class="form-inline pull-left" method="GET" action="<?php echo url('@admin/Guide/index')?>">
<div class="form-group margin-right">
<label for="title">文章标题</label>
<input class="form-control" type="text" name="title" id="title" value="<?php echo input('title');?>" />
<input class="form-control" type="text" name="title" id="title" value="<?php echo input('title');?>" placeholder="攻略标题"/>
</div>
<button type="submit" class="btn btn-primary">搜索</button>
</form>
<div class="pull-right">
<a href='<?php echo url("@admin/Guide/create")?>' type="button" class="btn btn-success" style="margin-left:30px;">
发布文章
发布攻略
</a>
</form>
</div>
</div>
</div>
......@@ -26,8 +27,8 @@
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>#</th>
<th>文章标题</th>
<th>ID</th>
<th>攻略标题</th>
<th>封面</th>
<th>发布时间</th>
<th>操作</th>
......@@ -48,7 +49,7 @@
</a>
{/if}
</td>
<td><img style="width: 170px" src="{$article->poster}" alt=""></td>
<td><img style="width: 90px" src="{$article->poster}" alt=""></td>
<td><?php echo $article->created_at;?></td>
<td style="min-width:100px;">
<a href="<?php echo url('@admin/Guide/update', 'id='.$article->id);?>" type="button" class="btn btn-primary btn-xs" data-toggle="tooltip" data-placement="top" data-original-title="编辑">
......
......@@ -13,7 +13,7 @@
<section class="wrapper">
<h3 class="">
<a href="<?php echo url('@admin/Guide/index')?>">
<i class="fa fa-angle-right"></i> <a href="{:url('admin/Guide/index')}">文章管理</a> <i class="fa fa-angle-right"></i> 发布文章
<i class="fa fa-angle-right"></i> <a href="{:url('admin/Guide/index')}">美行攻略</a> <i class="fa fa-angle-right"></i> 修改攻略
</a>
</h3>
<hr>
......@@ -33,22 +33,28 @@
<div class="col-md-12">
<form name="myFrom" class="form-horizontal" enctype="multipart/form-data" method="POST" action="<?php echo url("@admin/Guide/update/id/".$article['id'])?>" id="article-create-form">
<div class="form-group">
<label for="title" class="col-sm-1 control-label text-right">文章标题</label>
<div class="col-lg-10">
<input type="text" class="form-control validate[required]" value="{$article.title}" name="title" id="title" placeholder="文章标题 ">
<label for="title" class="col-sm-2 control-label text-right">攻略标题</label>
<div class="col-sm-20 col-md-8 col-lg-6">
<input type="text" class="form-control validate[required]" value="{$article.title}" name="title" id="title" placeholder="请输入美行攻略的标题 ">
</div>
</div>
<div class="form-group">
<label for="title" class="col-sm-1 control-label text-right" >文章封面</label>
<div class="col-lg-10">
<label for="title" class="col-sm-2 control-label text-right">攻略描述</label>
<div class="col-sm-10 col-md-8 col-lg-6">
<textarea name="intro" id="" cols="30" rows="3" class="form-control" placeholder="请输入美行攻略的简单描述">{$article.intro}</textarea>
</div>
</div>
<div class="form-group">
<label for="title" class="col-sm-2 control-label text-right" >攻略封面</label>
<div class="col-sm-20 col-md-8 col-lg-6">
<input type="hidden" name='old_poster' value="{$article.poster}">
<img src="{$article.poster}" style="width:170px;margin-bottom:10px" alt="" id="poster_view">
<input id="input-b1" name="poster" type="file">
</div>
</div>
<div class="form-group">
<label for="title" class="col-sm-1 control-label text-right">文章标签</label>
<div class="col-lg-10">
<label for="title" class="col-sm-2 control-label text-right">攻略标签</label>
<div class="col-sm-20 col-md-8 col-lg-6">
<input type="hidden" name="tags" id="tags" value="{$tags}">
<select class="selectpicker form-control" name="tags" multiple data-live-search="true">
{volist name="tag_list" name="tag_list" id="vo"}
......@@ -58,8 +64,8 @@
</div>
</div>
<div class="form-group">
<label for="title" class="col-sm-1 control-label text-right">文章类型</label>
<div class="col-lg-10">
<label for="title" class="col-sm-2 control-label text-right">攻略类型</label>
<div class="col-sm-20 col-md-8 col-lg-6">
<select class="form-control" name="type" id="post_type">
<option {if condition="$article.type == 1"}selected{/if} value="1">手动编写文章</option>
<option {if condition="$article.type == 2"}selected{/if} value="2">链接到网络文章</option>
......@@ -67,8 +73,8 @@
</div>
</div>
<div class="form-group" id="href" style="display: none">
<label for="title" class="col-sm-1 control-label text-right">请输入url</label>
<div class="col-lg-10">
<label for="title" class="col-sm-2 control-label text-right">请输入url</label>
<div class="col-sm-20 col-md-8 col-lg-6">
{if condition="$article.type == 1"}
<input type="text" name="href" class="form-control">
{else/}
......@@ -78,8 +84,8 @@
</div>
</div>
<div class="form-group" id="content">
<label for="content" class="col-sm-1 control-label text-right">文章内容</label>
<div class="col-lg-10">
<label for="content" class="col-sm-2 control-label text-right">攻略详情</label>
<div class="col-sm-20 col-md-8 col-lg-6">
<!-- 加载编辑器的容器 -->
{if condition="$article.type == 1"}
<script id="post_container" name="content" type="text/plain" style="width: 100%">
......@@ -92,8 +98,8 @@
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-1 col-sm-10">
<button type="submit" class="btn btn-default" id="btn-save">提交</button>
<div class="col-sm-offset-2 col-sm-10">
<button type="submit" class="btn btn-success" id="btn-save">修改</button>
</div>
</div>
</form>
......
......@@ -68,7 +68,7 @@
</span>
</div>
<span class="text-lg">
<a class="whitelink" href="/admin/Activity/index">订单总数</a>
<a class="whitelink" href="/admin/order/index">订单总数</a>
</span>
</div>
<div class="col-md-6">
......@@ -79,7 +79,7 @@
</span>
</div>
<span class="text-lg">
<a class="whitelink" href="/admin/Project/index">今日新增订单数</a>
<a class="whitelink" href="/admin/order/index">今日新增订单数</a>
</span>
</div>
</div>
......@@ -96,7 +96,7 @@
</span>
</div>
<span class="text-lg">
<a class="whitelink" href="/admin/Activity/index">退款待审核</a>
<a class="whitelink" href="{:url('/admin/order/refund?status=1')}">退款待审核</a>
</span>
</div>
<div class="col-md-6">
......@@ -107,7 +107,7 @@
</span>
</div>
<span class="text-lg">
<a class="whitelink" href="/admin/Project/index">评论待审核</a>
<a class="whitelink" href="{:url('/admin/order/comment?status=1')}">评论待审核</a>
</span>
</div>
</div>
......
......@@ -9,9 +9,8 @@
<div class="col-md-12">
<form class="form-inline" method="GET" id="order-search" action="<?php echo url('@admin/order/comment')?>">
<div class="form-group">
<label for="title">评论审核状态</label>
<select name="status" class="form-control" id="status">
<option value="-1" {if condition="$status=='-1'"}selected{/if}>全部</option>
<option value="-1" {if condition="$status=='-1'"}selected{/if}>全部审核状态</option>
<option value="1" {if condition="$status=='1'"}selected{/if}>审核中</option>
<option value="2" {if condition="$status=='2'"}selected{/if}>审核通过</option>
<option value="3" {if condition="$status=='3'"}selected{/if}>审核失败</option>
......@@ -28,7 +27,7 @@
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>#</th>
<th>ID</th>
<th>项目信息</th>
<th>用户信息</th>
<th>评分</th>
......@@ -40,7 +39,7 @@
<tbody>
{volist name="$comment_list" id="vo" key="k" empty="暂时没有数据"}
<tr>
<td>{$k}</td>
<td>{$vo.id}</td>
<td>
<img src="{$vo.project.poster}" style="width:70px;display:block;margin:0 auto;" alt="">
<p style="padding:0;margin:0;text-align:center">{$vo.project.title}</p>
......@@ -67,12 +66,14 @@
</span>
</td>
<td>
{if condition="$vo.status == 1"}
<a href="{:url('admin/order/commentStatus',['status'=>2,'id'=>$vo.id])}" class="btn btn-xs btn-primary">审核通过</a>
<a href="{:url('admin/order/commentStatus',['status'=>3,'id'=>$vo.id])}" class="btn btn-xs btn-warning">审核不通过</a>
{else/}
<a href="{:url('admin/order/commentStatus',['status'=>1,'id'=>$vo.id])}" class="btn btn-xs btn-primary">退回重审</a>
{/if}
<a href="javascript:" class="btn btn-primary btn-xs check-btn" data-id="{$vo.id}">审核</a>
<!--{if condition="$vo.status == 1"}-->
<!--<a href="{:url('admin/order/commentStatus',['status'=>2,'id'=>$vo.id])}" class="btn btn-xs btn-primary">审核通过</a>-->
<!--<a href="{:url('admin/order/commentStatus',['status'=>3,'id'=>$vo.id])}" class="btn btn-xs btn-warning">审核不通过</a>-->
<!--{else/}-->
<!--<a href="{:url('admin/order/commentStatus',['status'=>1,'id'=>$vo.id])}" class="btn btn-xs btn-primary">退回重审</a>-->
<!--{/if}-->
<!--<a href="##" class="btn btn-xs btn-danger ">删除</a>-->
</td>
</tr>
......@@ -89,11 +90,32 @@
</div>
</section>
<div class="modal fade" id="mymodal">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
评论审核
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
</div>
<div class="modal-body" style="text-align: center">
<input type="radio" name="state" id="state-1" value="2">
<label for="state-1" class="margin-right">
审核通过
</label>
<input type="radio" name="state" id="state-2" value="3">
<label for="state-2">审核不通过</label>
</div>
<div class="modal-footer">
<button class="btn btn-default" data-dismiss="modal" aria-hidden="true">取消</button>
<button class="btn btn-primary" id="set_status">确定</button>
</div>
</div>
</div>
</div>
<script type="text/javascript">
$("#status").change(function(){
$("#order-search").submit();
});
// 文档加载完毕之后,会进入该方法
$(function(){
$(".btn-delete").click(function(){
......@@ -114,5 +136,22 @@
});
});
});
$("#status").change(function(){
$("#order-search").submit();
});
$(".check-btn").click(function(){
comment_id = $(this).data('id');
$("#mymodal").modal();
});
$("#set_status").click(function(){
$("#mymodal").fadeOut();
var status = $("input[name='state']:checked").val();
$.post("{:url('admin/order/commentStatus')}",{id:comment_id,status:status},function(data){
if(data['code']==1){
alert(data['msg']);
window.location.reload();
}
});
});
});
</script>
......@@ -8,17 +8,33 @@
<div class="row margin-bottom">
<div class="col-md-12">
<form class="form-inline" method="GET" id="order-search" action="<?php echo url('@admin/order/index')?>">
<div class="form-group">
<label for="title">订单状态</label>
<div class="form-group margin-right">
<select name="status" class="form-control" id="status">
<option value="-1" {if condition="$status=='-1'"}selected{/if}>全部</option>
<option value="0" {if condition="$status=='0'"}selected{/if}>付款</option>
<option value="-1" {if condition="$status=='-1'"}selected{/if}>全部订单状态</option>
<option value="0" {if condition="$status=='0'"}selected{/if}>付款</option>
<option value="1" {if condition="$status=='1'"}selected{/if}>进行中</option>
<option value="2" {if condition="$status=='2'"}selected{/if}>待评价</option>
<option value="3" {if condition="$status=='3'"}selected{/if}>已完成</option>
</select>
</div>
<!--<button type="submit" class="btn btn-primary">搜索</button>-->
<div class="form-group margin-right">
<select name="type" class="form-control">
<option value="">全部订单类型</option>
<option value="1" {if condition="input('type')=='1'"}selected{/if}>活动报名订单</option>
<option value="2" {if condition="input('type')=='2'"}selected{/if}>购买会员卡订单</option>
</select>
</div>
<div class="form-group margin-right">
<label for="">下单时间:</label>
<input class="form-control" type="date" name="start_time" value="{:input('start_time')}" placeholder="起始"/>
--
<input class="form-control" type="date" name="end_time" value="{:input('end_time')}" placeholder="结束"/>
</div>
<div class="form-group margin-right">
<label for="output">导出</label>
<input type="checkbox" name="output" id="output">
</div>
<button type="submit" class="btn btn-primary">搜索</button>
</form>
</div>
</div>
......@@ -29,7 +45,7 @@
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>#</th>
<th>ID</th>
<th>订单标题</th>
<th>订单来源</th>
<th>项目信息</th>
......@@ -39,14 +55,15 @@
<th>微信pay_id</th>
<th>微信交易订单号</th>
<th>微信支付状态</th>
<th>有无退款</th>
<th>有无评论</th>
<th>退款状态</th>
<th>评论状态</th>
<th>下单时间</th>
</tr>
</thead>
<tbody>
{volist name="order_list" id="vo" key="k" empty="暂时没有数据"}
<tr>
<td>{$k}</td>
<td>{$vo.id}</td>
<td>{$vo.title}</td>
<td>
{if condition="$vo.type == 1"}
......@@ -70,7 +87,7 @@
<td>{$vo.total_fee}</td>
<!--订单状态-->
<td>
<span style="color:{$vo.status_name.color}">{$vo.status_name.name}</span>
<span style="color:{$vo.status_name.color}">{$vo.StatusText}</span>
</td>
<td>
{$vo.prepay_id}
......@@ -83,19 +100,30 @@
</td>
<td>
{if condition="$vo.is_refund == 0"}
无退款申请
{else/}
有退款申请
无退款
{elseif condition="$vo.is_refund == 1"/}
<a href="{:url('/admin/order/refund?id='.$vo.linkrefund.id)}">退款申请中</a>
{elseif condition="$vo.is_refund == 2"/}
<a href="{:url('/admin/order/refund?id='.$vo.linkrefund.id)}">退款失败</a>
{elseif condition="$vo.is_refund == 3"/}
<a href="{:url('/admin/order/refund?id='.$vo.linkrefund.id)}">退款成功</a>
{/if}
<!--0-无退款申请,1-有退款申请,2-退款失败,3-退款成功-->
</td>
<!--无退款、退款申请中、退款失败、退款成功;无评论、评论审核中、评论失败、评论成功。-->
<td>
{if condition="$vo.is_comment == 0"}
无评论
{else/}
有评论
{elseif condition="$vo.is_comment == 1"/}
<a href="{:url('/admin/order/comment?id='.$vo.linkcomment.id)}">评论审核中</a>
{elseif condition="$vo.is_comment == 2"/}
<a href="{:url('/admin/order/comment?id='.$vo.linkcomment.id)}">评论失败</a>
{elseif condition="$vo.is_comment == 3"/}
<a href="{:url('/admin/order/comment?id='.$vo.linkcomment.id)}">评论成功</a>
<!--0-无评论,1-审核中,2-未通过审核,3-评论成功-->
{/if}
</td>
<td>{$vo.created_at}</td>
</tr>
{/volist}
</tbody>
......@@ -112,9 +140,6 @@
</section>
<script type="text/javascript">
$("#status").change(function(){
$("#order-search").submit();
});
// 文档加载完毕之后,会进入该方法
$(function(){
$(".btn-delete").click(function(){
......
......@@ -9,9 +9,8 @@
<div class="col-md-12">
<form class="form-inline" method="GET" id="order-search" action="<?php echo url('@admin/order/refund')?>">
<div class="form-group">
<label for="title">退款状态</label>
<select name="status" class="form-control" id="status">
<option value="-1" {if condition="$status=='-1'"}selected{/if}>全部</option>
<option value="-1" {if condition="$status=='-1'"}selected{/if}>全部退款状态</option>
<option value="1" {if condition="$status=='1'"}selected{/if}>申请中</option>
<option value="2" {if condition="$status=='2'"}selected{/if}>退款成功</option>
<option value="3" {if condition="$status=='3'"}selected{/if}>退款失败</option>
......@@ -28,7 +27,7 @@
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>#</th>
<th>ID</th>
<th>订单标题</th>
<th>订单来源</th>
<th>项目信息</th>
......@@ -44,7 +43,7 @@
<tbody>
{volist name="$refund_list" id="vo" key="k" empty="暂时没有数据"}
<tr>
<td>{$k}</td>
<td>{$vo.id}</td>
<td>{$vo.order.title}</td>
<td>
{if condition="$vo.order.type == 1"}
......@@ -82,8 +81,12 @@
</span>
</td>
<td>
<a href="##" class="btn btn-xs btn-primary">退款</a>
<a href="##" class="btn btn-xs btn-warning">驳回</a>
{if condition="$vo.status == 1"}
<a href="javascript:" class="btn btn-primary btn-xs check-btn" data-id="{$vo.id}">审核</a>
{/if}
<!--<a href="##" class="btn btn-xs btn-primary">退款</a>-->
<!--<a href="##" class="btn btn-xs btn-warning">驳回</a>-->
</td>
</tr>
{/volist}
......@@ -97,7 +100,30 @@
{$refund_list->render()}
</div>
</div>
<div class="modal fade" id="mymodal">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
退款审核
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
</div>
<div class="modal-body" style="text-align: center">
<input type="radio" name="state" id="state-1" value="2">
<label for="state-1" class="margin-right">
退款
</label>
<input type="radio" name="state" id="state-2" value="3">
<label for="state-2">驳回退款申请</label>
</div>
<div class="modal-footer">
<button class="btn btn-default" data-dismiss="modal" aria-hidden="true">取消</button>
<button class="btn btn-primary" id="set_status">确定</button>
</div>
</div>
</div>
</div>
</section>
<script type="text/javascript">
......@@ -124,5 +150,19 @@
});
});
});
$(".check-btn").click(function(){
comment_id = $(this).data('id');
$("#mymodal").modal();
});
$("#set_status").click(function(){
$("#mymodal").fadeOut();
var status = $("input[name='state']:checked").val();
$.post("{:url('admin/order/commentStatus')}",{id:comment_id,status:status},function(data){
if(data['code']==1){
alert(data['msg']);
window.location.reload();
}
});
});
});
</script>
{layout name="public/layout_main"}
<link rel="stylesheet" href="/static/fileinput/css/fileinput.css">
<link rel="stylesheet" href="/static/bootstrap-select/css/bootstrap-select.min.css">
<style type="text/css">
.progress-bar{
text-align: center;
}
.dropdown-menu{
z-index: 100000;
}
</style>
<section class="wrapper">
<h3 class="">
<a href="<?php echo url('@admin/Post/index')?>">
<i class="fa fa-angle-right"></i> <a href="{:url('admin/post/index')}">文章管理</a> <i class="fa fa-angle-right"></i> 发布文章
</a>
</h3>
<h3><i class="fa fa-angle-right"></i> <a href="{:url('admin/project/catalogs')}">分类管理</a> <i class="fa fa-angle-right"></i> 添加分类</h3>
<!-- 分割线 -->
<hr>
<?php if(isset($msg) && $msg):?>
<div class="row margin-bottom">
<div class="col-md-12">
<div class="alert alert-danger alert-dismissible fade in" role="alert">
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>
<?php echo $msg;?>
</div>
</div>
</div>
<?php endif;?>
<div class="row margin-bottom">
<div class="col-md-12">
<form name="myFrom" class="form-horizontal" enctype="multipart/form-data" method="POST" action="<?php echo url("@admin/Post/create")?>" id="article-create-form">
<div class="form-group">
<label for="title" class="col-sm-1 control-label text-right">文章标题</label>
<div class="col-lg-10">
<input type="text" class="form-control validate[required]" name="title" id="title" placeholder="文章标题 ">
</div>
<div class="col-xs-12" >
<form method="post" class="form-horizontal" enctype="multipart/form-data" action="{:url('admin/project/addCatalogs')}">
<div class="form-group">
<label for="title" class="col-sm-2 control-label text-right">分类名</label>
<div class="col-sm-10 col-md-8 col-lg-6">
<input type="text" class="form-control" name="name">
</div>
<div class="form-group">
<label for="title" class="col-sm-1 control-label text-right" >文章封面</label>
<div class="col-lg-10">
<input id="input-b1" name="poster" type="file">
</div>
</div>
<div class="form-group">
<label for="title" class="col-sm-1 control-label text-right">文章标签</label>
<div class="col-lg-10">
<select class="selectpicker form-control" name="tags" multiple data-live-search="true">
{volist name="tag_list" name="tag_list" id="vo"}
<option value="{$vo.id}">{$vo.name}</option>
{/volist}
</select>
</div>
</div>
<div class="form-group">
<label for="title" class="col-sm-1 control-label text-right">文章类型</label>
<div class="col-lg-10">
<select class="form-control" name="type" id="post_type">
<option value="1">手动编写文章</option>
<option value="2">链接到网络文章</option>
</select>
</div>
</div>
<div class="form-group" id="href" style="display: none">
<label for="title" class="col-sm-1 control-label text-right">请输入url</label>
<div class="col-lg-10">
<input type="text" name="href" class="form-control">
<code>http:// + 网址 或 https:// + 网址</code>
</div>
</div>
<div class="form-group">
<label for="title" class="col-sm-2 control-label text-right" >分类图标</label>
<div class="col-sm-10 col-md-8 col-lg-6">
<input type="hidden" name='old_poster'>
<input id="input-b1" name="poster" type="file">
</div>
<div class="form-group" id="content">
<label for="content" class="col-sm-1 control-label text-right">文章内容</label>
<div class="col-lg-10">
<!-- 加载编辑器的容器 -->
<script id="post_container" name="content" type="text/plain" style="width: 100%">
</script>
</div>
</div>
<div class="form-group">
<label for="title" class="col-sm-2 control-label text-right">排序</label>
<div class="col-sm-10 col-md-8 col-lg-6">
<input type="number" class="form-control" name="sort">
</div>
<div class="form-group">
<div class="col-sm-offset-1 col-sm-10">
<button type="submit" class="btn btn-default" id="btn-save">提交</button>
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<button class="btn btn-success" id="btn-save">提交</button>
</div>
</form>
</div>
</div>
</form>
</div>
</section>
<!-- 文件上传和select插件 -->
<script type="text/javascript" src="/static/fileinput/js/fileinput.min.js"></script>
<script type="text/javascript" src="/static/fileinput/js/locales/zh.js"></script>
<script type="text/javascript" src="/static/bootstrap-select/js/bootstrap-select.min.js"></script>
<script type="text/javascript" src="/static/bootstrap-select/js/i18n/defaults-zh_CN.js"></script>
<!-- 配置文件 -->
<script type="text/javascript" src="/static/ueditor/ueditor.config.js"></script>
<!-- 编辑器源码文件 -->
<script type="text/javascript" src="/static/ueditor/ueditor.all.js"></script>
<script type="text/javascript">
$(function(){
// 即时显示封面图
$('#poster').change(function(e){
var file = e.target.files[0];
preview(file, 0);
// 文档加载完毕之后,会进入该方法
// 初始化文件上传
var fileInput = $("#input-b1").fileinput({
language: 'zh',
showUpload:false, //是否显示上传按钮
allowedFileExtensions: ['bmp','jpg','png','tif','gif','pcx','tga','exif','fpx','svg','cdr','pcd','dxf','ufo','eps','raw','WMF','webp'],//接收的文件后缀
})
$("#input-b1").change(function(data){
if(this.files.length>0){
$("#poster_view").hide();
}else{
$("#poster_view").show();
}
})
$("#input-b1").on("fileclear",function(event, data, msg){
$("#poster_view").show();
});
$(function(){
$(".btn-delete").click(function(){
var _this = $(this);
var url = "delete";
var oid = _this.attr('oid');
showDialog("提示", "确定删除这篇文章吗?", function () {
// ajax post 方法
$.post(url, {id:oid}, function (res) {
var res = JSON.parse(res);
if (res.error == 1) {
// javascript 的默认弹出提示方法
alert(res.msg);
} else {
_this.remove();
$("#tr_"+oid).fadeOut();
}
});
});
});
});
});
$("#post_type").change(function(){
var type = $(this).val();
if(type == 1){
$("#content").show();
$("#href").hide();
}else{
$("#href").show();
$("#content").hide();
}
});
// 初始化文件上传
$("#input-b1").fileinput({
language: 'zh',
showUpload:false, //是否显示上传按钮
allowedFileExtensions: ['bmp','jpg','png','tif','gif','pcx','tga','exif','fpx','svg','cdr','pcd','dxf','ufo','eps','raw','WMF','webp'],//接收的文件后缀
})
UE.getEditor('post_container', {
//编辑区域大小
'initialFrameHeight' : '350',
'elementPathEnabled':false,
'autoHeight': true,
'autoHeightEnabled':true,
'autoFloatEnabled': true,
'iframeCssUrl': '/static/ueditor/themes/iframe.css',// 引入css
//定制菜单
'toolbars' : [
[
'fullscreen', 'source', 'undo', 'redo', '|',
'fontsize',
'bold', 'italic', 'underline', 'fontborder', 'strikethrough', 'removeformat',
'formatmatch', 'blockquote', 'pasteplain', '|',
'forecolor', 'backcolor', '|',
'lineheight', '|',
'indent', '|', 'insertimage', '|',
'justifyleft', //居左对齐
'justifyright', //居右对齐
'justifycenter', //居中对齐
'justifyjustify', //两端对齐
],
]
});
</script>
......@@ -9,8 +9,7 @@
<div class="col-md-12">
<form class="form-inline pull-left" method="GET" action="{:url('admin/project/Catalogs')}" >
<div class="form-group margin-right">
<label for="name">分类名</label>
<input class="form-control" type="text" name="name" id="name" value="<?php echo input('title');?>" />
<input class="form-control" type="text" name="name" id="name" value="<?php echo input('title');?>" placeholder="分类名"/>
</div>
<button type="submit" class="btn btn-primary">搜索</button>
</form>
......@@ -44,7 +43,7 @@
<tbody>
{volist name="tag_list" id="vo" key="k" empty="暂时没有数据"}
<tr id="tr_{$vo.id}">
<td>{$k}</td>
<td>{$vo.id}</td>
<td>{$vo.name}</td>
<td><img style="width:90px" src="{$vo.poster}" alt=""></td>
<td>{$vo.sort}</td>
......
......@@ -9,8 +9,7 @@
<div class="col-md-12">
<form class="form-inline pull-left" method="GET" action="{:url('admin/project/citys')}" >
<div class="form-group margin-right">
<label for="name">城市名</label>
<input class="form-control" type="text" name="name" id="name" value="<?php echo input('title');?>" />
<input class="form-control" type="text" name="name" id="name" value="<?php echo input('title');?>" placeholder="城市名"/>
</div>
<button type="submit" class="btn btn-primary">搜索</button>
......
......@@ -12,14 +12,13 @@
.dropdown-menu{
z-index: 100000;
}
.control-label{
width: 150px;
}
</style>
<section class="wrapper">
<h3 class="">
<i class="fa fa-angle-right"></i> 创建活动/商家
</h3>
<h3><i class="fa fa-angle-right"></i> <a href="{:url('admin/project/index')}">活动/商家列表</a> <i class="fa fa-angle-right"></i> 创建活动/商家</h3>
<hr>
<?php if(isset($msg) && $msg):?>
......@@ -38,8 +37,8 @@
<!-- <form name="myFrom" id="myFrom" class="form-horizontal" enctype="multipart/form-data" method="POST" action="<?php echo url("@admin/project/create")?>" id="article-create-form"> -->
<form name="myFrom" id="myFrom" class="form-horizontal" enctype="multipart/form-data">
<div class="form-group">
<label for="title" class="col-sm-1 control-label text-right">类型</label>
<div class="col-lg-10">
<label for="title" class="col-sm-2 control-label text-right">类型</label>
<div class="col-sm-20 col-md-8 col-lg-6">
<select name="type" id="peoject_type" class="form-control">
<option value="1">活动</option>
<option value="2">商家</option>
......@@ -47,14 +46,14 @@
</div>
</div>
<div class="form-group">
<label for="title" class="col-sm-1 control-label text-right">名称</label>
<div class="col-lg-10">
<label for="title" class="col-sm-2 control-label text-right">名称</label>
<div class="col-sm-20 col-md-8 col-lg-6">
<input type="text" class="form-control validate[required]" name="title" id="title" placeholder="活动/商家名称" >
</div>
</div>
<div class="form-group">
<label for="title" class="col-sm-1 control-label text-right">国内/国外</label>
<div class="col-lg-10">
<label for="title" class="col-sm-2 control-label text-right">国内/国外</label>
<div class="col-sm-20 col-md-8 col-lg-6">
<select name="region_type" id="region_type" class="form-control">
<option value="1">国内</option>
<option value="2">国外</option>
......@@ -62,26 +61,26 @@
</div>
</div>
<div class="form-group">
<label for="title" class="col-sm-1 control-label text-right">活动时间</label>
<div class="col-lg-10">
<label for="title" class="col-sm-2 control-label text-right">活动时间</label>
<div class="col-sm-20 col-md-8 col-lg-6">
<input type="text" class="form-control validate[required,custom[dateTime]]" name="time_period" id="start" placeholder="请填写活动时间">
</div>
</div>
<div class="form-group">
<label for="title" class="col-sm-1 control-label text-right">报名截止时间</label>
<div class="col-lg-10">
<label for="title" class="col-sm-2 control-label text-right">报名截止时间</label>
<div class="col-sm-20 col-md-8 col-lg-6">
<input type="text" class="form-control validate[required,custom[dateTime]]" name="sign_endtime" id="end" placeholder="请填写报名截止时间">
</div>
</div>
<div class="form-group">
<label for="title" class="col-sm-1 control-label text-right">组数限制</label>
<div class="col-lg-10">
<label for="title" class="col-sm-2 control-label text-right">组数限制</label>
<div class="col-sm-20 col-md-8 col-lg-6">
<input type="text" class="form-control validate[required,custom[number]]" name="sign_limits" id="sign_limits" placeholder="限制家庭组数">
</div>
</div>
<div class="form-group">
<label for="title" class="col-sm-1 control-label text-right">分类</label>
<div class="col-lg-10">
<label for="title" class="col-sm-2 control-label text-right">分类</label>
<div class="col-sm-20 col-md-8 col-lg-6">
<select class="form-control selectpicker" name='catalog_id' id="catalog_id" data-live-search="true">
{volist name="catalog_list" id="vo"}
<option value="{$vo.id}">{$vo.name}</option>
......@@ -90,8 +89,8 @@
</div>
</div>
<div class="form-group">
<label for="title" class="col-sm-1 control-label text-right">城市</label>
<div class="col-lg-10">
<label for="title" class="col-sm-2 control-label text-right">城市</label>
<div class="col-sm-20 col-md-8 col-lg-6">
<select class="form-control selectpicker" name='city' id="city" data-live-search="true">
{volist name="city_list" id="vo"}
<option value="{$vo.id}">{$vo.name}</option>
......@@ -100,8 +99,8 @@
</div>
</div>
<div class="form-group">
<label for="title" class="col-sm-1 control-label text-right">标签</label>
<div class="col-lg-10">
<label for="title" class="col-sm-2 control-label text-right">标签</label>
<div class="col-sm-20 col-md-8 col-lg-6">
<select class="selectpicker form-control" id="tags_select" multiple data-live-search="true">
{volist name="tag_list" id="vo"}
<option value="{$vo.id}">{$vo.name}</option>
......@@ -110,43 +109,43 @@
</div>
</div>
<div class="form-group">
<label for="title" class="col-sm-1 control-label text-right">价格</label>
<div class="col-lg-10">
<label for="title" class="col-sm-2 control-label text-right">价格</label>
<div class="col-sm-20 col-md-8 col-lg-6">
<input type="text" class="form-control validate[required,custom[number]]" name="" id="price" placeholder="价格">
</div>
</div>
<div class="form-group">
<label for="title" class="col-sm-1 control-label text-right">会员价</label>
<div class="col-lg-10">
<label for="title" class="col-sm-2 control-label text-right">会员价</label>
<div class="col-sm-20 col-md-8 col-lg-6">
<input type="text" class="form-control validate[required,custom[number]]" name="" id="vip_price" placeholder="价格">
</div>
</div>
<!-- <input type="hidden" id="poster" name="poster"> -->
<div class="form-group">
<label for="title" class="col-sm-1 control-label text-right" >封面</label>
<div class="col-lg-10">
<label for="title" class="col-sm-2 control-label text-right" >封面</label>
<div class="col-sm-20 col-md-8 col-lg-6">
<input id="input-b1" name="" type="file">
</div>
</div>
<!-- <input type="hidden" name="banners" id="banners"> -->
<div class="form-group">
<label for="title" class="col-sm-1 control-label text-right" >轮播图</label>
<div class="col-lg-10">
<label for="title" class="col-sm-2 control-label text-right" >轮播图</label>
<div class="col-sm-20 col-md-8 col-lg-6">
<input id="input-b2" name="" multiple type="file">
</div>
</div>
<!-- <input type="hidden" name="kf_qrcode" id="kf_qrcode"> -->
<div class="form-group" id="qrcode" style="display:none">
<label for="title" class="col-sm-1 control-label text-right" >客服二维码</label>
<div class="col-lg-10">
<label for="title" class="col-sm-2 control-label text-right" >客服二维码</label>
<div class="col-sm-20 col-md-8 col-lg-6">
<input id="input-b3" name="" type="file">
</div>
</div>
<div class="form-group" id="content">
<label for="content" class="col-sm-1 control-label text-right">详细介绍</label>
<div class="col-lg-10">
<label for="content" class="col-sm-2 control-label text-right">详细介绍</label>
<div class="col-sm-20 col-md-8 col-lg-6">
<!-- 加载编辑器的容器 -->
<script id="post_container" name="description" type="text/plain" style="width: 100%">
</script>
......@@ -154,8 +153,8 @@
</div>
</form>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<button class="btn btn-default" id="btn-save">提交</button>
<div class="col-sm-offset-2">
<button class="btn btn-success" id="btn-save">提交</button>
</div>
</div>
</div>
......
......@@ -7,27 +7,31 @@
<div class="col-xs-12" >
<form method="post" class="form-horizontal" enctype="multipart/form-data" action="{:url('admin/project/updateCatalogs')}">
<div class="form-group">
<label for="title" class="col-sm-1 control-label text-right">分类名</label>
<div class="col-lg-10">
<label for="title" class="col-sm-2 control-label text-right">分类名</label>
<div class="col-sm-10 col-md-8 col-lg-6">
<input type="hidden" name="id" value="{$id}">
<input type="text" class="form-control" name="name" value="{$tag_info.name}">
</div>
</div>
<div class="form-group">
<label for="title" class="col-sm-1 control-label text-right" >文章封面</label>
<div class="col-lg-10">
<label for="title" class="col-sm-2 control-label text-right" >文章封面</label>
<div class="col-sm-10 col-md-8 col-lg-6">
<input type="hidden" name='old_poster' value="{$tag_info.poster}">
<img src="{$tag_info.poster}" style="width:170px;margin-bottom:10px" alt="" id="poster_view">
<input id="input-b1" name="poster" type="file">
</div>
</div>
<div class="form-group">
<label for="title" class="col-sm-1 control-label text-right">排序</label>
<div class="col-lg-10">
<label for="title" class="col-sm-2 control-label text-right">排序</label>
<div class="col-sm-10 col-md-8 col-lg-6">
<input type="number" class="form-control" name="sort" value="{$tag_info.sort}">
</div>
</div>
<button type="submit" class="btn btn-success">修改</button>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<button type="submit" class="btn btn-success">修改</button>
</div>
</div>
</form>
</div>
......
......@@ -8,12 +8,30 @@
<div class="row margin-bottom">
<div class="col-md-12">
<form class="form-inline pull-left" method="GET" action="{:url('admin/project/index')}" >
<div class="form-group margin-right">
<select name="catalog_id" class="form-control">
<option value="">所有分类</option>
{volist name="$catalog_list" id="vo"}
<option value="{$vo.id}" {if condition="input('catalog_id')==$vo.id"}selected{/if}>{$vo.name}</option>
{/volist}
</select>
</div>
<div class="form-group margin-right">
<label for="title">活动/商家名称</label>
<input class="form-control" type="text" name="title" id="title" value="<?php echo input('title');?>" />
<select name="type" class="form-control">
<option value="">活动/商家</option>
<option value="1" {if condition="input('type')==1"}selected{/if}>活动</option>
<option value="2" {if condition="input('type')==2"}selected{/if}>商家</option>
</select>
</div>
<div class="form-group margin-right">
<input class="form-control" type="text" name="title" id="title" value="<?php echo input('title');?>" placeholder="活动/商家名称"/>
</div>
<button type="submit" class="btn btn-primary">搜索</button>
</form>
<div class=" pull-right">
<a href="{:url('admin/project/create')}" class="btn btn-success">创建活动/商家</a>
</div>
</div>
</div>
......@@ -30,7 +48,7 @@
<!--</colgroup>-->
<thead>
<tr>
<th>#</th>
<th>ID</th>
<th>活动/商家名称</th>
<th>封面图</th>
<th>国内/国外</th>
......@@ -50,7 +68,7 @@
<tbody>
{volist name="project_list" id="vo" key="k" empty="暂时没有数据"}
<tr id="tr_{$vo.id}">
<td>{$k}</td>
<td>{$vo.id}</td>
<td>{$vo.title}</td>
<td><img style="width:90px" src="{$vo.poster}" alt=""></td>
<td>
......
......@@ -9,8 +9,7 @@
<div class="col-md-12">
<form class="form-inline pull-left" method="GET" action="{:url('admin/project/tags')}" >
<div class="form-group margin-right">
<label for="name">标签名</label>
<input class="form-control" type="text" name="name" id="name" value="<?php echo input('title');?>" />
<input class="form-control" type="text" name="name" id="name" value="<?php echo input('title');?>" placeholder="标签名"/>
</div>
<button type="submit" class="btn btn-primary">搜索</button>
......@@ -54,7 +53,7 @@
<tbody>
{volist name="tag_list" id="vo" key="k" empty="暂时没有数据"}
<tr id="tr_{$vo.id}">
<td>{$k}</td>
<td>{$vo.id}</td>
<td>{$vo.name}</td>
<td>{$vo.used}</td>
<td>{$vo.sort}</td>
......
......@@ -3,7 +3,7 @@
<!-- sidebar menu start-->
<ul class="sidebar-menu" id="nav-accordion">
<p class="centered">
<img src="/static/img/ui-sam.jpg" width="100">
<img src="/static/img/logo@3x.png" width="100">
</p>
<h5 class="centered">[admin_name]</h5>
......@@ -36,7 +36,7 @@
<li <?php if(CONTROLLER_NAME == 'Project'&&ACTION_NAME=='create'){echo 'class="active"';}?>>
<a href="<?php echo url("@admin/Project/create")?>">创建活动/商家</a>
</li>
<li <?php if(CONTROLLER_NAME == 'Project'&&ACTION_NAME=='catalogs'||ACTION_NAME=='editcatalogs'||ACTION_NAME=='addcatalogs'){echo 'class="active"';}?>>
<li <?php if(CONTROLLER_NAME == 'Project'&&(ACTION_NAME=='catalogs'||ACTION_NAME=='editcatalogs'||ACTION_NAME=='addcatalogs')){echo 'class="active"';}?>>
<a href="<?php echo url("@admin/Project/catalogs")?>">分类管理</a>
</li>
<li <?php if(CONTROLLER_NAME == 'Project'&&(ACTION_NAME=='tags'||ACTION_NAME=='edittag')){echo 'class="active"';}?>>
......@@ -71,10 +71,12 @@
<span>内容管理</span>
</a>
<ul class="sub">
<li <?php if(CONTROLLER_NAME == 'Banner'&&ACTION_NAME=='index'){echo 'class="active"';}?>>
<li <?php if(CONTROLLER_NAME == 'Banner'&&(ACTION_NAME=='index'||ACTION_NAME=='create'||ACTION_NAME=='update')){echo 'class="active"';}?>>
<a href="<?php echo url("@admin/Banner/index")?>">Banner广告位</a>
</li>
<li <?php if(CONTROLLER_NAME == 'Guide'&&ACTION_NAME=='index'){echo 'class="active"';}?>>
<li <?php if(CONTROLLER_NAME == 'Guide'&&(ACTION_NAME=='index'||ACTION_NAME=='create'||ACTION_NAME=='update')){echo 'class="active"';}?>>
<a href="<?php echo url("@admin/Guide/index")?>">美行攻略</a>
</li>
</ul>
......@@ -86,9 +88,6 @@
<span>其他管理</span>
</a>
<ul class="sub">
<li <?php if(CONTROLLER_NAME == 'Post'&&(ACTION_NAME=='index'||ACTION_NAME=='create')){echo 'class="active"';}?>>
<a href="<?php echo url("@admin/Post/index")?>">文章管理</a>
</li>
<li <?php if(CONTROLLER_NAME == 'Log'&&ACTION_NAME=='index'){echo 'class="active"';}?>>
<a href="<?php echo url("@admin/Log/index", ['level'=>'info'])?>">日志信息</a>
</li>
......
......@@ -5,6 +5,35 @@
<!-- 分割线 -->
<hr>
<div class="row margin-bottom">
<div class="col-md-12">
<form class="form-inline pull-left" method="GET" action="{:url('admin/user/index')}" >
<div class="form-group margin-right">
<input class="form-control" type="text" name="nickname" value="{:input('nickname')}" placeholder="昵称"/>
</div>
<div class="form-group margin-right">
<select name="is_vip" id="" class="form-control">
<option value="">是否会员</option>
<option value="1" {if condition="input('is_vip')==1"}selected{/if}>会员</option>
<option value="0" {if condition="input('is_vip')==='0'"}selected{/if}>非会员</option>
</select>
</div>
<div class="form-group margin-right">
<label for="">注册时间:</label>
<input class="form-control" type="date" name="start_time" value="{:input('start_time')}" placeholder="起始"/>
--
<input class="form-control" type="date" name="end_time" value="{:input('end_time')}" placeholder="结束"/>
</div>
<div class="form-group margin-right">
<label for="output">导出</label>
<input type="checkbox" name="output" id="output">
</div>
<button type="submit" class="btn btn-primary">搜索</button>
</form>
<div class=" pull-right">
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
......@@ -19,24 +48,32 @@
<!--</colgroup>-->
<thead>
<tr>
<th>#</th>
<th>头像</th>
<th>ID</th>
<th>昵称</th>
<th>性别</th>
<th>联系方式</th>
<th>所在地</th>
<th>会员</th>
<th>会员到期时间</th>
<th>ip</th>
<th>IP</th>
<th>注册时间</th>
</tr>
</thead>
<tbody>
{volist name="user_list" id="vo" key="k" empty="暂时没有数据"}
<tr id="tr_{$vo.id}">
<td>{$k}</td>
<td><img src="{$vo.avatar}" alt="" style="width:40px"></td>
<td>{$vo.nickname}</td>
<td>{$vo.gender}</td>
<td>{$vo.id}</td>
<td><img src="{$vo.avatar}" onerror="this.src='/static/img/default_avatar.png'" alt="" style="width:40px;margin-right: 5px">{$vo.nickname}</td>
<td>
<!--{$vo.gender}-->
{if condition="$vo.gender == 1"}
{elseif condition="$vo.gender == 2"/}
{else/}
未知
{/if}
</td>
<td>{$vo.phone}</td>
<td>{$vo.province} {$vo.city}</td>
<td>
......@@ -54,6 +91,7 @@
<td>
{$vo.ip}
</td>
<td>{$vo.created_at}</td>
<!--<td>-->
<!--<a href="{:url('admin/project/editTag',['id'=>$vo.id])}" class="btn btn-xs btn-primary"><i class="fa fa-pencil"></i></a>-->
<!--<a href="javascript:" oid="{$vo.id}" class="btn btn-xs btn-danger btn-delete"><i class="fa fa-trash"></i></a>-->
......
......@@ -2534,4 +2534,35 @@ label {
.site-min-height {
min-height: 900px;
}
.table > thead > tr > th, .table > tbody > tr > th, .table > tfoot > tr > th, .table > thead > tr > td, .table > tbody > tr > td, .table > tfoot > tr > td{
vertical-align: middle;
}
.imageview{
position: fixed;
max-width: 1000px;
text-align: center;
background: #fff;
box-shadow: 0 0 10px #000;
z-index:1000000;
max-height: 100%;
}
.imageview .remove{
position: absolute;
right:5px;
top:5px;
width: 30px;
height:30px;
background: rgba(0,0,0,.8);
color:#fff;
border-radius:50%;
line-height: 30px;
font-size: 30px;
cursor: pointer;
}
.imageview img{
max-height: 100%;
max-width: 100%;
vertical-align: middle;
}
\ No newline at end of file
......@@ -195,5 +195,21 @@ var Script = function () {
$('.btn_left').unbind('click').bind('click', function(){
history.go(-1)
});
//表格图片预览
$('.table td img').click(function(){
if($("#imageview")[0]){
$("#imageview img").attr('src',$(this).attr('src'));
$("#imageview").show();
}else{
$("body").append('<div class="imageview" id="imageview"><span class="remove">&times;</span><img src=\"'+$(this).attr('src')+'\" alt=""></div>');
}
var width = $("#imageview").width();
var height = $("#imageview").height();
var left = ($(window).width() - width)/2;
var top = ($(window).height() - height)/2;
$("#imageview").css({'top':top+'px','left':left+'px'});
})
$('body').on('click','#imageview .remove',function(){
$(this).parent().hide();
})
}();
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