init
This commit is contained in:
109
app/admin/view/shopselle/add.html
Executable file
109
app/admin/view/shopselle/add.html
Executable file
@@ -0,0 +1,109 @@
|
||||
<!-- Content Wrapper. Contains page content -->
|
||||
<div class="content-wrapper">
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
<h1>
|
||||
添加评论
|
||||
</h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="<?php echo url('/admin/index/index');?>"><i class="fa fa-dashboard"></i> 首页</a></li>
|
||||
<li><a href="<?php echo url('/admin/shopselle/index');?>"> 评论列表</a></li>
|
||||
<li class="active"> 评论</li>
|
||||
</ol>
|
||||
</section>
|
||||
|
||||
<!-- Main content -->
|
||||
<section class="content">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="nav-tabs-custom">
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active">
|
||||
<a data-toggle="tab" href="#tabfirst">添加评论</a>
|
||||
</li>
|
||||
<li class="pull-right"><a href="" class="text-muted"><i class="fa fa-refresh"></i></a></li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<!-- /.tab-pane -->
|
||||
<div class="tab-pane active" id="tabfirst">
|
||||
<form class="form-horizontal" action="<?php echo url('/admin/shopselle/creatpl');?>" method="post">
|
||||
<div class="form-group">
|
||||
<label for="content_id" class="col-sm-2 control-label">淘宝商品ID</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="item_id" required>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(淘宝商品ID)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="content_id" class="col-sm-2 control-label">店铺ID</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="seller_id" value="357580590">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(天猫店铺ID为:357580590)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="content_id" class="col-sm-2 control-label">抓取第几页</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="current_page" required>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(抓取第几页)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="content_id" class="col-sm-2 control-label">官网商品ID</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="pid" required>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(官网商品ID)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
<button type="reset" class="btn btn-warning">重置</button>
|
||||
<button type="submit" class="btn btn-danger">提交</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
<!-- /.tab-pane -->
|
||||
</div>
|
||||
<!-- /.tab-content -->
|
||||
</div>
|
||||
<!-- /.nav-tabs-custom -->
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<!-- /.content-wrapper -->
|
||||
<script type="text/javascript">
|
||||
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$("form.form-horizontal").submit(function(e) {
|
||||
var cnameObj = document.getElementById('cname');
|
||||
if (isNull(nameObj.value)) {
|
||||
alert('名称必须填写');
|
||||
cnameObj.focus();
|
||||
return false;
|
||||
}
|
||||
// var agree = $("input[name='agree']", this).prop('checked');
|
||||
// if (agree) {
|
||||
// //alert("Submitted");
|
||||
// //e.preventDefault();
|
||||
// } else {
|
||||
// e.preventDefault();
|
||||
// alert("请勾选确认");
|
||||
// }
|
||||
});
|
||||
});
|
||||
</script>
|
||||
153
app/admin/view/shopselle/index.html
Executable file
153
app/admin/view/shopselle/index.html
Executable file
@@ -0,0 +1,153 @@
|
||||
<!-- Content Wrapper. Contains page content -->
|
||||
<div class="content-wrapper">
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
<h1>
|
||||
评论管理
|
||||
<small>评论列表</small>
|
||||
</h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="<?php echo url('/admin/index/index');?>"><i class="fa fa-dashboard"></i> 首页</a></li>
|
||||
<li><a href="<?php echo url('/admin/pinglun/lists');?>"> 评论</a></li>
|
||||
<li class="active"> 评论列表</li>
|
||||
</ol>
|
||||
</section>
|
||||
|
||||
<!-- Main content -->
|
||||
<section class="content">
|
||||
|
||||
<div class="box-body">
|
||||
<form class="form-horizontal" action="<?php echo url('/admin/shopselle/index');?>" method="get">
|
||||
<div class="col-sm-5">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">产品ID</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="product_id" class="form-control" value="<?php echo $search['product_id']; ?>">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">淘宝ID</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="item_id" class="form-control" value="<?php echo $search['item_id']; ?>">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
<button type="submit" class="btn btn-primary btn-sm" ><i class="fa fa-fw fa-check"></i>搜索</button>
|
||||
<button type="reset" class="btn btn-info btn-sm" ><i class="fa fa-fw fa-undo"></i>重置</button>
|
||||
<button type="button" class="btn btn-info btn-sm" id="doclear"><i class="fa fa-fw fa-remove"></i>清空</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">评论列表</h3>
|
||||
<div class="box-tools pull-right">
|
||||
<div class="input-group input-group-sm">
|
||||
<!---->
|
||||
<div class="input-group-btn">
|
||||
<button type="button" class="btn btn-default" id="list-search-btn"><i class="fa fa-search"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box-tools -->
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
<div class="box-body no-padding">
|
||||
<div class="table-responsive lists-table">
|
||||
<table class="table table-hover table-bordered">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th width="35rem"> </th>
|
||||
<th width="60rem">ID</th>
|
||||
<th width="30%" style="text-align: center">官网产品ID</th>
|
||||
<th width="30%" class="text-center" style="margin: auto">淘宝产品ID</th>
|
||||
<th class="text-center">最近更新时间</th>
|
||||
<th class="text-center" width="135rem">操作</th>
|
||||
</tr>
|
||||
<?php if(!empty($list)):?>
|
||||
<?php foreach($list as $k=>$pinglun):?>
|
||||
<tr>
|
||||
<td class="text-center"><input type="checkbox" name="ids[]" value="<?php echo $pinglun['id'];?>"></td>
|
||||
<td><?php echo $pinglun['id'];?></td>
|
||||
<th style="text-align: center"><?php echo $pinglun['product_id'];?></th>
|
||||
<th style="text-align: center" ><?php echo $pinglun['item_id'];?></th>
|
||||
<th style="text-align: center"><?php echo $pinglun['create_time'];?></th>
|
||||
<th>
|
||||
<a class="btn btn-xs btn-info" href="<?php echo url('/admin/shopselle/pllist',['id'=>$pinglun['id']]);?>">详情</a>
|
||||
<a class="btn btn-xs btn-info" onclick="operation(<?php echo $pinglun['id']; ?>, 'clear')">清空</a>
|
||||
<a class="btn btn-xs btn-info" onclick="operation(<?php echo $pinglun['id']; ?>, 'delete')">删除</a>
|
||||
</th>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
<?php endif;?>
|
||||
</tbody>
|
||||
</table>
|
||||
<!-- /.table -->
|
||||
</div>
|
||||
|
||||
<!-- /.lists-table -->
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
<div class="box-footer no-padding">
|
||||
<div class="mailbox-controls row">
|
||||
<div class="col-sm-6">
|
||||
<button type="button" class="btn btn-default btn-sm checkbox-toggle"><i class="fa fa-square-o"></i></button>
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-default btn-sm" data-url="<?php echo url('/admin/pinglun/deletes');?>" data-cod="batch">删除</button>
|
||||
<button type="button" class="btn btn-default btn-sm" data-url="<?php echo url('/admin/pinglun/checked');?>" data-cod="batch">标记已审核</button>
|
||||
<button type="button" class="btn btn-default btn-sm" data-url="<?php echo url('/admin/pinglun/unchecked');?>" data-cod="batch">标记未审核</button>
|
||||
<button type="button" class="btn btn-default btn-sm" data-cod="refresh">刷新</button>
|
||||
</div>
|
||||
<!-- /.btn-group -->
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="pull-right">
|
||||
<?php if($page):?>
|
||||
<?php echo $page;?>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
<!-- /.pull-right -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box -->
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<!-- /.content-wrapper -->
|
||||
<style>
|
||||
.table-responsive .table tbody > tr > th,.table-responsive .table thead > tr > td, .table-responsive .table tbody > tr > td {
|
||||
vertical-align: middle;
|
||||
}
|
||||
</style>
|
||||
<!-- Page Script -->
|
||||
<script type="text/javascript">
|
||||
function operation(tbpl_id, type)
|
||||
{
|
||||
if (type == 'clear')
|
||||
var url = '/admin/shopselle/clear_by_tbpl_id';
|
||||
else if (type == 'delete')
|
||||
var url = '/admin/shopselle/delete_by_tbpl_id';
|
||||
|
||||
var data = {
|
||||
tbpl_id: tbpl_id
|
||||
};
|
||||
|
||||
$.ajax({
|
||||
url: url,
|
||||
type: 'post',
|
||||
dataType: 'json',
|
||||
data: data,
|
||||
success: function(res) {
|
||||
alert(res.msg);
|
||||
if (type == 'delete')
|
||||
location.reload();
|
||||
}
|
||||
})
|
||||
}
|
||||
</script>
|
||||
150
app/admin/view/shopselle/pllist.html
Executable file
150
app/admin/view/shopselle/pllist.html
Executable file
@@ -0,0 +1,150 @@
|
||||
<!-- Content Wrapper. Contains page content -->
|
||||
<div class="content-wrapper">
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
<h1>
|
||||
评论管理
|
||||
<small>评论列表</small>
|
||||
</h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="<?php echo url('/admin/index/index');?>"><i class="fa fa-dashboard"></i> 首页</a></li>
|
||||
<li><a href="<?php echo url('/admin/pinglun/lists');?>"> 评论</a></li>
|
||||
<li class="active"> 评论列表</li>
|
||||
</ol>
|
||||
</section>
|
||||
|
||||
<!-- Main content -->
|
||||
<section class="content">
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">评论列表</h3>
|
||||
<div class="box-tools pull-right">
|
||||
<div class="input-group input-group-sm">
|
||||
<!---->
|
||||
<div class="input-group-btn">
|
||||
<button type="button" class="btn btn-default" id="list-search-btn"><i class="fa fa-search"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box-tools -->
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
<div class="box-body no-padding">
|
||||
|
||||
<div class="table-responsive lists-table">
|
||||
<table class="table table-hover table-bordered">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th width="5%"> </th>
|
||||
<th width="5%">ID</th>
|
||||
<th width="10%">官网产品id</th>
|
||||
<th width="30%" style="text-align: center">评论内容</th>
|
||||
<th width="40%" class="text-center" style="margin: auto">评论回复内容</th>
|
||||
<th width="10%">操作</th>
|
||||
</tr>
|
||||
|
||||
{volist name = 'list' id = 'user' }
|
||||
<tr>
|
||||
<th><input type="checkbox" name="ids" value="<?php echo $user['id'];?>"></th>
|
||||
<th>{$user.id}</th>
|
||||
<th>{$user.product_id}</th>
|
||||
<th>{$user.rateContent}</th>
|
||||
<th>{$user.reply}</th>
|
||||
<th><button onclick="del({$user.id})" class="btn btn-xs btn-info">删除</button></th>
|
||||
</tr>
|
||||
{/volist}
|
||||
</tbody>
|
||||
</table>
|
||||
<!-- /.table -->
|
||||
</div>
|
||||
|
||||
<!-- /.lists-table -->
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
<div class="box-footer no-padding">
|
||||
<div class="mailbox-controls row">
|
||||
<div class="col-sm-6">
|
||||
<button type="button" class="btn btn-default btn-sm checkbox-toggle"><i class="fa fa-square-o"></i></button>
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-default btn-sm" onclick="batch_del()">删除</button>
|
||||
<button type="button" class="btn btn-default btn-sm" data-url="<?php echo url('/admin/pinglun/checked');?>" data-cod="batch">标记已审核</button>
|
||||
<button type="button" class="btn btn-default btn-sm" data-url="<?php echo url('/admin/pinglun/unchecked');?>" data-cod="batch">标记未审核</button>
|
||||
<button type="button" class="btn btn-default btn-sm" data-cod="refresh">刷新</button>
|
||||
</div>
|
||||
<!-- /.btn-group -->
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="pull-right">
|
||||
{$page}
|
||||
</div>
|
||||
<!-- /.pull-right -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box -->
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<!-- /.content-wrapper -->
|
||||
<style>
|
||||
.table-responsive .table tbody > tr > th,.table-responsive .table thead > tr > td, .table-responsive .table tbody > tr > td {
|
||||
vertical-align: middle;
|
||||
}
|
||||
</style>
|
||||
<!-- Page Script -->
|
||||
<script type="text/javascript">
|
||||
function del(id) {
|
||||
if (confirm('确认删除?')){
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
dataType: "json",
|
||||
url: "/admin/shopselle/delete",
|
||||
data: {
|
||||
id: id,
|
||||
},
|
||||
success: function (res) {
|
||||
if (res) {
|
||||
alert(res.msg);
|
||||
location.reload();
|
||||
}
|
||||
},
|
||||
|
||||
});
|
||||
} else {
|
||||
alert('已取消操作');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function batch_del() {
|
||||
var ids = $("input[name='ids']:checked");
|
||||
|
||||
var id = '';
|
||||
$(ids).each(function(index, item) {
|
||||
id += item.value + ',';
|
||||
});
|
||||
|
||||
if (confirm('确认删除?')){
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
dataType: "json",
|
||||
url: "/admin/shopselle/batchDelete",
|
||||
data: {
|
||||
ids: id,
|
||||
},
|
||||
success: function (res) {
|
||||
if (res) {
|
||||
alert(res.msg);
|
||||
location.reload();
|
||||
}
|
||||
},
|
||||
|
||||
});
|
||||
} else {
|
||||
alert('已取消操作');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
Reference in New Issue
Block a user