commit
ba631319b2
121
app/admin/controller/nk/Community.php
Normal file
121
app/admin/controller/nk/Community.php
Normal file
@ -0,0 +1,121 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\controller\nk;
|
||||
|
||||
use app\admin\BaseController;
|
||||
use think\facade\Db;
|
||||
use think\facade\View;
|
||||
|
||||
|
||||
/**
|
||||
* 文章投诉
|
||||
*
|
||||
* @icon fa fa-circle-o
|
||||
*/
|
||||
class Community extends BaseController
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* 构造函数
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->adminInfo = get_login_admin();
|
||||
$this->url=[
|
||||
'/admin/nk.community/index',
|
||||
'/admin/nk.community/add',
|
||||
'/admin/nk.community/edit',
|
||||
'/admin/nk.community/del',
|
||||
'/admin/nk.community/read',
|
||||
];
|
||||
}
|
||||
/**
|
||||
* 数据列表
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
if (request()->isAjax()) {
|
||||
$params= get_params();
|
||||
$where['status']=1;
|
||||
$where = [];
|
||||
if (isset($params['keywords'])){
|
||||
// $where[]=['title','like','%'.$params['keywords'].'%'];
|
||||
}
|
||||
if($this->adminInfo['position_id'] != 1){ //不是超级管理员
|
||||
$www['admin_id'] = $this->adminInfo['id'];
|
||||
$user_address = Db::table('fa_szxc_information_useraddress')->where($www)->find();
|
||||
if ($user_address){
|
||||
if ($user_address['auth_range'] == 2){
|
||||
$where['street_id'] = $user_address['street_id'];
|
||||
}elseif ($user_address['auth_range'] == 3){
|
||||
$where['area_id'] = $user_address['area_id'];
|
||||
}else{
|
||||
$where['village_id'] = $user_address['village_id'];
|
||||
}
|
||||
}else{
|
||||
$where['village_id'] = '';
|
||||
}
|
||||
}
|
||||
|
||||
$total = Db::connect('shop')->name('community_address')
|
||||
->where($where)
|
||||
->count();
|
||||
if ($total!=0){
|
||||
$list = Db::connect('shop')->name('community_address')
|
||||
->where($where)
|
||||
->page($params['page'])
|
||||
->limit($params['limit'])
|
||||
->select();
|
||||
$arr=[];
|
||||
foreach ($list as $k=>$v){
|
||||
$arr[]=$v['community_id'];
|
||||
}
|
||||
$list2=Db::connect('shop')->name('community')->where('community_id','in',$arr)->select();
|
||||
}else{
|
||||
$list2=[];
|
||||
}
|
||||
|
||||
$result = ['total' => $total, 'data' => $list2];
|
||||
return table_assign(0, '', $result);
|
||||
}
|
||||
else{
|
||||
return view('nk/community/index',['url'=>$this->url]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查看信息
|
||||
*/
|
||||
public function read()
|
||||
{
|
||||
$param= get_params();
|
||||
$id = isset($param['id']) ? $param['id'] : 0;
|
||||
$detail = Db::connect('shop')->name('community')->where('community_id',$id)->find();
|
||||
if (!empty($detail)) {
|
||||
View::assign('detail', $detail);
|
||||
return view();
|
||||
}
|
||||
else{
|
||||
throw new \think\exception\HttpException(404, '找不到页面');
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
public function del()
|
||||
{
|
||||
$param= get_params();
|
||||
$id = isset($param['id']) ? $param['id'] : 0;
|
||||
$res = Db::connect('shop')->name('community')->where('community_id',$id)->delete();
|
||||
Db::connect('shop')->name('community_address')->where('community_id',$id)->delete();
|
||||
if ($res){
|
||||
return to_assign();
|
||||
}else{
|
||||
return to_assign(1, '操作失败,原因:'.$res);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
67
app/admin/controller/nk/Merchant.php
Normal file
67
app/admin/controller/nk/Merchant.php
Normal file
@ -0,0 +1,67 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\controller\nk;
|
||||
|
||||
use app\admin\BaseController;
|
||||
use think\facade\Db;
|
||||
use think\facade\View;
|
||||
|
||||
/**
|
||||
* 区域订单手续费(佣金)管理
|
||||
*
|
||||
* @icon fa fa-circle-o
|
||||
*/
|
||||
class Merchant extends BaseController
|
||||
{
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->adminInfo = get_login_admin();
|
||||
$this->url=[
|
||||
'/admin/nk.merchant/index',
|
||||
];
|
||||
}
|
||||
/**
|
||||
* 查看
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$total=0;
|
||||
$list=[];
|
||||
$brokerage_price=0;
|
||||
$find=Db::table('fa_szxc_information_useraddress')->where('user_id',$this->adminInfo['id'])->value('street_id');
|
||||
if (request()->isAjax()) {
|
||||
$params= get_params();
|
||||
if ($find!=0){
|
||||
$total=Db::connect('shop')->name('merchant_address')->where('street_id',$find)
|
||||
->where('status',1)->count();
|
||||
$merchant_id=Db::connect('shop')->name('merchant_address')->where('street_id',$find)
|
||||
->where('status',1)
|
||||
->page($params['page'])
|
||||
->limit($params['limit'])
|
||||
->field('mer_id')->select();
|
||||
$arr=[];
|
||||
foreach ($merchant_id as $k=>$v){
|
||||
$arr[]=$v['mer_id'];
|
||||
}
|
||||
$list=Db::connect('shop')->name('merchant')->where('mer_id','in',$arr)->select();
|
||||
}
|
||||
$result = ['total' => $total, 'data' => $list];
|
||||
return table_assign(0, '', $result);
|
||||
}
|
||||
View::assign('brokerage_price', $brokerage_price);
|
||||
|
||||
return view('',['url'=>$this->url]);
|
||||
}
|
||||
/**
|
||||
* 查看信息
|
||||
*/
|
||||
public function read()
|
||||
{
|
||||
$params = get_params();
|
||||
|
||||
return view('',['url'=>$this->url]);
|
||||
|
||||
}
|
||||
|
||||
}
|
62
app/admin/controller/nk/RegionCommission.php
Normal file
62
app/admin/controller/nk/RegionCommission.php
Normal file
@ -0,0 +1,62 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\controller\nk;
|
||||
|
||||
use app\admin\BaseController;
|
||||
use think\facade\Db;
|
||||
use think\facade\View;
|
||||
|
||||
/**
|
||||
* 区域订单手续费(佣金)管理
|
||||
*
|
||||
* @icon fa fa-circle-o
|
||||
*/
|
||||
class RegionCommission extends BaseController
|
||||
{
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->adminInfo = get_login_admin();
|
||||
$this->url=[
|
||||
'/admin/nk.regioncommission/index',
|
||||
];
|
||||
}
|
||||
/**
|
||||
* 查看
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$total=0;
|
||||
$list=[];
|
||||
$brokerage_price=0;
|
||||
$find=Db::table('fa_szxc_information_useraddress')->where('user_id',$this->adminInfo['id'])->value('street_id');
|
||||
if ($find!=0) {
|
||||
$brokerage_price=Db::connect('shop')->name('store_order_region_commission')->where('street_id',$find)->sum('commission_rate');
|
||||
}
|
||||
if (request()->isAjax()) {
|
||||
$params= get_params();
|
||||
if ($find!=0){
|
||||
$list=Db::connect('shop')->name('store_order_region_commission')->where('street_id',$find)
|
||||
->page($params['page'])
|
||||
->limit($params['limit'])
|
||||
->select();
|
||||
}
|
||||
$result = ['total' => $total, 'data' => $list];
|
||||
return table_assign(0, '', $result);
|
||||
}
|
||||
View::assign('brokerage_price', $brokerage_price);
|
||||
|
||||
return view('',['url'=>$this->url]);
|
||||
}
|
||||
/**
|
||||
* 查看信息
|
||||
*/
|
||||
public function read()
|
||||
{
|
||||
$params = get_params();
|
||||
|
||||
return view('',['url'=>$this->url]);
|
||||
|
||||
}
|
||||
|
||||
}
|
83
app/admin/controller/nk/RuralWelfare.php
Normal file
83
app/admin/controller/nk/RuralWelfare.php
Normal file
@ -0,0 +1,83 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\controller\nk;
|
||||
|
||||
use app\admin\BaseController;
|
||||
use think\facade\View;
|
||||
|
||||
/**
|
||||
* 文章
|
||||
*
|
||||
* @icon fa fa-circle-o
|
||||
*/
|
||||
class RuralWelfare extends BaseController
|
||||
{
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->adminInfo = get_login_admin();
|
||||
$this->category_id=352;
|
||||
$this->url=[
|
||||
'/admin/nk.ruralwelfare/index?category_id='.$this->category_id,
|
||||
'/admin/nk.ruralwelfare/add',
|
||||
'/admin/nk.ruralwelfare/edit',
|
||||
'/admin/nk.ruralwelfare/del',
|
||||
'/admin/nk.ruralwelfare/read',
|
||||
];
|
||||
}
|
||||
/**
|
||||
* 查看
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
if (request()->isAjax()) {
|
||||
$params= get_params();
|
||||
$params['category_id']=$this->category_id;
|
||||
(new Article())->index($params);
|
||||
}
|
||||
return view('nk/article/index',['url'=>$this->url]);
|
||||
}
|
||||
/**
|
||||
* 添加
|
||||
*/
|
||||
public function add()
|
||||
{
|
||||
if (request()->isAjax()) {
|
||||
$params= get_params();
|
||||
$params['category_id']=$this->category_id;
|
||||
(new Article())->add($params);
|
||||
}else{
|
||||
View::assign('editor', get_system_config('other','editor'));
|
||||
View::assign('url', $this->url);
|
||||
return view('nk/article/add');
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
public function edit()
|
||||
{
|
||||
$params= get_params();
|
||||
(new Article())->edit($params);
|
||||
return view('nk/article/edit',['url'=>$this->url]);
|
||||
}
|
||||
/**
|
||||
* 查看信息
|
||||
*/
|
||||
public function read()
|
||||
{
|
||||
$params = get_params();
|
||||
(new Article())->read($params);
|
||||
|
||||
return view('nk/article/read',['url'=>$this->url]);
|
||||
|
||||
}
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
public function del()
|
||||
{
|
||||
$params= get_params();
|
||||
(new Article())->del($params);
|
||||
}
|
||||
}
|
65
app/admin/controller/nk/Spread.php
Normal file
65
app/admin/controller/nk/Spread.php
Normal file
@ -0,0 +1,65 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\controller\nk;
|
||||
|
||||
use app\admin\BaseController;
|
||||
use think\exception\ValidateException;
|
||||
use think\facade\Db;
|
||||
use app\admin\controller\nk\Article;
|
||||
use think\facade\View;
|
||||
|
||||
/**
|
||||
* 佣金管理
|
||||
*
|
||||
* @icon fa fa-circle-o
|
||||
*/
|
||||
class Spread extends BaseController
|
||||
{
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->adminInfo = get_login_admin();
|
||||
$this->category_id=309;
|
||||
$this->url=[
|
||||
'/admin/nk.spread/index',
|
||||
'/admin/nk.spread/read',
|
||||
];
|
||||
}
|
||||
/**
|
||||
* 查看
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$nk_user=Db::connect('shop')->name('nk_user')->where('n_user_id',$this->adminInfo['id'])->value('user_id');
|
||||
$total=0;
|
||||
$list=[];
|
||||
$brokerage_price=Db::connect('shop')->name('user')->where('uid',$nk_user)->value('brokerage_price');
|
||||
|
||||
if (request()->isAjax()) {
|
||||
$params= get_params();
|
||||
if ($nk_user!=0){
|
||||
$list=Db::connect('shop')->name('store_order')->where('spread_uid',$nk_user)
|
||||
->where('status',3)
|
||||
->field('uid,order_sn,pay_time,extension_one,extension_two,is_selfbuy')
|
||||
->page($params['page'])
|
||||
->limit($params['limit'])
|
||||
->select();
|
||||
}
|
||||
$result = ['total' => $total, 'data' => $list];
|
||||
return table_assign(0, '', $result);
|
||||
}
|
||||
View::assign('brokerage_price', $brokerage_price);
|
||||
return view('',['url'=>$this->url]);
|
||||
}
|
||||
/**
|
||||
* 查看信息
|
||||
*/
|
||||
public function read()
|
||||
{
|
||||
$params = get_params();
|
||||
|
||||
return view('',['url'=>$this->url]);
|
||||
|
||||
}
|
||||
|
||||
}
|
122
app/admin/view/nk/community/index.html
Normal file
122
app/admin/view/nk/community/index.html
Normal file
@ -0,0 +1,122 @@
|
||||
{extend name="common/base"/}
|
||||
<!-- 主体 -->
|
||||
{block name="body"}
|
||||
|
||||
<div class="p-3">
|
||||
<form class="layui-form gg-form-bar border-t border-x">
|
||||
<div class="layui-input-inline" style="width:300px;">
|
||||
<input type="text" name="keywords" placeholder="请输入标题" class="layui-input" autocomplete="off" />
|
||||
</div>
|
||||
<button class="layui-btn layui-btn-normal" lay-submit="" lay-filter="searchform">提交搜索</button>
|
||||
</form>
|
||||
<table class="layui-hide" id="article" lay-filter="article"></table>
|
||||
</div>
|
||||
|
||||
<script type="text/html" id="status">
|
||||
<i class="layui-icon {{# if(d.status == 1){ }}layui-icon-ok{{# } else { }}layui-icon-close{{# } }}"></i>
|
||||
</script>
|
||||
<script type="text/html" id="is_home">
|
||||
<i class="layui-icon {{# if(d.is_home == 1){ }}layui-icon-ok{{# } else { }}layui-icon-close{{# } }}"></i>
|
||||
</script>
|
||||
|
||||
<script type="text/html" id="toolbarDemo">
|
||||
<div class="layui-btn-container">
|
||||
<span class="layui-btn layui-btn-sm" lay-event="add" data-title="添加内容">+ 添加内容</span>
|
||||
</div>
|
||||
</script>
|
||||
|
||||
<script type="text/html" id="barDemo">
|
||||
<div class="layui-btn-group"><a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="read">查看</a><a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a></div>
|
||||
</script>
|
||||
|
||||
{/block}
|
||||
<!-- /主体 -->
|
||||
|
||||
<!-- 脚本 -->
|
||||
{block name="script"}
|
||||
<script>
|
||||
const moduleInit = ['tool'];
|
||||
function gouguInit() {
|
||||
var table = layui.table,tool = layui.tool, form = layui.form;
|
||||
layui.pageTable = table.render({
|
||||
elem: '#article',
|
||||
title: '文章表列表',
|
||||
toolbar: '#toolbarDemo',
|
||||
url: '{$url[0]}',
|
||||
page: true,
|
||||
limit: 20,
|
||||
cellMinWidth: 300,
|
||||
cols: [
|
||||
[
|
||||
{
|
||||
fixed: 'left',
|
||||
field: 'community_id',
|
||||
title: '编号',
|
||||
align: 'center',
|
||||
width:120,
|
||||
},{
|
||||
field: 'title',
|
||||
title: '标题',
|
||||
},{
|
||||
fixed: 'right',
|
||||
field: 'right',
|
||||
title: '操作',
|
||||
toolbar: '#barDemo',
|
||||
align: 'center'
|
||||
}
|
||||
]
|
||||
]
|
||||
});
|
||||
|
||||
//监听表头工具栏事件
|
||||
table.on('toolbar(article)', function(obj){
|
||||
if (obj.event === 'add') {
|
||||
tool.side('{$url[1]}');
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
//监听表格行工具事件
|
||||
table.on('tool(article)', function(obj) {
|
||||
var data = obj.data;
|
||||
if (obj.event === 'read') {
|
||||
tool.side('{$url[4]}?id='+obj.data.community_id);
|
||||
}
|
||||
else if (obj.event === 'edit') {
|
||||
tool.side('{$url[2]}?id='+obj.data.community_id);
|
||||
}
|
||||
else if (obj.event === 'del') {
|
||||
layer.confirm('确定要删除该记录吗?', {
|
||||
icon: 3,
|
||||
title: '提示'
|
||||
}, function(index) {
|
||||
let callback = function (e) {
|
||||
layer.msg(e.msg);
|
||||
if (e.code == 0) {
|
||||
obj.del();
|
||||
}
|
||||
}
|
||||
tool.delete('{$url[3]}', { id: data.community_id }, callback);
|
||||
layer.close(index);
|
||||
});
|
||||
}
|
||||
return false;
|
||||
});
|
||||
|
||||
//监听搜索提交
|
||||
form.on('submit(searchform)', function(data) {
|
||||
layui.pageTable.reload({
|
||||
where: {
|
||||
keywords: data.field.keywords,
|
||||
cate_id: data.field.cate_id
|
||||
},
|
||||
page: {
|
||||
curr: 1
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
}
|
||||
</script>
|
||||
{/block}
|
||||
<!-- /脚本 -->
|
29
app/admin/view/nk/community/read.html
Normal file
29
app/admin/view/nk/community/read.html
Normal file
@ -0,0 +1,29 @@
|
||||
{extend name="common/base"/}
|
||||
{block name="style"}
|
||||
<style>
|
||||
.content-article img{max-width:88%!important; height:auto!important; margin:6px 0!important; border-radius:4px;}
|
||||
</style>
|
||||
{/block}
|
||||
<!-- 主体 -->
|
||||
{block name="body"}
|
||||
<div class="layui-form p-4">
|
||||
<h3 class="pb-3">文章详情</h3>
|
||||
<table class="layui-table layui-table-form">
|
||||
<tr>
|
||||
<td class="layui-td-gray">标题<font>*</font></td>
|
||||
<td colspan="7">{$detail.title}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="6" class="layui-td-gray" style="text-align:left">内容</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="6">
|
||||
{$detail.content|raw}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
{/block}
|
||||
<!-- /主体 -->
|
90
app/admin/view/nk/merchant/index.html
Normal file
90
app/admin/view/nk/merchant/index.html
Normal file
@ -0,0 +1,90 @@
|
||||
{extend name="common/base"/}
|
||||
<!-- 主体 -->
|
||||
{block name="body"}
|
||||
<style>
|
||||
.sm-st {
|
||||
background: #fff;
|
||||
padding: 20px;
|
||||
border-radius: 3px;
|
||||
margin-bottom: 20px;
|
||||
box-shadow: 0 1px 0px rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
|
||||
.sm-st-icon {
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
display: inline-block;
|
||||
line-height: 60px;
|
||||
text-align: center;
|
||||
font-size: 30px;
|
||||
background: #eee;
|
||||
border-radius: 5px;
|
||||
float: left;
|
||||
margin-right: 10px;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.sm-st-info {
|
||||
font-size: 12px;
|
||||
padding-top: 2px;
|
||||
}
|
||||
|
||||
.sm-st-info span {
|
||||
display: block;
|
||||
font-size: 24px;
|
||||
font-weight: 600;
|
||||
}
|
||||
.col-sm-2{
|
||||
width: 16%;
|
||||
display: inline-block;
|
||||
}
|
||||
.panel{
|
||||
background-color: #fff;
|
||||
}
|
||||
</style>
|
||||
<script type="text/html" id="barDemo">
|
||||
<div class="layui-btn-group">
|
||||
<a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="read">查看</a>
|
||||
{/if}
|
||||
</script>
|
||||
|
||||
{/block}
|
||||
<!-- /主体 -->
|
||||
|
||||
<!-- 脚本 -->
|
||||
{block name="script"}
|
||||
<script>
|
||||
const moduleInit = ['tool'];
|
||||
function gouguInit() {
|
||||
var table = layui.table,tool = layui.tool, form = layui.form;
|
||||
layui.pageTable = table.render({
|
||||
elem: '#article',
|
||||
title: '文章表列表',
|
||||
toolbar: '#toolbarDemo',
|
||||
url: '{$url[0]}',
|
||||
page: true,
|
||||
limit: 20,
|
||||
cellMinWidth: 300,
|
||||
cols: [
|
||||
[
|
||||
{
|
||||
fixed: 'left',
|
||||
field: 'id',
|
||||
title: '编号',
|
||||
align: 'center',
|
||||
},{
|
||||
field: 'order_sn',
|
||||
title: '订单号',
|
||||
},{
|
||||
field: 'commission_rate',
|
||||
title: '订单手机费',
|
||||
align: 'center',
|
||||
}
|
||||
]
|
||||
]
|
||||
});
|
||||
|
||||
}
|
||||
</script>
|
||||
{/block}
|
||||
<!-- /脚本 -->
|
104
app/admin/view/nk/regioncommission/index.html
Normal file
104
app/admin/view/nk/regioncommission/index.html
Normal file
@ -0,0 +1,104 @@
|
||||
{extend name="common/base"/}
|
||||
<!-- 主体 -->
|
||||
{block name="body"}
|
||||
<style>
|
||||
.sm-st {
|
||||
background: #fff;
|
||||
padding: 20px;
|
||||
border-radius: 3px;
|
||||
margin-bottom: 20px;
|
||||
box-shadow: 0 1px 0px rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
|
||||
.sm-st-icon {
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
display: inline-block;
|
||||
line-height: 60px;
|
||||
text-align: center;
|
||||
font-size: 30px;
|
||||
background: #eee;
|
||||
border-radius: 5px;
|
||||
float: left;
|
||||
margin-right: 10px;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.sm-st-info {
|
||||
font-size: 12px;
|
||||
padding-top: 2px;
|
||||
}
|
||||
|
||||
.sm-st-info span {
|
||||
display: block;
|
||||
font-size: 24px;
|
||||
font-weight: 600;
|
||||
}
|
||||
.col-sm-2{
|
||||
width: 16%;
|
||||
display: inline-block;
|
||||
}
|
||||
.panel{
|
||||
background-color: #fff;
|
||||
}
|
||||
</style>
|
||||
<div class="p-3 panel">
|
||||
<div class="panel" id="search_box">
|
||||
<div style="text-align: center;">
|
||||
<div class="sm-st clearfix">
|
||||
<div class="sm-st-info">
|
||||
<span id="old_num">{$brokerage_price}</span>
|
||||
总佣金
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<table class="layui-hide" id="article" lay-filter="article"></table>
|
||||
</div>
|
||||
|
||||
<script type="text/html" id="barDemo">
|
||||
<div class="layui-btn-group">
|
||||
<a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="read">查看</a>
|
||||
{/if}
|
||||
</script>
|
||||
|
||||
{/block}
|
||||
<!-- /主体 -->
|
||||
|
||||
<!-- 脚本 -->
|
||||
{block name="script"}
|
||||
<script>
|
||||
const moduleInit = ['tool'];
|
||||
function gouguInit() {
|
||||
var table = layui.table,tool = layui.tool, form = layui.form;
|
||||
layui.pageTable = table.render({
|
||||
elem: '#article',
|
||||
title: '文章表列表',
|
||||
toolbar: '#toolbarDemo',
|
||||
url: '{$url[0]}',
|
||||
page: true,
|
||||
limit: 20,
|
||||
cellMinWidth: 300,
|
||||
cols: [
|
||||
[
|
||||
{
|
||||
fixed: 'left',
|
||||
field: 'id',
|
||||
title: '编号',
|
||||
align: 'center',
|
||||
},{
|
||||
field: 'order_sn',
|
||||
title: '订单号',
|
||||
},{
|
||||
field: 'commission_rate',
|
||||
title: '订单手机费',
|
||||
align: 'center',
|
||||
}
|
||||
]
|
||||
]
|
||||
});
|
||||
|
||||
}
|
||||
</script>
|
||||
{/block}
|
||||
<!-- /脚本 -->
|
131
app/admin/view/nk/spread/index.html
Normal file
131
app/admin/view/nk/spread/index.html
Normal file
@ -0,0 +1,131 @@
|
||||
{extend name="common/base"/}
|
||||
<!-- 主体 -->
|
||||
{block name="body"}
|
||||
<style>
|
||||
.sm-st {
|
||||
background: #fff;
|
||||
padding: 20px;
|
||||
border-radius: 3px;
|
||||
margin-bottom: 20px;
|
||||
box-shadow: 0 1px 0px rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
|
||||
.sm-st-icon {
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
display: inline-block;
|
||||
line-height: 60px;
|
||||
text-align: center;
|
||||
font-size: 30px;
|
||||
background: #eee;
|
||||
border-radius: 5px;
|
||||
float: left;
|
||||
margin-right: 10px;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.sm-st-info {
|
||||
font-size: 12px;
|
||||
padding-top: 2px;
|
||||
}
|
||||
|
||||
.sm-st-info span {
|
||||
display: block;
|
||||
font-size: 24px;
|
||||
font-weight: 600;
|
||||
}
|
||||
.col-sm-2{
|
||||
width: 16%;
|
||||
display: inline-block;
|
||||
}
|
||||
.panel{
|
||||
background-color: #fff;
|
||||
}
|
||||
</style>
|
||||
<div class="p-3 panel">
|
||||
<div class="panel" id="search_box">
|
||||
<div style="text-align: center;">
|
||||
<div class="sm-st clearfix">
|
||||
<div class="sm-st-info">
|
||||
<span id="old_num">{$brokerage_price}</span>
|
||||
总佣金
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<table class="layui-hide" id="article" lay-filter="article"></table>
|
||||
</div>
|
||||
|
||||
<script type="text/html" id="barDemo">
|
||||
<div class="layui-btn-group">
|
||||
<a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="read">查看</a>
|
||||
{/if}
|
||||
</script>
|
||||
|
||||
{/block}
|
||||
<!-- /主体 -->
|
||||
|
||||
<!-- 脚本 -->
|
||||
{block name="script"}
|
||||
<script>
|
||||
const moduleInit = ['tool'];
|
||||
function gouguInit() {
|
||||
var table = layui.table,tool = layui.tool, form = layui.form;
|
||||
layui.pageTable = table.render({
|
||||
elem: '#article',
|
||||
title: '文章表列表',
|
||||
toolbar: '#toolbarDemo',
|
||||
url: '{$url[0]}',
|
||||
page: true,
|
||||
limit: 20,
|
||||
cellMinWidth: 300,
|
||||
cols: [
|
||||
[
|
||||
{
|
||||
fixed: 'left',
|
||||
field: 'id',
|
||||
title: '编号',
|
||||
align: 'center',
|
||||
},{
|
||||
field: 'order_sn',
|
||||
title: '订单号',
|
||||
},{
|
||||
field: 'extension_one',
|
||||
title: '一级佣金',
|
||||
align: 'center',
|
||||
},{
|
||||
field: 'extension_two',
|
||||
title: '一级佣金',
|
||||
align: 'center',
|
||||
}
|
||||
]
|
||||
]
|
||||
});
|
||||
//监听表格行工具事件
|
||||
table.on('tool(article)', function(obj) {
|
||||
var data = obj.data;
|
||||
if (obj.event === 'read') {
|
||||
tool.side('{$url[1]}?id='+obj.data.id);
|
||||
}
|
||||
return false;
|
||||
});
|
||||
|
||||
//监听搜索提交
|
||||
form.on('submit(searchform)', function(data) {
|
||||
layui.pageTable.reload({
|
||||
where: {
|
||||
keywords: data.field.keywords,
|
||||
cate_id: data.field.cate_id,
|
||||
phone:data.field.phone
|
||||
},
|
||||
page: {
|
||||
curr: 1
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
|
||||
}
|
||||
</script>
|
||||
{/block}
|
||||
<!-- /脚本 -->
|
@ -159,7 +159,7 @@
|
||||
},
|
||||
data: [],
|
||||
radio: true,
|
||||
disabled: group_access == 2 ? true : false,
|
||||
disabled: group_access == 2 ||group_access == 4? true : false,
|
||||
on: function (data) {
|
||||
var arr = data.arr;
|
||||
village(arr[0]['code'])
|
||||
|
@ -52,6 +52,7 @@ abstract class BaseController
|
||||
$this->app = $app;
|
||||
$this->request = $this->app->request;
|
||||
// 控制器初始化
|
||||
return redirect('/admin');
|
||||
$this->initialize();
|
||||
}
|
||||
|
||||
|
@ -16,7 +16,6 @@ class Index extends BaseController
|
||||
{
|
||||
public function index()
|
||||
{
|
||||
return redirect('/admin');
|
||||
add_user_log('view', '首页');
|
||||
$count = \think\facade\Db::name('UserLog')->where(array('type' => 'down'))->count();
|
||||
return View('',['count'=>$count]);
|
||||
|
Loading…
x
Reference in New Issue
Block a user