berwin 9 年 前
コミット
1fb5da7040

+ 6 - 0
zj-pay/Non-Stop/Non-Stop.xcodeproj/project.pbxproj

@ -18,6 +18,7 @@
18 18
		EA743E3C1BEC9A6800FD542C /* AI_BusiIntroductionVC.m in Sources */ = {isa = PBXBuildFile; fileRef = EA743E3B1BEC9A6800FD542C /* AI_BusiIntroductionVC.m */; };
19 19
		EA743E3E1BEC9A7700FD542C /* AI_BusiIntroductionVC.xib in Resources */ = {isa = PBXBuildFile; fileRef = EA743E3D1BEC9A7700FD542C /* AI_BusiIntroductionVC.xib */; };
20 20
		EA743E401BEC9A9900FD542C /* AI-table-detail.png in Resources */ = {isa = PBXBuildFile; fileRef = EA743E3F1BEC9A9900FD542C /* AI-table-detail.png */; };
21
		EABDB5FA1BF03FA60069DDE2 /* AISystemAlertViewWithCallback.m in Sources */ = {isa = PBXBuildFile; fileRef = EABDB5F91BF03FA60069DDE2 /* AISystemAlertViewWithCallback.m */; };
21 22
		EAF9F1201BEC81A0009D4F25 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = EAF9F11F1BEC81A0009D4F25 /* main.m */; };
22 23
		EAF9F1231BEC81A0009D4F25 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = EAF9F1221BEC81A0009D4F25 /* AppDelegate.m */; };
23 24
		EAF9F1261BEC81A0009D4F25 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = EAF9F1251BEC81A0009D4F25 /* ViewController.m */; };
@ -51,6 +52,8 @@
51 52
		EA743E3B1BEC9A6800FD542C /* AI_BusiIntroductionVC.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AI_BusiIntroductionVC.m; sourceTree = "<group>"; };
52 53
		EA743E3D1BEC9A7700FD542C /* AI_BusiIntroductionVC.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = AI_BusiIntroductionVC.xib; sourceTree = "<group>"; };
53 54
		EA743E3F1BEC9A9900FD542C /* AI-table-detail.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "AI-table-detail.png"; sourceTree = "<group>"; };
55
		EABDB5F81BF03FA60069DDE2 /* AISystemAlertViewWithCallback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AISystemAlertViewWithCallback.h; sourceTree = "<group>"; };
56
		EABDB5F91BF03FA60069DDE2 /* AISystemAlertViewWithCallback.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AISystemAlertViewWithCallback.m; sourceTree = "<group>"; };
54 57
		EAF9F11B1BEC81A0009D4F25 /* Non-Stop.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Non-Stop.app"; sourceTree = BUILT_PRODUCTS_DIR; };
55 58
		EAF9F11F1BEC81A0009D4F25 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
56 59
		EAF9F1211BEC81A0009D4F25 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
@ -201,6 +204,8 @@
201 204
				EAF9F13D1BEC8421009D4F25 /* AIconst.h */,
202 205
				EAF9F13E1BEC8421009D4F25 /* AIUtils.h */,
203 206
				EAF9F13F1BEC8421009D4F25 /* AIUtils.m */,
207
				EABDB5F81BF03FA60069DDE2 /* AISystemAlertViewWithCallback.h */,
208
				EABDB5F91BF03FA60069DDE2 /* AISystemAlertViewWithCallback.m */,
204 209
			);
205 210
			path = util;
206 211
			sourceTree = "<group>";
@ -292,6 +297,7 @@
292 297
				EAF9F1231BEC81A0009D4F25 /* AppDelegate.m in Sources */,
293 298
				EAF9F1201BEC81A0009D4F25 /* main.m in Sources */,
294 299
				EAF9F14C1BEC8481009D4F25 /* AI_BaseViewController.m in Sources */,
300
				EABDB5FA1BF03FA60069DDE2 /* AISystemAlertViewWithCallback.m in Sources */,
295 301
				EA743E3C1BEC9A6800FD542C /* AI_BusiIntroductionVC.m in Sources */,
296 302
				EAF9F1401BEC8421009D4F25 /* AIUtils.m in Sources */,
297 303
				EA743E291BEC94C000FD542C /* AI_AddBankCardVC.m in Sources */,

+ 3 - 1
zj-pay/Non-Stop/Non-Stop/ViewController.m

@ -13,6 +13,7 @@
13 13
#import "AI_SignSuccessVC.h"
14 14
#import "AI_BusiIntroductionVC.h"
15 15
#import "AI_VerifyMessageCodeVC.h"
16
#import "AISystemAlertViewWithCallback.h"
16 17
17 18
@interface ViewController ()
18 19
@ -32,8 +33,9 @@
32 33
}
33 34
- (void)openNonStop:(id)sender {
34 35
//    AI_HadSignContractVCViewController *vc = [[AI_HadSignContractVCViewController alloc]initWithBundleNib];
35
    UINavigationController *nav = [[UINavigationController alloc]initWithRootViewController:[[AI_VerifyMessageCodeVC alloc]initWithBundleNib]];
36
    UINavigationController *nav = [[UINavigationController alloc]initWithRootViewController:[[AI_SignSuccessVC alloc]initWithBundleNib]];
36 37
    [self presentViewController:nav animated:NO completion:nil];
38
   
37 39
}
38 40
39 41
- (void)didReceiveMemoryWarning {

+ 6 - 10
zj-pay/Non-Stop/Non-Stop/res/layout/AI_SignSuccessVC.xib

@ -1,14 +1,15 @@
1 1
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="6254" systemVersion="14B25" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none">
2
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="9059" systemVersion="14F27" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none">
3 3
    <dependencies>
4 4
        <deployment identifier="iOS"/>
5
        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6247"/>
5
        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9049"/>
6 6
    </dependencies>
7 7
    <objects>
8 8
        <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="AI_SignSuccessVC">
9 9
            <connections>
10 10
                <outlet property="amountTF" destination="hCV-ce-0fI" id="QuY-Qe-JyM"/>
11 11
                <outlet property="backButton" destination="W1j-tt-NE0" id="YIH-M6-4t8"/>
12
                <outlet property="cardNoLabel" destination="TcT-HY-rq2" id="IW1-uB-FQF"/>
12 13
                <outlet property="cardNoTF" destination="rJ3-D9-pnd" id="9sB-l5-lD3"/>
13 14
                <outlet property="phoneNoTF" destination="lLf-dK-eIh" id="C08-oU-u4C"/>
14 15
                <outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
@ -40,8 +41,8 @@
40 41
                    <color key="textColor" red="0.40000000000000002" green="0.40000000000000002" blue="0.40000000000000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
41 42
                    <nil key="highlightedColor"/>
42 43
                </label>
43
                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="绑       :" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="78F-Ye-Gog">
44
                    <rect key="frame" x="16" y="127" width="97" height="21"/>
44
                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="绑定金额:" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="78F-Ye-Gog">
45
                    <rect key="frame" x="16" y="127" width="69" height="21"/>
45 46
                    <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
46 47
                    <fontDescription key="fontDescription" type="system" pointSize="15"/>
47 48
                    <color key="textColor" red="0.40000000000000002" green="0.40000000000000002" blue="0.40000000000000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
@ -72,7 +73,7 @@
72 73
                    </connections>
73 74
                </button>
74 75
                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="hCV-ce-0fI">
75
                    <rect key="frame" x="121" y="124" width="177" height="21"/>
76
                    <rect key="frame" x="93" y="124" width="177" height="21"/>
76 77
                    <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
77 78
                    <fontDescription key="fontDescription" type="system" pointSize="15"/>
78 79
                    <color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
@ -83,9 +84,4 @@
83 84
            <point key="canvasLocation" x="203" y="322"/>
84 85
        </view>
85 86
    </objects>
86
    <simulatedMetricsContainer key="defaultSimulatedMetrics">
87
        <simulatedStatusBarMetrics key="statusBar"/>
88
        <simulatedOrientationMetrics key="orientation"/>
89
        <simulatedScreenMetrics key="destination" type="retina4"/>
90
    </simulatedMetricsContainer>
91 87
</document>

+ 2 - 0
zj-pay/Non-Stop/Non-Stop/src/non-stop/AI_HadSignContractVCViewController.h

@ -10,4 +10,6 @@
10 10
11 11
@interface AI_HadSignContractVCViewController : AI_BaseViewController
12 12
13
@property(nonatomic,assign) NSInteger payType;
14
13 15
@end

+ 3 - 7
zj-pay/Non-Stop/Non-Stop/src/non-stop/AI_HadSignContractVCViewController.m

@ -12,10 +12,6 @@
12 12
13 13
@interface AI_HadSignContractVCViewController ()
14 14
15
{
16
    NSInteger payType;
17
}
18
19 15
@property (weak, nonatomic) IBOutlet UILabel *signPhoneNumeLable;
20 16
@property (weak, nonatomic) IBOutlet UIView *amountButtonsView;
21 17
@property (weak, nonatomic) IBOutlet UIView *webChatView;
@ -79,9 +75,9 @@
79 75
    self.webChatView.hidden = YES;
80 76
    self.unionPayView.hidden = YES;
81 77
    
82
    payType = PAY_TYPE_UNIONPAY;
78
    _payType = PAY_TYPE_UNIONPAY;//测试用
83 79
    
84
    if (payType == PAY_TYPE_UNIONPAY) {
80
    if (_payType == PAY_TYPE_UNIONPAY) {
85 81
        
86 82
        self.webChatView.hidden = YES;
87 83
        self.unionPayView.hidden = NO;
@ -101,7 +97,7 @@
101 97
        _border.path = [UIBezierPath bezierPathWithRect:self.unionPayDashView.bounds].CGPath;
102 98
        _border.frame = self.unionPayDashView.bounds;
103 99
        [self.unionPayDashView.layer addSublayer:_border];
104
    }else if(payType == PAY_TYPE_WEBCHAT){
100
    }else if(_payType == PAY_TYPE_WEBCHAT){
105 101
        self.webChatView.hidden = NO;
106 102
        self.unionPayView.hidden = YES;
107 103
        

+ 1 - 0
zj-pay/Non-Stop/Non-Stop/src/non-stop/AI_SignSuccessVC.h

@ -14,4 +14,5 @@
14 14
@property (nonatomic,copy) NSString *phoneNo;
15 15
@property (nonatomic,copy) NSString *amount;
16 16
17
@property (nonatomic,assign) NSInteger payType;
17 18
@end

+ 7 - 0
zj-pay/Non-Stop/Non-Stop/src/non-stop/AI_SignSuccessVC.m

@ -15,6 +15,7 @@
15 15
16 16
@property (weak, nonatomic) IBOutlet UILabel *amountTF;
17 17
@property (weak, nonatomic) IBOutlet UIButton *backButton;
18
@property (weak, nonatomic) IBOutlet UILabel *cardNoLabel;
18 19
@end
19 20
20 21
@implementation AI_SignSuccessVC
@ -23,6 +24,12 @@
23 24
    [super viewDidLoad];
24 25
    
25 26
    [self setTitle:@"永不停机开通成功" AndBackAction:@selector(goBack:)];
27
28
    if (self.payType == PAY_TYPE_WEBCHAT) {
29
        self.cardNoLabel.text = @"绑定微信账号:";
30
    }else{
31
        self.cardNoLabel.text = @"绑定银行卡号:";
32
    }
26 33
    
27 34
    [self.backButton setBackgroundImage:[AIUtils imageWithColor:AI_MAIN_THEME_COLOR] forState:UIControlStateNormal];
28 35
    [AIUtils setUIViewCorner:self.backButton WithRadius:4 andColor:[AI_MAIN_THEME_COLOR CGColor]];

+ 19 - 0
zj-pay/Non-Stop/Non-Stop/src/util/AISystemAlertViewWithCallback.h

@ -0,0 +1,19 @@
1
//
2
//  AISystemAlertViewWithCallback.h
3
//  Non-Stop
4
//
5
//  Created by tony on 15/11/9.
6
//  Copyright © 2015年 shelomi. All rights reserved.
7
//
8
9
#import <UIKit/UIKit.h>
10
11
@class AISystemAlertViewWithCallback;
12
13
typedef void(^ClickCallback)(AISystemAlertViewWithCallback *alert,NSInteger buttonIndex);
14
15
@interface AISystemAlertViewWithCallback : UIAlertView <UIAlertViewDelegate>
16
17
- (instancetype) initWithTitle:(NSString *)title message:(NSString *)message callback:(ClickCallback) callback cancelButtonTitle:(nullable NSString *)cancelButtonTitle otherButtonTitles:(nullable NSString *)otherButtonTitles, ... NS_REQUIRES_NIL_TERMINATION;
18
19
@end

+ 54 - 0
zj-pay/Non-Stop/Non-Stop/src/util/AISystemAlertViewWithCallback.m

@ -0,0 +1,54 @@
1
//
2
//  AISystemAlertViewWithCallback.m
3
//  Non-Stop
4
//
5
//  Created by tony on 15/11/9.
6
//  Copyright © 2015年 shelomi. All rights reserved.
7
//
8
9
#import "AISystemAlertViewWithCallback.h"
10
11
@interface AISystemAlertViewWithCallback ()
12
13
@property (nonatomic,copy) ClickCallback callback;
14
15
@end
16
17
@implementation AISystemAlertViewWithCallback
18
19
- (instancetype) initWithTitle:(NSString *)title message:(NSString *)message callback:(ClickCallback) callback cancelButtonTitle:(nullable NSString *)cancelButtonTitle otherButtonTitles:(nullable NSString *)otherButtonTitles, ... {
20
    self = [self initWithTitle:title message:message delegate:self cancelButtonTitle:cancelButtonTitle otherButtonTitles:nil, nil];
21
    
22
    id eachObject;
23
    va_list argumentList;
24
    if (otherButtonTitles) // The first argument isn't part of the varargs list,
25
    {                                   // so we'll handle it separately.
26
        [self addButtonWithTitle:otherButtonTitles];
27
        va_start(argumentList, otherButtonTitles); // Start scanning for arguments after firstObject.
28
        while ((eachObject = va_arg(argumentList, id))) // As many times as we can get an argument of type "id"
29
            [self addButtonWithTitle: eachObject]; // that isn't nil, add it to self's contents.
30
        va_end(argumentList);
31
    }
32
    
33
    if (self) {
34
        _callback = callback;
35
    }
36
    return self;
37
    
38
}
39
40
- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex{
41
    if(_callback){
42
        _callback(self,buttonIndex);
43
    }
44
}
45
46
/*
47
// Only override drawRect: if you perform custom drawing.
48
// An empty implementation adversely affects performance during animation.
49
- (void)drawRect:(CGRect)rect {
50
    // Drawing code
51
}
52
*/
53
54
@end