Skip to content

Commit

Permalink
change source
Browse files Browse the repository at this point in the history
  • Loading branch information
caonongyun authored and caonongyun committed Mar 16, 2017
1 parent bc33226 commit c0179ea
Show file tree
Hide file tree
Showing 17 changed files with 514 additions and 70 deletions.
29 changes: 25 additions & 4 deletions TXTReader/TXTReaderViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ import Alamofire
class TXTReaderViewController: UIViewController {

var CategoryUrl = "\(baseUrl)/atoc/57df797cb061df9e19b8b030?view=chapters"
//这个id是zhuishu的id
var bookId:String = ""
//这个是不同来源的id
var id:String = "" {
didSet{
CategoryUrl = "\(baseUrl)/atoc/\(id)?view=chapters"
Expand All @@ -29,17 +32,19 @@ class TXTReaderViewController: UIViewController {
var pageViewController:PageViewController?
var window:UIWindow?
var model:NSDictionary?
var resources:NSArray = [ResourceModel]() as NSArray {
var resources:[ResourceModel] = [ResourceModel]() {
didSet{
if resources.count > 1 {
selectedResource = resources[1] as? ResourceModel
selectedResource = resources[1]
}else if resources.count > 0{
selectedResource = resources[0] as? ResourceModel
selectedResource = resources[0]
}
}
}
var selectedResource:ResourceModel?

var selectedIndex:Int = 1

override func viewDidLoad() {
super.viewDidLoad()
view.backgroundColor = UIColor.white
Expand Down Expand Up @@ -74,7 +79,7 @@ class TXTReaderViewController: UIViewController {
}

//网络请求所有的章节信息
private func requestAllChapters(){
func requestAllChapters(){
Alamofire.request(CategoryUrl).responseJSON { (response) in
if let json = response.result.value as? NSDictionary {
print("JSON:\(json)")
Expand Down Expand Up @@ -312,6 +317,22 @@ extension TXTReaderViewController:UIPageViewControllerDataSource,UIPageViewContr
}
}

func changeSourceClicked() {
let sourceVC = ChangeSourceViewController()
sourceVC.id = "\(self.bookId)"
sourceVC.sources = self.resources
sourceVC.selectedIndex = self.selectedIndex
sourceVC.selectAction = { (index:Int) in
self.selectedIndex = index
self.id = self.resources[index]._id
self.requestAllChapters()
}
let nav = UINavigationController(rootViewController: sourceVC)
present(nav, animated: true) {
self.toolBar.hideWithAnimations(animation: false)
}
}

func toolBarDidShow(){
isToolBarHidden = false
UIView.animate(withDuration: 0.35, animations: {
Expand Down
12 changes: 12 additions & 0 deletions TXTReader/ToolBar.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import UIKit
protocol ToolBarDelegate{
func backButtonDidClicked()
func catagoryClicked()
func changeSourceClicked()
func toolBarDidShow()
func toolBarDidHidden()
}
Expand Down Expand Up @@ -43,6 +44,13 @@ class ToolBar: UIView {
backBtn.frame = CGRect(x:10, y:27,width: 30,height: 30)
topBar?.addSubview(backBtn)

let changeSourceBtn = UIButton(type: .custom)
changeSourceBtn.setTitle("换源", for: .normal)
changeSourceBtn.setTitleColor(UIColor.white, for: .normal)
changeSourceBtn.addTarget(self, action: #selector(changeSourceAction(btn:)), for: .touchUpInside)
changeSourceBtn.frame = CGRect(x:self.bounds.width - 65, y: 27,width: 50,height: 30)
topBar?.addSubview(changeSourceBtn)

let btn = UIButton(type: .custom)
btn.setImage(UIImage(named: "catelog"), for: .normal)
btn.frame = CGRect(x:self.bounds.size.width/2 - 15,y: 8,width: 30,height: 30)
Expand Down Expand Up @@ -83,6 +91,10 @@ class ToolBar: UIView {
toolBarDelegate?.catagoryClicked()
}

@objc private func changeSourceAction(btn:UIButton){
toolBarDelegate?.changeSourceClicked()
}

required init?(coder aDecoder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
Expand Down
121 changes: 114 additions & 7 deletions zhuishushenqi.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,18 @@
B2B40B531DA3EE27001F972B /* BookDetailAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = B2B40B521DA3EE27001F972B /* BookDetailAPI.swift */; };
B2B58B411E7A2A320054FE84 /* UIImageView+zhuishu.swift in Sources */ = {isa = PBXBuildFile; fileRef = B2B58B401E7A2A320054FE84 /* UIImageView+zhuishu.swift */; };
B2B58B4B1E7A2D8E0054FE84 /* UILabel+zhuishu.swift in Sources */ = {isa = PBXBuildFile; fileRef = B2B58B4A1E7A2D8E0054FE84 /* UILabel+zhuishu.swift */; };
B2B58B4D1E7A768B0054FE84 /* RootNavigationView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B2B58B4C1E7A768B0054FE84 /* RootNavigationView.swift */; };
B2B58B4E1E7A79340054FE84 /* QSKingfisher.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B22B83C01E701D58009BD24C /* QSKingfisher.framework */; };
B2B58B4F1E7A79340054FE84 /* QSKingfisher.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = B22B83C01E701D58009BD24C /* QSKingfisher.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
B2B58B531E7A79380054FE84 /* QSNetwork.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B22B83B71E701D50009BD24C /* QSNetwork.framework */; };
B2B58B541E7A79380054FE84 /* QSNetwork.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = B22B83B71E701D50009BD24C /* QSNetwork.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
B2B58B571E7A793D0054FE84 /* ObjectMapper.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B22B83AE1E701D47009BD24C /* ObjectMapper.framework */; };
B2B58B581E7A793D0054FE84 /* ObjectMapper.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = B22B83AE1E701D47009BD24C /* ObjectMapper.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
B2B58B5B1E7A79410054FE84 /* Alamofire.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B22B83A51E701D3E009BD24C /* Alamofire.framework */; };
B2B58B5C1E7A79410054FE84 /* Alamofire.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = B22B83A51E701D3E009BD24C /* Alamofire.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
B2B58B601E7A86AF0054FE84 /* ChangeSourceViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B2B58B5F1E7A86AF0054FE84 /* ChangeSourceViewController.swift */; };
B2B58B631E7A87040054FE84 /* ChangeSourceCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = B2B58B611E7A87040054FE84 /* ChangeSourceCell.swift */; };
B2B58B641E7A87040054FE84 /* ChangeSourceCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = B2B58B621E7A87040054FE84 /* ChangeSourceCell.xib */; };
B2BB5B9A1D8BDF8E00379217 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = B2BB5B991D8BDF8E00379217 /* AppDelegate.swift */; };
B2BB5B9C1D8BDF8E00379217 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B2BB5B9B1D8BDF8E00379217 /* ViewController.swift */; };
B2BB5B9F1D8BDF8E00379217 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = B2BB5B9D1D8BDF8E00379217 /* Main.storyboard */; };
Expand Down Expand Up @@ -286,6 +298,34 @@
remoteGlobalIDString = B21AFCCB1E6C49DF009B2858;
remoteInfo = QSKingfisherTests;
};
B2B58B501E7A79340054FE84 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = B22B83BA1E701D57009BD24C /* QSKingfisher.xcodeproj */;
proxyType = 1;
remoteGlobalIDString = B21AFCC11E6C49DF009B2858;
remoteInfo = QSKingfisher;
};
B2B58B551E7A79380054FE84 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = B22B83B11E701D4F009BD24C /* QSNetwork.xcodeproj */;
proxyType = 1;
remoteGlobalIDString = B28822A31E11092400144E44;
remoteInfo = QSNetwork;
};
B2B58B591E7A793D0054FE84 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = B22B83A81E701D46009BD24C /* ObjectMapper.xcodeproj */;
proxyType = 1;
remoteGlobalIDString = B2AB5AF41DE6D079009A178E;
remoteInfo = ObjectMapper;
};
B2B58B5D1E7A79410054FE84 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = B22B839F1E701D3D009BD24C /* Alamofire.xcodeproj */;
proxyType = 1;
remoteGlobalIDString = B2AB5A991DE6BFA1009A178E;
remoteInfo = Alamofire;
};
B2BB5BAB1D8BDF8E00379217 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = B2BB5B8E1D8BDF8E00379217 /* Project object */;
Expand All @@ -302,6 +342,23 @@
};
/* End PBXContainerItemProxy section */

/* Begin PBXCopyFilesBuildPhase section */
B2B58B521E7A79340054FE84 /* Embed Frameworks */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "";
dstSubfolderSpec = 10;
files = (
B2B58B581E7A793D0054FE84 /* ObjectMapper.framework in Embed Frameworks */,
B2B58B4F1E7A79340054FE84 /* QSKingfisher.framework in Embed Frameworks */,
B2B58B541E7A79380054FE84 /* QSNetwork.framework in Embed Frameworks */,
B2B58B5C1E7A79410054FE84 /* Alamofire.framework in Embed Frameworks */,
);
name = "Embed Frameworks";
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXCopyFilesBuildPhase section */

/* Begin PBXFileReference section */
B2029A831DA0C10C00E5D700 /* MKMapView_MyMapView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MKMapView_MyMapView.h; path = ../MKMapView_MyMapView.h; sourceTree = "<group>"; };
B21AFC7F1E6C318E009B2858 /* RankingViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RankingViewCell.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -578,6 +635,10 @@
B2B40B521DA3EE27001F972B /* BookDetailAPI.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BookDetailAPI.swift; sourceTree = "<group>"; };
B2B58B401E7A2A320054FE84 /* UIImageView+zhuishu.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIImageView+zhuishu.swift"; sourceTree = "<group>"; };
B2B58B4A1E7A2D8E0054FE84 /* UILabel+zhuishu.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UILabel+zhuishu.swift"; sourceTree = "<group>"; };
B2B58B4C1E7A768B0054FE84 /* RootNavigationView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RootNavigationView.swift; sourceTree = "<group>"; };
B2B58B5F1E7A86AF0054FE84 /* ChangeSourceViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ChangeSourceViewController.swift; sourceTree = "<group>"; };
B2B58B611E7A87040054FE84 /* ChangeSourceCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ChangeSourceCell.swift; sourceTree = "<group>"; };
B2B58B621E7A87040054FE84 /* ChangeSourceCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = ChangeSourceCell.xib; sourceTree = "<group>"; };
B2BB5B961D8BDF8E00379217 /* zhuishushenqi.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = zhuishushenqi.app; sourceTree = BUILT_PRODUCTS_DIR; };
B2BB5B991D8BDF8E00379217 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
B2BB5B9B1D8BDF8E00379217 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -633,9 +694,13 @@
buildActionMask = 2147483647;
files = (
B22B83C31E701D78009BD24C /* Alamofire.framework in Frameworks */,
B2B58B4E1E7A79340054FE84 /* QSKingfisher.framework in Frameworks */,
B22B83C41E701D78009BD24C /* ObjectMapper.framework in Frameworks */,
B22B83C51E701D78009BD24C /* QSKingfisher.framework in Frameworks */,
B22B83C61E701D78009BD24C /* QSNetwork.framework in Frameworks */,
B2B58B531E7A79380054FE84 /* QSNetwork.framework in Frameworks */,
B2B58B571E7A793D0054FE84 /* ObjectMapper.framework in Frameworks */,
B2B58B5B1E7A79410054FE84 /* Alamofire.framework in Frameworks */,
B251228D1DB3291A0040CAD3 /* CFNetwork.framework in Frameworks */,
B22182CF1DA40594002458D2 /* libz.tbd in Frameworks */,
B22182CD1DA4058E002458D2 /* libsqlite3.tbd in Frameworks */,
Expand Down Expand Up @@ -996,6 +1061,7 @@
B23119441DBB674E008A6D92 /* DynamicViewController.swift */,
B2801B581E75B33400766E3D /* FilterThemeViewController.swift */,
B238C2FA1E76937B00332BB9 /* BookCommentViewController.swift */,
B2B58B5F1E7A86AF0054FE84 /* ChangeSourceViewController.swift */,
);
path = Controllers;
sourceTree = "<group>";
Expand Down Expand Up @@ -1073,6 +1139,9 @@
B238C3031E7697FE00332BB9 /* BookCommentViewCell.xib */,
B2CFCC321E77D93200CCEF04 /* UserfulCell.swift */,
B2CFCC331E77D93200CCEF04 /* UserfulCell.xib */,
B2B58B4C1E7A768B0054FE84 /* RootNavigationView.swift */,
B2B58B611E7A87040054FE84 /* ChangeSourceCell.swift */,
B2B58B621E7A87040054FE84 /* ChangeSourceCell.xib */,
);
path = Views;
sourceTree = "<group>";
Expand Down Expand Up @@ -1271,10 +1340,15 @@
B2BB5B941D8BDF8E00379217 /* Resources */,
1031C96B74D74AC62BE49F90 /* Embed Pods Frameworks */,
9319AC60D3EECCF478793B99 /* Copy Pods Resources */,
B2B58B521E7A79340054FE84 /* Embed Frameworks */,
);
buildRules = (
);
dependencies = (
B2B58B511E7A79340054FE84 /* PBXTargetDependency */,
B2B58B561E7A79380054FE84 /* PBXTargetDependency */,
B2B58B5A1E7A793D0054FE84 /* PBXTargetDependency */,
B2B58B5E1E7A79410054FE84 /* PBXTargetDependency */,
);
name = zhuishushenqi;
productName = zhuishushenqi;
Expand Down Expand Up @@ -1329,8 +1403,9 @@
TargetAttributes = {
B2BB5B951D8BDF8E00379217 = {
CreatedOnToolsVersion = 7.3.1;
DevelopmentTeam = 8K684WSCKB;
DevelopmentTeam = ZYDXKQKHVY;
LastSwiftMigration = 0810;
ProvisioningStyle = Manual;
};
B2BB5BA91D8BDF8E00379217 = {
CreatedOnToolsVersion = 7.3.1;
Expand Down Expand Up @@ -1461,6 +1536,7 @@
B2A1197D1E71ADBF00E71AB1 /* TopicDetailCell.xib in Resources */,
B2B297C31E6D5E600044E539 /* ChapterInfo.json in Resources */,
B2BB5BA41D8BDF8E00379217 /* LaunchScreen.storyboard in Resources */,
B2B58B641E7A87040054FE84 /* ChangeSourceCell.xib in Resources */,
B2A119891E72585F00E71AB1 /* CategoryCell.xib in Resources */,
B2BB5BA11D8BDF8E00379217 /* Assets.xcassets in Resources */,
B2BB5B9F1D8BDF8E00379217 /* Main.storyboard in Resources */,
Expand Down Expand Up @@ -1540,6 +1616,7 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
B2B58B631E7A87040054FE84 /* ChangeSourceCell.swift in Sources */,
B23119451DBB674E008A6D92 /* DynamicViewController.swift in Sources */,
B2B40B441DA2C58B001F972B /* XYCBaseModel.m in Sources */,
B22182A71DA40326002458D2 /* YYTextRunDelegate.m in Sources */,
Expand Down Expand Up @@ -1598,6 +1675,7 @@
B2B40B461DA2D750001F972B /* Book.swift in Sources */,
B22182691DA40326002458D2 /* NSDate+YYAdd.m in Sources */,
B2A119631E718A6300E71AB1 /* QSHotComment.swift in Sources */,
B2B58B601E7A86AF0054FE84 /* ChangeSourceViewController.swift in Sources */,
B22182AC1DA40326002458D2 /* YYDispatchQueuePool.m in Sources */,
B22182A11DA40326002458D2 /* NSParagraphStyle+YYText.m in Sources */,
B2BB5DB21D8C0DBA00379217 /* RightViewController.swift in Sources */,
Expand All @@ -1624,6 +1702,7 @@
B22182801DA40326002458D2 /* UIScrollView+YYAdd.m in Sources */,
B2BB5DB61D8CF2FA00379217 /* SegMenu.swift in Sources */,
B263507D1E6E9F3200D08DAC /* QSRankModel.swift in Sources */,
B2B58B4D1E7A768B0054FE84 /* RootNavigationView.swift in Sources */,
B22182871DA40326002458D2 /* YYMemoryCache.m in Sources */,
B221828B1DA40326002458D2 /* UIButton+YYWebImage.m in Sources */,
B2CD138D1E730309000D97D9 /* CategoryDetailViewController.swift in Sources */,
Expand Down Expand Up @@ -1744,6 +1823,26 @@
/* End PBXSourcesBuildPhase section */

/* Begin PBXTargetDependency section */
B2B58B511E7A79340054FE84 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
name = QSKingfisher;
targetProxy = B2B58B501E7A79340054FE84 /* PBXContainerItemProxy */;
};
B2B58B561E7A79380054FE84 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
name = QSNetwork;
targetProxy = B2B58B551E7A79380054FE84 /* PBXContainerItemProxy */;
};
B2B58B5A1E7A793D0054FE84 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
name = ObjectMapper;
targetProxy = B2B58B591E7A793D0054FE84 /* PBXContainerItemProxy */;
};
B2B58B5E1E7A79410054FE84 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
name = Alamofire;
targetProxy = B2B58B5D1E7A79410054FE84 /* PBXContainerItemProxy */;
};
B2BB5BAC1D8BDF8E00379217 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = B2BB5B951D8BDF8E00379217 /* zhuishushenqi */;
Expand Down Expand Up @@ -1864,9 +1963,12 @@
B2BB5BBF1D8BDF8E00379217 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
CODE_SIGN_IDENTITY = "iPhone Distribution: Guangzhou Rural Commercial Bank Co., Ltd";
CODE_SIGN_IDENTITY = "iPhone Developer: Guo Shaoqing (CYXM98D895)";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer: Guo Shaoqing (CYXM98D895)";
DEVELOPMENT_TEAM = ZYDXKQKHVY;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/YYKit/Vendor",
Expand All @@ -1884,9 +1986,10 @@
"-ObjC",
);
OTHER_SWIFT_FLAGS = "$(inherited) \"-D\" \"COCOAPODS\" \"-D\" \"DEBUG\"";
PRODUCT_BUNDLE_IDENTIFIER = com.grcbank.zhuishushenqi;
PRODUCT_BUNDLE_IDENTIFIER = com.cibdev.zhuishushenqi;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "d0c1f583-be4e-4971-ac81-48500f6b6d8b";
PROVISIONING_PROFILE = "35b8e6e5-6fbb-41f1-8975-cf44d63d8b27";
PROVISIONING_PROFILE_SPECIFIER = cibemobile_develop;
SWIFT_OBJC_BRIDGING_HEADER = "$(SRCROOT)/zhuishushenqi/zhuishushenqi-Bridge-Header.h";
SWIFT_VERSION = 3.0;
};
Expand All @@ -1895,9 +1998,12 @@
B2BB5BC01D8BDF8E00379217 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
CODE_SIGN_IDENTITY = "iPhone Distribution: Guangzhou Rural Commercial Bank Co., Ltd";
CODE_SIGN_IDENTITY = "iPhone Developer: Guo Shaoqing (CYXM98D895)";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer: Guo Shaoqing (CYXM98D895)";
DEVELOPMENT_TEAM = ZYDXKQKHVY;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/YYKit/Vendor",
Expand All @@ -1911,9 +2017,10 @@
"-ObjC",
);
OTHER_SWIFT_FLAGS = "$(inherited) \"-D\" \"COCOAPODS\"";
PRODUCT_BUNDLE_IDENTIFIER = com.grcbank.zhuishushenqi;
PRODUCT_BUNDLE_IDENTIFIER = com.cibdev.zhuishushenqi;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "d0c1f583-be4e-4971-ac81-48500f6b6d8b";
PROVISIONING_PROFILE = "35b8e6e5-6fbb-41f1-8975-cf44d63d8b27";
PROVISIONING_PROFILE_SPECIFIER = cibemobile_develop;
SWIFT_OBJC_BRIDGING_HEADER = "$(SRCROOT)/zhuishushenqi/zhuishushenqi-Bridge-Header.h";
SWIFT_VERSION = 3.0;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ extension DateIntervalFormatter{
if year == 0 {//同年
return String(format: "%d个月前",
(month))
} else {//跨年计算月份
return String(format: "%d个月前",12 - from.month() + to.month())
}
}
if month < 0 { //未满一年不计算
Expand Down
Loading

0 comments on commit c0179ea

Please sign in to comment.