Commit c9cd889a authored by 曹云霄's avatar 曹云霄

修复购物车商品显示不全显示问题

parent 03ed62ea
...@@ -16,41 +16,15 @@ ...@@ -16,41 +16,15 @@
- (void)viewDidLoad { - (void)viewDidLoad {
[super viewDidLoad]; [super viewDidLoad];
// Do any additional setup after loading the view.
self.versionLabe.layer.masksToBounds = YES; self.versionLabe.layer.masksToBounds = YES;
self.versionLabe.layer.cornerRadius = 10; self.versionLabe.layer.cornerRadius = 10;
self.versionLabe.layer.borderWidth = 2; self.versionLabe.layer.borderWidth = 2;
self.versionLabe.layer.borderColor = kMainBlueColor.CGColor; self.versionLabe.layer.borderColor = kMainBlueColor.CGColor;
self.versionLabe.textAlignment = NSTextAlignmentCenter; self.versionLabe.textAlignment = NSTextAlignmentCenter;
self.versionLabe.text = [self getAppVersion]; self.versionLabe.text = [self getAppVersion];
}
- (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.
} }
*/
- (NSString*)getAppVersion {
NSString *ver = [[[NSBundle mainBundle] infoDictionary]
objectForKey:@"CFBundleShortVersionString"];
return [NSString stringWithFormat:@"Version %@",ver];
}
@end @end
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
[self.goodsImageview sd_setImageWithURL:[NSURL URLWithString:[imagesArray firstObject]] placeholderImage:REPLACEIMAGE]; [self.goodsImageview sd_setImageWithURL:[NSURL URLWithString:[imagesArray firstObject]] placeholderImage:REPLACEIMAGE];
self.goodsName.text = _model.goods.name; self.goodsName.text = _model.goods.name;
self.goodsCraneQuotation.text = [NSString stringWithFormat:@"¥%.2f",[_model.goods.tagPrice floatValue]]; self.goodsCraneQuotation.text = [NSString stringWithFormat:@"¥%.2f",[_model.goods.tagPrice floatValue]];
self.goodsSpecifications.text = _model.goods.size; self.goodsSpecifications.text = _model.goods.spec;
self.clinchPrice.text = [NSString stringWithFormat:@"¥%.2f",[_model.goods.costPrice floatValue]]; self.clinchPrice.text = [NSString stringWithFormat:@"¥%.2f",[_model.goods.costPrice floatValue]];
self.goodsNumber.text = [NSString stringWithFormat:@"%ld",(long)_model.goodsNum]; self.goodsNumber.text = [NSString stringWithFormat:@"%ld",(long)_model.goodsNum];
self.goodsPrice.text = [NSString stringWithFormat:@"¥%.2f",[_model.goods.costPrice floatValue]*_model.goodsNum]; self.goodsPrice.text = [NSString stringWithFormat:@"¥%.2f",[_model.goods.costPrice floatValue]*_model.goodsNum];
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
NSArray *images = [_model.goods.pictures componentsSeparatedByString:@","]; NSArray *images = [_model.goods.pictures componentsSeparatedByString:@","];
[self.goodsHeader sd_setImageWithURL:[NSURL URLWithString:[images firstObject]] placeholderImage:REPLACEIMAGE]; [self.goodsHeader sd_setImageWithURL:[NSURL URLWithString:[images firstObject]] placeholderImage:REPLACEIMAGE];
self.goodsName.text = _model.goods.name; self.goodsName.text = _model.goods.name;
self.specifications.text = _model.goods.size; self.specifications.text = _model.goods.spec;
self.goodsCode.text = _model.goods.code; self.goodsCode.text = _model.goods.code;
self.goodsNumber.text = [NSString stringWithFormat:@"数量 X%ld",(long)_model.goodsNum]; self.goodsNumber.text = [NSString stringWithFormat:@"数量 X%ld",(long)_model.goodsNum];
self.clinchPrice.text = [NSString stringWithFormat:@"成交价 ¥%.2f",[_model.costPrice floatValue]]; self.clinchPrice.text = [NSString stringWithFormat:@"成交价 ¥%.2f",[_model.costPrice floatValue]];
...@@ -41,9 +41,8 @@ ...@@ -41,9 +41,8 @@
_orderDetailslist = orderDetailslist; _orderDetailslist = orderDetailslist;
self.goodsName.text = _orderDetailslist.goodsName; self.goodsName.text = _orderDetailslist.goodsName;
self.goodsCode.text = _orderDetailslist.goodsCode; self.goodsCode.text = _orderDetailslist.goodsSpec;
self.goodsSize.text = _orderDetailslist.remark; self.goodsSize.text = _orderDetailslist.goodsCode;
NSArray *goodsHeader = [_orderDetailslist.goodsCover componentsSeparatedByString:@","]; NSArray *goodsHeader = [_orderDetailslist.goodsCover componentsSeparatedByString:@","];
[self.goodsHeader sd_setImageWithURL:[NSURL URLWithString:[goodsHeader firstObject]] placeholderImage:REPLACEIMAGE]; [self.goodsHeader sd_setImageWithURL:[NSURL URLWithString:[goodsHeader firstObject]] placeholderImage:REPLACEIMAGE];
self.goodsNumber.text = [NSString stringWithFormat:@"数量 X%@",_orderDetailslist.goodsNum]; self.goodsNumber.text = [NSString stringWithFormat:@"数量 X%@",_orderDetailslist.goodsNum];
...@@ -51,9 +50,6 @@ ...@@ -51,9 +50,6 @@
//小计 //小计
CGFloat totalPrice = [_orderDetailslist.goodsNum integerValue] * [_orderDetailslist.goodsPrice floatValue]; CGFloat totalPrice = [_orderDetailslist.goodsNum integerValue] * [_orderDetailslist.goodsPrice floatValue];
self.totalPrice.text = [NSString stringWithFormat:@"¥%.2f",totalPrice]; self.totalPrice.text = [NSString stringWithFormat:@"¥%.2f",totalPrice];
} }
......
...@@ -54,6 +54,12 @@ ...@@ -54,6 +54,12 @@
*/ */
@property (weak, nonatomic) IBOutlet UIImageView *backImageView; @property (weak, nonatomic) IBOutlet UIImageView *backImageView;
/**
* 版本号
*/
@property (weak, nonatomic) IBOutlet UILabel *versionlabel;
@end @end
...@@ -120,6 +126,8 @@ ...@@ -120,6 +126,8 @@
self.passWord.text = self.passWordString; self.passWord.text = self.passWordString;
//版本更新 //版本更新
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(detectionUpdateVersion) name:UPLOADVERSION object:nil]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(detectionUpdateVersion) name:UPLOADVERSION object:nil];
self.versionlabel.text = [self getAppVersion];
[self detectionUpdateVersion]; [self detectionUpdateVersion];
} }
......
...@@ -285,11 +285,9 @@ ...@@ -285,11 +285,9 @@
} }
#pragma mark -确认支付请求 #pragma mark -确认支付请求
- (void)SurePayRequest - (void)SurePayRequest
{ {
OrderPayRequest *order = [[OrderPayRequest alloc]init]; OrderPayRequest *order = [[OrderPayRequest alloc]init];
order.orderNumber = _orderCode; order.orderNumber = _orderCode;
order.fnewstate = @"002"; order.fnewstate = @"002";
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
NSArray *images = [_model.goods.pictures componentsSeparatedByString:@","]; NSArray *images = [_model.goods.pictures componentsSeparatedByString:@","];
[self.goodsImageView sd_setImageWithURL:[NSURL URLWithString:[images firstObject]] placeholderImage:REPLACEIMAGE]; [self.goodsImageView sd_setImageWithURL:[NSURL URLWithString:[images firstObject]] placeholderImage:REPLACEIMAGE];
self.goodsInformationLabe.text = _model.goods.name; self.goodsInformationLabe.text = _model.goods.name;
self.specifications.text = _model.goods.size; self.specifications.text = _model.goods.spec;
self.goodsCode.text = _model.goods.code; self.goodsCode.text = _model.goods.code;
self.tagsPriceLabe.text = [_model.goods.tagPrice stringValue]; self.tagsPriceLabe.text = [_model.goods.tagPrice stringValue];
self.clinchTextfield.text = [NSString stringWithFormat:@"%.2f",[_model.costPrice floatValue]?[_model.costPrice floatValue]:[_model.goods.tagPrice floatValue]]; self.clinchTextfield.text = [NSString stringWithFormat:@"%.2f",[_model.costPrice floatValue]?[_model.costPrice floatValue]:[_model.goods.tagPrice floatValue]];
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
<key>CFBundleName</key> <key>CFBundleName</key>
<string>欧立方</string> <string>欧立方</string>
<key>CFBundleShortVersionString</key> <key>CFBundleShortVersionString</key>
<string>1.1.1</string> <string>1.1.2</string>
<key>CFBundleURLTypes</key> <key>CFBundleURLTypes</key>
<array> <array>
<dict> <dict>
......
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10117" systemVersion="15F34" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none" initialViewController="BYZ-38-t0r"> <document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10117" systemVersion="16A323" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none" initialViewController="BYZ-38-t0r">
<dependencies> <dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/> <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
</dependencies> </dependencies>
...@@ -90,6 +90,13 @@ ...@@ -90,6 +90,13 @@
<rect key="frame" x="137" y="575" width="239" height="93"/> <rect key="frame" x="137" y="575" width="239" height="93"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
</imageView> </imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="bO9-Qr-G0O">
<rect key="frame" x="20" y="1325" width="202" height="21"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="17"/>
<color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<nil key="highlightedColor"/>
</label>
</subviews> </subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/> <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
</view> </view>
...@@ -104,6 +111,7 @@ ...@@ -104,6 +111,7 @@
<outlet property="userName" destination="9uf-mj-khK" id="qn3-Uu-2RF"/> <outlet property="userName" destination="9uf-mj-khK" id="qn3-Uu-2RF"/>
<outlet property="userNameBackview" destination="cXU-l9-ciP" id="jft-mb-H7b"/> <outlet property="userNameBackview" destination="cXU-l9-ciP" id="jft-mb-H7b"/>
<outlet property="userNameLoginView" destination="4F7-r1-Ukj" id="q2K-9l-FHt"/> <outlet property="userNameLoginView" destination="4F7-r1-Ukj" id="q2K-9l-FHt"/>
<outlet property="versionlabel" destination="bO9-Qr-G0O" id="pHv-Yk-RRb"/>
</connections> </connections>
</viewController> </viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/> <placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
......
...@@ -121,7 +121,10 @@ ...@@ -121,7 +121,10 @@
*/ */
+ (NSString *) compareCurrentTime:(NSString *)str; + (NSString *) compareCurrentTime:(NSString *)str;
/**
* 获取版本号
*/
- (NSString*)getAppVersion;
@end @end
...@@ -512,6 +512,13 @@ ...@@ -512,6 +512,13 @@
return result; return result;
} }
#pragma mark - 获取版本号
- (NSString*)getAppVersion
{
NSString *ver = [[[NSBundle mainBundle] infoDictionary]
objectForKey:@"CFBundleShortVersionString"];
return [NSString stringWithFormat:@"Version %@",ver];
}
- (void)dealloc - (void)dealloc
{ {
......
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