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 234 return 184+15
235 235 }
236 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 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 270 }else if indexPath.row == 2{
243 271 return 123+15
... ...
metaCode/Classes/Main/HomePage/View/DigitalAuthViews/Vitae/Work/CNLiveVitaeAddWorkSecCell.swift
... ... @@ -245,7 +245,7 @@ class CNLiveVitaeAddWorkSecCell:UITableViewCell, UITextViewDelegate{
245 245 }
246 246 }
247 247 self.selectUploadImageView?.networkImageArr = tempImgArr
248   - self.selectUploadImageView?.networkVideoUrl = tempVideoUrl
  248 + self.selectUploadImageView?.setNetworkVideoUrl(networkVideoUrl: tempVideoUrl, networkVideoImageUrl: "")
249 249 }
250 250  
251 251 func textViewDidEndEditing(_ textView: UITextView) {
... ...
metaCode/Classes/Main/HomePage/View/DigitalAuthViews/Vitae/Work/CNLiveVitaeWorkCell.swift
... ... @@ -24,7 +24,8 @@ class CNLiveVitaeWorkCell: UITableViewCell{
24 24 var list: [HeroBrowserViewModuleBaseProtocol] = []
25 25 return list
26 26 }()
27   -
  27 + var editImageUrls = [String]()
  28 + var editVideoUrl = ""
28 29 var vitaeWorkPreviewVideoPhotoBlock:VitaeWorkPreviewVideoPhotoBlock?
29 30 var vitaeWorkCellChangedBlock:vitaeWorkCellChangedBlockActionBlock?
30 31 var vitaeWorkListBlock:VitaeWorkListBlock?
... ... @@ -326,6 +327,8 @@ class CNLiveVitaeWorkCell: UITableViewCell{
326 327 }
327 328 }
328 329  
  330 + self.editImageUrls.removeAll()
  331 + self.editVideoUrl = ""
329 332 let imgArr = model.imgs.components(separatedBy: ",")
330 333 if imgArr.count > 0{
331 334 for i in 0..<imgArr.count {
... ... @@ -346,6 +349,7 @@ class CNLiveVitaeWorkCell: UITableViewCell{
346 349  
347 350 if imgUrl.contains("vitae_video_"){
348 351 //是视频
  352 + self.editVideoUrl = imgUrl
349 353 let thumbailImgUrl = "http://wjjtest.ys2.cnliveimg.com/802/mateCode/img/vitae_photo_0/2024/08/02/3977195366.jpg"
350 354 let vm = HeroBrowserVideoViewModule(thumbailImgUrl: thumbailImgUrl, videoUrl: imgUrl, provider: HeroNetworkImageProvider.shared, autoPlay: true)
351 355 self.images.append(vm)
... ... @@ -361,6 +365,7 @@ class CNLiveVitaeWorkCell: UITableViewCell{
361 365 imgView.addSubview(playBtn)
362 366 }else if imgUrl.contains("vitae_photo_"){
363 367 //是图片
  368 + self.editImageUrls.append(imgUrl)
364 369 self.images.append(HeroBrowserNetworkImageViewModule(thumbailImgUrl: nil, originImgUrl: imgUrl))
365 370 imgView.kf.setImage(with: URL(string: imgUrl))
366 371 }else{
... ... @@ -427,6 +432,8 @@ class CNLiveVitaeWorkCell: UITableViewCell{
427 432 }
428 433 }
429 434  
  435 + self.editImageUrls.removeAll()
  436 + self.editVideoUrl = ""
430 437 let imgArr = model.imgs.components(separatedBy: ",")
431 438 if imgArr.count > 0{
432 439 for i in 0..<imgArr.count {
... ... @@ -435,7 +442,7 @@ class CNLiveVitaeWorkCell: UITableViewCell{
435 442 let imgLeftGap:Float = 15
436 443 let lie = i%3
437 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 446 imgView.isUserInteractionEnabled = true
440 447 imgView.addGestureRecognizer(UITapGestureRecognizer(target: self, action: #selector(imgViewTapAciton)))
441 448 imgView.tag = 1000+i
... ... @@ -447,6 +454,7 @@ class CNLiveVitaeWorkCell: UITableViewCell{
447 454  
448 455 if imgUrl.contains("vitae_video_"){
449 456 //是视频
  457 + self.editVideoUrl = imgUrl
450 458 let thumbailImgUrl = "http://wjjtest.ys2.cnliveimg.com/802/mateCode/img/vitae_photo_0/2024/08/02/3977195366.jpg"
451 459 let vm = HeroBrowserVideoViewModule(thumbailImgUrl: thumbailImgUrl, videoUrl: imgUrl, provider: HeroNetworkImageProvider.shared, autoPlay: true)
452 460 self.images.append(vm)
... ... @@ -461,6 +469,7 @@ class CNLiveVitaeWorkCell: UITableViewCell{
461 469 playBtn.tag = 1000+i
462 470 imgView.addSubview(playBtn)
463 471 }else if imgUrl.contains("vitae_photo_"){
  472 + self.editImageUrls.append(imgUrl)
464 473 //是图片
465 474 self.images.append(HeroBrowserNetworkImageViewModule(thumbailImgUrl: nil, originImgUrl: imgUrl))
466 475 imgView.kf.setImage(with: URL(string: imgUrl))
... ... @@ -539,6 +548,8 @@ class CNLiveVitaeWorkCell: UITableViewCell{
539 548 if self.awardModel != nil{
540 549 vc.awardModel = self.awardModel
541 550 }
  551 + vc.seleArr = self.editImageUrls
  552 + vc.seleVideoUrl = self.editVideoUrl
542 553 navigationViewController().pushViewController(vc, animated: true)
543 554 }
544 555 @objc func deleteBtnAction(){
... ...