s-code">
 //
2 2
 //  PhotoDetailViewController.swift
3
-//  PaiAi
3
+//  Paiai_iOS
4 4
 //
5
-//  Created by zhengjianfei on 16/4/6.
5
+//  Created by FFIB on 16/4/6.
6 6
 //  Copyright © 2016年 FFIB. All rights reserved.
7 7
 //
8 8
 
@@ -97,11 +97,11 @@ extension PhotoDetailViewController {
97 97
 /// bind storyboard button action
98 98
 extension PhotoDetailViewController {
99 99
     @IBAction func share() {
100
-        let ctl = UIStoryboard.photoDetail.instantiateController(ShareViewController.self)
101
-        ctl.shareContent = "我使用拍爱分享了一张美图,你也快来试试吧"
102
-        //        ctl.shareImgUrlThumb = datas[currentPhotoIndex].photo_thumbnail_url
103
-        //        ctl.shareUrl = datas[currentPhotoIndex].photo_share_url
104
-        presentController(ctl)
100
+//        let ctl = ShareViewController UIStoryboard.photoDetail.instantiateController(ShareViewController.self)
101
+//        ctl.shareContent = "我使用拍爱分享了一张美图,你也快来试试吧"
102
+//        //        ctl.shareImgUrlThumb = datas[currentPhotoIndex].photo_thumbnail_url
103
+//        //        ctl.shareUrl = datas[currentPhotoIndex].photo_share_url
104
+//        presentController(ctl)
105 105
     }
106 106
     
107 107
     @IBAction func comment() {
@@ -380,3 +380,9 @@ extension PhotoDetailViewController: UICollectionViewDelegateFlowLayout {
380 380
 }
381 381
 
382 382
 extension PhotoDetailViewController: NavigationBackViewController {}
383
+
384
+extension PhotoDetailViewController: Storyboarded {
385
+    static func instantiate() -> PhotoDetailViewController {
386
+        return UIStoryboard.photoDetail.instantiateViewController(type: PhotoDetailViewController.self)
387
+    }
388
+}

+ 8 - 2
PaiAi/Paiai_iOS/App/PhotoDetail/PhotoPreviewViewController.swift

@@ -1,8 +1,8 @@
1 1
 //
2 2
 //  PhotoPreviewViewController.swift
3
-//  PaiAi
3
+//  Paiai_iOS
4 4
 //
5
-//  Created by zhengjianfei on 16/4/9.
5
+//  Created by FFIB on 16/4/9.
6 6
 //  Copyright © 2016年 FFIB. All rights reserved.
7 7
 //
8 8
 
@@ -122,3 +122,9 @@ extension PhotoPreviewViewController: UICollectionViewDelegateFlowLayout {
122 122
         return CGSize(width: collectionView.width, height: collectionView.height - 20)
123 123
     }
124 124
 }
125
+
126
+extension PhotoPreviewViewController: Storyboarded {
127
+    static func instantiate() -> PhotoPreviewViewController {
128
+        return UIStoryboard.photoDetail.instantiateViewController(type: PhotoPreviewViewController.self)
129
+    }
130
+}

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

@@ -1,8 +1,8 @@
1 1
 //
2 2
 //  ShareViewController.swift
3
-//  PaiAi
3
+//  Paiai_iOS
4 4
 //
5
-//  Created by zhengjianfei on 16/4/7.
5
+//  Created by FFIB on 16/4/7.
6 6
 //  Copyright © 2016年 FFIB. All rights reserved.
7 7
 //
8 8
 

+ 2 - 2
PaiAi/Paiai_iOS/Paiai_iOS.h

@@ -2,8 +2,8 @@
2 2
 //  Paiai_iOS.h
3 3
 //  Paiai_iOS
4 4
 //
5
-//  Created by ffib on 2018/12/19.
6
-//  Copyright © 2018 yb. All rights reserved.
5
+//  Created by FFIB on 2018/12/19.
6
+//  Copyright © 2018 FFIB. All rights reserved.
7 7
 //
8 8
 
9 9
 #import <UIKit/UIKit.h>

+ 41 - 0
PaiAi/Paiai_iOS/Reusable/BaseCoordinator.swift

@@ -0,0 +1,41 @@
1
+//
2
+//  BaseCoordinator.swift
3
+//  Paiai_iOS
4
+//
5
+//  Created by FFIB on 2019/4/29.
6
+//  Copyright © 2019 FFIB. All rights reserved.
7
+//
8
+
9
+import RxSwift
10
+import Foundation
11
+
12
+public class BaseCoordinator<ResultType> {
13
+    
14
+    typealias CoordinationResult = ResultType
15
+    
16
+    let disposeBag = DisposeBag()
17
+    let didCancel = PublishSubject<Void>()
18
+    
19
+    private let identifier = UUID()
20
+    private var childCoordinators = [UUID: Any]()
21
+    
22
+    private func store<T>(coordinator: BaseCoordinator<T>) {
23
+        childCoordinators[coordinator.identifier] = coordinator
24
+    }
25
+    
26
+    private func free<T>(coordinator: BaseCoordinator<T>) {
27
+        childCoordinators[coordinator.identifier] = nil
28
+    }
29
+    
30
+    func coordinate<T>(to coordinator: BaseCoordinator<T>) -> Observable<T> {
31
+        store(coordinator: coordinator)
32
+        return coordinator.start()
33
+            .do(onNext: { [weak self] _ in
34
+                self?.free(coordinator: coordinator)
35
+            })
36
+    }
37
+
38
+    func start() -> Observable<ResultType> {
39
+        fatalError("Start method should be implemented.")
40
+    }
41
+}

+ 2 - 2
PaiAi/Paiai_iOS/Reusable/Extension/UIImageView+Kingfisher.swift

@@ -1,8 +1,8 @@
1 1
 //
2 2
 //  UIImageView+Kingfisher.swift
3
-//  PaiAi
3
+//  Paiai_iOS
4 4
 //
5
-//  Created by mac on 16/7/21.
5
+//  Created by FFIB on 16/7/21.
6 6
 //  Copyright © 2016年 FFIB. All rights reserved.
7 7
 //
8 8
 

+ 11 - 0
PaiAi/Paiai_iOS/Reusable/NavigationSource.swift

@@ -0,0 +1,11 @@
1
+//
2
+//  NavigationSource.swift
3
+//  Paiai_iOS
4
+//
5
+//  Created by ffib on 2019/5/5.
6
+//  Copyright © 2019 FFIB. All rights reserved.
7
+//
8
+
9
+import Foundation
10
+
11
+enum NavigationSource {}

kodo - Gogs: Go Git Service

暫無描述

synquery.py 2.4KB

    # -*- coding: utf-8 -*-' import hashlib import json import requests from django.conf import settings class KuaiDi100: def __init__(self): self.key = settings.KUAIDI00.get('key', '') # TODO 客户授权key self.customer = settings.KUAIDI00.get('customer', '') # TODO 查询公司编号 self.url = 'https://poll.kuaidi100.com/poll/query.do' # 请求地址 def track(self, com, num, phone=None, ship_from=None, ship_to=None): """ 物流轨迹实时查询: https://api.kuaidi100.com/document/5f0ffb5ebc8da837cbd8aefc.html :param com: 查询的快递公司的编码,一律用小写字母 :param num: 查询的快递单号,单号的最大长度是32个字符 :param phone: 收件人或寄件人的手机号或固话(也可以填写后四位,如果是固话,请不要上传分机号) :param ship_from: 出发地城市,省-市-区,非必填,填了有助于提升签收状态的判断的准确率,请尽量提供 :param ship_to: 目的地城市,省-市-区,非必填,填了有助于提升签收状态的判断的准确率,且到达目的地后会加大监控频率,请尽量提供 :return: requests.Response.text """ param = { 'com': com, 'num': num, 'phone': phone, 'from': ship_from, 'to': ship_to, 'resultv2': '1', # 添加此字段表示开通行政区域解析功能。0:关闭(默认),1:开通行政区域解析功能,2:开通行政解析功能并且返回出发、目的及当前城市信息 'show': '0', # 返回数据格式。0:json(默认),1:xml,2:html,3:text 'order': 'desc' # 返回结果排序方式。desc:降序(默认),asc:升序 } param_str = json.dumps(param) # 转json字符串 # 签名加密, 用于验证身份, 按param + key + customer 的顺序进行MD5加密(注意加密后字符串要转大写), 不需要“+”号 temp_sign = param_str + self.key + self.customer md = hashlib.md5() md.update(temp_sign.encode()) sign = md.hexdigest().upper() request_data = {'customer': self.customer, 'param': param_str, 'sign': sign} return requests.post(self.url, request_data).text # 发送请求 # result = KuaiDi100().track('yuantong', 'YT9693083639795', '', '广东省江门市', '广东省深圳市') # print(result)
kodo - Gogs: Go Git Service

Geen omschrijving