多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
# 门店账号 文件路径:shop/controllers/Seller/Shop/ChainCtl.php 视图:根据URL获得参数act的值,判断视图 ``` <pre class="calibre14">``` <span class="token2">if</span> <span class="token1">(</span>$act <span class="token">==</span> <span class="token4">'edit'</span><span class="token1">)</span> <span class="token1">{</span> <span class="token5">//业务逻辑......</span> $this<span class="token">-</span><span class="token">></span>view<span class="token">-</span><span class="token">></span><span class="token3">setMet</span><span class="token1">(</span><span class="token4">'setChain'</span><span class="token1">)</span><span class="token1">;</span> <span class="token1">}</span> elseif <span class="token1">(</span>$act <span class="token">==</span> <span class="token4">'add'</span><span class="token1">)</span> <span class="token1">{</span> $this<span class="token">-</span><span class="token">></span>view<span class="token">-</span><span class="token">></span><span class="token3">setMet</span><span class="token1">(</span><span class="token4">'setChain'</span><span class="token1">)</span><span class="token1">;</span> <span class="token1">}</span> <span class="token2">else</span> <span class="token1">{</span> <span class="token5">// include $this->view->getView();</span> <span class="token1">}</span> ``` ``` 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);`