企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
# 平台联系方式栏 #### 1.视图展示 文件路径:\\shop\\views\\default\\Seller\\IndexCtl\\index.php ``` <pre class="calibre14">``` <span class="token"><</span><span class="token">?</span>php <span class="token2">if</span><span class="token1">(</span>$phone <span class="token">||</span> $email<span class="token1">)</span><span class="token1">{</span><span class="token">?</span><span class="token">></span> <span class="token"><</span>div class<span class="token">=</span><span class="token4">"m white-panel"</span><span class="token">></span> <span class="token"><</span>div class<span class="token">=</span><span class="token4">"pannel_div"</span><span class="token">></span> <span class="token"><</span>div class<span class="token">=</span><span class="token4">"mt"</span><span class="token">></span> <span class="token"><</span>h3 class<span class="token">=</span><span class="token4">"bbc_seller_border"</span><span class="token">></span><span class="token"><</span><span class="token">?</span><span class="token">=</span><span class="token3">__</span><span class="token1">(</span><span class="token4">'平台联系方式'</span><span class="token1">)</span><span class="token">?</span><span class="token">></span><span class="token"><</span><span class="token">/</span>h3<span class="token">></span> <span class="token"><</span>h5<span class="token">></span><span class="token"><</span><span class="token">?</span><span class="token">=</span><span class="token3">__</span><span class="token1">(</span><span class="token4">'有相关不懂得地方可以咨询平台'</span><span class="token1">)</span><span class="token">?</span><span class="token">></span><span class="token"><</span><span class="token">/</span>h5<span class="token">></span> <span class="token"><</span><span class="token">/</span>div<span class="token">></span> <span class="token"><</span>div class<span class="token">=</span><span class="token4">"mc"</span><span class="token">></span> <span class="token"><</span>ol class<span class="token">=</span><span class="token4">"fn-clear"</span><span class="token">></span> <span class="token"><</span><span class="token">?</span>php <span class="token2">if</span><span class="token1">(</span>$phone<span class="token1">)</span><span class="token1">{</span><span class="token">?</span><span class="token">></span> <span class="token"><</span><span class="token">?</span>php <span class="token3">foreach</span><span class="token1">(</span>$phone as $k<span class="token">=</span><span class="token">></span>$v<span class="token1">)</span><span class="token1">{</span><span class="token">?</span><span class="token">></span> <span class="token"><</span>li<span class="token">></span><span class="token"><</span><span class="token">?</span><span class="token">=</span><span class="token3">__</span><span class="token1">(</span><span class="token4">'客服电话'</span><span class="token1">)</span><span class="token">?</span><span class="token">></span>:<span class="token"><</span><span class="token">?</span><span class="token">=</span>$v<span class="token1">;</span><span class="token">?</span><span class="token">></span><span class="token"><</span><span class="token">/</span>li<span class="token">></span> <span class="token"><</span><span class="token">?</span>php <span class="token1">}</span><span class="token">?</span><span class="token">></span> <span class="token"><</span><span class="token">?</span>php <span class="token1">}</span><span class="token">?</span><span class="token">></span> <span class="token"><</span><span class="token">?</span>php <span class="token2">if</span><span class="token1">(</span>$email<span class="token1">)</span><span class="token1">{</span><span class="token">?</span><span class="token">></span> <span class="token"><</span>li<span class="token">></span><span class="token"><</span><span class="token">?</span><span class="token">=</span><span class="token3">__</span><span class="token1">(</span><span class="token4">'客服邮箱'</span><span class="token1">)</span><span class="token">?</span><span class="token">></span>:<span class="token"><</span><span class="token">?</span><span class="token">=</span>$email<span class="token">?</span><span class="token">></span><span class="token"><</span><span class="token">/</span>li<span class="token">></span> <span class="token"><</span><span class="token">?</span>php <span class="token1">}</span><span class="token">?</span><span class="token">></span> <span class="token"><</span><span class="token">/</span>ol<span class="token">></span> <span class="token"><</span><span class="token">/</span>div<span class="token">></span> <span class="token"><</span><span class="token">/</span>div<span class="token">></span> <span class="token"><</span><span class="token">/</span>div<span class="token">></span> <span class="token"><</span><span class="token">?</span>php <span class="token1">}</span><span class="token">?</span><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">//平台联系方式</span> $phone <span class="token">=</span> Web_ConfigModel<span class="token1">:</span><span class="token1">:</span><span class="token3">value</span><span class="token1">(</span><span class="token4">"setting_phone"</span><span class="token1">)</span><span class="token1">;</span> <span class="token2">if</span> <span class="token1">(</span>$phone<span class="token1">)</span> <span class="token1">{</span> $phone <span class="token">=</span> <span class="token3">explode</span><span class="token1">(</span><span class="token4">','</span><span class="token1">,</span> $phone<span class="token1">)</span><span class="token1">;</span><span class="token5">//电话</span> <span class="token1">}</span> $email <span class="token">=</span> Web_ConfigModel<span class="token1">:</span><span class="token1">:</span><span class="token3">value</span><span class="token1">(</span><span class="token4">"setting_email"</span><span class="token1">)</span><span class="token1">;</span><span class="token5">//邮件</span> ``` ```