多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
# 店铺信息栏 #### 1.视图展示 文件路径:\\shop\\views\\default\\Seller\\IndexCtl\\index.php ``` <pre class="calibre14">``` <span class="token"><</span>div class<span class="token">=</span><span class="token4">"basic-info"</span><span class="token">></span> 店铺基本信息展示 <span class="token"><</span><span class="token">/</span>div<span class="token">></span> ``` ``` #### 2.数据获取 接口地址:index.php?ctl=Seller\_Index&met=index&typ=e 接口文件:\\shop\\controllers\\Seller\\IndexCtl.php 控制器:Seller\_IndexCtl 方法:index() ``` <pre class="calibre15">``` <span class="token5">//获取当前登录用户的shop_id</span> $shop<span class="token1">[</span><span class="token4">'shop_id'</span><span class="token1">]</span> <span class="token">=</span> Perm<span class="token1">:</span><span class="token1">:</span>$shopId<span class="token1">;</span> <span class="token5">//若用户开启店铺,则根据shop_id查找店铺信息</span> <span class="token2">if</span> <span class="token1">(</span>$shop<span class="token1">[</span><span class="token4">'shop_id'</span><span class="token1">]</span><span class="token1">)</span> <span class="token1">{</span> $shop_base <span class="token">=</span> $this<span class="token">-</span><span class="token">></span>shopBaseModel<span class="token">-</span><span class="token">></span><span class="token3">getBaseOneList</span><span class="token1">(</span>$shop<span class="token1">)</span><span class="token1">;</span> <span class="token1">.</span> <span class="token1">.</span> <span class="token1">.</span> <span class="token1">}</span> ``` ```