e>+ </button> 665
+                                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="微博" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ycS-qw-cbn" userLabel="微博">
666
+                                                <rect key="frame" x="12.5" y="54" width="29" height="17"/>
667
+                                                <fontDescription key="fontDescription" type="system" pointSize="14"/>
668
+                                                <color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
669
+                                                <nil key="highlightedColor"/>
670
+                                            </label>
671
+                                        </subviews>
603 672
                                         <constraints>
604
-                                            <constraint firstAttribute="height" constant="54" id="3gE-we-sHc"/>
605
-                                            <constraint firstAttribute="width" constant="54" id="j1v-So-HZy"/>
673
+                                            <constraint firstAttribute="width" constant="54" id="JRS-hW-4fd"/>
606 674
                                         </constraints>
607
-                                        <state key="normal" image="分享-QQ"/>
608
-                                        <connections>
609
-                                            <action selector="shareToQQ" destination="KnW-jg-4H5" eventType="touchUpInside" id="AUu-PL-Vdh"/>
610
-                                        </connections>
611
-                                    </button>
612
-                                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="朋友圈" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="nO4-Ve-OiO">
613
-                                        <rect key="frame" x="36" y="60" width="43" height="17"/>
614
-                                        <fontDescription key="fontDescription" type="system" pointSize="14"/>
615
-                                        <color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
616
-                                        <nil key="highlightedColor"/>
617
-                                    </label>
618
-                                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="微信" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="KS7-62-qGm">
619
-                                        <rect key="frame" x="129.5" y="60" width="29" height="17"/>
620
-                                        <fontDescription key="fontDescription" type="system" pointSize="14"/>
621
-                                        <color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
622
-                                        <nil key="highlightedColor"/>
623
-                                    </label>
624
-                                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="QQ" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="HHz-QK-Fr2">
625
-                                        <rect key="frame" x="218" y="60" width="22" height="17"/>
626
-                                        <fontDescription key="fontDescription" type="system" pointSize="14"/>
627
-                                        <color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
628
-                                        <nil key="highlightedColor"/>
629
-                                    </label>
630
-                                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="微博" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="xa5-ke-ek6">
631
-                                        <rect key="frame" x="298" y="60" width="29" height="17"/>
632
-                                        <fontDescription key="fontDescription" type="system" pointSize="14"/>
633
-                                        <color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
634
-                                        <nil key="highlightedColor"/>
635
-                                    </label>
675
+                                    </stackView>
636 676
                                 </subviews>
637 677
                                 <constraints>
638
-                                    <constraint firstItem="HHz-QK-Fr2" firstAttribute="centerX" secondItem="yqF-ZW-9kd" secondAttribute="centerX" id="7l8-1r-eQh"/>
639
-                                    <constraint firstAttribute="bottom" secondItem="HHz-QK-Fr2" secondAttribute="bottom" id="FSC-Ek-9t8"/>
640
-                                    <constraint firstItem="yqF-ZW-9kd" firstAttribute="centerY" secondItem="qpb-ag-Zb8" secondAttribute="centerY" id="KPI-J0-KS4"/>
641
-                                    <constraint firstItem="xa5-ke-ek6" firstAttribute="centerX" secondItem="x2h-L3-H9s" secondAttribute="centerX" id="M27-U4-Q3M"/>
642
-                                    <constraint firstAttribute="height" constant="77" id="N2d-i8-gd3"/>
643
-                                    <constraint firstItem="yqF-ZW-9kd" firstAttribute="centerX" secondItem="xUW-ue-yp5" secondAttribute="centerX" multiplier="220:180" id="NbH-9w-UIS"/>
644
-                                    <constraint firstAttribute="bottom" secondItem="KS7-62-qGm" secondAttribute="bottom" id="PSC-uY-GlG"/>
645
-                                    <constraint firstItem="x2h-L3-H9s" firstAttribute="centerY" secondItem="qpb-ag-Zb8" secondAttribute="centerY" id="X1L-d4-RO3"/>
646
-                                    <constraint firstItem="qpb-ag-Zb8" firstAttribute="top" secondItem="xUW-ue-yp5" secondAttribute="top" id="Xhp-xq-TAQ"/>
647
-                                    <constraint firstItem="6ux-OL-8wy" firstAttribute="centerX" secondItem="xUW-ue-yp5" secondAttribute="centerX" multiplier="138:180" id="b7V-Ap-t1L"/>
648
-                                    <constraint firstAttribute="bottom" secondItem="nO4-Ve-OiO" secondAttribute="bottom" id="dJP-qK-Tlu"/>
649
-                                    <constraint firstItem="KS7-62-qGm" firstAttribute="centerX" secondItem="6ux-OL-8wy" secondAttribute="centerX" id="eHD-Mp-ViT"/>
650
-                                    <constraint firstItem="nO4-Ve-OiO" firstAttribute="centerX" secondItem="qpb-ag-Zb8" secondAttribute="centerX" id="gw3-SW-dNJ"/>
651
-                                    <constraint firstItem="x2h-L3-H9s" firstAttribute="centerX" secondItem="xUW-ue-yp5" secondAttribute="centerX" multiplier="300:180" id="rbh-jj-rpj"/>
652
-                                    <constraint firstItem="qpb-ag-Zb8" firstAttribute="centerX" secondItem="xUW-ue-yp5" secondAttribute="centerX" multiplier="55:180" id="sWn-3o-xfe"/>
653
-                                    <constraint firstAttribute="bottom" secondItem="xa5-ke-ek6" secondAttribute="bottom" id="uCt-id-dos"/>
654
-                                    <constraint firstItem="6ux-OL-8wy" firstAttribute="centerY" secondItem="qpb-ag-Zb8" secondAttribute="centerY" id="xcU-1M-cr8"/>
678
+                                    <constraint firstItem="KU1-aO-nLf" firstAttribute="top" secondItem="edT-EA-xhZ" secondAttribute="top" id="2U4-8e-O3g"/>
679
+                                    <constraint firstItem="ZLk-gf-Jzh" firstAttribute="centerX" secondItem="edT-EA-xhZ" secondAttribute="centerX" multiplier="300:180" id="3Kp-5r-ImR"/>
680
+                                    <constraint firstItem="itC-HJ-ZaT" firstAttribute="centerX" secondItem="edT-EA-xhZ" secondAttribute="centerX" multiplier="55:180" id="7D5-Uy-aAS"/>
681
+                                    <constraint firstItem="W6V-MR-s2s" firstAttribute="top" secondItem="edT-EA-xhZ" secondAttribute="top" id="B2o-vs-NbY"/>
682
+                                    <constraint firstItem="KU1-aO-nLf" firstAttribute="centerX" secondItem="edT-EA-xhZ" secondAttribute="centerX" multiplier="220:180" id="HbQ-Ef-QBp"/>
683
+                                    <constraint firstItem="ZLk-gf-Jzh" firstAttribute="top" secondItem="edT-EA-xhZ" secondAttribute="top" id="NSS-yv-eAq"/>
684
+                                    <constraint firstItem="itC-HJ-ZaT" firstAttribute="top" secondItem="edT-EA-xhZ" secondAttribute="top" id="fRA-ze-0tQ"/>
685
+                                    <constraint firstAttribute="height" constant="77" id="q4w-sh-fN4"/>
686
+                                    <constraint firstItem="W6V-MR-s2s" firstAttribute="centerX" secondItem="edT-EA-xhZ" secondAttribute="centerX" multiplier="138:180" id="tOg-mT-rNp"/>
655 687
                                 </constraints>
656 688
                             </view>
657 689
                         </subviews>
658 690
                         <gestureRecognizers/>
659 691
                         <constraints>
660
-                            <constraint firstItem="xUW-ue-yp5" firstAttribute="leading" secondItem="C6P-7J-fWs" secondAttribute="leading" id="Afy-jR-Jec"/>
661
-                            <constraint firstItem="C6P-7J-fWs" firstAttribute="bottom" secondItem="xUW-ue-yp5" secondAttribute="bottom" constant="127" id="hco-RD-Kle"/>
662
-                            <constraint firstItem="C6P-7J-fWs" firstAttribute="trailing" secondItem="xUW-ue-yp5" secondAttribute="trailing" id="lAd-Wf-RcE"/>
692
+                            <constraint firstItem="edT-EA-xhZ" firstAttribute="trailing" secondItem="C6P-7J-fWs" secondAttribute="trailing" id="6h4-ug-H2a"/>
693
+                            <constraint firstItem="edT-EA-xhZ" firstAttribute="leading" secondItem="C6P-7J-fWs" secondAttribute="leading" id="RS3-mc-Bi6"/>
694
+                            <constraint firstItem="C6P-7J-fWs" firstAttribute="bottom" secondItem="edT-EA-xhZ" secondAttribute="bottom" constant="127" id="iF3-AG-M9e"/>
663 695
                         </constraints>
664 696
                         <viewLayoutGuide key="safeArea" id="C6P-7J-fWs"/>
665 697
                     </view>
666 698
                     <connections>
667
-                        <outlet property="shareView" destination="xUW-ue-yp5" id="I5g-Zk-9uW"/>
699
+                        <outlet property="shareView" destination="edT-EA-xhZ" id="DNu-Ue-V2y"/>
668 700
                     </connections>
669 701
                 </viewController>
670 702
                 <placeholder placeholderIdentifier="IBFirstResponder" id="9LO-35-FRH" userLabel="First Responder" sceneMemberID="firstResponder"/>
671 703
             </objects>
672
-            <point key="canvasLocation" x="-513" y="1287"/>
704
+            <point key="canvasLocation" x="-73" y="469"/>
673 705
         </scene>
674 706
         <!--PhotoPreviewViewController-->
675 707
         <scene sceneID="yhk-2u-fiu">
@@ -779,20 +811,21 @@
779 811
     <resources>
780 812
         <image name="BTN-comment" width="138" height="138"/>
781 813
         <image name="BTN-download" width="96" height="96"/>
814
+        <image name="BTN-enterGroup" width="114" height="60"/>
782 815
         <image name="BTN-rotate" width="96" height="96"/>
816
+        <image name="BTN-send" width="608" height="304"/>
783 817
         <image name="BTN-share" width="138" height="138"/>
784 818
         <image name="BTN-thumbup" width="192" height="192"/>
785 819
         <image name="defaultAvatar" width="240" height="240"/>
786 820
         <image name="icon-comment" width="36" height="36"/>
821
+        <image name="icon-purchase-watermark" width="96" height="96"/>
787 822
         <image name="icon-thumbup" width="36" height="36"/>
788 823
         <image name="icon-time" width="36" height="36"/>
789 824
         <image name="list-arrow" width="24" height="36"/>
790 825
         <image name="navigation-back" width="36" height="72"/>
791
-        <image name="分享-QQ" width="162" height="162"/>
792
-        <image name="分享-微信好友" width="162" height="162"/>
793
-        <image name="分享-微博" width="162" height="162"/>
794
-        <image name="分享-朋友圈" width="162" height="162"/>
795
-        <image name="购买-去水印" width="96" height="96"/>
796
-        <image name="进入群" width="114" height="60"/>
826
+        <image name="share-QQ" width="162" height="162"/>
827
+        <image name="share-weibo" width="162" height="162"/>
828
+        <image name="share-wx" width="162" height="162"/>
829
+        <image name="share-wxCircle" width="162" height="162"/>
797 830
     </resources>
798 831
 </document>

+ 2 - 2
PaiAi/Paiai_iOS/App/PhotoDetail/PhotoDetailCoordinator.swift

@@ -14,7 +14,7 @@ final class PhotoDetailCoordinator: Coordinator {
14 14
     let photoDetailViewController: PhotoDetailViewController
15 15
     let shareListViewModel: PhotoDetailListViewModel
16 16
     
17
-    fileprivate var coordinators = [String: Coordinator]()
17
+    fileprivate var coordinators = [CoordinatorKey: Coordinator]()
18 18
     
19 19
     init(_ photoDetailVC: PhotoDetailViewController,
20 20
          nav: UINavigationController,
@@ -42,7 +42,7 @@ extension PhotoDetailCoordinator: PhotoDetailViewModelDelegate {
42 42
         vc.viewModel = GroupViewModel(groupItem: item)
43 43
         let coordinator = GroupCoordinator(vc,
44 44
                                            navigationController: navigationController)
45
-        coordinators["group"] = coordinator
45
+        coordinators[.group] = coordinator
46 46
         
47 47
         navigationController.pushViewController(vc)
48 48
     }

+ 13 - 12
PaiAi/Paiai_iOS/App/PhotoDetail/PhotoDetailViewController.swift

@@ -44,6 +44,7 @@ final class PhotoDetailViewController: UIViewController {
44 44
     @IBOutlet weak var waterMarkImage: UIImageView!
45 45
     @IBOutlet weak var waterMarkLabel: UILabel!
46 46
     
47
+    @IBOutlet var keyboardGestureRcognizer: UITapGestureRecognizer!
47 48
     @IBOutlet weak var thumbupViewHeightConstraint: NSLayoutConstraint!
48 49
     @IBOutlet weak var commentEditYConstraint: NSLayoutConstraint!
49 50
     
@@ -56,6 +57,7 @@ final class PhotoDetailViewController: UIViewController {
56 57
     // MARK: view function
57 58
     override func viewDidLoad() {
58 59
         super.viewDidLoad()
60
+        title = "详情"
59 61
         binding()
60 62
         setup()
61 63
     }
@@ -80,19 +82,13 @@ final class PhotoDetailViewController: UIViewController {
80 82
     }
81 83
 }
82 84
 
83
-//MARK textField delegate
84
-extension PhotoDetailViewController: UIGestureRecognizerDelegate {
85
-    // MARK: textField
86
-
87
-    func gestureRecognizer(_ gestureRecognizer: UIGestureRecognizer, shouldReceive touch: UITouch) -> Bool {
88
-        return commentTextField.isFirstResponder
89
-    }
90
-    
91
-}
92
-
93
-
94 85
 /// bind storyboard gesture action
95 86
 extension PhotoDetailViewController {
87
+    
88
+    @IBAction func recyclingKeyboard(_ sender: UITapGestureRecognizer) {
89
+        commentTextField.resignFirstResponder()
90
+    }
91
+    
96 92
     @IBAction func purchase(_ sender: UITapGestureRecognizer) {
97 93
         
98 94
     }
@@ -105,7 +101,7 @@ extension PhotoDetailViewController {
105 101
 /// bind storyboard button action
106 102
 extension PhotoDetailViewController {
107 103
     @IBAction func share() {
108
-        let ctl = UIStoryboard.photoDetail.instantiateController(ShareController.self)
104
+        let ctl = UIStoryboard.photoDetail.instantiateController(ShareViewController.self)
109 105
         ctl.shareContent = "我使用拍爱分享了一张美图,你也快来试试吧"
110 106
         //        ctl.shareImgUrlThumb = datas[currentPhotoIndex].photo_thumbnail_url
111 107
         //        ctl.shareUrl = datas[currentPhotoIndex].photo_share_url
@@ -283,6 +279,9 @@ extension PhotoDetailViewController {
283 279
             .notification(UIResponder.keyboardWillShowNotification)
284 280
             .takeUntil(self.rx.deallocated)
285 281
             .subscribe { [unowned self] notification in
282
+                
283
+                self.keyboardGestureRcognizer.isEnabled = true
284
+                
286 285
                 guard let userInfo = notification.element?.userInfo,
287 286
                     let keyboardFrame = userInfo[UIResponder.keyboardFrameEndUserInfoKey] as? CGRect,
288 287
                     let timeInterval = userInfo[UIResponder.keyboardAnimationDurationUserInfoKey] as? TimeInterval,
@@ -301,6 +300,8 @@ extension PhotoDetailViewController {
301 300
             .notification(UIResponder.keyboardWillHideNotification)
302 301
             .takeUntil(self.rx.deallocated)
303 302
             .subscribe { [unowned self] notification in
303
+                self.keyboardGestureRcognizer.isEnabled = false
304
+                
304 305
                 guard let userInfo = notification.element?.userInfo,
305 306
                     let timeInterval = userInfo[UIResponder.keyboardAnimationDurationUserInfoKey] as? TimeInterval,
306 307
                     let curve = userInfo[UIResponder.keyboardAnimationCurveUserInfoKey] as? Int

+ 12 - 12
PaiAi/Paiai_iOS/App/PhotoDetail/ShareController.swift

@@ -1,5 +1,5 @@
1 1
 //
2
-//  ShareController.swift
2
+//  ShareViewController.swift
3 3
 //  PaiAi
4 4
 //
5 5
 //  Created by zhengjianfei on 16/4/7.
@@ -10,24 +10,24 @@ import UIKit
10 10
 import PaiaiDataKit
11 11
 import PaiaiUIKit
12 12
 
13
-final class ShareController: UIViewController {
13
+final class ShareViewController: AlertViewController {
14 14
 
15
-    // MARK: Storyboard property
16 15
     @IBOutlet weak var shareView: UIView!
17
-
16
+    
17
+    override var animationView: UIView? {
18
+        return shareView
19
+    }
20
+    
21
+    override var style: AlertViewController.Style {
22
+        return .actionSheet
23
+    }
24
+    
18 25
    // MARK: parameter property
19 26
     var shareContent: String = ""
20 27
     var shareImg: UIImage?
21 28
     lazy var shareImgUrlThumb: String = ""
22 29
     lazy var shareUrl: String = ""
23
-//    let transitioning = FFTransitioning(alertStyle: .actionSheet)
24
-
25
-    required init?(coder aDecoder: NSCoder) {
26
-        super.init(coder: aDecoder)
27
-//        transitioningDelegate = transitioning
28
-    }
29
-
30
-    // MARK: view function
30
+    
31 31
     override func viewDidLoad() {
32 32
         super.viewDidLoad()
33 33
         let imageView = UIImageView()

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

@@ -1,29 +0,0 @@
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
-
15
-
16
-
17
-extension ShareView {
18
-    
19
-    func activateConstraints() {
20
-        
21
-    }
22
-    
23
-    func activateConstraintsShareView() {
24
-        guard let superView = superview else { return }
25
-        
26
-        self.translatesAutoresizingMaskIntoConstraints = false
27
-        
28
-    }
29
-}

kodo - Gogs: Go Git Service

Keine Beschreibung

price_utils.py 223B

    # -*- coding: utf-8 -*- def get_group_photo_price(group_photo, photo_type): if photo_type == 'origin': return group_photo.origin elif photo_type == 'nomark': return group_photo.nomark return 0