地区问题

This commit is contained in:
todaywindy 2025-07-15 12:42:26 +08:00
parent 0e046fe802
commit 1a2af6068c
3 changed files with 3 additions and 2 deletions

View File

@ -110,6 +110,7 @@ class Dispatch extends Backend
$formattedTree = $this->formatTree($tree);
$area_name = model('area')->getNameByCode($order->area_id);
// dd($area_name);
$order->area_name = str_replace(',', '/', $area_name);
$this->view->assign('items', $formattedTree);
$this->view->assign('row', $order);

View File

@ -10,7 +10,7 @@ class Area extends Model
{
// 表名
protected $name = 'area';
protected $name = 'areas';
public function getNameByCode($code){

View File

@ -69,7 +69,7 @@ class ImportArea extends Command
}
Db::table('fa_area')->insertAll($out);
Db::table('fa_areas')->insertAll($out);
Db::commit();
$output->writeln("<info>港澳台区域数据导入成功!</info>");
} catch (\Throwable $e) {