ThinkChat🤖让你学习和工作更高效,注册即送10W Token,即刻开启你的AI之旅 广告
### 通过渠道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']; } } ~~~