解決: 在string傳入前,需要轉(zhuǎn)碼操作. url = URL(string: urlPath.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed)!) 參考鏈接