-//            let items = datas["data"] as? [String: AnyObject],
67
-//            let commentsInfo = items["comments"] as? [[String: AnyObject]],
68
-//            status == 200 else {
69
-//            return []
70
-//        }
71
-//        return commentsInfo.compactMap { CommentModel(map: Map(mappingType: .fromJSON, JSON: $0)) }
72
-//    }
73
-//}
74
-//
75
-//extension CommentModel: Mappable {
76
-//    mutating public func mapping(map: Map) {
77
-//        
78
-//    }
79
-//    
80
-//
81
-//    public init(map: Map) {
82
-//        let dateFormatter = DateFormatter()
83
-//        dateFormatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ssZ"
84
-//        create_at      <-  (map["created_at"], DateFormatterTransform(dateFormatter:dateFormatter))
85
-//        avatar          <-  (map["avatar"])
86
-//        comment         <-  map["comment"]
87
-//        user_id         <-  map["user_id"]
88
-//        nickname        <-  (map["nickname"])
89
-//        comment         <-  map["comment"]
90
-//
91
-//        let text = NSString(string: comment)
92
-////        cellHeigth = text.boundingRect(with:CGSize(width: kScreenWidth - 82, height: CGFloat.greatestFiniteMagnitude), options: [.usesLineFragmentOrigin, .usesFontLeading], attributes: [NSAttributedStringKey.font: UIFont.systemFont(ofSize: 12)], context: nil).height
93
-//    }
94
-//}
95
-//
96
-//struct CommentNetworkRequest: NetworkRequest {
97
-//
98
-//    typealias NetworkResponse = CommentModel
99
-//
100
-//    var path: Interfaces { get { return .commentList } set {} }
101
-//    var parameter: [String: AnyObject]?
102
-//
103
-//}

+ 0 - 106
PaiAi/PaiaiDataKit/DataLayer/Model/GroupDetailModel.swift

@@ -1,106 +0,0 @@
1
-//
2
-//  GroupDetailModel.swift
3
-//  PaiAi
4
-//
5
-//  Created by zhengjianfei on 16/4/5.
6
-//  Copyright © 2016年 FFIB. All rights reserved.
7
-//
8
-
9
-import Foundation
10
-import ObjectMapper
11
-//public struct GroupDetailModel {
12
-//
13
-//    public var users: GroupUserInfoModel?
14
-//    public var group_id: String = ""
15
-//    var group: GroupItem?
16
-//
17
-//    init() {}
18
-//}
19
-//
20
-//extension GroupDetailModel: Mappable {
21
-//    mutating public func mapping(map: Map) {
22
-//
23
-//    }
24
-//
25
-//
26
-//    public init(map: Map) {
27
-//        group_id  <-  map["group_id"]
28
-//        guard let group = map.JSON["group"] as? [String: AnyObject], let users = map.JSON["users"]  as? [String: AnyObject] else {
29
-//            return
30
-//        }
31
-////        self.group = GroupModel(map: Map(mappingType: .fromJSON, JSON: group))
32
-//        self.users = GroupUserInfoModel(map: Map(mappingType: .fromJSON, JSON: users))
33
-//    }
34
-//}
35
-//
36
-//extension GroupDetailModel: SingleParsable {
37
-//
38
-//    public static func parse(data: [String: AnyObject]) -> GroupDetailModel {
39
-//        guard let status = data["status"] as? Int,
40
-//            let res = data["data"] as? [String: AnyObject],
41
-//            status == 200 else {
42
-//                return GroupDetailModel()
43
-//        }
44
-//        return GroupDetailModel(map: Map(mappingType: .fromJSON, JSON: res))
45
-//    }
46
-//}
47
-//
48
-//public struct GroupUserInfoModel {
49
-//    public var passed_count: Int = 0
50
-//    public var passed  = [UserModel]()
51
-//    public var applying_count: Int = 0
52
-//    public var applying = [UserModel]()
53
-//
54
-//    init() {}
55
-//}
56
-//
57
-//extension GroupUserInfoModel: SingleParsable {
58
-//
59
-//    public static func parse(data: [String: AnyObject]) -> GroupUserInfoModel {
60
-//        return GroupUserInfoModel(map:Map(mappingType: MappingType.fromJSON, JSON: data))
61
-//    }
62
-//}
63
-//
64
-//extension GroupUserInfoModel: Mappable {
65
-//    mutating public func mapping(map: Map) {
66
-//
67
-//    }
68
-//
69
-//
70
-//    public init(map: Map) {
71
-//        passed_count     <-  map["passed_count"]
72
-//        applying_count   <-  map["applying_count"]
73
-//        guard let passes = map.JSON["passed"] as? [[String: AnyObject]] else {
74
-//            return
75
-//        }
76
-//        passed = passes.compactMap { UserModel.init(map: Map.init(mappingType: .fromJSON, JSON: $0))}
77
-//    }
78
-//
79
-//}
80
-//
81
-////public struct UserModel {
82
-////
83
-////    public var user_id: String = ""
84
-////    public var avatar: String = ""
85
-////    public var nickname: String = ""
86
-////    public var admin: Bool = false
87
-////
88
-////}
89
-////
90
-////extension UserModel: Mappable {
91
-////
92
-////}
93
-////
94
-////struct GroupDetailNetworkQequest: NetworkRequest {
95
-////
96
-////    typealias NetworkResponse = GroupDetailModel
97
-////
98
-////    var path: Interfaces { get { return .groupDetail } set { } }
99
-////    var parameter: [String: AnyObject]?
100
-////
101
-////    init(param: [String: AnyObject]?, path: Interfaces = .groupDetail) {
102
-////        self.parameter = param
103
-////        self.path = path
104
-////    }
105
-////
106
-////}

+ 3 - 3
PaiAi/PaiaiDataKit/DataLayer/Model/CommentItem.swift

@@ -1,5 +1,5 @@
1 1
 //
2
-//  CommentItem.swift
2
+//  PhotoCommentItem.swift
3 3
 //  PaiaiDataKit
4 4
 //
5 5
 //  Created by ffib on 2018/12/25.
@@ -9,7 +9,7 @@
9 9
 import Foundation
10 10
 import ObjectMapper
11 11
 
12
-public struct CommentItem {
12
+public struct PhotoCommentItem {
13 13
     
14 14
     public var avatar: String = ""
15 15
     public var comment: String = ""
@@ -21,7 +21,7 @@ public struct CommentItem {
21 21
         self.init(map: Map(mappingType: .fromJSON, JSON: json))
22 22
     }
23 23
 }
24
-extension CommentItem: Mappable {
24
+extension PhotoCommentItem: Mappable {
25 25
     mutating public func mapping(map: Map) {
26 26
         let dateFormatter = DateFormatter()
27 27
         dateFormatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ssZ"

PaiAi/PaiaiDataKit/DataLayer/Model/ThumbupUserItem.swift → PaiAi/PaiaiDataKit/DataLayer/Model/PhotoThumbupUserItem.swift


+ 1 - 1
PaiAi/PaiaiDataKit/DataLayer/Model/NetWorkData.swift

@@ -1,5 +1,5 @@
1 1
 //
2
-//  NetWorkData.swift
2
+//  NetworkArrayData.swift
3 3
 //  PaiaiDataKit
4 4
 //
5 5
 //  Created by ffib on 2019/1/3.

+ 9 - 0
PaiAi/PaiaiDataKit/DataLayer/Model/Reusable/OriginData.swift

@@ -0,0 +1,9 @@
1
+//
2
+//  OriginData.swift
3
+//  PaiaiDataKit
4
+//
5
+//  Created by ffib on 2019/3/20.
6
+//  Copyright © 2019 yb. All rights reserved.
7
+//
8
+
9
+import Foundation

PaiAi/PaiaiDataKit/DataLayer/Repositories/GroupPhotoRepository.swift → PaiAi/PaiaiDataKit/DataLayer/Repositories/Implementation/GroupPhotoRepository.swift


PaiAi/PaiaiDataKit/DataLayer/Repositories/HomePhotoRepository.swift → PaiAi/PaiaiDataKit/DataLayer/Repositories/Implementation/HomeRepository.swift


PaiAi/PaiaiDataKit/DataLayer/Repositories/MessageRepository.swift → PaiAi/PaiaiDataKit/DataLayer/Repositories/Implementation/MessageRepository.swift


PaiAi/PaiaiDataKit/DataLayer/Repositories/OrderRepository.swift → PaiAi/PaiaiDataKit/DataLayer/Repositories/Implementation/OrderRepository.swift


+ 38 - 0
PaiAi/PaiaiDataKit/DataLayer/Repositories/Implementation/PhotoDetailRepository.swift

@@ -0,0 +1,38 @@
1
+//
2
+//  PhotoDetailRepository.swift
3
+//  PaiaiDataKit
4
+//
5
+//  Created by ffib on 2018/12/25.
6
+//  Copyright © 2018 yb. All rights reserved.
7
+//
8
+
9
+import Foundation
10
+import RxSwift
11
+
12
+ struct PhotoDetailRepository {
13
+    var photoDetailRemoteAPI: PhotoDetailRemoteAPI
14
+    
15
+    init(photoId: String, groupId: String) {
16
+        photoDetailRemoteAPI = PhotoDetailRemoteAPI(photoId: photoId, groupId: groupId)
17
+    }
18
+    
19
+    func loadComments() -> Single<[PhotoCommentItem]> {
20
+        return photoDetailRemoteAPI.loadComments()
21
+    }
22
+    
23
+    func loadThumbups() -> Single<[PhotoThumbupUserItem]> {
24
+        return photoDetailRemoteAPI.loadThumbups()
25
+    }
26
+    
27
+    func submitComment(text: String) -> Single<[PhotoCommentItem]>  {
28
+        return photoDetailRemoteAPI.submitComment(text: text)
29
+    }
30
+    
31
+    func submitThumbup() -> Single<[PhotoThumbupUserItem]>  {
32
+        return photoDetailRemoteAPI.submitThumbup()
33
+    }
34
+    
35
+    func cancelThumbup() {
36
+        photoDetailRemoteAPI.cancelThumbup()
37
+    }
38
+}

PaiAi/PaiaiDataKit/DataLayer/Repositories/PhotoGroupDetailRepository.swift → PaiAi/PaiaiDataKit/DataLayer/Repositories/Implementation/PhotoGroupDetailRepository.swift


PaiAi/PaiaiDataKit/DataLayer/Repositories/PhotoGroupRepository.swift → PaiAi/PaiaiDataKit/DataLayer/Repositories/Implementation/PhotoGroupRepository.swift


PaiAi/PaiaiDataKit/DataLayer/Repositories/UserInfoRepository.swift → PaiAi/PaiaiDataKit/DataLayer/Repositories/Implementation/UserInfoRepository.swift


+ 0 - 75
PaiAi/PaiaiDataKit/DataLayer/Repositories/MessageListRepository.swift

@@ -1,75 +0,0 @@
1
-//
2
-//  MessageListRepository.swift
3
-//  PaiAi
4
-//
5
-//  Created by zhengjianfei on 16/4/7.
6
-//  Copyright © 2016年 FFIB. All rights reserved.
7
-//
8
-
9
-import Foundation
10
-import RxSwift
11
-
12
-public protocol MessageInteractionModel {
13
-    var path: Interfaces { get }
14
-    var removePath: Interfaces { get }
15
-    var readPath: Interfaces { get }
16
-    var title: String { get }
17
-}
18
-
19
-extension MessageType {
20
-    
21
-    public var model: MessageInteractionModel {
22
-        switch self {
23
-        case .thumbup: return MessagethumbupInteractionModel()
24
-        case .comment: return MessageCommentInteractionModel()
25
-        case .system: return MessageSystemInteractionModel()
26
-        }
27
-    }
28
-    
29
-    fileprivate struct MessagethumbupInteractionModel: MessageInteractionModel {
30
-        var path: Interfaces { return .mesThumbupList}
31
-        var removePath: Interfaces { return .mesThumbupClear }
32
-        var readPath: Interfaces { return .mesThumbupRead }
33
-        var title: String { return "赞" }
34
-    }
35
-    
36
-    fileprivate struct MessageCommentInteractionModel: MessageInteractionModel {
37
-        var path: Interfaces { return .mesCommentList}
38
-        var removePath: Interfaces { return .mesCommentClear }
39
-        var readPath: Interfaces { return .mesCommentRead }
40
-        var title: String { return "评论" }
41
-    }
42
-    
43
-    fileprivate struct MessageSystemInteractionModel: MessageInteractionModel {
44
-        var path: Interfaces { return .mesSystemList}
45
-        var removePath: Interfaces { return .mesSystemClear }
46
-        var readPath: Interfaces { return .mesSystemRead }
47
-        var title: String { return "系统消息" }
48
-    }
49
-}
50
-
51
-
52
-
53
-struct MessageListRepository {
54
-    var messageListRemotAPI: MessageListRemoteAPI
55
-    
56
-    init(type: MessageType) {
57
-        messageListRemotAPI = MessageListRemoteAPI(type: type)
58
-    }
59
-    
60
-    func load(page: Int) -> Single<NetworkArrayData<MessageListItem>> {
61
-        return messageListRemotAPI.loadContent(page: page)
62
-    }
63
-    
64
-    func remove(pk: Int) -> Completable {
65
-        return messageListRemotAPI.remove(pk: pk)
66
-    }
67
-    
68
-    func removeAll() -> Completable {
69
-        return messageListRemotAPI.removeAll()
70
-    }
71
-    
72
-    func readed() -> Completable {
73
-        return messageListRemotAPI.readed()
74
-    }
75
-}

+ 0 - 91
PaiAi/PaiaiDataKit/DataLayer/Repositories/Persistence/PhotoLocalStorage.swift

@@ -1,91 +0,0 @@
1
-//
2
-//  PhotoLocalStorage.swift
3
-//  PaiAi
4
-//
5
-//  Created by LISA on 2017/4/19.
6
-//  Copyright © 2017年 yb. All rights reserved.
7
-//
8
-
9
-import UIKit
10
-//import ObjectMapper
11
-//import SQLite
12
-//
13
-//public struct PhotoLocalStorage {
14
-//
15
-//    let photoId = Expression<String>("photoId")
16
-//    let photoInfo = Expression<Data>("photoInfo")
17
-//    let creatAt = Expression<TimeInterval>("creatAt")
18
-//
19
-//    static let instance = PhotoLocalStorage()
20
-//    var db: Connection?
21
-//
22
-//    init() {
23
-//        db = try? Connection(path)
24
-//    }
25
-//
26
-//    private let path: String = {
27
-//        let path = NSSearchPathForDirectoriesInDomains(.documentDirectory, .userDomainMask, true).first ?? ""
28
-//        let finalPath = path.appending("/group_photo.db")
29
-////        printLog(finalPath)
30
-//        return finalPath
31
-//    }()
32
-//
33
-//    func query(group_id: String) -> [PhotoItem]? {
34
-////        let table = Table(group_id.digestString(algorithm: .md5))
35
-////        do {
36
-////            guard let photos = try db?.prepare(table) else {
37
-////                return nil
38
-////            }
39
-////            return photos.compactMap({ (photo) -> PhotoItem? in
40
-////               let data = photo[photoInfo]
41
-////                guard let dict = NSKeyedUnarchiver.unarchiveObject(with: data) as? [String: AnyObject] else {
42
-////                    return nil
43
-////                }
44
-////                return PhotoItem(data: dict)
45
-////            })
46
-////        } catch {
47
-////            return nil
48
-////        }
49
-//        return nil
50
-//    }
51
-//
52
-//    func saveDataToLocal(models: [PhotoItem], group_id: String) {
53
-////        let table = Table(group_id.digestString(algorithm: .md5))
54
-////        do {
55
-////            try db?.transaction {
56
-////                try db?.run(table.create(ifNotExists: true, block: { (table) in
57
-////                    table.column(photoId, unique: true)
58
-////                    table.column(photoInfo)
59
-////                    table.column(creatAt)
60
-////                }))
61
-////
62
-////                for model in models {
63
-////                    let data = NSKeyedArchiver.archivedData(withRootObject: model.toJSON())
64
-////                    let insert = table.insert(or: .replace,
65
-////                                              photoInfo <- data,
66
-////                                              creatAt <- (model.create_at.timeIntervalSince1970) ,
67
-////                                              photoId <- model.photo_id)
68
-////                   _ = try db?.run(insert)
69
-////                }
70
-////
71
-////            }
72
-////        } catch {
73
-////        }
74
-//    }
75
-//
76
-//    func updateLocalData(PhotoItem: PhotoItem) {
77
-////        let table = Table(PhotoItem.group_id.digestString(algorithm: .md5)).filter(photoId == PhotoItem.photo_id)
78
-////        let photoData = NSKeyedArchiver.archivedData(withRootObject: PhotoItem.toJSON())
79
-////        do {
80
-////            try db?.run(table.update(photoInfo <- photoData))
81
-////        } catch {
82
-////
83
-////        }
84
-//    }
85
-//
86
-//    func removeLocalData(group_id: String) {
87
-////        removeGroupInfoRecent(groupId: group_id)
88
-////        let table = Table(group_id.digestString(algorithm: .md5))
89
-////        _ = table.drop(ifExists: true)
90
-//    }
91
-//}

+ 0 - 17
PaiAi/PaiaiDataKit/DataLayer/Repositories/PhotoDetailRepository.swift

@@ -1,17 +0,0 @@
1
-//
2
-//  PhotoDetailRepository.swift
3
-//  PaiaiDataKit
4
-//
5
-//  Created by ffib on 2018/12/25.
6
-//  Copyright © 2018 yb. All rights reserved.
7
-//
8
-
9
-import Foundation
10
-
11
-struct PhotoDetailRepository {
12
-//    func loadComment() -> Single<Result<CommentItem>>
13
-//    func loadThumbup() -> Single<Result<ThumbupUserItem>>
14
-//    func submitComment() -> Single<Result<StatusModel>>
15
-//    func submitThumbup() -> Single<Result<StatusModel>>
16
-//    func cancelThumbup() -> Single<Result<StatusModel>>
17
-}

PaiAi/PaiaiDataKit/DataLayer/Repositories/Remote/HomePhotoRemoteAPI.swift → PaiAi/PaiaiDataKit/DataLayer/Repositories/Remote/HomeRemoteAPI.swift


+ 0 - 49
PaiAi/PaiaiDataKit/DataLayer/Repositories/Remote/MessageListRemoteAPI.swift

@@ -1,49 +0,0 @@
1
-//
2
-//  MessageListRemoteAPI.swift
3
-//  PaiaiDataKit
4
-//
5
-//  Created by ffib on 2018/12/29.
6
-//  Copyright © 2018 yb. All rights reserved.
7
-//
8
-
9
-import Foundation
10
-import RxSwift
11
-
12
-struct MessageListRemoteAPI {
13
-    
14
-    var type: MessageType
15
-    
16
-    init(type: MessageType) {
17
-        self.type = type
18
-    }
19
-
20
-    private func parse(_ json: JSON) -> NetworkArrayData<MessageListItem>? {
21
-        guard let data  = json["data"] as? [String: AnyObject] else { return nil }
22
-        return NetworkArrayData<MessageListItem>(json: data, dataField: "messages")
23
-    }
24
-    
25
-    func loadContent(page: Int) -> Single<NetworkArrayData<MessageListItem>> {
26
-        let resource = ContentResource<NetworkArrayData<MessageListItem>>(path: type.model.path,
27
-                                                                          parameter: ["user_id": ShareUserId, "page": page],
28
-                                                                          parseJSON: parse)
29
-        return resource.loadContent()
30
-    }
31
-    
32
-    func remove(pk: Int) -> Completable {
33
-        let removeResource = StatusResource(path: type.model.removePath,
34
-                                            parameter: ["user_id": ShareUserId, "pk": pk])
35
-        return removeResource.getStatus()
36
-    }
37
-    
38
-    func removeAll() -> Completable {
39
-         let removeResource = StatusResource(path: type.model.removePath,
40
-                                             parameter: ["user_id": ShareUserId, "all": true])
41
-        return removeResource.getStatus()
42
-    }
43
-    
44
-    func readed() -> Completable {
45
-         let readedResource = StatusResource(path: type.model.readPath,
46
-                                             parameter: ["user_id": ShareUserId])
47
-        return readedResource.getStatus()
48
-    }
49
-}

+ 9 - 0
PaiAi/PaiaiDataKit/DataLayer/Repositories/Remote/PhotoDetailRemoteAPI.swift

@@ -0,0 +1,9 @@
1
+//
2
+//  PhotoDetailRemoteAPI.swift
3
+//  PaiaiDataKit
4
+//
5
+//  Created by ffib on 2019/3/18.
6
+//  Copyright © 2019 yb. All rights reserved.
7
+//
8
+
9
+import Foundation

PaiAi/PaiaiDataKit/PresentLayer/Home/CreateGroupConfirmViewModel.swift → PaiAi/PaiaiDataKit/PresentLayer/Home/CreateGroupViewModel.swift


+ 9 - 0
PaiAi/PaiaiDataKit/PresentLayer/PhotoDetail/PhotoDetailListViewModel.swift

@@ -0,0 +1,9 @@
1
+//
2
+//  PhotoDetailListViewModel.swift
3
+//  PaiaiDataKit
4
+//
5
+//  Created by ffib on 2019/3/19.
6
+//  Copyright © 2019 yb. All rights reserved.
7
+//
8
+
9
+import Foundation

+ 3 - 3
PaiAi/PaiaiDataKit/PresentLayer/PhotoDetail/DetailPageViewModel.swift

@@ -1,5 +1,5 @@
1 1
 //
2
-//  DetailPageViewModel.swift
2
+//  PhotoDetailViewModel.swift
3 3
 //  PaiAi
4 4
 //
5 5
 //  Created by zhengjianfei on 2017/1/4.
@@ -11,7 +11,7 @@ import ObjectMapper
11 11
 
12 12
 
13 13
 
14
-public final class DetailPageViewModel {
14
+public final class PhotoDetailViewModel {
15 15
     public lazy var currentPhoto = PhotoItem(json: [:])
16 16
     public lazy var thumbups = [thumbupUserModel]()
17 17
     public lazy var comments = [CommentItem]()
@@ -95,7 +95,7 @@ public final class DetailPageViewModel {
95 95
 }
96 96
 
97 97
 //wechat pay
98
-extension DetailPageViewModel {
98
+extension PhotoDetailViewModel {
99 99
     public final func handleResult(errorCode: Int, success: @escaping ((_ item: PhotoItem) -> Void)) {
100 100
 //        func fetchOrderDetail() {
101 101
 //            detailPageApi.post(param: ["order_id": orderId, "user_id": SharedUserInfo.userId] as [String: AnyObject], url: .orderDetail) { (result) in

+ 9 - 0
PaiAi/PaiaiDataKit/PresentLayer/PhotoDetail/PhotoPurchaseViewModel.swift

@@ -0,0 +1,9 @@
1
+//
2
+//  PhotoPurchaseViewModel.swift
3
+//  PaiaiDataKit
4
+//
5
+//  Created by ffib on 2019/3/19.
6
+//  Copyright © 2019 yb. All rights reserved.
7
+//
8
+
9
+import Foundation

+ 21 - 0
PaiAi/Paiai_iOS/App/Group/GroupDetail/GroupDetailMemeberView.swift

@@ -0,0 +1,21 @@
1
+//
2
+//  GroupDetailMemeberView.swift
3
+//  Paiai_iOS
4
+//
5
+//  Created by ffib on 2019/2/18.
6
+//  Copyright © 2019 yb. All rights reserved.
7
+//
8
+
9
+import UIKit
10
+
11
+class GroupDetailMemeberView: UIView {
12
+
13
+    /*
14
+    // Only override draw() if you perform custom drawing.
15
+    // An empty implementation adversely affects performance during animation.
16
+    override func draw(_ rect: CGRect) {
17
+        // Drawing code
18
+    }
19
+    */
20
+
21
+}

PaiAi/Paiai_iOS/App/Group/GroupDetail/MemberCell.swift → PaiAi/Paiai_iOS/App/Group/GroupDetail/GroupMemberCell.swift


PaiAi/Paiai_iOS/App/Group/GroupDetail/GroupMemberController.swift → PaiAi/Paiai_iOS/App/Group/GroupDetail/GroupMemberViewController.swift


PaiAi/Paiai_iOS/App/Group/GroupDetail/ChangeGroupNameController.swift → PaiAi/Paiai_iOS/App/Group/GroupDetail/GroupNameModificationViewController.swift


+ 0 - 48
PaiAi/Paiai_iOS/App/Group/GroupDetail/ShowGroupQRController.swift

@@ -1,48 +0,0 @@
1
-//
2
-//  ShowGroupQRController.swift
3
-//  PaiAi
4
-//
5
-//  Created by zhengjianfei on 16/4/6.
6
-//  Copyright © 2016年 FFIB. All rights reserved.
7
-//
8
-
9
-import UIKit
10
-import PaiaiUIKit
11
-import PaiaiDataKit
12
-
13
-final class ShowGroupQRController: UIViewController {
14
-
15
-    // MARK: Storyboard property
16
-    @IBOutlet var groupImage: UIImageView!
17
-    @IBOutlet var groupName: UILabel!
18
-    @IBOutlet var EWM: UIImageView!
19
-    @IBOutlet weak var contentView: UIView!
20
-
21
-    // MARK: data property
22
-//    var data: GroupModel?
23
-
24
-
25
-    required init?(coder aDecoder: NSCoder) {
26
-        super.init(coder: aDecoder)
27
-//        transitioningDelegate = transitioning
28
-    }
29
-
30
-    // MARK: view function
31
-    override func viewDidLoad() {
32
-        super.viewDidLoad()
33
-        configureInterface()
34
-    }
35
-
36
-    func configureInterface() {
37
-//        guard let info = data else {
38
-//            return
39
-//        }
40
-//        groupImage.setImageWithNullableURL(info.group_avatar, placeholderImage: UIImage(named: "Group\(info.group_default_avatar)"))
41
-//        groupName.text = info.group_name
42
-//        let image = UIImage.init(qr: "http://xfoto.com.cn/g/" + info.group_id, size: nil)
43
-//        EWM.image = image
44
-    }
45
-//    override func gestureRecognizer(_ gestureRecognizer: UIGestureRecognizer, shouldReceive touch: UITouch) -> Bool {
46
-//        return true
47
-//    }
48
-}

+ 0 - 40
PaiAi/Paiai_iOS/App/PhotoDetail/DetailPageHeadCell.swift

@@ -1,40 +0,0 @@
1
-//
2
-//  DetailPageHeadCell.swift
3
-//  PaiAi
4
-//
5
-//  Created by zhengjianfei on 16/4/6.
6
-//  Copyright © 2016年 FFIB. All rights reserved.
7
-//
8
-
9
-import UIKit
10
-import PaiaiDataKit
11
-import PaiaiUIKit
12
-
13
-class DetailPageHeadCell: UITableViewCell {
14
-
15
-    @IBOutlet weak var enterView: UIView!
16
-    // MARK: Storyboard property
17
-    @IBOutlet var groupImage: UIImageView!
18
-    @IBOutlet var groupName: UILabel!
19
-    weak var delegate: CellDelegate?
20
-    // MARK: view function
21
-    override func awakeFromNib() {
22
-        super.awakeFromNib()
23
-    }
24
-
25
-    override func setSelected(_ selected: Bool, animated: Bool) {
26
-        super.setSelected(selected, animated: animated)
27
-    }
28
-
29
-    // MARK: init interface
30
-    func setInfo(_ info: PhotoItem) {
31
-//        groupImage.setImageWithNullableURL(info.group_avatar, placeholderImage:  UIImage(named: "Group\(info.group_default_avatar)"))
32
-        groupName.text = info.group_name
33
-    }
34
-
35
-    // MARK: Storyboard  button function
36
-    @IBAction func enterGroup() {
37
-        delegate?.pushNext()
38
-    }
39
-
40
-}

+ 0 - 35
PaiAi/Paiai_iOS/App/PhotoDetail/DetailPageNameCell.swift

@@ -1,35 +0,0 @@
1
-//
2
-//  DetailPageNameCell.swift
3
-//  PaiAi
4
-//
5
-//  Created by zhengjianfei on 16/4/6.
6
-//  Copyright © 2016年 FFIB. All rights reserved.
7
-//
8
-
9
-import UIKit
10
-import PaiaiDataKit
11
-import PaiaiUIKit
12
-
13
-class DetailPageNameCell: UITableViewCell {
14
-
15
-    // MARK: Storyboard property
16
-    @IBOutlet var personName: UILabel!
17
-    @IBOutlet var personImage: UIImageView!
18
-    @IBOutlet var time: UILabel!
19
-
20
-    // MARK: view function
21
-    override func awakeFromNib() {
22
-        super.awakeFromNib()
23
-    }
24
-
25
-    override func setSelected(_ selected: Bool, animated: Bool) {
26
-        super.setSelected(selected, animated: animated)
27
-    }
28
-
29
-    // MARK: init interface
30
-    func setInfo(_ info: PhotoItem) {
31
-        personName.text = info.nickname
32
-//        personImage.setImageWithNullableURL(info.avatar, placeholderImage: defaultAvatar)
33
-//        time.text = info.create_at.getTimeInfoFromDate()
34
-    }
35
-}

+ 0 - 85
PaiAi/Paiai_iOS/App/PhotoDetail/DetailPagePhotoCell.swift

@@ -1,85 +0,0 @@
1
-//
2
-//  DetailPagePhotoCell.swift
3
-//  PaiAi
4
-//
5
-//  Created by mac on 2016/11/2.
6
-//  Copyright © 2016年 FFIB. All rights reserved.
7
-//
8
-
9
-import UIKit
10
-import PaiaiDataKit
11
-import PaiaiUIKit
12
-
13
-protocol CellDelegate: class {
14
-    func returnCurrentIndex(index: Int)
15
-    func selectIndex(indexpath: IndexPath)
16
-    func pushNext()
17
-}
18
-extension CellDelegate {
19
-    func returnCurrentIndex(index: Int) {}
20
-    func selectIndex(indexpath: IndexPath) {}
21
-    func pushNext() {}
22
-}
23
-
24
-class DetailPagePhotoCell: UITableViewCell {
25
-
26
-    // MARK: Storyboard property
27
-    @IBOutlet weak var collectionView: UICollectionView!
28
-
29
-    // MARK: delete property
30
-    weak var delegate: CellDelegate?
31
-
32
-  // MARK: parameter property
33
-    lazy  var first = true
34
-    lazy var datas = [PhotoItem]()
35
-    lazy var currentPhotoIndex = 0
36
-}
37
-
38
-extension DetailPagePhotoCell: UICollectionViewDelegate, UICollectionViewDataSource, UICollectionViewDelegateFlowLayout {
39
-
40
-    func numberOfSections(in collectionView: UICollectionView) -> Int {
41
-        return 1
42
-    }
43
-
44
-    func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
45
-        return datas.count
46
-    }
47
-
48
-    func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
49
-        let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "photoDetailCell", for: indexPath)
50
-        guard let imageView = cell.viewWithTag(1010) as? UIImageView else {
51
-            return cell
52
-        }
53
-        var imageStr = ""
54
-        if !datas[indexPath.row].murl.isEmpty {
55
-            imageStr = datas[indexPath.row].murl
56
-        } else if !datas[indexPath.row].rurl.isEmpty {
57
-            imageStr = datas[indexPath.row].rurl
58
-        } else {
59
-            imageStr = datas[indexPath.row].photo_thumbnail2_url
60
-        }
61
-//        imageView.setImageWithNullableURL(imageStr, placeholderImage: UIImage(named: "详情页占位图"))
62
-        return cell
63
-    }
64
-
65
-    func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
66
-        delegate?.selectIndex(indexpath: indexPath)
67
-    }
68
-
69
-    func collectionView(_ collectionView: UICollectionView, willDisplay cell: UICollectionViewCell, forItemAt indexPath: IndexPath) {
70
-        delegate?.returnCurrentIndex(index: indexPath.row)
71
-        guard first else {
72
-            return
73
-        }
74
-        collectionView.scrollToItem(at: IndexPath(row: currentPhotoIndex, section: 0), at: .left, animated: false)
75
-        first = false
76
-    }
77
-
78
-    func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize {
79
-        return CGSize(width: kScreenWidth, height: 359)
80
-    }
81
-
82
-    
83
-
84
-
85
-}

+ 0 - 33
PaiAi/Paiai_iOS/App/PhotoDetail/DetailZanImagesCell.swift

@@ -1,33 +0,0 @@
1
-//
2
-//  DetailthumbupImagesCell.swift
3
-//  PaiAi
4
-//
5
-//  Created by zhengjianfei on 16/4/7.
6
-//  Copyright © 2016年 FFIB. All rights reserved.
7
-//
8
-
9
-import UIKit
10
-import PaiaiDataKit
11
-import PaiaiUIKit
12
-
13
-class DetailthumbupImagesCell: UITableViewCell {
14
-
15
-    // MARK: Storyboard property
16
-    @IBOutlet var imagesScrollView: UIScrollView!
17
-
18
-    // MARK: view function
19
-    override func awakeFromNib() {
20
-        super.awakeFromNib()
21
-    }
22
-
23
-    override func setSelected(_ selected: Bool, animated: Bool) {
24
-        super.setSelected(selected, animated: animated)
25
-    }
26
-
27
-    // MARK: init interface
28
-    func setInfo(content: [String]) {
29
-//        imagesScrollView.buildImageViews(content, width: 28, height: 28, spacing: 10, topSpcing: 0, block: {_ in
30
-//
31
-//        })
32
-    }
33
-}

+ 7 - 11
PaiAi/Paiai_iOS/App/PhotoDetail/Detail.storyboard

@@ -1,10 +1,6 @@
1 1
 <?xml version="1.0" encoding="UTF-8"?>
2 2
 <document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14460.31" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" colorMatched="YES" initialViewController="qsT-Pc-Bhh">
3
-    <device id="retina4_7" orientation="portrait">
4
-        <adaptation id="fullscreen"/>
5
-    </device>
6 3
     <dependencies>
7
-        <deployment identifier="iOS"/>
8 4
         <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14460.20"/>
9 5
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
10 6
     </dependencies>
@@ -85,10 +81,10 @@
85 81
             </objects>
86 82
             <point key="canvasLocation" x="-953.60000000000002" y="1390.704647676162"/>
87 83
         </scene>
88
-        <!--DetailPageController-->
84
+        <!--PhotoDetailViewController-->
89 85
         <scene sceneID="OIh-Ut-mfb">
90 86
             <objects>
91
-                <viewController storyboardIdentifier="DetailPageController" automaticallyAdjustsScrollViewInsets="NO" id="qsT-Pc-Bhh" userLabel="DetailPageController" customClass="DetailPageController" customModule="PaiAi" sceneMemberID="viewController">
87
+                <viewController storyboardIdentifier="PhotoDetailViewController" automaticallyAdjustsScrollViewInsets="NO" id="qsT-Pc-Bhh" userLabel="PhotoDetailViewController" customClass="PhotoDetailViewController" customModule="PaiAi" sceneMemberID="viewController">
92 88
                     <layoutGuides>
93 89
                         <viewControllerLayoutGuide type="top" id="aUY-hC-XIK"/>
94 90
                         <viewControllerLayoutGuide type="bottom" id="9RM-c8-CL6"/>
@@ -329,8 +325,8 @@
329 325
                                                     <color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
330 326
                                                     <nil key="highlightedColor"/>
331 327
                                                 </label>
332
-                                                <imageView userInteractionEnabled="NO" tag="1008" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="列表箭头" translatesAutoresizingMaskIntoConstraints="NO" id="pC6-7A-WSm">
333
-                                                    <rect key="frame" x="341" y="4.5" width="24" height="36"/>
328
+                                                <imageView userInteractionEnabled="NO" tag="1008" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="list-arrow" translatesAutoresizingMaskIntoConstraints="NO" id="pC6-7A-WSm">
329
+                                                    <rect key="frame" x="349" y="14.5" width="16" height="16"/>
334 330
                                                 </imageView>
335 331
                                                 <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon-赞" translatesAutoresizingMaskIntoConstraints="NO" id="jXa-8T-THD">
336 332
                                                     <rect key="frame" x="15" y="4.5" width="36" height="36"/>
@@ -399,8 +395,8 @@
399 395
                                                     <color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
400 396
                                                     <nil key="highlightedColor"/>
401 397
                                                 </label>
402
-                                                <imageView userInteractionEnabled="NO" tag="1009" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="列表箭头" translatesAutoresizingMaskIntoConstraints="NO" id="GOS-Xt-kBa">
403
-                                                    <rect key="frame" x="341" y="4.5" width="24" height="36"/>
398
+                                                <imageView userInteractionEnabled="NO" tag="1009" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="list-arrow" translatesAutoresizingMaskIntoConstraints="NO" id="GOS-Xt-kBa">
399
+                                                    <rect key="frame" x="349" y="14.5" width="16" height="16"/>
404 400
                                                 </imageView>
405 401
                                                 <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon-评论" translatesAutoresizingMaskIntoConstraints="NO" id="7bL-8L-k4P">
406 402
                                                     <rect key="frame" x="15" y="4.5" width="36" height="36"/>
@@ -932,11 +928,11 @@
932 928
         <image name="icon-记录" width="36" height="36"/>
933 929
         <image name="icon-评论" width="36" height="36"/>
934 930
         <image name="icon-赞" width="36" height="36"/>
931
+        <image name="list-arrow" width="16" height="16"/>
935 932
         <image name="分享-QQ" width="162" height="162"/>
936 933
         <image name="分享-微信好友" width="162" height="162"/>
937 934
         <image name="分享-微博" width="162" height="162"/>
938 935
         <image name="分享-朋友圈" width="162" height="162"/>
939
-        <image name="列表箭头" width="24" height="36"/>
940 936
         <image name="去除水印" width="8" height="144"/>
941 937
         <image name="大图模式-下载" width="96" height="96"/>
942 938
         <image name="旋转" width="96" height="96"/>

+ 5 - 5
PaiAi/Paiai_iOS/App/PhotoDetail/DetailCommentCell.swift

@@ -13,10 +13,10 @@ import PaiaiUIKit
13 13
 class DetailCommentCell: UITableViewCell {
14 14
 
15 15
     // MARK: Storyboard property
16
-    @IBOutlet var headImage: UIImageView!
17
-    @IBOutlet var name: UILabel!
18
-    @IBOutlet var content: UILabel!
19
-    @IBOutlet var time: UILabel!
16
+    @IBOutlet weak var headImage: UIImageView!
17
+    @IBOutlet weak var name: UILabel!
18
+    @IBOutlet weak var content: UILabel!
19
+    @IBOutlet weak var time: UILabel!
20 20
 
21 21
     // MARK: view function
22 22
     override func awakeFromNib() {
@@ -28,7 +28,7 @@ class DetailCommentCell: UITableViewCell {
28 28
     }
29 29
 
30 30
     // MARK: init interface
31
-    func setInfo(_ data: CommentItem) {
31
+    func setInfo(_ data: PhotoCommentItem) {
32 32
 //        headImage.setImageWithNullableURL(data.avatar, placeholderImage: defaultAvatar)
33 33
         name.text = data.nickname
34 34
         content.text = data.comment

+ 13 - 0
PaiAi/Paiai_iOS/App/PhotoDetail/PhotoDetailImageCell.swift

@@ -0,0 +1,13 @@
1
+//
2
+//  PhotoDetailImageCell.swift
3
+//  Paiai_iOS
4
+//
5
+//  Created by ffib on 2019/3/19.
6
+//  Copyright © 2019 yb. All rights reserved.
7
+//
8
+
9
+import UIKit
10
+
11
+class PhotoDetailImageCell: UICollectionViewCell {
12
+    
13
+}

+ 128 - 110
PaiAi/Paiai_iOS/App/PhotoDetail/DetailPageController.swift

@@ -1,5 +1,5 @@
1 1
 //
2
-//  DetailPageController.swift
2
+//  PhotoDetailViewController.swift
3 3
 //  PaiAi
4 4
 //
5 5
 //  Created by zhengjianfei on 16/4/6.
@@ -15,42 +15,56 @@ import PaiaiUIKit
15 15
 let kPhotographerMark = 1
16 16
 
17 17
 
18
-final class DetailPageController: UIViewController {
18
+final class PhotoDetailViewController: UIViewController {
19
+
20
+    @IBOutlet weak var groupAvatar: UIImageView!
21
+    @IBOutlet weak var groupName: UILabel!
22
+    
23
+    @IBOutlet weak var photoCollectionView: UICollectionView!
24
+    
25
+    @IBOutlet weak var userAvatar: UIImageView!
26
+    @IBOutlet weak var userName: UILabel!
27
+    @IBOutlet weak var photoTime: UILabel!
28
+    
29
+    @IBOutlet weak var thumbupCount: UILabel!
30
+    @IBOutlet weak var thumbupView: UIView!
31
+    
32
+    @IBOutlet weak var commentCount: UILabel!
33
+    @IBOutlet weak var tableView: UITableView!
34
+    
35
+    @IBOutlet weak var commentView: UIView!
36
+    @IBOutlet weak var commentHeight: NSLayoutConstraint!
37
+    @IBOutlet weak var commentTextField: UITextField!
38
+    @IBOutlet weak var sendBtn: UIButton!
39
+    
40
+    @IBOutlet weak var buyView: UIView!
41
+    @IBOutlet weak var waterMarkImage: UIImageView!
42
+    @IBOutlet weak var waterMarkLabel: UILabel!
19 43
 
20
-    // MARK: Storyboard property
21
-    @IBOutlet var tableView: UITableView!
22
-    @IBOutlet var commentView: UIView!
23
-    @IBOutlet var commentHeight: NSLayoutConstraint!
24
-    @IBOutlet var commentTextField: UITextField!
25
-    @IBOutlet var sendBtn: UIButton!
26
-    @IBOutlet var thumbupView: UIView!
27
-    @IBOutlet var buyView: UIView!
28
-    @IBOutlet var shuiyinImage: UIImageView!
29
-    @IBOutlet var shuiyinLabel: UILabel!
30
-    @IBOutlet weak var waterMarkView: UIView!
31
-
32
-    @IBOutlet weak var shuiyinImageLeadingConstarint: NSLayoutConstraint!
33 44
     // MARK: data property
34
-    var detailPageViewModel = DetailPageViewModel()
45
+    var viewModel: PhotoDetailViewModel!
35 46
     lazy var datas = [PhotoItem]()
36 47
     lazy var currentPhotoIndex = 0
37 48
     var isHiddenEnterView = false
38 49
     let disposeBag = DisposeBag()
39
-    static let storyboardCtl = UIStoryboard.photoDetail.instantiateInitialViewController() as! DetailPageController
50
+    static let storyboardCtl = UIStoryboard.photoDetail.instantiateInitialViewController() as! PhotoDetailViewController
40 51
 
41 52
     // MARK: view function
42 53
     override func viewDidLoad() {
43 54
         super.viewDidLoad()
44 55
 //        detailPageViewModel.tipDelegate = self
45 56
 //        tableView.tableFooterView = UIView()
46
-        tableView.contentInset = UIEdgeInsets(top: 0, left: 0, bottom: 100, right: 0)
47 57
         configureNotification()
48
-        commentTextField.addLeftPadding(7)
58
+        
49 59
         commentTextField.rx.text
50 60
                         .map {!($0?.isEmpty)!}
51 61
                         .bind(to: sendBtn.rx.isEnabled)
52 62
                         .disposed(by: disposeBag)
53 63
     }
64
+    
65
+    func setupCommentTextField() {
66
+        commentTextField.addLeftPadding(7)
67
+    }
54 68
 
55 69
     override func viewWillAppear(_ animated: Bool) {
56 70
         super.viewWillAppear(true)
@@ -118,28 +132,28 @@ final class DetailPageController: UIViewController {
118 132
         currentPhotoIndex = index
119 133
 //        detailPageViewModel.currentPhoto = datas[index]
120 134
 
121
-        detailPageViewModel.fetchThumbup(success: {[weak self] in
122
-            if let weakself = self {
123
-                var model = weakself.datas[index]
124
-                model.thumbup_num =  weakself.detailPageViewModel.thumbups.count
125
-                weakself.datas[index] = model
126
-//                PhotoLocalStorage.instance.updateLocalData(PhotoItem: model)
127
-                weakself.reloadSection(inter: 3)
128
-            }
129
-        })
130
-        detailPageViewModel.fetchComment(success: {[weak self] in
131
-            if let weakself = self {
132
-
133
-                var model = weakself.datas[index]
134
-                model.comment_num =  weakself.detailPageViewModel.comments.count
135
-                weakself.datas[index] = model
136
-//                PhotoLocalStorage.instance.updateLocalData(PhotoItem: model)
137
-                weakself.reloadSection(inter: 4)
138
-            }
139
-        })
140
-
141
-        reloadSection(inter: 0)
142
-        reloadSection(inter: 2)
135
+//        detailPageViewModel.fetchThumbup(success: {[weak self] in
136
+//            if let weakself = self {
137
+//                var model = weakself.datas[index]
138
+//                model.thumbup_num =  weakself.detailPageViewModel.thumbups.count
139
+//                weakself.datas[index] = model
140
+////                PhotoLocalStorage.instance.updateLocalData(PhotoItem: model)
141
+//                weakself.reloadSection(inter: 3)
142
+//            }
143
+//        })
144
+//        detailPageViewModel.fetchComment(success: {[weak self] in
145
+//            if let weakself = self {
146
+//
147
+//                var model = weakself.datas[index]
148
+//                model.comment_num =  weakself.detailPageViewModel.comments.count
149
+//                weakself.datas[index] = model
150
+////                PhotoLocalStorage.instance.updateLocalData(PhotoItem: model)
151
+//                weakself.reloadSection(inter: 4)
152
+//            }
153
+//        })
154
+
155
+//        reloadSection(inter: 0)
156
+//        reloadSection(inter: 2)
143 157
         showBuyView()
144 158
     }
145 159
 
@@ -157,36 +171,36 @@ final class DetailPageController: UIViewController {
157 171
 
158 172
     // MARK: Storyboard  button function
159 173
     @IBAction func HDPay(_ sender: UIButton) {
160
-        detailPageViewModel.getHD (getPriceSuccess: { [weak self] (isExist) in
161
-            if let weakself = self {
162
-                if isExist {
163
-                    let fullPicCtl = UIStoryboard(name: "Detail", bundle: nil).instantiateController(ShowFullPicController.self)
164
-                    fullPicCtl.datas = [weakself.datas[weakself.currentPhotoIndex]]
165
-                    fullPicCtl.showNomark = true
166
-                    fullPicCtl.currentPhotoIndex = weakself.currentPhotoIndex
167
-                    weakself.navigationController?.pushViewController(fullPicCtl, animated: true)
168
-                } else {
169
-                }
170
-            }
171
-        })
174
+//        detailPageViewModel.getHD (getPriceSuccess: { [weak self] (isExist) in
175
+//            if let weakself = self {
176
+//                if isExist {
177
+//                    let fullPicCtl = UIStoryboard(name: "Detail", bundle: nil).instantiateController(ShowFullPicController.self)
178
+//                    fullPicCtl.datas = [weakself.datas[weakself.currentPhotoIndex]]
179
+//                    fullPicCtl.showNomark = true
180
+//                    fullPicCtl.currentPhotoIndex = weakself.currentPhotoIndex
181
+//                    weakself.navigationController?.pushViewController(fullPicCtl, animated: true)
182
+//                } else {
183
+//                }
184
+//            }
185
+//        })
172 186
     }
173 187
 
174 188
     @IBAction func waterMarkPay(_ sender: UIButton) {
175 189
 
176
-        detailPageViewModel.getWatermark (getPriceSuccess: { [weak self] (isExist) in
177
-            if let weakself = self {
178
-                if isExist {
179
-                    let fullPicCtl = UIStoryboard(name: "Detail", bundle: nil).instantiateController(ShowFullPicController.self)
180
-                    fullPicCtl.datas = weakself.datas
181
-                    fullPicCtl.showNomark = true
182
-                    fullPicCtl.currentPhotoIndex = weakself.currentPhotoIndex
183
-                    weakself.navigationController?.pushViewController(fullPicCtl, animated: true)
184
-                } else {
185
-                    weakself.shuiyinImage.isHidden = true
186
-                    weakself.shuiyinLabel.text = "¥\((weakself.detailPageViewModel.watermarkPrice/100))"
187
-                }
188
-            }
189
-        })
190
+//        detailPageViewModel.getWatermark (getPriceSuccess: { [weak self] (isExist) in
191
+//            if let weakself = self {
192
+//                if isExist {
193
+//                    let fullPicCtl = UIStoryboard(name: "Detail", bundle: nil).instantiateController(ShowFullPicController.self)
194
+//                    fullPicCtl.datas = weakself.datas
195
+//                    fullPicCtl.showNomark = true
196
+//                    fullPicCtl.currentPhotoIndex = weakself.currentPhotoIndex
197
+//                    weakself.navigationController?.pushViewController(fullPicCtl, animated: true)
198
+//                } else {
199
+//                    weakself.shuiyinImage.isHidden = true
200
+//                    weakself.shuiyinLabel.text = "¥\((weakself.detailPageViewModel.watermarkPrice/100))"
201
+//                }
202
+//            }
203
+//        })
190 204
     }
191 205
 
192 206
     @IBAction func share() {
@@ -206,23 +220,23 @@ final class DetailPageController: UIViewController {
206 220
         guard let text = commentTextField.text else {
207 221
             return
208 222
         }
209
-        detailPageViewModel.sendComment(content: text, success: { [weak self] in
210
-            if let weakself = self {
211
-                weakself.commentTextField.text = ""
212
-                weakself.commentTextField.resignFirstResponder()
213
-                weakself.commentView.isHidden = true
214
-                weakself.refreshUI(index: weakself.currentPhotoIndex)
215
-            }
216
-        })
223
+//        detailPageViewModel.sendComment(content: text, success: { [weak self] in
224
+//            if let weakself = self {
225
+//                weakself.commentTextField.text = ""
226
+//                weakself.commentTextField.resignFirstResponder()
227
+//                weakself.commentView.isHidden = true
228
+//                weakself.refreshUI(index: weakself.currentPhotoIndex)
229
+//            }
230
+//        })
217 231
     }
218 232
 
219 233
     @IBAction func thumbup() {
220
-        detailPageViewModel.sendThumbup(success: {[weak self]  in
221
-            if let weakself = self {
222
-                weakself.refreshUI(index: weakself.currentPhotoIndex)
223
-            }
224
-
225
-        })
234
+//        detailPageViewModel.sendThumbup(success: {[weak self]  in
235
+//            if let weakself = self {
236
+//                weakself.refreshUI(index: weakself.currentPhotoIndex)
237
+//            }
238
+//
239
+//        })
226 240
     }
227 241
 
228 242
     // MARK: custom function
@@ -234,19 +248,19 @@ final class DetailPageController: UIViewController {
234 248
     }
235 249
 
236 250
     @objc func showThumps() {
237
-        if detailPageViewModel.thumbupsCount > 0 {
238
-            detailPageViewModel.thumbupsCount = 0
239
-        } else {
240
-            detailPageViewModel.thumbupsCount = detailPageViewModel.thumbups.count
241
-        }
251
+//        if detailPageViewModel.thumbupsCount > 0 {
252
+//            detailPageViewModel.thumbupsCount = 0
253
+//        } else {
254
+//            detailPageViewModel.thumbupsCount = detailPageViewModel.thumbups.count
255
+//        }
242 256
         reloadSection(inter: 3)
243 257
     }
244 258
     @objc func showComments() {
245
-        if detailPageViewModel.commentsCount > 0 {
246
-            detailPageViewModel.commentsCount = 0
247
-        } else {
248
-            detailPageViewModel.commentsCount = detailPageViewModel.comments.count
249
-        }
259
+//        if detailPageViewModel.commentsCount > 0 {
260
+//            detailPageViewModel.commentsCount = 0
261
+//        } else {
262
+//            detailPageViewModel.commentsCount = detailPageViewModel.comments.count
263
+//        }
250 264
         reloadSection(inter: 4)
251 265
     }
252 266
 
@@ -274,7 +288,7 @@ final class DetailPageController: UIViewController {
274 288
 }
275 289
 
276 290
 // MARK: custom delegate function
277
-extension DetailPageController: CellDelegate {
291
+extension PhotoDetailViewController: CellDelegate {
278 292
     func selectIndex(indexpath: IndexPath) {
279 293
         let ctl = UIStoryboard.photoDetail.instantiateController(ShowFullPicController.self)
280 294
         ctl.datas = datas
@@ -295,7 +309,7 @@ extension DetailPageController: CellDelegate {
295 309
 }
296 310
 
297 311
 //MARK textField delegate
298
-extension DetailPageController: UIGestureRecognizerDelegate {
312
+extension PhotoDetailViewController: UIGestureRecognizerDelegate {
299 313
     // MARK: textField
300 314
 
301 315
     func gestureRecognizer(_ gestureRecognizer: UIGestureRecognizer, shouldReceive touch: UITouch) -> Bool {
@@ -312,33 +326,33 @@ extension DetailPageController: UIGestureRecognizerDelegate {
312 326
 }
313 327
 
314 328
 // MARK: UITableView delegate
315
-extension DetailPageController: UITableViewDataSource, UITableViewDelegate {
329
+extension PhotoDetailViewController: UITableViewDataSource, UITableViewDelegate {
316 330
 
317 331
     func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
318 332
         if section == 3 {
319 333
             let cell = tableView.dequeueReusableCell(withIdentifier: "thumbupHeadCell")
320 334
             if let label = cell?.viewWithTag(1001) as? UILabel {
321
-                label.text = "(\(detailPageViewModel.thumbups.count))"
335
+//                label.text = "(\(detailPageViewModel.thumbups.count))"
322 336
             }
323 337
             if let button = cell?.viewWithTag(1011) as? UIButton {
324 338
                 button.addTarget(self, action: #selector(showThumps), for: .touchUpInside)
325 339
             }
326 340
             if let imageView = cell?.viewWithTag(1008) as? UIImageView {
327
-                let imageName = detailPageViewModel.thumbupsCount <= 0 ? "收起" : "列表箭头"
328
-                imageView.image = UIImage(named : imageName)
341
+//                let imageName = detailPageViewModel.thumbupsCount <= 0 ? "收起" : "list-arrow"
342
+//                imageView.image = UIImage(named : imageName)
329 343
             }
330 344
             return cell?.contentView
331 345
         } else if section == 4 {
332 346
             let cell = tableView.dequeueReusableCell(withIdentifier: "comentHeadCell")
333 347
             if let label = cell?.viewWithTag(1002) as? UILabel {
334
-                label.text = "(\(detailPageViewModel.comments.count))"
348
+//                label.text = "(\(detailPageViewModel.comments.count))"
335 349
             }
336 350
             if let button = cell?.viewWithTag(1012) as? UIButton {
337 351
                 button.addTarget(self, action: #selector(showComments), for: .touchUpInside)
338 352
             }
339 353
             if let imageView = cell?.viewWithTag(1009) as? UIImageView {
340
-                let imageName = detailPageViewModel.commentsCount <= 0 ? "收起" : "列表箭头"
341
-                imageView.image = UIImage(named : imageName)
354
+//                let imageName = detailPageViewModel.commentsCount <= 0 ? "收起" : "list-arrow"
355
+//                imageView.image = UIImage(named : imageName)
342 356
             }
343 357
             return cell?.contentView
344 358
         }
@@ -357,11 +371,11 @@ extension DetailPageController: UITableViewDataSource, UITableViewDelegate {
357 371
     }
358 372
 
359 373
     func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
360
-        if section == 3 {
361
-            return detailPageViewModel.thumbupsCount > 0 ? 1 : 0
362
-        } else if section == 4 {
363
-            return detailPageViewModel.commentsCount
364
-        }
374
+//        if section == 3 {
375
+//            return detailPageViewModel.thumbupsCount > 0 ? 1 : 0
376
+//        } else if section == 4 {
377
+//            return detailPageViewModel.commentsCount
378
+//        }
365 379
         return 0
366 380
     }
367 381
 
@@ -391,14 +405,14 @@ extension DetailPageController: UITableViewDataSource, UITableViewDelegate {
391 405
             return cell
392 406
         } else if indexPath.section == 3 {
393 407
             let cell = tableView.dequeueReusableCell(withIdentifier: "thumbupCell", for: indexPath) as! DetailthumbupImagesCell
394
-            if detailPageViewModel.thumbups.count > 0 {
395
-                let headers = detailPageViewModel.thumbups.map {$0.avatar}
396
-                cell.setInfo(content: headers)
397
-            }
408
+//            if detailPageViewModel.thumbups.count > 0 {
409
+//                let headers = detailPageViewModel.thumbups.map {$0.avatar}
410
+//                cell.setInfo(content: headers)
411
+//            }
398 412
             return cell
399 413
         } else {
400 414
             let cell = tableView.dequeueReusableCell(withIdentifier: "comentCell", for: indexPath) as! DetailCommentCell
401
-            cell.setInfo(detailPageViewModel.comments[indexPath.row])
415
+//            cell.setInfo(detailPageViewModel.comments[indexPath.row])
402 416
             return cell
403 417
         }
404 418
     }
@@ -418,3 +432,7 @@ extension DetailPageController: UITableViewDataSource, UITableViewDelegate {
418 432
         }
419 433
     }
420 434
 }
435
+
436
+extension PhotoDetailViewController {
437
+    
438
+}

+ 4 - 4
PaiAi/Paiai_iOS/App/PhotoDetail/ShowFullPicController.swift

@@ -13,7 +13,7 @@ import PaiaiUIKit
13 13
 final class ShowFullPicController: UIViewController {
14 14
 
15 15
     // MARK: Storyboard property
16
-    @IBOutlet var collectionView: UICollectionView!
16
+    @IBOutlet weak var collectionView: UICollectionView!
17 17
 //    @IBOutlet weak var progressView: FFProgress!
18 18
    // MARK: parameter property
19 19
     lazy var datas = [PhotoItem]()
@@ -44,11 +44,11 @@ final class ShowFullPicController: UIViewController {
44 44
     // MARK: Storyboard  button function
45 45
     @IBAction  func back() {
46 46
          _ = navigationController?.popViewController(animated: true)
47
-        guard let ctl = navigationController?.viewControllers.last as? DetailPageController else {
47
+        guard let ctl = navigationController?.viewControllers.last as? PhotoDetailViewController else {
48 48
             return
49 49
         }
50
-        ctl.currentPhotoIndex = currentPageIndex
51
-        ctl.tableView.reloadData()
50
+//        ctl.currentPhotoIndex = currentPageIndex
51
+//        ctl.tableView.reloadData()
52 52
     }
53 53
     @IBAction func rotateTheImage(_ sender: UIButton) {
54 54
         guard let cell = collectionView.cellForItem(at: IndexPath(item: currentPageIndex, section: 0)) as? ImageCell else {

+ 21 - 0
PaiAi/Paiai_iOS/App/PhotoDetail/ShareView.swift

@@ -0,0 +1,21 @@
1
+//
2
+//  ShareView.swift
3
+//  Paiai_iOS
4
+//
5
+//  Created by ffib on 2019/3/21.
6
+//  Copyright © 2019 yb. All rights reserved.
7
+//
8
+
9
+import UIKit
10
+
11
+class ShareView: UIView {
12
+
13
+    /*
14
+    // Only override draw() if you perform custom drawing.
15
+    // An empty implementation adversely affects performance during animation.
16
+    override func draw(_ rect: CGRect) {
17
+        // Drawing code
18
+    }
19
+    */
20
+
21
+}

kodo - Gogs: Go Git Service

No Description

FFIB: 7ff56cf0d7 增加福利解锁模板消息返回结果 2 years ago
..
0001_initial.py 3d0d214667 :sparkles: Member Infos 7 years ago
0002_auto_20191119_1428.py 2941e5a938 :art: Right Type 7 years ago
0003_auto_20191119_1446.py 7ba2bde353 :art: Levelx 7 years ago
0004_auto_20191119_2342.py 598d0be866 :art: Add more field for MemberActivity 7 years ago
0005_memberactivityinfo_city.py 8cca797a82 :bug: Fix Bug: response error 7 years ago
0006_auto_20191201_2110.py 4ce7f5c87b :art: Member Relative APIs 7 years ago
0007_auto_20191212_0952.py 608f25d6bc coupons 7 years ago
0008_auto_20191212_1742.py 75ab3f5097 :art: Coupons 7 years ago
0009_auto_20191212_1749.py 75ab3f5097 :art: Coupons 7 years ago
0010_auto_20191212_1821.py 75ab3f5097 :art: Coupons 7 years ago
0011_auto_20191212_1827.py 75ab3f5097 :art: Coupons 7 years ago
0012_auto_20191221_1419.py a8239c077f :art: CouponInfo for coupon app 6 years ago
0013_goodsinfo_only_for_member.py ec4c2109cc only_for_member 6 years ago
0014_auto_20191221_1613.py d1b712e035 Opt coupon 6 years ago
0015_auto_20191221_2058.py e3ff618d3b :art: Filter left_num gt 0 6 years ago
0016_auto_20191223_1808.py d2fce27cd4 :bug: Fix Bug: CouponInfo 6 years ago
0017_goodsorderinfo_integral.py a29f70f92b migrate 6 years ago
0018_memberactivityinfo_is_signup.py 019d571675 MemberActivityInfo 添加 is_signup 6 years ago
0019_auto_20201202_1203.py 6a9e324f6f :art: Re Makemigrations 6 years ago
0020_memberactivityinfo_group_share_max_integral.py 7c5d960672 :art: Makemigrations 6 years ago
0021_auto_20201203_1140.py 8d41a46f32 add default = '' 6 years ago
0022_auto_20201203_1500.py b2220dd77c MemberActivityInfo default 6 years ago
0023_memberactivityinfo_activity_state.py dfa7892487 MemberActivityInfo add activity_state 6 years ago
0024_auto_20201204_1831.py 9482ca6291 :bug: Fix Bug: ValueError: Found wrong number (0) of constraints 4 years ago
0025_auto_20210107_1834.py 2f29c70d66 :art: TEMPLATE_ID_TRACKING 5 years ago
0026_goodsorderinfo_send_template_message_res.py 5de59f57d6 记录发送订阅消息结果 5 years ago
0027_goodsorderinfo_remark.py 5444cf4170 添加备注,支持自定义模板消息备注 5 years ago
0028_auto_20210115_1108.py 3cc529c04c fix 会员活动分享 group_share_id 唯一 5 years ago
0029_goodsinfo_only_once.py 3a0e43ca50 :art: Support GOOD_EXCHANGE_ONLY_ONCE 5 years ago
0030_rightinfo_is_continue_send_coupon.py aa2144ebb6 :art: RightInfoAdmin 5 years ago
0031_auto_20211124_1850.py 14e27ba300 :art: is_upload_qiniu 5 years ago
0032_auto_20220704_2001.py b1998d68a0 记录后台管理员登录日志 4 years ago
0033_auto_20221021_2212.py 0a3d06d643 :art: Update member_activity 4 years ago
0034_memberactivityinfo_limit_image_num.py 0a3d06d643 :art: Update member_activity 4 years ago
0035_memberactivitycontributioninfo.py deb2b19881 :art: Support activity_contribute 4 years ago
0036_memberactivitycontributioninfo_video_url.py 852b7bb5d4 :art: Support activity_contribute_list / activity_contribute_detail 4 years ago
0037_auto_20221023_2010.py ffff9d77ff :art: Support member_activity_contribute_audit / member_activity_contribute_selected 4 years ago
0038_auto_20221025_0141.py a37357f66d :art: Support Member Activity Contribute Welfare 4 years ago
0039_memberactivitycontributionwelfareinfo_is_upload_qiniu.py a37357f66d :art: Support Member Activity Contribute Welfare 4 years ago
0040_memberactivitycontributionwelfareinfo_activity_id.py 06b0f769ce :art: Add activity_id for MemberActivityContributionWelfareInfo & Change is_audit_pass to audit_status for MemberActivityContributionInfo 4 years ago
0041_auto_20221025_1236.py 06b0f769ce :art: Add activity_id for MemberActivityContributionWelfareInfo & Change is_audit_pass to audit_status for MemberActivityContributionInfo 4 years ago
0042_memberactivitycontributionwelfareunlockinginfo.py 2986e79e27 :art: Add MemberActivityContributionWelfareUnlockingInfo 4 years ago
0043_auto_20221026_0221.py 2986e79e27 :art: Add MemberActivityContributionWelfareUnlockingInfo 4 years ago
0044_auto_20221026_1402.py c3085071d6 update migrate 4 years ago
0045_auto_20221026_2102.py fa4319da16 fix # -*- coding: utf-8 -*- 4 years ago
0046_alter_memberactivitycontributionwelfareunlockinginfo_unique_together.py cd1f86300b MemberActivityContributionWelfareUnlockingInfo 唯一性校验 4 years ago
0046_memberactivitycontributionwelfareunlockinginfo_welfare_value.py 2bf8b860dd :art: MEMBER_ACTIVITY_CONTRIBUTION_WELFARE 4 years ago
0047_memberactivitycontributionwelfareunlockinginfo_welfare_type.py a218d069b8 :art: Add user integral when activity_contribute_welfare_unlocking_handled 4 years ago
0048_merge_20221027_2056.py 15861b0971 fix migration conflict 4 years ago
0049_alter_memberactivityinfo_limit_image_num.py d0c465e61f :art: limit_image_num 4 years ago
0050_memberactivityinfo_contribution_content_placeholder.py 2b06603330 MemberActivityInfo增加contribution_content_placeholder 4 years ago
0051_alter_memberactivitycontributionwelfareunlockinginfo_unique_together.py 0b9aeeba51 :art: Opt Codes 4 years ago
0052_auto_20221107_2238.py c9dfed476b :art: Support QINIU_FILE_URL_HTTPS 4 years ago
0053_alter_memberactivitygroupshareinfo_unique_together.py fa75cd204c :bug: Fix Bug: ValueError: Found wrong number (0) of constraints 4 years ago
0054_auto_20230303_1653.py 23b0e2f04e 会员等级礼品关联商品 3 years ago
0055_auto_20230418_1602.py d56de855ae 新增 post_kv_image 3 years ago
0056_memberactivityinfo_activity_section.py 5e1536a8ec 会员活动增加activity_section字段 3 years ago
0057_auto_20230506_1643.py 621aed80ce 会员活动新增字段 3 years ago
0058_auto_20230506_1650.py 621aed80ce 会员活动新增字段 3 years ago
0059_memberactivityinfo_feed_id.py c827c2422f 会员活动增加直播回放 3 years ago
0060_memberactivitycontributioninfo_main_activity_id.py 1354c61e82 memberactivitycontributioninfo 增加 main_activity_id 3 years ago
0061_alter_memberactivityinfo_feed_id.py bc3ce8c5ff 更新 feed_id max_length 3 years ago
0062_memberactivitysignupinfo_fields.py 76ef309480 报名增加自定义字段 3 years ago
0063_memberactivitysignupinfo_is_signup.py 33e94faca0 调整活动签到 3 years ago
0064_auto_20231016_1730.py 33e94faca0 调整活动签到 3 years ago
0065_auto_20240304_1043.py 481be2942f MemberActivityInfo新增数据表单字段data_fields,新增摄影师活动 2 years ago
0066_memberactivitysignupinfo_lensman_id.py d491a3d79a 摄影师活动报名 2 years ago
0067_memberactivitysignupinfo_passed.py 0330f36822 增加报名通过接口 2 years ago
0068_auto_20240306_1410.py b8c998fdd3 增加会员活动数据提交 2 years ago
0069_auto_20240312_1350.py 0c91ed9208 增加摄影师活动积分 2 years ago
0070_auto_20240327_1550.py c0e75a540a 新增摄影师积分体系 2 years ago
0071_auto_20240410_1612.py 4a7b65e9b3 摄影师版块新增备注,会员活动投稿新增消息 2 years ago
0072_memberactivitycontributionwelfareunlockinginfo_send_template_message_res.py 7ff56cf0d7 增加福利解锁模板消息返回结果 2 years ago
__init__.py 3d0d214667 :sparkles: Member Infos 7 years ago
kodo - Gogs: Go Git Service

暫無描述

huangqimin001: 2bf8b860dd :art: MEMBER_ACTIVITY_CONTRIBUTION_WELFARE 4 年之前
..
commands 2bf8b860dd :art: MEMBER_ACTIVITY_CONTRIBUTION_WELFARE 4 年之前
__init__.py b95db9c5c3 Basic gis command 8 年之前