ソースを参照

Merge branch 'master' of http://gogs.hnwmzp.cn/nzk1/Asteria-APP

wangmeng 1 年間 前
コミット
a2ca7e7041
48 ファイル変更1363 行追加695 行削除
  1. 50 12
      Asteria.xcodeproj/project.pbxproj
  2. 1 0
      Asteria/ASUI/ColorDefine.h
  3. 13 1
      Asteria/ASUI/CustomView/productView/ASProductBaseModel.m
  4. 6 0
      Asteria/ASUI/SimpleBase/ASBaseViewController.h
  5. 38 0
      Asteria/ASUI/SimpleBase/ASBaseViewController.m
  6. 0 2
      Asteria/Fuction/Category/Target_Category.h
  7. 0 6
      Asteria/Fuction/Category/Target_Category.m
  8. 2 1
      Asteria/Fuction/Category/m/KWSearchSubTypeModel.h
  9. 7 0
      Asteria/Fuction/Category/m/KWSearchSubTypeModel.m
  10. 0 16
      Asteria/Fuction/Category/vc/APOnlySearchViewController.h
  11. 0 68
      Asteria/Fuction/Category/vc/APOnlySearchViewController.m
  12. 6 6
      Asteria/Fuction/Category/vc/ASSearchViewController.m
  13. 0 31
      Asteria/Fuction/Category/vc/KWSearchViewController.h
  14. 0 401
      Asteria/Fuction/Category/vc/KWSearchViewController.m
  15. 11 18
      Asteria/Fuction/Category/vm/KWHisAndHotWordsViewModel.m
  16. 1 0
      Asteria/Fuction/Home/ASHomeViewController.m
  17. 102 1
      Asteria/Fuction/Home/ASProductListViewController.m
  18. 22 0
      Asteria/Fuction/Home/Home.xcassets/productlist/product_list_timer.imageset/Contents.json
  19. BIN
      Asteria/Fuction/Home/Home.xcassets/productlist/product_list_timer.imageset/倒计时@2x.png
  20. BIN
      Asteria/Fuction/Home/Home.xcassets/productlist/product_list_timer.imageset/倒计时@3x.png
  21. 2 0
      Asteria/Fuction/Home/vm/ASProductListViewModel.h
  22. 9 0
      Asteria/Fuction/Home/vm/ASProductListViewModel.m
  23. 54 2
      Asteria/Fuction/UserCenter/Points/ASPointsHomeViewController.m
  24. 5 0
      Asteria/Fuction/UserCenter/Points/ASPointsViewModel.h
  25. 13 0
      Asteria/Fuction/UserCenter/Points/ASPointsViewModel.m
  26. 27 0
      Asteria/Fuction/UserCenter/Points/model/ASExtraPointsModel.h
  27. 12 0
      Asteria/Fuction/UserCenter/Points/model/ASExtraPointsModel.m
  28. 118 20
      Asteria/Fuction/UserCenter/Setting/ASInfomationSetController.m
  29. 96 88
      Asteria/Fuction/UserCenter/Setting/ASSettingViewController.m
  30. 16 0
      Asteria/Fuction/Windows/APHomeActiveViewController.h
  31. 24 0
      Asteria/Fuction/Windows/APHomeActiveViewController.m
  32. 19 0
      Asteria/Fuction/Windows/APHomeActiveWindow.h
  33. 61 0
      Asteria/Fuction/Windows/APHomeActiveWindow.m
  34. 22 0
      Asteria/Fuction/Windows/APInputAlertView.h
  35. 262 0
      Asteria/Fuction/Windows/APInputAlertView.m
  36. 31 0
      Asteria/Fuction/Windows/ASCustomAlertViewController.h
  37. 185 0
      Asteria/Fuction/Windows/ASCustomAlertViewController.m
  38. 22 0
      Asteria/Fuction/Windows/ASCustomWindow.h
  39. 49 0
      Asteria/Fuction/Windows/ASCustomWindow.m
  40. 23 0
      Asteria/Fuction/Windows/ASWindowManager.h
  41. 22 0
      Asteria/Fuction/Windows/ASWindowManager.m
  42. 13 10
      Asteria/NetTools/ASNetApis.h
  43. 4 4
      Asteria/NetTools/ASNetTools.m
  44. 3 0
      Asteria/NetTools/ASUserNotifyStatic.h
  45. 3 2
      Asteria/PreFixHeader.h
  46. 0 2
      Asteria/Product/CTMediatoaTargets/CTMediator+Categorys.h
  47. 0 4
      Asteria/Product/CTMediatoaTargets/CTMediator+Categorys.m
  48. 9 0
      Asteria/Product/CTMediatoaTargets/CTMediator+Home.m

+ 50 - 12
Asteria.xcodeproj/project.pbxproj

@@ -19,6 +19,13 @@
 		812021282B185C000026B8B5 /* ASCouponsModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 812021272B185C000026B8B5 /* ASCouponsModel.m */; };
 		8127ADDB2B1193A300464D27 /* ASNetTools.m in Sources */ = {isa = PBXBuildFile; fileRef = 8127ADDA2B1193A300464D27 /* ASNetTools.m */; };
 		8131A27C2B365F7700A191BE /* ASProductListCategoryModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 8131A27B2B365F7600A191BE /* ASProductListCategoryModel.m */; };
+		8131A2802B3687EE00A191BE /* ASCustomWindow.m in Sources */ = {isa = PBXBuildFile; fileRef = 8131A27F2B3687EE00A191BE /* ASCustomWindow.m */; };
+		8131A2842B36882500A191BE /* ASCustomAlertViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8131A2832B36882500A191BE /* ASCustomAlertViewController.m */; };
+		8131A2872B36890200A191BE /* ASWindowManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 8131A2862B36890200A191BE /* ASWindowManager.m */; };
+		8131A28C2B3692F300A191BE /* APHomeActiveViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8131A2882B3692F300A191BE /* APHomeActiveViewController.m */; };
+		8131A28D2B3692F300A191BE /* APHomeActiveWindow.m in Sources */ = {isa = PBXBuildFile; fileRef = 8131A28B2B3692F300A191BE /* APHomeActiveWindow.m */; };
+		8131A2902B38FF3B00A191BE /* APInputAlertView.m in Sources */ = {isa = PBXBuildFile; fileRef = 8131A28F2B38FF3B00A191BE /* APInputAlertView.m */; };
+		8131A2932B3950DA00A191BE /* ASExtraPointsModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 8131A2922B3950DA00A191BE /* ASExtraPointsModel.m */; };
 		8134C1AD2A13094F006EB0EC /* Target_userCenter.m in Sources */ = {isa = PBXBuildFile; fileRef = 8134C1AC2A13094F006EB0EC /* Target_userCenter.m */; };
 		8134C1B42A1358F3006EB0EC /* ASSginView.m in Sources */ = {isa = PBXBuildFile; fileRef = 8134C1B32A1358F3006EB0EC /* ASSginView.m */; };
 		8134C1B72A1359E6006EB0EC /* ASSignDayView.m in Sources */ = {isa = PBXBuildFile; fileRef = 8134C1B62A1359E6006EB0EC /* ASSignDayView.m */; };
@@ -89,7 +96,6 @@
 		81717CAB2A3C359E00648139 /* ASProductlistFilterPriceCollectCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 81717CAA2A3C359E00648139 /* ASProductlistFilterPriceCollectCell.m */; };
 		81717D102A3C4AE000648139 /* KWHisAndHotWordsViewModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 81717CE62A3C4ADE00648139 /* KWHisAndHotWordsViewModel.m */; };
 		81717D112A3C4AE000648139 /* KWSearchViewModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 81717CE72A3C4ADE00648139 /* KWSearchViewModel.m */; };
-		81717D122A3C4AE000648139 /* APOnlySearchViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 81717CEB2A3C4ADE00648139 /* APOnlySearchViewController.m */; };
 		81717D1C2A3C4AE000648139 /* KWSearchSubTypeModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 81717D022A3C4ADF00648139 /* KWSearchSubTypeModel.m */; };
 		81717D1D2A3C4AE000648139 /* KWSearchSubTypeHeadView.m in Sources */ = {isa = PBXBuildFile; fileRef = 81717D042A3C4AE000648139 /* KWSearchSubTypeHeadView.m */; };
 		81717D1E2A3C4AE000648139 /* KWSearchMainTypeTableView.m in Sources */ = {isa = PBXBuildFile; fileRef = 81717D062A3C4AE000648139 /* KWSearchMainTypeTableView.m */; };
@@ -119,7 +125,6 @@
 		819900222A020A6F006FE68C /* LYTools.m in Sources */ = {isa = PBXBuildFile; fileRef = 819900212A020A6F006FE68C /* LYTools.m */; };
 		81AA11D02B23EA15008EB5C7 /* ASVipCouponsViewModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 81AA11CF2B23EA15008EB5C7 /* ASVipCouponsViewModel.m */; };
 		81AA11D32B23EC20008EB5C7 /* ASVipCouponModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 81AA11D22B23EC20008EB5C7 /* ASVipCouponModel.m */; };
-		81AA11D62B23FEF8008EB5C7 /* KWSearchViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 81AA11D52B23FEF8008EB5C7 /* KWSearchViewController.m */; };
 		81AA11D92B23FF1F008EB5C7 /* ASCategoriesViewModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 81AA11D82B23FF1F008EB5C7 /* ASCategoriesViewModel.m */; };
 		81AA11DC2B23FF71008EB5C7 /* ASCurrencyManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 81AA11DB2B23FF71008EB5C7 /* ASCurrencyManager.m */; };
 		81BEA6832A2D7CF3009D36C4 /* UITableView+ASBase.m in Sources */ = {isa = PBXBuildFile; fileRef = 81BEA6822A2D7CF3009D36C4 /* UITableView+ASBase.m */; };
@@ -303,6 +308,20 @@
 		8127ADDC2B11973400464D27 /* ASNetApis.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ASNetApis.h; sourceTree = "<group>"; };
 		8131A27A2B365F7600A191BE /* ASProductListCategoryModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ASProductListCategoryModel.h; sourceTree = "<group>"; };
 		8131A27B2B365F7600A191BE /* ASProductListCategoryModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ASProductListCategoryModel.m; sourceTree = "<group>"; };
+		8131A27E2B3687EE00A191BE /* ASCustomWindow.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ASCustomWindow.h; sourceTree = "<group>"; };
+		8131A27F2B3687EE00A191BE /* ASCustomWindow.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ASCustomWindow.m; sourceTree = "<group>"; };
+		8131A2822B36882500A191BE /* ASCustomAlertViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ASCustomAlertViewController.h; sourceTree = "<group>"; };
+		8131A2832B36882500A191BE /* ASCustomAlertViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ASCustomAlertViewController.m; sourceTree = "<group>"; };
+		8131A2852B36890200A191BE /* ASWindowManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ASWindowManager.h; sourceTree = "<group>"; };
+		8131A2862B36890200A191BE /* ASWindowManager.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ASWindowManager.m; sourceTree = "<group>"; };
+		8131A2882B3692F300A191BE /* APHomeActiveViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = APHomeActiveViewController.m; sourceTree = "<group>"; };
+		8131A2892B3692F300A191BE /* APHomeActiveWindow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = APHomeActiveWindow.h; sourceTree = "<group>"; };
+		8131A28A2B3692F300A191BE /* APHomeActiveViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = APHomeActiveViewController.h; sourceTree = "<group>"; };
+		8131A28B2B3692F300A191BE /* APHomeActiveWindow.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = APHomeActiveWindow.m; sourceTree = "<group>"; };
+		8131A28E2B38FF3B00A191BE /* APInputAlertView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = APInputAlertView.h; sourceTree = "<group>"; };
+		8131A28F2B38FF3B00A191BE /* APInputAlertView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = APInputAlertView.m; sourceTree = "<group>"; };
+		8131A2912B3950DA00A191BE /* ASExtraPointsModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ASExtraPointsModel.h; sourceTree = "<group>"; };
+		8131A2922B3950DA00A191BE /* ASExtraPointsModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ASExtraPointsModel.m; sourceTree = "<group>"; };
 		8134C1AB2A13094F006EB0EC /* Target_userCenter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Target_userCenter.h; sourceTree = "<group>"; };
 		8134C1AC2A13094F006EB0EC /* Target_userCenter.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Target_userCenter.m; sourceTree = "<group>"; };
 		8134C1B22A1358F3006EB0EC /* ASSginView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ASSginView.h; sourceTree = "<group>"; };
@@ -429,8 +448,6 @@
 		81717CE72A3C4ADE00648139 /* KWSearchViewModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KWSearchViewModel.m; sourceTree = "<group>"; };
 		81717CE82A3C4ADE00648139 /* KWSearchViewModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KWSearchViewModel.h; sourceTree = "<group>"; };
 		81717CE92A3C4ADE00648139 /* KWHisAndHotWordsViewModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KWHisAndHotWordsViewModel.h; sourceTree = "<group>"; };
-		81717CEB2A3C4ADE00648139 /* APOnlySearchViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = APOnlySearchViewController.m; sourceTree = "<group>"; };
-		81717CEE2A3C4ADE00648139 /* APOnlySearchViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = APOnlySearchViewController.h; sourceTree = "<group>"; };
 		81717D012A3C4ADF00648139 /* KWSearchSubTypeModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KWSearchSubTypeModel.h; sourceTree = "<group>"; };
 		81717D022A3C4ADF00648139 /* KWSearchSubTypeModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KWSearchSubTypeModel.m; sourceTree = "<group>"; };
 		81717D042A3C4AE000648139 /* KWSearchSubTypeHeadView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KWSearchSubTypeHeadView.m; sourceTree = "<group>"; };
@@ -488,8 +505,6 @@
 		81AA11CF2B23EA15008EB5C7 /* ASVipCouponsViewModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ASVipCouponsViewModel.m; sourceTree = "<group>"; };
 		81AA11D12B23EC20008EB5C7 /* ASVipCouponModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ASVipCouponModel.h; sourceTree = "<group>"; };
 		81AA11D22B23EC20008EB5C7 /* ASVipCouponModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ASVipCouponModel.m; sourceTree = "<group>"; };
-		81AA11D42B23FEF7008EB5C7 /* KWSearchViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KWSearchViewController.h; sourceTree = "<group>"; };
-		81AA11D52B23FEF8008EB5C7 /* KWSearchViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KWSearchViewController.m; sourceTree = "<group>"; };
 		81AA11D72B23FF1F008EB5C7 /* ASCategoriesViewModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ASCategoriesViewModel.h; sourceTree = "<group>"; };
 		81AA11D82B23FF1F008EB5C7 /* ASCategoriesViewModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ASCategoriesViewModel.m; sourceTree = "<group>"; };
 		81AA11DA2B23FF71008EB5C7 /* ASCurrencyManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ASCurrencyManager.h; sourceTree = "<group>"; };
@@ -822,6 +837,25 @@
 			path = NetTools;
 			sourceTree = "<group>";
 		};
+		8131A27D2B3687CA00A191BE /* Windows */ = {
+			isa = PBXGroup;
+			children = (
+				8131A28A2B3692F300A191BE /* APHomeActiveViewController.h */,
+				8131A2882B3692F300A191BE /* APHomeActiveViewController.m */,
+				8131A2892B3692F300A191BE /* APHomeActiveWindow.h */,
+				8131A28B2B3692F300A191BE /* APHomeActiveWindow.m */,
+				8131A28E2B38FF3B00A191BE /* APInputAlertView.h */,
+				8131A28F2B38FF3B00A191BE /* APInputAlertView.m */,
+				8131A27E2B3687EE00A191BE /* ASCustomWindow.h */,
+				8131A27F2B3687EE00A191BE /* ASCustomWindow.m */,
+				8131A2822B36882500A191BE /* ASCustomAlertViewController.h */,
+				8131A2832B36882500A191BE /* ASCustomAlertViewController.m */,
+				8131A2852B36890200A191BE /* ASWindowManager.h */,
+				8131A2862B36890200A191BE /* ASWindowManager.m */,
+			);
+			path = Windows;
+			sourceTree = "<group>";
+		};
 		81354BE82A2879EE0082C93A /* views */ = {
 			isa = PBXGroup;
 			children = (
@@ -1102,10 +1136,6 @@
 		81717CEA2A3C4ADE00648139 /* vc */ = {
 			isa = PBXGroup;
 			children = (
-				81717CEE2A3C4ADE00648139 /* APOnlySearchViewController.h */,
-				81717CEB2A3C4ADE00648139 /* APOnlySearchViewController.m */,
-				81AA11D42B23FEF7008EB5C7 /* KWSearchViewController.h */,
-				81AA11D52B23FEF8008EB5C7 /* KWSearchViewController.m */,
 				818656482A5BE9790049D861 /* ASSearchViewController.h */,
 				818656492A5BE9790049D861 /* ASSearchViewController.m */,
 				8186564B2A5BF6010049D861 /* ASCategoryViewController.h */,
@@ -1408,6 +1438,8 @@
 			children = (
 				81DFA56B2A46D86500DA708B /* ASPointDetailModel.h */,
 				81DFA56C2A46D86500DA708B /* ASPointDetailModel.m */,
+				8131A2912B3950DA00A191BE /* ASExtraPointsModel.h */,
+				8131A2922B3950DA00A191BE /* ASExtraPointsModel.m */,
 			);
 			path = model;
 			sourceTree = "<group>";
@@ -1916,6 +1948,7 @@
 		9AD364CC2A05EBE800452C7A /* Fuction */ = {
 			isa = PBXGroup;
 			children = (
+				8131A27D2B3687CA00A191BE /* Windows */,
 				812021122B14657D0026B8B5 /* UserManager */,
 				81DFA55A2A46C44800DA708B /* WebView */,
 				81717CAC2A3C453900648139 /* Category */,
@@ -2258,6 +2291,7 @@
 				81601FF82A2DC78300E4A8F1 /* WMZBannerView.m in Sources */,
 				811F42492A40536C00DA68F1 /* ASPointHeadView.m in Sources */,
 				817244B029F3B2EE005FA9C9 /* main.m in Sources */,
+				8131A2872B36890200A191BE /* ASWindowManager.m in Sources */,
 				81717D202A3C4AE000648139 /* KWSearchSubTypeCell.m in Sources */,
 				9A3F5CAB2B3BBEAB00DDB6A7 /* GoodsDetailsPayV.m in Sources */,
 				81C796242A4FD63A003083B8 /* ASVipCouponsViewController.m in Sources */,
@@ -2270,6 +2304,7 @@
 				81601FFA2A2DC78300E4A8F1 /* WMZBannerFadeLayout.m in Sources */,
 				816020182A2F070B00E4A8F1 /* ASHomeCategoryModel.m in Sources */,
 				81AA11D92B23FF1F008EB5C7 /* ASCategoriesViewModel.m in Sources */,
+				8131A28C2B3692F300A191BE /* APHomeActiveViewController.m in Sources */,
 				8134C1B72A1359E6006EB0EC /* ASSignDayView.m in Sources */,
 				81AA11D32B23EC20008EB5C7 /* ASVipCouponModel.m in Sources */,
 				81601FF72A2DC78300E4A8F1 /* WMZBannerParam.m in Sources */,
@@ -2306,6 +2341,7 @@
 				9AD345A72A08D571005CA070 /* TYPageControl.m in Sources */,
 				81354C0A2A289C350082C93A /* KWScrollOffsetView.m in Sources */,
 				81354C032A289A070082C93A /* HomeFilterModel.m in Sources */,
+				8131A2932B3950DA00A191BE /* ASExtraPointsModel.m in Sources */,
 				81717CAB2A3C359E00648139 /* ASProductlistFilterPriceCollectCell.m in Sources */,
 				81AA11D02B23EA15008EB5C7 /* ASVipCouponsViewModel.m in Sources */,
 				81717D352A3D322700648139 /* KWHisKeyWordCell.m in Sources */,
@@ -2334,7 +2370,7 @@
 				81CE28972AF4953C0012AA45 /* ASGiftCardModel.m in Sources */,
 				9AD6A5442A1218E8001DE3D9 /* PassWordSecureBtnV.m in Sources */,
 				811F42462A40533C00DA68F1 /* ASPointsHomeViewController.m in Sources */,
-				81AA11D62B23FEF8008EB5C7 /* KWSearchViewController.m in Sources */,
+				8131A2802B3687EE00A191BE /* ASCustomWindow.m in Sources */,
 				816D0C9A2AF3901C00395B5B /* ASGiftCardListViewController.m in Sources */,
 				81C796372A5517B0003083B8 /* ASSettingListCell.m in Sources */,
 				81717D392A3D322700648139 /* KWCustomLayout.m in Sources */,
@@ -2358,6 +2394,7 @@
 				9AD345FE2A08D60F005CA070 /* UIScrollView+ZFPlayer.m in Sources */,
 				9A65DE512A132FB700BB1269 /* LoginThirdAuthV.m in Sources */,
 				9A788C442A08A663003E0025 /* Target_Goods.m in Sources */,
+				8131A2902B38FF3B00A191BE /* APInputAlertView.m in Sources */,
 				81EC47692A33073100516573 /* ASHomeNewInProductItemView.m in Sources */,
 				81717D212A3C4AE000648139 /* KWSearchSubTypeTableView.m in Sources */,
 				9AD3461D2A08D6F0005CA070 /* GoodsInformationM.m in Sources */,
@@ -2385,6 +2422,7 @@
 				9AD346092A08D60F005CA070 /* ZFAVPlayerManager.m in Sources */,
 				8134C1B42A1358F3006EB0EC /* ASSginView.m in Sources */,
 				9AD346122A08D60F005CA070 /* ZFSmallFloatControlView.m in Sources */,
+				8131A2842B36882500A191BE /* ASCustomAlertViewController.m in Sources */,
 				81EC47752A3423FC00516573 /* ASHomeLookingCell.m in Sources */,
 				9AD3460E2A08D60F005CA070 /* ZFNetworkSpeedMonitor.m in Sources */,
 				81AA11DC2B23FF71008EB5C7 /* ASCurrencyManager.m in Sources */,
@@ -2395,6 +2433,7 @@
 				814F5CF52A11B37E003847A9 /* ASUserAvaterView.m in Sources */,
 				81C796342A551643003083B8 /* ASSettingViewController.m in Sources */,
 				81354C0B2A289C350082C93A /* KWTimeEndView.m in Sources */,
+				8131A28D2B3692F300A191BE /* APHomeActiveWindow.m in Sources */,
 				9AD346032A08D60F005CA070 /* ZFPortraitViewController.m in Sources */,
 				81354BED2A287AB50082C93A /* KWMineHomeOrderHeadView.m in Sources */,
 				81717D102A3C4AE000648139 /* KWHisAndHotWordsViewModel.m in Sources */,
@@ -2408,7 +2447,6 @@
 				81C3B45529F66C1700D79294 /* UIView+PublicInit.m in Sources */,
 				8134C1C52A145172006EB0EC /* ASProductItemView.m in Sources */,
 				9A5C64582A12064300CBB185 /* AS_LoginC.m in Sources */,
-				81717D122A3C4AE000648139 /* APOnlySearchViewController.m in Sources */,
 				9AD345FD2A08D60F005CA070 /* ZFPersentInteractiveTransition.m in Sources */,
 				8160200A2A2DD59E00E4A8F1 /* CTMediator+Home.m in Sources */,
 				81717C9C2A3BF1F100648139 /* ASHomeAlertViewController.m in Sources */,

+ 1 - 0
Asteria/ASUI/ColorDefine.h

@@ -40,6 +40,7 @@
 #define _E5E5E5 ([UIColor colorWithHexString:@"#E5E5E5"])
 #define _F5F5F5 ([UIColor colorWithHexString:@"#F5F5F5"])
 #define _DBDBDB ([UIColor colorWithHexString:@"#DBDBDB"])
+#define _D0D0D0 ([UIColor colorWithHexString:@"#D0D0D0"])
 
 #define _0E0E0F ([UIColor colorWithHexString:@"#0E0E0F"])
 #define _043632 ([UIColor colorWithHexString:@"#043632"])

+ 13 - 1
Asteria/ASUI/CustomView/productView/ASProductBaseModel.m

@@ -30,14 +30,26 @@
     return m;
 }
 
+- (NSString *)currencySymbol {
+    if (_currencySymbol == nil) {
+        return @"";
+    }
+    return _currencySymbol;
+}
+
 - (NSString *)nowPrice {
     NSDecimalNumber *num = [NSDecimalNumber decimalNumberWithString:_nowPrice];
-    
+    if (num == [NSDecimalNumber decimalNumberWithString:@"NaN"]) {
+        num = [NSDecimalNumber decimalNumberWithString:@"0"];
+    }
     return [NSString stringWithFormat:@"%@%.2f",self.currencySymbol, num.doubleValue];
 }
 
 - (NSString *)oldPrice {
     NSDecimalNumber *num = [NSDecimalNumber decimalNumberWithString:_oldPrice];
+    if (num == [NSDecimalNumber decimalNumberWithString:@"NaN"]) {
+        num = [NSDecimalNumber decimalNumberWithString:@"0"];
+    }
     return [NSString stringWithFormat:@"%@%.2f",self.currencySymbol, num.doubleValue];
 }
 

+ 6 - 0
Asteria/ASUI/SimpleBase/ASBaseViewController.h

@@ -30,6 +30,12 @@ NS_ASSUME_NONNULL_BEGIN
 
 - (void)showEmptyV:(UIView *)v;
 
+- (void)toHomeVc;
+
+- (void)popAndToLogin;
+
+- (void)toLoginVC;
+
 @end
 
 NS_ASSUME_NONNULL_END

+ 38 - 0
Asteria/ASUI/SimpleBase/ASBaseViewController.m

@@ -6,6 +6,7 @@
 //
 
 #import "ASBaseViewController.h"
+#import "AppDelegate.h"
 
 @interface ASBaseViewController ()
 
@@ -30,6 +31,43 @@
 
 @implementation ASBaseViewController
 
+- (void)toHomeVc {
+    if (self.navigationController != nil) {
+        [self.navigationController popToRootViewControllerAnimated:false];
+    }
+    QMUITabBarViewController *tabVC = (QMUITabBarViewController *)((AppDelegate *)UIApplication.sharedApplication.delegate).window.rootViewController;
+    
+    tabVC.selectedIndex = 0;
+}
+
+- (void)popAndToLogin {
+    QMUITabBarViewController *tabVC = (QMUITabBarViewController *)((AppDelegate *)UIApplication.sharedApplication.delegate).window.rootViewController;
+    
+    tabVC.selectedIndex = 0;
+    UITabBar *tabbar = tabVC.tabBar;
+    if (tabbar.items.count > 2) {
+        UITabBarItem *temp = tabbar.items[2];
+        temp.qmui_badgeInteger = 0;
+        
+    }
+    
+    UIViewController *loginC = [[CTMediator sharedInstance] Login_LoginC:@{}];
+    
+    QMUINavigationController *uikitNavController = [[QMUINavigationController alloc] initWithRootViewController:loginC];
+    uikitNavController.navigationBar.hidden = YES;
+    uikitNavController.modalPresentationStyle = UIModalPresentationFullScreen;
+    [tabVC presentViewController:uikitNavController animated:YES completion:nil];
+}
+
+- (void)toLoginVC {
+    UIViewController *loginC = [[CTMediator sharedInstance] Login_LoginC:@{}];
+    
+    QMUINavigationController *uikitNavController = [[QMUINavigationController alloc] initWithRootViewController:loginC];
+    uikitNavController.navigationBar.hidden = YES;
+    uikitNavController.modalPresentationStyle = UIModalPresentationFullScreen;
+    [self presentViewController:uikitNavController animated:YES completion:nil];
+}
+
 - (void)setTitleStr:(NSString *)titleStr {
     _titleStr = titleStr;
     self.nav_titleLB.text = _titleStr;

+ 0 - 2
Asteria/Fuction/Category/Target_Category.h

@@ -19,8 +19,6 @@ NS_ASSUME_NONNULL_BEGIN
 - (UIViewController *)Action_getSearchVc:(NSDictionary *)params;
 
 
-- (UIViewController *)Action_getCategoryAndSearchVc:(NSDictionary *)params;
-
 @end
 
 NS_ASSUME_NONNULL_END

+ 0 - 6
Asteria/Fuction/Category/Target_Category.m

@@ -7,7 +7,6 @@
 
 #import "Target_Category.h"
 #import "ASCategoryViewController.h"
-#import "APOnlySearchViewController.h"
 #import "ASSearchViewController.h"
 #import "ASBaseNavController.h"
 
@@ -25,15 +24,10 @@
     ASSearchViewController *vc = [ASSearchViewController new];
     ASBaseNavController *nav = [[ASBaseNavController alloc] initWithRootViewController:vc];
     nav.modalPresentationStyle = UIModalPresentationFullScreen;
-//    APOnlySearchViewController *vc = [[APOnlySearchViewController alloc] init];
     return  nav;
 }
 
 
-- (UIViewController *)Action_getCategoryAndSearchVc:(NSDictionary *)params {
-    KWSearchViewController *vc = [[KWSearchViewController alloc] init];
-    return  vc;
-}
 
 
 @end

+ 2 - 1
Asteria/Fuction/Category/m/KWSearchSubTypeModel.h

@@ -56,9 +56,10 @@ NS_ASSUME_NONNULL_BEGIN
 @interface KWSearchHotKeyModel : NSObject
 
 @property (nonatomic, copy) NSString *title;
-@property (nonatomic, assign) NSInteger type;
+@property (nonatomic, copy) NSString *type;
 @property (nonatomic, copy) NSString *thumbnail_url;
 @property (nonatomic, copy) NSString *code;
+@property (nonatomic, copy) NSString *h_ext;
 
 
 @end

+ 7 - 0
Asteria/Fuction/Category/m/KWSearchSubTypeModel.m

@@ -108,6 +108,13 @@
 
 @implementation KWSearchHotKeyModel
 
++ (NSDictionary *)mj_replacedKeyFromPropertyName {
+    return @{
+        @"title": @"h_name",
+        @"type": @"h_ext.type",
+        @"code": @"h_ext.id",
+    };
+}
 
 
 @end

+ 0 - 16
Asteria/Fuction/Category/vc/APOnlySearchViewController.h

@@ -1,16 +0,0 @@
-//
-//  APOnlySearchViewController.h
-//  westkissMob
-//
-//  Created by iOS on 2023/5/27.
-//
-
-#import "KWSearchViewController.h"
-
-NS_ASSUME_NONNULL_BEGIN
-
-@interface APOnlySearchViewController : KWSearchViewController
-
-@end
-
-NS_ASSUME_NONNULL_END

+ 0 - 68
Asteria/Fuction/Category/vc/APOnlySearchViewController.m

@@ -1,68 +0,0 @@
-//
-//  APOnlySearchViewController.m
-//  westkissMob
-//
-//  Created by iOS on 2023/5/27.
-//
-
-#import "APOnlySearchViewController.h"
-
-@interface APOnlySearchViewController ()
-
-@property (nonatomic, strong) UIButton *cancelBt;
-
-@end
-
-@implementation APOnlySearchViewController
-
-- (void)viewDidLoad {
-    [super viewDidLoad];
-    // Do any additional setup after loading the view.
-    
-    self.bottomV.hidden = true;
-    self.hisWordV.hidden = false;
-    
-    [self.searchTf mas_remakeConstraints:^(MASConstraintMaker *make) {
-        make.left.equalTo(self.topV).offset(50 + 20);
-        make.right.equalTo(self.topV).offset(-20);
-        make.height.equalTo(@45);
-        make.top.equalTo(self.view.mas_safeAreaLayoutGuideTop).offset(8);
-        make.bottom.equalTo(self.topV).offset(-8);
-    }];
-    
-    [self.topV addSubview:self.cancelBt];
-    [self.cancelBt mas_makeConstraints:^(MASConstraintMaker *make) {
-        make.height.equalTo(@40);
-        make.right.equalTo(self.searchTf.mas_left).offset(-10);
-        make.left.equalTo(self.topV).offset(20);
-        make.centerY.equalTo(self.searchTf);
-    }];
-    
-    [self.hisWordV reloadData];
-    
-}
-
-- (void)textFieldDidEndEditing:(UITextField *)textField {
-    [self hideLenovoV];
-}
-
-- (void)cancelBtAction {
-    [self dismissViewControllerAnimated:true completion:nil];
-}
-
-- (UIButton *)cancelBt {
-    if (!_cancelBt) {
-        UIButton *bt = [UIButton buttonWithType:UIButtonTypeCustom];
-        [bt addTarget:self action:@selector(cancelBtAction) forControlEvents:UIControlEventTouchUpInside];
-        [bt setImage:[UIImage imageNamed:@"nav_back_black"] forState:UIControlStateNormal];
-//        [bt setTitle:@"Cancel" forState:UIControlStateNormal];
-//        [bt setTitleColor:UIColor.whiteColor forState:UIControlStateNormal];
-//        bt.titleLabel.font = [UIFont fontWithName:Rob_Medium size:14];
-        _cancelBt = bt;
-    }
-    return _cancelBt;
-}
-
-
-
-@end

+ 6 - 6
Asteria/Fuction/Category/vc/ASSearchViewController.m

@@ -26,7 +26,7 @@
     [super viewDidLoad];
     [self loadSubVs];
     
-    
+    [self.hisWordV reloadData];
     
 }
 
@@ -105,13 +105,13 @@
         }];
         [v setHotCallBack:^(KWSearchHotKeyModel * _Nonnull hot) {
             NSString *word = hot.title;
-            if (hot.type != 1) {
+//            if ([hot.type isEqualToString:@"1"]) {
                 [self.hisWordV.vm addSearchData:word];
                 [weak_self toResult:word type:hot.code keyWord:@""];
-                return;
-            }
-            [self.hisWordV.vm addSearchData:word];
-            [weak_self toResult:word type:@"" keyWord:word];
+//                return;
+//            }
+//            [self.hisWordV.vm addSearchData:word];
+//            [weak_self toResult:word type:@"" keyWord:word];
         }];
         _hisWordV = v;
     }

+ 0 - 31
Asteria/Fuction/Category/vc/KWSearchViewController.h

@@ -1,31 +0,0 @@
-//
-//  KWSearchViewController.h
-//  westkissMob
-//
-//  Created by iOS on 2022/9/13.
-//
-
-#import "ASBaseViewController.h"
-
-#import "KWSearchMainTypeTableView.h"
-#import "KWSearchSubTypeTableView.h"
-
-#import "KWHisAndHotWordsView.h"
-
-NS_ASSUME_NONNULL_BEGIN
-
-@interface KWSearchViewController : ASBaseViewController
-
-@property (nonatomic, strong) KWSearchMainTypeTableView *leftTableV;
-@property (nonatomic, strong) KWSearchSubTypeTableView *rightTableV;
-@property (nonatomic, strong) UIView *bottomV;
-@property (nonatomic, strong) UIView *topV;
-@property (nonatomic,strong) UITextField *searchTf;
-@property (nonatomic, strong) KWHisAndHotWordsView *hisWordV;
-
-
-- (void)hideLenovoV;
-
-@end
-
-NS_ASSUME_NONNULL_END

+ 0 - 401
Asteria/Fuction/Category/vc/KWSearchViewController.m

@@ -1,401 +0,0 @@
-//
-//  KWSearchViewController.m
-//  westkissMob
-//
-//  Created by iOS on 2022/9/13.
-//
-
-#import "KWSearchViewController.h"
-#import "KWLenovoWordListView.h"
-#import "KWSearchSubTypeModel.h"
-
-#import "KWSearchViewModel.h"
-
-@interface KWSearchViewController () <UITextFieldDelegate>
-
-
-
-@property (nonatomic, strong) KWSearchViewModel *vm;
-@property (nonatomic, strong) KWHisAndHotWordsViewModel *hisVm;
-
-@property (nonatomic, strong) KWLenovoWordListView *lenovoV;
-
-
-@end
-
-@implementation KWSearchViewController
-
-- (instancetype)init {
-    self = [super init];
-    if(self) {
-        self.vm = [[KWSearchViewModel alloc] init];
-        [self.vm reqProductTypeList:^() {}];
-        self.hisVm= [[KWHisAndHotWordsViewModel alloc] init];
-    }
-    return self;
-}
-
-- (void)viewDidLoad {
-    [super viewDidLoad];
-    [self addSubVs];
-    [self getData];
-    @weakify(self);
-    [self.vm reqCurrenciesList:^{
-        weak_self.leftTableV.moneyType = weak_self.vm.moneyType;
-        [weak_self.leftTableV reloadData];
-        if (weak_self.leftTableV.selectIndex >= weak_self.leftTableV.arr.count) {
-            weak_self.rightTableV.arr = weak_self.vm.moneyType.children_data;
-            [weak_self.rightTableV reloadData];
-        }
-    }];
-}
-
-- (void)viewWillAppear:(BOOL)animated {
-    [super viewWillAppear:animated];
-    [self.navigationController setNavigationBarHidden:true];
-    if (self.vm.arr.count == 0) {
-        [self getData];
-    }
-    
-}
-
-- (void)viewWillDisappear:(BOOL)animated {
-    [super viewWillDisappear:animated];
-}
-
-- (void)getData {
-    @weakify(self);
-    [self.vm reqProductTypeList:^() {
-        weak_self.leftTableV.arr = weak_self.vm.arr;
-        for (int i = 0; i < weak_self.vm.arr.count; i++) {
-            if (weak_self.vm.arr[i] && weak_self.vm.arr[i].children_data.count > 0) {
-                weak_self.leftTableV.selectIndex = i;
-                weak_self.rightTableV.arr = weak_self.vm.arr[i].children_data;
-                break;
-            }
-            
-        }
-        [weak_self.leftTableV reloadData];
-        [weak_self.rightTableV reloadData];
-    }];
-    
-    if (self.vm.arr.count > 0) {
-        self.leftTableV.arr = weak_self.vm.arr;
-        for (int i = 0; i < weak_self.vm.arr.count; i++) {
-            if (weak_self.vm.arr[i] && weak_self.vm.arr[i].children_data.count > 0) {
-                weak_self.leftTableV.selectIndex = i;
-                weak_self.rightTableV.arr = weak_self.vm.arr[i].children_data;
-                break;
-            }
-            
-        }
-    }
-    [self.leftTableV reloadData];
-    [self.rightTableV reloadData];
-}
-
--(void)addSubVs {
-    
-    self.view.backgroundColor = [UIColor colorWithHexString:@"#f8f8f8"];
-    self.leftTableV.backgroundColor = [UIColor colorWithHexString:@"#f8f8f8"];
-    
-    [self.view addSubview:self.topV];
-    [self.view addSubview:self.bottomV];
-    
-    [self.topV addSubview:self.searchTf];
-    [self.bottomV addSubview:self.leftTableV];
-    [self.bottomV addSubview:self.rightTableV];
-    
-    [self.topV mas_makeConstraints:^(MASConstraintMaker *make) {
-        make.top.left.right.equalTo(self.view);
-    }];
-    [self.searchTf mas_makeConstraints:^(MASConstraintMaker *make) {
-        make.left.equalTo(self.topV).offset(20);
-        make.right.equalTo(self.topV).offset(-20);
-        make.height.equalTo(@45);
-        make.top.equalTo(self.view.mas_safeAreaLayoutGuideTop).offset(8);
-        make.bottom.equalTo(self.topV).offset(-8);
-    }];
-    
-    [self.bottomV mas_makeConstraints:^(MASConstraintMaker *make) {
-        make.top.equalTo(self.topV.mas_bottom).offset(10);
-        make.left.right.equalTo(self.view);
-        make.bottom.equalTo(self.view.mas_safeAreaLayoutGuideBottom);
-    }];
-    
-    [self.leftTableV mas_makeConstraints:^(MASConstraintMaker *make) {
-        make.width.equalTo(@130);
-        make.left.top.bottom.equalTo(self.bottomV);
-    }];
-    [self.rightTableV mas_makeConstraints:^(MASConstraintMaker *make) {
-        make.top.bottom.right.equalTo(self.bottomV);
-        make.left.equalTo(self.leftTableV.mas_right);
-    }];
-    
-    [self.view addSubview:self.hisWordV];
-    self.hisWordV.hidden = true;
-    [self.hisWordV mas_makeConstraints:^(MASConstraintMaker *make) {
-        make.leading.trailing.bottom.equalTo(self.view);
-        make.top.equalTo(self.topV.mas_bottom);
-    }];
-    
-    [self.view addSubview:self.lenovoV];
-    self.lenovoV.hidden = true;
-    [self.lenovoV mas_makeConstraints:^(MASConstraintMaker *make) {
-        make.leading.trailing.equalTo(self.searchTf);
-        make.top.equalTo(self.searchTf.mas_bottom);
-        make.height.equalTo(@0);
-    }];
-    
-}
-
-
-
-
-
-
-- (KWSearchMainTypeTableView *)leftTableV {
-    if (!_leftTableV) {
-        KWSearchMainTypeTableView *leftTab = [[KWSearchMainTypeTableView alloc] initWithFrame:CGRectMake(0, 10, 180, self.view.bounds.size.height) style:UITableViewStylePlain];
-        @weakify(self);
-        _leftTableV = leftTab;
-        leftTab.callBack = ^{
-            NSInteger selectIndex = weak_self.leftTableV.selectIndex;
-            if (selectIndex >= weak_self.leftTableV.arr.count) {
-                weak_self.rightTableV.arr = weak_self.leftTableV.moneyType.children_data;
-                [weak_self.rightTableV reloadData];
-                return;
-            }
-            
-           KWMainTypeModel *m = weak_self.leftTableV.arr[selectIndex];
-
-            if (m.children_data.count == 0) {
-                [self toResult:m.title type:m.Id keyWord:@""];
-            } else {
-                weak_self.rightTableV.arr = m.children_data;
-                [weak_self.rightTableV reloadData];
-            }
-        };
-    }
-    return _leftTableV;
-}
-
-- (KWSearchSubTypeTableView *)rightTableV {
-    if(!_rightTableV) {
-        KWSearchSubTypeTableView *tab = [[KWSearchSubTypeTableView alloc] initWithFrame:CGRectMake(0, 10, 180, self.view.bounds.size.height) style:UITableViewStylePlain];
-        _rightTableV = tab;
-        @weakify(self);
-        [_rightTableV setCallBack:^(NSIndexPath * _Nonnull indexP) {
-            KWSearchSubTypeModel *m = weak_self.rightTableV.arr[indexP.section].children_data[indexP.item];
-            [weak_self toResult:m.title type:m.Id keyWord:@""];
-        }];
-        [_rightTableV setCallBackSection:^(NSInteger index) {
-            KWSubTypeSectionModel *m = weak_self.rightTableV.arr[index];
-            if (m.isMoneyType) {
-                [MBProgressHUD showHUDAddedTo:weak_self.view animated:true];
-                [weak_self.vm switchCurrencie:m callback:^(BOOL flag) {
-
-                    if (flag) {
-                        [[NSNotificationCenter defaultCenter] postNotificationName:MoneyTypeChanged object:nil];
-                        [weak_self.vm reqCurrenciesList:^{
-                            [MBProgressHUD hideHUDForView:weak_self.view animated:true];
-                            weak_self.leftTableV.moneyType = weak_self.vm.moneyType;
-                            weak_self.rightTableV.arr = weak_self.vm.moneyType.children_data;
-                            [weak_self.rightTableV reloadData];
-                        }];
-                    } else {
-                        [MBProgressHUD hideHUDForView:weak_self.view animated:true];
-                    }
-                }];
-                return;
-            }
-            [weak_self toResult:m.title type:m.Id keyWord:@""];
-        }];
-    }
-    return _rightTableV;
-}
-
-
-
-
--(UIView *)topV {
-    if (!_topV) {
-        UIView *v = [[UIView alloc] init];
-        v.backgroundColor = _FFD1B9;//[UIColor colorWithHexString:@"#FFF5F0"];
-        _topV = v;
-    }
-    return _topV;
-}
-
--(UIView *)bottomV {
-    if (!_bottomV) {
-        UIView *v = [[UIView alloc] init];
-        v.backgroundColor = [UIColor colorWithHexString:@"#ffffff"];
-        _bottomV = v;
-    }
-    return _bottomV;
-}
-
--(UITextField *)searchTf {
-    if (!_searchTf) {
-        UITextField *tf = [[UITextField alloc] init];
-        tf.delegate = self;
-        tf.borderStyle = UITextBorderStyleNone;
-        tf.backgroundColor = UIColor.whiteColor;
-        tf.font = [UIFont fontWithName:Rob_Regular size:14];
-        tf.textAlignment = NSTextAlignmentLeft;
-        tf.placeholder = @"SEARCH FOR PRODUCTS";
-        tf.textColor = _0B0B0B;
-        tf.layer.masksToBounds = true;
-        tf.clearButtonMode = UITextFieldViewModeAlways;
-        UIView *tfLeftV = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 44, 45)];
-        UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom];
-        btn.frame = tfLeftV.bounds;
-        [btn setImage:[UIImage imageNamed:@"search_tf"] forState:UIControlStateNormal];
-        [tfLeftV addSubview:btn];
-        tf.leftView = tfLeftV;
-        tf.leftViewMode = UITextFieldViewModeAlways;
-        _searchTf = tf;
-    }
-    return  _searchTf;
-}
-
--(KWHisAndHotWordsView *)hisWordV {
-    if (!_hisWordV) {
-        KWHisAndHotWordsView *v = [[KWHisAndHotWordsView alloc] initWithFrame:CGRectZero];
-        v.isSearch = true;
-        @weakify(self);
-        [v setCallBack:^(NSString * _Nonnull word) {
-            weak_self.searchTf.text = word;
-            [self.hisWordV.vm addSearchData:word];
-            [weak_self toResult:word type:@"" keyWord:word];
-        }];
-        [v setHotCallBack:^(KWSearchHotKeyModel * _Nonnull hot) {
-            NSString *word = hot.title;
-            if (hot.type != 1) {
-                [self.hisWordV.vm addSearchData:word];
-                [weak_self toResult:word type:hot.code keyWord:@""];
-                return;
-            }
-            [self.hisWordV.vm addSearchData:word];
-            [weak_self toResult:word type:@"" keyWord:word];
-        }];
-        _hisWordV = v;
-    }
-    return  _hisWordV;
-}
-
-- (KWLenovoWordListView *)lenovoV {
-    if (!_lenovoV) {
-        KWLenovoWordListView *v = [[KWLenovoWordListView alloc] initWithFrame:CGRectMake(self.searchTf.frame.origin.x, self.topV.maxY - 8, self.searchTf.frame.size.width, 200)];
-        @weakify(self);
-        [v setCallBack:^(NSString * _Nonnull word) {
-            weak_self.searchTf.text = word;
-            [self.hisWordV.vm addSearchData:word];
-            [weak_self toResult:word type:@"" keyWord:word];
-        }];
-        _lenovoV = v;
-    }
-    return  _lenovoV;
-}
-
-
-/// show lenovo Words
-- (void) showLenovoV:(NSString *)key {
-    @weakify(self);
-    [self.hisVm getAboutKeyList:key back:^{
-        if (weak_self.hisVm.aboutKeys.count > 0 && [self.searchTf.text isEqualToString:key]) {
-            weak_self.lenovoV.hidden = false;
-            [weak_self.lenovoV setData:weak_self.hisVm.aboutKeys origen:CGPointMake(self.searchTf.frame.origin.x, self.topV.maxY - 8)];
-        } else {
-            weak_self.lenovoV.hidden = true;
-        }
-    }];
-    
-   
-}
-
-- (void)hideLenovoV {
-    self.lenovoV.hidden = true;
-}
-
-/// show lenovo Words
-- (void) showHisWordV {
-    self.hisWordV.hidden = false;
-    [_hisWordV reloadData];
-}
-
-- (void)hideHisWordV {
-    self.hisWordV.hidden = true;
-}
-
-// MARK: - pushResult
-- (void)toResult:(NSString *)key type:(NSString *)type keyWord:(NSString *)word {
-    NSDictionary *para = @{
-        @"type":type,  //String
-        @"title":key,//String
-        @"searchKey":word,//String
-    };
-    UIViewController *vc = [CTMediator.sharedInstance getProductListVc:para];
-    
-    [self.navigationController pushViewController:vc animated:true];
-}
-
-
-
-// MARK: - uitextfiled delegate
-
-- (BOOL)textFieldShouldBeginEditing:(UITextField *)textField {
-    [self showHisWordV];
-    
-    NSString *txt = textField.text;
-    if ([txt isEqualToString:@""] ) {
-        [self hideLenovoV];
-    } else {
-       
-        [self showLenovoV:txt];
-    }
-    
-    return  true;
-}
-
-- (BOOL)textFieldShouldClear:(UITextField *)textField {
-    self.hisVm.aboutKeys = @[];
-    [self hideLenovoV];
-    return true;
-}
-
-- (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string {
-    NSString *txt = textField.text;
-    txt = [txt stringByReplacingCharactersInRange:range withString:string];
-    if ([txt isEqualToString:@""] ) {
-        [self hideLenovoV];
-    } else {
-       
-        
-        [self showLenovoV:txt];
-    }
-    
-    return  true;
-}
-
-- (BOOL)textFieldShouldEndEditing:(UITextField *)textField {
-    return  true;
-}
-
-- (void)textFieldDidEndEditing:(UITextField *)textField {
-    [self hideLenovoV];
-    [self hideHisWordV];
-}
-
-- (BOOL)textFieldShouldReturn:(UITextField *)textField {
-    [textField resignFirstResponder];
-    NSString *key = textField.text;
-    if (![key isEmpty]){
-        [self.hisWordV.vm addSearchData:key];
-        [self toResult:key type:@"" keyWord:key];
-    }
-    return true;
-}
-
-@end

+ 11 - 18
Asteria/Fuction/Category/vm/KWHisAndHotWordsViewModel.m

@@ -11,24 +11,17 @@ static NSString *localSearchList = @"localSearchList";
 
 
 -(void)getHotKeyList:(btnClickBlock)success {
-//    @weakify(self);
-//    [PPNetworkHelper POST:HotSeartch parameters:nil success:^(id responseObject) {
-//        if (RequestSuccess) {
-//            NSLog(@"success:%@",responseObject);
-//            NSArray *arr = [KWSearchHotKeyModel mj_objectArrayWithKeyValuesArray:responseObject[@"data"]];
-//            weak_self.hotKeys = arr;
-            success();
-//        } else {
-//            NSLog(@"fail:%@",RequestErrorMsg);
-//            weak_self.hotKeys = @[];
-//            success();
-//
-//        }
-//    } failure:^(NSError *error) {
-//        NSLog(@"err:%@",error);
-//        self.hotKeys = @[];
-//        success();
-//    }];
+    __weak typeof(self) weakSelf = self;
+    [ASNetTools.shared getWithPath:getHotList param:@{@"type":@"words"} success:^(id _Nonnull json) {
+        NSLog(@"------url:%@---json:%@------", getHotList, json);
+        NSArray *arr = [KWSearchHotKeyModel mj_objectArrayWithKeyValuesArray:json];
+        weakSelf.hotKeys = arr;
+        success();
+    } faild:^(NSString * _Nonnull code, NSString * _Nonnull msg) {
+        NSLog(@"------url:%@---code:%@---msg:%@---", getHotList, code, msg);
+        weakSelf.hotKeys = @[];
+        success();
+    }];
 }
 
 

+ 1 - 0
Asteria/Fuction/Home/ASHomeViewController.m

@@ -148,6 +148,7 @@
             cell.selectCategory = ^(ASHomeCategoryModel * _Nonnull model, NSIndexPath * _Nonnull index) {
                 // TODO: - to productlist
                 [self pushToProductList:model.typeId title:model.title];
+                [ASNetTools debugRegist];
             };
             return cell;
         }

+ 102 - 1
Asteria/Fuction/Home/ASProductListViewController.m

@@ -30,7 +30,9 @@
 @property (nonatomic, strong) ASProductListViewModel *vm;
 @property (nonatomic, strong) UICollectionView *collectV;
 
-
+@property (nonatomic, strong) UIView *timerView;
+@property (nonatomic, strong) UILabel *timerLb;
+@property (nonatomic, strong) NSTimer * _Nullable timer;
 
 
 // sort 相关
@@ -48,6 +50,7 @@
     self.currentSortType = 2;
     self.desMoreOpen = false;
     [self loadSubVs];
+    [self loadTimerV];
     [self loasActiveDataAndV];
     self.vm = [ASProductListViewModel new];
     [self.collectV reloadData];
@@ -56,6 +59,28 @@
     
 }
 
+- (void)viewDidAppear:(BOOL)animated {
+    [super viewDidAppear:animated];
+    [self.timer invalidate];
+    self.timer = nil;
+    if (self.secondTime > 0) {
+        self.timer = [NSTimer scheduledTimerWithTimeInterval:1 target:self selector:@selector(timerAction) userInfo:nil repeats:true];
+        [NSRunLoop.currentRunLoop addTimer:self.timer forMode:NSRunLoopCommonModes];
+    }
+}
+
+- (void)viewDidDisappear:(BOOL)animated {
+    [super viewDidDisappear:animated];
+    [self.timer invalidate];
+    self.timer = nil;
+}
+
+- (void)dealloc
+{
+    [self.timer invalidate];
+    self.timer = nil;
+}
+
 - (void)configFilter {
     if (_type && ![_type isEqualToString:@""]) {
         [self.menuFilterV configTypeId:self.type];
@@ -63,7 +88,50 @@
 }
 
 
+- (void)timerAction {
+    self.secondTime -= 1;
+    [self setTimerStr];
+}
+
+- (void)setTimerStr {
+    if (self.secondTime <= 0) {
+        self.timerView.hidden = true;
+        [self.timer invalidate];
+        self.timer = nil;
+        // TODO:获取积分请求
+        [MBProgressHUD showHUDAddedTo:self.view animated:true];
+        __weak typeof(self) weakSelf = self;
+        [self.vm getPoint:[NSString stringWithFormat:@"%ld", self.pointGetType] com:^(BOOL isSuc, NSString * _Nonnull msg) {
+            [MBProgressHUD hideHUDForView:weakSelf.view animated:true];
+            if (!isSuc) {
+                [weakSelf.view makeToast:msg];
+            }
+        }];
+        return;
+    }
+    NSInteger minus = self.secondTime/60;
+    NSInteger second = self.secondTime%60;
+    NSString *str = [NSString stringWithFormat:@"%ld:%02ld", minus, second];
+    self.timerLb.text = str;
+    
+}
+
 // MARK: sub mas
+- (void)loadTimerV {
+    if (self.secondTime <= 0) {
+        return;
+    }
+    [self.view addSubview:self.timerView];
+    
+    [self.timerView mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.bottom.equalTo(self.view).offset(-180);
+        make.trailing.equalTo(self.view).offset(-8);
+        make.width.equalTo(@50);
+        make.height.equalTo(@50);
+    }];
+    [self setTimerStr];
+}
+
 - (void)loadSubVs {
     
     [self setNavRightSearch:^{
@@ -292,6 +360,39 @@
 
 // MARK: - subvs
 
+- (UIView *)timerView {
+    if (!_timerView) {
+        UIView *v = [UIView baseV];
+        v.backgroundColor = UIColor.clearColor;
+        UIImageView *imgV = [UIImageView baseImgV];
+        imgV.contentMode = UIViewContentModeScaleAspectFit;
+        imgV.image = [UIImage imageNamed:@"product_list_timer"];
+        [v addSubview:imgV];
+        [v addSubview:self.timerLb];
+        _timerView = v;
+        [imgV mas_makeConstraints:^(MASConstraintMaker *make) {
+            make.edges.equalTo(_timerView);
+        }];
+        [self.timerLb mas_makeConstraints:^(MASConstraintMaker *make) {
+            make.top.equalTo(_timerView).offset(5);
+            make.leading.equalTo(_timerView).offset(5);
+            make.trailing.bottom.equalTo(_timerView).offset(-5);
+        }];
+    }
+    return _timerView;
+}
+
+- (UILabel *)timerLb {
+    if (!_timerLb) {
+        UILabel *lb = [UILabel baseLb];
+        lb.font = [UIFont fontWithName:Rob_BlackItalic size:12];
+        lb.textAlignment = NSTextAlignmentCenter;
+        lb.textColor = Col_000;
+        _timerLb = lb;
+    }
+    return _timerLb;
+}
+
 -(UICollectionView *)collectV {
     if (!_collectV) {
         UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init];

+ 22 - 0
Asteria/Fuction/Home/Home.xcassets/productlist/product_list_timer.imageset/Contents.json

@@ -0,0 +1,22 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "scale" : "1x"
+    },
+    {
+      "filename" : "倒计时@2x.png",
+      "idiom" : "universal",
+      "scale" : "2x"
+    },
+    {
+      "filename" : "倒计时@3x.png",
+      "idiom" : "universal",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

BIN
Asteria/Fuction/Home/Home.xcassets/productlist/product_list_timer.imageset/倒计时@2x.png


BIN
Asteria/Fuction/Home/Home.xcassets/productlist/product_list_timer.imageset/倒计时@3x.png


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

@@ -23,6 +23,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)getPoint:(NSString *)pointType com:(void(^)(BOOL isSuc, NSString *msg))com;
+
 @end
 
 NS_ASSUME_NONNULL_END

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

@@ -95,4 +95,13 @@
     
 }
 
+
+- (void)getPoint:(NSString *)pointType com:(void(^)(BOOL isSuc, NSString *msg))com {
+    [ASNetTools.shared postWithPath:postTakeExtraPoints param:@{@"type": pointType} success:^(id _Nonnull json) {
+        com(true, @"");
+    } faild:^(NSString * _Nonnull code, NSString * _Nonnull msg) {
+        com(false,msg);
+    }];
+}
+
 @end

+ 54 - 2
Asteria/Fuction/UserCenter/Points/ASPointsHomeViewController.m

@@ -9,9 +9,12 @@
 #import "ASPointHeadView.h"
 #import "ASPointEranCell.h"
 #import "ASPointDetailViewController.h"
+#import "ASPointsViewModel.h"
 
 @interface ASPointsHomeViewController ()<UITableViewDelegate,UITableViewDataSource>
 
+@property (nonatomic, strong) ASPointsViewModel *vm;
+
 @property (nonatomic, strong) ASPointHeadView *headV;
 
 @property (nonatomic, strong) UITableView *tableV;
@@ -22,9 +25,20 @@
 
 - (void)viewDidLoad {
     [super viewDidLoad];
+    self.vm = [[ASPointsViewModel alloc] init];
     [self loadSubVs];
     [self configSubV];
     
+  
+    
+}
+
+- (void)viewWillAppear:(BOOL)animated {
+    [super viewWillAppear:animated];
+    __weak typeof(self) weakSelf = self;
+    [self.vm getExtraList:^(BOOL hasNext, NSString * _Nonnull msg) {
+        [weakSelf.tableV reloadData];
+    }];
 }
 
 - (void)configSubV {
@@ -88,14 +102,52 @@
 // MARK: - UITableViewDelegate,UITableViewDataSource
 
 - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
-    return 10;
+    return self.vm.extraPathList.count;
 }
 
 - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
     ASPointEranCell *cell = [tableView dequeueReusableCellWithIdentifier:@"ASPointEranCell" forIndexPath:indexPath];
-    [cell setData:@"Browsing hD Lace Wig Page ≥ 15 Seconds" des:@"1 Points Per $1 " status:indexPath.row%2 == 1];
+    if (indexPath.row >= self.vm.extraPathList.count) {
+        return cell;
+    }
+    ASExtraPointsModel *m = self.vm.extraPathList[indexPath.row];
+    [cell setData:m.name des:m.point status:!m.is_obtain];
     
     return cell;
 }
 
+- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
+    if (indexPath.row >= self.vm.extraPathList.count) {
+        return;
+    }
+    ASExtraPointsModel *m = self.vm.extraPathList[indexPath.row];
+    if (!m.is_obtain) {
+        return;
+    }
+    switch (m.type.intValue) {
+        case -1:{
+            [self toHomeVc];
+        }
+            break;
+        case 0: {
+            // TODO: 去订单列表
+            
+        }
+            break;
+                    
+        default: {
+            if (m.categoryId != nil && m.categoryId.length > 0) {
+                UIViewController *vc = [CTMediator.sharedInstance getProductListVc:@{
+                    @"type":m.categoryId,  //String
+                 @"title":m.name,//String
+                 @"secondTime": [NSNumber numberWithInteger:15],// NSNumber,
+                 @"pointGetType":[NSNumber numberWithInteger:m.type.integerValue],//NSNumber
+                 }];
+                [self.navigationController pushViewController:vc animated:true];
+            }
+        }
+            break;
+    }
+}
+
 @end

+ 5 - 0
Asteria/Fuction/UserCenter/Points/ASPointsViewModel.h

@@ -7,14 +7,19 @@
 
 #import <Foundation/Foundation.h>
 #import "ASPointDetailModel.h"
+#import "ASExtraPointsModel.h"
 
 NS_ASSUME_NONNULL_BEGIN
 
 @interface ASPointsViewModel : NSObject
 
+@property (nonatomic, strong) NSMutableArray<ASExtraPointsModel *> *extraPathList;
+
 @property (nonatomic, strong) NSMutableArray<ASPointDetailModel *> *allList;
 @property (nonatomic, strong) NSMutableArray<ASPointDetailModel *> *usedList;
 
+- (void)getExtraList:(void(^)(BOOL hasNext, NSString *msg))com;
+
 - (void)getAllList:(NSInteger)page com:(void(^)(BOOL hasNext, NSString *msg))com;
 - (void)getUsedList:(NSInteger)page com:(void(^)(BOOL hasNext, NSString *msg))com;
 

+ 13 - 0
Asteria/Fuction/UserCenter/Points/ASPointsViewModel.m

@@ -15,10 +15,23 @@
     if (self) {
         self.allList = [NSMutableArray array];
         self.usedList = [NSMutableArray array];
+        self.extraPathList = [NSMutableArray array];
     }
     return self;
 }
 
+- (void)getExtraList:(void(^)(BOOL hasNext, NSString *msg))com {
+    __weak typeof(self) weakSelf = self;
+    NSMutableDictionary *dic = [NSMutableDictionary dictionary];
+    [ASNetTools.shared getWithPath:getExtraPoints param:dic success:^(id _Nonnull json) {
+        NSMutableArray *arr = [ASExtraPointsModel mj_objectArrayWithKeyValuesArray:json];
+        weakSelf.extraPathList = arr;
+        com(true, @"");
+    } faild:^(NSString * _Nonnull code, NSString * _Nonnull msg) {
+        com(false, msg);
+    }];
+}
+
 - (void)getAllList:(NSInteger)page com:(void(^)(BOOL hasNext, NSString *msg))com {
     NSMutableDictionary *dic = [NSMutableDictionary dictionary];
     dic[@"page"] = [NSString stringWithFormat:@"%ld", page];

+ 27 - 0
Asteria/Fuction/UserCenter/Points/model/ASExtraPointsModel.h

@@ -0,0 +1,27 @@
+//
+//  ASExtraPointsModel.h
+//  Asteria
+//
+//  Created by iOS on 2023/12/25.
+//
+
+#import <Foundation/Foundation.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface ASExtraPointsModel : NSObject
+
+/// 类型id
+@property (nonatomic, copy) NSString *type;
+/// 类型名称
+@property (nonatomic, copy) NSString *name;
+/// 奖励积分描述
+@property (nonatomic, copy) NSString *point;
+/// 商品分类id
+@property (nonatomic, copy) NSString *categoryId;
+/// 是否可以获得
+@property (nonatomic, assign) BOOL is_obtain;
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 12 - 0
Asteria/Fuction/UserCenter/Points/model/ASExtraPointsModel.m

@@ -0,0 +1,12 @@
+//
+//  ASExtraPointsModel.m
+//  Asteria
+//
+//  Created by iOS on 2023/12/25.
+//
+
+#import "ASExtraPointsModel.h"
+
+@implementation ASExtraPointsModel
+
+@end

+ 118 - 20
Asteria/Fuction/UserCenter/Setting/ASInfomationSetController.m

@@ -373,32 +373,130 @@
 
 - (void)bottomBtAction {
     
-    [ASHomeAlertWindow alertMsg:@"Successfully Change  Information, Please Log In Again"];
+    if (self.emailTf.text == nil || self.emailTf.text.length == 0) {
+        [self.view makeToast:@"The email address con't be empty"];
+        return;
+    }
+    if (self.nameTf.text == nil || self.nameTf.text.length == 0) {
+        [self.view makeToast:@"The firstName con't be empty"];
+        return;
+    }
+    if (self.lastNTf.text == nil || self.lastNTf.text.length == 0) {
+        [self.view makeToast:@"The lastName con't be empty"];
+        return;
+    }
+    if (self.changePassBt.isSelected) {
+        if (self.oldPassTf.text == nil || self.oldPassTf.text.length == 0) {
+            [self.view makeToast:@"The old password con't be empty"];
+            return;
+        }
+        if (self.nPassTf.text == nil || self.nPassTf.text.length == 0) {
+            [self.view makeToast:@"The new password con't be empty"];
+            return;
+        }
+    }
+    
+    NSMutableDictionary *param = [NSMutableDictionary dictionaryWithDictionary:@{
+        @"email": self.emailTf.text,
+        @"firstname": self.nameTf.text,
+        @"lastname": self.lastNTf.text,
+    }];
+    if (self.birthTf.text != nil && self.birthTf.text.length > 0) {
+        param[@"dob"] = self.birthTf.text;
+    }
+    BOOL __block isInfoSuc = false;
+    BOOL __block isPassSuc = false;
+    __weak typeof(self) weakSelf = self;
+    [MBProgressHUD showHUDAddedTo:self.view animated:true];
+    dispatch_group_t group = dispatch_group_create();
+    dispatch_queue_t queue = dispatch_get_global_queue(0, 0);
+    
+    dispatch_group_enter(group);
+    dispatch_group_async(group, queue, ^{
+        [ASNetTools.shared putWithPath:putUserInfo param: @{@"customer":param} success:^(id _Nonnull json) {
+            isInfoSuc = true;
+            dispatch_group_leave(group);
+        } faild:^(NSString * _Nonnull code, NSString * _Nonnull msg) {
+            [weakSelf.view makeToast:@"Bad Net"];
+            isInfoSuc = false;
+            dispatch_group_leave(group);
+        }];
+    });
+    
+    if (!self.changePassBt.isSelected) {
+        isPassSuc = true;
+        dispatch_group_notify(group, dispatch_get_main_queue(), ^{
+            [MBProgressHUD hideHUDForView:weakSelf.view animated:true];
+            BOOL flag = isInfoSuc;
+            NSString *str = @"Successfully Change  Information";
+            if (weakSelf.changePassBt.isSelected) {
+                flag = isInfoSuc && isPassSuc;
+                str = @"Successfully Change  Information, Please Log In Again";
+            }
+            if (!flag) {
+                [ASUserInfoManager.shared getInfo];
+                return;
+            }
+            
+            [ASHomeAlertWindow alertMsg:str];
+            if (weakSelf.changePassBt.isSelected) {
+                dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
+                    [ASHomeAlertWindow clearWindow];
+                    [weakSelf popAndToLogin];
+                });
+            } else {
+                [ASUserInfoManager.shared getInfo];
+            }
+            
+        });
+        return;
+    }
+    NSDictionary *dic = @{
+        @"currentPassword": self.oldPassTf.text,
+        @"newPassword": self.nPassTf.text,
+    };
+    dispatch_group_enter(group);
+    dispatch_group_async(group, queue, ^{
+        [ASNetTools.shared putWithPath:putUserPassword param:dic success:^(id _Nonnull json) {
+            isPassSuc = true;
+            dispatch_group_leave(group);
+        } faild:^(NSString * _Nonnull code, NSString * _Nonnull msg) {
+            [weakSelf.view makeToast:@"Bad Net"];
+            isPassSuc = false;
+            dispatch_group_leave(group);
+        }];
+    });
+    dispatch_group_notify(group, dispatch_get_main_queue(), ^{
+        [MBProgressHUD hideHUDForView:weakSelf.view animated:true];
+        BOOL flag = isInfoSuc;
+        NSString *str = @"Successfully Change  Information";
+        if (weakSelf.changePassBt.isSelected) {
+            flag = isInfoSuc && isPassSuc;
+            str = @"Successfully Change  Information, Please Log In Again";
+        }
+        if (!flag) {
+            [ASUserInfoManager.shared getInfo];
+            return;
+        }
+        
+        [ASHomeAlertWindow alertMsg:str];
+        if (weakSelf.changePassBt.isSelected) {
+            dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
+                [ASHomeAlertWindow clearWindow];
+                [weakSelf popAndToLogin];
+            });
+        } else {
+            [ASUserInfoManager.shared getInfo];
+        }
+        
+    });
     
-//    KWLoginedUserModel *tempInfo = [[KWLoginedUserModel alloc] init];
-//    tempInfo.firstname = self.nameTf.text;
-//    tempInfo.lastname = self.lastNTf.text;
-//    tempInfo.email = self.emailTf.text;
-//    tempInfo.dob = self.birthTf.text;
-//
-//
-//
-//    [MBProgressHUD showHUDAddedTo:self.view animated:true];
-//    @weakify(self);
-//    [self.vm editUserInfo:tempInfo changePass:[NSString stringWithFormat:@"%ld", self.showType] oldPass:self.oldPassTf.text nPass:self.nPassTf.text complate:^(BOOL flag, NSString * _Nonnull msg) {
-//        [MBProgressHUD hideHUDForView:weak_self.view animated:true];
-//        if (!flag) {
-//            [weak_self.view makeToast:msg];
-//        } else {
-//            [weak_self.view makeToast:@"Save Successed"];
-//            [weak_self.navigationController popViewControllerAnimated:true];
-//        }
-//    }];
 }
 
 
 
 
+
 - (void)textfieldDidChange:(UITextField *)tf {
     [self configBtState];
 }

+ 96 - 88
Asteria/Fuction/UserCenter/Setting/ASSettingViewController.m

@@ -9,6 +9,7 @@
 #import "ASSettingListCell.h"
 #import "ASInfomationSetController.h"
 #import "ASHelpListViewController.h"
+#import "AppDelegate.h"
 
 @interface ASSettingViewController () <UITableViewDelegate,UITableViewDataSource>
 
@@ -180,14 +181,14 @@
             [self.navigationController pushViewController:vc animated:true];
             break;
         }
-//        case 5: {
-//            [self logout];
-//            break;
-//        }
-//        case 6: {
+        case 5: {
+            [self logout];
+            break;
+        }
+        case 6: {
 //            [self showDeleteAccountAlert];
-//            break;
-//        }
+            break;
+        }
         default:
             break;
     }
@@ -221,108 +222,115 @@
     return  cell;
 }
 
-// MARK: - 注销账号
-- (void)showDeleteAccountAlert {
-//    @weakify(self);
-//    KWUpdateAlertWindow *window = [KWUpdateAlertWindow show:@"Are You Sure To Delete Your Account?\n(This action can't be undone. All the data of your account will be delete)" isMast:false upBlock:^{
-//    } cancelBlock:^{
-//        @strongify(self);
-//        [self deleteAccount];
-//
-//    }];
-//    window.vc.titleLb.text = @"Delete Account?";
-//    [window.vc.sureBt setTitle:@"No" forState:UIControlStateNormal];
-//    [window.vc.cancelBt setTitleColor:UIColor.whiteColor forState:UIControlStateNormal];
-//    NSMutableAttributedString *attStr = [[NSMutableAttributedString alloc] initWithString:@"Yes"];
-//    [attStr setFont:[UIFont fontWithName:Rob_Regular size:16]];
-//    [attStr setUnderlineStyle:NSUnderlineStyleSingle];
-//    [attStr setUnderlineColor:[UIColor colorWithHexString:@"#000000"]];
-//    [attStr setColor:[UIColor colorWithHexString:@"#000000"]];
-//    [window.vc.cancelBt setAttributedTitle:attStr forState:UIControlStateNormal];
-//
-//    [window.vc.cancelBt mas_remakeConstraints:^(MASConstraintMaker *make) {
-//        make.bottom.equalTo(window.vc.sureBt);
-//        make.height.equalTo(@35);
-//        make.right.equalTo(window.vc.sureBt.mas_left).offset(-20);
-//        make.left.greaterThanOrEqualTo(window.vc.contentV).offset(20);
-//    }];
-//
-//
-}
-- (void)deleteAccount {
-//    [MBProgressHUD showHUDAddedTo:self.view animated:true];
-//    @weakify(self);
-//    [PPNetworkHelper POST:DeleteAccount parameters:@{} success:^(id responseObject) {
-//        [MBProgressHUD hideHUDForView:self.view animated:true];
-//        if (RequestSuccess) {
-//            NSLog(@"success:%@",responseObject);
-//            [XXX_Tabber shareInstance].xxx_barCartBtn.badgeValue = @"0";
-//            [weak_self popAndToLogin];
-//
-//        } else {
-//            NSLog(@"fail:%@",RequestErrorMsg);
-//            [weak_self.view makeToast:RequestErrorMsg];
-//        }
-//    } failure:^(NSError *error) {
-//        [MBProgressHUD hideHUDForView:self.view animated:true];
-//        NSLog(@"err:%@",error);
-//        [weak_self.view makeToast:@"Oh No, Bad Net"];
-//    }];
-}
 
 // MARK: - 退出登录
 - (void)logout {
-//    [MBProgressHUD showHUDAddedTo:self.view animated:true];
-//    @weakify(self);
-//    [PPNetworkHelper POST:LogoutApi parameters:@{} success:^(id responseObject) {
-//        [MBProgressHUD hideHUDForView:self.view animated:true];
-//        if (RequestSuccess) {
-//            NSLog(@"success:%@",responseObject);
-//            [XXX_Tabber shareInstance].xxx_barCartBtn.badgeValue = @"0";
-//            [weak_self popAndToLogin];
-//
-//        } else {
-//            NSLog(@"fail:%@",RequestErrorMsg);
-//            [weak_self.view makeToast:RequestErrorMsg];
-//        }
-//    } failure:^(NSError *error) {
-//        [MBProgressHUD hideHUDForView:self.view animated:true];
-//        NSLog(@"err:%@",error);
-//        [weak_self.view makeToast:@"Oh No, Bad Net"];
-//    }];
+    [MBProgressHUD showHUDAddedTo:self.view animated:true];
+    __weak typeof(self) weak_self = self;
+    [ASNetTools.shared postWithPath:postLogOut param:@{} success:^(id _Nonnull json) {
+        [MBProgressHUD hideHUDForView:self.view animated:true];
+        [weak_self popAndToLogin];
+        
+    } faild:^(NSString * _Nonnull code, NSString * _Nonnull msg) {
+        [MBProgressHUD hideHUDForView:self.view animated:true];
+        NSLog(@"err:%@",code);
+        [weak_self.view makeToast:@"Oh No, Bad Net"];
+    }];
     
 }
 
 
 
 
-- (void)popAndToLogin {
-//    [KWLoginedManager.shareInstance clearLoginedUser];
-//    LoginEntranceC * loginVC = [[LoginEntranceC alloc]init];
-//    UINavigationController *navC = [[UINavigationController alloc] initWithRootViewController:loginVC];
-//    navC.modalPresentationStyle = UIModalPresentationFullScreen;
-//    [self.navigationController.viewControllers.firstObject presentViewController:navC animated:YES completion:nil];
-//    [self.navigationController popToRootViewControllerAnimated:false];
-}
+
 
 
 - (void)configSubscrib:(BOOL)is_subscribed {
     NSDictionary *param = @{
-        @"extension_attributes":@{
-            @"is_subscribed":[NSNumber numberWithBool:is_subscribed]
+        @"customer":@{
+            @"email": ASUserInfoManager.shared.userInfo.email,
+            @"firstname": ASUserInfoManager.shared.userInfo.firstname,
+            @"lastname": ASUserInfoManager.shared.userInfo.lastname,
+            @"extension_attributes":@{
+                @"is_subscribed":[NSNumber numberWithBool:is_subscribed]
+            }
         }
     };
-    @weakify(self);
+    __weak typeof(self) weakSelf = self;
     [MBProgressHUD showHUDAddedTo:self.view animated:true];
     [ASNetTools.shared putWithPath:putUserInfo param:param success:^(id _Nonnull json) {
+        [MBProgressHUD hideHUDForView:weakSelf.view animated:true];
         ASUserInfoManager.shared.userInfo.is_subscribed = is_subscribed;
-        [weak_self.tableV reloadData];
+        [weakSelf.tableV reloadData];
     } faild:^(NSString * _Nonnull code, NSString * _Nonnull msg) {
-        [MBProgressHUD hideHUDForView:weak_self.view animated:true];
-        [self.view makeToast:@"请求失败"];
-        [weak_self.tableV reloadData];
+        [MBProgressHUD hideHUDForView:weakSelf.view animated:true];
+        [weakSelf.view makeToast:@"Bad Net"];
+        [weakSelf.tableV reloadData];
+    }];
+
+}
+
+// MARK: - 注销账号
+- (void)showDeleteAccountAlert {
+    __weak typeof(self) weakSelf = self;
+    ASCustomWindow *window = [ASCustomWindow show:@"Are You Sure To Delete Your Account?\n(This action can't be undone. All the data of your account will be delete)" isMast:false upBlock:^{
+    } cancelBlock:^{
+        [weakSelf showDeletedReasonInput];
+        
+    }];
+    window.vc.titleLb.text = @"Delete Account?";
+    [window.vc.sureBt setTitle:@"No" forState:UIControlStateNormal];
+    [window.vc.cancelBt setTitleColor:UIColor.whiteColor forState:UIControlStateNormal];
+    NSMutableAttributedString *attStr = [[NSMutableAttributedString alloc] initWithString:@"Yes"];
+    [attStr setAttributes:@{
+        NSFontAttributeName:[UIFont fontWithName:Rob_Regular size:16],
+        NSUnderlineStyleAttributeName:[NSNumber numberWithInteger:NSUnderlineStyleSingle],
+        NSUnderlineColorAttributeName:[UIColor colorWithHexString:@"#000000"],
+        NSForegroundColorAttributeName:[UIColor colorWithHexString:@"#000000"]
+    } range:NSMakeRange(0, attStr.length)];
+    [window.vc.cancelBt setAttributedTitle:attStr forState:UIControlStateNormal];
+    
+    [window.vc.cancelBt mas_remakeConstraints:^(MASConstraintMaker *make) {
+        make.bottom.equalTo(window.vc.sureBt);
+        make.height.equalTo(@35);
+        make.right.equalTo(window.vc.sureBt.mas_left).offset(-20);
+        make.left.greaterThanOrEqualTo(window.vc.contentV).offset(20);
+    }];
+    
+    
+}
+
+- (void)showDeletedReasonInput {
+    __weak typeof(self) weakSelf = self;
+    [APHomeActiveWindow show:@"Deleted Account" des:@"Dear user, could you tell me the reason for leaving?" sureBlock:^(NSString *reason) {
+        NSString *str = @"";
+        if (!reason.isEmpty) {
+            str = reason;
+        }
+        [weakSelf deleteAccount:str];
+    } cancelBlock:^{
     }];
+}
 
+- (void)deleteAccount:(NSString *)msg {
+//    [MBProgressHUD showHUDAddedTo:self.view animated:true];
+//    @weakify(self);
+//    [PPNetworkHelper POST:DeleteAccount parameters:@{@"deleteReason":msg} success:^(id responseObject) {
+//        [MBProgressHUD hideHUDForView:self.view animated:true];
+//        if (RequestSuccess) {
+//            NSLog(@"success:%@",responseObject);
+//            [XXX_Tabber shareInstance].xxx_barCartBtn.badgeValue = @"0";
+//            [weak_self popAndToLogin];
+//            
+//        } else {
+//            NSLog(@"fail:%@",RequestErrorMsg);
+//            [weak_self.view makeToast:RequestErrorMsg];
+//        }
+//    } failure:^(NSError *error) {
+//        [MBProgressHUD hideHUDForView:self.view animated:true];
+//        NSLog(@"err:%@",error);
+//        [weak_self.view makeToast:@"Oh No, Bad Net"];
+//    }];
 }
 
 @end

+ 16 - 0
Asteria/Fuction/Windows/APHomeActiveViewController.h

@@ -0,0 +1,16 @@
+//
+//  APHomeActiveViewController.h
+//  westkissMob
+//
+//  Created by iOS on 2023/5/26.
+//
+
+#import <UIKit/UIKit.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface APHomeActiveViewController : UIViewController
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 24 - 0
Asteria/Fuction/Windows/APHomeActiveViewController.m

@@ -0,0 +1,24 @@
+//
+//  APHomeActiveViewController.m
+//  westkissMob
+//
+//  Created by iOS on 2023/5/26.
+//
+
+#import "APHomeActiveViewController.h"
+
+@interface APHomeActiveViewController ()
+
+@end
+
+@implementation APHomeActiveViewController
+
+- (void)viewDidLoad {
+    [super viewDidLoad];
+    // Do any additional setup after loading the view.
+    
+}
+
+
+
+@end

+ 19 - 0
Asteria/Fuction/Windows/APHomeActiveWindow.h

@@ -0,0 +1,19 @@
+//
+//  APHomeActiveWindow.h
+//  westkissMob
+//
+//  Created by iOS on 2023/5/26.
+//
+
+#import <UIKit/UIKit.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface APHomeActiveWindow : UIWindow
+
+// 输入框弹窗
++ (APHomeActiveWindow *)show:(NSString *)title des:(NSString *)des sureBlock:(void(^)(NSString*))success cancelBlock:(void(^)(void))cancel;
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 61 - 0
Asteria/Fuction/Windows/APHomeActiveWindow.m

@@ -0,0 +1,61 @@
+//
+//  APHomeActiveWindow.m
+//  westkissMob
+//
+//  Created by iOS on 2023/5/26.
+//
+
+#import "APHomeActiveWindow.h"
+#import "APHomeActiveViewController.h"
+#import "APInputAlertView.h"
+
+
+@interface APHomeActiveWindow ()
+
+@property (nonatomic, strong) APHomeActiveViewController *vc;
+
+
+@end
+
+@implementation APHomeActiveWindow
+
+- (instancetype)initWithFrame:(CGRect)frame {
+    self = [super initWithFrame:frame];
+    if (self) {
+        [self createVc];
+    }
+    return self;
+}
+
+- (void)createVc {
+    self.windowLevel = UIWindowLevelStatusBar + 3;
+    self.vc = [[APHomeActiveViewController alloc] init];
+    self.vc.view.backgroundColor = [UIColor.blackColor colorWithAlphaComponent:0.4];
+    self.rootViewController = self.vc;
+    [self makeKeyAndVisible];
+}
+
+
+
+// 输入框弹窗
++ (APHomeActiveWindow *)show:(NSString *)title des:(NSString *)des sureBlock:(void(^)(NSString*))success cancelBlock:(void(^)(void))cancel {
+    
+    APInputAlertView *contentV = [[APInputAlertView alloc] initWithFrame:CGRectMake(0, 0, KScreenWidth, KScreenHeight)];
+    [contentV setTitle:title des:des];
+   
+    APHomeActiveWindow *w = [[APHomeActiveWindow alloc] initWithFrame:UIScreen.mainScreen.bounds];
+    w.backgroundColor = UIColor.clearColor;
+    ASWindowManager.share.activeW = w;
+    [w.vc.view addSubview:contentV];
+    [contentV mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.bottom.trailing.leading.equalTo(w.vc.view);
+    }];
+    contentV.sureAction = success;
+    contentV.cancelAction = cancel;
+    contentV.closeAction = cancel;
+    
+    return w;
+}
+
+
+@end

+ 22 - 0
Asteria/Fuction/Windows/APInputAlertView.h

@@ -0,0 +1,22 @@
+//
+//  APInputAlertView.h
+//  westkissMob
+//
+//  Created by iOS on 2023/7/28.
+//
+
+#import <UIKit/UIKit.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface APInputAlertView : UIView
+
+@property (nonatomic, copy) void(^sureAction)(NSString *);
+@property (nonatomic, copy) btnClickBlock cancelAction;
+@property (nonatomic, copy) btnClickBlock closeAction;
+
+- (void)setTitle:(NSString *)title des:(NSString *)des;
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 262 - 0
Asteria/Fuction/Windows/APInputAlertView.m

@@ -0,0 +1,262 @@
+//
+//  APInputAlertView.m
+//  westkissMob
+//
+//  Created by iOS on 2023/7/28.
+//
+
+#import "APInputAlertView.h"
+#import "ASWindowManager.h"
+
+@interface APInputAlertView() <UITextViewDelegate>
+
+@property (nonatomic, strong) UILabel *titleLb;
+@property (nonatomic, strong) UIButton *closeBt;
+
+@property (nonatomic, strong) UILabel *contentLb;
+@property (nonatomic, strong) UIView *inputBgV;
+@property (nonatomic, strong) UITextView *inputTv;
+@property (nonatomic, strong) UIButton *sureBt;
+@property (nonatomic, strong) UIButton *cancelBt;
+@property (nonatomic, strong) UILabel *tvPlaceHoldLb;
+
+@property (nonatomic, strong) UILabel *tipLb;
+
+@end
+
+@implementation APInputAlertView
+
+- (void)setTitle:(NSString *)title des:(NSString *)des {
+    self.titleLb.text = title;
+    self.contentLb.text = des;
+}
+
+- (instancetype)initWithFrame:(CGRect)frame {
+    self = [super initWithFrame:frame];
+    if (self) {
+        [self setUI];
+    }
+    return self;
+}
+
+- (void)setUI {
+    self.backgroundColor = UIColor.whiteColor;
+    self.layer.cornerRadius = 16;
+    self.layer.masksToBounds = true;
+    [self addSubview:self.titleLb];
+    [self addSubview:self.closeBt];
+    [self addSubview:self.contentLb];
+    [self addSubview:self.inputBgV];
+    [self addSubview:self.cancelBt];
+    [self addSubview:self.sureBt];
+    [self addSubview:self.tipLb];
+    [self.inputBgV addSubview:self.inputTv];
+    [self.inputBgV addSubview:self.tvPlaceHoldLb];
+    
+    [self.titleLb mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.centerX.equalTo(self);
+        make.top.equalTo(self).offset(16);
+    }];
+    [self.closeBt mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.top.equalTo(self).offset(12);
+        make.trailing.equalTo(self).offset(-12);
+        make.width.height.equalTo(@30);
+        make.leading.equalTo(self.titleLb.mas_trailing).offset(8);
+    }];
+    
+    [self.contentLb mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.top.equalTo(self.titleLb.mas_bottom).offset(16);
+        make.leading.equalTo(self).offset(25);
+        make.trailing.equalTo(self).offset(-25);
+    }];
+    [self.inputBgV mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.top.equalTo(self.contentLb.mas_bottom).offset(16);
+        make.leading.trailing.equalTo(self.contentLb);
+        make.height.equalTo(self.inputBgV.mas_width).multipliedBy(3.0/5);
+    }];
+    [self.inputTv mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.top.leading.equalTo(self.inputBgV).offset(14);
+        make.bottom.trailing.equalTo(self.inputBgV).offset(-14);
+    }];
+    [self.tvPlaceHoldLb mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.top.leading.equalTo(self.inputTv).offset(6);
+        make.trailing.equalTo(self.inputTv).offset(-6);
+        make.bottom.lessThanOrEqualTo(self.inputTv);
+    }];
+    
+    [self.cancelBt mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.trailing.equalTo(self.inputBgV);
+        make.height.equalTo(@45);
+        make.top.equalTo(self.inputBgV.mas_bottom).offset(16);
+        
+    }];
+    
+    [self.sureBt mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.leading.equalTo(self.inputBgV);
+        make.height.width.centerY.equalTo(self.cancelBt);
+        make.trailing.equalTo(self.cancelBt.mas_leading).offset(-20);
+    }];
+    
+    [self.tipLb mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.top.equalTo(self.sureBt.mas_bottom).offset(10);
+        make.leading.trailing.equalTo(self.inputBgV);
+        IPhoneXHeigh;
+        make.bottom.equalTo(self).offset(-securityBottom_H-30);
+    }];
+    
+    
+    
+}
+
+- (UILabel *)tvPlaceHoldLb {
+    if (!_tvPlaceHoldLb) {
+        UILabel *lb = [UILabel new];
+        lb.font = [UIFont fontWithName:Rob_Regular size:14];
+        lb.textColor = Col_999;
+        lb.numberOfLines = 0;
+        lb.text = @"Please Input The Reason For Your Leave";
+        _tvPlaceHoldLb = lb;
+    }
+    return _tvPlaceHoldLb;
+}
+
+- (UIView *)inputBgV {
+    if (!_inputBgV) {
+        UIView *v = [UIView new];
+        v.backgroundColor = _F8F8F8;
+        v.layer.cornerRadius = 5;
+        v.layer.borderWidth = 1;
+        v.layer.borderColor = _D0D0D0.CGColor;
+        v.layer.masksToBounds = true;
+        _inputBgV = v;
+    }
+    return _inputBgV;
+}
+
+- (UITextView *)inputTv {
+    if (!_inputTv) {
+        UITextView *v = [UITextView new];
+        v.backgroundColor = UIColor.clearColor;
+        v.font = [UIFont fontWithName:Rob_Regular size:14];
+        v.textColor = Col_333;
+        v.delegate = self;
+        _inputTv = v;
+    }
+    return _inputTv;
+}
+
+- (UIButton *)closeBt {
+    if (!_closeBt) {
+        UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom];
+        [btn setImage:[UIImage imageNamed:@"productLsit_filter_close"] forState:UIControlStateNormal];
+        [btn addTarget:self action:@selector(closeBtAction) forControlEvents:UIControlEventTouchUpInside];
+        _closeBt = btn;
+    }
+    return _closeBt;
+}
+
+- (UILabel *)contentLb {
+    if (!_contentLb) {
+        UILabel *lb = [[UILabel alloc] init];
+        lb.font = [UIFont fontWithName:Rob_Regular size:14];
+        lb.textColor = [UIColor blackColor];
+        lb.numberOfLines = 0;
+        lb.text = @"A New Version Of West Kiss Upgrade Version 1.1.0 Is Available For Your Phone And Is Ready To Install Now!";
+        lb.textAlignment = NSTextAlignmentCenter;
+        lb.backgroundColor = [UIColor clearColor];
+        lb.qmui_lineHeight = 24;
+        _contentLb = lb;
+    }
+    return _contentLb;
+}
+
+- (UILabel *)tipLb {
+    if (!_tipLb) {
+        UILabel *lb = [[UILabel alloc] init];
+        lb.font = [UIFont fontWithName:Rob_Bold size:14];
+        lb.textColor = [UIColor redColor];
+        lb.numberOfLines = 0;
+        lb.text = @"* Your account will be deleted after submit.";
+        lb.textAlignment = NSTextAlignmentCenter;
+        lb.backgroundColor = [UIColor clearColor];
+        lb.qmui_lineHeight = 24;
+        _tipLb = lb;
+    }
+    return _tipLb;
+}
+
+
+
+- (UILabel *)titleLb {
+    if (!_titleLb) {
+        UILabel *lb = [[UILabel alloc] init];
+        lb.font = [UIFont fontWithName:Rob_Bold size:22];
+        lb.qmui_lineHeight = 24;
+        lb.textColor = [UIColor blackColor];
+        lb.text = @"Deleted Account";
+        lb.textAlignment = NSTextAlignmentCenter;
+        lb.backgroundColor = [UIColor clearColor];
+        _titleLb = lb;
+    }
+    return _titleLb;
+}
+
+- (UIButton *)sureBt {
+    if (!_sureBt) {
+        UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom];
+        btn.backgroundColor = [UIColor blackColor];
+        [btn setTitleColor:UIColor.whiteColor forState:UIControlStateNormal];
+        [btn setTitle:@"Submit" forState:UIControlStateNormal];
+        btn.titleLabel.font = [UIFont fontWithName:Rob_Regular size:16];
+        btn.layer.cornerRadius = 4;
+        btn.layer.masksToBounds = true;
+        [btn addTarget:self action:@selector(sureBtAction) forControlEvents:UIControlEventTouchUpInside];
+        _sureBt = btn;
+    }
+    return _sureBt;
+}
+
+- (UIButton *)cancelBt {
+    if (!_cancelBt) {
+        UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom];
+        btn.backgroundColor = [UIColor whiteColor];
+        [btn setTitleColor:Col_666 forState:UIControlStateNormal];
+        [btn setTitle:@"Cancel" forState:UIControlStateNormal];
+        btn.layer.borderWidth = 1;
+        btn.layer.borderColor = _D0D0D0.CGColor;
+        btn.layer.cornerRadius = 4;
+        btn.layer.masksToBounds = true;
+        btn.titleLabel.font = [UIFont fontWithName:Rob_Regular size:16];
+        [btn addTarget:self action:@selector(cancelBtAction) forControlEvents:UIControlEventTouchUpInside];
+        _cancelBt = btn;
+    }
+    return _cancelBt;
+}
+
+- (void)sureBtAction {
+    if (self.sureAction) {
+        self.sureAction(self.inputTv.text);
+    }
+    ASWindowManager.share.activeW = nil;
+}
+- (void)cancelBtAction {
+    if (self.cancelAction) {
+        self.cancelAction();
+    }
+    ASWindowManager.share.activeW = nil;
+    
+}
+
+- (void)closeBtAction {
+    if (self.closeAction) {
+        self.closeAction();
+    }
+    ASWindowManager.share.activeW = nil;
+}
+
+
+- (void)textViewDidChange:(UITextView *)textView {
+    self.tvPlaceHoldLb.hidden = textView.text.length > 0;
+}
+
+@end

+ 31 - 0
Asteria/Fuction/Windows/ASCustomAlertViewController.h

@@ -0,0 +1,31 @@
+//
+//  ASCustomAlertViewController.h
+//  Asteria
+//
+//  Created by iOS on 2023/12/23.
+//
+
+#import <UIKit/UIKit.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface ASCustomAlertViewController : UIViewController
+
+@property (nonatomic,strong) UIView *contentV;
+@property (nonatomic, strong) UIButton *closeBt;
+@property (nonatomic, strong) UILabel *conetntLb;
+
+@property (nonatomic, strong) UILabel *titleLb;
+@property (nonatomic, strong) UIButton *sureBt;
+@property (nonatomic, strong) UIButton *cancelBt;
+
+
+@property (nonatomic, copy) void(^closeAction)(void);
+@property (nonatomic, copy) void(^sureAction)(void);
+@property (nonatomic, copy) void(^cancelAction)(void);
+
+- (void)setMastStatus:(BOOL)isMast;
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 185 - 0
Asteria/Fuction/Windows/ASCustomAlertViewController.m

@@ -0,0 +1,185 @@
+//
+//  ASCustomAlertViewController.m
+//  Asteria
+//
+//  Created by iOS on 2023/12/23.
+//
+
+#import "ASCustomAlertViewController.h"
+
+@interface ASCustomAlertViewController ()
+
+@property (nonatomic, assign) BOOL isMast;
+
+@end
+
+@implementation ASCustomAlertViewController
+
+- (void)viewDidLoad {
+    [super viewDidLoad];
+    
+    [self configSubV];
+}
+
+- (void)setMastStatus:(BOOL)isMast {
+    _isMast = isMast;
+    self.cancelBt.hidden = isMast;
+    self.closeBt.hidden = isMast;
+}
+
+- (void)configSubV {
+    self.view.backgroundColor = UIColor.clearColor;
+    [self.view addSubview:self.contentV];
+    [self.contentV addSubview:self.closeBt];
+    [self.contentV addSubview:self.conetntLb];
+    [self.contentV addSubview:self.titleLb];
+    [self.contentV addSubview:self.sureBt];
+    [self.contentV addSubview:self.cancelBt];
+    
+    [self.conetntLb setContentHuggingPriority:UILayoutPriorityRequired forAxis:UILayoutConstraintAxisVertical];
+    [self.contentV mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.center.equalTo(self.view);
+        make.width.equalTo(@310);
+        make.height.greaterThanOrEqualTo(@290);
+    }];
+    
+    [self.closeBt mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.width.height.equalTo(@40);
+        make.centerX.equalTo(self.contentV);
+        make.top.equalTo(self.contentV).offset(22);
+    }];
+    [self.titleLb mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.equalTo(self.contentV).offset(18);
+        make.right.equalTo(self.contentV).offset(-18);
+        make.top.equalTo(self.closeBt.mas_bottom).offset(13);
+        make.height.equalTo(@50);
+    }];
+    
+    [self.sureBt mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.centerX.equalTo(self.contentV);
+        make.width.equalTo(@120);
+        make.height.equalTo(@35);
+        make.bottom.equalTo(self.contentV).offset(-30);
+    }];
+    [self.cancelBt mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.bottom.equalTo(self.sureBt);
+        make.height.equalTo(@35);
+        make.left.equalTo(self.sureBt.mas_right).offset(15);
+        make.right.equalTo(self.contentV).offset(-15);
+    }];
+    
+    [self.conetntLb mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.equalTo(self.contentV).offset(18);
+        make.right.equalTo(self.contentV).offset(-18);
+        make.top.equalTo(self.titleLb.mas_bottom).offset(13);
+        make.bottom.greaterThanOrEqualTo(self.sureBt.mas_top).offset(-30);
+    }];
+    
+    
+}
+
+-(UIView *)contentV {
+    if (!_contentV) {
+        UIView * v = [[UIView alloc] init];
+        v.backgroundColor = [UIColor colorWithHexString:@"#FFF5F0"];
+        _contentV = v;
+    }
+    return _contentV;
+}
+
+- (UIButton *)closeBt {
+    if (!_closeBt) {
+        UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom];
+        [btn setImage:[UIImage imageNamed:@"productLsit_filter_close"] forState:UIControlStateNormal];
+        [btn addTarget:self action:@selector(closeBtAction) forControlEvents:UIControlEventTouchUpInside];
+        _closeBt = btn;
+    }
+    return _closeBt;
+}
+
+- (UILabel *)conetntLb {
+    if (!_conetntLb) {
+        UILabel *lb = [[UILabel alloc] init];
+        lb.font = [UIFont fontWithName:Rob_Regular size:14];
+        lb.textColor = [UIColor blackColor];
+        lb.numberOfLines = 0;
+        lb.text = @"A New Version Of West Kiss Upgrade Version 1.1.0 Is Available For Your Phone And Is Ready To Install Now!";
+        lb.textAlignment = NSTextAlignmentCenter;
+        lb.backgroundColor = [UIColor clearColor];
+        lb.qmui_lineHeight = 24;
+        _conetntLb = lb;
+    }
+    return _conetntLb;
+}
+
+- (UILabel *)titleLb {
+    if (!_titleLb) {
+        UILabel *lb = [[UILabel alloc] init];
+        lb.font = [UIFont fontWithName:Rob_Bold size:14];
+        lb.qmui_lineHeight = 24;
+        lb.textColor = [UIColor blackColor];
+        lb.text = @"Update App?";
+        lb.textAlignment = NSTextAlignmentCenter;
+        lb.backgroundColor = [UIColor clearColor];
+        _titleLb = lb;
+    }
+    return _titleLb;
+}
+
+- (UIButton *)sureBt {
+    if (!_sureBt) {
+        UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom];
+        btn.backgroundColor = [UIColor blackColor];
+        [btn setTitleColor:UIColor.whiteColor forState:UIControlStateNormal];
+        [btn setTitle:@"UPDATE NOW" forState:UIControlStateNormal];
+        btn.titleLabel.font = [UIFont fontWithName:Rob_Regular size:16];
+        [btn addTarget:self action:@selector(sureBtAction) forControlEvents:UIControlEventTouchUpInside];
+        _sureBt = btn;
+    }
+    return _sureBt;
+}
+
+- (UIButton *)cancelBt {
+    if (!_cancelBt) {
+        UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom];
+        btn.backgroundColor = [UIColor clearColor];
+        [btn setTitleColor:UIColor.whiteColor forState:UIControlStateNormal];
+        NSMutableAttributedString *attStr = [[NSMutableAttributedString alloc] initWithString:@"LATER"];
+        [attStr setAttributes:@{
+            NSFontAttributeName:[UIFont fontWithName:Rob_Regular size:16],
+            NSUnderlineStyleAttributeName:[NSNumber numberWithInteger:NSUnderlineStyleSingle],
+            NSUnderlineColorAttributeName:[UIColor colorWithHexString:@"#000000"],
+            NSForegroundColorAttributeName:[UIColor colorWithHexString:@"#000000"]
+        } range:NSMakeRange(0, attStr.length)];
+        
+        [btn setAttributedTitle:attStr forState:UIControlStateNormal];
+        [btn addTarget:self action:@selector(cancelBtAction) forControlEvents:UIControlEventTouchUpInside];
+        _cancelBt = btn;
+    }
+    return _cancelBt;
+}
+
+- (void)sureBtAction {
+    if (self.sureAction) {
+        self.sureAction();
+    }
+    if (!_isMast) {
+        ASWindowManager.share.customW = nil;
+    }
+}
+- (void)cancelBtAction {
+    if (self.cancelAction) {
+        self.cancelAction();
+    }
+    ASWindowManager.share.customW = nil;
+}
+
+- (void)closeBtAction {
+    if (self.closeAction) {
+        self.closeAction();
+    }
+    ASWindowManager.share.customW = nil;
+}
+
+
+@end

+ 22 - 0
Asteria/Fuction/Windows/ASCustomWindow.h

@@ -0,0 +1,22 @@
+//
+//  ASCustomWindow.h
+//  Asteria
+//
+//  Created by iOS on 2023/12/23.
+//
+
+#import <UIKit/UIKit.h>
+#import "ASCustomAlertViewController.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface ASCustomWindow : UIWindow
+
+
+@property (nonatomic,strong) ASCustomAlertViewController *vc;
+
++ (ASCustomWindow *)show:(NSString *)version isMast:(BOOL)isMast upBlock:(void(^)(void))success cancelBlock:(void(^)(void))cancel;
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 49 - 0
Asteria/Fuction/Windows/ASCustomWindow.m

@@ -0,0 +1,49 @@
+//
+//  ASCustomWindow.m
+//  Asteria
+//
+//  Created by iOS on 2023/12/23.
+//
+
+#import "ASCustomWindow.h"
+
+
+@implementation ASCustomWindow
+
+
+- (instancetype)initWithFrame:(CGRect)frame {
+    self = [super initWithFrame:frame];
+    if (self) {
+        [self createVc];
+    }
+    return self;
+}
+
+- (void)createVc {
+    self.windowLevel = UIWindowLevelStatusBar + 3;
+    self.vc = [[ASCustomAlertViewController alloc] init];
+    self.rootViewController = self.vc;
+    [self makeKeyAndVisible];
+}
+
++ (ASCustomWindow *)show:(NSString *)version isMast:(BOOL)isMast upBlock:(void(^)(void))success cancelBlock:(void(^)(void))cancel {
+    
+    ASCustomWindow *w = [[ASCustomWindow alloc] initWithFrame:UIScreen.mainScreen.bounds];
+    w.backgroundColor = UIColor.clearColor;
+    ASWindowManager.share.customW = w;
+    w.vc.conetntLb.text = version;
+    [w.vc setMastStatus:isMast];
+    w.vc.sureAction = ^{
+        success();
+    };
+    w.vc.cancelAction = ^{
+        cancel();
+    };
+    w.vc.closeAction = ^{
+        
+    };
+    return w;
+}
+
+
+@end

+ 23 - 0
Asteria/Fuction/Windows/ASWindowManager.h

@@ -0,0 +1,23 @@
+//
+//  ASWindowManager.h
+//  Asteria
+//
+//  Created by iOS on 2023/12/23.
+//
+
+#import <Foundation/Foundation.h>
+#import "ASCustomWindow.h"
+#import "APHomeActiveWindow.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface ASWindowManager : NSObject
+
++ (instancetype)share;
+
+@property (nonatomic, strong) ASCustomWindow * _Nullable customW;
+@property (nonatomic, strong) APHomeActiveWindow *_Nullable activeW;
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 22 - 0
Asteria/Fuction/Windows/ASWindowManager.m

@@ -0,0 +1,22 @@
+//
+//  ASWindowManager.m
+//  Asteria
+//
+//  Created by iOS on 2023/12/23.
+//
+
+#import "ASWindowManager.h"
+
+@implementation ASWindowManager
+
+static  ASWindowManager *singleClass = nil;
+
++ (instancetype)share{
+    static dispatch_once_t onceToken;
+    dispatch_once(&onceToken, ^{
+        singleClass = [[ASWindowManager alloc]init];
+    });
+    return singleClass;
+}
+
+@end

+ 13 - 10
Asteria/NetTools/ASNetApis.h

@@ -8,20 +8,18 @@
 #ifndef ASNetApis_h
 #define ASNetApis_h
 
+
+
 #define BaseRequestrUrl(url) ([NSString stringWithFormat:@"%@%@",@"rest/V1/",url])
 #define BaseWebUrl(url) ([NSString stringWithFormat:@"%@%@",@"rest/V1/",url])
 
 
 // MARK: - host
-//#if (DEBUG)
-//#define HostPath @"pc.bilisar.com"
-#define HostPath @"www.bilisar.com"
-
-//@"www.bilisar.com"
-//@"https://www.bilisar.com/"  //测试
-//#else
-//#define HostPath @"pc.bilisar.com"//@"https://pc.bilisar.com/"  //正式
-//#endif
+#if (DEBUG)
+#define HostPath @"www.bilisar.com"//@"https://www.bilisar.com/"  //测试
+#else
+#define HostPath @"pc.bilisar.com"//@"https://pc.bilisar.com/"  //正式
+#endif
 
 // MARK: - path
 
@@ -36,7 +34,8 @@
 
 // MARK: - 分类列表
 #define getAllCategoriesUrl BaseRequestrUrl(@"rewrite/categories")
-
+// 热词
+#define getHotList BaseRequestrUrl(@"hot/index")
 
 
 // MARK: - userinfo
@@ -48,8 +47,10 @@
 
 // MARK: - 修改用户信息
 #define putUserInfo BaseRequestrUrl(@"customers/me")
+#define putUserPassword BaseRequestrUrl(@"customers/me/password")
 
 //MARK: - 个人中心
+#define postLogOut BaseRequestrUrl(@"integration/customer/revoke-customer-token")
 #define getSignStateUrl BaseRequestrUrl(@"sign/index")
 #define postSignUrl BaseRequestrUrl(@"sign/add")
 
@@ -63,6 +64,8 @@
 
 // MARK: 积分
 #define getPointsDetailUrl BaseRequestrUrl(@"points/index")
+#define getExtraPoints BaseRequestrUrl(@"points/show")
+#define postTakeExtraPoints BaseRequestrUrl(@"points/more")
 
 
 #endif /* ASNetApis_h */

+ 4 - 4
Asteria/NetTools/ASNetTools.m

@@ -314,12 +314,12 @@
 + (void)debugRegist {
     NSDictionary *param = @{
         @"customer": @{
-            @"email": @"abc123456@qq.com",
+            @"email": @"abc123456789@qq.com",
             @"firstname": @"ujrbcf",
             @"lastname": @"serwt",
             @"dob": @"2023/10/20"
         },
-        @"password": @"a123456A",
+        @"password": @"A123456a",
         @"extension_attributes" : @{
             @"is_subscribed": @(true)
         }
@@ -333,8 +333,8 @@
 
 + (void)login {
     NSDictionary *param = @{
-        @"username" :@"abc123456@qq.com",
-        @"password":@"a123456A"
+        @"username" :@"abc123456789@qq.com",
+        @"password":@"A123456a"
     };
     [ASNetTools.shared postWithPath:loginUrl param:param success:^(id _Nonnull result) {
         NSString *token = [NSString stringWithFormat:@"Bearer %@", result];

+ 3 - 0
Asteria/NetTools/ASUserNotifyStatic.h

@@ -8,6 +8,8 @@
 #ifndef ASUserNotifyStatic_h
 #define ASUserNotifyStatic_h
 
+
+
 /// 保存用户选择的货币
 #define UserLocalCur @"UserLocalCur"
 /// 保存用户选择的货币符号
@@ -19,4 +21,5 @@
 #define UserInfoUpdate @"ASUserInfoUpdate"
 
 
+
 #endif /* ASUserNotifyStatic_h */

+ 3 - 2
Asteria/PreFixHeader.h

@@ -8,6 +8,8 @@
 #ifndef PreFixHeader_h
 #define PreFixHeader_h
 
+#import "ASWindowManager.h"
+
 #import "ASNetTools.h"
 #import "ASNetApis.h"
 #import "ASUserInfoManager.h"
@@ -48,7 +50,6 @@
 
 //#import <CTMediator/CTMediator.h>
 
-
-typedef void (^btnClickBlock)(void);
+typedef void(^VoidBlock)(void);
 
 #endif /* PreFixHeader_h */

+ 0 - 2
Asteria/Product/CTMediatoaTargets/CTMediator+Categorys.h

@@ -16,8 +16,6 @@ NS_ASSUME_NONNULL_BEGIN
 
 - (UIViewController *)getSearchVc:(NSDictionary *)params;
 
-- (UIViewController *)getCategoryAndSearchVc:(NSDictionary *)params;
-
 @end
 
 NS_ASSUME_NONNULL_END

+ 0 - 4
Asteria/Product/CTMediatoaTargets/CTMediator+Categorys.m

@@ -21,8 +21,4 @@
 }
 
 
-- (UIViewController *)getCategoryAndSearchVc:(NSDictionary *)params{
-    return [self performTarget:@"Category" action:@"getCategoryAndSearchVc" params:params shouldCacheTarget:NO];
-}
-
 @end

+ 9 - 0
Asteria/Product/CTMediatoaTargets/CTMediator+Home.m

@@ -13,6 +13,15 @@
     return [self performTarget:@"Home" action:@"getHomeVc" params:params shouldCacheTarget:NO];
 }
 
+/**
+    - params:  {
+    "type":typeId,  //String
+ "title":titleStr,//String
+ "searchKey":keyword,//String
+ "secondTime": secondTime,// NSNumber,
+ "pointGetType":pointGetType,//NSNumber
+ }
+ */
 -(UIViewController *)getProductListVc:(NSDictionary *)params{
     return [self performTarget:@"Home" action:@"getProductListVc" params:params shouldCacheTarget:NO];
 }