ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
文件路径:shop/controllers/Seller/Shop/ChainCtl.php 视图:根据URL获得参数act的值,判断视图 ~~~ if ($act == 'edit') { //业务逻辑...... $this->view->setMet('setChain'); } elseif ($act == 'add') { $this->view->setMet('setChain'); } else { // include $this->view->getView(); } ~~~ 1.添加、编辑门店 视图:shop/views/default/Seller/Shop/InfoCtl/setChain.php 提交表单验证:`$('#form').validator({})` * 添加方法:addChain() `$chain_id = $this->chainBaseModel->addBase($data, true);` * 编辑方法:editChain() `$flag = $this->chainBaseModel->editBase($chain_id, $data);` 2.删除门店 视图:shop/views/default/Seller/Shop/InfoCtl/index.php 方法:delChain() `$del_base_flag = $this->chainBaseModel->removeBase($chain_id);` 3.门店列表 视图:shop/views/default/Seller/Shop/InfoCtl/index.php 方法:chain() `$data = $this->chainBaseModel->getBaseList($cond_row, array(), $page, $rows);`