app->db->name('ShopTruckRegion')->where('level', '<=', $level)->column('id,pid,name', 'id'); return DataExtend::arr2tree($items, 'id', 'pid', 'subs'); } /** * 楚才开放平台快递查询 * @param string $code 快递公司编号 * @param string $number 快递配送单号 * @return array * @throws \think\admin\Exception */ public function query($code, $number) { $service = InterfaceService::instance(); $service->setAuth($this->appid, $this->appkey); return $service->doRequest('https://open.cuci.cc/user/api.auth.express/query', [ 'type' => 'free', 'express' => $code, 'number' => $number, ]); } /** * 楚才开放平台快递公司 * @return array * @throws \think\admin\Exception */ public function company() { $service = InterfaceService::instance(); $service->setAuth($this->appid, $this->appkey); return $service->doRequest('https://open.cuci.cc/user/api.auth.express/getCompany'); } }