💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
# 实体店铺 文件路径:shop/controllers/Seller/Shop/EntityshopCtl.php 一、地图显示 1.添加实体店铺 控制器:shop/controllers/Seller/Shop/EntityshopCtl.php 模型:shop/models/shop/EntityModel.php 视图:根据URL获得参数act的值,判断视图 ``` <pre class="calibre14">``` $act <span class="token">=</span> <span class="token3">request_string</span><span class="token1">(</span><span class="token4">'act'</span><span class="token1">)</span><span class="token1">;</span> <span class="token2">if</span> <span class="token1">(</span>$act <span class="token">==</span> <span class="token4">'list'</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">'entitylist'</span><span class="token1">)</span><span class="token1">;</span> <span class="token1">}</span> ``` ``` - shop/views/default/Seller/Shop/EntityshopCtl/entitylist.php 实体店铺列表:`$data = $this->shopEntityModel->listByWhere(array("shop_id" => $shop_id), array(), $page, $rows);` 模型:shop/models/shop/EntityModel.php 方法:entityShop() - shop/views/default/Seller/Shop/EntityshopCtl/entityShop.php 控制器:shop/controllers/Seller/Shop/EntityshopCtl.php 模型:shop/models/shop/EntityModel.php - 删除店铺:delEntity() 删除:`$this->shopEntityModel->removeEntity($entity_id);` - 编辑店铺:editEntityInfo()、editEntity() 编辑窗口视图:shop/views/default/Seller/Shop/EntityshopCtl/editEntityInfo.php 编辑:`$flag = $this->shopEntityModel->editEntity($entity_id, $entity_row);` - 添加店铺:addEntityInfo()、addEntityrow() 添加窗口视图:shop/views/default/Seller/Shop/EntityshopCtl/addEntityInfo.php 添加:`$flag = $this->shopEntityModel->addEntity($entity);` 2.店铺列表显示 控制器:shop/controllers/Seller/Shop/EntityshopCtl.php 模型:shop/models/shop/EntityModel.php 视图:根据URL获得参数act的值,判断视图 ``` <pre class="calibre14">``` $act <span class="token">=</span> <span class="token3">request_string</span><span class="token1">(</span><span class="token4">'act'</span><span class="token1">)</span><span class="token1">;</span> <span class="token2">if</span> <span class="token1">(</span>$act <span class="token">==</span> <span class="token4">'list'</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">'entitylist'</span><span class="token1">)</span><span class="token1">;</span> <span class="token1">}</span> ``` ``` 具体操作参考1.添加实体店铺