shorturl)) { return $json->shorturl; } if (!empty($json->errormessage)) { throw new \Exception($json->errormessage); } throw new \Exception('生成失败'); } }