Forráskód Böngészése

修改文案,订购页面添加默认地址

jiaxian_he 1 éve
szülő
commit
748cfdacd2
24 módosított fájl, 156 hozzáadás és 29 törlés
  1. 2 1
      TOKTOK/Podfile
  2. 6 10
      TOKTOK/TOKTOK.xcodeproj/project.pbxproj
  3. 2 0
      TOKTOK/TOKTOK/BeerCentre/BeerDetailsView/XSTTBeerDetailsViewController.m
  4. 2 2
      TOKTOK/TOKTOK/Home/BlindBox/DetailsView/XSTTBlindBoxDetailsViewController.m
  5. 3 3
      TOKTOK/TOKTOK/Home/BlindBox/Order/XSTTBlindBoxToOrderTableViewController.m
  6. 7 1
      TOKTOK/TOKTOK/Home/BlindBox/Pay/XSTTBlindBoxPayViewController.m
  7. 21 0
      TOKTOK/TOKTOK/Home/Home.xcassets/HomeView/home到店品鉴.imageset/Contents.json
  8. BIN
      TOKTOK/TOKTOK/Home/Home.xcassets/HomeView/home到店品鉴.imageset/home到店品鉴.png
  9. 21 0
      TOKTOK/TOKTOK/Home/Home.xcassets/HomeView/home惊喜订购.imageset/Contents.json
  10. BIN
      TOKTOK/TOKTOK/Home/Home.xcassets/HomeView/home惊喜订购.imageset/home惊喜订购.png
  11. 3 3
      TOKTOK/TOKTOK/Home/HomeView/XSTTHomeViewController.m
  12. 18 0
      TOKTOK/TOKTOK/Login/XSTTLoginStatusManager.m
  13. 10 0
      TOKTOK/TOKTOK/Login/XSTTPersonalInformationModel.m
  14. 10 0
      TOKTOK/TOKTOK/Mine/Address/AddressList/XSTTAddressListTableViewController.m
  15. 5 0
      TOKTOK/TOKTOK/Mine/Address/AddressList/XSTTAddressModel.m
  16. BIN
      TOKTOK/TOKTOK/Mine/Mine.xcassets/Home/mine_home_order.imageset/list.pdf
  17. 1 1
      TOKTOK/TOKTOK/Mine/Order/ChooseTime/XSTTOrderDetailsChooseTimeTableViewController.m
  18. 2 2
      TOKTOK/TOKTOK/Mine/Order/OrderDetails/XSTTOrderDetailsViewController.m
  19. 1 1
      TOKTOK/TOKTOK/Public/Manager/XSTTBusinessManager.m
  20. 5 2
      TOKTOK/TOKTOK/Public/Manager/XSTTCacheManager.h
  21. 32 3
      TOKTOK/TOKTOK/Public/Manager/XSTTCacheManager.m
  22. 2 0
      TOKTOK/TOKTOK/Public/Profile/XSTTSQLProfile.h
  23. 2 0
      TOKTOK/TOKTOK/Public/Profile/XSTTSQLProfile.m
  24. 1 0
      TOKTOK/TOKTOK/TOKTOK/AppDelegate+XSTTHandleData.m

+ 2 - 1
TOKTOK/Podfile

@@ -1,4 +1,5 @@
 # Uncomment the next line to define a global platform for your project
+# source 'https://github.com/CocoaPods/Specs.git'
  platform :ios, '9.0'
 
 target 'TOKTOK' do
@@ -6,7 +7,7 @@ target 'TOKTOK' do
   # use_frameworks!
 
     pod 'AFNetworking', '4.0.1'
-    pod 'JXHKit', :git => 'https://github.com/JiaxianHe2016/JXHKit.git'
+    pod 'JXHKit', :git => 'https://github.com/JiaxianHe2023/JXHKit.git'
     
     pod 'UMCommon'
     pod 'UMDevice'

+ 6 - 10
TOKTOK/TOKTOK.xcodeproj/project.pbxproj

@@ -3,11 +3,12 @@
 	archiveVersion = 1;
 	classes = {
 	};
-	objectVersion = 51;
+	objectVersion = 54;
 	objects = {
 
 /* Begin PBXBuildFile section */
 		35D94BB743CE8779391785F0 /* libPods-TOKTOK.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5FFA740819FDD14745F73074 /* libPods-TOKTOK.a */; };
+		6FD8947B2AF4D25D00CDF730 /* loading.json in Resources */ = {isa = PBXBuildFile; fileRef = 6FD8947A2AF4D25D00CDF730 /* loading.json */; };
 		8401463527462AB900D625F2 /* XSTTBannerView.m in Sources */ = {isa = PBXBuildFile; fileRef = 8401463427462AB900D625F2 /* XSTTBannerView.m */; };
 		84014639274780BD00D625F2 /* XSTTAboutViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 84014638274780BD00D625F2 /* XSTTAboutViewController.m */; };
 		8405ECA0290A5C0F000715CA /* XSTTEditPersonalInformationViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8405EC9F290A5C0F000715CA /* XSTTEditPersonalInformationViewController.m */; };
@@ -22,7 +23,6 @@
 		840B9E8928F2C38E0032B0D2 /* t_xstt_location_cache_data.db in Resources */ = {isa = PBXBuildFile; fileRef = 840B9E8828F2C38E0032B0D2 /* t_xstt_location_cache_data.db */; };
 		840B9E8C28F2C3BF0032B0D2 /* XSTTSQLProfile.m in Sources */ = {isa = PBXBuildFile; fileRef = 840B9E8A28F2C3BE0032B0D2 /* XSTTSQLProfile.m */; };
 		840B9E8F28F2C5C50032B0D2 /* XSTTCacheManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 840B9E8D28F2C5C50032B0D2 /* XSTTCacheManager.m */; };
-		840D74702A0B8FB200938D3A /* loading.json in Resources */ = {isa = PBXBuildFile; fileRef = 840D746F2A0B8FB200938D3A /* loading.json */; };
 		840EE8FE28F56C50000CC9DF /* XSTTRefreshHeader.m in Sources */ = {isa = PBXBuildFile; fileRef = 840EE8FC28F56C50000CC9DF /* XSTTRefreshHeader.m */; };
 		840EE90128F56E08000CC9DF /* XSTTSocialCircleListModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 840EE90028F56E08000CC9DF /* XSTTSocialCircleListModel.m */; };
 		840EE90628F5704C000CC9DF /* UIView+XSTTDefault.m in Sources */ = {isa = PBXBuildFile; fileRef = 840EE90328F5704C000CC9DF /* UIView+XSTTDefault.m */; };
@@ -188,6 +188,7 @@
 
 /* Begin PBXFileReference section */
 		5FFA740819FDD14745F73074 /* libPods-TOKTOK.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-TOKTOK.a"; sourceTree = BUILT_PRODUCTS_DIR; };
+		6FD8947A2AF4D25D00CDF730 /* loading.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = loading.json; sourceTree = "<group>"; };
 		8401463327462AB900D625F2 /* XSTTBannerView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XSTTBannerView.h; sourceTree = "<group>"; };
 		8401463427462AB900D625F2 /* XSTTBannerView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XSTTBannerView.m; sourceTree = "<group>"; };
 		84014637274780BD00D625F2 /* XSTTAboutViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XSTTAboutViewController.h; sourceTree = "<group>"; };
@@ -215,7 +216,6 @@
 		840B9E8B28F2C3BE0032B0D2 /* XSTTSQLProfile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XSTTSQLProfile.h; sourceTree = "<group>"; };
 		840B9E8D28F2C5C50032B0D2 /* XSTTCacheManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XSTTCacheManager.m; sourceTree = "<group>"; };
 		840B9E8E28F2C5C50032B0D2 /* XSTTCacheManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XSTTCacheManager.h; sourceTree = "<group>"; };
-		840D746F2A0B8FB200938D3A /* loading.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; name = loading.json; path = "../../../../../../../Library/Containers/com.tencent.xinWeChat/Data/Library/Application Support/com.tencent.xinWeChat/2.0b4.0.9/878d5b4ae5ed9001b6cdaf949fd3f36a/Message/MessageTemp/9e20f478899dc29eb19741386f9343c8/File/loading.json"; sourceTree = "<group>"; };
 		840EE8FC28F56C50000CC9DF /* XSTTRefreshHeader.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XSTTRefreshHeader.m; sourceTree = "<group>"; };
 		840EE8FD28F56C50000CC9DF /* XSTTRefreshHeader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XSTTRefreshHeader.h; sourceTree = "<group>"; };
 		840EE8FF28F56E08000CC9DF /* XSTTSocialCircleListModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XSTTSocialCircleListModel.h; sourceTree = "<group>"; };
@@ -1342,7 +1342,7 @@
 		84D7491F2684815F00AD7C92 /*  Loading */ = {
 			isa = PBXGroup;
 			children = (
-				840D746F2A0B8FB200938D3A /* loading.json */,
+				6FD8947A2AF4D25D00CDF730 /* loading.json */,
 			);
 			path = " Loading";
 			sourceTree = "<group>";
@@ -1479,9 +1479,9 @@
 				84CADD132A1CA7F1004B0600 /* t_xstt_city_data.db in Resources */,
 				849C707928C33E7500BE760C /* SocialCircle.xcassets in Resources */,
 				849C709228C5D5DF00BE760C /* SF-Pro-Text-MediumItalic.otf in Resources */,
-				840D74702A0B8FB200938D3A /* loading.json in Resources */,
 				849C709028C5D5DF00BE760C /* SF-Pro-Text-Medium.otf in Resources */,
 				849C709128C5D5DF00BE760C /* SF-Pro-Text-Regular.otf in Resources */,
+				6FD8947B2AF4D25D00CDF730 /* loading.json in Resources */,
 				849C708E28C5D5DF00BE760C /* SF-Pro-Text-BoldItalic.otf in Resources */,
 				840B9E8928F2C38E0032B0D2 /* t_xstt_location_cache_data.db in Resources */,
 				84685AEF269D723E002AA521 /* BeerCentre.xcassets in Resources */,
@@ -1903,12 +1903,8 @@
 					"\"UserNotifications\"",
 					"-framework",
 					"\"WebKit\"",
-					"-framework",
-					"\"account_login_sdk_noui_core\"",
-					"-weak_framework",
-					"\"Network\"",
 				);
-				PRODUCT_BUNDLE_IDENTIFIER = com.xsbanruo.TOKTOK.debug;
+				PRODUCT_BUNDLE_IDENTIFIER = com.xsbanruo.TOKTOK;
 				PRODUCT_NAME = "$(TARGET_NAME)";
 				PROVISIONING_PROFILE_SPECIFIER = "";
 				SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";

+ 2 - 0
TOKTOK/TOKTOK/BeerCentre/BeerDetailsView/XSTTBeerDetailsViewController.m

@@ -60,6 +60,8 @@
             self->_likeNumber.text = self->_data.xstt_wantDrinkNum;
             self->_likeNumber.superview.hidden = false;
             [self.view showToastWithTitle:@"想喝 +1"];
+        } else {
+            [self.view showToastWithTitle:@"收到,我们会尽快安排上架~"];
         }
     });
 }

+ 2 - 2
TOKTOK/TOKTOK/Home/BlindBox/DetailsView/XSTTBlindBoxDetailsViewController.m

@@ -217,14 +217,14 @@
         make.top.equalTo(74);
     }];
     
-    UILabel *numberTtitle = [UILabel convenienceWithFont:xstt_mediumFont(15) text:@"订阅期数" textColor:xstt_000000_color(0.4)];
+    UILabel *numberTtitle = [UILabel convenienceWithFont:xstt_mediumFont(15) text:@"订购月份" textColor:xstt_000000_color(0.4)];
     [contentView addSubview:numberTtitle];
     [numberTtitle makeConstraints:^(JXHConstraintMaker *make) {
         make.leading.equalTo(XSTTMargin);
         make.top.equalTo(12);
     }];
     
-    UILabel *number = [UILabel convenienceWithFont:xstt_AlipayFont(17) text:[NSString stringWithFormat:@"%@期", _data.xstt_boxNo] textColor:xstt_000000_color(0.87)];
+    UILabel *number = [UILabel convenienceWithFont:xstt_AlipayFont(17) text:_data.xstt_boxNo textColor:xstt_000000_color(0.87)];
     [contentView addSubview:number];
     [number makeConstraints:^(JXHConstraintMaker *make) {
         make.leading.equalTo(numberTtitle);

+ 3 - 3
TOKTOK/TOKTOK/Home/BlindBox/Order/XSTTBlindBoxToOrderTableViewController.m

@@ -65,7 +65,7 @@
         make.bottom.equalTo(-17);
     }];
     
-    UILabel *numberTtitle = [UILabel convenienceWithFont:xstt_mediumFont(13) text:@"订阅期数" textColor:xstt_000000_color(0.4)];
+    UILabel *numberTtitle = [UILabel convenienceWithFont:xstt_mediumFont(13) text:@"订购月份" textColor:xstt_000000_color(0.4)];
     [contentView addSubview:numberTtitle];
     [numberTtitle makeConstraints:^(JXHConstraintMaker *make) {
         make.leading.equalTo(20);
@@ -102,7 +102,7 @@
 - (void)reloadData:(XSTTBlindBoxToOrderModel *)data {
     _title.text = data.xstt_boxName;
     [_imageView sd_setImageWithURL:[NSURL URLWithString:data.xstt_boxBg]];
-    _number.text = [NSString stringWithFormat:@"%@期",data.xstt_currBoxNo];
+    _number.text = data.xstt_currBoxNo;
     _time.text = data.xstt_cutOffTime;
 }
 
@@ -205,7 +205,7 @@ static NSString * const reuseIdentifier = @"XSTTBlindBoxToOrderTableViewCell";
 
 #pragma mark - UI
 - (void)setUpUI {
-    self.title = @"盲盒订购";
+    self.title = @"惊喜订购";
     [self setupTableView];
 }
 

+ 7 - 1
TOKTOK/TOKTOK/Home/BlindBox/Pay/XSTTBlindBoxPayViewController.m

@@ -20,6 +20,7 @@
 #import "XSTTPayManager.h"
 #import "XSTTRouteManager.h"
 #import "XSTTOrderListViewController.h"
+#import "XSTTCacheManager.h"
 
 #define xstt_blindBoxPayChooseButtonTag 3000
 #define xstt_blindBoxPayChooseIconTag 4000
@@ -418,6 +419,11 @@
         make.leading.equalTo(XSTTMargin);
         make.bottom.equalTo(-16);
     }];
+    
+    XSTTAddressModel *model = [XSTTCacheManager getDefaultAddressCache];
+    if (model) {
+        [self refreshAddress:model];
+    }
 }
 
 - (void)createPaymentMethodView {
@@ -530,7 +536,7 @@
         make.height.equalTo(74);
     }];
     
-    UILabel *numberTtitle = [UILabel convenienceWithFont:xstt_mediumFont(15) text:@"订阅期数" textColor:xstt_000000_color(0.4)];
+    UILabel *numberTtitle = [UILabel convenienceWithFont:xstt_mediumFont(15) text:@"订购月份" textColor:xstt_000000_color(0.4)];
     [contentView addSubview:numberTtitle];
     [numberTtitle makeConstraints:^(JXHConstraintMaker *make) {
         make.leading.equalTo(XSTTMargin);

+ 21 - 0
TOKTOK/TOKTOK/Home/Home.xcassets/HomeView/home到店品鉴.imageset/Contents.json

@@ -0,0 +1,21 @@
+{
+  "images" : [
+    {
+      "filename" : "home到店品鉴.png",
+      "idiom" : "universal",
+      "scale" : "1x"
+    },
+    {
+      "idiom" : "universal",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "universal",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

BIN
TOKTOK/TOKTOK/Home/Home.xcassets/HomeView/home到店品鉴.imageset/home到店品鉴.png


+ 21 - 0
TOKTOK/TOKTOK/Home/Home.xcassets/HomeView/home惊喜订购.imageset/Contents.json

@@ -0,0 +1,21 @@
+{
+  "images" : [
+    {
+      "filename" : "home惊喜订购.png",
+      "idiom" : "universal",
+      "scale" : "1x"
+    },
+    {
+      "idiom" : "universal",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "universal",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

BIN
TOKTOK/TOKTOK/Home/Home.xcassets/HomeView/home惊喜订购.imageset/home惊喜订购.png


+ 3 - 3
TOKTOK/TOKTOK/Home/HomeView/XSTTHomeViewController.m

@@ -79,7 +79,7 @@
 - (void)featureAction:(UIButton *)sender {
     switch (sender.tag - xstt_homeFeatureButtonTag) {
         case 0:
-            [XSTTRouteManager navigationBackAndRouteTo:[[XSTTRouter alloc] initWithClass:nil property:@{} tabBarType:XSTTTabBarTypeBeerCentre]];
+            [self.navigationController pushViewController:XSTTBlindBoxToOrderTableViewController.new animated:true];
             break;
         case 1:
             [self.navigationController pushViewController:XSTTBreweryListViewController.new animated:true];
@@ -88,7 +88,7 @@
             [self.navigationController pushViewController:XSTTStoreListViewController.new animated:true];
             break;
         case 3:
-            [self.navigationController pushViewController:XSTTBlindBoxToOrderTableViewController.new animated:true];
+            [XSTTRouteManager navigationBackAndRouteTo:[[XSTTRouter alloc] initWithClass:nil property:@{} tabBarType:XSTTTabBarTypeBeerCentre]];
             
             break;
             
@@ -171,7 +171,7 @@
         make.bottom.equalTo(0);
     }];
     
-    NSArray *titles = @[@"精酿鲜啤", @"酿酒厂", @"到店品鉴", @"盲盒订购", @"酒厂直供,最新鲜的鲜啤原浆", @"纯粹好原料,才有鲜活好口感", @"数百款啤酒,类型丰富、免费试喝", @"亲自酿造一桶酒, 鲜啤定制很OK"];
+    NSArray *titles = @[@"惊喜订购", @"精酿鲜啤", @"酿酒厂", @"到店品鉴", @"底价盲盒,季节限定,新鲜罐装,应有尽有", @"酒厂直供,最新鲜的鲜啤原浆", @"纯粹好原料,才有鲜活好口感", @"数百款啤酒,类型丰富、免费试喝"];
     
     UIButton *tempView = nil;
     for (NSInteger i = 0; i < 4; i ++) {

+ 18 - 0
TOKTOK/TOKTOK/Login/XSTTLoginStatusManager.m

@@ -17,6 +17,7 @@
 #import "XSTTCacheManager.h"
 #import "XSTTPersonalInformationModel.h"
 #import "XSTTCacheManager.h"
+#import "XSTTAddressModel.h"
 
 @implementation XSTTLoginStatusModel
 
@@ -82,6 +83,22 @@
 //    }];
 }
 
++ (void)getDefaultAddress {
+    [xstt_globalNetworkManager() networkUseMethod:XSTTNetworkMethodGET isLogin:true signKey:XSTTNetworkSignKeyApp url:xstt_appUrl(XSTTURLGetAddressList) urlParameters:nil parameters:@{} completion:^(NSError * _Nonnull error, id  _Nullable data) {
+        if (error.code == XSTTNetworkCallbackSuccessCode && nil != data[@"data"]) {
+            NSArray *array = [XSTTAddressModel getModelListWithArray:data[@"data"]];
+            if (array.count > 0) {
+                XSTTAddressModel *model = array[0];
+                if (model.xstt_defaultAddress.boolValue) {
+                    [XSTTCacheManager storeDefaultAddressCache:model];
+                    return;
+                }
+            }
+        }
+        [XSTTCacheManager storeDefaultAddressCache:nil];
+    }];
+}
+
 + (void)handleLoginInData:(nullable XSTTLoginStatusModel *)data personalModel:(nullable XSTTPersonalInformationModel *)personalModel {
     bool isLogin = xstt_isLogin();
     xstt_setLogin(true);
@@ -97,6 +114,7 @@
         xstt_postNotification(XSTTLoggingNotificationKey, @selector(xstt_loggingStatusChanged:), xstt_loggingStatusChanged:XSTTLoggingStatusLogin);
     }
     dispatch_async(dispatch_get_global_queue(0, 0), ^{
+        [self getDefaultAddress];
         [self bindingDevice];
     });
 }

+ 10 - 0
TOKTOK/TOKTOK/Login/XSTTPersonalInformationModel.m

@@ -37,4 +37,14 @@
     return @"";
 }
 
+- (id)GETStringWithxstt_gender:(NSString *)key {
+    NSString *type = [self valueForKey:key];
+    if ([type isEqualToString:@"女"]) {
+        return [NSString stringWithFormat:@"%ld", XSTTGenderTypeFemale];
+    } else if ([type isEqualToString:@"男"]) {
+        return [NSString stringWithFormat:@"%ld", XSTTGenderTypeMale];
+    }
+    return [NSString stringWithFormat:@"%ld", XSTTGenderTypeUnknown];
+}
+
 @end

+ 10 - 0
TOKTOK/TOKTOK/Mine/Address/AddressList/XSTTAddressListTableViewController.m

@@ -12,6 +12,7 @@
 #import "XSTTEditAddressViewController.h"
 #import "UIViewController+XSTTNetworkManager.h"
 #import "XSTTAddressModel.h"
+#import "XSTTCacheManager.h"
 
 @interface XSTTAddressListTableViewController () {
     NSMutableArray<XSTTAddressModel *> *_dataArray;
@@ -71,11 +72,20 @@
         self.tableView.backgroundColor = xstt_FFFFFF_color(1.f);
         [self.tableView setDefaultFootViewWithError:nil image:jxh_getImage(address_list_default) tips:@"你还未添加收货地址" height:jxh_viewHeight(self.view) - jxh_safeInsets(self.view).top - jxh_safeInsets(self.view).bottom action:nil];
     } else {
+        [self handleDefaultAddress:_dataArray[0]];
         self.tableView.backgroundColor = xstt_F7F7F7_color();
         [self.tableView removeDefaultFootView];
     }
 }
 
+- (void)handleDefaultAddress:(XSTTAddressModel *)address {
+    if (address.xstt_defaultAddress.boolValue) {
+        [XSTTCacheManager storeDefaultAddressCache:address];
+        return;
+    }
+    [XSTTCacheManager storeDefaultAddressCache:nil];
+}
+
 - (void)getListFailure:(NSError *)error {
     if (_dataArray.count == 0) {
         self.tableView.backgroundColor = xstt_FFFFFF_color(1.f);

+ 5 - 0
TOKTOK/TOKTOK/Mine/Address/AddressList/XSTTAddressModel.m

@@ -17,6 +17,11 @@
     return [XSTTAddressDistrictModel getModelListWithArray:dic[key]];
 }
 
+- (id)GETStringWithxstt_districtList:(NSString *)key {
+    NSArray *arr = [self valueForKey:key];
+    return [XSTTAddressDistrictModel getArray:arr];
+}
+
 - (bool)handleAdditionalProperty {
     [super handleAdditionalProperty];
     if (_xstt_phone.length == 11) {

BIN
TOKTOK/TOKTOK/Mine/Mine.xcassets/Home/mine_home_order.imageset/list.pdf


+ 1 - 1
TOKTOK/TOKTOK/Mine/Order/ChooseTime/XSTTOrderDetailsChooseTimeTableViewController.m

@@ -74,7 +74,7 @@ static NSString * const reuseIdentifier = @"XSTTOrderDetailsChooseTimeTableView"
     }
     UILabel *cycle = [cell.contentView viewWithTag:4000];
     UILabel *status = [cell.contentView viewWithTag:4001];
-    cycle.text = [NSString stringWithFormat:@"%@期", _xstt_dataArray[indexPath.row].xstt_month];
+    cycle.text = _xstt_dataArray[indexPath.row].xstt_month;
     switch (_xstt_dataArray[indexPath.row].xstt_status.integerValue) {
         case XSTTGoodsStatusFinish:
             status.text = @"已完成";

+ 2 - 2
TOKTOK/TOKTOK/Mine/Order/OrderDetails/XSTTOrderDetailsViewController.m

@@ -115,7 +115,7 @@
 
 - (void)reloadUI {
     _name.text = _data.xstt_boxName;
-    _number.text = [NSString stringWithFormat:@"%@期", _data.xstt_month];
+    _number.text = _data.xstt_month;
     _time.text = _data.xstt_cutOffTime;
 }
 
@@ -162,7 +162,7 @@
         make.height.equalTo(74);
     }];
     
-    UILabel *numberTtitle = [UILabel convenienceWithFont:xstt_mediumFont(15) text:@"订阅期数" textColor:xstt_000000_color(0.4)];
+    UILabel *numberTtitle = [UILabel convenienceWithFont:xstt_mediumFont(15) text:@"订购月份" textColor:xstt_000000_color(0.4)];
     [contentView addSubview:numberTtitle];
     [numberTtitle makeConstraints:^(JXHConstraintMaker *make) {
         make.leading.equalTo(XSTTMargin);

+ 1 - 1
TOKTOK/TOKTOK/Public/Manager/XSTTBusinessManager.m

@@ -183,7 +183,7 @@ NSString *xstt_deviceUUID() {
 }
 
 static XSTTPersonalInformationModel *_personalInformationModel = nil;
-XSTTPersonalInformationModel *xstt_personalInformation() {
+XSTTPersonalInformationModel *xstt_personalInformation(void) {
     return _personalInformationModel;
 }
 

+ 5 - 2
TOKTOK/TOKTOK/Public/Manager/XSTTCacheManager.h

@@ -7,7 +7,7 @@
 //
 
 #import <UIKit/UIKit.h>
-@class XSTTPersonalInformationModel;
+@class XSTTPersonalInformationModel, XSTTAddressModel;
 
 NS_ASSUME_NONNULL_BEGIN
 
@@ -16,7 +16,10 @@ NS_ASSUME_NONNULL_BEGIN
 + (void)storeImage:(UIImage *)image url:(NSString *)url;
 
 + (void)storePersonalInformationCache:(XSTTPersonalInformationModel *)cache;
-+ (XSTTPersonalInformationModel *)getPersonalInformationCache;
++ (nullable XSTTPersonalInformationModel *)getPersonalInformationCache;
+
++ (void)storeDefaultAddressCache:(nullable XSTTAddressModel *)cache;
++ (nullable XSTTAddressModel *)getDefaultAddressCache;
 
 + (void)deleteAllCache;
 

+ 32 - 3
TOKTOK/TOKTOK/Public/Manager/XSTTCacheManager.m

@@ -13,6 +13,8 @@
 #import <SDWebImageManager.h>
 #import <SDImageCache.h>
 #import "XSTTNotificationDelegateManager.h"
+#import "XSTTPersonalInformationModel.h"
+#import "XSTTAddressModel.h"
 
 @implementation XSTTCacheManager
 
@@ -23,21 +25,48 @@
 
 + (void)storePersonalInformationCache:(XSTTPersonalInformationModel *)cache {
     dispatch_async(dispatch_get_global_queue(0, 0), ^{
+        NSDictionary *dic = [cache getDictionary];
         [JXHFMDBManager updateWithPath:XSTTLocationCacheDataSQL condition:^id(FMDatabase *database) {
             return @([database executeUpdate:@"delete from cache_data where key = ?", XSTTLocationCachePersonalInformationSQLKey]);
         }];
         [JXHFMDBManager updateWithPath:XSTTLocationCacheDataSQL condition:^id(FMDatabase *database) {
-            NSData *data = jxh_archiver(cache, XSTTLocationCachePersonalInformationSQLKey);
+            NSData *data = jxh_archiver(dic, XSTTLocationCachePersonalInformationSQLKey);
             return @([database executeUpdate:@"insert into cache_data (key, data) values (?, ?)", XSTTLocationCachePersonalInformationSQLKey, data]);
         }];
     });
     xstt_postNotification(XSTTUserNotificationKey, @selector(xstt_userInformationChanged), xstt_userInformationChanged);
 }
 
-+ (XSTTPersonalInformationModel *)getPersonalInformationCache {
-    return [JXHFMDBManager searchWithPath:XSTTLocationCacheDataSQL key:XSTTLocationCachePersonalInformationSQLKey condition:^id(FMDatabase *database) {
++ (nullable XSTTPersonalInformationModel *)getPersonalInformationCache {
+    NSDictionary *dic = [JXHFMDBManager searchWithPath:XSTTLocationCacheDataSQL key:XSTTLocationCachePersonalInformationSQLKey condition:^id(FMDatabase *database) {
         return [database executeQuery:@"select * from cache_data where key = ?", XSTTLocationCachePersonalInformationSQLKey];
     }];
+    if (nil == dic || ![dic isKindOfClass:[NSDictionary class]]) return nil;
+    return [XSTTPersonalInformationModel getModelWithDictionary:dic];
+}
+
++ (void)storeDefaultAddressCache:(nullable XSTTAddressModel *)cache {
+    dispatch_async(dispatch_get_global_queue(0, 0), ^{
+        NSDictionary *dic = [cache getDictionary];
+        [JXHFMDBManager updateWithPath:XSTTLocationCacheDataSQL condition:^id(FMDatabase *database) {
+            return @([database executeUpdate:@"delete from cache_data where key = ?", XSTTLocationCacheDefaultAddressSQLKey]);
+        }];
+        if (cache) {
+            [JXHFMDBManager updateWithPath:XSTTLocationCacheDataSQL condition:^id(FMDatabase *database) {
+                NSData *data = jxh_archiver(dic, XSTTLocationCachePersonalInformationSQLKey);
+                return @([database executeUpdate:@"insert into cache_data (key, data) values (?, ?)", XSTTLocationCacheDefaultAddressSQLKey, data]);
+            }];
+        }
+        
+    });
+}
+
++ (nullable XSTTAddressModel *)getDefaultAddressCache {
+    NSDictionary *dic = [JXHFMDBManager searchWithPath:XSTTLocationCacheDataSQL key:XSTTLocationCachePersonalInformationSQLKey condition:^id(FMDatabase *database) {
+        return [database executeQuery:@"select * from cache_data where key = ?", XSTTLocationCacheDefaultAddressSQLKey];
+    }];
+    if (nil == dic || ![dic isKindOfClass:[NSDictionary class]]) return nil;
+    return [XSTTAddressModel getModelWithDictionary:dic];
 }
 
 + (void)deleteAllCache {

+ 2 - 0
TOKTOK/TOKTOK/Public/Profile/XSTTSQLProfile.h

@@ -14,3 +14,5 @@ CONST_STRING_INTERFACE XSTTLocationCacheDataSQL;
 CONST_STRING_INTERFACE XSTTCityCacheDataSQL;
 
 CONST_STRING_INTERFACE XSTTLocationCachePersonalInformationSQLKey;
+
+CONST_STRING_INTERFACE XSTTLocationCacheDefaultAddressSQLKey;

+ 2 - 0
TOKTOK/TOKTOK/Public/Profile/XSTTSQLProfile.m

@@ -14,3 +14,5 @@ CONST_STRING XSTTLocationCacheDataSQL = @"t_xstt_location_cache_data.db";
 CONST_STRING XSTTCityCacheDataSQL = @"t_xstt_city_data.db";
 
 CONST_STRING XSTTLocationCachePersonalInformationSQLKey = @"XSTTLocationCachePersonalInformationSQLKey";
+
+CONST_STRING XSTTLocationCacheDefaultAddressSQLKey = @"XSTTLocationCacheDefaultAddressSQLKey";

+ 1 - 0
TOKTOK/TOKTOK/TOKTOK/AppDelegate+XSTTHandleData.m

@@ -113,6 +113,7 @@
 
 - (void)loadCache {
     XSTTPersonalInformationModel *personalInformationModel = [XSTTCacheManager getPersonalInformationCache];
+    debugLog(@"-=-=-=-=%@", personalInformationModel);
     if (!personalInformationModel) {
         personalInformationModel = XSTTPersonalInformationModel.new;
     }