65 lines
1.6 KiB
PHP
65 lines
1.6 KiB
PHP
<?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]);
|
|
|
|
}
|
|
|
|
} |