添加网站文件
This commit is contained in:
52
application/admin/controller/Collection.php
Normal file
52
application/admin/controller/Collection.php
Normal file
@@ -0,0 +1,52 @@
|
||||
<?php
|
||||
namespace app\admin\controller;
|
||||
use app\admin\logic\CollectionLogic;
|
||||
use think\Db;
|
||||
class Collection extends AdminBase
|
||||
{
|
||||
//显示付款的渠道
|
||||
public function lists(){
|
||||
if ($this->request->isAjax()) {
|
||||
$get = $this->request->get();
|
||||
$lists =CollectionLogic::lists($get);
|
||||
$this->_success('获取数据成功',$lists);
|
||||
}
|
||||
return $this->fetch();
|
||||
}
|
||||
|
||||
//增加付款的渠道
|
||||
|
||||
public function add(){
|
||||
if ($this->request->isAjax()) {
|
||||
$post = $this->request->post();
|
||||
$post['create_time']=time();
|
||||
$insert=Db::name('collection')->data($post)->insert();
|
||||
$this->_success('添加成功!');
|
||||
}
|
||||
return $this->fetch();
|
||||
}
|
||||
|
||||
//编辑付款渠道
|
||||
public function edit($id){
|
||||
if ($this->request->isAjax()) {
|
||||
$post = $this->request->post();
|
||||
$lists =CollectionLogic::edit($post);
|
||||
$this->_success('修改数据成功',$lists);
|
||||
}
|
||||
$info=Db::name('collection')->where('id',$id)->find();
|
||||
$this->assign('info',$info);
|
||||
return $this->fetch();
|
||||
}
|
||||
|
||||
//删除付款的渠道
|
||||
public function del($id){
|
||||
$del=Db::name('collection')->where('id',$id)->delete();
|
||||
$this->_success('删除付款渠道成功');
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user