Commit aaa5b56b authored by zhangguangyi's avatar zhangguangyi

Merge remote-tracking branch 'refs/remotes/origin/master'

Conflicts:
	.DS_Store
parents 7c29df19 1140631a
...@@ -139,17 +139,9 @@ ...@@ -139,17 +139,9 @@
A9C2BA1424D039B500010EAE /* ZJLocationFindViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = A9C2B94824D039B400010EAE /* ZJLocationFindViewCell.m */; }; A9C2BA1424D039B500010EAE /* ZJLocationFindViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = A9C2B94824D039B400010EAE /* ZJLocationFindViewCell.m */; };
A9C2BA1524D039B500010EAE /* ZJLocationFindSearchViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A9C2B94924D039B400010EAE /* ZJLocationFindSearchViewController.m */; }; A9C2BA1524D039B500010EAE /* ZJLocationFindSearchViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A9C2B94924D039B400010EAE /* ZJLocationFindSearchViewController.m */; };
A9C2BA1624D039B500010EAE /* ZJLocationAttentionVC.xib in Resources */ = {isa = PBXBuildFile; fileRef = A9C2B94A24D039B400010EAE /* ZJLocationAttentionVC.xib */; }; A9C2BA1624D039B500010EAE /* ZJLocationAttentionVC.xib in Resources */ = {isa = PBXBuildFile; fileRef = A9C2B94A24D039B400010EAE /* ZJLocationAttentionVC.xib */; };
A9C2BA1724D039B500010EAE /* Goods.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = A9C2B94C24D039B400010EAE /* Goods.storyboard */; };
A9C2BA1824D039B500010EAE /* ZJGoodsStyle2ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A9C2B94E24D039B400010EAE /* ZJGoodsStyle2ViewController.m */; };
A9C2BA1924D039B500010EAE /* ZTPurchaseManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9C2B94F24D039B400010EAE /* ZTPurchaseManager.swift */; }; A9C2BA1924D039B500010EAE /* ZTPurchaseManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9C2B94F24D039B400010EAE /* ZTPurchaseManager.swift */; };
A9C2BA1A24D039B500010EAE /* ZJGoodsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A9C2B95224D039B400010EAE /* ZJGoodsViewController.m */; }; A9C2BA1A24D039B500010EAE /* ZJGoodsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A9C2B95224D039B400010EAE /* ZJGoodsViewController.m */; };
A9C2BA1B24D039B500010EAE /* ZJGoodsModel.m in Sources */ = {isa = PBXBuildFile; fileRef = A9C2B95524D039B400010EAE /* ZJGoodsModel.m */; }; A9C2BA1B24D039B500010EAE /* ZJGoodsModel.m in Sources */ = {isa = PBXBuildFile; fileRef = A9C2B95524D039B400010EAE /* ZJGoodsModel.m */; };
A9C2BA1C24D039B500010EAE /* ZJGoodsStyle2CollectionFooterView.xib in Resources */ = {isa = PBXBuildFile; fileRef = A9C2B95724D039B400010EAE /* ZJGoodsStyle2CollectionFooterView.xib */; };
A9C2BA1D24D039B500010EAE /* ZJGoodsStyle2CollectionFooterView.m in Sources */ = {isa = PBXBuildFile; fileRef = A9C2B95824D039B400010EAE /* ZJGoodsStyle2CollectionFooterView.m */; };
A9C2BA1E24D039B500010EAE /* ZJGoodsStyle2Cell.xib in Resources */ = {isa = PBXBuildFile; fileRef = A9C2B95924D039B400010EAE /* ZJGoodsStyle2Cell.xib */; };
A9C2BA1F24D039B500010EAE /* ZJGoodsStyle2Cell.m in Sources */ = {isa = PBXBuildFile; fileRef = A9C2B95B24D039B400010EAE /* ZJGoodsStyle2Cell.m */; };
A9C2BA2024D039B500010EAE /* ZJGoodsStyle2CollectionHeaderView.m in Sources */ = {isa = PBXBuildFile; fileRef = A9C2B95D24D039B400010EAE /* ZJGoodsStyle2CollectionHeaderView.m */; };
A9C2BA2124D039B500010EAE /* ZJGoodsStyle2CollectionHeaderView.xib in Resources */ = {isa = PBXBuildFile; fileRef = A9C2B95E24D039B400010EAE /* ZJGoodsStyle2CollectionHeaderView.xib */; };
A9C2BA2224D039B500010EAE /* ZJBasetableView.m in Sources */ = {isa = PBXBuildFile; fileRef = A9C2B96324D039B400010EAE /* ZJBasetableView.m */; }; A9C2BA2224D039B500010EAE /* ZJBasetableView.m in Sources */ = {isa = PBXBuildFile; fileRef = A9C2B96324D039B400010EAE /* ZJBasetableView.m */; };
A9C2BA2324D039B500010EAE /* ZJAccountManager.m in Sources */ = {isa = PBXBuildFile; fileRef = A9C2B96624D039B400010EAE /* ZJAccountManager.m */; }; A9C2BA2324D039B500010EAE /* ZJAccountManager.m in Sources */ = {isa = PBXBuildFile; fileRef = A9C2B96624D039B400010EAE /* ZJAccountManager.m */; };
A9C2BA2424D039B500010EAE /* ZJTabBarViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A9C2B96724D039B400010EAE /* ZJTabBarViewController.m */; }; A9C2BA2424D039B500010EAE /* ZJTabBarViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A9C2B96724D039B400010EAE /* ZJTabBarViewController.m */; };
...@@ -457,23 +449,11 @@ ...@@ -457,23 +449,11 @@
A9C2B94824D039B400010EAE /* ZJLocationFindViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ZJLocationFindViewCell.m; sourceTree = "<group>"; }; A9C2B94824D039B400010EAE /* ZJLocationFindViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ZJLocationFindViewCell.m; sourceTree = "<group>"; };
A9C2B94924D039B400010EAE /* ZJLocationFindSearchViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ZJLocationFindSearchViewController.m; sourceTree = "<group>"; }; A9C2B94924D039B400010EAE /* ZJLocationFindSearchViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ZJLocationFindSearchViewController.m; sourceTree = "<group>"; };
A9C2B94A24D039B400010EAE /* ZJLocationAttentionVC.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = ZJLocationAttentionVC.xib; sourceTree = "<group>"; }; A9C2B94A24D039B400010EAE /* ZJLocationAttentionVC.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = ZJLocationAttentionVC.xib; sourceTree = "<group>"; };
A9C2B94C24D039B400010EAE /* Goods.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = Goods.storyboard; sourceTree = "<group>"; };
A9C2B94E24D039B400010EAE /* ZJGoodsStyle2ViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ZJGoodsStyle2ViewController.m; sourceTree = "<group>"; };
A9C2B94F24D039B400010EAE /* ZTPurchaseManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ZTPurchaseManager.swift; sourceTree = "<group>"; }; A9C2B94F24D039B400010EAE /* ZTPurchaseManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ZTPurchaseManager.swift; sourceTree = "<group>"; };
A9C2B95024D039B400010EAE /* ZJGoodsViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ZJGoodsViewController.h; sourceTree = "<group>"; }; A9C2B95024D039B400010EAE /* ZJGoodsViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ZJGoodsViewController.h; sourceTree = "<group>"; };
A9C2B95124D039B400010EAE /* ZJGoodsStyle2ViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ZJGoodsStyle2ViewController.h; sourceTree = "<group>"; };
A9C2B95224D039B400010EAE /* ZJGoodsViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ZJGoodsViewController.m; sourceTree = "<group>"; }; A9C2B95224D039B400010EAE /* ZJGoodsViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ZJGoodsViewController.m; sourceTree = "<group>"; };
A9C2B95424D039B400010EAE /* ZJGoodsModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ZJGoodsModel.h; sourceTree = "<group>"; }; A9C2B95424D039B400010EAE /* ZJGoodsModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ZJGoodsModel.h; sourceTree = "<group>"; };
A9C2B95524D039B400010EAE /* ZJGoodsModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ZJGoodsModel.m; sourceTree = "<group>"; }; A9C2B95524D039B400010EAE /* ZJGoodsModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ZJGoodsModel.m; sourceTree = "<group>"; };
A9C2B95724D039B400010EAE /* ZJGoodsStyle2CollectionFooterView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = ZJGoodsStyle2CollectionFooterView.xib; sourceTree = "<group>"; };
A9C2B95824D039B400010EAE /* ZJGoodsStyle2CollectionFooterView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ZJGoodsStyle2CollectionFooterView.m; sourceTree = "<group>"; };
A9C2B95924D039B400010EAE /* ZJGoodsStyle2Cell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = ZJGoodsStyle2Cell.xib; sourceTree = "<group>"; };
A9C2B95A24D039B400010EAE /* ZJGoodsStyle2CollectionHeaderView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ZJGoodsStyle2CollectionHeaderView.h; sourceTree = "<group>"; };
A9C2B95B24D039B400010EAE /* ZJGoodsStyle2Cell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ZJGoodsStyle2Cell.m; sourceTree = "<group>"; };
A9C2B95C24D039B400010EAE /* ZJGoodsStyle2CollectionFooterView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ZJGoodsStyle2CollectionFooterView.h; sourceTree = "<group>"; };
A9C2B95D24D039B400010EAE /* ZJGoodsStyle2CollectionHeaderView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ZJGoodsStyle2CollectionHeaderView.m; sourceTree = "<group>"; };
A9C2B95E24D039B400010EAE /* ZJGoodsStyle2CollectionHeaderView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = ZJGoodsStyle2CollectionHeaderView.xib; sourceTree = "<group>"; };
A9C2B95F24D039B400010EAE /* ZJGoodsStyle2Cell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ZJGoodsStyle2Cell.h; sourceTree = "<group>"; };
A9C2B96224D039B400010EAE /* ZJTabBarViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ZJTabBarViewController.h; sourceTree = "<group>"; }; A9C2B96224D039B400010EAE /* ZJTabBarViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ZJTabBarViewController.h; sourceTree = "<group>"; };
A9C2B96324D039B400010EAE /* ZJBasetableView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ZJBasetableView.m; sourceTree = "<group>"; }; A9C2B96324D039B400010EAE /* ZJBasetableView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ZJBasetableView.m; sourceTree = "<group>"; };
A9C2B96424D039B400010EAE /* ZJNavViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ZJNavViewController.h; sourceTree = "<group>"; }; A9C2B96424D039B400010EAE /* ZJNavViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ZJNavViewController.h; sourceTree = "<group>"; };
...@@ -984,8 +964,8 @@ ...@@ -984,8 +964,8 @@
A9C2B8D624D039B400010EAE /* ZJJinJiViewController.m */, A9C2B8D624D039B400010EAE /* ZJJinJiViewController.m */,
A9C2B8D524D039B400010EAE /* ZJXiaoXiViewController.h */, A9C2B8D524D039B400010EAE /* ZJXiaoXiViewController.h */,
A9C2B8D124D039B400010EAE /* ZJXiaoXiViewController.m */, A9C2B8D124D039B400010EAE /* ZJXiaoXiViewController.m */,
A9C2B8D424D039B400010EAE /* ZJTianJiaViewController.m */,
A9C2B8DA24D039B400010EAE /* ZJTianJiaViewController.h */, A9C2B8DA24D039B400010EAE /* ZJTianJiaViewController.h */,
A9C2B8D424D039B400010EAE /* ZJTianJiaViewController.m */,
); );
path = Controller; path = Controller;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -1202,7 +1182,6 @@ ...@@ -1202,7 +1182,6 @@
A9C2B94B24D039B400010EAE /* Goods */ = { A9C2B94B24D039B400010EAE /* Goods */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
A9C2B94C24D039B400010EAE /* Goods.storyboard */,
A9C2B94D24D039B400010EAE /* Controller */, A9C2B94D24D039B400010EAE /* Controller */,
A9C2B95324D039B400010EAE /* Model */, A9C2B95324D039B400010EAE /* Model */,
A9C2B95624D039B400010EAE /* View */, A9C2B95624D039B400010EAE /* View */,
...@@ -1213,10 +1192,8 @@ ...@@ -1213,10 +1192,8 @@
A9C2B94D24D039B400010EAE /* Controller */ = { A9C2B94D24D039B400010EAE /* Controller */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
A9C2B94E24D039B400010EAE /* ZJGoodsStyle2ViewController.m */,
A9C2B94F24D039B400010EAE /* ZTPurchaseManager.swift */, A9C2B94F24D039B400010EAE /* ZTPurchaseManager.swift */,
A9C2B95024D039B400010EAE /* ZJGoodsViewController.h */, A9C2B95024D039B400010EAE /* ZJGoodsViewController.h */,
A9C2B95124D039B400010EAE /* ZJGoodsStyle2ViewController.h */,
A9C2B95224D039B400010EAE /* ZJGoodsViewController.m */, A9C2B95224D039B400010EAE /* ZJGoodsViewController.m */,
); );
path = Controller; path = Controller;
...@@ -1234,15 +1211,6 @@ ...@@ -1234,15 +1211,6 @@
A9C2B95624D039B400010EAE /* View */ = { A9C2B95624D039B400010EAE /* View */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
A9C2B95724D039B400010EAE /* ZJGoodsStyle2CollectionFooterView.xib */,
A9C2B95824D039B400010EAE /* ZJGoodsStyle2CollectionFooterView.m */,
A9C2B95924D039B400010EAE /* ZJGoodsStyle2Cell.xib */,
A9C2B95A24D039B400010EAE /* ZJGoodsStyle2CollectionHeaderView.h */,
A9C2B95B24D039B400010EAE /* ZJGoodsStyle2Cell.m */,
A9C2B95C24D039B400010EAE /* ZJGoodsStyle2CollectionFooterView.h */,
A9C2B95D24D039B400010EAE /* ZJGoodsStyle2CollectionHeaderView.m */,
A9C2B95E24D039B400010EAE /* ZJGoodsStyle2CollectionHeaderView.xib */,
A9C2B95F24D039B400010EAE /* ZJGoodsStyle2Cell.h */,
); );
path = View; path = View;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -1552,7 +1520,6 @@ ...@@ -1552,7 +1520,6 @@
A9C2BA3924D039B500010EAE /* Assets.xcassets in Resources */, A9C2BA3924D039B500010EAE /* Assets.xcassets in Resources */,
BF1C129924D1514F0000DB41 /* ZJReminderFooterView.xib in Resources */, BF1C129924D1514F0000DB41 /* ZJReminderFooterView.xib in Resources */,
A9C2B9F324D039B500010EAE /* ZJUserTrackTimeView.xib in Resources */, A9C2B9F324D039B500010EAE /* ZJUserTrackTimeView.xib in Resources */,
A9C2BA1C24D039B500010EAE /* ZJGoodsStyle2CollectionFooterView.xib in Resources */,
A9C2BA4C24D0466800010EAE /* Guard.storyboard in Resources */, A9C2BA4C24D0466800010EAE /* Guard.storyboard in Resources */,
A9C2B9D524D039B500010EAE /* MBProgressHUD.bundle in Resources */, A9C2B9D524D039B500010EAE /* MBProgressHUD.bundle in Resources */,
BF3A68D324D1689E00977895 /* ZJAddReminderController.xib in Resources */, BF3A68D324D1689E00977895 /* ZJAddReminderController.xib in Resources */,
...@@ -1564,7 +1531,6 @@ ...@@ -1564,7 +1531,6 @@
BF1C129424D14A3F0000DB41 /* ZJReminderCateAddCell.xib in Resources */, BF1C129424D14A3F0000DB41 /* ZJReminderCateAddCell.xib in Resources */,
A9C2B9F724D039B500010EAE /* ZJFriendListTableViewCell.xib in Resources */, A9C2B9F724D039B500010EAE /* ZJFriendListTableViewCell.xib in Resources */,
A9C2BA0C24D039B500010EAE /* Location.storyboard in Resources */, A9C2BA0C24D039B500010EAE /* Location.storyboard in Resources */,
A9C2BA1724D039B500010EAE /* Goods.storyboard in Resources */,
A94EE52B24D2A2180046038D /* ZJCoulometricRemindCell.xib in Resources */, A94EE52B24D2A2180046038D /* ZJCoulometricRemindCell.xib in Resources */,
A95A97B124D1132A0035A684 /* ZJGuardCell.xib in Resources */, A95A97B124D1132A0035A684 /* ZJGuardCell.xib in Resources */,
A9C2B9A224D039B400010EAE /* LaunchScreenPlaceHolderView.xib in Resources */, A9C2B9A224D039B400010EAE /* LaunchScreenPlaceHolderView.xib in Resources */,
...@@ -1572,10 +1538,8 @@ ...@@ -1572,10 +1538,8 @@
A9C2BA5424D0470200010EAE /* ZJGuardCollectionHeaderView.xib in Resources */, A9C2BA5424D0470200010EAE /* ZJGuardCollectionHeaderView.xib in Resources */,
A9C2B9E824D039B500010EAE /* ZJAlertView.xib in Resources */, A9C2B9E824D039B500010EAE /* ZJAlertView.xib in Resources */,
A9C2B9E724D039B500010EAE /* ZJLocationVC.xib in Resources */, A9C2B9E724D039B500010EAE /* ZJLocationVC.xib in Resources */,
A9C2BA2124D039B500010EAE /* ZJGoodsStyle2CollectionHeaderView.xib in Resources */,
A9C2BA0824D039B500010EAE /* ZJLocationAttentionView.xib in Resources */, A9C2BA0824D039B500010EAE /* ZJLocationAttentionView.xib in Resources */,
A96793A024D1C46E00B6C5FA /* ZJSystemMessageCell.xib in Resources */, A96793A024D1C46E00B6C5FA /* ZJSystemMessageCell.xib in Resources */,
A9C2BA1E24D039B500010EAE /* ZJGoodsStyle2Cell.xib in Resources */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
...@@ -1697,7 +1661,6 @@ ...@@ -1697,7 +1661,6 @@
A967939F24D1C46E00B6C5FA /* ZJSystemMessageCell.m in Sources */, A967939F24D1C46E00B6C5FA /* ZJSystemMessageCell.m in Sources */,
A9C2B9F424D039B500010EAE /* ZJFriendListTableViewCell.m in Sources */, A9C2B9F424D039B500010EAE /* ZJFriendListTableViewCell.m in Sources */,
A9C2B9E924D039B500010EAE /* ZJAlertView.swift in Sources */, A9C2B9E924D039B500010EAE /* ZJAlertView.swift in Sources */,
A9C2BA1F24D039B500010EAE /* ZJGoodsStyle2Cell.m in Sources */,
A9C2B99F24D039B400010EAE /* ZJGuideConfig.m in Sources */, A9C2B99F24D039B400010EAE /* ZJGuideConfig.m in Sources */,
A9C2BA1924D039B500010EAE /* ZTPurchaseManager.swift in Sources */, A9C2BA1924D039B500010EAE /* ZTPurchaseManager.swift in Sources */,
A9C2B9A824D039B400010EAE /* YCShadowView.m in Sources */, A9C2B9A824D039B400010EAE /* YCShadowView.m in Sources */,
...@@ -1770,12 +1733,10 @@ ...@@ -1770,12 +1733,10 @@
A9C2B9B424D039B500010EAE /* DESTool.m in Sources */, A9C2B9B424D039B500010EAE /* DESTool.m in Sources */,
A9C2B9F824D039B500010EAE /* ZJEmergencyContactViewController.m in Sources */, A9C2B9F824D039B500010EAE /* ZJEmergencyContactViewController.m in Sources */,
A9C2BA2524D039B500010EAE /* ZJNavViewController.m in Sources */, A9C2BA2524D039B500010EAE /* ZJNavViewController.m in Sources */,
A9C2BA1824D039B500010EAE /* ZJGoodsStyle2ViewController.m in Sources */,
A9C2BA0124D039B500010EAE /* ZJAddEmergencyContactView.m in Sources */, A9C2BA0124D039B500010EAE /* ZJAddEmergencyContactView.m in Sources */,
BFCEA5A024D115950010B2F0 /* GYEmptyView.m in Sources */, BFCEA5A024D115950010B2F0 /* GYEmptyView.m in Sources */,
A9C2BA3F24D039B500010EAE /* AppDelegate.m in Sources */, A9C2BA3F24D039B500010EAE /* AppDelegate.m in Sources */,
A9C2B9AE24D039B400010EAE /* ProgressView.m in Sources */, A9C2B9AE24D039B400010EAE /* ProgressView.m in Sources */,
A9C2BA1D24D039B500010EAE /* ZJGoodsStyle2CollectionFooterView.m in Sources */,
A9C2B9B024D039B400010EAE /* UITableViewCell+Category.m in Sources */, A9C2B9B024D039B400010EAE /* UITableViewCell+Category.m in Sources */,
BF1C128E24D144D40000DB41 /* ZJReminderCateAddController.m in Sources */, BF1C128E24D144D40000DB41 /* ZJReminderCateAddController.m in Sources */,
A9C2B9A124D039B400010EAE /* LaunchScreenPlaceHolderView.m in Sources */, A9C2B9A124D039B400010EAE /* LaunchScreenPlaceHolderView.m in Sources */,
...@@ -1788,7 +1749,6 @@ ...@@ -1788,7 +1749,6 @@
A9C2BA2D24D039B500010EAE /* BaseTableViewController.m in Sources */, A9C2BA2D24D039B500010EAE /* BaseTableViewController.m in Sources */,
A9C2BA3224D039B500010EAE /* APPTabBar.swift in Sources */, A9C2BA3224D039B500010EAE /* APPTabBar.swift in Sources */,
A9C2B9EB24D039B500010EAE /* ZJFriendTrackMapViewController.m in Sources */, A9C2B9EB24D039B500010EAE /* ZJFriendTrackMapViewController.m in Sources */,
A9C2BA2024D039B500010EAE /* ZJGoodsStyle2CollectionHeaderView.m in Sources */,
A9C2BA2924D039B500010EAE /* Protocol.m in Sources */, A9C2BA2924D039B500010EAE /* Protocol.m in Sources */,
A9C2BA3324D039B500010EAE /* BaseNavigationViewController.m in Sources */, A9C2BA3324D039B500010EAE /* BaseNavigationViewController.m in Sources */,
A9C2B9F924D039B500010EAE /* ZJSelectEmergencyPersonVC.m in Sources */, A9C2B9F924D039B500010EAE /* ZJSelectEmergencyPersonVC.m in Sources */,
......
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
[AMapServices sharedServices].apiKey = @"501f8a894329f4b57bbfee208a11676f"; [AMapServices sharedServices].apiKey = @"501f8a894329f4b57bbfee208a11676f";
[UMConfigure initWithAppkey:@"5f02fdef167edd8d94000012" channel:nil]; [UMConfigure initWithAppkey:@"5f2291bcb4b08b653e8fd2a2" channel:nil];
[MobClick event:@"app_start"]; [MobClick event:@"app_start"];
BuglyConfig * config = [[BuglyConfig alloc] init]; BuglyConfig * config = [[BuglyConfig alloc] init];
...@@ -60,7 +60,9 @@ ...@@ -60,7 +60,9 @@
[data InitPlist]; [data InitPlist];
[KeychainItemManager ReadUUIDAndNickName]; [KeychainItemManager ReadUUIDAndNickName];
[ZTPurchaseManager launchWithSwiftyStoreKit]; [ZTPurchaseManager launchWithSwiftyStoreKitWithSuccess:^{
}];
//创蓝 //创蓝
[ZJOauthLoginManager initWithShanYanAppID:ShanYanAppID]; [ZJOauthLoginManager initWithShanYanAppID:ShanYanAppID];
......
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "矢量智能对象@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "矢量智能对象@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "select_pet_icon@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"filename" : "selected.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "selected@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "selected@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"filename" : "un_selected.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "un_selected@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "un_selected@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "select_briefcase_icon@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "select_activity_icon@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "select_water_icon@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "select_gift_icon@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "select_flight_icon@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "select_punch_icon@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "select_cake_icon@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "select_fitness_icon@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "select_fruit_icon@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "select_money_icon@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "select_drug_icon@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "select_vegetables_icon@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "select_eat_icon@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "select_game_icon@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "select_bed_icon@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
...@@ -5,12 +5,12 @@ ...@@ -5,12 +5,12 @@
"scale" : "1x" "scale" : "1x"
}, },
{ {
"filename" : "迹录1@2x.png", "filename" : "1211596276017_.pic.jpg",
"idiom" : "universal", "idiom" : "universal",
"scale" : "2x" "scale" : "2x"
}, },
{ {
"filename" : "迹录1@3x.png", "filename" : "1181596275942_.pic.jpg",
"idiom" : "universal", "idiom" : "universal",
"scale" : "3x" "scale" : "3x"
} }
......
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "搜索@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "搜索@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "map_card_change_friend_icon_down@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "map_card_change_friend_icon_down@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "矢量智能对象@2x(5).png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "矢量智能对象@3x(5).png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "矢量智能对象@2x(2).png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "矢量智能对象@3x(2).png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "矢量智能对象@2x(7).png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "矢量智能对象@3x(7).png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "矢量智能对象@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "矢量智能对象@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "矢量智能对象@2x(4).png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "矢量智能对象@3x(4).png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "矢量智能对象@2x(1).png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "矢量智能对象@3x(1).png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "矢量智能对象@2x(6).png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "矢量智能对象@3x(6).png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
...@@ -255,7 +255,8 @@ ...@@ -255,7 +255,8 @@
} }
- (void)showFriendSet:(ZJFriendModel *)model { - (void)showFriendSet:(ZJFriendModel *)model {
[MobClick event:@"addfriends_show_unlock_dialog"];
__weak typeof(self) weakSelf = self; __weak typeof(self) weakSelf = self;
friend = [[ZJFriendSettingView alloc] init]; friend = [[ZJFriendSettingView alloc] init];
......
...@@ -400,6 +400,7 @@ ...@@ -400,6 +400,7 @@
} }
- (void)myTrack{ - (void)myTrack{
[MobClick event:@"home_mycard_click"];
ZJFriendTrackMapViewController *trackMapVc = [[ZJFriendTrackMapViewController alloc] init]; ZJFriendTrackMapViewController *trackMapVc = [[ZJFriendTrackMapViewController alloc] init];
trackMapVc.isMyTrack = YES; trackMapVc.isMyTrack = YES;
[self.navigationController showViewController:trackMapVc sender:nil]; [self.navigationController showViewController:trackMapVc sender:nil];
......
...@@ -99,6 +99,7 @@ ...@@ -99,6 +99,7 @@
NSLog(@"添加关心的人"); NSLog(@"添加关心的人");
[self logCollection]; [self logCollection];
[MobClick event:@"home_addfriend_click"]; [MobClick event:@"home_addfriend_click"];
[MobClick event:@"add_person"];
ZJTianJiaViewController *tianJiaVC = [[ZJTianJiaViewController alloc] init]; ZJTianJiaViewController *tianJiaVC = [[ZJTianJiaViewController alloc] init];
[self.navigationController pushViewController:tianJiaVC animated:YES]; [self.navigationController pushViewController:tianJiaVC animated:YES];
} }
......
...@@ -117,6 +117,7 @@ ...@@ -117,6 +117,7 @@
#pragma mark 发送信息给所有紧急联系人 #pragma mark 发送信息给所有紧急联系人
- (void)sendAllEmergencyContact{ - (void)sendAllEmergencyContact{
[MobClick event:@"alert"];
if (![ZJUserInfoManager shared].isLogin) { if (![ZJUserInfoManager shared].isLogin) {
// [MBProgressHUD showMessage:@"请先进行登录"]; // [MBProgressHUD showMessage:@"请先进行登录"];
ZJOauthLoginConfig * config = [[ZJOauthLoginConfig alloc] initWithCurrentVC:self]; ZJOauthLoginConfig * config = [[ZJOauthLoginConfig alloc] initWithCurrentVC:self];
......
...@@ -273,21 +273,34 @@ ...@@ -273,21 +273,34 @@
[self.xuanZheButoon addTarget:self action:@selector(xuanZheButoonClick:) forControlEvents:UIControlEventTouchUpInside]; [self.xuanZheButoon addTarget:self action:@selector(xuanZheButoonClick:) forControlEvents:UIControlEventTouchUpInside];
UILabel * lab = [UILabel labelWithtext:@"购买前请先阅读并同意" font:[UIFont systemFontOfSize:KFont(13)] textColor:[UIColor colorWithHex:0x666666] alignment:NSTextAlignmentLeft];
[lab sizeToFit];
lab.userInteractionEnabled = YES;
[self.beiJingView addSubview:lab];
[lab mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(self.xuanZheButoon.mas_right).mas_offset(KScaleWidth(5));
make.centerY.equalTo(self.xuanZheButoon).mas_offset(KScaleWidth(0));
make.size.mas_equalTo(lab.size);
}];
UITapGestureRecognizer * tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(protocolTextGesTap)];
[lab addGestureRecognizer:tap];
//同意Button //同意Button
self.tongYButton = [UIButton buttonWithType:UIButtonTypeCustom]; self.tongYButton = [UIButton buttonWithType:UIButtonTypeCustom];
// self.tongYButton.backgroundColor = [UIColor redColor]; // self.tongYButton.backgroundColor = [UIColor redColor];
self.tongYButton.contentHorizontalAlignment = UIControlContentHorizontalAlignmentLeft; self.tongYButton.contentHorizontalAlignment = UIControlContentHorizontalAlignmentLeft;
[self.tongYButton setTitle:@"购买前请先阅读并同意《海豚守护付费会员服务协议》" forState:0]; [self.tongYButton setTitle:@"《海豚守护付费会员服务协议》" forState:0];
[self.tongYButton setTitleColor:[UIColor colorWithHex:0x666666] forState:UIControlStateNormal]; [self.tongYButton setTitleColor:kColorWithRGB(86, 142, 252) forState:UIControlStateNormal];
[self.tongYButton.titleLabel setFont:[UIFont systemFontOfSize:KFont(13)]]; [self.tongYButton.titleLabel setFont:[UIFont systemFontOfSize:KFont(13)]];
self.tongYButton.titleLabel.adjustsFontSizeToFitWidth = YES;
[self.beiJingView addSubview:self.tongYButton]; [self.beiJingView addSubview:self.tongYButton];
[self.tongYButton mas_makeConstraints:^(MASConstraintMaker *make) { [self.tongYButton mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(self.xuanZheButoon.mas_right).mas_offset(KScaleWidth(5)); make.left.equalTo(lab.mas_right).mas_offset(KScaleWidth(0));
make.centerY.equalTo(self.xuanZheButoon).mas_offset(KScaleWidth(0)); make.centerY.equalTo(self.xuanZheButoon).mas_offset(KScaleWidth(0));
make.size.mas_offset(CGSizeMake(KScaleWidth(300), KScaleWidth(12.5))); make.size.mas_offset(CGSizeMake(KScaleWidth(200), KScaleWidth(12.5)));
}]; }];
// [self.tongYButton addTarget:self action:@selector(tongYButtonClick) forControlEvents:UIControlEventTouchUpInside]; [self.tongYButton addTarget:self action:@selector(protocolButoonClick:) forControlEvents:UIControlEventTouchUpInside];
} }
- (void)fanHuiButtonClick{ - (void)fanHuiButtonClick{
...@@ -315,6 +328,7 @@ ...@@ -315,6 +328,7 @@
[MBProgressHUD showError:@"获取产品信息失败"]; [MBProgressHUD showError:@"获取产品信息失败"];
return; return;
} }
// dolphinsguard_lifetime_vip
[ZTPurchaseManager purchaseWithProductIdWithProductId:productId inView:self.view success:^{ [ZTPurchaseManager purchaseWithProductIdWithProductId:productId inView:self.view success:^{
if (self.payFinish) { if (self.payFinish) {
...@@ -381,10 +395,22 @@ ...@@ -381,10 +395,22 @@
} }
} }
- (void)protocolTextGesTap{
[self xuanZheButoonClick:nil];
}
- (void)xuanZheButoonClick:(UIButton *)btn{ - (void)xuanZheButoonClick:(UIButton *)btn{
btn = self.xuanZheButoon;
btn.selected = !btn.selected; btn.selected = !btn.selected;
} }
- (void)protocolButoonClick:(UIButton *)btn{
NSDictionary * dic = [ZJUserInfoManager shared].h5_url;
BaseWebViewController * web = [[BaseWebViewController alloc] init];
web.url = [dic objectForKey:@"pay"];
[self.navigationController pushViewController:web animated:YES];
}
-(void)getIpaList { -(void)getIpaList {
__weak typeof(self) weakSelf = self; __weak typeof(self) weakSelf = self;
[[TQNetworkTools shared]getWithAction:PaymentConfiguration parameters:@{} success:^(id _Nonnull response) { [[TQNetworkTools shared]getWithAction:PaymentConfiguration parameters:@{} success:^(id _Nonnull response) {
......
...@@ -18,68 +18,122 @@ class ZTPurchaseManager: NSObject { ...@@ -18,68 +18,122 @@ class ZTPurchaseManager: NSObject {
print(productIdentifier) print(productIdentifier)
let hud = MBProgressHUD.showAdded(to: inView, animated: true) let hud = MBProgressHUD.showAdded(to: inView, animated: true)
SwiftyStoreKit.purchaseProduct(productId, quantity: 1, atomically: false) { result in SwiftyStoreKit.purchaseProduct(productId, quantity: 1, atomically: true) { result in
hud.hide(animated: true)
switch result { switch result {
case .success(let product): case .success(let product):
print("Purchase Success: \(product.productId)") print("Purchase Success: \(product.productId)")
let appleValidator = AppleReceiptValidator(service: .production, sharedSecret: "9df507ede6a048a6989d26e6211a40c0")
let hud = MBProgressHUD.showAdded(to: inView, animated: true)
SwiftyStoreKit.verifyReceipt(using: appleValidator) { result in
hud.hide(animated: true)
if case .success(let receipt) = result {
let purchaseResult = SwiftyStoreKit.verifySubscription(
ofType: .autoRenewable,
productId: productId,
inReceipt: receipt)
switch purchaseResult {
case .purchased(let expiryDate, _):
print("Product is valid until \(expiryDate)")
let dateFormatter = DateFormatter()
dateFormatter.dateFormat = "yyyy-MM-dd HH:mm"
let dateStr = dateFormatter.string(from: expiryDate)
UserDefaults.standard.set(dateStr, forKey: "expiryDate")
if product.needsFinishTransaction {
SwiftyStoreKit.finishTransaction(product.transaction)
}
// success()
case .expired(let expiryDate, _):
MBProgressHUD.showError(NSLocalizedString("ProductIsExpired", comment: "产品已过期"), to: inView)
print("Product is expired since \(expiryDate)")
case .notPurchased:
print("This product has never been purchased")
}
} else {
// receipt verification error
}
}
let receiptData = SwiftyStoreKit.localReceiptData let receiptData = SwiftyStoreKit.localReceiptData
let receiptString = receiptData?.base64EncodedString(options: []) ?? "" let receiptString = receiptData?.base64EncodedString(options: []) ?? ""
print("receiptString: \(receiptString)") print("receiptString: \(receiptString)")
hud.hide(animated: true)
/* /*
receipt_data:这个不解释了 大家都懂 不传的话 服务器根本没法校验 receipt_data:不传的话 服务器根本没法校验
product_id:这个也不用解释 内购产品编号 你不传的话 服务器不知道你买的哪个订单 product_id:这个也不用解释 内购产品编号 你不传的话 服务器不知道你买的哪个订单
transaction_id:这个是交易编号 transaction_id:这个是交易编号
*/ */
// 需要验证 // 需要验证
if product.needsFinishTransaction { let dict = ["productId": product.productId, "transactionId" : (product.transaction.transactionIdentifier ?? ""), "receiptData" : receiptString]
print("productId transactionId receiptData: \(dict)")
let dict = ["productId": product.productId, "transactionId" : (product.transaction.transactionIdentifier ?? ""), "receiptData" : receiptString] print("localizedPrice: \(product.product.localizedPrice ?? ""), price: \(product.product.price), priceLocale: \(product.product.priceLocale.currencyCode)")
print("productId transactionId receiptData: \(dict)") // TODO: 服务器验证
// TODO: 服务器验证 let innerHud = MBProgressHUD.showAdded(to: inView, animated: true)
let innerHud = MBProgressHUD.showAdded(to: inView, animated: true) TQNetworkTools.shared().post(withBodyAction: iosIPAVerifyReceipt,
TQNetworkTools.shared().post(withBodyAction: iosIPAVerifyReceipt, parameters: [:], body: dict, success: { (data) in parameters: [
innerHud.hide(animated: true) "price" : product.product.price,
print("success----iosIPAVerifyReceipt-----------------\(data)------") "priceLocale" : product.product.priceLocale.currencyCode ?? ""],
if let dict = data as? [String:Any] { body: dict, success: { (data) in
if let result = dict["result"] as? [String:Any] { innerHud.hide(animated: true)
if let data = result["data"] as? [String:Any] {
if let status = data["status"] as? Bool { print("success----iosIPAVerifyReceipt-----------------\(data)------")
if status { if let dict = data as? [String:Any] {
if product.needsFinishTransaction { if let result = dict["result"] as? [String:Any] {
SwiftyStoreKit.finishTransaction(product.transaction) if let data = result["data"] as? [String:Any] {
} print("SwiftyStoreKit---1-\(data)")
print("Purchase Success: \(product.productId)") if let status = data["status"] as? Bool {
success() print("SwiftyStoreKit--2--\(status)")
if status {
print("SwiftyStoreKit--3--\(status)")
if product.needsFinishTransaction {
SwiftyStoreKit.finishTransaction(product.transaction)
} }
print("Purchase Success: \(product.productId)")
success()
} else {
MBProgressHUD.showError(NSLocalizedString("UnknownError", comment: "未知错误,请稍后再试"))
} }
}else {
MBProgressHUD.showError(NSLocalizedString("UnknownError", comment: "未知错误,请稍后再试"))
} }
}else {
MBProgressHUD.showError(NSLocalizedString("UnknownError", comment: "未知错误,请稍后再试"))
} }
}else {
MBProgressHUD.showError(NSLocalizedString("UnknownError", comment: "未知错误,请稍后再试"))
} }
}) { (error) in }else {
innerHud.hide(animated: true) MBProgressHUD.showError(NSLocalizedString("UnknownError", comment: "未知错误,请稍后再试"))
// print("\(error)")
faliure();
} }
} else { }) { (error) in
success() innerHud.hide(animated: true)
faliure();
} }
case .error(let error): case .error(let error):
faliure(); faliure();
hud.hide(animated: true); hud.hide(animated: true);
switch error.code { switch error.code {
case .unknown: case .unknown:
print("Unknown error. Please contact support") print("Unknown Error. Please contact support")
MBProgressHUD.showError("未知错误,请联系客服") MBProgressHUD.showError(NSLocalizedString("ConnectToiTunesStoreFail", comment: "无法连接到 iTunes Store, 请稍后再试")) //"无法连接到 iTunes Store, 请稍后再试")ConnectToiTunesStoreFail
case .paymentCancelled:
MBProgressHUD.showError(NSLocalizedString("CancelledThePurchase", comment: "您已取消购买")) // "您已取消购买")CancelledThePurchase
case .paymentInvalid:
MBProgressHUD.showError(NSLocalizedString("TryAgainLater", comment: "无法购买, 请稍后重试"))//"无法购买, 请稍后重试")
print("The purchase identifier was invalid")
case .clientInvalid: print("Not allowed to make the payment") case .clientInvalid: print("Not allowed to make the payment")
case .paymentCancelled: break
case .paymentInvalid: print("The purchase identifier was invalid")
case .paymentNotAllowed: print("The device is not allowed to make the payment") case .paymentNotAllowed: print("The device is not allowed to make the payment")
case .storeProductNotAvailable: print("The product is not available in the current storefront") case .storeProductNotAvailable: print("The product is not available in the current storefront")
case .cloudServicePermissionDenied: print("Access to cloud service information is not allowed") case .cloudServicePermissionDenied: print("Access to cloud service information is not allowed")
case .cloudServiceNetworkConnectionFailed: print("Could not connect to the network") case .cloudServiceNetworkConnectionFailed:
MBProgressHUD.showError(NSLocalizedString("UnableConnectNetwork", comment: "无法连接到网络")) //"无法连接到网络")//UnableConnectNetwork
print("Could not connect to the network")
case .cloudServiceRevoked: print("User has revoked permission to use this cloud service") case .cloudServiceRevoked: print("User has revoked permission to use this cloud service")
default: print((error as NSError).localizedDescription) default: print((error as NSError).localizedDescription)
} }
...@@ -87,20 +141,51 @@ class ZTPurchaseManager: NSObject { ...@@ -87,20 +141,51 @@ class ZTPurchaseManager: NSObject {
} }
} }
/// 初始化 /// 静态初始化
@objc class func launchWithSwiftyStoreKit() { @objc class func launchWithSwiftyStoreKit(success: @escaping(()->Void)) {
SwiftyStoreKit.completeTransactions(atomically: true) { purchases in SwiftyStoreKit.completeTransactions(atomically: true) { purchases in
for purchase in purchases { for purchase in purchases {
switch purchase.transaction.transactionState { switch purchase.transaction.transactionState {
case .purchased, .restored: case .purchased, .restored:
// Deliver content from server, then: // Deliver content from server, then:
let receiptData = SwiftyStoreKit.localReceiptData
let receiptString = receiptData?.base64EncodedString(options: []) ?? ""
print("Purchase Success: \(purchase.productId.description) receiptString: \(receiptString)")
// TODO: 服务器验证 // TODO: 服务器验证
if purchase.needsFinishTransaction { // if purchase.needsFinishTransaction {
if purchase.needsFinishTransaction { // let receiptData = SwiftyStoreKit.localReceiptData
SwiftyStoreKit.finishTransaction(purchase.transaction) // let receiptString = receiptData?.base64EncodedString(options: []) ?? ""
let dict = ["productId": purchase.productId, "transactionId" : (purchase.transaction.transactionIdentifier ?? ""), "receiptData" : receiptString]
print("productId transactionId receiptData: \(dict)")
// TODO: 服务器验证
TQNetworkTools.shared().post(withBodyAction: iosIPAVerifyReceipt, parameters: [:], body: dict, success: { (data) in
print("success----iosIPAVerifyReceipt-----------------\(data)------")
if let dict = data as? [String:Any] {
if let result = dict["result"] as? [String:Any] {
if let data = result["data"] as? [String:Any] {
print("SwiftyStoreKit---1-\(data)")
if let status = data["status"] as? Bool {
print("SwiftyStoreKit--2--\(status)")
if status {
print("SwiftyStoreKit--3--\(status)")
if purchase.needsFinishTransaction {
SwiftyStoreKit.finishTransaction(purchase.transaction)
}
success()
print("Purchase Success: \(purchase.productId)")
}
}
}
}
}
}) { (error) in
print("\(error)")
} }
} // }
// Unlock content // Unlock content
case .failed, .purchasing, .deferred: case .failed, .purchasing, .deferred:
break // do nothing break // do nothing
...@@ -117,10 +202,10 @@ class ZTPurchaseManager: NSObject { ...@@ -117,10 +202,10 @@ class ZTPurchaseManager: NSObject {
case .success(let receiptData): case .success(let receiptData):
let encryptedReceipt = receiptData.base64EncodedString(options: []) let encryptedReceipt = receiptData.base64EncodedString(options: [])
print("Fetch receipt success:\n\(encryptedReceipt)") print("Fetch receipt success:\n\(encryptedReceipt)")
// fetch content from your server, then: // fetch content from your server, then:
if product.needsFinishTransaction { if product.needsFinishTransaction {
SwiftyStoreKit.finishTransaction(product.transaction) SwiftyStoreKit.finishTransaction(product.transaction)
} }
case .error(let error): case .error(let error):
print("Fetch receipt failed: \(error)") print("Fetch receipt failed: \(error)")
} }
...@@ -134,16 +219,61 @@ class ZTPurchaseManager: NSObject { ...@@ -134,16 +219,61 @@ class ZTPurchaseManager: NSObject {
hud.hide(animated: true); hud.hide(animated: true);
if results.restoreFailedPurchases.count > 0 { if results.restoreFailedPurchases.count > 0 {
print("Restore Failed: \(results.restoreFailedPurchases)") print("Restore Failed: \(results.restoreFailedPurchases)")
} } else if results.restoredPurchases.count > 0 {
else if results.restoredPurchases.count > 0 {
print("Restore Success: \(results.restoredPurchases)") let sortedResults = results.restoredPurchases.sorted { (purchase1, purchase2) -> Bool in
if results.restoredPurchases.filter({ $0.needsFinishTransaction }).count <= 0 { if let date1 = purchase1.transaction.transactionDate, let data2 = purchase2.transaction.transactionDate {
MBProgressHUD.showSuccess("恢复成功", to: UIApplication.shared.windows.first) return date1.compare(data2) == .orderedAscending
success() }
return false
} }
} print("Restore sortedResults: \(sortedResults)")
else {
MBProgressHUD.showError("没有商品可恢复") if let purchase = sortedResults.last {
let appleValidator = AppleReceiptValidator(service: .production, sharedSecret: "9df507ede6a048a6989d26e6211a40c0")
let hud = MBProgressHUD.showAdded(to: UIApplication.shared.delegate!.window!!, animated: true)
SwiftyStoreKit.verifyReceipt(using: appleValidator) { result in
hud.hide(animated: true)
if case .success(let receipt) = result {
let purchaseResult = SwiftyStoreKit.verifySubscription(
ofType: .autoRenewable,
productId: purchase.productId,
inReceipt: receipt)
switch purchaseResult {
case .purchased(let expiryDate, _):
print("Product is valid until \(expiryDate)")
let dateFormatter = DateFormatter()
dateFormatter.locale = Locale(identifier: "en_CN")
dateFormatter.timeZone = TimeZone.current
dateFormatter.dateFormat = "yyyy-MM-dd HH:mm"
let dateStr = dateFormatter.string(from: expiryDate)
UserDefaults.standard.set(dateStr, forKey: "expiryDate")
//RestoreSuccess
MBProgressHUD.showSuccess(NSLocalizedString("RestoreSuccess", comment: "恢复成功"), to: inView)
if purchase.needsFinishTransaction {
SwiftyStoreKit.finishTransaction(purchase.transaction)
}
success()
case .expired(let expiryDate, _):
print("Product is expired since \(expiryDate)")
// MBProgressHUD.showError("订阅已过期,请重新获取", to: toView)
MBProgressHUD.showError(NSLocalizedString("ProductIsExpired", comment: "订阅已过期,请重新获取"), to: inView)
case .notPurchased:
print("This product has never been purchased")
}
} else {
// receipt verification error
}
}
print("Restore Success: \(results.restoredPurchases)")
}
} else {
//NoProductToRestore
MBProgressHUD.showError(NSLocalizedString("NoProductToRestore", comment: "无产品可恢复"))
print("Nothing to Restore") print("Nothing to Restore")
} }
} }
......
...@@ -91,6 +91,7 @@ ...@@ -91,6 +91,7 @@
NSData *jsonData = [NSJSONSerialization dataWithJSONObject:modelDic options:NSJSONWritingPrettyPrinted error:nil]; NSData *jsonData = [NSJSONSerialization dataWithJSONObject:modelDic options:NSJSONWritingPrettyPrinted error:nil];
NSString * string = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding]; NSString * string = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding];
[MobClick event:@"low_power_switch_click"];
[[TQNetworkTools shared] postWithAction:userRemindInfoSet parameters:@{@"":string} success:^(id _Nonnull response) { [[TQNetworkTools shared] postWithAction:userRemindInfoSet parameters:@{@"":string} success:^(id _Nonnull response) {
NSString *result = [[NSString alloc] initWithData:response NSString *result = [[NSString alloc] initWithData:response
......
...@@ -135,19 +135,9 @@ ...@@ -135,19 +135,9 @@
// return; // return;
// } // }
if(![ZJUserInfoManager shared].userInfoModel.isMember){
[[ZJGoodsMagager shared] goodsWithVC:self callBack:^(id _Nonnull s) {
[[ZJUserInfoManager shared] updataUserInfo:^(ZJMineUserInfoModel * _Nonnull model) {
} failure:^(id _Nonnull error) {
}];
}];
return;
}
switch (sender.tag-0x64) { switch (sender.tag-0x64) {
case 0:{ case 0:{
[MobClick event:@"friends_location_card_click"];
NSDictionary * switchDic = [[self.data Read] objectForKey:@"switch"]; NSDictionary * switchDic = [[self.data Read] objectForKey:@"switch"];
BOOL map_style2 = switchDic && [[NSString stringWithFormat:@"%@",[switchDic objectForKey:@"map_page_style"]] isEqualToString:@"1"]; BOOL map_style2 = switchDic && [[NSString stringWithFormat:@"%@",[switchDic objectForKey:@"map_page_style"]] isEqualToString:@"1"];
...@@ -157,11 +147,37 @@ ...@@ -157,11 +147,37 @@
} }
break; break;
case 1:{ case 1:{
if(![ZJUserInfoManager shared].userInfoModel.isMember){
[[ZJGoodsMagager shared] goodsWithVC:self callBack:^(id _Nonnull s) {
[[ZJUserInfoManager shared] updataUserInfo:^(ZJMineUserInfoModel * _Nonnull model) {
} failure:^(id _Nonnull error) {
}];
}];
return;
}
[MobClick event:@"place_remind_card_click"];
ZJLocationAttentionVC * vc = [ZJLocationAttentionVC new]; ZJLocationAttentionVC * vc = [ZJLocationAttentionVC new];
[self.navigationController pushViewController:vc animated:YES]; [self.navigationController pushViewController:vc animated:YES];
} }
break; break;
case 2:{ case 2:{
if(![ZJUserInfoManager shared].userInfoModel.isMember){
[[ZJGoodsMagager shared] goodsWithVC:self callBack:^(id _Nonnull s) {
[[ZJUserInfoManager shared] updataUserInfo:^(ZJMineUserInfoModel * _Nonnull model) {
} failure:^(id _Nonnull error) {
}];
}];
return;
}
[MobClick event:@"low_power_card_click"];
ZJElectricalRemindVC * remind = [[UIStoryboard storyboardWithName:@"Guard" bundle:nil] instantiateViewControllerWithIdentifier:@"ZJElectricalRemindVC"]; ZJElectricalRemindVC * remind = [[UIStoryboard storyboardWithName:@"Guard" bundle:nil] instantiateViewControllerWithIdentifier:@"ZJElectricalRemindVC"];
[self.navigationController pushViewController:remind animated:YES]; [self.navigationController pushViewController:remind animated:YES];
} }
...@@ -236,15 +252,21 @@ ...@@ -236,15 +252,21 @@
if(![ZJUserInfoManager shared].userInfoModel.isMember){ if(![ZJUserInfoManager shared].userInfoModel.isMember){
[[ZJGoodsMagager shared] goodsWithVC:self callBack:^(id _Nonnull s) { [[ZJGoodsMagager shared] goodsWithVC:self callBack:^(id _Nonnull s) {
[[ZJUserInfoManager shared] updataUserInfo:^(ZJMineUserInfoModel * _Nonnull model) { [[ZJUserInfoManager shared] updataUserInfo:^(ZJMineUserInfoModel * _Nonnull model) {
} failure:^(id _Nonnull error) { } failure:^(id _Nonnull error) {
}]; }];
}]; }];
return; return;
} }
if (indexPath.row < 4){
NSArray * event = @[@"vegetable_click", @"getup_click", @"fruit_click", @"Water_click"];
[MobClick event:event[indexPath.row]];
}
if (indexPath.row == self.dataSource.count - 1) { if (indexPath.row == self.dataSource.count - 1) {
[MobClick event:@"add_remind_click"];
ZJAddReminderController *vc = [ZJAddReminderController new]; ZJAddReminderController *vc = [ZJAddReminderController new];
[self.navigationController pushViewController:vc animated:YES]; [self.navigationController pushViewController:vc animated:YES];
}else{ }else{
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
<rect key="frame" x="107" y="15" width="200" height="194"/> <rect key="frame" x="107" y="15" width="200" height="194"/>
</imageView> </imageView>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Uob-FV-s6z"> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Uob-FV-s6z">
<rect key="frame" x="79" y="598.5" width="256.5" height="57.5"/> <rect key="frame" x="79" y="435" width="256.5" height="57.5"/>
<state key="normal" image="LocationHint_back_btn_select"/> <state key="normal" image="LocationHint_back_btn_select"/>
<state key="selected" image="LocationHint_back_btn_selected"/> <state key="selected" image="LocationHint_back_btn_selected"/>
<connections> <connections>
...@@ -62,13 +62,14 @@ ...@@ -62,13 +62,14 @@
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/> <color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<constraints> <constraints>
<constraint firstItem="chR-61-Bcl" firstAttribute="centerX" secondItem="j5y-pY-6pp" secondAttribute="centerX" id="CSP-9Z-apR"/> <constraint firstItem="chR-61-Bcl" firstAttribute="centerX" secondItem="j5y-pY-6pp" secondAttribute="centerX" id="CSP-9Z-apR"/>
<constraint firstItem="Uob-FV-s6z" firstAttribute="top" secondItem="9E9-pW-Lib" secondAttribute="bottom" constant="80" id="Dx2-tr-cB3"/>
<constraint firstItem="9E9-pW-Lib" firstAttribute="top" secondItem="chR-61-Bcl" secondAttribute="bottom" constant="20" id="KIr-bb-Qf1"/> <constraint firstItem="9E9-pW-Lib" firstAttribute="top" secondItem="chR-61-Bcl" secondAttribute="bottom" constant="20" id="KIr-bb-Qf1"/>
<constraint firstItem="9E9-pW-Lib" firstAttribute="centerX" secondItem="chR-61-Bcl" secondAttribute="centerX" id="YEm-z9-yB6"/> <constraint firstItem="9E9-pW-Lib" firstAttribute="centerX" secondItem="chR-61-Bcl" secondAttribute="centerX" id="YEm-z9-yB6"/>
<constraint firstItem="j5y-pY-6pp" firstAttribute="centerX" secondItem="jqH-qv-uUS" secondAttribute="centerX" id="a0s-5I-zzr"/> <constraint firstItem="j5y-pY-6pp" firstAttribute="centerX" secondItem="jqH-qv-uUS" secondAttribute="centerX" id="a0s-5I-zzr"/>
<constraint firstItem="chR-61-Bcl" firstAttribute="top" secondItem="j5y-pY-6pp" secondAttribute="bottom" constant="42" id="csD-Mf-xFw"/> <constraint firstItem="chR-61-Bcl" firstAttribute="top" secondItem="j5y-pY-6pp" secondAttribute="bottom" constant="42" id="csD-Mf-xFw"/>
<constraint firstItem="j5y-pY-6pp" firstAttribute="top" secondItem="jqH-qv-uUS" secondAttribute="top" constant="15" id="p8K-u9-NQh"/> <constraint firstItem="j5y-pY-6pp" firstAttribute="top" secondItem="jqH-qv-uUS" secondAttribute="top" constant="15" id="p8K-u9-NQh"/>
<constraint firstAttribute="bottom" relation="greaterThanOrEqual" secondItem="Uob-FV-s6z" secondAttribute="bottom" constant="44" id="pVR-te-71u"/>
<constraint firstItem="Uob-FV-s6z" firstAttribute="centerX" secondItem="j5y-pY-6pp" secondAttribute="centerX" id="rcn-3A-ghJ"/> <constraint firstItem="Uob-FV-s6z" firstAttribute="centerX" secondItem="j5y-pY-6pp" secondAttribute="centerX" id="rcn-3A-ghJ"/>
<constraint firstItem="Uob-FV-s6z" firstAttribute="centerY" secondItem="jqH-qv-uUS" secondAttribute="centerY" multiplier="1.4" id="rpc-Bw-EIf"/>
</constraints> </constraints>
</view> </view>
</subviews> </subviews>
......
...@@ -177,7 +177,7 @@ ...@@ -177,7 +177,7 @@
- (void)uploadLog:(NSInteger)index{ - (void)uploadLog:(NSInteger)index{
NSArray * array = @[@"我关心的人", @"定位", @"我的"]; NSArray * array = @[@"tabbar_myconcern_person", @"tabbar_map", @"tabbar_my"];
NSMutableDictionary *dict = @{@"event": @"guazinovel", @"action": @"tab_imp", @"value": array[index]}.mutableCopy; NSMutableDictionary *dict = @{@"event": @"guazinovel", @"action": @"tab_imp", @"value": array[index]}.mutableCopy;
......
...@@ -127,19 +127,14 @@ ...@@ -127,19 +127,14 @@
if (_payInfo){ if (_payInfo){
NSDictionary * switchDic = [[self.data Read] objectForKey:@"switch"];
NSString * jsonStr; NSString * jsonStr;
if ([[switchDic objectForKey:@"isLadderPay"] isEqual:@1]) {
NSError *error = nil;
NSData *jsonData = [NSJSONSerialization dataWithJSONObject:_payInfo
options:0
error:&error];
jsonStr = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding];
}else{ NSError *error = nil;
jsonStr = [NSString stringWithFormat:@"{\"agree\":\"%@\",\"payUrl\":\"%@\",\"price\":\"%@\",\"serviceUrl\":\"%@\",\"hintStyle\":\"%@\",\"hintStyleDes\":\"%@\"}", [_payInfo objectForKey:@"agree"], [_payInfo objectForKey:@"payUrl"], [_payInfo objectForKey:@"price"], [_payInfo objectForKey:@"serviceUrl"], [_payInfo objectForKey:@"hintStyle"], [_payInfo objectForKey:@"hintStyleDes"]]; NSData *jsonData = [NSJSONSerialization dataWithJSONObject:_payInfo
} options:0
error:&error];
jsonStr = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding];
NSString *inputValueJS = [NSString stringWithFormat:@"getPayJson('%@')", jsonStr]; NSString *inputValueJS = [NSString stringWithFormat:@"getPayJson('%@')", jsonStr];
[webView evaluateJavaScript:inputValueJS completionHandler:^(id _Nullable response, NSError * _Nullable error) { [webView evaluateJavaScript:inputValueJS completionHandler:^(id _Nullable response, NSError * _Nullable error) {
...@@ -200,7 +195,14 @@ ...@@ -200,7 +195,14 @@
- (void)webView:(WKWebView *)webView didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge completionHandler:(void (^)(NSURLSessionAuthChallengeDisposition disposition, NSURLCredential *__nullable credential))completionHandler{ - (void)webView:(WKWebView *)webView didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge completionHandler:(void (^)(NSURLSessionAuthChallengeDisposition disposition, NSURLCredential *__nullable credential))completionHandler{
completionHandler(NSURLSessionAuthChallengePerformDefaultHandling ,nil); if ([challenge.protectionSpace.authenticationMethod isEqualToString:NSURLAuthenticationMethodServerTrust]) {
NSURLCredential *credential = [[NSURLCredential alloc]initWithTrust:challenge.protectionSpace.serverTrust];
completionHandler(NSURLSessionAuthChallengeUseCredential,credential);
}else{
completionHandler(NSURLSessionAuthChallengePerformDefaultHandling ,nil);
}
} }
- (WKWebView *)webView:(WKWebView *)webView createWebViewWithConfiguration:(WKWebViewConfiguration *)configuration forNavigationAction:(WKNavigationAction *)navigationAction windowFeatures:(WKWindowFeatures *)windowFeatures{ - (WKWebView *)webView:(WKWebView *)webView createWebViewWithConfiguration:(WKWebViewConfiguration *)configuration forNavigationAction:(WKNavigationAction *)navigationAction windowFeatures:(WKWindowFeatures *)windowFeatures{
...@@ -222,12 +224,7 @@ ...@@ -222,12 +224,7 @@
if([message.name isEqualToString:@"OCJSBridge"]){ if([message.name isEqualToString:@"OCJSBridge"]){
[self share]; [self share];
}else if ([message.name isEqualToString:@"payResultCallBack"]){ }else if ([message.name isEqualToString:@"payResultCallBack"]){
NSDictionary * switchDic = [[self.data Read] objectForKey:@"switch"]; [self orderVerify:message.body];
if ([[switchDic objectForKey:@"isLadderPay"] isEqual:@1]) {
[self orderVerify:message.body];
}else{
[self orderVerify:nil];
}
}else if ([message.name isEqualToString:@"protocolSelectedResultCallBack"]){ }else if ([message.name isEqualToString:@"protocolSelectedResultCallBack"]){
NSString * result = message.body; NSString * result = message.body;
[_payInfo setValue:result forKey:@"agree"]; [_payInfo setValue:result forKey:@"agree"];
......
...@@ -107,6 +107,7 @@ ...@@ -107,6 +107,7 @@
//添加关心的人 //添加关心的人
- (void)addCardFriend { - (void)addCardFriend {
[MobClick event:@"add_person"];
ZJTianJiaViewController *tianJiaVC = [[ZJTianJiaViewController alloc] init]; ZJTianJiaViewController *tianJiaVC = [[ZJTianJiaViewController alloc] init];
[self.navigationController pushViewController:tianJiaVC animated:YES]; [self.navigationController pushViewController:tianJiaVC animated:YES];
} }
......
...@@ -38,6 +38,7 @@ ...@@ -38,6 +38,7 @@
//添加关心的人 //添加关心的人
- (void)addCardFriend { - (void)addCardFriend {
[self logCollection]; [self logCollection];
[MobClick event:@"add_person"];
ZJTianJiaViewController *tianJiaVC = [[ZJTianJiaViewController alloc] init]; ZJTianJiaViewController *tianJiaVC = [[ZJTianJiaViewController alloc] init];
[self.navigationController pushViewController:tianJiaVC animated:YES]; [self.navigationController pushViewController:tianJiaVC animated:YES];
} }
......
...@@ -43,6 +43,7 @@ static NSString * const ZJReminderFooterViewID = @"ZJReminderFooterViewID"; ...@@ -43,6 +43,7 @@ static NSString * const ZJReminderFooterViewID = @"ZJReminderFooterViewID";
[super viewDidLoad]; [super viewDidLoad];
// Do any additional setup after loading the view. // Do any additional setup after loading the view.
[MobClick event:@"place_remind_add_click"];
[self setupUI]; [self setupUI];
[self requestData]; [self requestData];
} }
...@@ -119,6 +120,14 @@ static NSString * const ZJReminderFooterViewID = @"ZJReminderFooterViewID"; ...@@ -119,6 +120,14 @@ static NSString * const ZJReminderFooterViewID = @"ZJReminderFooterViewID";
dict[@"weekSetting"] = self.weekSetting; dict[@"weekSetting"] = self.weekSetting;
NSString *json = [self convertToJsonData:dict]; NSString *json = [self convertToJsonData:dict];
NSLog(@"%@",json); NSLog(@"%@",json);
NSArray * event = @[@"vegetable_add_remind_save", @"getup_add_remind_save", @"fruit_add_remind_save", @"Water_add_remind_save"];
if (self.model.id-2>=0 || self.model.id-2<4) {
[MobClick event:event[self.model.id-2]];
}else{
[MobClick event:@"add_remind_click"];
}
[[TQNetworkTools shared] postWithBodyAction:userRemindInfoSet parameters:@{} body:dict success:^(NSDictionary * _Nonnull response) { [[TQNetworkTools shared] postWithBodyAction:userRemindInfoSet parameters:@{} body:dict success:^(NSDictionary * _Nonnull response) {
if ([response[@"status"] intValue] == 200) { if ([response[@"status"] intValue] == 200) {
[MBProgressHUD showMessage:@"添加成功"]; [MBProgressHUD showMessage:@"添加成功"];
...@@ -171,7 +180,9 @@ static NSString * const ZJReminderFooterViewID = @"ZJReminderFooterViewID"; ...@@ -171,7 +180,9 @@ static NSString * const ZJReminderFooterViewID = @"ZJReminderFooterViewID";
{// 关心的人 {// 关心的人
ZJReminderCareController *vc = [ZJReminderCareController new]; ZJReminderCareController *vc = [ZJReminderCareController new];
__weak typeof(self) weakSelf = self; __weak typeof(self) weakSelf = self;
[MobClick event:@"place_remind_selectfriend_click"];
vc.backData = ^(ZJFriendModel * _Nonnull model) { vc.backData = ^(ZJFriendModel * _Nonnull model) {
[MobClick event:@"place_remind_none_addfriends_click"];
weakSelf.friendModel = model; weakSelf.friendModel = model;
if (weakSelf.dataArray.count) { if (weakSelf.dataArray.count) {
ZJChooseIcon *item = weakSelf.dataArray[0]; ZJChooseIcon *item = weakSelf.dataArray[0];
......
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="15505" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES"> <document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="16097.2" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_1" orientation="portrait" appearance="light"/> <device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies> <dependencies>
<deployment identifier="iOS"/> <deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15510"/> <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies> </dependencies>
<objects> <objects>
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
<rect key="frame" x="0.0" y="0.0" width="91" height="108"/> <rect key="frame" x="0.0" y="0.0" width="91" height="108"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews> <subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="remind_cell_0_1" translatesAutoresizingMaskIntoConstraints="NO" id="nuB-Rn-VdK"> <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="remind_cell_Add" translatesAutoresizingMaskIntoConstraints="NO" id="nuB-Rn-VdK">
<rect key="frame" x="23" y="31.5" width="45" height="45"/> <rect key="frame" x="23" y="31.5" width="45" height="45"/>
<constraints> <constraints>
<constraint firstAttribute="width" constant="45" id="9QJ-Za-gUs"/> <constraint firstAttribute="width" constant="45" id="9QJ-Za-gUs"/>
...@@ -37,6 +37,6 @@ ...@@ -37,6 +37,6 @@
</collectionViewCell> </collectionViewCell>
</objects> </objects>
<resources> <resources>
<image name="remind_cell_0_1" width="40" height="40"/> <image name="remind_cell_Add" width="40" height="40"/>
</resources> </resources>
</document> </document>
...@@ -100,14 +100,7 @@ static ZJGoodsMagager * manager; ...@@ -100,14 +100,7 @@ static ZJGoodsMagager * manager;
_callBack = callBack; _callBack = callBack;
_currentVC = currentVC; _currentVC = currentVC;
if ([self.products firstObject]) { if ([self.products firstObject]) {
[self getUrl_new:0];
NSDictionary * switchDic = [[self.data Read] objectForKey:@"switch"];
if ([[switchDic objectForKey:@"isLadderPay"] isEqual:@1]) {
[self getUrl_new:0];
}else{
[self getUrl:[self.products firstObject]];
}
}else{ }else{
[self getGoods]; [self getGoods];
} }
...@@ -137,13 +130,8 @@ static ZJGoodsMagager * manager; ...@@ -137,13 +130,8 @@ static ZJGoodsMagager * manager;
} }
} }
if ([self.products firstObject]) { if ([self.products firstObject]) {
NSDictionary * switchDic = [[self.data Read] objectForKey:@"switch"];
[self getUrl_new:0];
if ([[switchDic objectForKey:@"isLadderPay"] isEqual:@1]) {
[self getUrl_new:0];
}else{
[self getUrl:[self.products firstObject]];
}
} }
} }
} failure:^(NSError * _Nonnull error) { } failure:^(NSError * _Nonnull error) {
...@@ -157,37 +145,6 @@ static ZJGoodsMagager * manager; ...@@ -157,37 +145,6 @@ static ZJGoodsMagager * manager;
}]; }];
} }
- (void)getUrl:(ZJIPAProductModel *)model{
[MBProgressHUD showLoading:@"请稍后..." toView:_currentVC.view];
[[TQNetworkTools shared] postWithAction:userPay parameters:@{@"payPlatform":@"1", @"goodsId":[NSString stringWithFormat:@"%ld", (long)model.goodsId], @"payType":@"2", @"wxType":@"H5"} success:^(id _Nonnull response) {
[MBProgressHUD hideHUDForView:self.currentVC.view];
if ([response[@"status"] integerValue] == 200 && ![[[response objectForKey:@"result"] objectForKey:@"data"] isKindOfClass:[NSNull class]]) {
[self webGoods:response good:model tradeNo:response[@"result"][@"data"][@"wakeup"][@"extData"]];
}else{
if (self.tradeNoCount < 3) {
[self getUrl:[self.products firstObject]];
self.tradeNoCount++;
NSError * error = [NSError errorWithDomain:NSCocoaErrorDomain code:998 userInfo:nil];
[Bugly reportError:error];
}
}
} failure:^(NSError * _Nonnull error) {
[MBProgressHUD hideHUDForView:self.currentVC.view];
// [MBProgressHUD showError:@"商品信息获取失败,请稍后再试" toView:self.currentVC.view];
if (self.tradeNoCount < 3) {
[self getUrl:[self.products firstObject]];
self.tradeNoCount++;
NSError * error = [NSError errorWithDomain:NSCocoaErrorDomain code:999 userInfo:nil];
[Bugly reportError:error];
}
}];
}
- (void)getUrl_new:(NSInteger)index{ - (void)getUrl_new:(NSInteger)index{
ZJIPAProductModel *model = self.products[index]; ZJIPAProductModel *model = self.products[index];
[MBProgressHUD showLoading:@"请稍后..." toView:_currentVC.view]; [MBProgressHUD showLoading:@"请稍后..." toView:_currentVC.view];
...@@ -241,38 +198,6 @@ static ZJGoodsMagager * manager; ...@@ -241,38 +198,6 @@ static ZJGoodsMagager * manager;
}]; }];
} }
- (void)webGoods:(id)response good:(ZJIPAProductModel *)model tradeNo:(NSString *)tradeNo{
NSDictionary * dic = [ZJUserInfoManager shared].h5_url;
NSDictionary * switchDic = [[self.data Read] objectForKey:@"switch"];
NSString * string = [NSString stringWithFormat:@"%@&redirect_url=%@", [[[response[@"result"] objectForKey:@"data"]objectForKey:@"wakeup"] objectForKey:@"mwebUrl"], [dic objectForKey:@"WXbackUrl"]];
NSString * serviceUrl = [dic objectForKey:@"pay"] ? : @"";
NSString * agree = [switchDic objectForKey:@"wd_agreement_selected"] ? : @"";
NSString * price = [NSString stringWithFormat:@"%.2f", (float)model.fen/100];
NSString * hintStyle = [[self.data Read] objectForKey:@"hintStyle"]?:@"99";
NSString * hintStyleDes = [[self.data Read] objectForKey:@"hintStyleDes"]?:@"";
_web = [[BaseWebViewController alloc] init];
_web.url = [dic objectForKey:@"appPayUrl"];
_web.payInfo = @{@"payUrl":string, @"serviceUrl":serviceUrl, @"agree":agree, @"price":price, @"hintStyle":hintStyle, @"hintStyleDes":hintStyleDes}.mutableCopy;
_web.tradeNo = tradeNo;
_web.schemes = [dic objectForKey:@"WXbackUrl"];
[_currentVC.navigationController pushViewController:_web animated:YES];
__weak typeof(self) weakSelf = self;
_web.goodsResultCallback = ^(id s) {
if (weakSelf.callBack) {
weakSelf.callBack(@"");
};
[weakSelf.web.navigationController popViewControllerAnimated:YES];
};
[[NSNotificationCenter defaultCenter] addObserver:_web selector:@selector(isLoadGoodsUrl) name:@"loadingGoodsUrl" object:nil];
}
- (void)webGoods_new:(id)response{ - (void)webGoods_new:(id)response{
NSDictionary * dic = [ZJUserInfoManager shared].h5_url; NSDictionary * dic = [ZJUserInfoManager shared].h5_url;
...@@ -286,12 +211,7 @@ static ZJGoodsMagager * manager; ...@@ -286,12 +211,7 @@ static ZJGoodsMagager * manager;
NSString * hintStyleDes = [[self.data Read] objectForKey:@"hintStyleDes"]?:@""; NSString * hintStyleDes = [[self.data Read] objectForKey:@"hintStyleDes"]?:@"";
_web = [[BaseWebViewController alloc] init]; _web = [[BaseWebViewController alloc] init];
_web.url = [dic objectForKey:@"appPayUrl"]; _web.url = [dic objectForKey:@"LadderPayUrl"];
if ([[switchDic objectForKey:@"isLadderPay"] isEqual:@1]) {
_web.url = [dic objectForKey:@"LadderPayUrl"];
}else{
_web.url = [dic objectForKey:@"appPayUrl"];
}
_web.payInfo = @{@"goodsInfo":self.goodsInfo,@"serviceUrl":serviceUrl,@"userUrl":userUrl,@"privacyUrl":privacyUrl,@"agree":agree,@"hintStyle":hintStyle,@"hintStyleDes":hintStyleDes}.mutableCopy; _web.payInfo = @{@"goodsInfo":self.goodsInfo,@"serviceUrl":serviceUrl,@"userUrl":userUrl,@"privacyUrl":privacyUrl,@"agree":agree,@"hintStyle":hintStyle,@"hintStyleDes":hintStyleDes}.mutableCopy;
_web.schemes = [dic objectForKey:@"WXbackUrl"]; _web.schemes = [dic objectForKey:@"WXbackUrl"];
[_currentVC.navigationController pushViewController:_web animated:YES]; [_currentVC.navigationController pushViewController:_web animated:YES];
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
#define AppLs @"ed32f8b2bd3e7e58" #define AppLs @"ed32f8b2bd3e7e58"
#define ShanYanAppID @"CiuaRN4D" //创蓝appid #define ShanYanAppID @"DVcuQ8Or" //创蓝appid
#define WXAppId @"wxe24b15232c28e77c" #define WXAppId @"wxe24b15232c28e77c"
#define WXUniversalLink @"https://www.wayaya.info/dolphins/" #define WXUniversalLink @"https://www.wayaya.info/dolphins/"
...@@ -37,14 +37,14 @@ ...@@ -37,14 +37,14 @@
//#if DEBUG //#if DEBUG
// //
#define ServerReport @"http://report.zhangxinhulian.com" //#define ServerReport @"http://report.zhangxinhulian.com"
#define ServerHost @"https://feedapitest.zhangxinhulian.com" //#define ServerHost @"https://feedapitest.zhangxinhulian.com"
#define ServerHostFeed @"https://feedapitest.zhangxinhulian.com" //#define ServerHostFeed @"https://feedapitest.zhangxinhulian.com"
//#else //#else
//#define ServerReport @"http://report.zhangxinhulian.com" #define ServerReport @"http://report.zhangxinhulian.com"
//#define ServerHost @"https://feedapi.zhangxinhulian.com" #define ServerHost @"https://feedapi.zhangxinhulian.com"
//#define ServerHostFeed @"https://feedapi.zhangxinhulian.com" #define ServerHostFeed @"https://feedapi.zhangxinhulian.com"
//#endif //#endif
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
<string></string> <string></string>
<key>CFBundleURLSchemes</key> <key>CFBundleURLSchemes</key>
<array> <array>
<string>h5v2.zhangxinzhixun.com</string> <string>h5v1.zhangxinzhixun.com</string>
</array> </array>
</dict> </dict>
</array> </array>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment