3 Ревизии 67c01dd719 ... e0cd644cb1

Автор SHA1 Съобщение Дата
  wangwei e0cd644cb1 提交图片素材 преди 6 години
  wangwei 395dd7ea88 下拉小西的渐变色 преди 6 години
  wangwei 0974370866 下拉代码 преди 6 години
променени са 20 файла, в които са добавени 144 реда и са изтрити 32 реда
  1. 23 0
      CAISHEN/Images.xcassets/SellPhoneNew/icon_check_ assess_alertImg.imageset/Contents.json
  2. BIN
      CAISHEN/Images.xcassets/SellPhoneNew/icon_check_ assess_alertImg.imageset/icon_check_ assess_alertImg.png
  3. BIN
      CAISHEN/Images.xcassets/SellPhoneNew/icon_check_ assess_alertImg.imageset/icon_check_ assess_alertImg@2x.png
  4. BIN
      CAISHEN/Images.xcassets/SellPhoneNew/icon_check_ assess_alertImg.imageset/icon_check_ assess_alertImg@3x.png
  5. 23 0
      CAISHEN/Images.xcassets/SellPhoneNew/icon_check_ home_banner.imageset/Contents.json
  6. BIN
      CAISHEN/Images.xcassets/SellPhoneNew/icon_check_ home_banner.imageset/icon_check_ home_banner.png
  7. BIN
      CAISHEN/Images.xcassets/SellPhoneNew/icon_check_ home_banner.imageset/icon_check_ home_banner@2x.png
  8. BIN
      CAISHEN/Images.xcassets/SellPhoneNew/icon_check_ home_banner.imageset/icon_check_ home_banner@3x.png
  9. 23 0
      CAISHEN/Images.xcassets/SellPhoneNew/icon_check_ home_quality.imageset/Contents.json
  10. BIN
      CAISHEN/Images.xcassets/SellPhoneNew/icon_check_ home_quality.imageset/icon_check_ home_quality.png
  11. BIN
      CAISHEN/Images.xcassets/SellPhoneNew/icon_check_ home_quality.imageset/icon_check_ home_quality@2x.png
  12. BIN
      CAISHEN/Images.xcassets/SellPhoneNew/icon_check_ home_quality.imageset/icon_check_ home_quality@3x.png
  13. 3 2
      CAISHEN/SellPhone2/Home/AssessPage/Controller/KXAssessComputerViewController.m
  14. 2 1
      CAISHEN/SellPhone2/Home/AssessPage/Controller/KXAssessPadViewController.m
  15. 2 1
      CAISHEN/SellPhone2/Home/AssessPage/Controller/KXAssessPhoneViewController.m
  16. 17 7
      CAISHEN/SellPhone2/Home/AssessPage/Controller/KXAssessViewController.m
  17. 2 1
      CAISHEN/SellPhone2/Home/AssessPage/View/WWAssessAlertView/KXAssessAlertView.h
  18. 21 4
      CAISHEN/SellPhone2/Home/AssessPage/View/WWAssessAlertView/KXAssessAlertView.m
  19. 27 15
      CAISHEN/SellPhone2/Home/HomePage/Controller/KXSPHomeViewController.m
  20. 1 1
      CAISHEN/SellPhone2/Home/HomePage/View/WWGradientColor/UIImage+WWGradientColor.m

+ 23 - 0
CAISHEN/Images.xcassets/SellPhoneNew/icon_check_ assess_alertImg.imageset/Contents.json

@@ -0,0 +1,23 @@
1
+{
2
+  "images" : [
3
+    {
4
+      "idiom" : "universal",
5
+      "filename" : "icon_check_ assess_alertImg.png",
6
+      "scale" : "1x"
7
+    },
8
+    {
9
+      "idiom" : "universal",
10
+      "filename" : "icon_check_ assess_alertImg@2x.png",
11
+      "scale" : "2x"
12
+    },
13
+    {
14
+      "idiom" : "universal",
15
+      "filename" : "icon_check_ assess_alertImg@3x.png",
16
+      "scale" : "3x"
17
+    }
18
+  ],
19
+  "info" : {
20
+    "version" : 1,
21
+    "author" : "xcode"
22
+  }
23
+}

BIN
CAISHEN/Images.xcassets/SellPhoneNew/icon_check_ assess_alertImg.imageset/icon_check_ assess_alertImg.png


BIN
CAISHEN/Images.xcassets/SellPhoneNew/icon_check_ assess_alertImg.imageset/icon_check_ assess_alertImg@2x.png


BIN
CAISHEN/Images.xcassets/SellPhoneNew/icon_check_ assess_alertImg.imageset/icon_check_ assess_alertImg@3x.png


+ 23 - 0
CAISHEN/Images.xcassets/SellPhoneNew/icon_check_ home_banner.imageset/Contents.json

@@ -0,0 +1,23 @@
1
+{
2
+  "images" : [
3
+    {
4
+      "idiom" : "universal",
5
+      "filename" : "icon_check_ home_banner.png",
6
+      "scale" : "1x"
7
+    },
8
+    {
9
+      "idiom" : "universal",
10
+      "filename" : "icon_check_ home_banner@2x.png",
11
+      "scale" : "2x"
12
+    },
13
+    {
14
+      "idiom" : "universal",
15
+      "filename" : "icon_check_ home_banner@3x.png",
16
+      "scale" : "3x"
17
+    }
18
+  ],
19
+  "info" : {
20
+    "version" : 1,
21
+    "author" : "xcode"
22
+  }
23
+}

BIN
CAISHEN/Images.xcassets/SellPhoneNew/icon_check_ home_banner.imageset/icon_check_ home_banner.png


BIN
CAISHEN/Images.xcassets/SellPhoneNew/icon_check_ home_banner.imageset/icon_check_ home_banner@2x.png


BIN
CAISHEN/Images.xcassets/SellPhoneNew/icon_check_ home_banner.imageset/icon_check_ home_banner@3x.png


+ 23 - 0
CAISHEN/Images.xcassets/SellPhoneNew/icon_check_ home_quality.imageset/Contents.json

@@ -0,0 +1,23 @@
1
+{
2
+  "images" : [
3
+    {
4
+      "idiom" : "universal",
5
+      "filename" : "icon_check_ home_quality.png",
6
+      "scale" : "1x"
7
+    },
8
+    {
9
+      "idiom" : "universal",
10
+      "filename" : "icon_check_ home_quality@2x.png",
11
+      "scale" : "2x"
12
+    },
13
+    {
14
+      "idiom" : "universal",
15
+      "filename" : "icon_check_ home_quality@3x.png",
16
+      "scale" : "3x"
17
+    }
18
+  ],
19
+  "info" : {
20
+    "version" : 1,
21
+    "author" : "xcode"
22
+  }
23
+}

BIN
CAISHEN/Images.xcassets/SellPhoneNew/icon_check_ home_quality.imageset/icon_check_ home_quality.png


BIN
CAISHEN/Images.xcassets/SellPhoneNew/icon_check_ home_quality.imageset/icon_check_ home_quality@2x.png


BIN
CAISHEN/Images.xcassets/SellPhoneNew/icon_check_ home_quality.imageset/icon_check_ home_quality@3x.png


+ 3 - 2
CAISHEN/SellPhone2/Home/AssessPage/Controller/KXAssessComputerViewController.m

@@ -112,6 +112,7 @@ static NSString *cellID = @"cellID";
112 112
     // Do any additional setup after loading the view.
113 113
     
114 114
     [self.view addSubview:self.tableView];
115
+    self.view.backgroundColor = [UIColor groupTableViewBackgroundColor];
115 116
     self.computerModel = [[KXAssessViewModel alloc] init];
116 117
 }
117 118
 
@@ -250,7 +251,7 @@ static NSString *cellID = @"cellID";
250 251
     
251 252
     self.computerModel.price = [NSString stringWithFormat:@"%d", nowPrice];
252 253
     
253
-    KXAssessAlertView *alertView = [[KXAssessAlertView alloc] initWithImage:@"sellBottom" andText:@"经过评估,您的手机收受价格为" andPrice:self.computerModel.price delegate:self btnTitle:@"立即下单"];
254
+    KXAssessAlertView *alertView = [[KXAssessAlertView alloc] initWithImage:@"icon_check_ assess_alertImg" andText:@"经过评估,您的手机收受价格为" andPrice:self.computerModel.price delegate:self btnTitle:@"立即下单"];
254 255
     [alertView show];
255 256
 }
256 257
 
@@ -269,7 +270,7 @@ static NSString *cellID = @"cellID";
269 270
     
270 271
     [KXHTTP post:urlString params:paramsDict success:^(id json) {
271 272
         NSLog(@"%@", json);
272
-//        [self.navigationController popViewControllerAnimated:YES];
273
+        [self.navigationController popViewControllerAnimated:YES];
273 274
     } failure:^(NSError *error) {
274 275
         [MBProgressHUD showTip:@"网络错误"];
275 276
     }];

+ 2 - 1
CAISHEN/SellPhone2/Home/AssessPage/Controller/KXAssessPadViewController.m

@@ -109,6 +109,7 @@ static NSString *cellID = @"cellID";
109 109
     // Do any additional setup after loading the view.
110 110
     
111 111
     [self.view addSubview:self.tableView];
112
+    self.view.backgroundColor = [UIColor groupTableViewBackgroundColor];
112 113
     self.padModel = [[KXAssessViewModel alloc] init];
113 114
 }
114 115
 
@@ -261,7 +262,7 @@ static NSString *cellID = @"cellID";
261 262
     
262 263
     self.padModel.price = [NSString stringWithFormat:@"%d", nowPrice];
263 264
     
264
-    KXAssessAlertView *alertView = [[KXAssessAlertView alloc] initWithImage:@"sellBottom" andText:@"经过评估,您的手机收受价格为" andPrice:self.padModel.price delegate:self btnTitle:@"立即下单"];
265
+    KXAssessAlertView *alertView = [[KXAssessAlertView alloc] initWithImage:@"icon_check_ assess_alertImg" andText:@"经过评估,您的手机收受价格为" andPrice:self.padModel.price delegate:self btnTitle:@"立即下单"];
265 266
     [alertView show];
266 267
 }
267 268
 

+ 2 - 1
CAISHEN/SellPhone2/Home/AssessPage/Controller/KXAssessPhoneViewController.m

@@ -108,6 +108,7 @@ static NSString *cellID = @"cellID";
108 108
     // Do any additional setup after loading the view.
109 109
 
110 110
     [self.view addSubview:self.tableView];
111
+    self.view.backgroundColor = [UIColor groupTableViewBackgroundColor];
111 112
     self.phoneModel = [[KXAssessViewModel alloc] init];
112 113
 }
113 114
 
@@ -256,7 +257,7 @@ static NSString *cellID = @"cellID";
256 257
     
257 258
     self.phoneModel.price = [NSString stringWithFormat:@"%d", nowPrice];
258 259
     
259
-    KXAssessAlertView *alertView = [[KXAssessAlertView alloc] initWithImage:@"sellBottom" andText:@"经过评估,您的手机收受价格为" andPrice:self.phoneModel.price delegate:self btnTitle:@"立即下单"];
260
+    KXAssessAlertView *alertView = [[KXAssessAlertView alloc] initWithImage:@"icon_check_ assess_alertImg" andText:@"经过评估,您的手机收受价格为" andPrice:self.phoneModel.price delegate:self btnTitle:@"立即下单"];
260 261
     [alertView show];
261 262
 }
262 263
 

+ 17 - 7
CAISHEN/SellPhone2/Home/AssessPage/Controller/KXAssessViewController.m

@@ -12,6 +12,8 @@
12 12
 #import "KXAssessComputerViewController.h"   //电脑评估
13 13
 #import "KXAssessPadViewController.h"        //平板评估
14 14
 
15
+#import "UIImage+WWGradientColor.h"  //渐变色
16
+
15 17
 @interface KXAssessViewController ()
16 18
 
17 19
 @property (nonatomic, strong)UISegmentedControl *segment;  //多段选择器
@@ -36,14 +38,13 @@
36 38
 - (void)createrNaviBar {
37 39
     [self addLeftBarButtonItemWithImageName:@"main_back" title:@"" target:self selector:@selector(popAction)];
38 40
     self.name = @"评估中心";
41
+        self.navigationController.navigationBar.shadowImage = [UIImage new];
42
+    [self.navigationController.navigationBar setBackgroundImage:[UIImage new] forBarMetrics:UIBarMetricsDefault];
39 43
     
40
-    for (UIView *views in self.navigationController.navigationBar.subviews) {
41
-        for (UIView *view in views.subviews) {
42
-            if ([view isKindOfClass:[UIImageView class]]) {
43
-                view.hidden = YES;
44
-            }
45
-        }
46
-    }
44
+    UIColor *topColor = WWColor(219, 141, 255, 1);
45
+    UIColor *bottomColor = WWColor(233, 202, 248, 1);
46
+    UIImage *bgImg = [UIImage gradientColorImageFromColors:@[topColor, bottomColor] gradientType:GradientTypeTopToBottom imgSize:CGSizeMake(SCREEN_WIDTH, NavHeight)];
47
+    self.navigationController.navigationBar.barTintColor = [UIColor colorWithPatternImage:bgImg];
47 48
 }
48 49
 
49 50
 - (void)popAction {
@@ -95,6 +96,15 @@
95 96
 #pragma mark - 创建主界面
96 97
 - (void)createrMainUI {
97 98
     self.view.backgroundColor = [UIColor groupTableViewBackgroundColor];
99
+    
100
+    UIView *topView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, 40)];
101
+    
102
+    UIColor *topColor = WWColor(233, 202, 248, 1);
103
+    UIColor *bottomColor = [UIColor groupTableViewBackgroundColor];
104
+    UIImage *bgImg = [UIImage gradientColorImageFromColors:@[topColor, bottomColor] gradientType:GradientTypeTopToBottom imgSize:CGSizeMake(SCREEN_WIDTH, 44)];
105
+    topView.backgroundColor = [UIColor colorWithPatternImage:bgImg];
106
+    [self.view addSubview:topView];
107
+    
98 108
     [self.view addSubview:self.segment];
99 109
     [self onClickSegment];
100 110
 }

+ 2 - 1
CAISHEN/SellPhone2/Home/AssessPage/View/WWAssessAlertView/KXAssessAlertView.h

@@ -26,7 +26,8 @@ NS_ASSUME_NONNULL_BEGIN
26 26
 @property (nonatomic, strong)UIImageView *imgView;  //图片
27 27
 @property (nonatomic, strong)UILabel *textLabel;   //文字信息
28 28
 @property (nonatomic, strong)UILabel *priceLabel;   //价格
29
-@property (nonatomic, strong)UIButton *assessBtn;   //按钮
29
+@property (nonatomic, strong)UIButton *cancleBtn;   //取消按钮
30
+@property (nonatomic, strong)UIButton *assessBtn;   //下单按钮
30 31
 
31 32
 @property (nonatomic,weak) id<KXAssessAlertViewDelegate> delegate;
32 33
 

+ 21 - 4
CAISHEN/SellPhone2/Home/AssessPage/View/WWAssessAlertView/KXAssessAlertView.m

@@ -42,7 +42,7 @@
42 42
         self.contentView.layer.cornerRadius = 10.0;
43 43
         
44 44
         //图片
45
-        self.imgView = [[UIImageView alloc] initWithFrame:CGRectMake(50*SCREEN_MUTI, -30*SCREEN_MUTI, 200*SCREEN_MUTI, 100*SCREEN_MUTI)];
45
+        self.imgView = [[UIImageView alloc] initWithFrame:CGRectMake(30*SCREEN_MUTI, -40*SCREEN_MUTI, 240*SCREEN_MUTI, 130*SCREEN_MUTI)];
46 46
         self.imgView.image = [UIImage imageNamed:imageName];
47 47
         [self.contentView addSubview:self.imgView];
48 48
         
@@ -62,12 +62,29 @@
62 62
         self.priceLabel.textAlignment = NSTextAlignmentCenter;
63 63
         [self.contentView addSubview:self.priceLabel];
64 64
         
65
-        //按钮
66
-        self.assessBtn = [[UIButton alloc] initWithFrame:CGRectMake(50*SCREEN_MUTI, 200*SCREEN_MUTI, 200*SCREEN_MUTI, 40*SCREEN_MUTI)];
65
+        //取消
66
+        self.cancleBtn = [[UIButton alloc] initWithFrame:CGRectMake(20*SCREEN_MUTI, 200*SCREEN_MUTI, 110*SCREEN_MUTI, 30*SCREEN_MUTI)];
67
+        [self.cancleBtn setTitle:@"取消" forState:UIControlStateNormal];
68
+        [self.cancleBtn setTitleColor:[UIColor newPhoneBaseColor] forState:UIControlStateNormal];
69
+        self.cancleBtn.layer.masksToBounds = YES;
70
+        self.cancleBtn.layer.cornerRadius = 15*SCREEN_MUTI;
71
+        self.cancleBtn.layer.borderWidth = 1.0;
72
+        self.cancleBtn.layer.borderColor = [UIColor newPhoneBaseColor].CGColor;
73
+        
74
+//        UIColor *rigktColor = WWColor(219, 141, 255, 1);
75
+//        UIColor *leftColor = WWColor(173, 99, 255, 1);
76
+//        UIImage *bgImg = [UIImage gradientColorImageFromColors:@[leftColor, rigktColor] gradientType:GradientTypeLeftToRight imgSize:self.assessBtn.frame.size];
77
+//        [self.assessBtn setBackgroundColor:[UIColor colorWithPatternImage:bgImg]];
78
+        
79
+        [self.cancleBtn addTarget:self action:@selector(dismiss) forControlEvents:UIControlEventTouchUpInside];
80
+        [self.contentView addSubview:self.cancleBtn];
81
+        
82
+        //下单按钮
83
+        self.assessBtn = [[UIButton alloc] initWithFrame:CGRectMake(170*SCREEN_MUTI, 200*SCREEN_MUTI, 110*SCREEN_MUTI, 30*SCREEN_MUTI)];
67 84
         [self.assessBtn setTitle:btnTitle forState:UIControlStateNormal];
68 85
         [self.assessBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
69 86
         self.assessBtn.layer.masksToBounds = YES;
70
-        self.assessBtn.layer.cornerRadius = 20*SCREEN_MUTI;
87
+        self.assessBtn.layer.cornerRadius = 15*SCREEN_MUTI;
71 88
         
72 89
         UIColor *rigktColor = WWColor(219, 141, 255, 1);
73 90
         UIColor *leftColor = WWColor(173, 99, 255, 1);

+ 27 - 15
CAISHEN/SellPhone2/Home/HomePage/Controller/KXSPHomeViewController.m

@@ -42,7 +42,7 @@ static NSString *cellID = @"cellID";
42 42
 
43 43
 - (UIView *)headerView {
44 44
     if (!_headerView) {
45
-        _headerView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, 200)];
45
+        _headerView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, 180)];
46 46
         
47 47
         UIColor *topColor = WWColor(219, 141, 255, 1);
48 48
         UIColor *bottomColor = WWColor(233, 202, 248, 1);
@@ -50,8 +50,8 @@ static NSString *cellID = @"cellID";
50 50
         [_headerView setBackgroundColor:[UIColor colorWithPatternImage:bgImg]];
51 51
         
52 52
         //图片
53
-        UIImageView *topImg = [[UIImageView alloc] initWithFrame:CGRectMake(13, 15, SCREEN_WIDTH-26, 170)];
54
-        topImg.image = [UIImage imageNamed:@"sellBanner"];
53
+        UIImageView *topImg = [[UIImageView alloc] initWithFrame:CGRectMake(13, 15, SCREEN_WIDTH-26, 150)];
54
+        topImg.image = [UIImage imageNamed:@"icon_check_ home_banner"];
55 55
         topImg.layer.masksToBounds = YES;
56 56
         topImg.layer.cornerRadius = 10.0;
57 57
         [_headerView addSubview:topImg];
@@ -78,7 +78,7 @@ static NSString *cellID = @"cellID";
78 78
         
79 79
         //质检标准(图片)
80 80
         UIImageView *bottomImg = [[UIImageView alloc] initWithFrame:CGRectMake(13, 250, SCREEN_WIDTH-26, 120)];
81
-        bottomImg.image = [UIImage imageNamed:@"sellBanner"];
81
+        bottomImg.image = [UIImage imageNamed:@"icon_check_ home_quality"];
82 82
         bottomImg.layer.masksToBounds = YES;
83 83
         bottomImg.layer.cornerRadius = 10.0;
84 84
         bottomImg.userInteractionEnabled = YES;
@@ -119,25 +119,28 @@ static NSString *cellID = @"cellID";
119 119
 - (void)viewDidLoad {
120 120
     [super viewDidLoad];
121 121
     // Do any additional setup after loading the view.
122
-    
123 122
     [self createNaviBar];
124 123
     [self.view addSubview:self.tableView];
125 124
 }
126 125
 
126
+- (void)viewWillAppear:(BOOL)animated {
127
+    [super viewWillAppear:animated];
128
+    
129
+    self.navigationController.navigationBar.barTintColor = WWColor(219, 141, 255, 1);
130
+}
131
+
127 132
 #pragma mark - 创建导航栏
128 133
 - (void)createNaviBar {
129 134
     NSString *appName = [NSString getAppName];
130 135
     self.name = appName;
131 136
     
132
-//    for (UIView *views in self.navigationController.navigationBar.subviews) {
133
-//        for (UIView *view in views.subviews) {
134
-//            if ([view isKindOfClass:[UIImageView class]]) {
135
-//                view.hidden = YES;
136
-//            }
137
-//        }
138
-//    }
139
-    
140
-    self.navigationController.navigationBar.barTintColor = WWColor(219, 141, 255, 1);
137
+    for (UIView *views in self.navigationController.navigationBar.subviews) {
138
+        for (UIView *view in views.subviews) {
139
+            if ([view isKindOfClass:[UIImageView class]]) {
140
+                view.hidden = YES;
141
+            }
142
+        }
143
+    }
141 144
 }
142 145
 
143 146
 #pragma mark - tableView dataSource
@@ -158,7 +161,7 @@ static NSString *cellID = @"cellID";
158 161
     cell.indexPath = indexPath;
159 162
     if (indexPath.row == 0) {
160 163
         UIColor *topColor = WWColor(233, 202, 248, 1);
161
-        UIColor *bottomColor = WWColor(245, 245, 245, 1);
164
+        UIColor *bottomColor = [UIColor groupTableViewBackgroundColor];
162 165
         UIImage *bgImg = [UIImage gradientColorImageFromColors:@[topColor, bottomColor] gradientType:GradientTypeTopToBottom imgSize:CGSizeMake(SCREEN_WIDTH, 190)];
163 166
         [cell.contentView setBackgroundColor:[UIColor colorWithPatternImage:bgImg]];
164 167
     }
@@ -167,6 +170,15 @@ static NSString *cellID = @"cellID";
167 170
     return cell;
168 171
 }
169 172
 
173
+- (void)scrollViewDidScroll:(UIScrollView *)scrollView {
174
+    if (scrollView == self.tableView) {
175
+        CGFloat offY = scrollView.contentOffset.y;
176
+        if (offY < 0) {
177
+            scrollView.contentOffset = CGPointZero;   
178
+        }
179
+    }
180
+}
181
+
170 182
 #pragma mark - 点击最底部质检标准图片
171 183
 - (void)onClickBottomImage {
172 184
     KXSPWebViewController *web = [[KXSPWebViewController alloc] init];

+ 1 - 1
CAISHEN/SellPhone2/Home/HomePage/View/WWGradientColor/UIImage+WWGradientColor.m

@@ -21,7 +21,7 @@
21 21
         
22 22
     }
23 23
     
24
-    UIGraphicsBeginImageContextWithOptions(imgSize, YES, 1);
24
+    UIGraphicsBeginImageContextWithOptions(imgSize, YES, [UIScreen mainScreen].scale);
25 25
     
26 26
     CGContextRef context = UIGraphicsGetCurrentContext();
27 27