Commit de8aac08 authored by Sandy's avatar Sandy

界面修改 增加代客下单支付按钮

parent 4b80ba98
...@@ -190,6 +190,7 @@ ...@@ -190,6 +190,7 @@
197BA6821CD851DB000E2087 /* JavenDetailReseller.m in Sources */ = {isa = PBXBuildFile; fileRef = 197BA6811CD851DB000E2087 /* JavenDetailReseller.m */; }; 197BA6821CD851DB000E2087 /* JavenDetailReseller.m in Sources */ = {isa = PBXBuildFile; fileRef = 197BA6811CD851DB000E2087 /* JavenDetailReseller.m */; };
197BA6851CD85632000E2087 /* NSNumber+Fommater.m in Sources */ = {isa = PBXBuildFile; fileRef = 197BA6841CD85632000E2087 /* NSNumber+Fommater.m */; }; 197BA6851CD85632000E2087 /* NSNumber+Fommater.m in Sources */ = {isa = PBXBuildFile; fileRef = 197BA6841CD85632000E2087 /* NSNumber+Fommater.m */; };
197BA6891CD865D1000E2087 /* JavencommissionAccountModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 197BA6881CD865D1000E2087 /* JavencommissionAccountModel.m */; }; 197BA6891CD865D1000E2087 /* JavencommissionAccountModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 197BA6881CD865D1000E2087 /* JavencommissionAccountModel.m */; };
197DCD381D40CC1F00589E2C /* OrderPayViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 197DCD371D40CC1F00589E2C /* OrderPayViewController.m */; };
199B4D681CABBCF600451E0E /* OrderDetailViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 199B4D671CABBCF600451E0E /* OrderDetailViewController.m */; }; 199B4D681CABBCF600451E0E /* OrderDetailViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 199B4D671CABBCF600451E0E /* OrderDetailViewController.m */; };
199B4D6A1CABBEF400451E0E /* OrderDetailTopView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 199B4D691CABBEF400451E0E /* OrderDetailTopView.xib */; }; 199B4D6A1CABBEF400451E0E /* OrderDetailTopView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 199B4D691CABBEF400451E0E /* OrderDetailTopView.xib */; };
199B4D6D1CABBF0800451E0E /* OrderDetailTopView.m in Sources */ = {isa = PBXBuildFile; fileRef = 199B4D6C1CABBF0800451E0E /* OrderDetailTopView.m */; }; 199B4D6D1CABBF0800451E0E /* OrderDetailTopView.m in Sources */ = {isa = PBXBuildFile; fileRef = 199B4D6C1CABBF0800451E0E /* OrderDetailTopView.m */; };
...@@ -228,6 +229,7 @@ ...@@ -228,6 +229,7 @@
19ADD38A1CA4E4BD00EE6E5A /* AddCommodityHeaderView.m in Sources */ = {isa = PBXBuildFile; fileRef = 19ADD3891CA4E4BD00EE6E5A /* AddCommodityHeaderView.m */; }; 19ADD38A1CA4E4BD00EE6E5A /* AddCommodityHeaderView.m in Sources */ = {isa = PBXBuildFile; fileRef = 19ADD3891CA4E4BD00EE6E5A /* AddCommodityHeaderView.m */; };
19ADD38E1CA4EC1000EE6E5A /* AddCommodityHeaderCollectionReusableView.m in Sources */ = {isa = PBXBuildFile; fileRef = 19ADD38C1CA4EC1000EE6E5A /* AddCommodityHeaderCollectionReusableView.m */; }; 19ADD38E1CA4EC1000EE6E5A /* AddCommodityHeaderCollectionReusableView.m in Sources */ = {isa = PBXBuildFile; fileRef = 19ADD38C1CA4EC1000EE6E5A /* AddCommodityHeaderCollectionReusableView.m */; };
19ADD38F1CA4EC1000EE6E5A /* AddCommodityHeaderCollectionReusableView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 19ADD38D1CA4EC1000EE6E5A /* AddCommodityHeaderCollectionReusableView.xib */; }; 19ADD38F1CA4EC1000EE6E5A /* AddCommodityHeaderCollectionReusableView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 19ADD38D1CA4EC1000EE6E5A /* AddCommodityHeaderCollectionReusableView.xib */; };
19C135661D39465D00DC766F /* CalculateHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = 19C135651D39465D00DC766F /* CalculateHelper.m */; };
19D906AC1CC7898C00CD42DC /* MineViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 19D906AA1CC7898C00CD42DC /* MineViewController.m */; }; 19D906AC1CC7898C00CD42DC /* MineViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 19D906AA1CC7898C00CD42DC /* MineViewController.m */; };
19D906AD1CC7898C00CD42DC /* MineViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 19D906AB1CC7898C00CD42DC /* MineViewController.xib */; }; 19D906AD1CC7898C00CD42DC /* MineViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 19D906AB1CC7898C00CD42DC /* MineViewController.xib */; };
19D906B61CC86DA300CD42DC /* SettingViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 19D906B41CC86DA300CD42DC /* SettingViewController.m */; }; 19D906B61CC86DA300CD42DC /* SettingViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 19D906B41CC86DA300CD42DC /* SettingViewController.m */; };
...@@ -676,6 +678,8 @@ ...@@ -676,6 +678,8 @@
197BA6841CD85632000E2087 /* NSNumber+Fommater.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSNumber+Fommater.m"; sourceTree = "<group>"; }; 197BA6841CD85632000E2087 /* NSNumber+Fommater.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSNumber+Fommater.m"; sourceTree = "<group>"; };
197BA6871CD865D1000E2087 /* JavencommissionAccountModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JavencommissionAccountModel.h; sourceTree = "<group>"; }; 197BA6871CD865D1000E2087 /* JavencommissionAccountModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JavencommissionAccountModel.h; sourceTree = "<group>"; };
197BA6881CD865D1000E2087 /* JavencommissionAccountModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JavencommissionAccountModel.m; sourceTree = "<group>"; }; 197BA6881CD865D1000E2087 /* JavencommissionAccountModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JavencommissionAccountModel.m; sourceTree = "<group>"; };
197DCD361D40CC1F00589E2C /* OrderPayViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OrderPayViewController.h; sourceTree = "<group>"; };
197DCD371D40CC1F00589E2C /* OrderPayViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OrderPayViewController.m; sourceTree = "<group>"; };
199B4D661CABBCF600451E0E /* OrderDetailViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OrderDetailViewController.h; sourceTree = "<group>"; }; 199B4D661CABBCF600451E0E /* OrderDetailViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OrderDetailViewController.h; sourceTree = "<group>"; };
199B4D671CABBCF600451E0E /* OrderDetailViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OrderDetailViewController.m; sourceTree = "<group>"; }; 199B4D671CABBCF600451E0E /* OrderDetailViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OrderDetailViewController.m; sourceTree = "<group>"; };
199B4D691CABBEF400451E0E /* OrderDetailTopView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = OrderDetailTopView.xib; sourceTree = "<group>"; }; 199B4D691CABBEF400451E0E /* OrderDetailTopView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = OrderDetailTopView.xib; sourceTree = "<group>"; };
...@@ -739,6 +743,8 @@ ...@@ -739,6 +743,8 @@
19ADD38B1CA4EC1000EE6E5A /* AddCommodityHeaderCollectionReusableView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AddCommodityHeaderCollectionReusableView.h; sourceTree = "<group>"; }; 19ADD38B1CA4EC1000EE6E5A /* AddCommodityHeaderCollectionReusableView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AddCommodityHeaderCollectionReusableView.h; sourceTree = "<group>"; };
19ADD38C1CA4EC1000EE6E5A /* AddCommodityHeaderCollectionReusableView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AddCommodityHeaderCollectionReusableView.m; sourceTree = "<group>"; }; 19ADD38C1CA4EC1000EE6E5A /* AddCommodityHeaderCollectionReusableView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AddCommodityHeaderCollectionReusableView.m; sourceTree = "<group>"; };
19ADD38D1CA4EC1000EE6E5A /* AddCommodityHeaderCollectionReusableView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = AddCommodityHeaderCollectionReusableView.xib; sourceTree = "<group>"; }; 19ADD38D1CA4EC1000EE6E5A /* AddCommodityHeaderCollectionReusableView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = AddCommodityHeaderCollectionReusableView.xib; sourceTree = "<group>"; };
19C135641D39465D00DC766F /* CalculateHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CalculateHelper.h; sourceTree = "<group>"; };
19C135651D39465D00DC766F /* CalculateHelper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CalculateHelper.m; sourceTree = "<group>"; };
19D906A91CC7898C00CD42DC /* MineViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MineViewController.h; sourceTree = "<group>"; }; 19D906A91CC7898C00CD42DC /* MineViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MineViewController.h; sourceTree = "<group>"; };
19D906AA1CC7898C00CD42DC /* MineViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MineViewController.m; sourceTree = "<group>"; }; 19D906AA1CC7898C00CD42DC /* MineViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MineViewController.m; sourceTree = "<group>"; };
19D906AB1CC7898C00CD42DC /* MineViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MineViewController.xib; sourceTree = "<group>"; }; 19D906AB1CC7898C00CD42DC /* MineViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MineViewController.xib; sourceTree = "<group>"; };
...@@ -1473,6 +1479,8 @@ ...@@ -1473,6 +1479,8 @@
197975501CAB6F5D00407E3F /* OrderViewController.m */, 197975501CAB6F5D00407E3F /* OrderViewController.m */,
199B4D661CABBCF600451E0E /* OrderDetailViewController.h */, 199B4D661CABBCF600451E0E /* OrderDetailViewController.h */,
199B4D671CABBCF600451E0E /* OrderDetailViewController.m */, 199B4D671CABBCF600451E0E /* OrderDetailViewController.m */,
197DCD361D40CC1F00589E2C /* OrderPayViewController.h */,
197DCD371D40CC1F00589E2C /* OrderPayViewController.m */,
); );
name = "Order(订单)"; name = "Order(订单)";
path = Order; path = Order;
...@@ -2088,6 +2096,8 @@ ...@@ -2088,6 +2096,8 @@
199BC7CF1C9BAC9600E4E0B8 /* MyTools.m */, 199BC7CF1C9BAC9600E4E0B8 /* MyTools.m */,
19563C8C1CDB203500AFD0E0 /* MyBankClass.h */, 19563C8C1CDB203500AFD0E0 /* MyBankClass.h */,
19563C8D1CDB203500AFD0E0 /* MyBankClass.m */, 19563C8D1CDB203500AFD0E0 /* MyBankClass.m */,
19C135641D39465D00DC766F /* CalculateHelper.h */,
19C135651D39465D00DC766F /* CalculateHelper.m */,
19DCCB7F1C9AA0450072C3BF /* Categories */, 19DCCB7F1C9AA0450072C3BF /* Categories */,
19DCCBA61C9AA0450072C3BF /* CustomCells */, 19DCCBA61C9AA0450072C3BF /* CustomCells */,
19DCCBA91C9AA0450072C3BF /* GXFBottomView.h */, 19DCCBA91C9AA0450072C3BF /* GXFBottomView.h */,
...@@ -2635,6 +2645,7 @@ ...@@ -2635,6 +2645,7 @@
1912FD031CD0907D004CF976 /* MoreHotTagViewController.m in Sources */, 1912FD031CD0907D004CF976 /* MoreHotTagViewController.m in Sources */,
190A465C1CE04265006037CB /* AgreementViewController.m in Sources */, 190A465C1CE04265006037CB /* AgreementViewController.m in Sources */,
1912FCDA1CCDC955004CF976 /* JavenResellerModel.m in Sources */, 1912FCDA1CCDC955004CF976 /* JavenResellerModel.m in Sources */,
197DCD381D40CC1F00589E2C /* OrderPayViewController.m in Sources */,
194CB5391CD8AA4A0050E59F /* JavenQNManager.m in Sources */, 194CB5391CD8AA4A0050E59F /* JavenQNManager.m in Sources */,
191AEE5E1CBCC6D100F5E535 /* Conditions.m in Sources */, 191AEE5E1CBCC6D100F5E535 /* Conditions.m in Sources */,
19563C4A1CDAEA3800AFD0E0 /* MyBandBottomView.m in Sources */, 19563C4A1CDAEA3800AFD0E0 /* MyBandBottomView.m in Sources */,
...@@ -2652,6 +2663,7 @@ ...@@ -2652,6 +2663,7 @@
197975221CA8DA8200407E3F /* CommodityDetailViewController.m in Sources */, 197975221CA8DA8200407E3F /* CommodityDetailViewController.m in Sources */,
19DCCB771C9A9EB30072C3BF /* IBTUIViewController.m in Sources */, 19DCCB771C9A9EB30072C3BF /* IBTUIViewController.m in Sources */,
191AEE5C1CBCC6D100F5E535 /* addCommodityRequestModel.m in Sources */, 191AEE5C1CBCC6D100F5E535 /* addCommodityRequestModel.m in Sources */,
19C135661D39465D00DC766F /* CalculateHelper.m in Sources */,
19632DAE1CB38FFC0024A8A1 /* HTTPCilent.m in Sources */, 19632DAE1CB38FFC0024A8A1 /* HTTPCilent.m in Sources */,
19DCCB6D1C9A9EB30072C3BF /* IBTTableView.m in Sources */, 19DCCB6D1C9A9EB30072C3BF /* IBTTableView.m in Sources */,
19DCCB731C9A9EB30072C3BF /* IBTUIScrollView.m in Sources */, 19DCCB731C9A9EB30072C3BF /* IBTUIScrollView.m in Sources */,
...@@ -2926,7 +2938,7 @@ ...@@ -2926,7 +2938,7 @@
baseConfigurationReference = AAF51B5D53AE9938C03065C3 /* Pods.release.xcconfig */; baseConfigurationReference = AAF51B5D53AE9938C03065C3 /* Pods.release.xcconfig */;
buildSettings = { buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_IDENTITY = "iPhone Distribution: Shanghai Gomore Information Technology Co.,Ltd"; CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution: Shanghai Gomore Information Technology Co.,Ltd"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution: Shanghai Gomore Information Technology Co.,Ltd";
ENABLE_BITCODE = NO; ENABLE_BITCODE = NO;
GCC_PREFIX_HEADER = Aland/PrefixHeader.pch; GCC_PREFIX_HEADER = Aland/PrefixHeader.pch;
......
...@@ -18,15 +18,14 @@ ...@@ -18,15 +18,14 @@
@property (weak, nonatomic) IBOutlet MBLabelWithFontAdapter *labelBrokerageRate; //佣金 @property (weak, nonatomic) IBOutlet MBLabelWithFontAdapter *labelBrokerageRate; //佣金
@property (weak, nonatomic) IBOutlet UILabel *labelSalesVolume; //销量 @property (weak, nonatomic) IBOutlet UILabel *labelSalesVolume; //销量
@end @end
@implementation CommodityListCollectionViewCell @implementation CommodityListCollectionViewCell
- (void)cellWithModel:(CommotityListModel *)model { - (void)cellWithModel:(CommotityListModel *)model {
self.labelPrice.text = [NSString stringWithFormat:@"%.0f",model.price]; self.labelPrice.text = [NSString stringWithFormat:@"%.2f",model.price];
[self.imageViewTop sd_setImageWithURL:[NSURL URLWithString:model.cover] placeholderImage:kPlaceHolderImage]; [self.imageViewTop sd_setImageWithURL:[NSURL URLWithString:model.cover] placeholderImage:kPlaceHolderImage];
self.labelOriginalPrice.text = [NSString stringWithFormat:@"¥%.0f", model.originalPrice]; self.labelOriginalPrice.text = [NSString stringWithFormat:@"¥%.2f", model.originalPrice];
self.labelBrokerageRate.text = [NSString stringWithFormat:@"¥%.2f", model.commission]; self.labelBrokerageRate.text = [NSString stringWithFormat:@"¥%.2f", model.commission];
self.labelSalesVolume.text = [NSString stringWithFormat:@"销量:%.0f", model.salesVolume]; self.labelSalesVolume.text = [NSString stringWithFormat:@"销量:%.0f", model.salesVolume];
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<rect key="frame" x="0.0" y="0.0" width="320" height="95"/> <rect key="frame" x="0.0" y="0.0" width="320" height="95"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews> <subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="kJF-jD-kCU"> <button opaque="NO" contentMode="scaleToFill" misplaced="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="kJF-jD-kCU">
<rect key="frame" x="8" y="0.0" width="67" height="95"/> <rect key="frame" x="8" y="0.0" width="67" height="95"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="35" id="T70-gy-1Ql"/> <constraint firstAttribute="height" constant="35" id="T70-gy-1Ql"/>
...@@ -28,14 +28,14 @@ ...@@ -28,14 +28,14 @@
</mask> </mask>
</variation> </variation>
</button> </button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="k9d-7S-PR5"> <button opaque="NO" contentMode="scaleToFill" misplaced="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="k9d-7S-PR5">
<rect key="frame" x="173" y="26" width="66" height="44"/> <rect key="frame" x="173" y="26" width="66" height="44"/>
<fontDescription key="fontDescription" type="system" pointSize="21"/> <fontDescription key="fontDescription" type="system" pointSize="21"/>
<state key="normal" title="下架" backgroundImage="greenbtn_bg"> <state key="normal" title="下架" backgroundImage="greenbtn_bg">
<color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/> <color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
</state> </state>
</button> </button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="QZW-mi-oUQ"> <button opaque="NO" contentMode="scaleToFill" misplaced="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="QZW-mi-oUQ">
<rect key="frame" x="100" y="26" width="65" height="44"/> <rect key="frame" x="100" y="26" width="65" height="44"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="44" id="aLI-tT-ELQ"/> <constraint firstAttribute="height" constant="44" id="aLI-tT-ELQ"/>
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
<color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/> <color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
</state> </state>
</button> </button>
<button opaque="NO" contentMode="scaleToFill" horizontalCompressionResistancePriority="749" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="5Md-Ga-YFh"> <button opaque="NO" contentMode="scaleToFill" horizontalCompressionResistancePriority="749" misplaced="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="5Md-Ga-YFh">
<rect key="frame" x="247" y="26" width="65" height="44"/> <rect key="frame" x="247" y="26" width="65" height="44"/>
<fontDescription key="fontDescription" type="system" pointSize="21"/> <fontDescription key="fontDescription" type="system" pointSize="21"/>
<state key="normal" title="上架" backgroundImage="greenbtn_bg"> <state key="normal" title="上架" backgroundImage="greenbtn_bg">
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
{ {
[self.imgViewCommodity sd_setImageWithURL:[NSURL URLWithString:model.cover] placeholderImage:kPlaceHolderImage]; [self.imgViewCommodity sd_setImageWithURL:[NSURL URLWithString:model.cover] placeholderImage:kPlaceHolderImage];
self.labelTitle.text = model.name; self.labelTitle.text = model.name;
self.labelPrice.text = [NSString stringWithFormat:@"¥%.0f",model.price]; self.labelPrice.text = [NSString stringWithFormat:@"¥%.2f",model.price];
self.labelBrokerageRate.text = [NSString stringWithFormat:@"%.2f",model.commission]; self.labelBrokerageRate.text = [NSString stringWithFormat:@"%.2f",model.commission];
self.labelSaleNumber.text = [NSString stringWithFormat:@"销量:%.0f",model.salesVolume]; self.labelSaleNumber.text = [NSString stringWithFormat:@"销量:%.0f",model.salesVolume];
......
...@@ -11,8 +11,8 @@ ...@@ -11,8 +11,8 @@
<rect key="frame" x="0.0" y="0.0" width="320" height="402"/> <rect key="frame" x="0.0" y="0.0" width="320" height="402"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews> <subviews>
<view contentMode="scaleToFill" misplaced="YES" translatesAutoresizingMaskIntoConstraints="NO" id="9kH-LK-wk8"> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="9kH-LK-wk8">
<rect key="frame" x="0.0" y="176" width="320" height="138"/> <rect key="frame" x="0.0" y="178" width="320" height="102"/>
<subviews> <subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="收货人:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Xru-fq-ja3"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="收货人:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Xru-fq-ja3">
<rect key="frame" x="45" y="22" width="68" height="21"/> <rect key="frame" x="45" y="22" width="68" height="21"/>
...@@ -47,14 +47,14 @@ ...@@ -47,14 +47,14 @@
</connections> </connections>
</button> </button>
<imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleAspectFit" image="icon_order_address" translatesAutoresizingMaskIntoConstraints="NO" id="OeX-RE-d2m"> <imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleAspectFit" image="icon_order_address" translatesAutoresizingMaskIntoConstraints="NO" id="OeX-RE-d2m">
<rect key="frame" x="4" y="92" width="30" height="23"/> <rect key="frame" x="4" y="74" width="30" height="23"/>
<constraints> <constraints>
<constraint firstAttribute="width" constant="30" id="eth-Xe-EGH"/> <constraint firstAttribute="width" constant="30" id="eth-Xe-EGH"/>
<constraint firstAttribute="height" constant="23" id="yMF-z8-J4m"/> <constraint firstAttribute="height" constant="23" id="yMF-z8-J4m"/>
</constraints> </constraints>
</imageView> </imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="上海市 上海市 闵行区 鹤坡南路55弄2号232室上海市 上海市 闵行区 鹤坡南路55弄2号232室" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="rM9-W2-1PT"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="上海市 上海市 闵行区 " textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="rM9-W2-1PT">
<rect key="frame" x="45" y="76" width="267" height="54"/> <rect key="frame" x="45" y="76" width="267" height="18"/>
<fontDescription key="fontDescription" type="system" pointSize="15"/> <fontDescription key="fontDescription" type="system" pointSize="15"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
...@@ -92,8 +92,8 @@ ...@@ -92,8 +92,8 @@
</mask> </mask>
</variation> </variation>
</view> </view>
<view contentMode="scaleToFill" misplaced="YES" translatesAutoresizingMaskIntoConstraints="NO" id="kMe-iN-q0b"> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="kMe-iN-q0b">
<rect key="frame" x="0.0" y="322" width="320" height="29"/> <rect key="frame" x="0.0" y="288" width="320" height="29"/>
<subviews> <subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="商品信息" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="nUT-vO-b28"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="商品信息" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="nUT-vO-b28">
<rect key="frame" x="15" y="4" width="68" height="21"/> <rect key="frame" x="15" y="4" width="68" height="21"/>
...@@ -109,8 +109,8 @@ ...@@ -109,8 +109,8 @@
<constraint firstItem="nUT-vO-b28" firstAttribute="leading" secondItem="kMe-iN-q0b" secondAttribute="leading" constant="15" id="zCP-9S-LPU"/> <constraint firstItem="nUT-vO-b28" firstAttribute="leading" secondItem="kMe-iN-q0b" secondAttribute="leading" constant="15" id="zCP-9S-LPU"/>
</constraints> </constraints>
</view> </view>
<view contentMode="scaleToFill" misplaced="YES" translatesAutoresizingMaskIntoConstraints="NO" id="9bs-ar-XXb"> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="9bs-ar-XXb">
<rect key="frame" x="0.0" y="120" width="320" height="56"/> <rect key="frame" x="0.0" y="120" width="320" height="58"/>
<subviews> <subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" text="在上海市闵行区分公" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="3" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="qgd-cT-Y2S" customClass="MBLabelWithFontAdapter"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" text="在上海市闵行区分公" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="3" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="qgd-cT-Y2S" customClass="MBLabelWithFontAdapter">
<rect key="frame" x="45" y="8" width="232" height="18"/> <rect key="frame" x="45" y="8" width="232" height="18"/>
......
...@@ -9,5 +9,6 @@ ...@@ -9,5 +9,6 @@
#import <UIKit/UIKit.h> #import <UIKit/UIKit.h>
@interface SeeLogistics : UIView @interface SeeLogistics : UIView
@property (weak, nonatomic) IBOutlet UIButton *btn;
@end @end
...@@ -11,14 +11,14 @@ ...@@ -11,14 +11,14 @@
<rect key="frame" x="0.0" y="0.0" width="320" height="67"/> <rect key="frame" x="0.0" y="0.0" width="320" height="67"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews> <subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="BEp-i5-uuc"> <button opaque="NO" contentMode="scaleToFill" misplaced="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="BEp-i5-uuc">
<rect key="frame" x="52" y="12" width="216" height="44"/> <rect key="frame" x="38" y="-1" width="244" height="70"/>
<constraints> <constraints>
<constraint firstAttribute="width" constant="216" id="QMg-u5-sI8"/> <constraint firstAttribute="width" constant="216" id="QMg-u5-sI8"/>
<constraint firstAttribute="height" constant="44" id="saD-TZ-a7b"/> <constraint firstAttribute="height" constant="44" id="saD-TZ-a7b"/>
</constraints> </constraints>
<fontDescription key="fontDescription" type="system" pointSize="22"/> <fontDescription key="fontDescription" type="system" pointSize="22"/>
<state key="normal" title="查看物流" backgroundImage="logistics_btn"> <state key="normal" title="去支付" backgroundImage="logistics_btn">
<color key="titleColor" red="0.48627450979999998" green="0.76470588240000004" blue="0.1450980392" alpha="1" colorSpace="calibratedRGB"/> <color key="titleColor" red="0.48627450979999998" green="0.76470588240000004" blue="0.1450980392" alpha="1" colorSpace="calibratedRGB"/>
</state> </state>
</button> </button>
...@@ -39,6 +39,9 @@ ...@@ -39,6 +39,9 @@
<constraint firstItem="l89-NE-khH" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="ytH-o1-fbL"/> <constraint firstItem="l89-NE-khH" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="ytH-o1-fbL"/>
</constraints> </constraints>
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/> <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
<connections>
<outlet property="btn" destination="BEp-i5-uuc" id="hfn-1h-03v"/>
</connections>
<point key="canvasLocation" x="275" y="30.5"/> <point key="canvasLocation" x="275" y="30.5"/>
</view> </view>
</objects> </objects>
......
...@@ -16,7 +16,8 @@ ...@@ -16,7 +16,8 @@
#import "OrderDetailTableViewCell.h" #import "OrderDetailTableViewCell.h"
#import "OrderListHeaderView.h" #import "OrderListHeaderView.h"
#import "OrderListFooterView.h" #import "OrderListFooterView.h"
#import "NSString+OrderState.h"
#import "SeeLogistics.h"
#define kExpressCell @"OrderExpressTableViewCell.h" #define kExpressCell @"OrderExpressTableViewCell.h"
#define kCellId @"OrderTableViewCell.h" #define kCellId @"OrderTableViewCell.h"
#define kPageSize 10 #define kPageSize 10
...@@ -25,6 +26,7 @@ ...@@ -25,6 +26,7 @@
@interface NoPaymentTableViewController () @interface NoPaymentTableViewController ()
@property (nonatomic, assign) NSInteger page; @property (nonatomic, assign) NSInteger page;
@property (nonatomic, strong) NSMutableArray *arrDatas; @property (nonatomic, strong) NSMutableArray *arrDatas;
@property (nonatomic, strong) SeeLogistics *logisticsView;
@end @end
@implementation NoPaymentTableViewController @implementation NoPaymentTableViewController
...@@ -49,6 +51,8 @@ ...@@ -49,6 +51,8 @@
self.page += 1; self.page += 1;
[weakSelf setUpData]; [weakSelf setUpData];
}]; }];
} }
- (NSMutableArray *)arrDatas { - (NSMutableArray *)arrDatas {
...@@ -171,6 +175,7 @@ ...@@ -171,6 +175,7 @@
orderDetailVC.isShowNavigationBar = YES; orderDetailVC.isShowNavigationBar = YES;
orderDetailVC.model = self.arrDatas[indexPath.section]; orderDetailVC.model = self.arrDatas[indexPath.section];
orderDetailVC.orderType = self.orderTag;
[self.navigationController pushViewController:orderDetailVC animated:YES]; [self.navigationController pushViewController:orderDetailVC animated:YES];
} }
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
#import "OrderDetailBottomView.h" #import "OrderDetailBottomView.h"
#import "CommodityDetailViewController.h" #import "CommodityDetailViewController.h"
#import "CommodityListModel/CommotityListModel.h" #import "CommodityListModel/CommotityListModel.h"
#import "OrderPayViewController.h"
#define kCellId @"OrderDetailTableViewCell.h" #define kCellId @"OrderDetailTableViewCell.h"
@interface OrderDetailViewController ()<UITableViewDelegate, UITableViewDataSource> @interface OrderDetailViewController ()<UITableViewDelegate, UITableViewDataSource>
@property (nonatomic, strong) UITableView *tableView; @property (nonatomic, strong) UITableView *tableView;
...@@ -56,20 +56,28 @@ ...@@ -56,20 +56,28 @@
self.tableView.tableFooterView = self.bottomView; self.tableView.tableFooterView = self.bottomView;
//底部查看物流按钮 //底部查看物流按钮
// if (self.orderType == ORDERTOPTYPE_TRANSPORTED) { if ([self.orderType isEqualToString:@"待支付"]) {
// SeeLogistics *viewBottom = [SeeLogistics viewWithNibName:@"SeeLogistics"]; SeeLogistics *viewBottom = [SeeLogistics viewWithNibName:@"SeeLogistics"];
// viewBottom.frame = CGRectMake(0, kHeight - 64 - 65, kWidth, 64 + 65); [viewBottom.btn addTarget:self action:@selector(actionPay) forControlEvents:UIControlEventTouchUpInside];
// [self.view addSubview:viewBottom]; viewBottom.frame = CGRectMake(0, kHeight - 64 - 65, kWidth, 64 + 65);
// } [self.view addSubview:viewBottom];
}
// Do any additional setup after loading the view. // Do any additional setup after loading the view.
} }
- (void)actionPay {
OrderPayViewController *payVC = [[OrderPayViewController alloc] init];
payVC.model = self.model;
[self.navigationController pushViewController:payVC animated:YES];
}
- (void)viewDidLayoutSubviews { - (void)viewDidLayoutSubviews {
self.tableView.frame = CGRectMake(0, 0, kWidth, kHeight); self.tableView.frame = CGRectMake(0, 0, kWidth, kHeight);
//底部查看物流按钮
if ([self.orderType isEqualToString:@"待支付"]) {
self.tableView.frame = CGRectMake(0, 0, kWidth, kHeight - 64);
}
[self.atopView updateHeight]; [self.atopView updateHeight];
self.atopView.frame = CGRectMake(0, -self.atopView.height, kWidth, self.atopView.height); self.atopView.frame = CGRectMake(0, -self.atopView.height, kWidth, self.atopView.height);
......
//
// OrderPayViewController.h
// ALand
//
// Created by Z on 16/7/21.
// Copyright © 2016年 Z. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "IBTUIViewController.h"
#import "JavenOrderModel.h"
@interface OrderPayViewController : IBTUIViewController
@property (nonatomic, strong) JavenOrderModel *model;
@end
//
// OrderPayViewController.m
// ALand
//
// Created by Z on 16/7/21.
// Copyright © 2016年 Z. All rights reserved.
//
#import "OrderPayViewController.h"
#import <WebKit/WebKit.h>
@interface OrderPayViewController ()<WKNavigationDelegate, WKUIDelegate>
@property (nonatomic, strong) WKWebView *webView;
@end
@implementation OrderPayViewController
- (void)viewDidLoad {
[super viewDidLoad];
WKWebView *webView = [[WKWebView alloc] initWithFrame:CGRectMake(0, 0, kWidth, kHeight - 64)];
UserInfo *user = [UserInfo shareInstance];
NSString *url = [NSString stringWithFormat:@"%@Wap/orderDetail/id/%@/shop_id/%@/mobile/%@.html",user.webShopBaseUrl,self.model.billNumber,self.model.shop.uuid,user.mobilephone];
[webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:url]]];
self.webView = webView;
webView.navigationDelegate = self;
webView.UIDelegate = self;
[self.view addSubview:webView];
// Do any additional setup after loading the view from its nib.
}
#pragma mark - wkwebview delegate
// 页面开始加载时调用
- (void)webView:(WKWebView *)webView didStartProvisionalNavigation:(WKNavigation *)navigation
{
[MBProgressHUD showHUDAddedTo:self.view animated:YES];
}
- (void)webView:(WKWebView *)webView runJavaScriptConfirmPanelWithMessage:(NSString *)message initiatedByFrame:(WKFrameInfo *)frame completionHandler:(void (^)(BOOL))completionHandler {
UIAlertController *alertController = [UIAlertController alertControllerWithTitle:message
message:nil
preferredStyle:UIAlertControllerStyleAlert];
[alertController addAction:[UIAlertAction actionWithTitle:@"确定"
style:UIAlertActionStyleDefault
handler:^(UIAlertAction *action) {
completionHandler(YES);
}]];
[alertController addAction:[UIAlertAction actionWithTitle:@"取消"
style:UIAlertActionStyleCancel
handler:^(UIAlertAction *action){
completionHandler(NO);
}]];
[self presentViewController:alertController animated:YES completion:^{}];
}
// 页面加载完成之后调用
- (void)webView:(WKWebView *)webView didFinishNavigation:(WKNavigation *)navigation
{
self.title = webView.title;
[MBProgressHUD hideHUDForView:self.view];
}
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
/*
#pragma mark - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
// Get the new view controller using [segue destinationViewController].
// Pass the selected object to the new view controller.
}
*/
@end
...@@ -18,11 +18,11 @@ ...@@ -18,11 +18,11 @@
<rect key="frame" x="0.0" y="0.0" width="320" height="480"/> <rect key="frame" x="0.0" y="0.0" width="320" height="480"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews> <subviews>
<view hidden="YES" contentMode="scaleToFill" misplaced="YES" translatesAutoresizingMaskIntoConstraints="NO" id="a5g-v2-8Qq" userLabel="bottomBg"> <view hidden="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="a5g-v2-8Qq" userLabel="bottomBg">
<rect key="frame" x="0.0" y="480" width="320" height="0.0"/> <rect key="frame" x="0.0" y="480" width="320" height="0.0"/>
<color key="backgroundColor" red="0.97254901959999995" green="0.97254901959999995" blue="0.97254901959999995" alpha="1" colorSpace="calibratedRGB"/> <color key="backgroundColor" red="0.97254901959999995" green="0.97254901959999995" blue="0.97254901959999995" alpha="1" colorSpace="calibratedRGB"/>
</view> </view>
<view contentMode="scaleToFill" misplaced="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Tdr-oJ-D2D"> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Tdr-oJ-D2D">
<rect key="frame" x="0.0" y="0.0" width="320" height="480"/> <rect key="frame" x="0.0" y="0.0" width="320" height="480"/>
<subviews> <subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" image="login_top" translatesAutoresizingMaskIntoConstraints="NO" id="gIO-Jz-jhA"> <imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" image="login_top" translatesAutoresizingMaskIntoConstraints="NO" id="gIO-Jz-jhA">
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
<constraint firstAttribute="width" constant="234" id="jkq-tN-k4O"/> <constraint firstAttribute="width" constant="234" id="jkq-tN-k4O"/>
</constraints> </constraints>
</imageView> </imageView>
<button opaque="NO" contentMode="scaleToFill" misplaced="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Drd-sW-LYv"> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Drd-sW-LYv">
<rect key="frame" x="32" y="252" width="256" height="44"/> <rect key="frame" x="32" y="252" width="256" height="44"/>
<constraints> <constraints>
<constraint firstAttribute="width" constant="300" id="1bQ-Cb-7AQ"/> <constraint firstAttribute="width" constant="300" id="1bQ-Cb-7AQ"/>
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
<action selector="rigistAction:" destination="-1" eventType="touchUpInside" id="Qaf-df-5Yo"/> <action selector="rigistAction:" destination="-1" eventType="touchUpInside" id="Qaf-df-5Yo"/>
</connections> </connections>
</button> </button>
<button opaque="NO" contentMode="scaleToFill" misplaced="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Te4-Rx-W0K"> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Te4-Rx-W0K">
<rect key="frame" x="32" y="326" width="256" height="44"/> <rect key="frame" x="32" y="326" width="256" height="44"/>
<constraints> <constraints>
<constraint firstAttribute="width" constant="300" id="do6-tj-oIb"/> <constraint firstAttribute="width" constant="300" id="do6-tj-oIb"/>
...@@ -95,7 +95,7 @@ ...@@ -95,7 +95,7 @@
</mask> </mask>
</variation> </variation>
</view> </view>
<label hidden="YES" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" text="第三方帐号快速登录" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="A0v-gX-51g"> <label hidden="YES" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="第三方帐号快速登录" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="A0v-gX-51g">
<rect key="frame" x="84" y="493" width="153" height="21"/> <rect key="frame" x="84" y="493" width="153" height="21"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="21" id="58L-Dk-Bgf"/> <constraint firstAttribute="height" constant="21" id="58L-Dk-Bgf"/>
......
//
// CalculateHelper.h
// XFFruit
//
// Created by Z on 16/7/14.
// Copyright © 2016年 Xummer. All rights reserved.
//
#import <Foundation/Foundation.h>
typedef NS_ENUM(NSInteger, CalculateType) {
CalculateTypeAdd = 0, //加
CalculateTypeSub, //减
CalculateTypeMul, //乘
CalculateTypeDiv //除
};
@interface CalculateHelper : NSObject
/*
NSRoundPlain, // Round up on a tie //貌似取整
NSRoundDown, // Always down == truncate //只舍不入
NSRoundUp, // Always up // 只入不舍
NSRoundBankers // on a tie round so last digit is even 貌似四舍五入
*/
/**
* 计算
*
* @param num1 第一个数字
* @param num2 第二个数字
* @param type 计算类型(加减乘除)
* @param roundingType 四舍五入类型
* @param coutLenth 小数点后面保留几位
*
* @return 结算结果
*/
+ (NSDecimalNumber *)calculateNum1:(id)num1 num2:(id)num2 type:(CalculateType)type roundingType:(NSRoundingMode)roundingType cutLenth:(NSInteger)coutLenth;
+ (NSString *)doubleValueToMoneyString:(double)value;
@end
//
// CalculateHelper.m
// XFFruit
//
// Created by Z on 16/7/14.
// Copyright © 2016年 Xummer. All rights reserved.
//
#import "CalculateHelper.h"
@implementation CalculateHelper
+ (NSDecimalNumber *)calculateNum1:(id)num1 num2:(id)num2 type:(CalculateType)type roundingType:(NSRoundingMode)roundingType cutLenth:(NSInteger)coutLenth {
NSDecimalNumberHandler *roundUp = [NSDecimalNumberHandler
decimalNumberHandlerWithRoundingMode:roundingType
scale:coutLenth
raiseOnExactness:NO
raiseOnOverflow:NO
raiseOnUnderflow:NO
raiseOnDivideByZero:YES];
NSDecimalNumber *decimalNum1 = [self changeType:num1];
NSDecimalNumber *decimalNum2 = [self changeType:num2];
if (decimalNum1 == nil || decimalNum2 == nil) {
return @"传入的类型不正确";
}
NSDecimalNumber *decimalResult;
NSString *result;
switch (type) {
case CalculateTypeAdd: {
decimalResult = [decimalNum1 decimalNumberByAdding:decimalNum2 withBehavior:roundUp];
result = [decimalResult stringValue];
break;
}
case CalculateTypeSub: {
decimalResult = [decimalNum1 decimalNumberBySubtracting:decimalNum2 withBehavior:roundUp];
result = [decimalResult stringValue];
break;
}
case CalculateTypeMul: {
decimalResult = [decimalNum1 decimalNumberByMultiplyingBy:decimalNum2 withBehavior:roundUp];
result = [decimalResult stringValue];
break;
}
case CalculateTypeDiv: {
decimalResult = [decimalNum1 decimalNumberByDividingBy:decimalNum2 withBehavior:roundUp];
result = [decimalResult stringValue];
break;
}
}
return decimalResult;
}
+ (NSDecimalNumber *)changeType:(id)num1 {
NSDecimalNumber *decimalNum1;
if ([num1 isKindOfClass:[NSDecimalNumber class]]) {
decimalNum1 = num1;
}else if([num1 isKindOfClass:[NSString class]]){
decimalNum1 = [NSDecimalNumber decimalNumberWithString:num1];
}else if ([num1 isKindOfClass:[NSNumber class]]){
decimalNum1 = [NSDecimalNumber decimalNumberWithDecimal:[num1 decimalValue]];
}else{
return nil;
}
return decimalNum1;
}
+ (NSString *)doubleValueToMoneyString:(double)value {
return nil;
}
@end
...@@ -46,8 +46,8 @@ ...@@ -46,8 +46,8 @@
} success:^(NSURLSessionDataTask * _Nonnull task, id _Nullable responseObject) { } success:^(NSURLSessionDataTask * _Nonnull task, id _Nullable responseObject) {
NSDictionary *dic = responseObject; NSDictionary *dic = responseObject;
NSString *jsonString = [dic JSONString];
CLog(@"POST success!-------->\n%@", [dic JSONString]); CLog(@"POST success!-------->\n%@", jsonString);
success(task, responseObject); success(task, responseObject);
} failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) { } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
<key>CFBundlePackageType</key> <key>CFBundlePackageType</key>
<string>APPL</string> <string>APPL</string>
<key>CFBundleShortVersionString</key> <key>CFBundleShortVersionString</key>
<string>1.0.2</string> <string>1.0.4</string>
<key>CFBundleSignature</key> <key>CFBundleSignature</key>
<string>????</string> <string>????</string>
<key>CFBundleURLTypes</key> <key>CFBundleURLTypes</key>
......
...@@ -9,9 +9,9 @@ ...@@ -9,9 +9,9 @@
#ifndef UrlHeader_h #ifndef UrlHeader_h
#define UrlHeader_h #define UrlHeader_h
#define REST_BASE_URL @"http://139.196.173.244:8080/aland-server/rest" //正式环境 //#define REST_BASE_URL @"http://139.196.173.244:8080/aland-server/rest" //正式环境
//#define REST_BASE_URL @"http://139.196.195.30:8080/aland-server/rest" //测试环境 #define REST_BASE_URL @"http://139.196.195.30:9090/aland-server/rest" //测试环境
#define kDomain @"0001" //组织代码 #define kDomain @"0001" //组织代码
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment