14
+	<string>ShowActiveSchemeOnly</string>
15
+	<key>LiveSourceIssuesEnabled</key>
16
+	<true/>
17
+</dict>
18
+</plist>

+ 21 - 0
PaiAi/Paiai/Assets.xcassets/Common/BTN-send.imageset/Contents.json

@@ -0,0 +1,21 @@
1
+{
2
+  "images" : [
3
+    {
4
+      "idiom" : "universal",
5
+      "filename" : "未命名设计.png",
6
+      "scale" : "1x"
7
+    },
8
+    {
9
+      "idiom" : "universal",
10
+      "scale" : "2x"
11
+    },
12
+    {
13
+      "idiom" : "universal",
14
+      "scale" : "3x"
15
+    }
16
+  ],
17
+  "info" : {
18
+    "version" : 1,
19
+    "author" : "xcode"
20
+  }
21
+}

BIN
PaiAi/Paiai/Assets.xcassets/Common/BTN-send.imageset/未命名设计.png


PaiAi/Paiai/Assets.xcassets/MainPage/defaultAvatar.imageset/Contents.json → PaiAi/Paiai/Assets.xcassets/Common/defaultAvatar.imageset/Contents.json


PaiAi/Paiai/Assets.xcassets/MainPage/defaultAvatar.imageset/默认头像.png → PaiAi/Paiai/Assets.xcassets/Common/defaultAvatar.imageset/默认头像.png


+ 1 - 1
PaiAi/Paiai/Assets.xcassets/MainPage/navigation-QR.imageset/Contents.json

@@ -2,6 +2,7 @@
2 2
   "images" : [
3 3
     {
4 4
       "idiom" : "universal",
5
+      "filename" : "二维码 (1).png",
5 6
       "scale" : "1x"
6 7
     },
7 8
     {
@@ -10,7 +11,6 @@
10 11
     },
11 12
     {
12 13
       "idiom" : "universal",
13
-      "filename" : "二维码 (1).png",
14 14
       "scale" : "3x"
15 15
     }
16 16
   ],

BIN
PaiAi/Paiai/Assets.xcassets/Common/list-QR.imageset/二维码 (1).png


PaiAi/Paiai/Assets.xcassets/MainPage/列表箭头.imageset/Contents.json → PaiAi/Paiai/Assets.xcassets/Common/list-arrow.imageset/Contents.json


PaiAi/Paiai/Assets.xcassets/MainPage/列表箭头.imageset/列表箭头.png → PaiAi/Paiai/Assets.xcassets/Common/list-arrow.imageset/列表箭头.png


BIN
PaiAi/Paiai/Assets.xcassets/Logo.imageset/Logo@3x.png


BIN
PaiAi/Paiai/Assets.xcassets/MainPage/navigation-QR.imageset/二维码 (1).png


PaiAi/Paiai/Assets.xcassets/Mine/Contents.json → PaiAi/Paiai/Assets.xcassets/message/Contents.json


PaiAi/Paiai/Assets.xcassets/MainPage/message-comment.imageset/Contents.json → PaiAi/Paiai/Assets.xcassets/message/message-comment.imageset/Contents.json


PaiAi/Paiai/Assets.xcassets/MainPage/message-comment.imageset/消息-评论.png → PaiAi/Paiai/Assets.xcassets/message/message-comment.imageset/消息-评论.png


PaiAi/Paiai/Assets.xcassets/MainPage/message-system.imageset/Contents.json → PaiAi/Paiai/Assets.xcassets/message/message-system.imageset/Contents.json


PaiAi/Paiai/Assets.xcassets/MainPage/message-system.imageset/消息-官方提示.png → PaiAi/Paiai/Assets.xcassets/message/message-system.imageset/消息-官方提示.png


PaiAi/Paiai/Assets.xcassets/MainPage/message-thumpub.imageset/Contents.json → PaiAi/Paiai/Assets.xcassets/message/message-thumpub.imageset/Contents.json


PaiAi/Paiai/Assets.xcassets/MainPage/message-thumpub.imageset/消息-赞.png → PaiAi/Paiai/Assets.xcassets/message/message-thumpub.imageset/消息-赞.png


PaiAi/Paiai/Assets.xcassets/New Folder-1/Contents.json → PaiAi/Paiai/Assets.xcassets/mine/Contents.json


PaiAi/Paiai/Assets.xcassets/Mine/about-contactUs.imageset/Contents.json → PaiAi/Paiai/Assets.xcassets/mine/about-contactUs.imageset/Contents.json


PaiAi/Paiai/Assets.xcassets/Mine/about-contactUs.imageset/我的-客服 @3x.png → PaiAi/Paiai/Assets.xcassets/mine/about-contactUs.imageset/我的-客服 @3x.png


PaiAi/Paiai/Assets.xcassets/Mine/about-score.imageset/Contents.json → PaiAi/Paiai/Assets.xcassets/mine/about-score.imageset/Contents.json


PaiAi/Paiai/Assets.xcassets/Mine/about-score.imageset/关于-用户协议 @3x.png → PaiAi/Paiai/Assets.xcassets/mine/about-score.imageset/关于-用户协议 @3x.png


PaiAi/Paiai/Assets.xcassets/Mine/about-userAgreement.imageset/Contents.json → PaiAi/Paiai/Assets.xcassets/mine/about-userAgreement.imageset/Contents.json


PaiAi/Paiai/Assets.xcassets/Mine/about-userAgreement.imageset/关于-用户协议 @3x.png → PaiAi/Paiai/Assets.xcassets/mine/about-userAgreement.imageset/关于-用户协议 @3x.png


PaiAi/Paiai/Assets.xcassets/Mine/mine-about.imageset/Contents.json → PaiAi/Paiai/Assets.xcassets/mine/mine-about.imageset/Contents.json


PaiAi/Paiai/Assets.xcassets/Mine/mine-about.imageset/关于@3x.png → PaiAi/Paiai/Assets.xcassets/mine/mine-about.imageset/关于@3x.png


PaiAi/Paiai/Assets.xcassets/Mine/mine-feedback.imageset/Contents.json → PaiAi/Paiai/Assets.xcassets/mine/mine-feedback.imageset/Contents.json


PaiAi/Paiai/Assets.xcassets/Mine/mine-feedback.imageset/我的-意见反馈 copy.png → PaiAi/Paiai/Assets.xcassets/mine/mine-feedback.imageset/我的-意见反馈 copy.png


PaiAi/Paiai/Assets.xcassets/Mine/mine-group.imageset/Contents.json → PaiAi/Paiai/Assets.xcassets/mine/mine-group.imageset/Contents.json


PaiAi/Paiai/Assets.xcassets/Mine/mine-group.imageset/群组@3x.png → PaiAi/Paiai/Assets.xcassets/mine/mine-group.imageset/群组@3x.png


PaiAi/Paiai/Assets.xcassets/Mine/mine-order.imageset/Contents.json → PaiAi/Paiai/Assets.xcassets/mine/mine-order.imageset/Contents.json


PaiAi/Paiai/Assets.xcassets/Mine/mine-order.imageset/订单@3x.png → PaiAi/Paiai/Assets.xcassets/mine/mine-order.imageset/订单@3x.png


PaiAi/Paiai/Assets.xcassets/New Folder-2/Contents.json → PaiAi/Paiai/Assets.xcassets/navigation/Contents.json


+ 1 - 1
PaiAi/Paiai/Assets.xcassets/Logo.imageset/Contents.json

@@ -10,7 +10,7 @@
10 10
     },
11 11
     {
12 12
       "idiom" : "universal",
13
-      "filename" : "Logo@3x.png",
13
+      "filename" : "二维码 (2).png",
14 14
       "scale" : "3x"
15 15
     }
16 16
   ],

BIN
PaiAi/Paiai/Assets.xcassets/navigation/navigation-QR.imageset/二维码 (2).png


PaiAi/Paiai/Assets.xcassets/MainPage/navigation-back.imageset/Contents.json → PaiAi/Paiai/Assets.xcassets/navigation/navigation-back.imageset/Contents.json


PaiAi/Paiai/Assets.xcassets/MainPage/navigation-back.imageset/back.png → PaiAi/Paiai/Assets.xcassets/navigation/navigation-back.imageset/back.png


PaiAi/Paiai/Assets.xcassets/MainPage/navigation-background.imageset/Contents.json → PaiAi/Paiai/Assets.xcassets/navigation/navigation-background.imageset/Contents.json


PaiAi/Paiai/Assets.xcassets/MainPage/navigation-background.imageset/标题栏-2.png → PaiAi/Paiai/Assets.xcassets/navigation/navigation-background.imageset/标题栏-2.png


PaiAi/Paiai/Assets.xcassets/MainPage/navigation-right.imageset/Contents.json → PaiAi/Paiai/Assets.xcassets/navigation/navigation-right.imageset/Contents.json


PaiAi/Paiai/Assets.xcassets/MainPage/navigation-right.imageset/更多-右上角.png → PaiAi/Paiai/Assets.xcassets/navigation/navigation-right.imageset/更多-右上角.png


PaiAi/Paiai/Assets.xcassets/MainPage/navigation-vertical-points.imageset/Contents.json → PaiAi/Paiai/Assets.xcassets/navigation/navigation-vertical-points.imageset/Contents.json


PaiAi/Paiai/Assets.xcassets/MainPage/navigation-vertical-points.imageset/更多-右上角-2.png → PaiAi/Paiai/Assets.xcassets/navigation/navigation-vertical-points.imageset/更多-右上角-2.png


PaiAi/Paiai/Assets.xcassets/MainPage/BTN-评论.imageset/BTN-评论.png → PaiAi/Paiai/Assets.xcassets/photoDetail/BTN-comment.imageset/BTN-评论.png


PaiAi/Paiai/Assets.xcassets/MainPage/BTN-评论.imageset/Contents.json → PaiAi/Paiai/Assets.xcassets/photoDetail/BTN-comment.imageset/Contents.json


PaiAi/Paiai/Assets.xcassets/MainPage/大图模式-下载.imageset/Contents.json → PaiAi/Paiai/Assets.xcassets/photoDetail/BTN-download.imageset/Contents.json


PaiAi/Paiai/Assets.xcassets/MainPage/大图模式-下载.imageset/大图模式-下载.png → PaiAi/Paiai/Assets.xcassets/photoDetail/BTN-download.imageset/大图模式-下载.png


PaiAi/Paiai/Assets.xcassets/MainPage/旋转.imageset/Contents.json → PaiAi/Paiai/Assets.xcassets/photoDetail/BTN-rotate.imageset/Contents.json


PaiAi/Paiai/Assets.xcassets/MainPage/旋转.imageset/旋转.png → PaiAi/Paiai/Assets.xcassets/photoDetail/BTN-rotate.imageset/旋转.png


PaiAi/Paiai/Assets.xcassets/MainPage/BTN-分享.imageset/BTN-分享.png → PaiAi/Paiai/Assets.xcassets/photoDetail/BTN-share.imageset/BTN-分享.png


PaiAi/Paiai/Assets.xcassets/MainPage/BTN-分享.imageset/Contents.json → PaiAi/Paiai/Assets.xcassets/photoDetail/BTN-share.imageset/Contents.json


PaiAi/Paiai/Assets.xcassets/MainPage/Oval 491.imageset/Contents.json → PaiAi/Paiai/Assets.xcassets/photoDetail/BTN-thumbup.imageset/Contents.json


PaiAi/Paiai/Assets.xcassets/MainPage/Oval 491.imageset/Oval 491.png → PaiAi/Paiai/Assets.xcassets/photoDetail/BTN-thumbup.imageset/Oval 491.png


PaiAi/Paiai/Assets.xcassets/share/Contents.json → PaiAi/Paiai/Assets.xcassets/photoDetail/Contents.json


PaiAi/Paiai/Assets.xcassets/MainPage/icon-评论.imageset/Contents.json → PaiAi/Paiai/Assets.xcassets/photoDetail/icon-comment.imageset/Contents.json


PaiAi/Paiai/Assets.xcassets/MainPage/icon-评论.imageset/icon-评论-2.png → PaiAi/Paiai/Assets.xcassets/photoDetail/icon-comment.imageset/icon-评论-2.png


PaiAi/Paiai/Assets.xcassets/MainPage/icon-赞.imageset/Contents.json → PaiAi/Paiai/Assets.xcassets/photoDetail/icon-thumbup.imageset/Contents.json


PaiAi/Paiai/Assets.xcassets/MainPage/icon-赞.imageset/icon-赞-2.png → PaiAi/Paiai/Assets.xcassets/photoDetail/icon-thumbup.imageset/icon-赞-2.png


PaiAi/Paiai/Assets.xcassets/MainPage/icon-记录.imageset/Contents.json → PaiAi/Paiai/Assets.xcassets/photoDetail/icon-time.imageset/Contents.json


PaiAi/Paiai/Assets.xcassets/MainPage/icon-记录.imageset/icon-记录.png → PaiAi/Paiai/Assets.xcassets/photoDetail/icon-time.imageset/icon-记录.png


PaiAi/Paiai/Assets.xcassets/MainPage/获取高清图.imageset/Contents.json → PaiAi/Paiai/Assets.xcassets/photoDetail/purchase-background.imageset/Contents.json


PaiAi/Paiai/Assets.xcassets/MainPage/获取高清图.imageset/获取高清图.png → PaiAi/Paiai/Assets.xcassets/photoDetail/purchase-background.imageset/获取高清图.png


+ 6 - 0
PaiAi/Paiai/Assets.xcassets/photoDetail/share/Contents.json

@@ -0,0 +1,6 @@
1
+{
2
+  "info" : {
3
+    "version" : 1,
4
+    "author" : "xcode"
5
+  }
6
+}

PaiAi/Paiai/Assets.xcassets/share/分享-QQ.imageset/Contents.json → PaiAi/Paiai/Assets.xcassets/photoDetail/share/share-QQ.imageset/Contents.json


PaiAi/Paiai/Assets.xcassets/share/分享-QQ.imageset/分享-QQ.png → PaiAi/Paiai/Assets.xcassets/photoDetail/share/share-QQ.imageset/分享-QQ.png


PaiAi/Paiai/Assets.xcassets/share/分享-微博.imageset/Contents.json → PaiAi/Paiai/Assets.xcassets/photoDetail/share/share-weibo.imageset/Contents.json


PaiAi/Paiai/Assets.xcassets/share/分享-微博.imageset/分享-微博.png → PaiAi/Paiai/Assets.xcassets/photoDetail/share/share-weibo.imageset/分享-微博.png


PaiAi/Paiai/Assets.xcassets/share/分享-微信好友.imageset/Contents.json → PaiAi/Paiai/Assets.xcassets/photoDetail/share/share-wx.imageset/Contents.json


PaiAi/Paiai/Assets.xcassets/share/分享-微信好友.imageset/分享-微信好友.png → PaiAi/Paiai/Assets.xcassets/photoDetail/share/share-wx.imageset/分享-微信好友.png


PaiAi/Paiai/Assets.xcassets/share/分享-朋友圈.imageset/Contents.json → PaiAi/Paiai/Assets.xcassets/photoDetail/share/share-wxCircle.imageset/Contents.json


PaiAi/Paiai/Assets.xcassets/share/分享-朋友圈.imageset/分享-朋友圈.png → PaiAi/Paiai/Assets.xcassets/photoDetail/share/share-wxCircle.imageset/分享-朋友圈.png


PaiAi/Paiai/Assets.xcassets/MainPage/去除水印.imageset/Contents.json → PaiAi/Paiai/Assets.xcassets/photoDetail/去除水印.imageset/Contents.json


PaiAi/Paiai/Assets.xcassets/MainPage/去除水印.imageset/去除水印.png → PaiAi/Paiai/Assets.xcassets/photoDetail/去除水印.imageset/去除水印.png


PaiAi/Paiai/Assets.xcassets/MainPage/购买-HD.imageset/Contents.json → PaiAi/Paiai/Assets.xcassets/photoDetail/购买-HD.imageset/Contents.json


PaiAi/Paiai/Assets.xcassets/MainPage/购买-HD.imageset/购买-HD.png → PaiAi/Paiai/Assets.xcassets/photoDetail/购买-HD.imageset/购买-HD.png


PaiAi/Paiai/Assets.xcassets/MainPage/购买-去水印.imageset/Contents.json → PaiAi/Paiai/Assets.xcassets/photoDetail/购买-去水印.imageset/Contents.json


PaiAi/Paiai/Assets.xcassets/MainPage/购买-去水印.imageset/购买-去水印.png → PaiAi/Paiai/Assets.xcassets/photoDetail/购买-去水印.imageset/购买-去水印.png


PaiAi/Paiai/Assets.xcassets/MainPage/进入群.imageset/Contents.json → PaiAi/Paiai/Assets.xcassets/photoDetail/进入群.imageset/Contents.json


PaiAi/Paiai/Assets.xcassets/MainPage/进入群.imageset/进入群.png → PaiAi/Paiai/Assets.xcassets/photoDetail/进入群.imageset/进入群.png


BIN
PaiAi/Paiai/Assets.xcassets/share/.DS_Store


BIN
PaiAi/Paiai/Assets.xcassets/share/1401793178925.imageset/1401793178925.png


+ 0 - 21
PaiAi/Paiai/Assets.xcassets/share/1401793178925.imageset/Contents.json

@@ -1,21 +0,0 @@
1
-{
2
-  "images" : [
3
-    {
4
-      "idiom" : "universal",
5
-      "filename" : "1401793178925.png",
6
-      "scale" : "1x"
7
-    },
8
-    {
9
-      "idiom" : "universal",
10
-      "scale" : "2x"
11
-    },
12
-    {
13
-      "idiom" : "universal",
14
-      "scale" : "3x"
15
-    }
16
-  ],
17
-  "info" : {
18
-    "version" : 1,
19
-    "author" : "xcode"
20
-  }
21
-}

+ 0 - 103
PaiAi/PaiaiDataKit/DataLayer/Model/DetailModel.swift

@@ -1,103 +0,0 @@
1
-//
2
-//  DetailModel.swift
3
-//  PaiAi
4
-//
5
-//  Created by zhengjianfei on 16/4/8.
6
-//  Copyright © 2016年 FFIB. All rights reserved.
7
-//
8
-
9
-import Foundation
10
-import ObjectMapper
11
-public struct thumbupUserModel {
12
-
13
-    public var avatar = ""
14
-    public var user_id = ""
15
-    public var nickname = ""
16
-
17
-}
18
-
19
-//extension thumbupUserModel: Mappable {
20
-//    mutating public func mapping(map: Map) {
21
-//        
22
-//    }
23
-//    
24
-//    public init(map: Map) {
25
-//        avatar          <-  (map["avatar"])
26
-//        user_id         <-  map["user_id"]
27
-//        nickname        <-  map["nickname"]
28
-//    }
29
-//}
30
-//
31
-//extension thumbupUserModel: GroupParsable {
32
-//    public static func parse(datas: [String: AnyObject]) -> [thumbupUserModel] {
33
-//        guard let status = datas["status"] as? Int,
34
-//            let items = datas["data"] as? [String: AnyObject],
35
-//            let thumbupsInfo = items["thumbups"] as? [[String: AnyObject]],
36
-//            status == 200 else {
37
-//            return []
38
-//        }
39
-//        return thumbupsInfo.compactMap { thumbupUserModel(map: Map(mappingType: .fromJSON, JSON: $0)) }
40
-//    }
41
-//}
42
-//
43
-//struct thumbupUserNetworkRequest: NetworkRequest {
44
-//
45
-//    typealias NetworkResponse = thumbupUserModel
46
-//
47
-//    var path: Interfaces { get { return .thumbupList } set {} }
48
-//    var parameter: [String: AnyObject]?
49
-//
50
-//}
51
-
52
-//public struct CommentModel {
53
-//
54
-//    public var avatar = ""
55
-//    public var comment = ""
56
-//    public var user_id = ""
57
-//    public var nickname = ""
58
-//    public var create_at = Date()
59
-//    public var cellHeigth: CGFloat = 0.0
60
-//
61
-//}
62
-//
63
-//extension CommentModel: GroupParsable {
64
-//    public static func parse(datas: [String: AnyObject]) -> [CommentModel] {
65
-//        guard let status = datas["status"] as? Int,
66
-//            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/kodo - Gogs: Go Git Service

3 Commits (cb207c5fcf8c907d2c9e5b9bcc3652de8dfde37d)

Auteur SHA1 Bericht Datum
  Brightcells 2f29afecbd modify version in operation 10 jaren geleden
  Brightcells af2b3f483f change download.html to be generated from download.tmpl.html 10 jaren geleden
  Brightcells 4defb80fdc gogs first init 10 jaren geleden