“wangdongchao” преди 1 година
родител
ревизия
7000bceec2

+ 6 - 0
Asteria.xcodeproj/project.pbxproj

@@ -233,6 +233,7 @@
 		88484D262C4132AB007C3293 /* ASJumpHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = 88484D252C4132AB007C3293 /* ASJumpHandler.m */; };
 		88484D292C4606DD007C3293 /* AppDelegate+PushNotification.m in Sources */ = {isa = PBXBuildFile; fileRef = 88484D282C4606DD007C3293 /* AppDelegate+PushNotification.m */; };
 		88484D2B2C48C8E5007C3293 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 88484D2A2C48C8E5007C3293 /* GoogleService-Info.plist */; };
+		88484D2E2C4A4857007C3293 /* ASMessageViewModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 88484D2D2C4A4857007C3293 /* ASMessageViewModel.m */; };
 		88516B6E2C12E51600F2E396 /* ASLoginBindingC.m in Sources */ = {isa = PBXBuildFile; fileRef = 88516B6D2C12E51600F2E396 /* ASLoginBindingC.m */; };
 		88C9F9202C3FC64400B47ADA /* ASPushOneSignalManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 88C9F91F2C3FC64400B47ADA /* ASPushOneSignalManager.m */; };
 		8C24ECE114420CDEE7B9B22B /* Pods_Asteria.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 54DCE8001991D89B696E7D44 /* Pods_Asteria.framework */; };
@@ -821,6 +822,8 @@
 		88484D272C4606DD007C3293 /* AppDelegate+PushNotification.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "AppDelegate+PushNotification.h"; sourceTree = "<group>"; };
 		88484D282C4606DD007C3293 /* AppDelegate+PushNotification.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "AppDelegate+PushNotification.m"; sourceTree = "<group>"; };
 		88484D2A2C48C8E5007C3293 /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = "<group>"; };
+		88484D2C2C4A4857007C3293 /* ASMessageViewModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ASMessageViewModel.h; sourceTree = "<group>"; };
+		88484D2D2C4A4857007C3293 /* ASMessageViewModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ASMessageViewModel.m; sourceTree = "<group>"; };
 		88516B6C2C12E51600F2E396 /* ASLoginBindingC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ASLoginBindingC.h; sourceTree = "<group>"; };
 		88516B6D2C12E51600F2E396 /* ASLoginBindingC.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ASLoginBindingC.m; sourceTree = "<group>"; };
 		88C9F91E2C3FC64400B47ADA /* ASPushOneSignalManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ASPushOneSignalManager.h; sourceTree = "<group>"; };
@@ -1714,6 +1717,8 @@
 				81C7962A2A539E80003083B8 /* ASMessageListViewController.m */,
 				81C7962C2A539F4D003083B8 /* ASMessageListCell.h */,
 				81C7962D2A539F4D003083B8 /* ASMessageListCell.m */,
+				88484D2C2C4A4857007C3293 /* ASMessageViewModel.h */,
+				88484D2D2C4A4857007C3293 /* ASMessageViewModel.m */,
 			);
 			path = Message;
 			sourceTree = "<group>";
@@ -3201,6 +3206,7 @@
 				816020102A2EE55F00E4A8F1 /* ASCategaryListCell.m in Sources */,
 				8810F55E2BF5EBF400346FD4 /* ASOrderDetailsInfoCell.m in Sources */,
 				9AD3460B2A08D60F005CA070 /* UIView+ZFFrame.m in Sources */,
+				88484D2E2C4A4857007C3293 /* ASMessageViewModel.m in Sources */,
 				81E257FD2A12340E004EEF71 /* ASEnterItemV.m in Sources */,
 				81C3B45529F66C1700D79294 /* UIView+PublicInit.m in Sources */,
 				8134C1C52A145172006EB0EC /* ASProductItemView.m in Sources */,

+ 2 - 0
Asteria/ASUI/SizeDefine.h

@@ -16,6 +16,8 @@
 //#define Google_clientID @"288779326635-d24uma05320uitu5dr62mdtltnsf62c8.apps.googleusercontent.com"
 #define Google_clientID @"203797423430-b04oap5s9qsgrg8fnsjnu9cntbceqrej.apps.googleusercontent.com"
 
+#define OneSignalAppId   @"618fe580-bc97-4bf4-b2bb-5039f9dbbc82"
+
 #define StripePublishableKey  @"pk_test_51MFDGRAxgV55iyHtmJFrPuz4i5cl1y3nhTLVT3EmsHlYLIwsj7TnPRPeulAUXSbOW7gccaVLJmFjVz4eu3E17g6z00TLI1YvoG"
 
 

+ 1 - 3
Asteria/AppDelegate.m

@@ -12,15 +12,13 @@
 
 #import <StripeCore/StripeCore-Swift.h>
 
-#import <OneSignal/OneSignal.h>
-
 #import "AppDelegate+PushNotification.h"
 
 #import <FirebaseCore/FirebaseCore.h>
 
 @import Stripe;
 
-@interface AppDelegate ()<UNUserNotificationCenterDelegate>
+@interface AppDelegate ()
 
 //@property (nonatomic, strong, readonly) UIWindow *window;
 

+ 2 - 2
Asteria/Fuction/Cart/Cell/MyCartCouponCell.m

@@ -80,8 +80,8 @@
     }];
     
     [self.couponDesLab mas_makeConstraints:^(MASConstraintMaker *make) {
-        make.left.mas_equalTo(20);
-        make.width.mas_equalTo(KScreenWidth-60);
+        make.left.mas_equalTo(10);
+        make.width.mas_equalTo(KScreenWidth-40);
         make.top.equalTo(applyTmpV.mas_bottom).offset(10);
         make.bottom.mas_equalTo(-20);
     }];

+ 2 - 2
Asteria/Fuction/Cart/Checkout/ASCheckoutPointApplyCell.m

@@ -86,8 +86,8 @@
     }];
     
     [self.pointDesLab mas_makeConstraints:^(MASConstraintMaker *make) {
-        make.left.mas_equalTo(20);
-        make.width.mas_equalTo(KScreenWidth-60);
+        make.left.mas_equalTo(10);
+        make.width.mas_equalTo(KScreenWidth-40);
         make.top.equalTo(applyTmpV.mas_bottom).offset(10);
         make.bottom.mas_equalTo(-20);
     }];

+ 0 - 1
Asteria/Fuction/Cart/PayManager/ASCheckoutPayManager.h

@@ -10,7 +10,6 @@
 
 NS_ASSUME_NONNULL_BEGIN
 
-#define PayStripepublishableKey      @"pk_test_51MFDGRAxgV55iyHtmJFrPuz4i5cl1y3nhTLVT3EmsHlYLIwsj7TnPRPeulAUXSbOW7gccaVLJmFjVz4eu3E17g6z00TLI1YvoG"
 
 #define Chectout_Pay_Paypal_Url      BaseRequestrUrl(@"rewrite/paypal/getPaypalToken")
 #define Chectout_Pay_Klarna_Url      BaseRequestrUrl(@"rewrite/klarna/getKlarnaToken")

+ 6 - 3
Asteria/Fuction/Cart/PayManager/ASCheckoutPayManager.m

@@ -74,7 +74,7 @@ static ASCheckoutPayManager *_instance = nil;
             price_unit_code = @"USD";
         }
         
-        [payment stripedidTapCheckoutButtonWithCurrentvc:[Current_normalTool topViewController] publishableKey:PayStripepublishableKey reqbaseUrl:BaseRequestrUrl(@"carts/mine/order") amount:totalPay*100 currency:price_unit_code addressModel:self.addressModel completion:nil];
+        [payment stripedidTapCheckoutButtonWithCurrentvc:[Current_normalTool topViewController] publishableKey:StripePublishableKey reqbaseUrl:BaseRequestrUrl(@"carts/mine/order") amount:totalPay*100 currency:price_unit_code addressModel:self.addressModel completion:nil];
         
         payment.payFinishBlock = ^(NSString *status, NSString *orderid) {
             int statusInt = [status intValue];
@@ -112,7 +112,7 @@ static ASCheckoutPayManager *_instance = nil;
             //klarna_1 初始化 如果不经历接口创建订单,永远无法更新 client_token 的订单信息
             [self.klarna_payV initializeWithClientToken:self.client_token returnUrl:[NSURL URLWithString:@"asteriaKlarna://"]];
             
-            NSLog(@"=====%@", json);
+//            NSLog(@"=====%@", json);
         } faild:^(NSString * _Nonnull code, NSString * _Nonnull msg) {
             /*K_STRONG_SELF*/;
             [MBProgressHUD hideHUDForView:self.topVC.view animated:YES];
@@ -307,8 +307,9 @@ static ASCheckoutPayManager *_instance = nil;
         [self tool_verifyOrderAutoken:authToken];
         
     } else {
+        [self.topVC.view makeToast:@"Payment Failed" duration:2 position:CSToastPositionCenter];
         if (self.payFinishBlock) {
-            self.payFinishBlock(self.payType, 0, @{@"msg":@"Payment Failed/Cancel"});
+            self.payFinishBlock(self.payType, 0, @{@"msg":@""});
         }
         NSLog(@"klarna 授权支付失败");
     }
@@ -333,6 +334,8 @@ static ASCheckoutPayManager *_instance = nil;
 }
 - (void)klarnaFailedInPaymentView:(KlarnaPaymentView * _Nonnull)paymentView withError:(KlarnaPaymentError * _Nonnull)error {
 //    NSLog(@"klarna---777---%@",paymentView);
+    UILabel *label = [UILabel labelCreateWithText:@"12" font:[UIFont systemFontOfSize:12] textColor:_0B0B0B];
+    [paymentView addSubview:label];
 }
 
 - (void)klarnaFinalizedWithPaymentView:(KlarnaPaymentView * _Nonnull)paymentView approved:(BOOL)approved authToken:(NSString * _Nullable)authToken { 

+ 3 - 0
Asteria/Fuction/Manager/NotificationManager/ASPushOneSignalManager.h

@@ -22,6 +22,9 @@ NS_ASSUME_NONNULL_BEGIN
 //设置用户推送标签
 - (void)setPushApnsTagWithUserInfo;
 
+//设置测试推送标签
+- (void)setTestPushTag;
+
 @end
 
 NS_ASSUME_NONNULL_END

+ 11 - 1
Asteria/Fuction/Manager/NotificationManager/ASPushOneSignalManager.m

@@ -29,7 +29,7 @@
     
     // OneSignal initialization
     [OneSignal initWithLaunchOptions:launchOptions];
-    [OneSignal setAppId:@"618fe580-bc97-4bf4-b2bb-5039f9dbbc82"];
+    [OneSignal setAppId:OneSignalAppId];
 
     // promptForPushNotifications will show the native iOS notification permission prompt.
     // We recommend removing the following code and instead using an In-App Message to prompt for notification permission (See step 8)
@@ -64,6 +64,16 @@
     } else {
         [OneSignal sendTag:@"SufixUid" value:@"-"];
     }
+    
+    //设置测试推送标签
+    [self setTestPushTag];
+}
+
+//设置测试推送标签
+- (void)setTestPushTag {
+#if DEBUG
+    [OneSignal sendTag:@"TestUser" value:@"true"];
+#endif
 }
 
 

+ 34 - 34
Asteria/Fuction/UserCenter/Message/ASMessageListCell.m

@@ -23,30 +23,15 @@
 
 @implementation ASMessageListCell
 
-//- (void)setData:(KWMessageListModel *)m {
-//    self.timeLb.text = m.time;
-//    self.unreadTipV.hidden = m.isReaded == 1;
-//    self.titleLb.text = m.title;
-//    self.desLb.text = m.des;
-//    if ([m.imgUrl isEmpty]) {
-//        self.imgV.hidden = true;
-//    } else {
-//        self.imgV.hidden = false;
-//        [self.imgV sd_setImageWithURL:[NSURL URLWithString:m.imgUrl.urlEncode]];
-//    }
-//}
+- (void)awakeFromNib {
+    [super awakeFromNib];
+    // Initialization code
+}
 
-- (void)setDemoData {
-    self.timeLb.text = @"timtimetimetime";
-    self.unreadTipV.hidden = arc4random()%2 == 1;
-    self.titleLb.text = @"title title title title title title title";
-    self.desLb.text = @"content content content content content content content content content content content content content content content content content content content 134";
-    if (arc4random()%2 == 1) {
-        self.imgV.hidden = true;
-    } else {
-        self.imgV.hidden = false;
-        self.imgV.image = [UIImage imageNamed:@"vip_bg1"];
-    }
+- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
+    [super setSelected:selected animated:animated];
+
+    // Configure the view for the selected state
 }
 
 - (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
@@ -58,17 +43,6 @@
     return self;
 }
 
-- (void)awakeFromNib {
-    [super awakeFromNib];
-    // Initialization code
-}
-
-- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
-    [super setSelected:selected animated:animated];
-
-    // Configure the view for the selected state
-}
-
 - (void)configSubV {
     self.selectionStyle = UITableViewCellSelectionStyleNone;
     
@@ -112,6 +86,32 @@
     
 }
 
+//- (void)setData:(KWMessageListModel *)m {
+//    self.timeLb.text = m.time;
+//    self.unreadTipV.hidden = m.isReaded == 1;
+//    self.titleLb.text = m.title;
+//    self.desLb.text = m.des;
+//    if ([m.imgUrl isEmpty]) {
+//        self.imgV.hidden = true;
+//    } else {
+//        self.imgV.hidden = false;
+//        [self.imgV sd_setImageWithURL:[NSURL URLWithString:m.imgUrl.urlEncode]];
+//    }
+//}
+
+- (void)setDemoData {
+    self.timeLb.text = @"timtimetimetime";
+    self.unreadTipV.hidden = arc4random()%2 == 1;
+    self.titleLb.text = @"title title title title title title title";
+    self.desLb.text = @"content content content content content content content content content content content content content content content content content content content 134";
+    if (arc4random()%2 == 1) {
+        self.imgV.hidden = true;
+    } else {
+        self.imgV.hidden = false;
+        self.imgV.image = [UIImage imageNamed:@"vip_bg1"];
+    }
+}
+
 - (UIView *)bgV {
     if (!_bgV) {
         UIView *v = [[UIView alloc] init];

+ 22 - 0
Asteria/Fuction/UserCenter/Message/ASMessageViewModel.h

@@ -0,0 +1,22 @@
+//
+//  ASMessageViewModel.h
+//  Asteria
+//
+//  Created by xingyu on 2024/7/19.
+//
+
+#import <Foundation/Foundation.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface ASMessageViewModel : NSObject
+
+
+//消息列表
+- (void)getMessageListDataComplate:(void(^)(NSArray *messageArray))complateBlock;
+
+
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 16 - 0
Asteria/Fuction/UserCenter/Message/ASMessageViewModel.m

@@ -0,0 +1,16 @@
+//
+//  ASMessageViewModel.m
+//  Asteria
+//
+//  Created by xingyu on 2024/7/19.
+//
+
+#import "ASMessageViewModel.h"
+
+@implementation ASMessageViewModel
+
+- (void)getMessageListDataComplate:(void(^)(NSArray *messageArray))complateBlock {
+    
+}
+
+@end

+ 0 - 1
Asteria/Fuction/UserCenter/UserCenterHome/ASUserCenterViewController.m

@@ -61,7 +61,6 @@
     } else {
         [Fuction_Tool pop_toLoginVC];
     }
-    
 }
 
 // MARK: - setData