🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
### 通过渠道ID获取渠道名称 **位置:** Common\Common\function.php **参数:** > @param $ditch_id Int **调用:** > get_ditch_name ($store_id) PHP 文件调用 > {$vo['store_id']|get_ditch_name } View 模版调用 **完整代码:** ~~~ /** * 渠道id获取渠道名称 * Xin 2019-02-15 * @param $ditch_id Int * @return string */ function get_ditch_name ($ditch_id) { if($ditch_id != '') { $result = M('ditch_no')->field('ditch_name')->where('id = ' . $ditch_id)->find(); return $result['ditch_name']; } } ~~~