feat: 初始化雄戈商城服务端代码与Webhook自动部署配置

这个提交包含在:
wikiboss
2026-09-12 16:40:24 +08:00
当前提交 e90ec58e61
共有 6438 个文件被更改,包括 1136083 次插入 和 0 次删除

查看文件

@@ -0,0 +1,43 @@
<?php
namespace app\admin\controller\shopro\split;
use app\admin\controller\shopro\Base;
class Rule extends Base
{
protected $model = null;
public function _initialize()
{
parent::_initialize();
$this->model = new \addons\shopro\model\split\Rule;
}
public function index()
{
$this->request->filter(['strip_tags']);
if ($this->request->isAjax()) {
list($where, $sort, $order, $offset, $limit) = $this->custombuildparams();
$total = $this->model->where($where)->count();
$list = $this->model->where($where)->order('priority desc,id desc')->limit($offset, $limit)->select();
return $this->success('操作成功', null, ['total' => $total, 'rows' => $list]);
}
return $this->view->fetch();
}
public function edit($ids = null)
{
$row = $this->model->get($ids);
if (!$row) {
$this->error('记录不存在');
}
if ($this->request->isPost()) {
$params = $this->request->post('row/a');
$row->save($params);
$this->success('保存成功');
}
$this->view->assign('row', $row);
return $this->view->fetch();
}
}