123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- //
- // SPSBOrderBalancePayViewController.m
- // 我的社保
- //
- // Created by shanp on 2021/6/21.
- //
- #import "SPSBOrderBalancePayViewController.h"
- #import "SPSBOrderBalanceModel.h"
- #import "UIViewController+SPSBNetworkManager.h"
- #import "SPSBAppDifferenceProfile.h"
- @interface SPSBOrderBalancePayViewController ()
- @end
- @implementation SPSBOrderBalancePayViewController
- - (void)viewDidLoad {
- [super viewDidLoad];
- // Do any additional setup after loading the view.
- }
- #pragma mark - Action
- #pragma mark - Network Action
- - (void)payAction {
- @weakify(self)
- [self networkUseMethod:SPSBNetworkMethodPOST loadingTips:@"正在支付" isLogin:true url:spsb_appUrl(SPSBUrlCreatePriceDifferencePaymentOrder) urlParameters:nil parameters:^NSDictionary * _Nonnull{
- return @{@"added_no" : self->_spsb_data.spsb_added_no, @"pay_channel" : self.spsb_orderBase.spsb_chosePay == 0 ? SPSBAlipayChannel : SPSBWeChatPayChannel};;
- } success:^NSString * _Nullable(NSError * _Nonnull error, id _Nullable data) {
- @strongify(self)
- [self payActionWithOrderType:SPSBOrderTypeOrderBalance serveyType:SPSBResultServeyTypeNo payData:data[@"data"] argumentData:nil];
- return nil;
- } failure:^NSString * _Nullable(NSError * _Nonnull error, id _Nullable data) {
- @strongify(self)
- if (self.spsb_orderBase.spsb_payFailure) {
- self.spsb_orderBase.spsb_payFailure(error);
- }
- return nil;
- }];
- }
- #pragma mark - UI
- - (void)setupUI {
- [super setupUI];
- [self setOrderBaseWithOrderType:SPSBOrderTypeOrderBalance totalFee:_spsb_data.spsb_amount.floatValue discountCount:0 orderNumber:0 showData:nil buttonType:SPSBOrderListPayButtonTypePay];
- [self createPayView];
- }
- @end
|