"你好".addingPercentEncoding(withAllowedCharacters: .urlHostAllowed)! 复制代码 说真的,这个方法我找了俩小时。 转载于:https://juejin.im/post/5a31f1706fb9a044fc44c0bb