作者 郭鑫

改了好多东西

... ... @@ -146,4 +146,38 @@ class IndexController extends CommonController
$this->apiResponse('1','成功',$find);
}
/**
* @title 首页二维码
* @description 接口说明
* @author 开发者
* @url /api/portal/Index/code
* @method POST
*/
public function code(){
$where_video['status'] = 1;
$find = Db::name('Qrcode')->where($where_video)->order('create_time desc')->select()->toArray();
if($find){
foreach ($find as $k=>$v){
$find[$k]['path'] = cmf_get_image_url($v['path']);
}
}
$this->apiResponse('1','成功',$find);
}
/**
* @title 首页推广
* @description 接口说明
* @author 开发者
* @url /api/portal/Index/share
* @method POST
*/
public function share(){
$where_push['status'] = 1;
$list = Db::name('Push')->where($where_push)->find();
$final['content'] = $list;
$this->apiResponse('1','成功',$final);
}
}
... ...
... ... @@ -651,7 +651,7 @@ class IntermediaryController extends CommonController
$agency = Db::name('Agency')->alias('a')
->join('Member m','m.id = a.agency_id')
->where($where_agency)
->field('a.*,m.referee_id,m.name,m.tel')
->field('a.*,m.referee_id,m.name,m.tel,m.id as amid,m.money as amoney')
->find();
if($agency){
$where_need['id'] = $agency['need_id'];
... ... @@ -664,49 +664,80 @@ class IntermediaryController extends CommonController
$add_agency = Db::name('Agency')->alias('a')->where($where_agency)->update($update_agency);
$update_need['status'] = 10;
$update_need['update_time'] = time();
$update_need['sure_time'] = time();
$add_need = Db::name('UserNeed')->where($where_need)->update($update_need);
if($add_agency && $add_need){
// 判断是否已返
$where_findstatus['token'] = $data['token'];
$get_money = Db::name('Member')->where($where_findstatus)->value('is_getmoney');
if($get_money == 0){
// 增加推荐人返利金额
if($agency['referee_id']){
$where_parent['id'] = $agency['referee_id'];
$parent = Db::name('Member')->where($where_parent)->find();
// 分别查询用户,中介推荐人
$where_m['id'] = $need['user_id'];
$refereeFirst = Db::name('Member')->where($where_m)->field('referee_id,money')->find();
$need_referee = $refereeFirst['referee_id'];
$agency_referee = $agency['referee_id'];
// 诚意金金额获取
$where_reward['type'] = 5;
$where_reward['status'] = 1;
$reward = Db::name('Reward')->where($where_reward)->find();
if($parent){
$add_detail['user_id'] = $agency['referee_id'];
$add_detail['user_type'] = $parent['type'];
$add_detail['title'] = '推荐'.$agency['user_id'];
$add_detail['money'] = $reward['number'];
$add_detail['order_type'] = 7;
$add_detail['type'] = 1;
$add_detail['status'] = 1;
$add_detail['create_time'] = time();
$add_detail['update_time'] = time();
$add_res = Db::name('MoneyDetail')->insertGetId($add_detail);
if($add_res){
$where_addParent['id'] = $agency['referee_id'];
$add_parent = Db::name('Member')->where($where_addParent)->setInc('money',$reward['number']);
if(!$add_parent){
Db::rollback();
$this->apiResponse('0','确认失败');
}
}else{
$where_reward['type'] = 5;
$where_reward['status'] = 1;
$reward = Db::name('Reward')->where($where_reward)->find();
// 查询推荐人是否已获得奖励
// 需求用户
$where_nref['id'] = $need_referee;
$is_needReferee = Db::name('Member')->where($where_nref)->field('is_getmoney')->find();
if($is_needReferee['is_getmoney'] == 0){
$add_detail['user_id'] = $need_referee;
$add_detail['title'] = '推荐'.$need['amid'];;
$add_detail['money'] = $reward['number'];
$add_detail['order_type'] = 7;
$add_detail['type'] = 1;
$add_detail['status'] = 1;
$add_detail['create_time'] = time();
$add_detail['update_time'] = time();
$add_res = Db::name('MoneyDetail')->insertGetId($add_detail);
if($add_res) {
$where_addParent['id'] = $need_referee;
$needReferee_add['money'] = $reward['number']+$need_referee['money'];
$needReferee_add['getmoney_id'] = $need['user_id'];
$add_parent = Db::name('Member')->where($where_addParent)->update($needReferee_add);
if (!$add_parent) {
Db::rollback();
$this->apiResponse('0','确认失败');
$this->apiResponse('0', '确认失败');
}
}else{
Db::rollback();
$this->apiResponse('0','推荐人错误');
$this->apiResponse('0','确认失败');
}
}
}
// 中介用户
$where_aref['id'] = $agency_referee;
$is_agencyReferee = Db::name('Member')->where($where_aref)->field('is_getmoney')->find();
if($is_agencyReferee['is_getmoney'] == 0){
$add_detailNext['user_id'] = $agency_referee;
$add_detailNext['title'] = '推荐'.$agency['amid'];;
$add_detailNext['money'] = $reward['number'];
$add_detailNext['order_type'] = 7;
$add_detailNext['type'] = 1;
$add_detailNext['status'] = 1;
$add_detailNext['create_time'] = time();
$add_detailNext['update_time'] = time();
$add_resNext = Db::name('MoneyDetail')->insertGetId($add_detailNext);
if($add_resNext) {
$where_addParentNext['id'] = $agency_referee;
$needReferee_addNext['money'] = $reward['number']+$agency['amoney'];
$needReferee_addNext['getmoney_id'] = $agency['amid'];
$add_parentNext = Db::name('Member')->where($needReferee_addNext)->update($needReferee_addNext);
if (!$add_parentNext) {
Db::rollback();
$this->apiResponse('0', '确认失败');
}
}else{
Db::rollback();
$this->apiResponse('0','确认失败');
}
}
// 退回需求用户保证金
$need['user_type'] = Db::name('Member')->where(['id'=>$need['user_id']])->value('type');
$thirdsend = controller('Thirdsend','controller');
... ...
... ... @@ -139,6 +139,9 @@ class ThirdsendController extends HomeBaseController
if($time < $userNeedList['pay_time']+1800){
$this->apiResponse('0','未到发布时间');
}else{
// 查询父级
$where_save['id'] = $data['need_id'];
$save['status'] = 3;
$save['update_time'] = time();
... ... @@ -1061,4 +1064,36 @@ class ThirdsendController extends HomeBaseController
$response = SmsDemo::sendBatchSms($tel,$code,$modelVal,$json_autograph);
return $response;
}
/**
* 人机验证接口
*/
public function luosimao() {
$data = $this->request->param();
$return = $this->curl('129be932c145c773f436eeb263465339',$data['response']);
$this->apiResponse(1,'成功',$return);
}
//人机验证提交curl
public function curl($api_key,$response) {
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://captcha.luosimao.com/api/site_verify");
curl_setopt($ch, CURLOPT_HTTP_VERSION , CURL_HTTP_VERSION_1_0 );
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 8);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($ch, CURLOPT_HEADER, FALSE);
curl_setopt($ch, CURLOPT_HTTPAUTH , CURLAUTH_BASIC);
curl_setopt($ch, CURLOPT_USERPWD , 'api:key-'.$api_key);
curl_setopt($ch, CURLOPT_POST, TRUE);
curl_setopt($ch, CURLOPT_POSTFIELDS, array('api_key' => $api_key,'response' => $response));
$res = curl_exec( $ch );
curl_close( $ch );
//$res = curl_error( $ch );
// var_dump($res);
return $res;
}
}
... ...
... ... @@ -272,7 +272,8 @@ class UserController extends CommonController
}
}
// end
$url = $_SERVER['SERVER_ADDR'].'/public/api/portal/Index/index?uid='.$uid;
// $url = $_SERVER['SERVER_ADDR'].'/public/api/portal/Index/index?uid='.$uid;
$url = 'http://bifangjia.cn?uid='.$uid;
$get_url = $this->shot($url);
$update_shot['link'] = $get_url;
$update_shot['id'] = $uid;
... ... @@ -841,7 +842,7 @@ class UserController extends CommonController
public function myleft($token){
$where_member['token'] = $token;
$where_member['status'] = 1;
$member = Db::name('Member')->where($where_member)->field('tel,id,name,referee_tel,money,get_money')->find();
$member = Db::name('Member')->where($where_member)->field('tel,id,name,referee_tel,money,get_money,link,getmoney_id')->find();
if(!$member){
$this->apiResponse('0','用户信息错误');
}
... ... @@ -1446,7 +1447,66 @@ class UserController extends CommonController
}
/**
* @title 我的推广(sure)
* @description 接口说明
* @author 开发者
* @url /api/portal/User/share
* @method POST
* @param name:token type:int require:1 default: other: desc:token
*/
public function share(){
$data = $this->request->param();
$final = array();
$my = $this->myleft($data['token']);
$where_re['referee'] = $my['id'];
$where_re['status'] = 1;
$share = Db::name('RewardLog')->where($where_re)->select();
// 查询推荐人是当前用户
$where_parent['referee_id'] = $my['id'];
$where_parent['status'] = array('neq',9);
$parent_list = Db::name('Member')->where($where_parent)->field('id,tel')->select()->toArray();
if($share){
foreach ($parent_list as $sharek=>$sharev){
// 是否发布需求
$where_need['status'] = array('neq','1,9');
$where_need['user_id'] = $sharev['id'];
$is = Db::name('UserNeed')->where($where_need)->find();
if($is){
$parent_list[$sharek]['is_need'] = 1;
$parent_list[$sharek]['sure_time'] = date('Y-m-d H:i:s',$is['sure_time']);
}else{
$parent_list[$sharek]['is_need'] = 0;
$parent_list[$sharek]['sure_time'] = 0;
}
// 奖励金是否获取
if($my['getmoney_id'] == $sharev['id']){
$parent_list[$sharek]['is_getmoney'] = 1;
}else{
$parent_list[$sharek]['is_getmoney'] = 0;
}
}
}
$final['list'] = $parent_list;
// $final['share'] = $share;
$final['user'] = $my;
$where_share['status'] = 1;
$share = Db::name('Share')->where($where_share)->select();
if($share){
foreach ($share as $k=>$v){
if($v['type'] == 1){
$final['content'] = $v;
}else if($v['type'] == 2){
$final['box'] = $v;
}else if($v['type'] == 3){
$final['pic'] = cmf_get_image_url($v['content']);
}
}
}
$this->apiResponse('1','成功',$final);
}
}
... ...
... ... @@ -303,54 +303,7 @@ class UserneedController extends CommonController
// 发布需求支付
public function needPay(Request $request){
// 添加订单
Db::startTrans();
$data = $request->param();
if(!$data['need_id']){
$this->apiResponse('0','需求不能为空');
}
// 查询金额
$where_need['id'] = $data['need_id'];
$where_need['status'] = 1;
$should_pay = Db::name('UserNeed')->where($where_need)->field('pay_money')->find();
if(!$should_pay){
$this->apiResponse('0','需求错误');
}else{
if(!$should_pay['pay_money']){
$this->apiResponse('0','诚意金金额有误');
}
}
// 拼字度
$add['need_id'] = $data['need_id'];
$add['money'] = $should_pay['pay_money'];
$add['name'] = '诚意金缴纳';
$add['type'] = 1;
$add['is_get'] = 2;
$add['status'] = 1;
// 加入数据库
$model = new OrderModel();
$save = $model->save($add);
if($save){
Db::commit();
}else{
Db::rollback();
}
// 支付(未完)
echo "<pre/>";
print_r('3333');
die;
// 更改订单状态
// 成功
$update['pay_time'] = time();
$update['status'] = time();
$update = $model->isUpdate(true)->allowField(true)->save($update);
if($update){
$this->apiResponse('1','支付成功');
}
}
... ...
... ... @@ -184,4 +184,43 @@ class CooperationController extends AdminBaseController
}
// 网站配置
public function conf(){
$data = $this->request->param();
if($this->request->post()){
}
$this->assign('list',array());
return $this->fetch();
}
// 推广内容
public function push(){
$data = $this->request->param();
if($this->request->post()){
$add['title'] = $data['title'];
$add['content'] = $data['content'];
$add['update_time'] = time();
if(empty($data['id'])){
$add['create_time'] = time();
$res = Db::name('Push')->insertGetId($add);
}else{
$where_id['id'] = $data['id'];
$res = Db::name('Push')->where($where_id)->update($add);
}
if($res){
$this->success('修改成功');
}else{
$this->error('修改失败');
}
}else{
$where_push['status'] = 1;
$list = Db::name('Push')->where($where_push)->find();
}
$this->assign('list',$list);
return $this->fetch();
}
}
... ...
... ... @@ -136,4 +136,67 @@ class NewController extends AdminBaseController
}
}
public function code(Request $request){
$where_coo['status'] = 1;
if($request->post()){
$search = $request->post();
if($search['start_time']){
$start = strtotime($search['start_time']);
if($search['end_time']){
$end = strtotime($search['end_time']);
}else{
$end = time();
}
$where_coo['update_time'] = array('between',"$start,$end");
$this->assign('start_time',date('Y-m-d H:i',$start));
$this->assign('end_time',date('Y-m-d H:i',$end));
}
}
$coo_list = Db::name('Qrcode')->where($where_coo)->field('path as pic,id,create_time,type,status,update_time')->order('create_time desc')
->select()->toArray();
// $page = $coo_list->render();
// $this->assign('page',$page);
$this->assign('list',$coo_list);
return $this->fetch();
}
public function addcode(Request $request)
{
if($request->post()){
// 添加数据
$data = $request->post();
if(empty($data['pic'])){
$this->error('图片错误');
}
if(empty($data['type'])){
$this->error('类型不能为空');
}
$add['path'] = $data['pic'];
// $add['score'] = $data['score'];
$add['type'] = $data['type'];
$add['update_time'] = time();
if($request->Post('id')){
// 修改
$where_add['id'] = $request->Post('id');
$final = Db::name('Qrcode')->where($where_add)->update($add);
}else{
// 添加
$add['create_time'] = time();
$final = Db::name('Qrcode')->insertGetId($add);
}
if($final){
$this->success('成功',url('New/code'));
}else{
$this->error('失败');
}
}else{
$where_find['id'] = $request->param('id');
$list = Db::name('Qrcode')->where($where_find)->field('path as pic,id,create_time,type,status,update_time')->find();
// $list['content'] = htmlspecialchars_decode($list['content']);
$this->assign('list',$list);
return $this->fetch();
}
}
}
... ...
... ... @@ -159,10 +159,13 @@ return array (
'PORTAL_CODE_DEFAULT' => '短信验证码管理',
'PORTAL_CODE_INDEX' => '短信验证码列表',
'PORTAL_COMPLAINT_INDEX' => '投诉管理',
'PORTAL_COOPERATION_CONF' => '网站配置',
'PORTAL_COOPERATION_DEFAULT' => '首页内容管理',
'PORTAL_COOPERATION_INDEX' => '合作企业列表',
'PORTAL_COOPERATION_PUSH' => '推广内容',
'PORTAL_COOPERATION_VIDEO' => '两分钟视频',
'PORTAL_NEED_INDEX' => '需求管理',
'PORTAL_NEW_CODE' => '二维码',
'PORTAL_NEW_INDEX' => '最新成交公布',
'PORTAL_PROCESS_INDEX' => '交易流程',
'PORTAL_REFUND_INDEX' => '退款管理',
... ...
<include file="public@header"/>
<style type="text/css">
.pic-list li {
margin-bottom: 5px;
}
</style>
</head>
<body>
<div class="wrap js-check-wrap">
<ul class="nav nav-tabs">
<li><a href="">网站配置</a></li>
<!--<li class="active"><a href="{:url('Reward/add')}">添加信誉奖励</a></li>-->
</ul>
<form action="{:url('Reward/add')}" method="post" class="form-horizontal js-ajax-form margin-top-20" enctype="multipart/form-data" >
<div class="row">
<div class="col-md-9">
<table class="table table-bordered">
<input class="form-control" type="hidden" name="id"
value=""/>
<tr>
<th width="10%">咨询电话</th>
<td><input class="form-control" type="text" name="content"
value="" placeholder="请输入咨询电话"/>
</td>
</tr>
<tr>
<th width="10%">微信公众号</th>
<td><input class="form-control" type="text" name="content"
value="" placeholder="请输入微信公众号"/>
</td>
</tr>
<tr>
<th width="10%">微信客服</th>
<td><input class="form-control" type="text" name="content"
value="" placeholder="请输入微信客服"/>
</td>
</tr>
<tr>
<th width="10%">分享</th>
<td><input class="form-control" type="text" name="content"
value="" placeholder="请输入分享"/>
</td>
</tr>
<tr>
<th width="10%">电话</th>
<td><input class="form-control" type="text" name="content"
value="" placeholder="请输入电话"/>
</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('ADD')}</button>
<a class="btn btn-default" href="{:url('Reward/index')}">{:lang('BACK')}</a>
</div>
</div>
</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('');
});
});
</script>
</body>
</html>
... ...
<include file="public@header"/>
<style type="text/css">
.pic-list li {
margin-bottom: 5px;
}
</style>
<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>
<script type="text/html" id="files-item-tpl">
<li id="saved-file{id}">
<input id="file-{id}" type="hidden" name="file_urls[]" value="{filepath}">
<input class="form-control" id="file-{id}-name" type="text" name="file_names[]" value="{name}"
style="width: 200px;" title="文件名称">
<a id="file-{id}-preview" href="{preview_url}" target="_blank">下载</a>
<a href="javascript:uploadOne('图片上传','#file-{id}','file');">替换</a>
<a href="javascript:(function(){$('#saved-file{id}').remove();})();">移除</a>
</li>
</script>
</head>
<body>
<div class="wrap js-check-wrap">
<ul class="nav nav-tabs">
<li class="active"><a href="{:url('Cooperation/push')}">推广内容</a></li>
</ul>
<form action="{:url('Cooperation/push')}" method="post" class="form-horizontal js-ajax-form margin-top-20">
<div class="row">
<div class="col-md-9">
<table class="table table-bordered">
<input class="form-control" type="hidden" name="id"
value="{$list['id']}"/>
<tr>
<th>标题<span class="form-required">*</span></th>
<td>
<input class="form-control" type="text" name="title"
id="title" required value="{$list['title']}" placeholder="请输入标题"/>
</td>
</tr>
<tr>
<th></th>
<td>
<script type="text/plain" id="content" name="content" ><php>echo htmlspecialchars_decode($list['content']);</php></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('ADD')}</button>
<a class="btn btn-default" href="{:url('Cooperation/push')}">{:lang('BACK')}</a>
</div>
</div>
</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("{$list['content']}");
});
});
</script>
</body>
</html>
... ...
<include file="public@header"/>
<style type="text/css">
.pic-list li {
margin-bottom: 5px;
}
</style>
</head>
<body>
<div class="wrap js-check-wrap">
<ul class="nav nav-tabs">
<li><a href="{:url('New/code')}">轮播图列表</a></li>
<li class="active"><a href="{:url('New/addcode')}">添加轮播图</a></li>
</ul>
<form action="{:url('New/addcode')}" method="post" class="form-horizontal js-ajax-form margin-top-20">
<div class="row">
<div class="col-md-9">
<table class="table table-bordered">
<input class="form-control" type="hidden" name="id"
value="{$list['id']}"/>
<tr>
<th width="10%">类型</th>
<td>
<select name="type" style="border: 1px solid #dce4ec; width: 15%;">
<option name="type" value="1" <eq name="list.type" value="1">selected</eq>>APP二维码</option>
<option name="type" value="2" <eq name="list.type" value="2">selected</eq>>公众号二维码</option>
<option name="type" value="3" <eq name="list.type" value="3">selected</eq>>客服二维码</option>
</select>
</td>
</tr>
<tr>
<th>轮播图<span class="form-required">*</span></th>
<td>
<div style="text-align: center;">
<input type="hidden" name="pic" id="thumbnail" value="{$list.pic}" >
<a href="javascript:uploadOneImage('图片上传','#thumbnail');">
<empty name="list['pic']">
<img src="__TMPL__/public/assets/images/default-thumbnail.png"
id="thumbnail-preview"
width="135" style="cursor: pointer"/>
<else/>
<img src="{:cmf_get_image_preview_url($list.pic)}"
id="thumbnail-preview"
width="135" style="cursor: pointer"/>
</empty>
</a>
<input type="button" class="btn btn-sm btn-cancel-thumbnail" value="取消图片">
</div>
</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="{:url('New/code')}">{:lang('BACK')}</a>
</div>
</div>
</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('');
});
});
// function doSelectCategory() {
// var selectedCategoriesId = $('#js-categories-id-input').val();
// openIframeLayer("{:url('AdminCategory/select')}?ids=" + selectedCategoriesId, '请选择分类', {
// area: ['700px', '400px'],
// btn: ['确定', '取消'],
// yes: function (index, layero) {
// //do something
//
// var iframeWin = window[layero.find('iframe')[0]['name']];
// var selectedCategories = iframeWin.confirm();
// if (selectedCategories.selectedCategoriesId.length == 0) {
// layer.msg('请选择分类');
// return;
// }
// $('#js-categories-id-input').val(selectedCategories.selectedCategoriesId.join(','));
// $('#js-categories-name-input').val(selectedCategories.selectedCategoriesName.join(' '));
// //console.log(layer.getFrameIndex(index));
// layer.close(index); //如果设定了yes回调,需进行手工关闭
// }
// });
// }
</script>
</body>
</html>
... ...
<include file="public@header"/>
</head>
<body>
<div class="wrap js-check-wrap">
<ul class="nav nav-tabs">
<li class="active"><a href="javascript:;">轮播图列表</a></li>
<li><a href="{:url('New/addcode')}">添加轮播图123</a></li>
</ul>
<form class="well form-inline margin-top-20" method="post" action="{:url('Banner/index')}">
<!--分类:-->
<!--<select class="form-control" name="category" style="width: 140px;">-->
<!--<option value='0'>全部</option>-->
<!--{$category_tree|default=''}-->
<!--</select> &nbsp;&nbsp;-->
时间:
<input type="text" class="form-control js-bootstrap-datetime" name="start_time"
value="{$start_time|default=''}"
style="width: 140px;" autocomplete="off">-
<input type="text" class="form-control js-bootstrap-datetime" name="end_time"
value="{$end_time|default=''}"
style="width: 140px;" autocomplete="off"> &nbsp; &nbsp;
<!--关键字:-->
<!--<input type="text" class="form-control" name="keyword" style="width: 200px;"-->
<!--value="{$keyword|default=''}" placeholder="请输入企业名称">-->
<input type="submit" class="btn btn-primary" value="搜索"/>
<a class="btn btn-danger" href="{:url('Banner/index')}">清空</a>
</form>
<form class="js-ajax-form" action="" method="post">
<div class="table-actions">
<!--<notempty name="category">-->
<!--<button class="btn btn-primary btn-sm js-ajax-submit" type="submit"-->
<!--data-action="{:url('AdminArticle/listOrder')}">{:lang('SORT')}-->
<!--</button>-->
<!--</notempty>-->
<!--<button class="btn btn-primary btn-sm js-ajax-submit" type="submit"-->
<!--data-action="{:url('AdminArticle/publish',array('yes'=>1))}" data-subcheck="true">发布-->
<!--</button>-->
<!--<button class="btn btn-primary btn-sm js-ajax-submit" type="submit"-->
<!--data-action="{:url('AdminArticle/publish',array('no'=>1))}" data-subcheck="true">取消发布-->
<!--</button>-->
<!--<button class="btn btn-primary btn-sm js-ajax-submit" type="submit"-->
<!--data-action="{:url('AdminArticle/top',array('yes'=>1))}" data-subcheck="true">置顶-->
<!--</button>-->
<!--<button class="btn btn-primary btn-sm js-ajax-submit" type="submit"-->
<!--data-action="{:url('AdminArticle/top',array('no'=>1))}" data-subcheck="true">取消置顶-->
<!--</button>-->
<!--<button class="btn btn-primary btn-sm js-ajax-submit" type="submit"-->
<!--data-action="{:url('AdminArticle/recommend',array('yes'=>1))}" data-subcheck="true">推荐-->
<!--</button>-->
<!--<button class="btn btn-primary btn-sm js-ajax-submit" type="submit"-->
<!--data-action="{:url('AdminArticle/recommend',array('no'=>1))}" data-subcheck="true">取消推荐-->
<!--</button>-->
<!--
<notempty name="category">
<button class="btn btn-primary btn-sm js-articles-move" type="button">批量移动</button>
</notempty>
<button class="btn btn-primary btn-sm js-articles-copy" type="button">批量复制</button>
-->
<!--<button class="btn btn-danger btn-sm js-ajax-submit" type="submit"-->
<!--data-action="{:url('Banner/del')}" data-subcheck="true" data-msg="您确定删除吗?">-->
<!--&lt;!&ndash;{:lang('DELETE')}&ndash;&gt;-->
<!--</button>-->
</div>
<table class="table table-hover table-bordered table-list">
<thead>
<tr>
<th width="15">
<label>
<input type="checkbox" class="js-check-all" data-direction="x" data-checklist="js-check-x">
</label>
</th>
<notempty name="category">
<th width="50">{:lang('SORT')}</th>
</notempty>
<th width="50">ID</th>
<th>轮播图</th>
<th>类型</th>
<th width="130">更新时间</th>
<th width="130">发布时间</th>
<!--<th width="70">状态</th>-->
<th width="90">操作</th>
</tr>
</thead>
<foreach name="list" item="list">
<tr>
<td>
<input type="checkbox" class="js-check" data-yid="js-check-y" data-xid="js-check-x" name="ids[]"
value="{$list.id}" title="ID:{$list.id}">
</td>
<td>{$list.id}</td>
<td>
<eq name="list.type" value="1">
APP二维码
</eq>
<eq name="list.type" value="2">
公众号二维码
</eq>
<eq name="list.type" value="3">
客服二维码
</eq>
</td>
<td>
<img src="{:cmf_get_image_preview_url($list.pic)}" style="height: 100px;">
<!--<a href="javascript:parent.imagePreviewDialog('{:cmf_get_image_preview_url($list.pic)}');">-->
<!--<i class="fa fa-photo fa-fw"></i>-->
<!--</a>-->
</td>
<td>
{:date('Y-m-d H:i',$list['update_time'])}
</td>
<td>
{:date('Y-m-d H:i',$list['create_time'])}
<!--<empty name="vo.published_time">-->
<!--未发布-->
<!--<else/>-->
<!--{:date('Y-m-d H:i',$list['published_time'])}-->
<!--</empty>-->
</td>
<td>
<a href="{:url('New/addcode',array('id'=>$list['id']))}">{:lang('EDIT')}</a>
<!--<a href="{:url('Banner/del',array('id'=>$list['id']))}" class="js-ajax-delete">{:lang('DELETE')}</a>-->
</td>
</tr>
</foreach>
</table>
<ul class="pagination">{$page|default=''}</ul>
</form>
</div>
<script src="__STATIC__/js/admin.js"></script>
<script>
function reloadPage(win) {
win.location.reload();
}
$(function () {
setCookie("refersh_time", 0);
Wind.use('ajaxForm', 'artDialog', 'iframeTools', function () {
//批量复制
$('.js-articles-copy').click(function (e) {
var ids = [];
$("input[name='ids[]']").each(function () {
if ($(this).is(':checked')) {
ids.push($(this).val());
}
});
if (ids.length == 0) {
art.dialog.through({
id: 'error',
icon: 'error',
content: '您没有勾选信息,无法进行操作!',
cancelVal: '关闭',
cancel: true
});
return false;
}
ids = ids.join(',');
art.dialog.open("__ROOT__/index.php?g=portal&m=AdminArticle&a=copy&ids=" + ids, {
title: "批量复制",
width: "300px"
});
});
//批量移动
$('.js-articles-move').click(function (e) {
var ids = [];
$("input[name='ids[]']").each(function () {
if ($(this).is(':checked')) {
ids.push($(this).val());
}
});
if (ids.length == 0) {
art.dialog.through({
id: 'error',
icon: 'error',
content: '您没有勾选信息,无法进行操作!',
cancelVal: '关闭',
cancel: true
});
return false;
}
ids = ids.join(',');
art.dialog.open("__ROOT__/index.php?g=portal&m=AdminArticle&a=move&old_term_id={$term.term_id|default=0}&ids=" + ids, {
title: "批量移动",
width: "300px"
});
});
});
});
</script>
</body>
</html>
\ No newline at end of file
... ...