Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
Z
ZhiJi-Overseas
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
ZhiJi-Overseas
Commits
fbc1b8de
Commit
fbc1b8de
authored
Jul 08, 2020
by
Mazy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
optimize mine logic
parent
e97306ac
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
39 additions
and
30 deletions
+39
-30
UserInterfaceState.xcuserstate
...cuserdata/mazy.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
ZTPurchaseManager.swift
ZhiJi/Classes/Goods/Controller/ZTPurchaseManager.swift
+23
-24
ZJMineHeaderView.m
ZhiJi/Classes/Mine/View/ZJMineHeaderView.m
+15
-5
Localizable.strings
ZhiJi/en.lproj/Localizable.strings
+1
-1
No files found.
ZhiJi.xcworkspace/xcuserdata/mazy.xcuserdatad/UserInterfaceState.xcuserstate
View file @
fbc1b8de
No preview for this file type
ZhiJi/Classes/Goods/Controller/ZTPurchaseManager.swift
View file @
fbc1b8de
...
...
@@ -158,6 +158,7 @@ class ZTPurchaseManager: NSObject {
print
(
"Restore Success:
\(
results
.
restoredPurchases
)
"
)
if
let
product
=
results
.
restoredPurchases
.
last
{
if
product
.
needsFinishTransaction
{
let
receiptData
=
SwiftyStoreKit
.
localReceiptData
let
receiptString
=
receiptData
?
.
base64EncodedString
(
options
:
[])
??
""
print
(
"receiptString:
\(
receiptString
)
"
)
...
...
@@ -175,17 +176,15 @@ class ZTPurchaseManager: NSObject {
guard
let
status
=
data
[
"status"
]
as?
Bool
,
status
==
true
else
{
return
}
if
product
.
needsFinishTransaction
{
SwiftyStoreKit
.
finishTransaction
(
product
.
transaction
)
}
print
(
"Purchase Success:
\(
product
.
productId
)
"
)
SwiftyStoreKit
.
finishTransaction
(
product
.
transaction
)
success
()
})
{
(
error
)
in
innerHud
.
hide
(
animated
:
true
)
}
}
}
}
else
{
MBProgressHUD
.
showError
(
"没有商品可恢复"
)
print
(
"Nothing to Restore"
)
...
...
ZhiJi/Classes/Mine/View/ZJMineHeaderView.m
View file @
fbc1b8de
...
...
@@ -185,7 +185,7 @@
if
(
Member
)
{
_gongNengLabel
.
text
=
kLocalizedString
(
@"mine_unlocked"
);
_timeLabel
.
text
=
kLocalizedString
(
@"mine_free_used"
);
//
_xuFeiButton.hidden = YES;
_xuFeiButton
.
hidden
=
YES
;
}
else
{
_gongNengLabel
.
text
=
kLocalizedString
(
@"mine_premium_services_locked"
);
_timeLabel
.
text
=
kLocalizedString
(
@"mine_unlock_more_services"
);
...
...
@@ -197,10 +197,20 @@
_nicknameLabel
.
text
=
userInfo
.
nickname
;
}
}
else
{
if
(
Member
)
{
_gongNengLabel
.
text
=
kLocalizedString
(
@"mine_unlocked"
);
_timeLabel
.
text
=
kLocalizedString
(
@"mine_free_used"
);
_nicknameLabel
.
text
=
kLocalizedString
(
@"mine_sign"
);
// [[data Read] objectForKey:@"NickName"];
_xuFeiButton
.
hidden
=
true
;
}
else
{
_gongNengLabel
.
text
=
kLocalizedString
(
@"mine_premium_services_locked"
);
_timeLabel
.
text
=
kLocalizedString
(
@"mine_unlock_more_services"
);
[
_xuFeiButton
setTitle
:
kLocalizedString
(
@"mine_unlock"
)
forState
:(
UIControlStateNormal
)];
_xuFeiButton
.
hidden
=
false
;
}
// _gongNengLabel.text = kLocalizedString(@"mine_premium_services_locked");
// _timeLabel.text = kLocalizedString(@"mine_unlock_more_services");
// [_xuFeiButton setTitle:kLocalizedString(@"mine_unlock") forState:(UIControlStateNormal)];
}
if
([
userInfo
.
uid
isEqual
:
@""
])
{
...
...
ZhiJi/en.lproj/Localizable.strings
View file @
fbc1b8de
...
...
@@ -156,7 +156,7 @@ appName = "Family Mapp";
"mine_sign"="Sign in";
"mine_click_nickname"="Click name to edit";
"mine_unlock_more_services"="Unlock to access Premium services";
"mine_unlock"="Unlock
ed
";
"mine_unlock"="Unlock";
"mine_userID"="User ID";
"mine_track"="My track";
"mine_emergenry_contacts"="Emergency contacts";
...
...
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