Commit 29663b1c authored by Steven杜宇's avatar Steven杜宇

// 重置URL中有中文处理

parent 0a9f5bf2
......@@ -352,7 +352,7 @@ extension YHSearchInfomationVC: UITableViewDelegate, UITableViewDataSource {
if model.type == 1 { // 视频
if !model.media_url.isEmpty, let url = URL(string: model.media_url) {
let vc = YHVideoPlayerVC()
vc.url = model.media_url.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed)!
vc.url = model.media_url
vc.id = model.id
self.navigationController?.pushViewController(vc)
}
......
......@@ -126,13 +126,13 @@ extension YHHomeBannerView: FSPagerViewDataSource, FSPagerViewDelegate {
switch model.skip_type {
case 1: //跳转H5
let vc = YHHomeWebViewController()
vc.url = model.skip_url.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed)!
vc.url = model.skip_url
self.parentViewController?.navigationController?.pushViewController(vc)
case 2: //跳转APP内Tab
goAppTab(tabBarName:model.skip_url)
case 3://3-跳转资讯页
let vc = YHHomeWebViewController()
vc.url = model.skip_url.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed)!
vc.url = model.skip_url
self.parentViewController?.navigationController?.pushViewController(vc)
case 0://0 不需要跳转
printLog("0 不需要跳转")
......
......@@ -94,7 +94,7 @@ extension YHHomeCollectionViewCell {
if listModel.media_url.isEmpty == false,let url = URL(string: listModel.media_url) {
let vc = YHVideoPlayerVC()
vc.url = listModel.media_url.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed)!
vc.url = listModel.media_url
vc.id = listModel.id
vc.updateBlock = {
[weak self] item in
......
......@@ -123,13 +123,13 @@ extension YHServiceBannerView: FSPagerViewDataSource, FSPagerViewDelegate {
switch model.skip_type {
case 1: //跳转H5
let vc = YHHomeWebViewController()
vc.url = model.skip_url.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed)!
vc.url = model.skip_url
self.parentViewController?.navigationController?.pushViewController(vc)
case 2: //跳转APP内Tab
goAppTab(tabBarName:model.skip_url)
case 3://3-跳转资讯页
let vc = YHHomeWebViewController()
vc.url = model.skip_url.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed)!
vc.url = model.skip_url
self.parentViewController?.navigationController?.pushViewController(vc)
case 0://0 不需要跳转
printLog("0 不需要跳转")
......
......@@ -267,7 +267,7 @@ extension YHVideoPlayerVC {
}
let title: String = self.viewModel.mainModel?.title ?? ""
let link:String = self.viewModel.mainModel?.media_url.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed) ?? ""
let link:String = self.viewModel.mainModel?.media_url ?? ""
let thumbUrl = self.viewModel.mainModel?.img_url ?? ""
if thumbUrl.isEmpty {
YHHUD.flash(message:"分享失败")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment