Commit 93a65866bec5c968dc8ac9bf06d6eab76a4ca315

Authored by “张旭”
1 parent 35640030

* [x] 工作记录列表页-编辑-图片有内容,但是会提示上传凭证

* [x] 工作记录列表页-授权地址为空 ,不显示 定位icon
* [x] 工作记录列表页-点击预览的图片和缩略图不一样
metaCode/Classes/Main/HomePage/Controller/DigitalAuth/工作相关页面/CNLiveVitaeAddWorkController.swift
@@ -234,10 +234,38 @@ class CNLiveVitaeAddWorkController:CNLiveBaseViewController,UITableViewDataSourc @@ -234,10 +234,38 @@ class CNLiveVitaeAddWorkController:CNLiveBaseViewController,UITableViewDataSourc
234 return 184+15 234 return 184+15
235 } 235 }
236 }else if indexPath.row == 1{ 236 }else if indexPath.row == 1{
237 - if self.secCell == nil{  
238 - return self.hangHeight+268+15 237 + let lSpace:CGFloat = 15
  238 + let rSpace:CGFloat = 15
  239 + let addXRSpace:CGFloat = rSpace - 17*0.5
  240 + let addXSpace:CGFloat = lSpace - 17*0.5
  241 + let column = 3
  242 + var widthHeight:CGFloat = 0.0
  243 + let totalSpace = 15 + addXRSpace + addXSpace * CGFloat(column - 1)
  244 + widthHeight = (KSreenWidth - 30 - totalSpace) / Double(column)
  245 + if self.workAwardType == .work && self.isFirstEdit{
  246 + if self.seleArr?.count ?? 0 <= 1{
  247 + self.hangHeight = 15+248+widthHeight+20
  248 + return self.hangHeight
  249 + }else{
  250 + let hang:Int = ((self.seleArr?.count ?? 0)-2)/3+2
  251 + self.hangHeight = CGFloat(15+248+hang*Int(widthHeight)+(hang-1)*Int(addXSpace)+20)
  252 + return self.hangHeight
  253 + }
  254 + }else if self.workAwardType == .award && self.isFirstEdit{
  255 + if self.seleArr?.count ?? 0 <= 1{
  256 + self.hangHeight = 15+248+widthHeight+20
  257 + return self.hangHeight
  258 + }else{
  259 + let hang:Int = ((self.seleArr?.count ?? 0)-2)/3+2
  260 + self.hangHeight = CGFloat(15+248+hang*Int(widthHeight)+(hang-1)*Int(addXSpace)+20)
  261 + return self.hangHeight
  262 + }
239 }else{ 263 }else{
240 - return self.hangHeight 264 + if self.secCell == nil{
  265 + return self.hangHeight//return self.hangHeight+268+15
  266 + }else{
  267 + return self.hangHeight
  268 + }
241 } 269 }
242 }else if indexPath.row == 2{ 270 }else if indexPath.row == 2{
243 return 123+15 271 return 123+15
metaCode/Classes/Main/HomePage/View/DigitalAuthViews/Vitae/Work/CNLiveVitaeAddWorkSecCell.swift
@@ -245,7 +245,7 @@ class CNLiveVitaeAddWorkSecCell:UITableViewCell, UITextViewDelegate{ @@ -245,7 +245,7 @@ class CNLiveVitaeAddWorkSecCell:UITableViewCell, UITextViewDelegate{
245 } 245 }
246 } 246 }
247 self.selectUploadImageView?.networkImageArr = tempImgArr 247 self.selectUploadImageView?.networkImageArr = tempImgArr
248 - self.selectUploadImageView?.networkVideoUrl = tempVideoUrl 248 + self.selectUploadImageView?.setNetworkVideoUrl(networkVideoUrl: tempVideoUrl, networkVideoImageUrl: "")
249 } 249 }
250 250
251 func textViewDidEndEditing(_ textView: UITextView) { 251 func textViewDidEndEditing(_ textView: UITextView) {
metaCode/Classes/Main/HomePage/View/DigitalAuthViews/Vitae/Work/CNLiveVitaeWorkCell.swift
@@ -24,7 +24,8 @@ class CNLiveVitaeWorkCell: UITableViewCell{ @@ -24,7 +24,8 @@ class CNLiveVitaeWorkCell: UITableViewCell{
24 var list: [HeroBrowserViewModuleBaseProtocol] = [] 24 var list: [HeroBrowserViewModuleBaseProtocol] = []
25 return list 25 return list
26 }() 26 }()
27 - 27 + var editImageUrls = [String]()
  28 + var editVideoUrl = ""
28 var vitaeWorkPreviewVideoPhotoBlock:VitaeWorkPreviewVideoPhotoBlock? 29 var vitaeWorkPreviewVideoPhotoBlock:VitaeWorkPreviewVideoPhotoBlock?
29 var vitaeWorkCellChangedBlock:vitaeWorkCellChangedBlockActionBlock? 30 var vitaeWorkCellChangedBlock:vitaeWorkCellChangedBlockActionBlock?
30 var vitaeWorkListBlock:VitaeWorkListBlock? 31 var vitaeWorkListBlock:VitaeWorkListBlock?
@@ -326,6 +327,8 @@ class CNLiveVitaeWorkCell: UITableViewCell{ @@ -326,6 +327,8 @@ class CNLiveVitaeWorkCell: UITableViewCell{
326 } 327 }
327 } 328 }
328 329
  330 + self.editImageUrls.removeAll()
  331 + self.editVideoUrl = ""
329 let imgArr = model.imgs.components(separatedBy: ",") 332 let imgArr = model.imgs.components(separatedBy: ",")
330 if imgArr.count > 0{ 333 if imgArr.count > 0{
331 for i in 0..<imgArr.count { 334 for i in 0..<imgArr.count {
@@ -346,6 +349,7 @@ class CNLiveVitaeWorkCell: UITableViewCell{ @@ -346,6 +349,7 @@ class CNLiveVitaeWorkCell: UITableViewCell{
346 349
347 if imgUrl.contains("vitae_video_"){ 350 if imgUrl.contains("vitae_video_"){
348 //是视频 351 //是视频
  352 + self.editVideoUrl = imgUrl
349 let thumbailImgUrl = "http://wjjtest.ys2.cnliveimg.com/802/mateCode/img/vitae_photo_0/2024/08/02/3977195366.jpg" 353 let thumbailImgUrl = "http://wjjtest.ys2.cnliveimg.com/802/mateCode/img/vitae_photo_0/2024/08/02/3977195366.jpg"
350 let vm = HeroBrowserVideoViewModule(thumbailImgUrl: thumbailImgUrl, videoUrl: imgUrl, provider: HeroNetworkImageProvider.shared, autoPlay: true) 354 let vm = HeroBrowserVideoViewModule(thumbailImgUrl: thumbailImgUrl, videoUrl: imgUrl, provider: HeroNetworkImageProvider.shared, autoPlay: true)
351 self.images.append(vm) 355 self.images.append(vm)
@@ -361,6 +365,7 @@ class CNLiveVitaeWorkCell: UITableViewCell{ @@ -361,6 +365,7 @@ class CNLiveVitaeWorkCell: UITableViewCell{
361 imgView.addSubview(playBtn) 365 imgView.addSubview(playBtn)
362 }else if imgUrl.contains("vitae_photo_"){ 366 }else if imgUrl.contains("vitae_photo_"){
363 //是图片 367 //是图片
  368 + self.editImageUrls.append(imgUrl)
364 self.images.append(HeroBrowserNetworkImageViewModule(thumbailImgUrl: nil, originImgUrl: imgUrl)) 369 self.images.append(HeroBrowserNetworkImageViewModule(thumbailImgUrl: nil, originImgUrl: imgUrl))
365 imgView.kf.setImage(with: URL(string: imgUrl)) 370 imgView.kf.setImage(with: URL(string: imgUrl))
366 }else{ 371 }else{
@@ -427,6 +432,8 @@ class CNLiveVitaeWorkCell: UITableViewCell{ @@ -427,6 +432,8 @@ class CNLiveVitaeWorkCell: UITableViewCell{
427 } 432 }
428 } 433 }
429 434
  435 + self.editImageUrls.removeAll()
  436 + self.editVideoUrl = ""
430 let imgArr = model.imgs.components(separatedBy: ",") 437 let imgArr = model.imgs.components(separatedBy: ",")
431 if imgArr.count > 0{ 438 if imgArr.count > 0{
432 for i in 0..<imgArr.count { 439 for i in 0..<imgArr.count {
@@ -435,7 +442,7 @@ class CNLiveVitaeWorkCell: UITableViewCell{ @@ -435,7 +442,7 @@ class CNLiveVitaeWorkCell: UITableViewCell{
435 let imgLeftGap:Float = 15 442 let imgLeftGap:Float = 15
436 let lie = i%3 443 let lie = i%3
437 let hang = i/3 444 let hang = i/3
438 - let imgView = UIImageView(frame: CGRect(x: CGFloat(imgLeftGap+(imgGap+imgWH)*Float(lie)), y: CGFloat((imgWH+10)*Float(hang)), width: CGFloat(imgWH), height: CGFloat(imgWH)))// let imgView = UIImageView(frame: CGRect(x: CGFloat(imgLeftGap+(imgGap+imgWH)*Float(lie)), y: CGFloat((imgWH+10)*Float(hang))+self.jianjieLabel.bottom+10, width: CGFloat(imgWH), height: CGFloat(imgWH))) 445 + let imgView = UIImageView(frame: CGRect(x: CGFloat(imgLeftGap+(imgGap+imgWH)*Float(lie)), y: CGFloat((imgWH+10)*Float(hang)), width: CGFloat(imgWH), height: CGFloat(imgWH)))
439 imgView.isUserInteractionEnabled = true 446 imgView.isUserInteractionEnabled = true
440 imgView.addGestureRecognizer(UITapGestureRecognizer(target: self, action: #selector(imgViewTapAciton))) 447 imgView.addGestureRecognizer(UITapGestureRecognizer(target: self, action: #selector(imgViewTapAciton)))
441 imgView.tag = 1000+i 448 imgView.tag = 1000+i
@@ -447,6 +454,7 @@ class CNLiveVitaeWorkCell: UITableViewCell{ @@ -447,6 +454,7 @@ class CNLiveVitaeWorkCell: UITableViewCell{
447 454
448 if imgUrl.contains("vitae_video_"){ 455 if imgUrl.contains("vitae_video_"){
449 //是视频 456 //是视频
  457 + self.editVideoUrl = imgUrl
450 let thumbailImgUrl = "http://wjjtest.ys2.cnliveimg.com/802/mateCode/img/vitae_photo_0/2024/08/02/3977195366.jpg" 458 let thumbailImgUrl = "http://wjjtest.ys2.cnliveimg.com/802/mateCode/img/vitae_photo_0/2024/08/02/3977195366.jpg"
451 let vm = HeroBrowserVideoViewModule(thumbailImgUrl: thumbailImgUrl, videoUrl: imgUrl, provider: HeroNetworkImageProvider.shared, autoPlay: true) 459 let vm = HeroBrowserVideoViewModule(thumbailImgUrl: thumbailImgUrl, videoUrl: imgUrl, provider: HeroNetworkImageProvider.shared, autoPlay: true)
452 self.images.append(vm) 460 self.images.append(vm)
@@ -461,6 +469,7 @@ class CNLiveVitaeWorkCell: UITableViewCell{ @@ -461,6 +469,7 @@ class CNLiveVitaeWorkCell: UITableViewCell{
461 playBtn.tag = 1000+i 469 playBtn.tag = 1000+i
462 imgView.addSubview(playBtn) 470 imgView.addSubview(playBtn)
463 }else if imgUrl.contains("vitae_photo_"){ 471 }else if imgUrl.contains("vitae_photo_"){
  472 + self.editImageUrls.append(imgUrl)
464 //是图片 473 //是图片
465 self.images.append(HeroBrowserNetworkImageViewModule(thumbailImgUrl: nil, originImgUrl: imgUrl)) 474 self.images.append(HeroBrowserNetworkImageViewModule(thumbailImgUrl: nil, originImgUrl: imgUrl))
466 imgView.kf.setImage(with: URL(string: imgUrl)) 475 imgView.kf.setImage(with: URL(string: imgUrl))
@@ -539,6 +548,8 @@ class CNLiveVitaeWorkCell: UITableViewCell{ @@ -539,6 +548,8 @@ class CNLiveVitaeWorkCell: UITableViewCell{
539 if self.awardModel != nil{ 548 if self.awardModel != nil{
540 vc.awardModel = self.awardModel 549 vc.awardModel = self.awardModel
541 } 550 }
  551 + vc.seleArr = self.editImageUrls
  552 + vc.seleVideoUrl = self.editVideoUrl
542 navigationViewController().pushViewController(vc, animated: true) 553 navigationViewController().pushViewController(vc, animated: true)
543 } 554 }
544 @objc func deleteBtnAction(){ 555 @objc func deleteBtnAction(){