Browse Source

搜索结果对接

Abel 1 year ago
parent
commit
5b57959d63

+ 16 - 6
Asteria.xcodeproj/project.pbxproj

@@ -9,6 +9,8 @@
 /* Begin PBXBuildFile section */
 		2B3E96D298A3E04003DA2AD3 /* Pods_Asteria_NotificationServiceExtension.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 51AF3B78609F55449DF09609 /* Pods_Asteria_NotificationServiceExtension.framework */; };
 		81056D5C2B60F571009219A3 /* ASHelpListUrlModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 81056D5B2B60F571009219A3 /* ASHelpListUrlModel.m */; };
+		8110D1982C3CECF800000EFD /* App Privacy - iOS 13 API Deltas.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 8110D1972C3CECF800000EFD /* App Privacy - iOS 13 API Deltas.xcprivacy */; };
+		8110D19A2C3CEDC000000EFD /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 8110D1992C3CEDC000000EFD /* GoogleService-Info.plist */; };
 		811F42462A40533C00DA68F1 /* ASPointsHomeViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 811F42452A40533C00DA68F1 /* ASPointsHomeViewController.m */; };
 		811F42492A40536C00DA68F1 /* ASPointHeadView.m in Sources */ = {isa = PBXBuildFile; fileRef = 811F42482A40536C00DA68F1 /* ASPointHeadView.m */; };
 		812021152B14659A0026B8B5 /* ASUserInfoManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 812021142B14659A0026B8B5 /* ASUserInfoManager.m */; };
@@ -229,7 +231,6 @@
 		8810F5A22BFF448C00346FD4 /* ASMyCartNoDataView.m in Sources */ = {isa = PBXBuildFile; fileRef = 8810F5A12BFF448C00346FD4 /* ASMyCartNoDataView.m */; };
 		8810F5A82C01849C00346FD4 /* ASGoodsReviewFootCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 8810F5A72C01849C00346FD4 /* ASGoodsReviewFootCell.m */; };
 		8810F5AB2C045FD600346FD4 /* ToolStripePayment.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8810F5AA2C045FD600346FD4 /* ToolStripePayment.swift */; };
-		884A49EF2C36896E001B8449 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 884A49EE2C36896E001B8449 /* GoogleService-Info.plist */; };
 		88516B6E2C12E51600F2E396 /* ASLoginBindingC.m in Sources */ = {isa = PBXBuildFile; fileRef = 88516B6D2C12E51600F2E396 /* ASLoginBindingC.m */; };
 		8C24ECE114420CDEE7B9B22B /* Pods_Asteria.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 54DCE8001991D89B696E7D44 /* Pods_Asteria.framework */; };
 		9A1247942A1B082300126226 /* Fuction_Tool.m in Sources */ = {isa = PBXBuildFile; fileRef = 9A1247932A1B082300126226 /* Fuction_Tool.m */; };
@@ -384,6 +385,9 @@
 		54DCE8001991D89B696E7D44 /* Pods_Asteria.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Asteria.framework; sourceTree = BUILT_PRODUCTS_DIR; };
 		81056D5A2B60F571009219A3 /* ASHelpListUrlModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ASHelpListUrlModel.h; sourceTree = "<group>"; };
 		81056D5B2B60F571009219A3 /* ASHelpListUrlModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ASHelpListUrlModel.m; sourceTree = "<group>"; };
+		8110D1962C3CECF800000EFD /* NotificationServiceExtension.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; path = NotificationServiceExtension.entitlements; sourceTree = "<group>"; };
+		8110D1972C3CECF800000EFD /* App Privacy - iOS 13 API Deltas.xcprivacy */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "App Privacy - iOS 13 API Deltas.xcprivacy"; sourceTree = "<group>"; };
+		8110D1992C3CEDC000000EFD /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = "<group>"; };
 		811F42442A40533C00DA68F1 /* ASPointsHomeViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ASPointsHomeViewController.h; sourceTree = "<group>"; };
 		811F42452A40533C00DA68F1 /* ASPointsHomeViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ASPointsHomeViewController.m; sourceTree = "<group>"; };
 		811F42472A40536C00DA68F1 /* ASPointHeadView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ASPointHeadView.h; sourceTree = "<group>"; };
@@ -810,7 +814,6 @@
 		8810F5A72C01849C00346FD4 /* ASGoodsReviewFootCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ASGoodsReviewFootCell.m; sourceTree = "<group>"; };
 		8810F5A92C045FD600346FD4 /* Asteria-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Asteria-Bridging-Header.h"; sourceTree = "<group>"; };
 		8810F5AA2C045FD600346FD4 /* ToolStripePayment.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ToolStripePayment.swift; sourceTree = "<group>"; };
-		884A49EE2C36896E001B8449 /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; 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>"; };
 		9A1247922A1B082300126226 /* Fuction_Tool.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Fuction_Tool.h; sourceTree = "<group>"; };
@@ -1547,7 +1550,7 @@
 				817244A929F3B2EE005FA9C9 /* Assets.xcassets */,
 				817244AB29F3B2EE005FA9C9 /* LaunchScreen.storyboard */,
 				817244AE29F3B2EE005FA9C9 /* Info.plist */,
-				884A49EE2C36896E001B8449 /* GoogleService-Info.plist */,
+				8110D1992C3CEDC000000EFD /* GoogleService-Info.plist */,
 				817244AF29F3B2EE005FA9C9 /* main.m */,
 			);
 			path = Asteria;
@@ -1556,6 +1559,8 @@
 		817244BB29F3B81C005FA9C9 /* NotificationServiceExtension */ = {
 			isa = PBXGroup;
 			children = (
+				8110D1972C3CECF800000EFD /* App Privacy - iOS 13 API Deltas.xcprivacy */,
+				8110D1962C3CECF800000EFD /* NotificationServiceExtension.entitlements */,
 				817244BC29F3B81C005FA9C9 /* NotificationService.h */,
 				817244BD29F3B81C005FA9C9 /* NotificationService.m */,
 				817244BF29F3B81C005FA9C9 /* Info.plist */,
@@ -2782,7 +2787,7 @@
 				814F5D0E2A11B76F003847A9 /* Roboto-BlackItalic.ttf in Resources */,
 				9A3F5CB22B3BF63A00DDB6A7 /* Goods.xcassets in Resources */,
 				814F5D072A11B76F003847A9 /* Roboto-Regular.ttf in Resources */,
-				884A49EF2C36896E001B8449 /* GoogleService-Info.plist in Resources */,
+				8110D19A2C3CEDC000000EFD /* GoogleService-Info.plist in Resources */,
 				817244AD29F3B2EE005FA9C9 /* LaunchScreen.storyboard in Resources */,
 				9AD6A53E2A120CC3001DE3D9 /* Login.xcassets in Resources */,
 				814F5D0D2A11B76F003847A9 /* LICENSE.txt in Resources */,
@@ -2804,6 +2809,7 @@
 			isa = PBXResourcesBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
+				8110D1982C3CECF800000EFD /* App Privacy - iOS 13 API Deltas.xcprivacy in Resources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -3357,6 +3363,7 @@
 				ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = NO;
 				CLANG_ENABLE_MODULES = YES;
 				CODE_SIGN_ENTITLEMENTS = Asteria/Asteria.entitlements;
+				CODE_SIGN_IDENTITY = "Apple Development";
 				CODE_SIGN_STYLE = Automatic;
 				CURRENT_PROJECT_VERSION = 1;
 				DEVELOPMENT_TEAM = 6749KGSMFB;
@@ -3381,6 +3388,7 @@
 				ONLY_ACTIVE_ARCH = NO;
 				PRODUCT_BUNDLE_IDENTIFIER = com.asteriahair.app;
 				PRODUCT_NAME = "$(TARGET_NAME)";
+				PROVISIONING_PROFILE_SPECIFIER = "";
 				SWIFT_EMIT_LOC_STRINGS = YES;
 				SWIFT_OBJC_BRIDGING_HEADER = "Asteria/Fuction/Cart/PayManager/Asteria-Bridging-Header.h";
 				SWIFT_OPTIMIZATION_LEVEL = "-Onone";
@@ -3399,6 +3407,7 @@
 				ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = NO;
 				CLANG_ENABLE_MODULES = YES;
 				CODE_SIGN_ENTITLEMENTS = Asteria/Asteria.entitlements;
+				CODE_SIGN_IDENTITY = "Apple Development";
 				CODE_SIGN_STYLE = Automatic;
 				CURRENT_PROJECT_VERSION = 1;
 				DEVELOPMENT_TEAM = 6749KGSMFB;
@@ -3422,6 +3431,7 @@
 				MARKETING_VERSION = 1.0;
 				PRODUCT_BUNDLE_IDENTIFIER = com.asteriahair.app;
 				PRODUCT_NAME = "$(TARGET_NAME)";
+				PROVISIONING_PROFILE_SPECIFIER = "";
 				SWIFT_EMIT_LOC_STRINGS = YES;
 				SWIFT_OBJC_BRIDGING_HEADER = "Asteria/Fuction/Cart/PayManager/Asteria-Bridging-Header.h";
 				SWIFT_VERSION = 5.0;
@@ -3447,7 +3457,7 @@
 					"@executable_path/../../Frameworks",
 				);
 				MARKETING_VERSION = 1.0;
-				PRODUCT_BUNDLE_IDENTIFIER = com.asteriahair.app.NotificationServiceExtension;
+				PRODUCT_BUNDLE_IDENTIFIER = com.asteriahair.app.NotificationService;
 				PRODUCT_NAME = "$(TARGET_NAME)";
 				PROVISIONING_PROFILE_SPECIFIER = "";
 				SKIP_INSTALL = YES;
@@ -3474,7 +3484,7 @@
 					"@executable_path/../../Frameworks",
 				);
 				MARKETING_VERSION = 1.0;
-				PRODUCT_BUNDLE_IDENTIFIER = com.asteriahair.app.NotificationServiceExtension;
+				PRODUCT_BUNDLE_IDENTIFIER = com.asteriahair.app.NotificationService;
 				PRODUCT_NAME = "$(TARGET_NAME)";
 				PROVISIONING_PROFILE_SPECIFIER = "";
 				SKIP_INSTALL = YES;

+ 4 - 0
Asteria/Asteria.entitlements

@@ -6,5 +6,9 @@
 	<array>
 		<string>Default</string>
 	</array>
+	<key>com.apple.security.application-groups</key>
+	<array>
+		<string>group.com.asteriahair.app.notify</string>
+	</array>
 </dict>
 </plist>

+ 33 - 9
Asteria/Fuction/Home/ASProductListViewController.m

@@ -290,17 +290,12 @@
         if (self.currentSortType < self.sortTypeV.titles.count) {
             titleStr = self.sortTypeV.titles[self.currentSortType];
         }
-        [v setData:titleStr sortBlock:^{
-//            if (weakself.productArr.count > 0) {
-//            [weakself.collectV scrollToItemAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:0] atScrollPosition:UICollectionViewScrollPositionTop animated:true];
-//            }
+        
+        [v setData:titleStr isSearch:false sortBlock:^{
             [weakself showSortV];
         } menuBlock:^{
             [weakself showMenuV];
         }];
-//        if (self.sortTypeV.titles.count > self.currentSortType) {
-//            [v.sortBt setTitle:self.sortTypeV.titles[self.currentSortType] forState:UIControlStateNormal];
-//        }
         return v;
     }
     return nil;
@@ -459,8 +454,7 @@
 }
 
 -(void)showSortV {
-    BOOL isSearch = self.keyWord != nil && self.keyWord.length > 0;
-    [self.sortTypeV showAnimate:isSearch];
+    [self.sortTypeV showAnimate:false];
 }
 
 -(void)showMenuV {
@@ -469,6 +463,10 @@
 }
 
 -(void)getNetData {
+    if (self.keyWord != nil && !self.keyWord.isEmpty) {
+        [self getSearchNetData];
+        return;
+    }
     [MBProgressHUD showHUDAddedTo:self.view animated:true];
     
     __weak typeof(self) weakSelf = self;
@@ -494,4 +492,30 @@
     }];
 }
 
+-(void)getSearchNetData {
+    [MBProgressHUD showHUDAddedTo:self.view animated:true];
+    
+    __weak typeof(self) weakSelf = self;
+    [self.vm getTopLinkList:^{
+        [weakSelf.collectV reloadData];
+    }];
+
+    
+    [self.vm getSearchResult:self.keyWord page:self.page orderBy:self.currentSortType dir:@"DESC" com:^(BOOL hasNext, NSString * _Nonnull msg) {
+        [MBProgressHUD hideHUDForView:weakSelf.view animated:true];
+        [weakSelf.collectV.mj_header endRefreshing];
+        [weakSelf.collectV.mj_footer endRefreshing];
+        weakSelf.canShowMoreBt = true;
+        if (!hasNext) {
+            weakSelf.canShowMoreBt = false;
+            [weakSelf.collectV.mj_footer endRefreshingWithNoMoreData];
+        }
+        
+        [self.collectV reloadData];
+        if (!msg.isEmpty) {
+            [weakSelf.view makeToast:msg];
+        }
+    }];
+}
+
 @end

+ 1 - 1
Asteria/Fuction/Home/Views/productList/ASProductListMenuHeaderView.h

@@ -13,7 +13,7 @@ NS_ASSUME_NONNULL_BEGIN
 
 @property (nonatomic, strong) UIButton *sortBt;
 
-- (void)setData:(NSString *)sortTitle sortBlock:(btnClickBlock)sortBlock menuBlock:(btnClickBlock)menuBlock;
+- (void)setData:(NSString *)sortTitle isSearch:(BOOL)isSearch sortBlock:(btnClickBlock)sortBlock menuBlock:(btnClickBlock)menuBlock;
 
 @end
 

+ 2 - 1
Asteria/Fuction/Home/Views/productList/ASProductListMenuHeaderView.m

@@ -21,8 +21,9 @@
 
 @implementation ASProductListMenuHeaderView
 
-- (void)setData:(NSString *)sortTitle sortBlock:(btnClickBlock)sortBlock menuBlock:(btnClickBlock)menuBlock {
+- (void)setData:(NSString *)sortTitle isSearch:(BOOL)isSearch sortBlock:(btnClickBlock)sortBlock menuBlock:(btnClickBlock)menuBlock {
     [self.sortBt setTitle:sortTitle forState:UIControlStateNormal];
+    self.menuBt.hidden = isSearch;
     self.sortBlock = sortBlock;
     self.menuBlock = menuBlock;
 }

+ 1 - 5
Asteria/Fuction/Home/Views/productList/ASProductSortFilterView.m

@@ -52,11 +52,7 @@
 }
 
 - (void)showAnimate:(BOOL)isKey {
-    if (isKey) {
-        self.titles = @[@"Popular",@"Price",@"Sold Quantity"];
-    } else {
-        self.titles = @[@"Featured",@"Price:Low to High", @"Price:High to Low",@"Best Selling"];
-    }
+    self.titles = @[@"Featured",@"Price:Low to High", @"Price:High to Low",@"Best Selling"];
     [self.tableV reloadData];
     [ASHomeAlertWindow showCustomVc:self position:ASAlertPositionBottom];
     CGRect oldFrame = self.frame;

+ 2 - 0
Asteria/Fuction/Home/vm/ASProductListViewModel.h

@@ -26,6 +26,8 @@ NS_ASSUME_NONNULL_BEGIN
 
 - (void)getProductListData:(NSString *)catId page:(NSInteger)page orderBy:(NSInteger)orderBy dir:(NSString *)dir com:(void(^)(BOOL hasNext, NSString *msg))com;
 
+- (void)getSearchResult:(NSString *)keyWord page:(NSInteger)page orderBy:(NSInteger)orderBy dir:(NSString *)dir com:(void(^)(BOOL hasNext, NSString *msg))com;
+
 - (void)getPoint:(NSString *)pointType com:(void(^)(BOOL isSuc, NSString *msg))com;
 
 -(void)getTopLinkList:(btnClickBlock)success;

+ 87 - 0
Asteria/Fuction/Home/vm/ASProductListViewModel.m

@@ -136,6 +136,93 @@
     
 }
 
+- (void)getSearchResult:(NSString *)keyWord page:(NSInteger)page orderBy:(NSInteger)orderBy dir:(NSString *)dir com:(void(^)(BOOL hasNext, NSString *msg))com {
+    NSMutableDictionary *para = [NSMutableDictionary dictionary];
+    para[@"currency_code"] = ASCurrencyManager.shared.currentCur;
+    para[@"ajax_app"] = @1;
+    para[@"q"] = keyWord;
+    para[@"p"] = @(page);
+    if (orderBy != 0) {
+        NSArray *arr = @[@"",@"price_l",@"price_h",@"popularity"];
+        if (arr.count > orderBy && orderBy >= 0) {
+            para[@"product_list_order"] = arr[orderBy];
+        } else {
+            para[@"product_list_order"] = @"";
+        }
+    } else {
+        para[@"product_list_order"] = @"";
+    }
+    NSArray *filterKeys = self.selectDic.allKeys;
+    for (NSString *key in filterKeys) {
+        NSArray *subMs = self.selectDic[key];
+        NSMutableString *valueStr = [NSMutableString string];
+        for (KWProductListFilterSubModel *subM in subMs) {
+            if ([key isEqualToString:@"price"]) {
+//                if (subM.inputMax.length > 0 && subM.inputMin.length > 0) {
+//                    valueStr = [NSMutableString stringWithFormat:@"%@-%@", subM.inputMin, subM.inputMax];
+//                    para[key] = valueStr;
+//                }
+                continue;
+            }
+            [valueStr appendString:[NSString stringWithFormat:@"%@,",subM.Id]];
+            para[key] = valueStr;
+        }
+    }
+    
+    [ASNetTools.shared getWithPath:SearchProduct param:para success:^(id _Nonnull json) {
+        ASProductListCategoryModel *m = [ASProductListCategoryModel mj_objectWithKeyValues:json[@"category"]];
+        self.cateModel = m;
+        NSArray *arr = json[@"product"][@"productLists"];
+        NSMutableArray *products = [ASProductBaseModel mj_objectArrayWithKeyValuesArray:arr];
+        
+        NSArray *filtArr = json[@"filter"];
+        NSMutableArray *filters = [KWProductListFilterModel mj_objectArrayWithKeyValuesArray:filtArr];
+        self.sourceArr = [NSMutableArray arrayWithArray:filters];
+        self.selectDic = [NSMutableDictionary dictionary];
+        for (KWProductListFilterModel *m in filters) {
+            if (m.attribute_data.count > 0) {
+                for (KWProductListFilterSubModel *sub in m.attribute_data) {
+                    if (sub.status != 0) {
+                        NSMutableArray *tempSubs = self.selectDic[m.attribute_id];
+                        if (tempSubs == nil) {
+                            tempSubs = [NSMutableArray array];
+                        }
+                        if ([m.attribute_id isEqualToString:@"price"]) {
+//                            sub.inputMin = sub.minPrice;
+//                            sub.inputMax = sub.maxPrice;
+                            continue;
+                        } else {
+                            sub.inputMax = @"";
+                            sub.inputMin = @"";
+                        }
+                        [tempSubs addObject:sub.copySelf];
+                        self.selectDic[m.attribute_id] = tempSubs;
+                    }
+                }
+            }
+        }
+        
+        
+        if (products.count > 0) {
+            if (page == 1) {
+                self.productList = products;
+            } else {
+                self.productList = [self.productList arrayByAddingObjectsFromArray:products];
+            }
+            if (products.count < 6) {
+                com(false, @"");
+            } else {
+                com(true, @"");
+            }
+        } else {
+            com(false, @"");
+        }
+    } faild:^(NSString * _Nonnull code, NSString * _Nonnull msg) {
+        com(false, msg);
+    }];
+    
+    
+}
 
 - (void)getPoint:(NSString *)pointType com:(void(^)(BOOL isSuc, NSString *msg))com {
     [ASNetTools.shared postWithPath:postTakeExtraPoints param:@{@"type": pointType} success:^(id _Nonnull json) {

+ 34 - 0
Asteria/GoogleService-Info.plist

@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>CLIENT_ID</key>
+	<string>594754156247-kr2fsqoh1pcfvru597lg9slat2enfitf.apps.googleusercontent.com</string>
+	<key>REVERSED_CLIENT_ID</key>
+	<string>com.googleusercontent.apps.594754156247-kr2fsqoh1pcfvru597lg9slat2enfitf</string>
+	<key>API_KEY</key>
+	<string>AIzaSyB5uLVHDIl3mWUt3OjmvPitH9xGDjkGTIw</string>
+	<key>GCM_SENDER_ID</key>
+	<string>594754156247</string>
+	<key>PLIST_VERSION</key>
+	<string>1</string>
+	<key>BUNDLE_ID</key>
+	<string>com.hcb.westkiss</string>
+	<key>PROJECT_ID</key>
+	<string>westkiss-app-79a3a</string>
+	<key>STORAGE_BUCKET</key>
+	<string>westkiss-app-79a3a.appspot.com</string>
+	<key>IS_ADS_ENABLED</key>
+	<false/>
+	<key>IS_ANALYTICS_ENABLED</key>
+	<false/>
+	<key>IS_APPINVITE_ENABLED</key>
+	<true/>
+	<key>IS_GCM_ENABLED</key>
+	<true/>
+	<key>IS_SIGNIN_ENABLED</key>
+	<true/>
+	<key>GOOGLE_APP_ID</key>
+	<string>1:594754156247:ios:b4029713212399bba76292</string>
+</dict>
+</plist>

+ 1 - 0
Asteria/NetTools/ASNetApis.h

@@ -43,6 +43,7 @@
 #define CountryList BaseRequestrUrl(@"directory/countries")
 
 // MARK: - 商品列表
+#define SearchProduct @"catalogsearch/result"
 #define getProductListUrl @"catalog/category/view"
 #define getProdectDetail BaseRequestrUrl(@"rewrite/product/getProductsById")
 

+ 41 - 0
NotificationServiceExtension/App Privacy - iOS 13 API Deltas.xcprivacy

@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>NSPrivacyAccessedAPITypes</key>
+	<array>
+		<dict>
+			<key>NSPrivacyAccessedAPITypeReasons</key>
+			<array>
+				<string>E174.1</string>
+			</array>
+			<key>NSPrivacyAccessedAPIType</key>
+			<string>NSPrivacyAccessedAPICategoryDiskSpace</string>
+		</dict>
+		<dict>
+			<key>NSPrivacyAccessedAPITypeReasons</key>
+			<array>
+				<string>35F9.1</string>
+			</array>
+			<key>NSPrivacyAccessedAPIType</key>
+			<string>NSPrivacyAccessedAPICategorySystemBootTime</string>
+		</dict>
+		<dict>
+			<key>NSPrivacyAccessedAPITypeReasons</key>
+			<array>
+				<string>CA92.1</string>
+			</array>
+			<key>NSPrivacyAccessedAPIType</key>
+			<string>NSPrivacyAccessedAPICategoryUserDefaults</string>
+		</dict>
+		<dict>
+			<key>NSPrivacyAccessedAPITypeReasons</key>
+			<array>
+				<string>C617.1</string>
+			</array>
+			<key>NSPrivacyAccessedAPIType</key>
+			<string>NSPrivacyAccessedAPICategoryFileTimestamp</string>
+		</dict>
+	</array>
+</dict>
+</plist>

+ 10 - 0
NotificationServiceExtension/NotificationServiceExtension.entitlements

@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>com.apple.security.application-groups</key>
+	<array>
+		<string>group.com.asteriahair.app.notify</string>
+	</array>
+</dict>
+</plist>