Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
I
ios1x
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cemarose
ios1x
Commits
70bc6c29
Commit
70bc6c29
authored
7 years ago
by
lee
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of git.oschina.net:kollway-kollway/newcemarose
parents
9f44a471
a16a259b
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
406 additions
and
99 deletions
+406
-99
project.pbxproj
iCemarose.xcodeproj/project.pbxproj
+10
-10
Contents.json
...rose/Assets.xcassets/ic_choose_nor.imageset/Contents.json
+23
-0
ic_choose_nor@2x.png
...sets.xcassets/ic_choose_nor.imageset/ic_choose_nor@2x.png
+0
-0
ic_choose_nor@3x.png
...sets.xcassets/ic_choose_nor.imageset/ic_choose_nor@3x.png
+0
-0
Contents.json
...rose/Assets.xcassets/ic_choose_sel.imageset/Contents.json
+23
-0
ic_choose_sel@2x.png
...sets.xcassets/ic_choose_sel.imageset/ic_choose_sel@2x.png
+0
-0
ic_choose_sel@3x.png
...sets.xcassets/ic_choose_sel.imageset/ic_choose_sel@3x.png
+0
-0
Login.storyboard
iCemarose/Class/UI/Login/Login.storyboard
+2
-2
KWMNewHomeVC.h
iCemarose/Class/UI/NewHome/KWMNewHomeVC.h
+1
-1
KWMNewHomeVC.m
iCemarose/Class/UI/NewHome/KWMNewHomeVC.m
+6
-23
KWMBeforePayVC.h
iCemarose/Class/UI/ShopCart/KWMBeforePayVC.h
+22
-6
KWMBeforePayVC.m
iCemarose/Class/UI/ShopCart/KWMBeforePayVC.m
+90
-36
KWMPaySuccessVC.h
iCemarose/Class/UI/ShopCart/KWMPaySuccessVC.h
+9
-0
KWMPaySuccessVC.m
iCemarose/Class/UI/ShopCart/KWMPaySuccessVC.m
+76
-1
KWMShopCartVC.m
iCemarose/Class/UI/ShopCart/KWMShopCartVC.m
+70
-8
ShopCart.storyboard
iCemarose/Class/UI/ShopCart/ShopCart.storyboard
+0
-0
KWMPPCacheUtil.h
iCemarose/Class/Util/KWMPPCacheUtil.h
+5
-0
KWMPPCacheUtil.m
iCemarose/Class/Util/KWMPPCacheUtil.m
+17
-0
KWMRecommendView.h
iCemarose/Class/View/KWMRecommendView.h
+8
-2
KWMRecommendView.m
iCemarose/Class/View/KWMRecommendView.m
+40
-7
KWMRecommendView.xib
iCemarose/Class/View/KWMRecommendView.xib
+4
-3
No files found.
iCemarose.xcodeproj/project.pbxproj
View file @
70bc6c29
...
@@ -99,6 +99,8 @@
...
@@ -99,6 +99,8 @@
C02986881F0F249D002EB25F
/* KWMWishListVC.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
C02986871F0F249D002EB25F
/* KWMWishListVC.m */
;
};
C02986881F0F249D002EB25F
/* KWMWishListVC.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
C02986871F0F249D002EB25F
/* KWMWishListVC.m */
;
};
C029868F1F0F2663002EB25F
/* KWMWishCell.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
C029868D1F0F2663002EB25F
/* KWMWishCell.m */
;
};
C029868F1F0F2663002EB25F
/* KWMWishCell.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
C029868D1F0F2663002EB25F
/* KWMWishCell.m */
;
};
C02986901F0F2663002EB25F
/* KWMWishCell.xib in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
C029868E1F0F2663002EB25F
/* KWMWishCell.xib */
;
};
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 */
;
};
C02C7D801E640D82008DC29C
/* libWeChatSDK.a in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
C02C7D7B1E640D82008DC29C
/* libWeChatSDK.a */
;
};
C02C7D811E640D82008DC29C
/* README.txt in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
C02C7D7C1E640D82008DC29C
/* README.txt */
;
};
C02C7D811E640D82008DC29C
/* README.txt in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
C02C7D7C1E640D82008DC29C
/* README.txt */
;
};
C02C7D831E640FBF008DC29C
/* SystemConfiguration.framework in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
C02C7D821E640FBF008DC29C
/* SystemConfiguration.framework */
;
};
C02C7D831E640FBF008DC29C
/* SystemConfiguration.framework in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
C02C7D821E640FBF008DC29C
/* SystemConfiguration.framework */
;
};
...
@@ -221,10 +223,8 @@
...
@@ -221,10 +223,8 @@
C04834371F1325CB00A5BFB4
/* KWMHotSalesHeader.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
C04834361F1325CB00A5BFB4
/* KWMHotSalesHeader.m */
;
};
C04834371F1325CB00A5BFB4
/* KWMHotSalesHeader.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
C04834361F1325CB00A5BFB4
/* KWMHotSalesHeader.m */
;
};
C048343B1F13274300A5BFB4
/* KWMNewHomeVC.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
C04834391F13274300A5BFB4
/* KWMNewHomeVC.m */
;
};
C048343B1F13274300A5BFB4
/* KWMNewHomeVC.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
C04834391F13274300A5BFB4
/* KWMNewHomeVC.m */
;
};
C048343E1F13288F00A5BFB4
/* KWMMenuHeader.xib in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
C048343D1F13288F00A5BFB4
/* KWMMenuHeader.xib */
;
};
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 */
;
};
C04834451F1337A800A5BFB4
/* KWMNewHomeCell.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
C04834431F1337A800A5BFB4
/* KWMNewHomeCell.m */
;
};
C04834461F1337A800A5BFB4
/* KWMNewHomeCell.xib in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
C04834441F1337A800A5BFB4
/* KWMNewHomeCell.xib */
;
};
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 */
;
};
C048344A1F13391A00A5BFB4
/* KWMClothingSetsHeader.xib in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
C04834491F13391A00A5BFB4
/* KWMClothingSetsHeader.xib */
;
};
C048344C1F13393D00A5BFB4
/* KWMHotSalesHeader.xib in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
C048344B1F13393D00A5BFB4
/* KWMHotSalesHeader.xib */
;
};
C048344C1F13393D00A5BFB4
/* KWMHotSalesHeader.xib in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
C048344B1F13393D00A5BFB4
/* KWMHotSalesHeader.xib */
;
};
C04834531F13590500A5BFB4
/* KWMProductBannerItemView.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
C048344E1F13590500A5BFB4
/* KWMProductBannerItemView.m */
;
};
C04834531F13590500A5BFB4
/* KWMProductBannerItemView.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
C048344E1F13590500A5BFB4
/* KWMProductBannerItemView.m */
;
};
...
@@ -544,6 +544,9 @@
...
@@ -544,6 +544,9 @@
C029868C1F0F2663002EB25F
/* KWMWishCell.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
KWMWishCell.h
;
sourceTree
=
"<group>"
;
};
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>"
;
};
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>"
;
};
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>"
;
};
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>"
;
};
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>"
;
};
C02C7D7D1E640D82008DC29C
/* WechatAuthSDK.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
WechatAuthSDK.h
;
sourceTree
=
"<group>"
;
};
...
@@ -768,12 +771,9 @@
...
@@ -768,12 +771,9 @@
C04834381F13274300A5BFB4
/* KWMNewHomeVC.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
KWMNewHomeVC.h
;
sourceTree
=
"<group>"
;
};
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>"
;
};
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>"
;
};
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>"
;
};
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>"
;
};
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>"
;
};
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>"
;
};
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>"
;
};
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>"
;
};
C048344D1F13590500A5BFB4
/* KWMProductBannerItemView.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
KWMProductBannerItemView.h
;
sourceTree
=
"<group>"
;
};
...
@@ -1514,6 +1514,9 @@
...
@@ -1514,6 +1514,9 @@
C0DD53261EE55190002D1E0C
/* Loading */
,
C0DD53261EE55190002D1E0C
/* Loading */
,
C034E7C31D6B10A0006EE129
/* CorePhotoBroswer */
,
C034E7C31D6B10A0006EE129
/* CorePhotoBroswer */
,
C034E8381D6B10A0006EE129
/* EGO */
,
C034E8381D6B10A0006EE129
/* EGO */
,
C02C5A921FD54C7D00E32290
/* KWMRecommendView.h */
,
C02C5A901FD54C7C00E32290
/* KWMRecommendView.m */
,
C02C5A911FD54C7C00E32290
/* KWMRecommendView.xib */
,
C0AF03981DD5BFB20060623F
/* UIViewController+BackButtonHandler.h */
,
C0AF03981DD5BFB20060623F
/* UIViewController+BackButtonHandler.h */
,
C0AF03991DD5BFB20060623F
/* UIViewController+BackButtonHandler.m */
,
C0AF03991DD5BFB20060623F
/* UIViewController+BackButtonHandler.m */
,
C04834211F13215500A5BFB4
/* KWMBannerView.h */
,
C04834211F13215500A5BFB4
/* KWMBannerView.h */
,
...
@@ -2004,9 +2007,6 @@
...
@@ -2004,9 +2007,6 @@
C048343D1F13288F00A5BFB4
/* KWMMenuHeader.xib */
,
C048343D1F13288F00A5BFB4
/* KWMMenuHeader.xib */
,
C048342C1F13254200A5BFB4
/* KWMMenuHeader.h */
,
C048342C1F13254200A5BFB4
/* KWMMenuHeader.h */
,
C048342D1F13254200A5BFB4
/* KWMMenuHeader.m */
,
C048342D1F13254200A5BFB4
/* KWMMenuHeader.m */
,
C04834471F1338F200A5BFB4
/* KWMRecommendHeader.xib */
,
C048343F1F13350F00A5BFB4
/* KWMRecommendHeader.h */
,
C04834401F13350F00A5BFB4
/* KWMRecommendHeader.m */
,
C04834491F13391A00A5BFB4
/* KWMClothingSetsHeader.xib */
,
C04834491F13391A00A5BFB4
/* KWMClothingSetsHeader.xib */
,
C04834321F1325A000A5BFB4
/* KWMClothingSetsHeader.h */
,
C04834321F1325A000A5BFB4
/* KWMClothingSetsHeader.h */
,
C04834331F1325A000A5BFB4
/* KWMClothingSetsHeader.m */
,
C04834331F1325A000A5BFB4
/* KWMClothingSetsHeader.m */
,
...
@@ -2436,7 +2436,7 @@
...
@@ -2436,7 +2436,7 @@
C0F586771E24F820001248E2
/* KWMCollectionCell.xib in Resources */
,
C0F586771E24F820001248E2
/* KWMCollectionCell.xib in Resources */
,
C0243BBD1EFBD5A10013CFA7
/* Category.storyboard in Resources */
,
C0243BBD1EFBD5A10013CFA7
/* Category.storyboard in Resources */
,
C0F586791E24F820001248E2
/* KWMDetailCell.xib in Resources */
,
C0F586791E24F820001248E2
/* KWMDetailCell.xib in Resources */
,
C0
4834481F1338F200A5BFB4
/* KWMRecommendHeader
.xib in Resources */
,
C0
2C5A941FD54C7D00E32290
/* KWMRecommendView
.xib in Resources */
,
C0F5867F1E24F820001248E2
/* KWMNewGoodsCell.xib in Resources */
,
C0F5867F1E24F820001248E2
/* KWMNewGoodsCell.xib in Resources */
,
C0DD53101EE54A9E002D1E0C
/* KWMBarandSelectView.xib in Resources */
,
C0DD53101EE54A9E002D1E0C
/* KWMBarandSelectView.xib in Resources */
,
C066650C1D75A2E500F02EF4
/* Mine.storyboard in Resources */
,
C066650C1D75A2E500F02EF4
/* Mine.storyboard in Resources */
,
...
@@ -2592,7 +2592,6 @@
...
@@ -2592,7 +2592,6 @@
DA4E36981F17729C0007E4D0
/* KWMCategoryModel.m in Sources */
,
DA4E36981F17729C0007E4D0
/* KWMCategoryModel.m in Sources */
,
C048B8E21EF3C04B000DA7AF
/* KWMBeforePayData.m in Sources */
,
C048B8E21EF3C04B000DA7AF
/* KWMBeforePayData.m in Sources */
,
C03846941DB89EEB008C3BAB
/* KWMCemaroseResult.m in Sources */
,
C03846941DB89EEB008C3BAB
/* KWMCemaroseResult.m in Sources */
,
C04834411F13350F00A5BFB4
/* KWMRecommendHeader.m in Sources */
,
C0F586871E24F820001248E2
/* KWMNewTypeSelectedVC.m in Sources */
,
C0F586871E24F820001248E2
/* KWMNewTypeSelectedVC.m in Sources */
,
80598D471D99193400BF0F97
/* KWMInformationVC.m in Sources */
,
80598D471D99193400BF0F97
/* KWMInformationVC.m in Sources */
,
C034E7B91D6B0A8D006EE129
/* KWMHomeVC.m in Sources */
,
C034E7B91D6B0A8D006EE129
/* KWMHomeVC.m in Sources */
,
...
@@ -2663,6 +2662,7 @@
...
@@ -2663,6 +2662,7 @@
C0F586781E24F820001248E2
/* KWMDetailCell.m in Sources */
,
C0F586781E24F820001248E2
/* KWMDetailCell.m in Sources */
,
C03120AD1EF2AC6700E49EFA
/* KWMCheckoutPayResult.m in Sources */
,
C03120AD1EF2AC6700E49EFA
/* KWMCheckoutPayResult.m in Sources */
,
801F87BF1DD1D6850038FA4C
/* KWMLoadStatus.m in Sources */
,
801F87BF1DD1D6850038FA4C
/* KWMLoadStatus.m in Sources */
,
C02C5A931FD54C7D00E32290
/* KWMRecommendView.m in Sources */
,
C03943C31DD1FD3F00141475
/* KWMProductTypeResult.m in Sources */
,
C03943C31DD1FD3F00141475
/* KWMProductTypeResult.m in Sources */
,
804771851D6D585B0086B4DC
/* KWMValidationVC.m in Sources */
,
804771851D6D585B0086B4DC
/* KWMValidationVC.m in Sources */
,
80ED0A4F1D93BD0E00B28DF2
/* KWMShopCartModel.m in Sources */
,
80ED0A4F1D93BD0E00B28DF2
/* KWMShopCartModel.m in Sources */
,
...
...
This diff is collapsed.
Click to expand it.
iCemarose/Assets.xcassets/ic_choose_nor.imageset/Contents.json
0 → 100644
View file @
70bc6c29
{
"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
This diff is collapsed.
Click to expand it.
iCemarose/Assets.xcassets/ic_choose_nor.imageset/ic_choose_nor@2x.png
0 → 100644
View file @
70bc6c29
1.26 KB
This diff is collapsed.
Click to expand it.
iCemarose/Assets.xcassets/ic_choose_nor.imageset/ic_choose_nor@3x.png
0 → 100644
View file @
70bc6c29
2 KB
This diff is collapsed.
Click to expand it.
iCemarose/Assets.xcassets/ic_choose_sel.imageset/Contents.json
0 → 100644
View file @
70bc6c29
{
"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
This diff is collapsed.
Click to expand it.
iCemarose/Assets.xcassets/ic_choose_sel.imageset/ic_choose_sel@2x.png
0 → 100644
View file @
70bc6c29
1.62 KB
This diff is collapsed.
Click to expand it.
iCemarose/Assets.xcassets/ic_choose_sel.imageset/ic_choose_sel@3x.png
0 → 100644
View file @
70bc6c29
2.53 KB
This diff is collapsed.
Click to expand it.
iCemarose/Class/UI/Login/Login.storyboard
View file @
70bc6c29
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB"
version=
"3.0"
toolsVersion=
"13
196
"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
useAutolayout=
"YES"
useTraitCollections=
"YES"
colorMatched=
"YES"
>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB"
version=
"3.0"
toolsVersion=
"13
529
"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
useAutolayout=
"YES"
useTraitCollections=
"YES"
colorMatched=
"YES"
>
<device
id=
"retina4_7"
orientation=
"portrait"
>
<device
id=
"retina4_7"
orientation=
"portrait"
>
<adaptation
id=
"fullscreen"
/>
<adaptation
id=
"fullscreen"
/>
</device>
</device>
<dependencies>
<dependencies>
<deployment
identifier=
"iOS"
/>
<deployment
identifier=
"iOS"
/>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"13
174
"
/>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"13
527
"
/>
<capability
name=
"documents saved in the Xcode 8 format"
minToolsVersion=
"8.0"
/>
<capability
name=
"documents saved in the Xcode 8 format"
minToolsVersion=
"8.0"
/>
</dependencies>
</dependencies>
<customFonts
key=
"customFonts"
>
<customFonts
key=
"customFonts"
>
...
...
This diff is collapsed.
Click to expand it.
iCemarose/Class/UI/NewHome/KWMNewHomeVC.h
View file @
70bc6c29
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
#import <CHTCollectionViewWaterfallLayout.h>
#import <CHTCollectionViewWaterfallLayout.h>
#import "KWMAdHeader.h"
#import "KWMAdHeader.h"
#import "KWMMenuHeader.h"
#import "KWMMenuHeader.h"
#import "KWMRecommend
Header
.h"
#import "KWMRecommend
View
.h"
#import "KWMClothingSetsHeader.h"
#import "KWMClothingSetsHeader.h"
#import "KWMHotSalesHeader.h"
#import "KWMHotSalesHeader.h"
...
...
This diff is collapsed.
Click to expand it.
iCemarose/Class/UI/NewHome/KWMNewHomeVC.m
View file @
70bc6c29
...
@@ -45,7 +45,7 @@ typedef enum{
...
@@ -45,7 +45,7 @@ typedef enum{
@property
(
nonatomic
,
strong
)
KWMMenuHeader
*
menuHeader
;
@property
(
nonatomic
,
strong
)
KWMMenuHeader
*
menuHeader
;
@property
(
nonatomic
,
strong
)
KWMRecommend
Header
*
recommendHeader
;
@property
(
nonatomic
,
strong
)
KWMRecommend
View
*
recommendHeader
;
@property
(
nonatomic
,
strong
)
KWMClothingSetsHeader
*
clothingSetsHeader
;
@property
(
nonatomic
,
strong
)
KWMClothingSetsHeader
*
clothingSetsHeader
;
...
@@ -110,7 +110,7 @@ typedef enum{
...
@@ -110,7 +110,7 @@ typedef enum{
heightHotSale
=
UI_SCREEN_WIDTH
*
190
/
375
+
60
;
//60为图片外的布局高度
heightHotSale
=
UI_SCREEN_WIDTH
*
190
/
375
+
60
;
//60为图片外的布局高度
self
.
adHeader
=
[[
KWMAdHeader
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
UI_SCREEN_WIDTH
,
heightAdHeader
)];
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
.
menuHeader
=
[[
KWMMenuHeader
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
UI_SCREEN_WIDTH
,
100
)];
self
.
recommendHeader
=
[[
KWMRecommend
Header
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
UI_SCREEN_WIDTH
,
230
)];
self
.
recommendHeader
=
[[
KWMRecommend
View
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
UI_SCREEN_WIDTH
,
230
)];
self
.
clothingSetsHeader
=
[[
KWMClothingSetsHeader
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
UI_SCREEN_WIDTH
,
heightClothingSets
)];
self
.
clothingSetsHeader
=
[[
KWMClothingSetsHeader
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
UI_SCREEN_WIDTH
,
heightClothingSets
)];
self
.
hotSalesHeader
=
[[
KWMHotSalesHeader
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
UI_SCREEN_WIDTH
,
heightHotSale
)];
self
.
hotSalesHeader
=
[[
KWMHotSalesHeader
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
UI_SCREEN_WIDTH
,
heightHotSale
)];
...
@@ -145,7 +145,7 @@ typedef enum{
...
@@ -145,7 +145,7 @@ typedef enum{
[
self
.
cvHome
registerClass
:[
UICollectionReusableView
class
]
forSupplementaryViewOfKind
:
CHTCollectionElementKindSectionHeader
withReuseIdentifier
:
[
KWMAdHeader
kwmTag
]];
[
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
:
[
KWMHotSalesHeader
kwmTag
]];
[
self
.
cvHome
registerClass
:[
UICollectionReusableView
class
]
forSupplementaryViewOfKind
:
CHTCollectionElementKindSectionHeader
withReuseIdentifier
:
[
KWMRecommend
Header
kwmTag
]];
[
self
.
cvHome
registerClass
:[
UICollectionReusableView
class
]
forSupplementaryViewOfKind
:
CHTCollectionElementKindSectionHeader
withReuseIdentifier
:
[
KWMRecommend
View
kwmTag
]];
[
self
.
cvHome
registerClass
:[
UICollectionReusableView
class
]
forSupplementaryViewOfKind
:
CHTCollectionElementKindSectionHeader
withReuseIdentifier
:
[
KWMClothingSetsHeader
kwmTag
]];
[
self
.
cvHome
registerClass
:[
UICollectionReusableView
class
]
forSupplementaryViewOfKind
:
CHTCollectionElementKindSectionHeader
withReuseIdentifier
:
[
KWMClothingSetsHeader
kwmTag
]];
[
self
.
cvHome
registerClass
:[
UICollectionReusableView
class
]
forSupplementaryViewOfKind
:
CHTCollectionElementKindSectionHeader
withReuseIdentifier
:
[
KWMMenuHeader
kwmTag
]];
[
self
.
cvHome
registerClass
:[
UICollectionReusableView
class
]
forSupplementaryViewOfKind
:
CHTCollectionElementKindSectionHeader
withReuseIdentifier
:
[
KWMMenuHeader
kwmTag
]];
...
@@ -194,7 +194,7 @@ typedef enum{
...
@@ -194,7 +194,7 @@ typedef enum{
}
}
#pragma mark - KWMRecommendDelegate
#pragma mark - KWMRecommendDelegate
-
(
void
)
kwm_gotoRecommendPage
{
-
(
void
)
kwm_gotoRecommendPage
:
(
KWMRecommendView
*
)
recommendView
{
[
self
openURLWithString
:
@"https://cemarose.myshopify.com/collections/hot-sell-app?title=主推单品"
];
[
self
openURLWithString
:
@"https://cemarose.myshopify.com/collections/hot-sell-app?title=主推单品"
];
}
}
...
@@ -264,7 +264,7 @@ typedef enum{
...
@@ -264,7 +264,7 @@ typedef enum{
}
}
break
;
break
;
case
HeaderRecommend
:
case
HeaderRecommend
:
headerView
=
[
collectionView
dequeueReusableSupplementaryViewOfKind
:
CHTCollectionElementKindSectionHeader
withReuseIdentifier
:[
KWMRecommend
Header
kwmTag
]
forIndexPath
:
indexPath
];
headerView
=
[
collectionView
dequeueReusableSupplementaryViewOfKind
:
CHTCollectionElementKindSectionHeader
withReuseIdentifier
:[
KWMRecommend
View
kwmTag
]
forIndexPath
:
indexPath
];
if
(
headerView
.
subviews
.
count
==
0
){
if
(
headerView
.
subviews
.
count
==
0
){
[
headerView
addSubview
:
self
.
recommendHeader
];
[
headerView
addSubview
:
self
.
recommendHeader
];
}
}
...
@@ -341,7 +341,7 @@ typedef enum{
...
@@ -341,7 +341,7 @@ typedef enum{
-
(
void
)
requestProductWithHandle
:
(
NSString
*
)
handle
tags
:
(
NSArray
*
)
tags
valueKeyPath
:
(
NSString
*
)
valueKeyPath
{
-
(
void
)
requestProductWithHandle
:
(
NSString
*
)
handle
tags
:
(
NSArray
*
)
tags
valueKeyPath
:
(
NSString
*
)
valueKeyPath
{
BOOL
isHome
=
[
handle
isEqualToString
:
@"products-list-app-homepage"
];
BOOL
isHome
=
[
handle
isEqualToString
:
@"products-list-app-homepage"
];
NSInteger
cpage
=
isHome
?
self
.
page
:
1
;
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
){
if
(
!
self
.
isRefreshUI
){
BOOL
useProductDataCache
=
[
self
useProductDataCache
:
parameters
valueKeyPath
:
valueKeyPath
page
:
cpage
isHome
:
isHome
];
BOOL
useProductDataCache
=
[
self
useProductDataCache
:
parameters
valueKeyPath
:
valueKeyPath
page
:
cpage
isHome
:
isHome
];
}
}
...
@@ -439,23 +439,6 @@ typedef enum{
...
@@ -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
{
-
(
BOOL
)
useProductDataCache
:
(
NSDictionary
*
)
cacheKeyDictionary
valueKeyPath
:
(
NSString
*
)
valueKeyPath
page
:
(
NSUInteger
)
page
isHome
:
(
BOOL
)
isHome
{
if
(
!
kIsNetwork
||
page
==
1
){
if
(
!
kIsNetwork
||
page
==
1
){
...
...
This diff is collapsed.
Click to expand it.
iCemarose/Class/UI/ShopCart/KWMBeforePayVC.h
View file @
70bc6c29
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
#import "KWMPayTypeVC.h"
#import "KWMPayTypeVC.h"
#import "KWMBeforePayData.h"
#import "KWMBeforePayData.h"
@interface
KWMBeforePayVC
:
KWMBaseVC
<
KWMGiftCardDelegate
,
KWM
DiscountDelegate
,
KWMSelectAddressDelegate
,
KWMSelectShippingRateDelegate
,
KWMPayType
Delegate
>
@interface
KWMBeforePayVC
:
KWMBaseVC
<
KWMGiftCardDelegate
,
KWM
SelectAddressDelegate
,
KWMSelectShippingRateDelegate
,
UITextField
Delegate
>
//沒有默認地址時,高度為37,有地址時,高度為90
//沒有默認地址時,高度為37,有地址時,高度為90
@property
(
nonatomic
,
weak
)
IBOutlet
NSLayoutConstraint
*
vAddressHeight
;
@property
(
nonatomic
,
weak
)
IBOutlet
NSLayoutConstraint
*
vAddressHeight
;
...
@@ -33,13 +33,28 @@
...
@@ -33,13 +33,28 @@
@property
(
weak
,
nonatomic
)
IBOutlet
UIView
*
vHasAddress
;
@property
(
weak
,
nonatomic
)
IBOutlet
UIView
*
vHasAddress
;
@property
(
weak
,
nonatomic
)
IBOutlet
UILabel
*
lbPayType
;
//支付方式
@property
(
weak
,
nonatomic
)
IBOutlet
UIView
*
vPayType
;
//折扣
@property
(
weak
,
nonatomic
)
IBOutlet
UIImageView
*
ivAliPay
;
@property
(
weak
,
nonatomic
)
IBOutlet
UILabel
*
lbDiscount
;
@property
(
weak
,
nonatomic
)
IBOutlet
UIImageView
*
ivWechatPay
;
//折扣
@property
(
weak
,
nonatomic
)
IBOutlet
UILabel
*
lbGiftCard
;
@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
*
lbTotalPrice
;
@property
(
weak
,
nonatomic
)
IBOutlet
UILabel
*
lbShippingRate
;
@property
(
weak
,
nonatomic
)
IBOutlet
UILabel
*
lbShippingRate
;
...
@@ -47,8 +62,6 @@
...
@@ -47,8 +62,6 @@
//清关信息
//清关信息
@property
(
weak
,
nonatomic
)
IBOutlet
UILabel
*
lbCustomsClearance
;
@property
(
weak
,
nonatomic
)
IBOutlet
UILabel
*
lbCustomsClearance
;
@property
(
weak
,
nonatomic
)
IBOutlet
UIView
*
vPayType
;
@property
(
weak
,
nonatomic
)
IBOutlet
NSLayoutConstraint
*
heightPayType
;
@property
(
weak
,
nonatomic
)
IBOutlet
NSLayoutConstraint
*
heightPayType
;
@property
(
weak
,
nonatomic
)
IBOutlet
NSLayoutConstraint
*
heightCustomsClearance
;
@property
(
weak
,
nonatomic
)
IBOutlet
NSLayoutConstraint
*
heightCustomsClearance
;
...
@@ -87,6 +100,9 @@
...
@@ -87,6 +100,9 @@
-
(
IBAction
)
onClickCustomsClearance
:(
id
)
sender
;
-
(
IBAction
)
onClickCustomsClearance
:(
id
)
sender
;
-
(
IBAction
)
onClickDiscountConfirm
:(
id
)
sender
;
-
(
IBAction
)
onClickDiscountCancel
:(
id
)
sender
;
@end
@end
This diff is collapsed.
Click to expand it.
iCemarose/Class/UI/ShopCart/KWMBeforePayVC.m
View file @
70bc6c29
...
@@ -25,9 +25,9 @@
...
@@ -25,9 +25,9 @@
#import "KWMShoppingCart.h"
#import "KWMShoppingCart.h"
@interface
KWMBeforePayVC
()
@interface
KWMBeforePayVC
()
@property
(
nonatomic
)
BOOL
isEditingDiscount
;
@property
(
nonatomic
)
BUYCustomer
*
customer
;
@property
(
nonatomic
)
BUYCustomer
*
customer
;
@property
(
weak
,
nonatomic
)
IBOutlet
UIButton
*
submit
;
@property
(
weak
,
nonatomic
)
IBOutlet
UIButton
*
submit
;
@end
@end
@implementation
KWMBeforePayVC
@implementation
KWMBeforePayVC
...
@@ -49,6 +49,7 @@
...
@@ -49,6 +49,7 @@
-
(
void
)
viewDidLoad
{
-
(
void
)
viewDidLoad
{
[
super
viewDidLoad
];
[
super
viewDidLoad
];
[
self
initDiscountHintText
];
self
.
title
=
@"提交订单"
;
self
.
title
=
@"提交订单"
;
self
.
payType
=
[
self
.
userDao
.
currencyCode
isEqualToString
:
@"EUR"
]?
TypeWebpay
:
TypeAlipay
;
self
.
payType
=
[
self
.
userDao
.
currencyCode
isEqualToString
:
@"EUR"
]?
TypeWebpay
:
TypeAlipay
;
self
.
beforePayData
=
[
KWMBeforePayData
new
];
self
.
beforePayData
=
[
KWMBeforePayData
new
];
...
@@ -77,8 +78,6 @@
...
@@ -77,8 +78,6 @@
if
(
payType
==
TypeWebpay
){
if
(
payType
==
TypeWebpay
){
self
.
heightPayType
.
constant
=
0
;
self
.
heightPayType
.
constant
=
0
;
self
.
vPayType
.
hidden
=
YES
;
self
.
vPayType
.
hidden
=
YES
;
}
else
{
self
.
lbPayType
.
text
=
[
KWMPayUtil
payTypeString
:
payType
];
}
}
}
}
...
@@ -118,6 +117,7 @@
...
@@ -118,6 +117,7 @@
if
(
error
==
nil
&&
checkout
)
{
if
(
error
==
nil
&&
checkout
)
{
this
.
address
=
address
;
this
.
address
=
address
;
this
.
checkout
=
checkout
;
this
.
checkout
=
checkout
;
[
this
showToast
:
@"更新地址成功"
];
[
this
showToast
:
@"更新地址成功"
];
[
this
flushCheckout
:
dictionary
];
[
this
flushCheckout
:
dictionary
];
// [this initData];
// [this initData];
...
@@ -150,11 +150,6 @@
...
@@ -150,11 +150,6 @@
[
self
initData
];
[
self
initData
];
}
}
-
(
void
)
kwm_addedDiscount
:
(
BUYCheckout
*
)
checkout
{
self
.
checkout
=
checkout
;
[
self
initData
];
}
-
(
void
)
kwm_addedGiftCard
:
(
BUYCheckout
*
)
checkout
{
-
(
void
)
kwm_addedGiftCard
:
(
BUYCheckout
*
)
checkout
{
self
.
checkout
=
checkout
;
self
.
checkout
=
checkout
;
[
self
initData
];
[
self
initData
];
...
@@ -167,6 +162,22 @@
...
@@ -167,6 +162,22 @@
-
(
void
)
kwm_onSelectPayType
:
(
KWMPayType
)
payType
{
-
(
void
)
kwm_onSelectPayType
:
(
KWMPayType
)
payType
{
self
.
payType
=
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
{
-
(
void
)
initData
{
...
@@ -201,11 +212,17 @@
...
@@ -201,11 +212,17 @@
}
}
//优惠码
//优惠码
if
(
self
.
checkout
.
discount
!=
nil
){
if
(
self
.
checkout
.
discount
){
self
.
lb
Discount
.
text
=
self
.
checkout
.
discount
.
code
;
self
.
tf
Discount
.
text
=
self
.
checkout
.
discount
.
code
;
}
else
{
}
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
){
if
(
self
.
checkout
.
giftCardsArray
!=
nil
&&
self
.
checkout
.
giftCardsArray
.
count
>
0
){
BUYGiftCard
*
giftCard
=
[
self
.
checkout
.
giftCardsArray
objectAtIndex
:
0
];
BUYGiftCard
*
giftCard
=
[
self
.
checkout
.
giftCardsArray
objectAtIndex
:
0
];
...
@@ -375,9 +392,13 @@
...
@@ -375,9 +392,13 @@
[
self
showToast
:
@"未成功创建订单"
];
[
self
showToast
:
@"未成功创建订单"
];
return
;
return
;
}
}
KWMPayTypeVC
*
typeVC
=
(
KWMPayTypeVC
*
)[
KWMBaseVC
findControllerBy
:[
KWMPayTypeVC
kwmTag
]
fromStoryboard
:
@"ShopCart"
];
UITapGestureRecognizer
*
tapType
=
sender
;
typeVC
.
delegate
=
self
;
UIView
*
vType
=
tapType
.
view
;
[
self
.
navigationController
pushViewController
:
typeVC
animated
:
YES
];
if
(
vType
.
tag
==
1
){
[
self
kwm_onSelectPayType
:
TypeAlipay
];
}
else
if
(
vType
.
tag
==
2
){
[
self
kwm_onSelectPayType
:
TypeWechatPay
];
}
}
}
//优惠码页面
//优惠码页面
...
@@ -386,10 +407,42 @@
...
@@ -386,10 +407,42 @@
[
self
showToast
:
@"未成功创建订单"
];
[
self
showToast
:
@"未成功创建订单"
];
return
;
return
;
}
}
KWMDiscountVC
*
discountVC
=
(
KWMDiscountVC
*
)[
KWMBaseVC
findControllerBy
:[
KWMDiscountVC
kwmTag
]
fromStoryboard
:
@"ShopCart"
];
self
.
isEditingDiscount
=
YES
;
discountVC
.
checkout
=
self
.
checkout
;
[
self
initData
];
discountVC
.
delegate
=
self
;
[
self
.
tfDiscount
becomeFirstResponder
];
[
self
.
navigationController
pushViewController
:
discountVC
animated
:
YES
];
}
-
(
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 @@
...
@@ -429,6 +482,24 @@
[
self
startCheckout
];
[
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
{
-
(
void
)
startCheckout
{
if
(
self
.
checkout
==
nil
){
if
(
self
.
checkout
==
nil
){
[
self
showToast
:
@"未成功初始化订单"
];
[
self
showToast
:
@"未成功初始化订单"
];
...
@@ -485,23 +556,6 @@
...
@@ -485,23 +556,6 @@
[
self
showToast
:
errorMsg
];
[
self
showToast
:
errorMsg
];
}
}
return
errorMsg
!=
nil
;
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;
}
}
...
...
This diff is collapsed.
Click to expand it.
iCemarose/Class/UI/ShopCart/KWMPaySuccessVC.h
View file @
70bc6c29
...
@@ -7,6 +7,8 @@
...
@@ -7,6 +7,8 @@
//
//
#import "KWMBaseVC.h"
#import "KWMBaseVC.h"
#import "KWMRecommendView.h"
#import "KWMPPCacheUtil.h"
@interface
KWMPaySuccessVC
:
KWMBaseVC
@interface
KWMPaySuccessVC
:
KWMBaseVC
...
@@ -16,12 +18,19 @@
...
@@ -16,12 +18,19 @@
@property
(
weak
,
nonatomic
)
IBOutlet
UIButton
*
btnMyOrder
;
@property
(
weak
,
nonatomic
)
IBOutlet
UIButton
*
btnMyOrder
;
@property
(
weak
,
nonatomic
)
IBOutlet
UIButton
*
btnBackHome
;
@property
(
weak
,
nonatomic
)
IBOutlet
KWMRecommendView
*
hotRecommendView
;
-
(
IBAction
)
onClickStartTime
:(
id
)
sender
;
-
(
IBAction
)
onClickStartTime
:(
id
)
sender
;
-
(
IBAction
)
onClickGetTime
:(
id
)
sender
;
-
(
IBAction
)
onClickGetTime
:(
id
)
sender
;
-
(
IBAction
)
onClickMyOrder
:(
id
)
sender
;
-
(
IBAction
)
onClickMyOrder
:(
id
)
sender
;
-
(
IBAction
)
onClickBackHome
:(
id
)
sender
;
//用于在跳转后的订单列表页面生成即时订单(支付后的订单需要一定时间后才能从订单列表获取)
//用于在跳转后的订单列表页面生成即时订单(支付后的订单需要一定时间后才能从订单列表获取)
@property
(
nonatomic
)
BUYCheckout
*
paidCheckout
;
@property
(
nonatomic
)
BUYCheckout
*
paidCheckout
;
...
...
This diff is collapsed.
Click to expand it.
iCemarose/Class/UI/ShopCart/KWMPaySuccessVC.m
View file @
70bc6c29
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
#import "UIViewController+BackButtonHandler.h"
#import "UIViewController+BackButtonHandler.h"
#import "KWMOrderVC.h"
#import "KWMOrderVC.h"
@interface
KWMPaySuccessVC
()
@interface
KWMPaySuccessVC
()
<
KWMRecommendDelegate
>
@end
@end
...
@@ -24,6 +24,9 @@
...
@@ -24,6 +24,9 @@
self
.
title
=
@"支付成功"
;
self
.
title
=
@"支付成功"
;
[
self
initButton
];
[
self
initButton
];
[
self
requestProductWithHandle
:
@"products-list-app-homepage"
tags
:
nil
valueKeyPath
:
@"productArray"
];
self
.
hotRecommendView
.
title
=
@"热卖单品"
;
self
.
hotRecommendView
.
delegate
=
self
;
}
}
+
(
NSString
*
)
kwmTag
{
+
(
NSString
*
)
kwmTag
{
...
@@ -45,6 +48,9 @@
...
@@ -45,6 +48,9 @@
self
.
btnMyOrder
.
layer
.
masksToBounds
=
YES
;
self
.
btnMyOrder
.
layer
.
masksToBounds
=
YES
;
self
.
btnMyOrder
.
layer
.
borderColor
=
[
UIColor
sam_colorWithHex
:
@"979797"
].
CGColor
;
//要设置的颜色
self
.
btnMyOrder
.
layer
.
borderColor
=
[
UIColor
sam_colorWithHex
:
@"979797"
].
CGColor
;
//要设置的颜色
self
.
btnMyOrder
.
layer
.
borderWidth
=
1
;
//要设置的描边宽
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 @@
...
@@ -70,11 +76,80 @@
[
self
.
navigationController
pushViewController
:
orderVC
animated
:
YES
];
[
self
.
navigationController
pushViewController
:
orderVC
animated
:
YES
];
}
}
-
(
void
)
onClickBackHome
:
(
id
)
sender
{
[
self
.
navigationController
popToRootViewControllerAnimated
:
YES
];
}
-
(
BOOL
)
navigationShouldPopOnBackButton
{
-
(
BOOL
)
navigationShouldPopOnBackButton
{
[
self
.
navigationController
popToRootViewControllerAnimated
:
YES
];
[
self
.
navigationController
popToRootViewControllerAnimated
:
YES
];
return
NO
;
// Ignore 'Back' button this time
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
@end
This diff is collapsed.
Click to expand it.
iCemarose/Class/UI/ShopCart/KWMShopCartVC.m
View file @
70bc6c29
...
@@ -17,8 +17,12 @@
...
@@ -17,8 +17,12 @@
#import "KWMCategoryVC.h"
#import "KWMCategoryVC.h"
#import "KWMStringUtil.h"
#import "KWMStringUtil.h"
#import "KWMShoppingCart.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
)
NSMutableArray
*
shopCartList
;
@property
(
nonatomic
,
strong
)
NSMutableArray
*
soldout
;
@property
(
nonatomic
,
strong
)
NSMutableArray
*
soldout
;
@end
@end
...
@@ -53,6 +57,10 @@
...
@@ -53,6 +57,10 @@
[
self
setTotalPrice
];
[
self
setTotalPrice
];
[
self
checkInStockAndRefresh
];
[
self
checkInStockAndRefresh
];
self
.
newestRecommendView
.
title
=
@"最新单品"
;
self
.
mainRecommendView
.
title
=
@"主推单品"
;
self
.
newestRecommendView
.
delegate
=
self
;
self
.
mainRecommendView
.
delegate
=
self
;
}
}
-
(
void
)
checkInStockAndRefresh
{
-
(
void
)
checkInStockAndRefresh
{
...
@@ -165,13 +173,9 @@
...
@@ -165,13 +173,9 @@
}
}
-
(
NSInteger
)
tableView
:
(
UITableView
*
)
tableView
numberOfRowsInSection
:
(
NSInteger
)
section
{
-
(
NSInteger
)
tableView
:
(
UITableView
*
)
tableView
numberOfRowsInSection
:
(
NSInteger
)
section
{
NSInteger
count
=
self
.
shopCartList
?
self
.
shopCartList
.
count
:
0
;
if
(
_shopCartList
.
count
==
0
)
{
self
.
vBackground
.
hidden
=
count
!=
0
;
self
.
vBackground
.
hidden
=
NO
;
return
count
;
}
else
{
self
.
vBackground
.
hidden
=
YES
;
}
return
_shopCartList
.
count
;
}
}
#pragma mark UITableViewDelegate
#pragma mark UITableViewDelegate
...
@@ -225,6 +229,19 @@
...
@@ -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
{
-
(
void
)
kwm_onClickDelete
:
(
KWMShopCartModel
*
)
shopCartModel
{
self
.
vDelete
.
hidden
=
NO
;
self
.
vDelete
.
hidden
=
NO
;
self
.
vDelete
.
delegate
=
self
;
self
.
vDelete
.
delegate
=
self
;
...
@@ -356,6 +373,11 @@
...
@@ -356,6 +373,11 @@
self
.
shopCartList
=
[[
KWMShoppingCart
sharedInstance
]
items
];
self
.
shopCartList
=
[[
KWMShoppingCart
sharedInstance
]
items
];
[
self
.
tbvCart
reloadData
];
[
self
.
tbvCart
reloadData
];
[
self
setTotalPrice
];
[
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) {
// [self.client getProductsByIds:[self.shopCartList rx_mapWithBlock:^id(KWMShopCartModel *each) {
// return each.product_id;
// return each.product_id;
// }] completion:^(NSArray<BUYProduct *> * _Nullable products, NSError * _Nullable error) {
// }] completion:^(NSArray<BUYProduct *> * _Nullable products, NSError * _Nullable error) {
...
@@ -380,4 +402,44 @@
...
@@ -380,4 +402,44 @@
_lbTotalPrice
.
text
=
total
.
priceFormatted
;
_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
@end
This diff is collapsed.
Click to expand it.
iCemarose/Class/UI/ShopCart/ShopCart.storyboard
View file @
70bc6c29
This diff is collapsed.
Click to expand it.
iCemarose/Class/Util/KWMPPCacheUtil.h
View file @
70bc6c29
...
@@ -20,6 +20,11 @@
...
@@ -20,6 +20,11 @@
tags
:(
nullable
NSArray
<
NSString
*>
*
)
tags
tags
:(
nullable
NSArray
<
NSString
*>
*
)
tags
inCollection
:(
nullable
NSNumber
*
)
collectionId
;
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
;
+
(
void
)
saveDataToCache
:(
NSDictionary
*
)
cacheKeyDictionary
urlKey
:(
NSString
*
)
urlKey
products
:(
NSArray
*
)
products
;
+
(
NSArray
*
)
getProductDataByCache
:(
NSDictionary
*
)
cacheKeyDictionary
urlKey
:(
NSString
*
)
urlKey
;
+
(
NSArray
*
)
getProductDataByCache
:(
NSDictionary
*
)
cacheKeyDictionary
urlKey
:(
NSString
*
)
urlKey
;
...
...
This diff is collapsed.
Click to expand it.
iCemarose/Class/Util/KWMPPCacheUtil.m
View file @
70bc6c29
...
@@ -33,6 +33,23 @@
...
@@ -33,6 +33,23 @@
return
params
;
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
{
+
(
void
)
saveDataToCache
:(
NSDictionary
*
)
cacheKeyDictionary
urlKey
:(
NSString
*
)
urlKey
products
:(
NSArray
*
)
products
{
NSMutableArray
*
dictArray
=
[
NSMutableArray
array
];
NSMutableArray
*
dictArray
=
[
NSMutableArray
array
];
...
...
This diff is collapsed.
Click to expand it.
iCemarose/Class/
UI/NewHome/Cell/KWMRecommendHeader
.h
→
iCemarose/Class/
View/KWMRecommendView
.h
View file @
70bc6c29
...
@@ -8,15 +8,16 @@
...
@@ -8,15 +8,16 @@
#import <UIKit/UIKit.h>
#import <UIKit/UIKit.h>
#import <Buy/Buy.h>
#import <Buy/Buy.h>
@class
KWMRecommendView
;
@protocol
KWMRecommendDelegate
<
NSObject
>
@protocol
KWMRecommendDelegate
<
NSObject
>
-
(
void
)
kwm_onClickProduct
:
(
BUYProduct
*
)
product
;
-
(
void
)
kwm_onClickProduct
:
(
BUYProduct
*
)
product
;
-
(
void
)
kwm_gotoRecommendPage
;
-
(
void
)
kwm_gotoRecommendPage
:(
KWMRecommendView
*
)
recommendView
;
@end
@end
@interface
KWMRecommend
Header
:
UIView
<
UICollectionViewDataSource
,
UICollectionViewDelegate
>
@interface
KWMRecommend
View
:
UIView
<
UICollectionViewDataSource
,
UICollectionViewDelegate
>
+
(
NSString
*
)
kwmTag
;
+
(
NSString
*
)
kwmTag
;
...
@@ -24,4 +25,9 @@
...
@@ -24,4 +25,9 @@
@property
(
nonatomic
)
NSArray
*
productArray
;
@property
(
nonatomic
)
NSArray
*
productArray
;
@property
(
nonatomic
)
NSString
*
title
;
//已购买商品,用于去重
@property
(
nonatomic
)
NSArray
*
boughtProductIdArray
;
@end
@end
This diff is collapsed.
Click to expand it.
iCemarose/Class/
UI/NewHome/Cell/KWMRecommendHeader
.m
→
iCemarose/Class/
View/KWMRecommendView
.m
View file @
70bc6c29
...
@@ -6,21 +6,23 @@
...
@@ -6,21 +6,23 @@
// Copyright © 2017年 kollway. All rights reserved.
// Copyright © 2017年 kollway. All rights reserved.
//
//
#import "KWMRecommend
Header
.h"
#import "KWMRecommend
View
.h"
#import "KWMCollectionCell.h"
#import "KWMCollectionCell.h"
@interface
KWMRecommend
Header
()
@interface
KWMRecommend
View
()
@property
(
nonatomic
,
weak
)
IBOutlet
UIView
*
vView
;
@property
(
nonatomic
,
weak
)
IBOutlet
UIView
*
vView
;
@property
(
nonatomic
,
weak
)
IBOutlet
UICollectionView
*
cvRecommend
;
@property
(
nonatomic
,
weak
)
IBOutlet
UICollectionView
*
cvRecommend
;
@property
(
nonatomic
,
weak
)
IBOutlet
UILabel
*
lbTitle
;
@end
@end
@implementation
KWMRecommend
Header
@implementation
KWMRecommend
View
+
(
NSString
*
)
kwmTag
{
+
(
NSString
*
)
kwmTag
{
return
@"KWMRecommend
Header
"
;
return
@"KWMRecommend
View
"
;
}
}
-
(
id
)
init
{
-
(
id
)
init
{
...
@@ -68,11 +70,33 @@
...
@@ -68,11 +70,33 @@
self
.
cvRecommend
.
collectionViewLayout
=
layout
;
self
.
cvRecommend
.
collectionViewLayout
=
layout
;
}
}
-
(
void
)
setTitle
:
(
NSString
*
)
title
{
_title
=
title
;
if
(
self
.
lbTitle
){
[
self
.
lbTitle
setText
:
title
];
}
}
-
(
void
)
setProductArray
:
(
NSArray
*
)
productArray
{
-
(
void
)
setProductArray
:
(
NSArray
*
)
productArray
{
_productArray
=
productArray
;
_productArray
=
productArray
;
[
self
removeSameProduct
];
[
self
.
cvRecommend
reloadData
];
[
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
#pragma mark - UICollectionViewDataSource
-
(
UICollectionViewCell
*
)
collectionView
:
(
UICollectionView
*
)
collectionView
cellForItemAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
-
(
UICollectionViewCell
*
)
collectionView
:
(
UICollectionView
*
)
collectionView
cellForItemAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
KWMCollectionCell
*
cell
=
[
collectionView
dequeueReusableCellWithReuseIdentifier
:
NSStringFromClass
([
KWMCollectionCell
class
])
forIndexPath
:
indexPath
];
KWMCollectionCell
*
cell
=
[
collectionView
dequeueReusableCellWithReuseIdentifier
:
NSStringFromClass
([
KWMCollectionCell
class
])
forIndexPath
:
indexPath
];
...
@@ -93,17 +117,26 @@
...
@@ -93,17 +117,26 @@
}
}
-
(
NSInteger
)
collectionView
:
(
UICollectionView
*
)
collectionView
numberOfItemsInSection
:
(
NSInteger
)
section
{
-
(
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
;
return
10
;
}
}
if
(
productCount
+
boughtCount
>
9
){
return
productCount
+
1
;
}
return
self
.
productArray
?
self
.
productArray
.
count
:
0
;
return
self
.
productArray
?
self
.
productArray
.
count
:
0
;
}
}
-
(
void
)
collectionView
:
(
UICollectionView
*
)
collectionView
didSelectItemAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
-
(
void
)
collectionView
:
(
UICollectionView
*
)
collectionView
didSelectItemAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
[
collectionView
deselectItemAtIndexPath
:
indexPath
animated
:
YES
];
[
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
){
if
(
self
.
delegate
){
[
self
.
delegate
kwm_gotoRecommendPage
];
[
self
.
delegate
kwm_gotoRecommendPage
:
self
];
}
}
}
else
{
}
else
{
BUYProduct
*
product
=
[
self
.
productArray
objectAtIndex
:
indexPath
.
row
];
BUYProduct
*
product
=
[
self
.
productArray
objectAtIndex
:
indexPath
.
row
];
...
...
This diff is collapsed.
Click to expand it.
iCemarose/Class/
UI/NewHome/Cell/KWMRecommendHeader
.xib
→
iCemarose/Class/
View/KWMRecommendView
.xib
View file @
70bc6c29
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.XIB"
version=
"3.0"
toolsVersion=
"13
196
"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
useAutolayout=
"YES"
useTraitCollections=
"YES"
colorMatched=
"YES"
>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.XIB"
version=
"3.0"
toolsVersion=
"13
529
"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
useAutolayout=
"YES"
useTraitCollections=
"YES"
colorMatched=
"YES"
>
<device
id=
"retina4_7"
orientation=
"portrait"
>
<device
id=
"retina4_7"
orientation=
"portrait"
>
<adaptation
id=
"fullscreen"
/>
<adaptation
id=
"fullscreen"
/>
</device>
</device>
<dependencies>
<dependencies>
<deployment
identifier=
"iOS"
/>
<deployment
identifier=
"iOS"
/>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"13
173
"
/>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"13
527
"
/>
<capability
name=
"documents saved in the Xcode 8 format"
minToolsVersion=
"8.0"
/>
<capability
name=
"documents saved in the Xcode 8 format"
minToolsVersion=
"8.0"
/>
</dependencies>
</dependencies>
<customFonts
key=
"customFonts"
>
<customFonts
key=
"customFonts"
>
...
@@ -14,9 +14,10 @@
...
@@ -14,9 +14,10 @@
</array>
</array>
</customFonts>
</customFonts>
<objects>
<objects>
<placeholder
placeholderIdentifier=
"IBFilesOwner"
id=
"-1"
userLabel=
"File's Owner"
customClass=
"KWMRecommend
Header
"
>
<placeholder
placeholderIdentifier=
"IBFilesOwner"
id=
"-1"
userLabel=
"File's Owner"
customClass=
"KWMRecommend
View
"
>
<connections>
<connections>
<outlet
property=
"cvRecommend"
destination=
"YkQ-i0-Pi8"
id=
"k1I-3x-9pe"
/>
<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"
/>
<outlet
property=
"vView"
destination=
"iN0-l3-epB"
id=
"4mj-ET-3eS"
/>
</connections>
</connections>
</placeholder>
</placeholder>
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment