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
7d4885e3
Commit
7d4885e3
authored
Mar 19, 2018
by
lee
Browse files
Options
Browse Files
Download
Plain Diff
u
parents
8ea2bdaa
ca57cf3c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
15 deletions
+24
-15
KWMBrandCaramelVC.m
iCemarose/Class/UI/Brand/KWMBrandCaramelVC.m
+1
-0
KWMNewHomeVC.m
iCemarose/Class/UI/NewHome/KWMNewHomeVC.m
+4
-0
KWMFirstDetailView.m
iCemarose/Class/UI/NewProduct/Cell/KWMFirstDetailView.m
+17
-13
KWMStringUtil.m
iCemarose/Class/Util/KWMStringUtil.m
+2
-2
No files found.
iCemarose/Class/UI/Brand/KWMBrandCaramelVC.m
View file @
7d4885e3
...
@@ -441,6 +441,7 @@ static NSString *idStr = @"KWMBrandCaramelCell";
...
@@ -441,6 +441,7 @@ static NSString *idStr = @"KWMBrandCaramelCell";
}
else
{
}
else
{
[[
weakSelf
.
tbvBrandCaramel
mj_footer
]
endRefreshingWithNoMoreData
];
[[
weakSelf
.
tbvBrandCaramel
mj_footer
]
endRefreshingWithNoMoreData
];
}
}
[
weakSelf
appendDataList
:[
NSArray
array
]
setPage
:
tagetPage
];
}
else
{
}
else
{
if
(
tagetPage
==
1
){
if
(
tagetPage
==
1
){
[
weakSelf
.
dataList
removeAllObjects
];
[
weakSelf
.
dataList
removeAllObjects
];
...
...
iCemarose/Class/UI/NewHome/KWMNewHomeVC.m
View file @
7d4885e3
...
@@ -352,6 +352,10 @@ typedef enum{
...
@@ -352,6 +352,10 @@ typedef enum{
self
.
page
=
page
;
self
.
page
=
page
;
if
(
!
error
)
{
if
(
!
error
)
{
[
KWMPPCacheUtil
saveDataToCache
:
parameters
urlKey
:
CACHE_KEY_SDK_getCollectionByHandle_getProductsPage
products
:
products
];
[
KWMPPCacheUtil
saveDataToCache
:
parameters
urlKey
:
CACHE_KEY_SDK_getCollectionByHandle_getProductsPage
products
:
products
];
if
(
isHome
&&
cpage
==
1
){
//清除预先显示的缓存商品
self
.
productArray
.
removeAllObjects
;
}
[
self
setValue
:
products
forKeyPath
:
valueKeyPath
];
[
self
setValue
:
products
forKeyPath
:
valueKeyPath
];
[
self
.
cvHome
reloadData
];
[
self
.
cvHome
reloadData
];
}
else
{
}
else
{
...
...
iCemarose/Class/UI/NewProduct/Cell/KWMFirstDetailView.m
View file @
7d4885e3
...
@@ -10,6 +10,7 @@
...
@@ -10,6 +10,7 @@
#import "KWMImageUtil.h"
#import "KWMImageUtil.h"
#import "KWMStringUtil.h"
#import "KWMStringUtil.h"
#import "KWMPageControl.h"
#import "KWMPageControl.h"
#import "KWMUserDao.h"
//#import "YYWebImage/YYWebImage.h"
//#import "YYWebImage/YYWebImage.h"
#import <SDCycleScrollView/SDCycleScrollView.h>
#import <SDCycleScrollView/SDCycleScrollView.h>
...
@@ -31,9 +32,6 @@
...
@@ -31,9 +32,6 @@
@property
(
nonatomic
,
weak
)
IBOutlet
UIView
*
freeShipping
;
@property
(
nonatomic
,
weak
)
IBOutlet
UIView
*
freeShipping
;
//单位label
@property
(
nonatomic
,
weak
)
IBOutlet
UILabel
*
lbUnit
;
//@property(nonatomic,weak) IBOutlet KWMPageControl *pageControl;
//@property(nonatomic,weak) IBOutlet KWMPageControl *pageControl;
@property
(
weak
,
nonatomic
)
IBOutlet
UIView
*
sizeGuideView
;
@property
(
weak
,
nonatomic
)
IBOutlet
UIView
*
sizeGuideView
;
...
@@ -134,7 +132,7 @@
...
@@ -134,7 +132,7 @@
if
(
product
==
nil
){
if
(
product
==
nil
){
return
;
return
;
}
}
self
.
isShowCNY
=
YES
;
self
.
isShowCNY
=
[[
KWMUserDao
shareDao
].
currencyCode
isEqualToString
:
@"CNY"
]
;
// self.isFirstScroll = YES;
// self.isFirstScroll = YES;
// [self removeTimer];
// [self removeTimer];
self
.
product
=
product
;
self
.
product
=
product
;
...
@@ -210,13 +208,10 @@
...
@@ -210,13 +208,10 @@
self
.
lbOldPrice
.
hidden
=
YES
;
self
.
lbOldPrice
.
hidden
=
YES
;
}
}
UITapGestureRecognizer
*
priceTap1
=
[[
UITapGestureRecognizer
alloc
]
initWithTarget
:
self
action
:
@selector
(
onClickPrice
:
)];
UITapGestureRecognizer
*
priceTap2
=
[[
UITapGestureRecognizer
alloc
]
initWithTarget
:
self
action
:
@selector
(
onClickPrice
:
)];
UITapGestureRecognizer
*
priceTap2
=
[[
UITapGestureRecognizer
alloc
]
initWithTarget
:
self
action
:
@selector
(
onClickPrice
:
)];
UITapGestureRecognizer
*
priceTap3
=
[[
UITapGestureRecognizer
alloc
]
initWithTarget
:
self
action
:
@selector
(
onClickPrice
:
)];
UITapGestureRecognizer
*
priceTap3
=
[[
UITapGestureRecognizer
alloc
]
initWithTarget
:
self
action
:
@selector
(
onClickPrice
:
)];
[
self
.
lbUnit
addGestureRecognizer
:
priceTap1
];
[
self
.
lbPrice
addGestureRecognizer
:
priceTap2
];
[
self
.
lbPrice
addGestureRecognizer
:
priceTap2
];
[
self
.
lbOldPrice
addGestureRecognizer
:
priceTap3
];
[
self
.
lbOldPrice
addGestureRecognizer
:
priceTap3
];
self
.
lbUnit
.
userInteractionEnabled
=
YES
;
self
.
lbPrice
.
userInteractionEnabled
=
YES
;
self
.
lbPrice
.
userInteractionEnabled
=
YES
;
self
.
lbOldPrice
.
userInteractionEnabled
=
YES
;
self
.
lbOldPrice
.
userInteractionEnabled
=
YES
;
self
.
freeShipping
.
hidden
=
[
product
.
tags
containsObject
:
@"not-return"
];
self
.
freeShipping
.
hidden
=
[
product
.
tags
containsObject
:
@"not-return"
];
...
@@ -243,21 +238,29 @@
...
@@ -243,21 +238,29 @@
return
;
return
;
}
}
self
.
isShowCNY
=
!
self
.
isShowCNY
;
self
.
isShowCNY
=
!
self
.
isShowCNY
;
BUYProductVariant
*
productVariant
=
self
.
product
.
variants
.
firstObject
;
[
self
refreshPrice
];
}
-
(
void
)
refreshPrice
{
if
(
self
.
product
==
nil
||
!
self
.
product
.
variants
||
self
.
product
.
variants
.
count
==
0
){
return
;
}
BUYProductVariant
*
productVariant
=
self
.
product
.
variants
.
firstObject
;
if
(
self
.
variant
){
productVariant
=
self
.
variant
;
}
if
(
self
.
isShowCNY
){
if
(
self
.
isShowCNY
){
self
.
lbUnit
.
text
=
@"¥"
;
self
.
lbPrice
.
text
=
[
KWMStringUtil
price
:
productVariant
.
price
];
self
.
lbPrice
.
text
=
[
KWMStringUtil
price
:
productVariant
.
price
];
if
(
productVariant
.
compareAtPrice
)
{
if
(
productVariant
.
compareAtPrice
)
{
NSString
*
priceString
=
[
NSString
stringWithFormat
:
@"¥%@"
,[
KWMStringUtil
price
:
productVariant
.
compareAtPrice
]
];
NSString
*
priceString
=
[
KWMStringUtil
price
:
productVariant
.
compareAtPrice
];
NSDictionary
*
attribtDic
=
@{
NSStrikethroughStyleAttributeName
:
[
NSNumber
numberWithInteger
:
NSUnderlineStyleSingle
]};
NSDictionary
*
attribtDic
=
@{
NSStrikethroughStyleAttributeName
:
[
NSNumber
numberWithInteger
:
NSUnderlineStyleSingle
]};
NSMutableAttributedString
*
attribtStr
=
[[
NSMutableAttributedString
alloc
]
initWithString
:
priceString
attributes
:
attribtDic
];
NSMutableAttributedString
*
attribtStr
=
[[
NSMutableAttributedString
alloc
]
initWithString
:
priceString
attributes
:
attribtDic
];
self
.
lbOldPrice
.
attributedText
=
attribtStr
;
self
.
lbOldPrice
.
attributedText
=
attribtStr
;
}
}
}
else
{
}
else
{
self
.
lbUnit
.
text
=
@"€"
;
self
.
lbPrice
.
text
=
[
NSString
stringWithFormat
:
@"€%.2f"
,
productVariant
.
price
.
floatValue
];
self
.
lbPrice
.
text
=
productVariant
.
price
.
stringValue
;
if
(
productVariant
.
compareAtPrice
)
{
if
(
productVariant
.
compareAtPrice
)
{
NSString
*
priceString
=
[
NSString
stringWithFormat
:
@"€%
@"
,
productVariant
.
compareAtPrice
.
string
Value
];
NSString
*
priceString
=
[
NSString
stringWithFormat
:
@"€%
.2f"
,
productVariant
.
compareAtPrice
.
float
Value
];
NSDictionary
*
attribtDic
=
@{
NSStrikethroughStyleAttributeName
:
[
NSNumber
numberWithInteger
:
NSUnderlineStyleSingle
]};
NSDictionary
*
attribtDic
=
@{
NSStrikethroughStyleAttributeName
:
[
NSNumber
numberWithInteger
:
NSUnderlineStyleSingle
]};
NSMutableAttributedString
*
attribtStr
=
[[
NSMutableAttributedString
alloc
]
initWithString
:
priceString
attributes
:
attribtDic
];
NSMutableAttributedString
*
attribtStr
=
[[
NSMutableAttributedString
alloc
]
initWithString
:
priceString
attributes
:
attribtDic
];
self
.
lbOldPrice
.
attributedText
=
attribtStr
;
self
.
lbOldPrice
.
attributedText
=
attribtStr
;
...
@@ -294,6 +297,7 @@
...
@@ -294,6 +297,7 @@
NSString
*
colorString
=
color
?[
NSString
stringWithFormat
:
@"%@ /"
,
color
.
title
]:
@""
;
NSString
*
colorString
=
color
?[
NSString
stringWithFormat
:
@"%@ /"
,
color
.
title
]:
@""
;
self
.
lbVariant
.
text
=
[
NSString
stringWithFormat
:
@"已选择 %@ %@ / %ld"
,
colorString
,
variant
.
title
,
count
];
self
.
lbVariant
.
text
=
[
NSString
stringWithFormat
:
@"已选择 %@ %@ / %ld"
,
colorString
,
variant
.
title
,
count
];
}
}
[
self
refreshPrice
];
}
}
-
(
void
)
setSizeGuideHidden
:
(
BOOL
)
sizeGuideHidden
{
-
(
void
)
setSizeGuideHidden
:
(
BOOL
)
sizeGuideHidden
{
...
...
iCemarose/Class/Util/KWMStringUtil.m
View file @
7d4885e3
...
@@ -497,7 +497,7 @@ static NSString *kEnglishNum = @"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstu
...
@@ -497,7 +497,7 @@ static NSString *kEnglishNum = @"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstu
// if(exchageRate == 0){
// if(exchageRate == 0){
// exchageRate = ExchangeRate;
// exchageRate = ExchangeRate;
// }
// }
CNYstring
=
[
NSString
stringWithFormat
:
@"%.
0
f"
,
price
.
floatValue
*
exchageRate
];
CNYstring
=
[
NSString
stringWithFormat
:
@"%.
2
f"
,
price
.
floatValue
*
exchageRate
];
// CNYstring = [NSString stringWithFormat:@"%.2f",price.floatValue];
// CNYstring = [NSString stringWithFormat:@"%.2f",price.floatValue];
return
CNYstring
;
return
CNYstring
;
...
@@ -505,7 +505,7 @@ static NSString *kEnglishNum = @"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstu
...
@@ -505,7 +505,7 @@ static NSString *kEnglishNum = @"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstu
+
(
NSString
*
)
price
:(
NSNumber
*
)
price
{
+
(
NSString
*
)
price
:(
NSNumber
*
)
price
{
NSString
*
CNYstring
=
[
self
getEUR2CNYstring
:
price
];
NSString
*
CNYstring
=
[
self
getEUR2CNYstring
:
price
];
return
[
NSString
stringWithFormat
:
@"
¥
%@"
,
CNYstring
];
return
[
NSString
stringWithFormat
:
@"
CN¥
%@"
,
CNYstring
];
}
}
+
(
NSArray
*
)
splitArray
:(
NSArray
*
)
array
withSubSize
:(
NSInteger
)
subSize
{
+
(
NSArray
*
)
splitArray
:(
NSArray
*
)
array
withSubSize
:(
NSInteger
)
subSize
{
...
...
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