Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
D
Dolphins
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lmj
Dolphins
Commits
a959b63d
Commit
a959b63d
authored
Aug 01, 2020
by
lmj_521aiau@163.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1. store pay
parent
d0f61292
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
199 additions
and
107 deletions
+199
-107
project.pbxproj
Dolphins.xcodeproj/project.pbxproj
+0
-40
AppDelegate.m
Dolphins/AppDelegate.m
+3
-1
ZTPurchaseManager.swift
Dolphins/Classes/Goods/Controller/ZTPurchaseManager.swift
+183
-53
ZJGoodsMagager.m
Dolphins/Classes/Tools/GoodsManager/ZJGoodsMagager.m
+13
-13
No files found.
Dolphins.xcodeproj/project.pbxproj
View file @
a959b63d
...
@@ -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>"
;
};
...
@@ -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 */
,
...
...
Dolphins/AppDelegate.m
View file @
a959b63d
...
@@ -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
];
...
...
Dolphins/Classes/Goods/Controller/ZTPurchaseManager.swift
View file @
a959b63d
...
@@ -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
:
fals
e
)
{
result
in
SwiftyStoreKit
.
purchaseProduct
(
productId
,
quantity
:
1
,
atomically
:
tru
e
)
{
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"
)
}
}
}
}
...
...
Dolphins/Classes/Tools/GoodsManager/ZJGoodsMagager.m
View file @
a959b63d
...
@@ -80,7 +80,7 @@ static ZJGoodsMagager * manager;
...
@@ -80,7 +80,7 @@ static ZJGoodsMagager * manager;
-
(
void
)
goodsWithVC
:
(
UIViewController
*
)
currentVC
callBack
:
(
resultCallBack
)
callBack
{
-
(
void
)
goodsWithVC
:
(
UIViewController
*
)
currentVC
callBack
:
(
resultCallBack
)
callBack
{
if
([
self
ckeak
]){
//
if ([self ckeak]){
[
MobClick
event
:
@"go_member_with_Apple"
];
[
MobClick
event
:
@"go_member_with_Apple"
];
ZJGoodsViewController
*
goods
=
[[
ZJGoodsViewController
alloc
]
init
];
ZJGoodsViewController
*
goods
=
[[
ZJGoodsViewController
alloc
]
init
];
...
@@ -93,18 +93,18 @@ static ZJGoodsMagager * manager;
...
@@ -93,18 +93,18 @@ static ZJGoodsMagager * manager;
[
weak
.
navigationController
popViewControllerAnimated
:
YES
];
[
weak
.
navigationController
popViewControllerAnimated
:
YES
];
};
};
}
else
{
//
}else{
[
MobClick
event
:
@"go_member_with_H5"
];
//
[MobClick event:@"go_member_with_H5"];
_tradeNoCount
=
0
;
//
_tradeNoCount = 0;
_goodsCount
=
0
;
//
_goodsCount = 0;
_callBack
=
callBack
;
//
_callBack = callBack;
_currentVC
=
currentVC
;
//
_currentVC = currentVC;
if
([
self
.
products
firstObject
])
{
//
if ([self.products firstObject]) {
[
self
getUrl_new
:
0
];
//
[self getUrl_new:0];
}
else
{
//
}else{
[
self
getGoods
];
//
[self getGoods];
}
//
}
}
//
}
}
}
-
(
void
)
getGoods
{
-
(
void
)
getGoods
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment