Commit 70bc6c29 by lee

Merge branch 'master' of git.oschina.net:kollway-kollway/newcemarose

parents 9f44a471 a16a259b
......@@ -99,6 +99,8 @@
C02986881F0F249D002EB25F /* KWMWishListVC.m in Sources */ = {isa = PBXBuildFile; fileRef = C02986871F0F249D002EB25F /* KWMWishListVC.m */; };
C029868F1F0F2663002EB25F /* KWMWishCell.m in Sources */ = {isa = PBXBuildFile; fileRef = C029868D1F0F2663002EB25F /* KWMWishCell.m */; };
C02986901F0F2663002EB25F /* KWMWishCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = C029868E1F0F2663002EB25F /* KWMWishCell.xib */; };
C02C5A931FD54C7D00E32290 /* KWMRecommendView.m in Sources */ = {isa = PBXBuildFile; fileRef = C02C5A901FD54C7C00E32290 /* KWMRecommendView.m */; };
C02C5A941FD54C7D00E32290 /* KWMRecommendView.xib in Resources */ = {isa = PBXBuildFile; fileRef = C02C5A911FD54C7C00E32290 /* KWMRecommendView.xib */; };
C02C7D801E640D82008DC29C /* libWeChatSDK.a in Frameworks */ = {isa = PBXBuildFile; fileRef = C02C7D7B1E640D82008DC29C /* libWeChatSDK.a */; };
C02C7D811E640D82008DC29C /* README.txt in Resources */ = {isa = PBXBuildFile; fileRef = C02C7D7C1E640D82008DC29C /* README.txt */; };
C02C7D831E640FBF008DC29C /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C02C7D821E640FBF008DC29C /* SystemConfiguration.framework */; };
......@@ -221,10 +223,8 @@
C04834371F1325CB00A5BFB4 /* KWMHotSalesHeader.m in Sources */ = {isa = PBXBuildFile; fileRef = C04834361F1325CB00A5BFB4 /* KWMHotSalesHeader.m */; };
C048343B1F13274300A5BFB4 /* KWMNewHomeVC.m in Sources */ = {isa = PBXBuildFile; fileRef = C04834391F13274300A5BFB4 /* KWMNewHomeVC.m */; };
C048343E1F13288F00A5BFB4 /* KWMMenuHeader.xib in Resources */ = {isa = PBXBuildFile; fileRef = C048343D1F13288F00A5BFB4 /* KWMMenuHeader.xib */; };
C04834411F13350F00A5BFB4 /* KWMRecommendHeader.m in Sources */ = {isa = PBXBuildFile; fileRef = C04834401F13350F00A5BFB4 /* KWMRecommendHeader.m */; };
C04834451F1337A800A5BFB4 /* KWMNewHomeCell.m in Sources */ = {isa = PBXBuildFile; fileRef = C04834431F1337A800A5BFB4 /* KWMNewHomeCell.m */; };
C04834461F1337A800A5BFB4 /* KWMNewHomeCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = C04834441F1337A800A5BFB4 /* KWMNewHomeCell.xib */; };
C04834481F1338F200A5BFB4 /* KWMRecommendHeader.xib in Resources */ = {isa = PBXBuildFile; fileRef = C04834471F1338F200A5BFB4 /* KWMRecommendHeader.xib */; };
C048344A1F13391A00A5BFB4 /* KWMClothingSetsHeader.xib in Resources */ = {isa = PBXBuildFile; fileRef = C04834491F13391A00A5BFB4 /* KWMClothingSetsHeader.xib */; };
C048344C1F13393D00A5BFB4 /* KWMHotSalesHeader.xib in Resources */ = {isa = PBXBuildFile; fileRef = C048344B1F13393D00A5BFB4 /* KWMHotSalesHeader.xib */; };
C04834531F13590500A5BFB4 /* KWMProductBannerItemView.m in Sources */ = {isa = PBXBuildFile; fileRef = C048344E1F13590500A5BFB4 /* KWMProductBannerItemView.m */; };
......@@ -544,6 +544,9 @@
C029868C1F0F2663002EB25F /* KWMWishCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KWMWishCell.h; sourceTree = "<group>"; };
C029868D1F0F2663002EB25F /* KWMWishCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KWMWishCell.m; sourceTree = "<group>"; };
C029868E1F0F2663002EB25F /* KWMWishCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = KWMWishCell.xib; sourceTree = "<group>"; };
C02C5A901FD54C7C00E32290 /* KWMRecommendView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KWMRecommendView.m; sourceTree = "<group>"; };
C02C5A911FD54C7C00E32290 /* KWMRecommendView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = KWMRecommendView.xib; sourceTree = "<group>"; };
C02C5A921FD54C7D00E32290 /* KWMRecommendView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KWMRecommendView.h; sourceTree = "<group>"; };
C02C7D7B1E640D82008DC29C /* libWeChatSDK.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libWeChatSDK.a; sourceTree = "<group>"; };
C02C7D7C1E640D82008DC29C /* README.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README.txt; sourceTree = "<group>"; };
C02C7D7D1E640D82008DC29C /* WechatAuthSDK.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WechatAuthSDK.h; sourceTree = "<group>"; };
......@@ -768,12 +771,9 @@
C04834381F13274300A5BFB4 /* KWMNewHomeVC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KWMNewHomeVC.h; sourceTree = "<group>"; };
C04834391F13274300A5BFB4 /* KWMNewHomeVC.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KWMNewHomeVC.m; sourceTree = "<group>"; };
C048343D1F13288F00A5BFB4 /* KWMMenuHeader.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = KWMMenuHeader.xib; sourceTree = "<group>"; };
C048343F1F13350F00A5BFB4 /* KWMRecommendHeader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KWMRecommendHeader.h; sourceTree = "<group>"; };
C04834401F13350F00A5BFB4 /* KWMRecommendHeader.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KWMRecommendHeader.m; sourceTree = "<group>"; };
C04834421F1337A800A5BFB4 /* KWMNewHomeCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KWMNewHomeCell.h; sourceTree = "<group>"; };
C04834431F1337A800A5BFB4 /* KWMNewHomeCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KWMNewHomeCell.m; sourceTree = "<group>"; };
C04834441F1337A800A5BFB4 /* KWMNewHomeCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = KWMNewHomeCell.xib; sourceTree = "<group>"; };
C04834471F1338F200A5BFB4 /* KWMRecommendHeader.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = KWMRecommendHeader.xib; sourceTree = "<group>"; };
C04834491F13391A00A5BFB4 /* KWMClothingSetsHeader.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = KWMClothingSetsHeader.xib; sourceTree = "<group>"; };
C048344B1F13393D00A5BFB4 /* KWMHotSalesHeader.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = KWMHotSalesHeader.xib; sourceTree = "<group>"; };
C048344D1F13590500A5BFB4 /* KWMProductBannerItemView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KWMProductBannerItemView.h; sourceTree = "<group>"; };
......@@ -1514,6 +1514,9 @@
C0DD53261EE55190002D1E0C /* Loading */,
C034E7C31D6B10A0006EE129 /* CorePhotoBroswer */,
C034E8381D6B10A0006EE129 /* EGO */,
C02C5A921FD54C7D00E32290 /* KWMRecommendView.h */,
C02C5A901FD54C7C00E32290 /* KWMRecommendView.m */,
C02C5A911FD54C7C00E32290 /* KWMRecommendView.xib */,
C0AF03981DD5BFB20060623F /* UIViewController+BackButtonHandler.h */,
C0AF03991DD5BFB20060623F /* UIViewController+BackButtonHandler.m */,
C04834211F13215500A5BFB4 /* KWMBannerView.h */,
......@@ -2004,9 +2007,6 @@
C048343D1F13288F00A5BFB4 /* KWMMenuHeader.xib */,
C048342C1F13254200A5BFB4 /* KWMMenuHeader.h */,
C048342D1F13254200A5BFB4 /* KWMMenuHeader.m */,
C04834471F1338F200A5BFB4 /* KWMRecommendHeader.xib */,
C048343F1F13350F00A5BFB4 /* KWMRecommendHeader.h */,
C04834401F13350F00A5BFB4 /* KWMRecommendHeader.m */,
C04834491F13391A00A5BFB4 /* KWMClothingSetsHeader.xib */,
C04834321F1325A000A5BFB4 /* KWMClothingSetsHeader.h */,
C04834331F1325A000A5BFB4 /* KWMClothingSetsHeader.m */,
......@@ -2436,7 +2436,7 @@
C0F586771E24F820001248E2 /* KWMCollectionCell.xib in Resources */,
C0243BBD1EFBD5A10013CFA7 /* Category.storyboard in Resources */,
C0F586791E24F820001248E2 /* KWMDetailCell.xib in Resources */,
C04834481F1338F200A5BFB4 /* KWMRecommendHeader.xib in Resources */,
C02C5A941FD54C7D00E32290 /* KWMRecommendView.xib in Resources */,
C0F5867F1E24F820001248E2 /* KWMNewGoodsCell.xib in Resources */,
C0DD53101EE54A9E002D1E0C /* KWMBarandSelectView.xib in Resources */,
C066650C1D75A2E500F02EF4 /* Mine.storyboard in Resources */,
......@@ -2592,7 +2592,6 @@
DA4E36981F17729C0007E4D0 /* KWMCategoryModel.m in Sources */,
C048B8E21EF3C04B000DA7AF /* KWMBeforePayData.m in Sources */,
C03846941DB89EEB008C3BAB /* KWMCemaroseResult.m in Sources */,
C04834411F13350F00A5BFB4 /* KWMRecommendHeader.m in Sources */,
C0F586871E24F820001248E2 /* KWMNewTypeSelectedVC.m in Sources */,
80598D471D99193400BF0F97 /* KWMInformationVC.m in Sources */,
C034E7B91D6B0A8D006EE129 /* KWMHomeVC.m in Sources */,
......@@ -2663,6 +2662,7 @@
C0F586781E24F820001248E2 /* KWMDetailCell.m in Sources */,
C03120AD1EF2AC6700E49EFA /* KWMCheckoutPayResult.m in Sources */,
801F87BF1DD1D6850038FA4C /* KWMLoadStatus.m in Sources */,
C02C5A931FD54C7D00E32290 /* KWMRecommendView.m in Sources */,
C03943C31DD1FD3F00141475 /* KWMProductTypeResult.m in Sources */,
804771851D6D585B0086B4DC /* KWMValidationVC.m in Sources */,
80ED0A4F1D93BD0E00B28DF2 /* KWMShopCartModel.m in Sources */,
......
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "ic_choose_nor@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "ic_choose_nor@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "ic_choose_sel@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "ic_choose_sel@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13196" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13529" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13174"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13527"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<customFonts key="customFonts">
......
......@@ -11,7 +11,7 @@
#import <CHTCollectionViewWaterfallLayout.h>
#import "KWMAdHeader.h"
#import "KWMMenuHeader.h"
#import "KWMRecommendHeader.h"
#import "KWMRecommendView.h"
#import "KWMClothingSetsHeader.h"
#import "KWMHotSalesHeader.h"
......
......@@ -45,7 +45,7 @@ typedef enum{
@property(nonatomic,strong) KWMMenuHeader *menuHeader;
@property(nonatomic,strong) KWMRecommendHeader *recommendHeader;
@property(nonatomic,strong) KWMRecommendView *recommendHeader;
@property(nonatomic,strong) KWMClothingSetsHeader *clothingSetsHeader;
......@@ -110,7 +110,7 @@ typedef enum{
heightHotSale = UI_SCREEN_WIDTH * 190 / 375 + 60;//60为图片外的布局高度
self.adHeader = [[KWMAdHeader alloc]initWithFrame:CGRectMake(0, 0, UI_SCREEN_WIDTH, heightAdHeader)];
self.menuHeader = [[KWMMenuHeader alloc]initWithFrame:CGRectMake(0, 0, UI_SCREEN_WIDTH, 100)];
self.recommendHeader = [[KWMRecommendHeader alloc]initWithFrame:CGRectMake(0, 0, UI_SCREEN_WIDTH, 230)];
self.recommendHeader = [[KWMRecommendView alloc]initWithFrame:CGRectMake(0, 0, UI_SCREEN_WIDTH, 230)];
self.clothingSetsHeader = [[KWMClothingSetsHeader alloc]initWithFrame:CGRectMake(0, 0, UI_SCREEN_WIDTH, heightClothingSets)];
self.hotSalesHeader = [[KWMHotSalesHeader alloc]initWithFrame:CGRectMake(0, 0, UI_SCREEN_WIDTH, heightHotSale)];
......@@ -145,7 +145,7 @@ typedef enum{
[self.cvHome registerClass:[UICollectionReusableView class] forSupplementaryViewOfKind:CHTCollectionElementKindSectionHeader withReuseIdentifier:[KWMAdHeader kwmTag]];
[self.cvHome registerClass:[UICollectionReusableView class] forSupplementaryViewOfKind:CHTCollectionElementKindSectionHeader withReuseIdentifier:[KWMHotSalesHeader kwmTag]];
[self.cvHome registerClass:[UICollectionReusableView class] forSupplementaryViewOfKind:CHTCollectionElementKindSectionHeader withReuseIdentifier:[KWMRecommendHeader kwmTag]];
[self.cvHome registerClass:[UICollectionReusableView class] forSupplementaryViewOfKind:CHTCollectionElementKindSectionHeader withReuseIdentifier:[KWMRecommendView kwmTag]];
[self.cvHome registerClass:[UICollectionReusableView class] forSupplementaryViewOfKind:CHTCollectionElementKindSectionHeader withReuseIdentifier:[KWMClothingSetsHeader kwmTag]];
[self.cvHome registerClass:[UICollectionReusableView class] forSupplementaryViewOfKind:CHTCollectionElementKindSectionHeader withReuseIdentifier:[KWMMenuHeader kwmTag]];
......@@ -194,7 +194,7 @@ typedef enum{
}
#pragma mark - KWMRecommendDelegate
-(void)kwm_gotoRecommendPage{
-(void)kwm_gotoRecommendPage:(KWMRecommendView *)recommendView{
[self openURLWithString:@"https://cemarose.myshopify.com/collections/hot-sell-app?title=主推单品"];
}
......@@ -264,7 +264,7 @@ typedef enum{
}
break;
case HeaderRecommend:
headerView = [collectionView dequeueReusableSupplementaryViewOfKind:CHTCollectionElementKindSectionHeader withReuseIdentifier:[KWMRecommendHeader kwmTag] forIndexPath:indexPath];
headerView = [collectionView dequeueReusableSupplementaryViewOfKind:CHTCollectionElementKindSectionHeader withReuseIdentifier:[KWMRecommendView kwmTag] forIndexPath:indexPath];
if(headerView.subviews.count == 0){
[headerView addSubview:self.recommendHeader];
}
......@@ -341,7 +341,7 @@ typedef enum{
- (void) requestProductWithHandle:(NSString *) handle tags:(NSArray *) tags valueKeyPath:(NSString *) valueKeyPath {
BOOL isHome = [handle isEqualToString:@"products-list-app-homepage"];
NSInteger cpage = isHome ? self.page : 1;
NSDictionary *parameters = [self getProductCacheKeyDictionary:cpage tags:tags handle:handle];
NSDictionary *parameters = [KWMPPCacheUtil getProductCacheKeyDictionary:cpage tags:tags handle:handle];
if(!self.isRefreshUI){
BOOL useProductDataCache = [self useProductDataCache:parameters valueKeyPath:valueKeyPath page:cpage isHome:isHome];
}
......@@ -439,23 +439,6 @@ typedef enum{
}
}
//初始化缓存parameters key
- (NSDictionary *)getProductCacheKeyDictionary:(NSUInteger)page
tags:(nullable NSArray <NSString *> *)tags
handle:(nullable NSString *)handle{
NSMutableDictionary *params = @{
@"limit" : @(self.client.pageSize),
@"page" : @(page)
}.mutableCopy;
if (tags) {
params[@"tag"] = [tags componentsJoinedByString:@","];
}
if (handle) {
params[@"handle"] = handle;
}
return params;
}
//缓存规则:网络请求数据照常,如果没网络,并且缓存有数据,会拿缓存的数据显示。
-(BOOL)useProductDataCache:(NSDictionary *)cacheKeyDictionary valueKeyPath:(NSString *)valueKeyPath page:(NSUInteger)page isHome:(BOOL)isHome{
if(!kIsNetwork || page == 1){
......
......@@ -16,7 +16,7 @@
#import "KWMPayTypeVC.h"
#import "KWMBeforePayData.h"
@interface KWMBeforePayVC : KWMBaseVC<KWMGiftCardDelegate,KWMDiscountDelegate,KWMSelectAddressDelegate,KWMSelectShippingRateDelegate,KWMPayTypeDelegate>
@interface KWMBeforePayVC : KWMBaseVC<KWMGiftCardDelegate,KWMSelectAddressDelegate,KWMSelectShippingRateDelegate,UITextFieldDelegate>
//沒有默認地址時,高度為37,有地址時,高度為90
@property(nonatomic,weak) IBOutlet NSLayoutConstraint *vAddressHeight;
......@@ -33,13 +33,28 @@
@property (weak, nonatomic) IBOutlet UIView *vHasAddress;
@property (weak, nonatomic) IBOutlet UILabel *lbPayType;
//支付方式
@property (weak, nonatomic) IBOutlet UIView *vPayType;
//折扣
@property (weak, nonatomic) IBOutlet UILabel *lbDiscount;
@property (weak, nonatomic) IBOutlet UIImageView *ivAliPay;
@property (weak, nonatomic) IBOutlet UIImageView *ivWechatPay;
//折扣
@property (weak, nonatomic) IBOutlet UILabel *lbGiftCard;
@property (weak, nonatomic) IBOutlet UIButton *btnDiscountCancel;
@property (weak, nonatomic) IBOutlet UIButton *btnDiscountConfirm;
@property (weak, nonatomic) IBOutlet UIButton *btnDiscountEdit;
@property (weak, nonatomic) IBOutlet UITextField *tfDiscount;
@property (weak, nonatomic) IBOutlet UIButton *btnBg;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *marginTopContent;
//价格
@property (weak, nonatomic) IBOutlet UILabel *lbTotalPrice;
@property (weak, nonatomic) IBOutlet UILabel *lbShippingRate;
......@@ -47,8 +62,6 @@
//清关信息
@property (weak, nonatomic) IBOutlet UILabel *lbCustomsClearance;
@property (weak, nonatomic) IBOutlet UIView *vPayType;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *heightPayType;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *heightCustomsClearance;
......@@ -87,6 +100,9 @@
- (IBAction)onClickCustomsClearance:(id)sender;
- (IBAction)onClickDiscountConfirm:(id)sender;
- (IBAction)onClickDiscountCancel:(id)sender;
@end
......@@ -25,9 +25,9 @@
#import "KWMShoppingCart.h"
@interface KWMBeforePayVC ()
@property (nonatomic) BOOL isEditingDiscount;
@property (nonatomic) BUYCustomer *customer;
@property (weak, nonatomic) IBOutlet UIButton *submit;
@end
@implementation KWMBeforePayVC
......@@ -49,6 +49,7 @@
- (void)viewDidLoad {
[super viewDidLoad];
[self initDiscountHintText];
self.title = @"提交订单";
self.payType = [self.userDao.currencyCode isEqualToString:@"EUR"]?TypeWebpay:TypeAlipay;
self.beforePayData = [KWMBeforePayData new];
......@@ -77,8 +78,6 @@
if(payType == TypeWebpay){
self.heightPayType.constant = 0;
self.vPayType.hidden = YES;
}else{
self.lbPayType.text = [KWMPayUtil payTypeString:payType];
}
}
......@@ -118,6 +117,7 @@
if (error == nil && checkout) {
this.address = address;
this.checkout = checkout;
[this showToast:@"更新地址成功"];
[this flushCheckout:dictionary];
// [this initData];
......@@ -150,11 +150,6 @@
[self initData];
}
- (void)kwm_addedDiscount:(BUYCheckout *)checkout{
self.checkout = checkout;
[self initData];
}
- (void)kwm_addedGiftCard:(BUYCheckout *)checkout{
self.checkout = checkout;
[self initData];
......@@ -167,6 +162,22 @@
-(void)kwm_onSelectPayType:(KWMPayType)payType{
self.payType = payType;
if(payType == TypeWechatPay){
self.ivAliPay.image = [UIImage imageNamed:@"ic_choose_nor"];
self.ivWechatPay.image = [UIImage imageNamed:@"ic_choose_sel"];
}else if(payType == TypeAlipay){
self.ivAliPay.image = [UIImage imageNamed:@"ic_choose_sel"];
self.ivWechatPay.image = [UIImage imageNamed:@"ic_choose_nor"];
}
}
-(void)initDiscountHintText{
NSString *holderText = @"请输入优惠码";
NSMutableAttributedString *placeholder = [[NSMutableAttributedString alloc] initWithString:holderText];
[placeholder addAttribute:NSForegroundColorAttributeName
value:[UIColor sam_colorWithHex:@"393939"]
range:NSMakeRange(0, holderText.length)];
self.tfDiscount.attributedPlaceholder = placeholder;
}
- (void)initData{
......@@ -201,11 +212,17 @@
}
//优惠码
if(self.checkout.discount!=nil){
self.lbDiscount.text = self.checkout.discount.code;
if(self.checkout.discount){
self.tfDiscount.text = self.checkout.discount.code;
}else{
self.lbDiscount.text = @"请输入优惠码";
}
self.tfDiscount.text = @"";
}
//优惠码编辑相关
self.tfDiscount.enabled = self.isEditingDiscount;
[self.tfDiscount endEditing:!self.isEditingDiscount];
[self.btnDiscountCancel setHidden:!self.isEditingDiscount];
[self.btnDiscountConfirm setHidden:!self.isEditingDiscount];
[self.btnDiscountEdit setHidden:self.isEditingDiscount];
//礼品卡
if(self.checkout.giftCardsArray!=nil && self.checkout.giftCardsArray.count>0){
BUYGiftCard *giftCard = [self.checkout.giftCardsArray objectAtIndex:0];
......@@ -375,9 +392,13 @@
[self showToast:@"未成功创建订单"];
return;
}
KWMPayTypeVC *typeVC = (KWMPayTypeVC *)[KWMBaseVC findControllerBy:[KWMPayTypeVC kwmTag] fromStoryboard:@"ShopCart"];
typeVC.delegate = self;
[self.navigationController pushViewController:typeVC animated:YES];
UITapGestureRecognizer *tapType = sender;
UIView *vType = tapType.view;
if(vType.tag == 1){
[self kwm_onSelectPayType:TypeAlipay];
}else if(vType.tag == 2){
[self kwm_onSelectPayType:TypeWechatPay];
}
}
//优惠码页面
......@@ -386,10 +407,42 @@
[self showToast:@"未成功创建订单"];
return;
}
KWMDiscountVC *discountVC = (KWMDiscountVC *)[KWMBaseVC findControllerBy:[KWMDiscountVC kwmTag] fromStoryboard:@"ShopCart"];
discountVC.checkout = self.checkout;
discountVC.delegate = self;
[self.navigationController pushViewController:discountVC animated:YES];
self.isEditingDiscount = YES;
[self initData];
[self.tfDiscount becomeFirstResponder];
}
-(void)onClickDiscountCancel:(id)sender{
self.isEditingDiscount = NO;
[self initData];
[self.tfDiscount resignFirstResponder];
}
-(void)onClickDiscountConfirm:(id)sender{
if(self.checkout == nil){
[self showToast:@"未成功创建订单"];
return;
}
if([KWMStringUtil isBlank:self.tfDiscount.text]){
[self showToast:@"优惠码不能为空"];
return;
}
[self.tfDiscount resignFirstResponder];
[self showLoading];
__weak typeof(self) this = self;
[self.client updateCheckout:self.checkout completion:^(NSDictionary *dictionary, BUYCheckout *checkout, NSError *error) {
[this hideLoading];
if (error == nil && checkout && checkout.discount) {
this.checkout = checkout;
[this showToast:@"添加优惠码成功"];
[this flushCheckout:dictionary];
this.isEditingDiscount = NO;
[this initData];
}else {
[this showToast:@"添加优惠码失败"];
[this showError:error];
}
}];
}
//礼品卡页面
......@@ -429,6 +482,24 @@
[self startCheckout];
}
#pragma mark - UITextFieldDelegate
-(BOOL)textFieldShouldBeginEditing:(UITextField *)textField{
self.marginTopContent.constant = 22 - 200;
[UIView animateWithDuration:0.5 animations:^{
[self.view layoutIfNeeded];
}];
return YES;
}
//键盘弹出
-(void)keyboardWillHide:(NSNotification *)notification{
self.marginTopContent.constant = 22;
[UIView animateWithDuration:0.5 animations:^{
[self.view layoutIfNeeded];
}];
}
-(void)startCheckout{
if(self.checkout == nil){
[self showToast:@"未成功初始化订单"];
......@@ -485,23 +556,6 @@
[self showToast:errorMsg];
}
return errorMsg != nil;
// if(address == nil){
// [self showToast:@"您的地址尚未有任何地址,请前往选择地址"];
// return YES;
// }else if([KWMStringUtil isEmpty:address.firstName] && [KWMStringUtil isEmpty:address.lastName]){
// [self showToast:@"您的地址缺少收件人姓名,请前往完善地址"];
// return YES;
// }else if([KWMStringUtil isEmpty:address.city]){
// [self showToast:@"您的地址缺少所在城市,请前往完善地址"];
// return YES;
// }else if([KWMStringUtil isEmpty:address.zip]){
// [self showToast:@"您的地址缺少邮政编码,请前往完善地址"];
// return YES;
// }else if([KWMStringUtil isEmpty:address.phone]){
// [self showToast:@"您的地址缺少收件人电话号码,请前往完善地址"];
// return YES;
// }
// return NO;
}
......
......@@ -7,6 +7,8 @@
//
#import "KWMBaseVC.h"
#import "KWMRecommendView.h"
#import "KWMPPCacheUtil.h"
@interface KWMPaySuccessVC : KWMBaseVC
......@@ -16,12 +18,19 @@
@property (weak, nonatomic) IBOutlet UIButton *btnMyOrder;
@property (weak, nonatomic) IBOutlet UIButton *btnBackHome;
@property (weak, nonatomic) IBOutlet KWMRecommendView *hotRecommendView;
- (IBAction)onClickStartTime:(id)sender;
- (IBAction)onClickGetTime:(id)sender;
- (IBAction)onClickMyOrder:(id)sender;
- (IBAction)onClickBackHome:(id)sender;
//用于在跳转后的订单列表页面生成即时订单(支付后的订单需要一定时间后才能从订单列表获取)
@property (nonatomic) BUYCheckout *paidCheckout;
......
......@@ -13,7 +13,7 @@
#import "UIViewController+BackButtonHandler.h"
#import "KWMOrderVC.h"
@interface KWMPaySuccessVC ()
@interface KWMPaySuccessVC ()<KWMRecommendDelegate>
@end
......@@ -24,6 +24,9 @@
self.title = @"支付成功";
[self initButton];
[self requestProductWithHandle:@"products-list-app-homepage" tags:nil valueKeyPath:@"productArray"];
self.hotRecommendView.title = @"热卖单品";
self.hotRecommendView.delegate = self;
}
+(NSString *)kwmTag{
......@@ -45,6 +48,9 @@
self.btnMyOrder.layer.masksToBounds = YES;
self.btnMyOrder.layer.borderColor = [UIColor sam_colorWithHex:@"979797"].CGColor; //要设置的颜色
self.btnMyOrder.layer.borderWidth = 1; //要设置的描边宽
self.btnBackHome.layer.masksToBounds = YES;
self.btnBackHome.layer.borderColor = [UIColor sam_colorWithHex:@"979797"].CGColor; //要设置的颜色
self.btnBackHome.layer.borderWidth = 1; //要设置的描边宽
}
......@@ -70,11 +76,80 @@
[self.navigationController pushViewController:orderVC animated:YES];
}
-(void)onClickBackHome:(id)sender{
[self.navigationController popToRootViewControllerAnimated:YES];
}
-(BOOL) navigationShouldPopOnBackButton {
[self.navigationController popToRootViewControllerAnimated:YES];
return NO; // Ignore 'Back' button this time
}
#pragma mark KWMRecommendDelegate
-(void)kwm_gotoRecommendPage:(KWMRecommendView *)recommendView{
[self openURLWithString:@"https://cemarose.myshopify.com/collections/products-list-app-homepage?title=热卖单品"];
}
-(void)kwm_onClickProduct:(BUYProduct *)product{
[self openURLWithString:[NSString stringWithFormat:@"https://cemarose.myshopify.com/products/%@",product.handle]];
}
#pragma makr - api
- (void) requestProductWithHandle:(NSString *) handle tags:(NSArray *) tags valueKeyPath:(nonnull NSString *) valueKeyPath {
NSDictionary *parameters = [KWMPPCacheUtil getProductCacheKeyDictionary:1 tags:tags handle:handle];
BOOL useProductDataCache = [self useProductDataCache:parameters valueKeyPath:valueKeyPath page:1];
__weak KWMPaySuccessVC *weakSelf = self;
[self.client getCollectionByHandle:handle completion:^(BUYCollection * _Nullable collection, NSError * _Nullable error) {
if (!error) {
[weakSelf.client getProductsPage:1 inCollection:collection.identifier withTags:tags sortOrder:BUYCollectionSortCollectionDefault completion:^(NSArray<BUYProduct *> * _Nullable products, NSUInteger page, BOOL reachedEnd, NSError * _Nullable error) {
if (!error) {
[KWMPPCacheUtil saveDataToCache:parameters urlKey:CACHE_KEY_SDK_getCollectionByHandle_getProductsPage products:products];
if(products){
NSArray *productIds;
@try {
if(self.paidCheckout && self.paidCheckout.lineItemsArray){
productIds = [[self.paidCheckout.lineItems array] rx_mapWithBlock:^id(BUYLineItem* each) {
NSNumber *a = each.productId ?: @(0);
return a;
}];
}
}
@catch (NSException *exception) {
// 捕获到的异常exception
}
self.hotRecommendView.productArray = products;
self.hotRecommendView.boughtProductIdArray = productIds;
}
}
}];
}
}];
}
-(BOOL)useProductDataCache:(NSDictionary *)cacheKeyDictionary valueKeyPath:(NSString *)valueKeyPath page:(NSUInteger)page{
if(!kIsNetwork || page == 1){
NSArray *productIds;
NSArray *products = [KWMPPCacheUtil getProductDataByCache:cacheKeyDictionary urlKey:CACHE_KEY_SDK_getCollectionByHandle_getProductsPage];
if(products && products.count > 0){
@try {
if(self.paidCheckout && self.paidCheckout.lineItemsArray){
productIds = [[self.paidCheckout.lineItems array] rx_mapWithBlock:^id(BUYLineItem* each) {
NSNumber *a = each.productId ?: @(0);
return a;
}];
}
}
@catch (NSException *exception) {
// 捕获到的异常exception
}
self.hotRecommendView.productArray = products;
self.hotRecommendView.boughtProductIdArray = productIds;
}else{
return false;
}
}
return !kIsNetwork;
}
@end
......@@ -17,8 +17,12 @@
#import "KWMCategoryVC.h"
#import "KWMStringUtil.h"
#import "KWMShoppingCart.h"
#import "KWMRecommendView.h"
#import "KWMPPCacheUtil.h"
@interface KWMShopCartVC ()<UIAlertViewDelegate>
@interface KWMShopCartVC ()<UIAlertViewDelegate,KWMRecommendDelegate>
@property (nonatomic, weak) IBOutlet KWMRecommendView *newestRecommendView;
@property (nonatomic, weak) IBOutlet KWMRecommendView *mainRecommendView;
@property (nonatomic) NSMutableArray *shopCartList;
@property (nonatomic, strong) NSMutableArray *soldout;
@end
......@@ -53,6 +57,10 @@
[self setTotalPrice];
[self checkInStockAndRefresh];
self.newestRecommendView.title = @"最新单品";
self.mainRecommendView.title = @"主推单品";
self.newestRecommendView.delegate = self;
self.mainRecommendView.delegate = self;
}
- (void) checkInStockAndRefresh {
......@@ -165,13 +173,9 @@
}
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
if (_shopCartList.count == 0) {
self.vBackground.hidden = NO;
}else{
self.vBackground.hidden = YES;
}
return _shopCartList.count;
NSInteger count = self.shopCartList ? self.shopCartList.count : 0;
self.vBackground.hidden = count != 0;
return count;
}
#pragma mark UITableViewDelegate
......@@ -225,6 +229,19 @@
}
}
#pragma mark KWMRecommendDelegate
-(void)kwm_gotoRecommendPage:(KWMRecommendView *)recommendView{
if(recommendView.tag == 1){
[self openURLWithString:@"https://cemarose.myshopify.com/collections/new?title=最新单品"];
}else{
[self openURLWithString:@"https://cemarose.myshopify.com/collections/hot-sell-app?title=主推单品"];
}
}
-(void)kwm_onClickProduct:(BUYProduct *)product{
[self openURLWithString:[NSString stringWithFormat:@"https://cemarose.myshopify.com/products/%@",product.handle]];
}
- (void)kwm_onClickDelete:(KWMShopCartModel *)shopCartModel{
self.vDelete.hidden = NO;
self.vDelete.delegate = self;
......@@ -356,6 +373,11 @@
self.shopCartList = [[KWMShoppingCart sharedInstance] items];
[self.tbvCart reloadData];
[self setTotalPrice];
if(! self.shopCartList || self.shopCartList.count == 0){
//请求推荐商品数据
[self requestProductWithHandle:@"new" tags:nil valueKeyPath:@"newestRecommendView"];
[self requestProductWithHandle:@"hot-sell-app" tags:nil valueKeyPath:@"mainRecommendView"];
}
// [self.client getProductsByIds:[self.shopCartList rx_mapWithBlock:^id(KWMShopCartModel *each) {
// return each.product_id;
// }] completion:^(NSArray<BUYProduct *> * _Nullable products, NSError * _Nullable error) {
......@@ -380,4 +402,44 @@
_lbTotalPrice.text = total.priceFormatted;
}
#pragma makr - api
- (void) requestProductWithHandle:(NSString *) handle tags:(NSArray *) tags valueKeyPath:(nonnull NSString *) valueKeyPath {
NSDictionary *parameters = [KWMPPCacheUtil getProductCacheKeyDictionary:1 tags:tags handle:handle];
BOOL useProductDataCache = [self useProductDataCache:parameters valueKeyPath:valueKeyPath page:1];
__weak KWMShopCartVC *weakSelf = self;
[self.client getCollectionByHandle:handle completion:^(BUYCollection * _Nullable collection, NSError * _Nullable error) {
if (!error) {
[weakSelf.client getProductsPage:1 inCollection:collection.identifier withTags:tags sortOrder:BUYCollectionSortCollectionDefault completion:^(NSArray<BUYProduct *> * _Nullable products, NSUInteger page, BOOL reachedEnd, NSError * _Nullable error) {
if (!error) {
[KWMPPCacheUtil saveDataToCache:parameters urlKey:CACHE_KEY_SDK_getCollectionByHandle_getProductsPage products:products];
if(products){
if([valueKeyPath isEqualToString:@"newestRecommendView"]){
weakSelf.newestRecommendView.productArray = products;
}else{
weakSelf.mainRecommendView.productArray = products;
}
}
}
}];
}
}];
}
-(BOOL)useProductDataCache:(NSDictionary *)cacheKeyDictionary valueKeyPath:(NSString *)valueKeyPath page:(NSUInteger)page{
if(!kIsNetwork || page == 1){
NSArray *products = [KWMPPCacheUtil getProductDataByCache:cacheKeyDictionary urlKey:CACHE_KEY_SDK_getCollectionByHandle_getProductsPage];
if(products && products.count > 0){
if([valueKeyPath isEqualToString:@"newestRecommendView"]){
self.newestRecommendView.productArray = products;
}else{
self.mainRecommendView.productArray = products;
}
}else{
return false;
}
}
return !kIsNetwork;
}
@end
......@@ -81,10 +81,16 @@
</constraints>
</view>
<view hidden="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="dhG-84-LF2">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<rect key="frame" x="0.0" y="21" width="375" height="646"/>
<subviews>
<scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="E2g-oV-Dfz">
<rect key="frame" x="0.0" y="0.0" width="375" height="646"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="mfW-gg-QcG" userLabel="content">
<rect key="frame" x="0.0" y="0.0" width="374" height="679"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="您的购物车暂无商品" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="fYc-B5-hMg">
<rect key="frame" x="99" y="324" width="178" height="19"/>
<rect key="frame" x="98" y="80" width="178" height="19"/>
<constraints>
<constraint firstAttribute="height" constant="19" id="Vfn-JL-87E"/>
<constraint firstAttribute="width" constant="178" id="jeS-ow-chM"/>
......@@ -94,7 +100,7 @@
<color key="highlightedColor" red="0.30588235294117649" green="0.30588235294117649" blue="0.30588235294117649" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="mpJ-rx-b9c">
<rect key="frame" x="148" y="363" width="80" height="25"/>
<rect key="frame" x="147" y="114" width="80" height="25"/>
<constraints>
<constraint firstAttribute="width" constant="80" id="ZD2-l9-Vsa"/>
</constraints>
......@@ -107,13 +113,52 @@
<action selector="onClickRandomBtn:" destination="A3A-mQ-3Aw" eventType="touchUpInside" id="0ei-IK-RXc"/>
</connections>
</button>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Dpz-Vi-bYg" customClass="KWMRecommendView">
<rect key="frame" x="0.0" y="219" width="374" height="230"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="height" constant="230" id="pqL-xs-Vcm"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="B7u-NF-Ik7" customClass="KWMRecommendView">
<rect key="frame" x="0.0" y="449" width="374" height="230"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="height" constant="230" id="bMg-ls-I5X"/>
</constraints>
</view>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstItem="mpJ-rx-b9c" firstAttribute="centerX" secondItem="mfW-gg-QcG" secondAttribute="centerX" id="2Hk-nD-lKt"/>
<constraint firstItem="fYc-B5-hMg" firstAttribute="top" secondItem="mfW-gg-QcG" secondAttribute="top" constant="80" id="DFd-Qy-sD8"/>
<constraint firstAttribute="trailing" secondItem="Dpz-Vi-bYg" secondAttribute="trailing" id="JzX-sz-KKi"/>
<constraint firstItem="B7u-NF-Ik7" firstAttribute="top" secondItem="Dpz-Vi-bYg" secondAttribute="bottom" id="MPW-2X-33D"/>
<constraint firstAttribute="trailing" secondItem="B7u-NF-Ik7" secondAttribute="trailing" id="NRx-gQ-wsI"/>
<constraint firstItem="B7u-NF-Ik7" firstAttribute="leading" secondItem="mfW-gg-QcG" secondAttribute="leading" id="YUq-W4-zbb"/>
<constraint firstItem="Dpz-Vi-bYg" firstAttribute="leading" secondItem="mfW-gg-QcG" secondAttribute="leading" id="Z9Q-eW-6a9"/>
<constraint firstItem="fYc-B5-hMg" firstAttribute="centerX" secondItem="mfW-gg-QcG" secondAttribute="centerX" id="fCw-vo-LWj"/>
<constraint firstItem="mpJ-rx-b9c" firstAttribute="top" secondItem="fYc-B5-hMg" secondAttribute="bottom" constant="15" id="i8p-Ql-PXa"/>
<constraint firstAttribute="bottom" secondItem="B7u-NF-Ik7" secondAttribute="bottom" id="ne7-ML-gDu"/>
<constraint firstItem="Dpz-Vi-bYg" firstAttribute="top" secondItem="mpJ-rx-b9c" secondAttribute="bottom" constant="80" id="prc-wY-0wg"/>
</constraints>
</view>
</subviews>
<constraints>
<constraint firstItem="mfW-gg-QcG" firstAttribute="top" secondItem="E2g-oV-Dfz" secondAttribute="top" id="4i6-JJ-uy4"/>
<constraint firstAttribute="trailing" secondItem="mfW-gg-QcG" secondAttribute="trailing" id="Jly-IN-M6N"/>
<constraint firstAttribute="bottom" secondItem="mfW-gg-QcG" secondAttribute="bottom" id="PFx-p9-L4K"/>
<constraint firstItem="mfW-gg-QcG" firstAttribute="leading" secondItem="E2g-oV-Dfz" secondAttribute="leading" id="ebF-Cd-oRI"/>
<constraint firstItem="mfW-gg-QcG" firstAttribute="centerX" secondItem="E2g-oV-Dfz" secondAttribute="centerX" id="hvW-Ei-CU4"/>
</constraints>
</scrollView>
</subviews>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="fYc-B5-hMg" firstAttribute="centerY" secondItem="dhG-84-LF2" secondAttribute="centerY" id="DVu-zF-1td"/>
<constraint firstItem="fYc-B5-hMg" firstAttribute="centerX" secondItem="dhG-84-LF2" secondAttribute="centerX" id="UWw-ka-lFZ"/>
<constraint firstItem="mpJ-rx-b9c" firstAttribute="top" secondItem="fYc-B5-hMg" secondAttribute="bottom" constant="20" id="c1a-RE-4m8"/>
<constraint firstItem="mpJ-rx-b9c" firstAttribute="centerX" secondItem="fYc-B5-hMg" secondAttribute="centerX" id="nIM-JD-0wh"/>
<constraint firstItem="E2g-oV-Dfz" firstAttribute="top" secondItem="dhG-84-LF2" secondAttribute="top" id="D80-tZ-9M9"/>
<constraint firstAttribute="bottom" secondItem="E2g-oV-Dfz" secondAttribute="bottom" id="SSu-Pr-lHR"/>
<constraint firstItem="E2g-oV-Dfz" firstAttribute="leading" secondItem="dhG-84-LF2" secondAttribute="leading" id="VDp-RW-mFC"/>
<constraint firstAttribute="trailing" secondItem="E2g-oV-Dfz" secondAttribute="trailing" id="YHr-gf-Rne"/>
</constraints>
</view>
<view hidden="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="sSj-dM-fFH" customClass="KWMDeleteView">
......@@ -138,9 +183,8 @@
<constraint firstItem="Dak-2L-vlZ" firstAttribute="leading" secondItem="eZd-0g-0dl" secondAttribute="leading" id="9h4-e8-KgS"/>
<constraint firstItem="sSj-dM-fFH" firstAttribute="leading" secondItem="eZd-0g-0dl" secondAttribute="leading" id="D3b-x8-dx2"/>
<constraint firstItem="NfP-ox-q3K" firstAttribute="top" secondItem="Dak-2L-vlZ" secondAttribute="bottom" id="Fzd-Cf-VAq"/>
<constraint firstItem="dhG-84-LF2" firstAttribute="top" secondItem="eZd-0g-0dl" secondAttribute="top" id="SwY-v9-H0y"/>
<constraint firstItem="dhG-84-LF2" firstAttribute="top" secondItem="k8A-rc-sdg" secondAttribute="bottom" id="U3U-M9-NrZ"/>
<constraint firstItem="sSj-dM-fFH" firstAttribute="top" secondItem="eZd-0g-0dl" secondAttribute="top" id="aRJ-p9-Erc"/>
<constraint firstItem="dhG-84-LF2" firstAttribute="centerY" secondItem="eZd-0g-0dl" secondAttribute="centerY" id="aSb-yV-Xjx"/>
<constraint firstAttribute="bottom" secondItem="NfP-ox-q3K" secondAttribute="bottom" id="nue-gB-FxL"/>
<constraint firstItem="NfP-ox-q3K" firstAttribute="leading" secondItem="eZd-0g-0dl" secondAttribute="leading" id="nv2-sL-9Y9"/>
<constraint firstItem="Dak-2L-vlZ" firstAttribute="top" secondItem="eZd-0g-0dl" secondAttribute="top" id="pv4-tG-A94"/>
......@@ -154,6 +198,8 @@
<connections>
<outlet property="btnRandom" destination="mpJ-rx-b9c" id="EbJ-V6-kp6"/>
<outlet property="lbTotalPrice" destination="JEi-kv-QfH" id="Fef-yf-nkH"/>
<outlet property="mainRecommendView" destination="B7u-NF-Ik7" id="79l-z4-tBw"/>
<outlet property="newestRecommendView" destination="Dpz-Vi-bYg" id="f3g-5b-SKK"/>
<outlet property="tbvCart" destination="Dak-2L-vlZ" id="Ek8-gV-ASp"/>
<outlet property="vBackground" destination="dhG-84-LF2" id="Zav-74-Ogn"/>
<outlet property="vDelete" destination="sSj-dM-fFH" id="OQv-SW-v52"/>
......@@ -161,7 +207,7 @@
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="e7Y-ej-nID" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="249" y="170"/>
<point key="canvasLocation" x="248.80000000000001" y="169.56521739130437"/>
</scene>
<!--收货地址-->
<scene sceneID="ioM-eK-Y5z">
......@@ -393,7 +439,7 @@
<rect key="frame" x="0.0" y="223" width="375" height="118"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="¥ 0.00" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="hix-Co-z5J">
<rect key="frame" x="157.5" y="15" width="60.5" height="28"/>
<rect key="frame" x="158" y="15" width="60" height="28"/>
<fontDescription key="fontDescription" name="PingFangSC-Medium" family="PingFang SC" pointSize="20"/>
<color key="textColor" red="0.94509803920000002" green="0.57254901960000004" blue="0.60392156860000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
......@@ -602,8 +648,8 @@
<scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="lUQ-J5-kOq">
<rect key="frame" x="0.0" y="0.0" width="375" height="549"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="BlA-Cz-DcE">
<rect key="frame" x="0.0" y="0.0" width="374" height="522"/>
<view contentMode="scaleToFill" misplaced="YES" translatesAutoresizingMaskIntoConstraints="NO" id="BlA-Cz-DcE">
<rect key="frame" x="0.0" y="-222" width="374" height="562"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="寄送地址" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="MY5-C7-Kcb">
<rect key="frame" x="30" y="22" width="60" height="21"/>
......@@ -689,7 +735,7 @@
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Yux-Ro-p2d" userLabel="支付方式">
<rect key="frame" x="0.0" y="145" width="374" height="95"/>
<rect key="frame" x="0.0" y="145" width="374" height="135"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="d3K-2Z-bMD" userLabel="支付">
<rect key="frame" x="0.0" y="0.0" width="374" height="55"/>
......@@ -708,51 +754,120 @@
<constraint firstItem="Afz-nz-wCb" firstAttribute="leading" secondItem="d3K-2Z-bMD" secondAttribute="leading" constant="30" id="UMX-hS-jD3"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="1ep-3i-rAZ" userLabel="v支付方式">
<view tag="1" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="0t9-CT-iWp" userLabel="支付宝">
<rect key="frame" x="0.0" y="55" width="374" height="40"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="请选择一种付款方式" textAlignment="natural" lineBreakMode="characterWrap" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Fr9-gU-u2X">
<rect key="frame" x="30" y="12" width="314" height="17"/>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="支付宝支付" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ZTw-Ec-fab">
<rect key="frame" x="30" y="11.5" width="60" height="17"/>
<fontDescription key="fontDescription" name="PingFangSC-Regular" family="PingFang SC" pointSize="12"/>
<color key="textColor" red="0.22352941179999999" green="0.22352941179999999" blue="0.22352941179999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color key="textColor" red="0.30588235289999999" green="0.30588235289999999" blue="0.30588235289999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="3Ed-rJ-foG">
<rect key="frame" x="324" y="10" width="20" height="20"/>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Jh2-0e-Ceb" userLabel="line">
<rect key="frame" x="0.0" y="39" width="374" height="1"/>
<color key="backgroundColor" red="0.84705882349999995" green="0.85882352939999995" blue="0.87058823529999996" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="height" constant="20" id="F3M-l6-kCX"/>
<constraint firstAttribute="width" constant="20" id="ULG-n2-05F"/>
<constraint firstAttribute="height" constant="1" id="HTJ-Ty-IZI"/>
</constraints>
<state key="normal" image="button_order_deit"/>
</view>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="ic_choose_sel" translatesAutoresizingMaskIntoConstraints="NO" id="qA8-Up-cG8">
<rect key="frame" x="329" y="12.5" width="15" height="15"/>
<constraints>
<constraint firstAttribute="width" constant="15" id="Am7-8O-RUu"/>
<constraint firstAttribute="height" constant="15" id="FYw-Li-qLW"/>
</constraints>
</imageView>
</subviews>
<color key="backgroundColor" red="0.95686274510000002" green="0.96078431369999995" blue="0.96862745100000003" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="height" constant="40" id="32w-IK-79o"/>
<constraint firstItem="Jh2-0e-Ceb" firstAttribute="leading" secondItem="0t9-CT-iWp" secondAttribute="leading" id="QDx-29-HUV"/>
<constraint firstAttribute="bottom" secondItem="ZTw-Ec-fab" secondAttribute="bottom" id="V7G-gU-cS8"/>
<constraint firstAttribute="bottom" secondItem="Jh2-0e-Ceb" secondAttribute="bottom" id="Wdy-jS-ub1"/>
<constraint firstItem="ZTw-Ec-fab" firstAttribute="top" secondItem="0t9-CT-iWp" secondAttribute="top" id="gyr-wF-w2J"/>
<constraint firstAttribute="trailing" secondItem="Jh2-0e-Ceb" secondAttribute="trailing" id="hUA-Rx-NPH"/>
<constraint firstItem="qA8-Up-cG8" firstAttribute="centerY" secondItem="0t9-CT-iWp" secondAttribute="centerY" id="j47-nG-wrd"/>
<constraint firstAttribute="trailing" secondItem="qA8-Up-cG8" secondAttribute="trailing" constant="30" id="kYM-dI-919"/>
<constraint firstItem="ZTw-Ec-fab" firstAttribute="leading" secondItem="0t9-CT-iWp" secondAttribute="leading" constant="30" id="sXw-lU-ohe"/>
<constraint firstItem="ZTw-Ec-fab" firstAttribute="centerY" secondItem="0t9-CT-iWp" secondAttribute="centerY" id="w0q-gc-guw"/>
</constraints>
<variation key="default">
<mask key="constraints">
<exclude reference="V7G-gU-cS8"/>
<exclude reference="gyr-wF-w2J"/>
</mask>
</variation>
<connections>
<outletCollection property="gestureRecognizers" destination="aLt-AM-zGa" appends="YES" id="k32-ow-FRi"/>
<outletCollection property="gestureRecognizers" destination="aLt-AM-zGa" appends="YES" id="d7k-HE-2Lk"/>
</connections>
</button>
</view>
<view tag="2" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="SQP-ML-8dW" userLabel="微信">
<rect key="frame" x="0.0" y="95" width="374" height="40"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="微信支付" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="I1W-Yg-7VA">
<rect key="frame" x="30" y="12" width="48" height="17"/>
<fontDescription key="fontDescription" name="PingFangSC-Regular" family="PingFang SC" pointSize="12"/>
<color key="textColor" red="0.30588235289999999" green="0.30588235289999999" blue="0.30588235289999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="B9t-Fw-Xfq" userLabel="line">
<rect key="frame" x="0.0" y="39" width="374" height="1"/>
<color key="backgroundColor" red="0.84705882349999995" green="0.85882352939999995" blue="0.87058823529999996" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="E5z-EV-AmJ"/>
</constraints>
</view>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="ic_choose_nor" translatesAutoresizingMaskIntoConstraints="NO" id="RK9-ZZ-KNx">
<rect key="frame" x="329" y="12.5" width="15" height="15"/>
<constraints>
<constraint firstAttribute="width" constant="15" id="CaA-Ht-9GE"/>
<constraint firstAttribute="height" constant="15" id="Let-ex-vMV"/>
</constraints>
</imageView>
</subviews>
<color key="backgroundColor" red="0.95686274510000002" green="0.96078431369999995" blue="0.96862745100000003" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="trailing" secondItem="3Ed-rJ-foG" secondAttribute="trailing" constant="30" id="57V-oG-ci0"/>
<constraint firstAttribute="trailing" secondItem="Fr9-gU-u2X" secondAttribute="trailing" constant="30" id="M7U-Jv-ok2"/>
<constraint firstItem="3Ed-rJ-foG" firstAttribute="centerY" secondItem="1ep-3i-rAZ" secondAttribute="centerY" id="Ugt-Rl-La6"/>
<constraint firstItem="Fr9-gU-u2X" firstAttribute="leading" secondItem="1ep-3i-rAZ" secondAttribute="leading" constant="30" id="fcL-xz-nJH"/>
<constraint firstItem="Fr9-gU-u2X" firstAttribute="centerY" secondItem="1ep-3i-rAZ" secondAttribute="centerY" id="zUq-aP-qzD"/>
<constraint firstAttribute="height" constant="40" id="zbx-Pl-0TZ"/>
<constraint firstItem="I1W-Yg-7VA" firstAttribute="top" secondItem="SQP-ML-8dW" secondAttribute="top" id="6Kz-Cu-2H6"/>
<constraint firstAttribute="bottom" secondItem="B9t-Fw-Xfq" secondAttribute="bottom" id="8Pe-Nl-bDS"/>
<constraint firstItem="B9t-Fw-Xfq" firstAttribute="leading" secondItem="I1W-Yg-7VA" secondAttribute="trailing" id="FFb-eI-WhB"/>
<constraint firstItem="RK9-ZZ-KNx" firstAttribute="centerY" secondItem="SQP-ML-8dW" secondAttribute="centerY" id="Glr-Qk-jDv"/>
<constraint firstItem="I1W-Yg-7VA" firstAttribute="leading" secondItem="SQP-ML-8dW" secondAttribute="leading" constant="30" id="JdO-uB-Pg6"/>
<constraint firstItem="B9t-Fw-Xfq" firstAttribute="leading" secondItem="SQP-ML-8dW" secondAttribute="leading" id="JoY-h9-aCp"/>
<constraint firstAttribute="bottom" secondItem="I1W-Yg-7VA" secondAttribute="bottom" id="LwS-F0-IaT"/>
<constraint firstAttribute="height" constant="40" id="e48-qe-S93"/>
<constraint firstAttribute="trailing" secondItem="RK9-ZZ-KNx" secondAttribute="trailing" constant="30" id="oa7-YE-qYE"/>
<constraint firstItem="I1W-Yg-7VA" firstAttribute="centerY" secondItem="SQP-ML-8dW" secondAttribute="centerY" id="tOY-l3-6t4"/>
<constraint firstAttribute="trailing" secondItem="B9t-Fw-Xfq" secondAttribute="trailing" id="xeI-uE-TZl"/>
</constraints>
<variation key="default">
<mask key="constraints">
<exclude reference="6Kz-Cu-2H6"/>
<exclude reference="LwS-F0-IaT"/>
<exclude reference="FFb-eI-WhB"/>
</mask>
</variation>
<connections>
<outletCollection property="gestureRecognizers" destination="b82-TH-poK" appends="YES" id="hYg-u1-Ab1"/>
</connections>
</view>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstItem="d3K-2Z-bMD" firstAttribute="leading" secondItem="Yux-Ro-p2d" secondAttribute="leading" id="4bm-GZ-rkF"/>
<constraint firstAttribute="height" constant="95" id="CG5-Ai-UwP"/>
<constraint firstItem="SQP-ML-8dW" firstAttribute="leading" secondItem="Yux-Ro-p2d" secondAttribute="leading" id="4y0-F0-46w"/>
<constraint firstAttribute="height" constant="135" id="CG5-Ai-UwP"/>
<constraint firstItem="0t9-CT-iWp" firstAttribute="top" secondItem="d3K-2Z-bMD" secondAttribute="bottom" id="Efi-PE-Kd7"/>
<constraint firstItem="0t9-CT-iWp" firstAttribute="leading" secondItem="Yux-Ro-p2d" secondAttribute="leading" id="Mhy-fS-gKb"/>
<constraint firstItem="d3K-2Z-bMD" firstAttribute="top" secondItem="Yux-Ro-p2d" secondAttribute="top" id="QfR-4b-sNf"/>
<constraint firstItem="SQP-ML-8dW" firstAttribute="top" secondItem="0t9-CT-iWp" secondAttribute="bottom" id="V0o-ol-vuj"/>
<constraint firstAttribute="trailing" secondItem="0t9-CT-iWp" secondAttribute="trailing" id="aBZ-aN-Fmc"/>
<constraint firstAttribute="trailing" secondItem="SQP-ML-8dW" secondAttribute="trailing" id="cti-BK-87R"/>
<constraint firstAttribute="trailing" secondItem="d3K-2Z-bMD" secondAttribute="trailing" id="gDq-ll-USd"/>
<constraint firstItem="1ep-3i-rAZ" firstAttribute="leading" secondItem="Yux-Ro-p2d" secondAttribute="leading" id="lFv-Kv-G8N"/>
<constraint firstItem="1ep-3i-rAZ" firstAttribute="top" secondItem="d3K-2Z-bMD" secondAttribute="bottom" id="o84-jd-8ls"/>
<constraint firstAttribute="trailing" secondItem="1ep-3i-rAZ" secondAttribute="trailing" id="q6K-5w-m6s"/>
<constraint firstItem="SQP-ML-8dW" firstAttribute="top" secondItem="0t9-CT-iWp" secondAttribute="bottom" id="mcO-O3-PsN"/>
</constraints>
</view>
<view hidden="YES" clipsSubviews="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="p5p-5f-gFk" userLabel="清关信息">
<rect key="frame" x="0.0" y="240" width="374" height="0.0"/>
<rect key="frame" x="0.0" y="280" width="374" height="0.0"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="eN3-dd-3jc">
<rect key="frame" x="0.0" y="0.0" width="374" height="55"/>
......@@ -815,13 +930,13 @@
</constraints>
</view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="配送方式" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Hsl-7w-xKW" userLabel="配送">
<rect key="frame" x="30" y="262" width="60" height="21"/>
<rect key="frame" x="30" y="302" width="60" height="21"/>
<fontDescription key="fontDescription" name="PingFangSC-Regular" family="PingFang SC" pointSize="15"/>
<color key="textColor" red="0.21960784310000001" green="0.21960784310000001" blue="0.21960784310000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="BOf-h7-67C" userLabel="v配送">
<rect key="frame" x="0.0" y="295" width="374" height="39"/>
<rect key="frame" x="0.0" y="335" width="374" height="39"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="请选择配送方式" textAlignment="natural" lineBreakMode="characterWrap" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="pVN-aG-lfu">
<rect key="frame" x="30" y="11" width="314" height="17"/>
......@@ -830,10 +945,10 @@
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="NLd-j2-QfA">
<rect key="frame" x="324" y="10" width="20" height="20"/>
<rect key="frame" x="314" y="0.0" width="40" height="40"/>
<constraints>
<constraint firstAttribute="height" constant="20" id="F64-dO-dOC"/>
<constraint firstAttribute="width" constant="20" id="Nte-ol-YAV"/>
<constraint firstAttribute="height" constant="40" id="F64-dO-dOC"/>
<constraint firstAttribute="width" constant="40" id="Nte-ol-YAV"/>
</constraints>
<state key="normal" image="button_order_deit"/>
<connections>
......@@ -847,18 +962,18 @@
<constraint firstAttribute="height" constant="39" id="Hyj-oK-dyN"/>
<constraint firstItem="pVN-aG-lfu" firstAttribute="leading" secondItem="BOf-h7-67C" secondAttribute="leading" constant="30" id="KYY-vC-ia0"/>
<constraint firstItem="NLd-j2-QfA" firstAttribute="centerY" secondItem="BOf-h7-67C" secondAttribute="centerY" id="RvI-H6-B6M"/>
<constraint firstAttribute="trailing" secondItem="NLd-j2-QfA" secondAttribute="trailing" constant="30" id="ShM-Cx-tjp"/>
<constraint firstAttribute="trailing" secondItem="NLd-j2-QfA" secondAttribute="trailing" constant="20" id="ShM-Cx-tjp"/>
<constraint firstAttribute="trailing" secondItem="pVN-aG-lfu" secondAttribute="trailing" constant="30" id="mp4-Bl-gsC"/>
</constraints>
</view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="礼品卡" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="meM-14-BFw" userLabel="礼品卡">
<rect key="frame" x="30" y="356" width="45" height="21"/>
<rect key="frame" x="30" y="396" width="45" height="21"/>
<fontDescription key="fontDescription" name="PingFangSC-Regular" family="PingFang SC" pointSize="15"/>
<color key="textColor" red="0.21960784310000001" green="0.21960784310000001" blue="0.21960784310000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="3g3-iU-dSA" userLabel="v礼品卡">
<rect key="frame" x="0.0" y="389" width="374" height="39"/>
<rect key="frame" x="0.0" y="429" width="374" height="39"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="请输入礼品卡" textAlignment="natural" lineBreakMode="characterWrap" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="2lC-1w-Lfh">
<rect key="frame" x="30" y="11" width="314" height="17"/>
......@@ -867,10 +982,10 @@
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="KWz-4a-4cN">
<rect key="frame" x="324" y="10" width="20" height="20"/>
<rect key="frame" x="314" y="0.0" width="40" height="40"/>
<constraints>
<constraint firstAttribute="height" constant="20" id="CfT-Ob-p0q"/>
<constraint firstAttribute="width" constant="20" id="mVF-VS-Hor"/>
<constraint firstAttribute="height" constant="40" id="CfT-Ob-p0q"/>
<constraint firstAttribute="width" constant="40" id="mVF-VS-Hor"/>
</constraints>
<state key="normal" image="button_order_deit"/>
<connections>
......@@ -882,46 +997,81 @@
<constraints>
<constraint firstAttribute="trailing" secondItem="2lC-1w-Lfh" secondAttribute="trailing" constant="30" id="4lR-e2-c0z"/>
<constraint firstItem="2lC-1w-Lfh" firstAttribute="leading" secondItem="3g3-iU-dSA" secondAttribute="leading" constant="30" id="XNK-em-UQ0"/>
<constraint firstAttribute="trailing" secondItem="KWz-4a-4cN" secondAttribute="trailing" constant="30" id="gy6-mq-ZYR"/>
<constraint firstAttribute="trailing" secondItem="KWz-4a-4cN" secondAttribute="trailing" constant="20" id="gy6-mq-ZYR"/>
<constraint firstAttribute="height" constant="39" id="oQy-B4-b7L"/>
<constraint firstItem="KWz-4a-4cN" firstAttribute="centerY" secondItem="3g3-iU-dSA" secondAttribute="centerY" id="s2P-bM-AOg"/>
<constraint firstItem="2lC-1w-Lfh" firstAttribute="centerY" secondItem="3g3-iU-dSA" secondAttribute="centerY" id="x7E-Dd-tDj"/>
</constraints>
</view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="优惠码" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="LpT-uQ-5JS" userLabel="优惠码">
<rect key="frame" x="30" y="450" width="45" height="21"/>
<rect key="frame" x="30" y="490" width="45" height="21"/>
<fontDescription key="fontDescription" name="PingFangSC-Regular" family="PingFang SC" pointSize="15"/>
<color key="textColor" red="0.21960784310000001" green="0.21960784310000001" blue="0.21960784310000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Wga-vh-5gr" userLabel="v优惠码">
<rect key="frame" x="0.0" y="483" width="374" height="39"/>
<rect key="frame" x="0.0" y="523" width="374" height="39"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="请输入优惠码" textAlignment="natural" lineBreakMode="characterWrap" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="7E5-kf-ON8">
<rect key="frame" x="30" y="11" width="314" height="17"/>
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="请输入优惠码" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="O0I-6i-BPd">
<rect key="frame" x="30" y="10.5" width="244" height="17"/>
<nil key="textColor"/>
<fontDescription key="fontDescription" name="PingFangSC-Regular" family="PingFang SC" pointSize="12"/>
<color key="textColor" red="0.22352941179999999" green="0.22352941179999999" blue="0.22352941179999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<textInputTraits key="textInputTraits"/>
<connections>
<outlet property="delegate" destination="96G-49-ueh" id="YL6-b9-2HH"/>
</connections>
</textField>
<button hidden="YES" opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Njp-Tr-7rt">
<rect key="frame" x="314" y="-0.5" width="40" height="40"/>
<constraints>
<constraint firstAttribute="width" constant="40" id="J6y-02-BFY"/>
<constraint firstAttribute="height" constant="40" id="twm-DT-q22"/>
</constraints>
<fontDescription key="fontDescription" name="PingFangSC-Regular" family="PingFang SC" pointSize="12"/>
<state key="normal" title="完成">
<color key="titleColor" red="0.22352941176470587" green="0.22352941176470587" blue="0.22352941176470587" alpha="1" colorSpace="calibratedRGB"/>
</state>
<connections>
<action selector="onClickDiscountConfirm:" destination="96G-49-ueh" eventType="touchUpInside" id="1db-hb-XV4"/>
</connections>
</button>
<button hidden="YES" opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="irm-07-UsY">
<rect key="frame" x="274" y="-1" width="40" height="40"/>
<constraints>
<constraint firstAttribute="height" constant="40" id="htz-1Y-hwa"/>
<constraint firstAttribute="width" constant="40" id="lTf-HK-V7k"/>
</constraints>
<fontDescription key="fontDescription" name="PingFangSC-Regular" family="PingFang SC" pointSize="12"/>
<state key="normal" title="取消">
<color key="titleColor" red="0.22352941179999999" green="0.22352941179999999" blue="0.22352941179999999" alpha="1" colorSpace="calibratedRGB"/>
</state>
<connections>
<action selector="onClickDiscountCancel:" destination="96G-49-ueh" eventType="touchUpInside" id="Pqo-di-Qga"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="DwA-xG-fhn">
<rect key="frame" x="324" y="10" width="20" height="20"/>
<rect key="frame" x="314" y="0.0" width="40" height="40"/>
<constraints>
<constraint firstAttribute="height" constant="20" id="0d1-DV-KQv"/>
<constraint firstAttribute="width" constant="20" id="57c-D7-820"/>
<constraint firstAttribute="height" constant="40" id="0d1-DV-KQv"/>
<constraint firstAttribute="width" constant="40" id="57c-D7-820"/>
</constraints>
<state key="normal" image="button_order_deit"/>
<connections>
<outletCollection property="gestureRecognizers" destination="MUf-e4-Ltu" appends="YES" id="jST-yg-832"/>
<action selector="onClickDiscount:" destination="96G-49-ueh" eventType="touchUpInside" id="OrH-Dt-0De"/>
</connections>
</button>
</subviews>
<color key="backgroundColor" red="0.95686274510000002" green="0.96078431369999995" blue="0.96862745100000003" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="7E5-kf-ON8" firstAttribute="centerY" secondItem="Wga-vh-5gr" secondAttribute="centerY" id="PJU-bd-Lyn"/>
<constraint firstAttribute="trailing" secondItem="Njp-Tr-7rt" secondAttribute="trailing" constant="20" id="CNZ-PQ-GSw"/>
<constraint firstItem="DwA-xG-fhn" firstAttribute="leading" secondItem="irm-07-UsY" secondAttribute="trailing" id="LnR-fb-4Jf"/>
<constraint firstItem="irm-07-UsY" firstAttribute="leading" secondItem="O0I-6i-BPd" secondAttribute="trailing" id="TlB-73-EAo"/>
<constraint firstItem="O0I-6i-BPd" firstAttribute="centerY" secondItem="Wga-vh-5gr" secondAttribute="centerY" id="WD2-Fv-zwU"/>
<constraint firstItem="irm-07-UsY" firstAttribute="centerY" secondItem="Wga-vh-5gr" secondAttribute="centerY" id="ZUz-4c-cf3"/>
<constraint firstItem="O0I-6i-BPd" firstAttribute="leading" secondItem="Wga-vh-5gr" secondAttribute="leading" constant="30" id="eZz-Gc-bK7"/>
<constraint firstAttribute="height" constant="39" id="fHQ-Qe-3sb"/>
<constraint firstAttribute="trailing" secondItem="7E5-kf-ON8" secondAttribute="trailing" constant="30" id="jM4-tK-eJX"/>
<constraint firstItem="7E5-kf-ON8" firstAttribute="leading" secondItem="Wga-vh-5gr" secondAttribute="leading" constant="30" id="mVC-1p-d0G"/>
<constraint firstAttribute="trailing" secondItem="DwA-xG-fhn" secondAttribute="trailing" constant="30" id="nUl-Ff-lDa"/>
<constraint firstItem="Njp-Tr-7rt" firstAttribute="centerY" secondItem="Wga-vh-5gr" secondAttribute="centerY" id="giA-jB-9Dz"/>
<constraint firstAttribute="trailing" secondItem="DwA-xG-fhn" secondAttribute="trailing" constant="20" id="nUl-Ff-lDa"/>
<constraint firstItem="DwA-xG-fhn" firstAttribute="centerY" secondItem="Wga-vh-5gr" secondAttribute="centerY" id="neD-uc-tQc"/>
</constraints>
</view>
......@@ -977,7 +1127,7 @@
<rect key="frame" x="0.0" y="549" width="375" height="118"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="¥ 0.00" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="fdr-W0-QCc">
<rect key="frame" x="157.5" y="15" width="60.5" height="28"/>
<rect key="frame" x="158" y="15" width="60" height="28"/>
<fontDescription key="fontDescription" name="PingFangSC-Medium" family="PingFang SC" pointSize="20"/>
<color key="textColor" red="0.94509803920000002" green="0.57254901960000004" blue="0.60392156860000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
......@@ -1033,20 +1183,25 @@
</constraints>
</view>
<connections>
<outlet property="btnDiscountCancel" destination="irm-07-UsY" id="cdU-Gk-Asv"/>
<outlet property="btnDiscountConfirm" destination="Njp-Tr-7rt" id="frr-7T-Bpb"/>
<outlet property="btnDiscountEdit" destination="DwA-xG-fhn" id="GpC-ph-2b3"/>
<outlet property="heightCustomsClearance" destination="s99-VF-fm4" id="5e1-GB-6Ei"/>
<outlet property="heightPayType" destination="CG5-Ai-UwP" id="QPf-PX-6P9"/>
<outlet property="ivAliPay" destination="qA8-Up-cG8" id="3Yp-Zb-XO6"/>
<outlet property="ivWechatPay" destination="RK9-ZZ-KNx" id="Uxo-Pt-8fR"/>
<outlet property="lbAddress" destination="z0p-CX-h3t" id="Imu-6N-5GL"/>
<outlet property="lbAddressDetail" destination="pnS-J7-TEY" id="kvk-bc-pgl"/>
<outlet property="lbCustomsClearance" destination="n4b-gy-dbB" id="gCj-lc-dpW"/>
<outlet property="lbDiscount" destination="7E5-kf-ON8" id="fYS-Bf-nSI"/>
<outlet property="lbGiftCard" destination="2lC-1w-Lfh" id="qgB-lu-d2a"/>
<outlet property="lbName" destination="DOa-mI-Adp" id="dCI-ct-wcu"/>
<outlet property="lbNoAddress" destination="jrD-RP-Kug" id="2gr-hq-IA1"/>
<outlet property="lbPayType" destination="Fr9-gU-u2X" id="951-Bu-erP"/>
<outlet property="lbPhone" destination="XAZ-es-XbK" id="3xN-ic-WmI"/>
<outlet property="lbShippingRate" destination="pVN-aG-lfu" id="YuB-rr-DOP"/>
<outlet property="lbTotalPrice" destination="fdr-W0-QCc" id="Cfi-P2-B3O"/>
<outlet property="marginTopContent" destination="58G-Ar-blr" id="0hg-Y4-Ske"/>
<outlet property="submit" destination="vT5-Az-K57" id="fwS-UU-AZ4"/>
<outlet property="tfDiscount" destination="O0I-6i-BPd" id="d3J-D9-wvt"/>
<outlet property="vAddressHeight" destination="zO1-RN-x44" id="VIC-wQ-AuJ"/>
<outlet property="vHasAddress" destination="gba-z6-T82" id="syf-hx-7rS"/>
<outlet property="vPayType" destination="Yux-Ro-p2d" id="qih-Ka-xDX"/>
......@@ -1063,14 +1218,14 @@
<action selector="onClickShipping:" destination="96G-49-ueh" id="8Ur-cr-PfF"/>
</connections>
</tapGestureRecognizer>
<tapGestureRecognizer id="aLt-AM-zGa" userLabel="tapPayType">
<tapGestureRecognizer id="aLt-AM-zGa" userLabel="tapPayTypeAliPay">
<connections>
<action selector="onClickPayType:" destination="96G-49-ueh" id="OBE-n5-6xG"/>
</connections>
</tapGestureRecognizer>
<tapGestureRecognizer id="MUf-e4-Ltu" userLabel="tapDiscount">
<tapGestureRecognizer id="b82-TH-poK" userLabel="tapPayTypeWechatPay">
<connections>
<action selector="onClickDiscount:" destination="96G-49-ueh" id="wVf-be-zPi"/>
<action selector="onClickPayType:" destination="96G-49-ueh" id="xdY-Ft-jR3"/>
</connections>
</tapGestureRecognizer>
<tapGestureRecognizer id="HXT-5x-KhM" userLabel="tapGiftCard">
......@@ -1645,17 +1800,23 @@
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="puG-Vo-gdd">
<rect key="frame" x="0.0" y="224" width="375" height="220"/>
<scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Vg2-sq-isc">
<rect key="frame" x="0.0" y="21" width="375" height="646"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="asp-5G-J9r" userLabel="content">
<rect key="frame" x="0.0" y="0.0" width="374" height="590"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="puG-Vo-gdd" userLabel="v问题">
<rect key="frame" x="0.0" y="40" width="374" height="280"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="你可能关心的问题" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="T4V-4O-WbC">
<rect key="frame" x="128" y="0.0" width="120" height="21"/>
<rect key="frame" x="127" y="0.0" width="120" height="21"/>
<fontDescription key="fontDescription" name="PingFangSC-Regular" family="PingFang SC" pointSize="15"/>
<color key="textColor" red="0.22352941176470587" green="0.22352941176470587" blue="0.22352941176470587" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="3MF-En-1mW">
<rect key="frame" x="133" y="55" width="110" height="26"/>
<rect key="frame" x="132" y="55" width="110" height="26"/>
<constraints>
<constraint firstAttribute="width" constant="110" id="ngO-1H-8Oy"/>
<constraint firstAttribute="height" constant="26" id="vQh-S3-96L"/>
......@@ -1669,7 +1830,7 @@
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="3iW-9e-nhE">
<rect key="frame" x="133" y="116" width="110" height="26"/>
<rect key="frame" x="132" y="116" width="110" height="26"/>
<constraints>
<constraint firstAttribute="width" constant="110" id="1k1-DN-dRt"/>
<constraint firstAttribute="height" constant="26" id="wAk-Pf-BA3"/>
......@@ -1696,20 +1857,65 @@
<action selector="onClickMyOrder:" destination="iFV-ZT-0zX" eventType="touchUpInside" id="xb3-78-doh"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="fNK-il-q71">
<rect key="frame" x="132" y="238" width="110" height="26"/>
<constraints>
<constraint firstAttribute="height" constant="26" id="FMN-fV-IvB"/>
<constraint firstAttribute="width" constant="110" id="SCu-i5-Gin"/>
</constraints>
<fontDescription key="fontDescription" name="PingFangSC-Regular" family="PingFang SC" pointSize="12"/>
<state key="normal" title="回到首页">
<color key="titleColor" red="0.22352941179999999" green="0.22352941179999999" blue="0.22352941179999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</state>
<connections>
<action selector="onClickBackHome:" destination="iFV-ZT-0zX" eventType="touchUpInside" id="nJt-ar-Muw"/>
<action selector="onClickMyOrder:" destination="iFV-ZT-0zX" eventType="touchUpInside" id="uSs-kA-v6D"/>
</connections>
</button>
</subviews>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="fNK-il-q71" firstAttribute="top" secondItem="3ni-BC-6WW" secondAttribute="bottom" constant="35" id="7PG-pn-epx"/>
<constraint firstItem="T4V-4O-WbC" firstAttribute="top" secondItem="puG-Vo-gdd" secondAttribute="top" id="9GE-TI-UPB"/>
<constraint firstItem="3iW-9e-nhE" firstAttribute="centerX" secondItem="puG-Vo-gdd" secondAttribute="centerX" id="BfY-sE-5kb"/>
<constraint firstItem="3ni-BC-6WW" firstAttribute="centerX" secondItem="puG-Vo-gdd" secondAttribute="centerX" id="CqI-1L-ERJ"/>
<constraint firstItem="3ni-BC-6WW" firstAttribute="top" secondItem="3iW-9e-nhE" secondAttribute="bottom" constant="35" id="ISt-z3-thL"/>
<constraint firstItem="T4V-4O-WbC" firstAttribute="centerX" secondItem="puG-Vo-gdd" secondAttribute="centerX" id="MvE-KT-EgQ"/>
<constraint firstAttribute="height" constant="220" id="Wbe-Fv-YHk"/>
<constraint firstAttribute="height" constant="280" id="Wbe-Fv-YHk"/>
<constraint firstItem="3MF-En-1mW" firstAttribute="top" secondItem="T4V-4O-WbC" secondAttribute="bottom" constant="34" id="b1r-Lb-cP7"/>
<constraint firstItem="fNK-il-q71" firstAttribute="centerX" secondItem="puG-Vo-gdd" secondAttribute="centerX" id="q00-Io-iy1"/>
<constraint firstItem="3MF-En-1mW" firstAttribute="centerX" secondItem="puG-Vo-gdd" secondAttribute="centerX" id="sVI-Au-PtI"/>
<constraint firstItem="3iW-9e-nhE" firstAttribute="top" secondItem="3MF-En-1mW" secondAttribute="bottom" constant="35" id="wpN-Nc-3yi"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="KyD-KF-VLd" customClass="KWMRecommendView">
<rect key="frame" x="0.0" y="360" width="374" height="230"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="height" constant="230" id="fpi-jA-eUC"/>
</constraints>
</view>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstItem="puG-Vo-gdd" firstAttribute="leading" secondItem="asp-5G-J9r" secondAttribute="leading" id="3cZ-HG-Ae3"/>
<constraint firstAttribute="trailing" secondItem="puG-Vo-gdd" secondAttribute="trailing" id="Q6a-qa-Zid"/>
<constraint firstAttribute="trailing" secondItem="KyD-KF-VLd" secondAttribute="trailing" id="TKa-Z3-aMl"/>
<constraint firstItem="puG-Vo-gdd" firstAttribute="top" secondItem="asp-5G-J9r" secondAttribute="top" constant="40" id="UWA-jM-RoS"/>
<constraint firstItem="KyD-KF-VLd" firstAttribute="top" secondItem="puG-Vo-gdd" secondAttribute="bottom" constant="40" id="X5n-dC-MDG"/>
<constraint firstAttribute="bottom" secondItem="KyD-KF-VLd" secondAttribute="bottom" id="h1u-Yg-y2E"/>
<constraint firstItem="KyD-KF-VLd" firstAttribute="leading" secondItem="asp-5G-J9r" secondAttribute="leading" id="rpW-9h-J3l"/>
</constraints>
</view>
</subviews>
<constraints>
<constraint firstItem="asp-5G-J9r" firstAttribute="top" secondItem="Vg2-sq-isc" secondAttribute="top" id="86m-7i-o0y"/>
<constraint firstItem="asp-5G-J9r" firstAttribute="leading" secondItem="Vg2-sq-isc" secondAttribute="leading" id="8HP-Wl-9WR"/>
<constraint firstAttribute="bottom" secondItem="asp-5G-J9r" secondAttribute="bottom" id="PwH-Gz-lVj"/>
<constraint firstItem="asp-5G-J9r" firstAttribute="centerX" secondItem="Vg2-sq-isc" secondAttribute="centerX" id="QP0-po-uma"/>
<constraint firstAttribute="trailing" secondItem="asp-5G-J9r" secondAttribute="trailing" id="mtu-ZZ-alZ"/>
</constraints>
</scrollView>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Uhy-T8-YZe" userLabel="line">
<rect key="frame" x="0.0" y="20" width="375" height="1"/>
<color key="backgroundColor" red="0.84705882349999995" green="0.85882352939999995" blue="0.87058823529999996" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
......@@ -1720,18 +1926,21 @@
</subviews>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="trailing" secondItem="Vg2-sq-isc" secondAttribute="trailing" id="13T-Vu-o9g"/>
<constraint firstItem="Uhy-T8-YZe" firstAttribute="leading" secondItem="5n2-NO-agg" secondAttribute="leading" id="Hzx-cg-lJT"/>
<constraint firstItem="Uhy-T8-YZe" firstAttribute="top" secondItem="bus-kZ-rMS" secondAttribute="bottom" id="Jg5-zg-Owf"/>
<constraint firstItem="puG-Vo-gdd" firstAttribute="centerY" secondItem="5n2-NO-agg" secondAttribute="centerY" id="KgV-l8-J2b"/>
<constraint firstItem="puG-Vo-gdd" firstAttribute="leading" secondItem="5n2-NO-agg" secondAttribute="leading" id="Spz-wt-OBe"/>
<constraint firstAttribute="trailing" secondItem="puG-Vo-gdd" secondAttribute="trailing" id="q6n-YR-4Ml"/>
<constraint firstAttribute="bottom" secondItem="Vg2-sq-isc" secondAttribute="bottom" id="WRl-sF-3Xz"/>
<constraint firstItem="Vg2-sq-isc" firstAttribute="top" secondItem="Uhy-T8-YZe" secondAttribute="bottom" id="ZwH-wl-xI8"/>
<constraint firstItem="Vg2-sq-isc" firstAttribute="leading" secondItem="5n2-NO-agg" secondAttribute="leading" id="bqS-H0-RwW"/>
<constraint firstAttribute="trailing" secondItem="Uhy-T8-YZe" secondAttribute="trailing" id="sou-hm-27J"/>
</constraints>
</view>
<connections>
<outlet property="btnBackHome" destination="fNK-il-q71" id="iQP-jZ-9kq"/>
<outlet property="btnGetTime" destination="3iW-9e-nhE" id="gtS-q7-tMn"/>
<outlet property="btnMyOrder" destination="3ni-BC-6WW" id="FAR-6k-c7A"/>
<outlet property="btnStartTime" destination="3MF-En-1mW" id="G5E-nK-0vG"/>
<outlet property="hotRecommendView" destination="KyD-KF-VLd" id="OZG-7l-fs1"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="q8Y-cR-r5c" userLabel="First Responder" sceneMemberID="firstResponder"/>
......@@ -1751,7 +1960,7 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="line" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="1AJ-qv-ehg">
<rect key="frame" x="78" y="74" width="220" height="37"/>
<rect key="frame" x="77.5" y="74" width="220" height="37"/>
<constraints>
<constraint firstAttribute="width" constant="220" id="lZz-tj-gMK"/>
<constraint firstAttribute="height" constant="37" id="ysz-YY-djj"/>
......@@ -1760,7 +1969,7 @@
<textInputTraits key="textInputTraits"/>
</textField>
<button hidden="YES" opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="mlf-Ho-Tnf">
<rect key="frame" x="303" y="73" width="37" height="37"/>
<rect key="frame" x="302.5" y="73" width="37" height="37"/>
<constraints>
<constraint firstAttribute="height" constant="37" id="HQR-0I-BIh"/>
<constraint firstAttribute="width" constant="37" id="POV-7x-eGi"/>
......@@ -1771,13 +1980,13 @@
</connections>
</button>
<label hidden="YES" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="100元抵用" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="AbL-PF-Lqf">
<rect key="frame" x="153" y="131" width="70" height="21"/>
<rect key="frame" x="152.5" y="131" width="70" height="21"/>
<fontDescription key="fontDescription" name="PingFangSC-Regular" family="PingFang SC" pointSize="15"/>
<color key="textColor" red="0.94509803921568625" green="0.5725490196078431" blue="0.60392156862745094" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<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="0BL-mf-31s">
<rect key="frame" x="142" y="131" width="92" height="18"/>
<rect key="frame" x="141.5" y="131" width="92" height="18"/>
<fontDescription key="fontDescription" type="system" pointSize="15"/>
<color key="textColor" red="0.22352941176470587" green="0.22352941176470587" blue="0.22352941176470587" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
......@@ -2003,7 +2212,7 @@
</connections>
</webView>
<activityIndicatorView opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" style="gray" translatesAutoresizingMaskIntoConstraints="NO" id="Elh-Ku-4Mx">
<rect key="frame" x="178" y="324" width="20" height="20"/>
<rect key="frame" x="177.5" y="323.5" width="20" height="20"/>
<constraints>
<constraint firstAttribute="height" constant="20" id="EUz-TN-Y66"/>
<constraint firstAttribute="width" constant="20" id="dNY-fj-HIa"/>
......@@ -2050,7 +2259,7 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="line" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="1OO-h3-X4P">
<rect key="frame" x="78" y="74" width="220" height="37"/>
<rect key="frame" x="77.5" y="74" width="220" height="37"/>
<constraints>
<constraint firstAttribute="width" constant="220" id="2eS-Fa-mYH"/>
<constraint firstAttribute="height" constant="37" id="VOn-5o-BXi"/>
......@@ -2059,7 +2268,7 @@
<textInputTraits key="textInputTraits"/>
</textField>
<button hidden="YES" opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="MPg-VK-2Ep">
<rect key="frame" x="303" y="73" width="37" height="37"/>
<rect key="frame" x="302.5" y="73" width="37" height="37"/>
<constraints>
<constraint firstAttribute="width" constant="37" id="xBG-yL-E4m"/>
<constraint firstAttribute="height" constant="37" id="xfy-2l-93L"/>
......@@ -2070,13 +2279,13 @@
</connections>
</button>
<label hidden="YES" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="100元抵用" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="aPW-gB-Qu6">
<rect key="frame" x="153" y="131" width="70" height="21"/>
<rect key="frame" x="152.5" y="131" width="70" height="21"/>
<fontDescription key="fontDescription" name="PingFangSC-Regular" family="PingFang SC" pointSize="15"/>
<color key="textColor" red="0.94509803920000002" green="0.57254901960000004" blue="0.60392156860000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<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="SBw-MX-isC">
<rect key="frame" x="142" y="131" width="92" height="18"/>
<rect key="frame" x="141.5" y="131" width="92" height="18"/>
<fontDescription key="fontDescription" type="system" pointSize="15"/>
<color key="textColor" red="0.22352941179999999" green="0.22352941179999999" blue="0.22352941179999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
......@@ -2314,6 +2523,8 @@
<resources>
<image name="btn_login_captcha wrong_del" width="28" height="23"/>
<image name="button_order_deit" width="12" height="13"/>
<image name="ic_choose_nor" width="22" height="22"/>
<image name="ic_choose_sel" width="22" height="22"/>
<image name="ic_count_bg" width="100" height="25"/>
<image name="ic_pay_AliPay" width="18" height="18"/>
<image name="ic_pay_WeChat" width="20" height="17"/>
......
......@@ -20,6 +20,11 @@
tags:(nullable NSArray <NSString *> *)tags
inCollection:(nullable NSNumber *)collectionId;
//初始化缓存parameters key
+ (NSDictionary *)getProductCacheKeyDictionary:(NSUInteger)page
tags:(nullable NSArray <NSString *> *)tags
handle:(nullable NSString *)handle;
+ (void)saveDataToCache:(NSDictionary *)cacheKeyDictionary urlKey:(NSString *)urlKey products:(NSArray *)products;
+ (NSArray *)getProductDataByCache:(NSDictionary *)cacheKeyDictionary urlKey:(NSString *)urlKey;
......
......@@ -33,6 +33,23 @@
return params;
}
//初始化缓存parameters key
+ (NSDictionary *)getProductCacheKeyDictionary:(NSUInteger)page
tags:(nullable NSArray <NSString *> *)tags
handle:(nullable NSString *)handle{
NSMutableDictionary *params = @{
// @"limit" : @(self.client.pageSize),
@"page" : @(page)
}.mutableCopy;
if (tags) {
params[@"tag"] = [tags componentsJoinedByString:@","];
}
if (handle) {
params[@"handle"] = handle;
}
return params;
}
+ (void)saveDataToCache:(NSDictionary *)cacheKeyDictionary urlKey:(NSString *)urlKey products:(NSArray *)products{
NSMutableArray *dictArray = [NSMutableArray array];
......
......@@ -8,15 +8,16 @@
#import <UIKit/UIKit.h>
#import <Buy/Buy.h>
@class KWMRecommendView;
@protocol KWMRecommendDelegate <NSObject>
- (void)kwm_onClickProduct:(BUYProduct *)product;
- (void)kwm_gotoRecommendPage;
- (void)kwm_gotoRecommendPage:(KWMRecommendView *)recommendView;
@end
@interface KWMRecommendHeader : UIView<UICollectionViewDataSource,UICollectionViewDelegate>
@interface KWMRecommendView : UIView<UICollectionViewDataSource,UICollectionViewDelegate>
+ (NSString *)kwmTag;
......@@ -24,4 +25,9 @@
@property(nonatomic) NSArray *productArray;
@property(nonatomic) NSString *title;
//已购买商品,用于去重
@property(nonatomic) NSArray *boughtProductIdArray;
@end
......@@ -6,21 +6,23 @@
// Copyright © 2017年 kollway. All rights reserved.
//
#import "KWMRecommendHeader.h"
#import "KWMRecommendView.h"
#import "KWMCollectionCell.h"
@interface KWMRecommendHeader()
@interface KWMRecommendView()
@property (nonatomic,weak) IBOutlet UIView *vView;
@property (nonatomic,weak) IBOutlet UICollectionView *cvRecommend;
@property (nonatomic,weak) IBOutlet UILabel *lbTitle;
@end
@implementation KWMRecommendHeader
@implementation KWMRecommendView
+(NSString *)kwmTag{
return @"KWMRecommendHeader";
return @"KWMRecommendView";
}
- (id)init{
......@@ -68,11 +70,33 @@
self.cvRecommend.collectionViewLayout = layout;
}
-(void)setTitle:(NSString *)title{
_title = title;
if(self.lbTitle){
[self.lbTitle setText:title];
}
}
-(void)setProductArray:(NSArray *)productArray{
_productArray = productArray;
[self removeSameProduct];
[self.cvRecommend reloadData];
}
-(void)setBoughtProductIdArray:(NSArray *)boughtProductIdArray{
_boughtProductIdArray = boughtProductIdArray;
[self removeSameProduct];
[self.cvRecommend reloadData];
}
-(void)removeSameProduct{
if(self.productArray && self.boughtProductIdArray){
_productArray = [self.productArray rx_filterWithBlock:^BOOL(BUYProduct *each){
return (![self.boughtProductIdArray containsObject:each.identifier]);
}];
}
}
#pragma mark - UICollectionViewDataSource
-(UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath{
KWMCollectionCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([KWMCollectionCell class]) forIndexPath:indexPath];
......@@ -93,17 +117,26 @@
}
-(NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section{
if(self.productArray && self.productArray.count > 9){
NSInteger productCount = self.productArray?self.productArray.count:0;
NSInteger boughtCount = self.boughtProductIdArray?self.boughtProductIdArray.count:0;
if(productCount > 9){
return 10;
}
if(productCount + boughtCount > 9){
return productCount+1;
}
return self.productArray?self.productArray.count:0;
}
-(void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath{
[collectionView deselectItemAtIndexPath:indexPath animated:YES];
if(indexPath.row == 9){
NSInteger productCount = self.productArray?self.productArray.count:0;
NSInteger boughtCount = self.boughtProductIdArray?self.boughtProductIdArray.count:0;
BOOL hasMore = (productCount > 9) || (productCount + boughtCount > 9);
if([self collectionView:self.cvRecommend numberOfItemsInSection:0] == indexPath.row + 1
&& hasMore){
if(self.delegate){
[self.delegate kwm_gotoRecommendPage];
[self.delegate kwm_gotoRecommendPage:self];
}
}else{
BUYProduct *product = [self.productArray objectAtIndex:indexPath.row];
......
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="13196" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="13529" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13173"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13527"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<customFonts key="customFonts">
......@@ -14,9 +14,10 @@
</array>
</customFonts>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="KWMRecommendHeader">
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="KWMRecommendView">
<connections>
<outlet property="cvRecommend" destination="YkQ-i0-Pi8" id="k1I-3x-9pe"/>
<outlet property="lbTitle" destination="7Fq-VX-XvA" id="643-OU-gbL"/>
<outlet property="vView" destination="iN0-l3-epB" id="4mj-ET-3eS"/>
</connections>
</placeholder>
......
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