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
bfbfefee
Commit
bfbfefee
authored
Jul 15, 2020
by
lmj_521aiau@163.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
b3e59008
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
60 additions
and
10 deletions
+60
-10
ZJMemberPayViewController.m
ZhiJi/Classes/Goods/Controller/ZJMemberPayViewController.m
+59
-8
ZTPurchaseManager.swift
ZhiJi/Classes/Goods/Controller/ZTPurchaseManager.swift
+1
-1
ZJUserInfoManager.m
ZhiJi/Classes/Tools/UserInfoManager/ZJUserInfoManager.m
+0
-1
No files found.
ZhiJi/Classes/Goods/Controller/ZJMemberPayViewController.m
View file @
bfbfefee
...
...
@@ -12,8 +12,9 @@
#import "ZhiJi-Swift.h"
#import "SDCycleScrollView.h"
#import "ZJDefaultTools.h"
#import "BaseWebViewController.h"
@interface
ZJMemberPayViewController
()
<
SDCycleScrollViewDelegate
>
@interface
ZJMemberPayViewController
()
<
SDCycleScrollViewDelegate
,
UITextViewDelegate
>
@property
(
nonatomic
,
weak
)
IBOutlet
UITableView
*
tableView
;
...
...
@@ -260,14 +261,33 @@
CGRect
rect
=
[
des
boundingRectWithSize
:
CGSizeMake
(
KScreenWidth
-
KScaleWidth
(
20
),
MAXFLOAT
)
options
:(
NSStringDrawingUsesLineFragmentOrigin
|
NSStringDrawingUsesFontLeading
)
attributes
:
@{
NSFontAttributeName
:
[
UIFont
systemFontOfSize
:
KFont
(
12
)]}
context
:
nil
];
UILabel
*
desLab
=
[[
UILabel
alloc
]
initWithFrame
:
CGRectMake
(
KScaleWidth
(
10
),
self
.
mainScrollView
.
contentSize
.
height
,
KScreenWidth
-
KScaleWidth
(
20
),
rect
.
size
.
height
)];
desLab
.
textColor
=
[
UIColor
whiteColor
];
desLab
.
text
=
des
;
desLab
.
numberOfLines
=
0
;
desLab
.
font
=
[
UIFont
systemFontOfSize
:
KFont
(
12
)];
[
self
.
mainScrollView
addSubview
:
desLab
];
//
UILabel * desLab = [[UILabel alloc] initWithFrame:CGRectMake(KScaleWidth(10), self.mainScrollView.contentSize.height, KScreenWidth-KScaleWidth(20), rect.size.height)];
//
desLab.textColor = [UIColor whiteColor];
//
desLab.text = des;
//
desLab.numberOfLines = 0;
//
desLab.font = [UIFont systemFontOfSize:KFont(12)];
//
[self.mainScrollView addSubview:desLab];
self
.
mainScrollView
.
contentSize
=
CGSizeMake
(
0
,
self
.
mainScrollView
.
contentSize
.
height
+
rect
.
size
.
height
+
KScaleWidth
(
10
));
NSMutableAttributedString
*
attributeStr
=
[[
NSMutableAttributedString
alloc
]
initWithString
:
des
];
[
attributeStr
addAttribute
:
NSLinkAttributeName
value
:
@"user://"
range
:
[
des
rangeOfString
:
kLocalizedString
(
@"setting_service"
)]];
[
attributeStr
addAttribute
:
NSLinkAttributeName
value
:
@"privacy://"
range
:
[
des
rangeOfString
:
kLocalizedString
(
@"setting_privacy"
)]];
[
attributeStr
addAttributes
:@{
NSFontAttributeName
:
[
UIFont
systemFontOfSize
:
KFont
(
12
)]}
range
:
NSMakeRange
(
0
,
attributeStr
.
length
)];
UITextView
*
textView
=
[[
UITextView
alloc
]
init
];
textView
.
frame
=
CGRectMake
(
KScaleWidth
(
10
),
self
.
mainScrollView
.
contentSize
.
height
,
KScreenWidth
-
KScaleWidth
(
20
),
rect
.
size
.
height
+
KScaleWidth
(
32
));
textView
.
backgroundColor
=
[
UIColor
clearColor
];
textView
.
attributedText
=
attributeStr
;
textView
.
linkTextAttributes
=
@{
NSUnderlineStyleAttributeName
:
@1
,
NSUnderlineColorAttributeName
:
[
UIColor
whiteColor
],
NSForegroundColorAttributeName
:
[
UIColor
whiteColor
]};
textView
.
delegate
=
self
;
textView
.
font
=
[
UIFont
systemFontOfSize
:
KFont
(
12
)];
textView
.
textColor
=
[
UIColor
whiteColor
];
textView
.
textAlignment
=
NSTextAlignmentLeft
;
textView
.
showsHorizontalScrollIndicator
=
NO
;
textView
.
showsVerticalScrollIndicator
=
NO
;
textView
.
editable
=
NO
;
//必须禁止输入,否则点击将弹出输入键盘
[
self
.
mainScrollView
addSubview
:
textView
];
self
.
mainScrollView
.
contentSize
=
CGSizeMake
(
0
,
self
.
mainScrollView
.
contentSize
.
height
+
rect
.
size
.
height
+
KScaleWidth
(
32
));
self
.
mainScrollView
.
backgroundColor
=
kColorFromRGB
(
0x568EFC
);
}
}
...
...
@@ -292,4 +312,35 @@
return
0
;
}
#pragma mark textView
-
(
BOOL
)
textView
:
(
UITextView
*
)
textView
shouldInteractWithURL
:
(
NSURL
*
)
URL
inRange
:
(
NSRange
)
characterRange
interaction
:
(
UITextItemInteraction
)
interaction
{
NSDictionary
*
dic
=
[
ZJUserInfoManager
shared
].
h5_url
;
if
([
URL
.
scheme
isEqualToString
:
@"user"
]){
NSLog
(
kLocalizedString
(
@"setting_service"
));
BaseWebViewController
*
web
=
[[
BaseWebViewController
alloc
]
init
];
web
.
url
=
[
dic
objectForKey
:
@"user"
];
web
.
title
=
kLocalizedString
(
@"setting_service"
);
web
.
neverRefreshTitle
=
YES
;
BaseNavigationViewController
*
nav
=
[[
BaseNavigationViewController
alloc
]
initWithRootViewController
:
web
];
[
self
presentViewController
:
nav
animated
:
YES
completion
:
nil
];
return
NO
;
}
else
if
([
URL
.
scheme
isEqualToString
:
@"privacy"
]){
NSLog
(
kLocalizedString
(
@"setting_privacy"
));
BaseWebViewController
*
web
=
[[
BaseWebViewController
alloc
]
init
];
web
.
url
=
[
dic
objectForKey
:
@"privacy"
];
web
.
title
=
kLocalizedString
(
@"setting_privacy"
);
web
.
neverRefreshTitle
=
YES
;
BaseNavigationViewController
*
nav
=
[[
BaseNavigationViewController
alloc
]
initWithRootViewController
:
web
];
[
self
presentViewController
:
nav
animated
:
YES
completion
:
nil
];
return
NO
;
}
return
YES
;
}
@end
ZhiJi/Classes/Goods/Controller/ZTPurchaseManager.swift
View file @
bfbfefee
...
...
@@ -23,7 +23,7 @@ class ZTPurchaseManager: NSObject {
switch
result
{
case
.
success
(
let
product
):
print
(
"Purchase Success:
\(
product
.
productId
)
"
)
let
receiptData
=
SwiftyStoreKit
.
localReceiptData
let
receiptString
=
receiptData
?
.
base64EncodedString
(
options
:
[])
??
""
print
(
"receiptString:
\(
receiptString
)
"
)
...
...
ZhiJi/Classes/Tools/UserInfoManager/ZJUserInfoManager.m
View file @
bfbfefee
...
...
@@ -263,7 +263,6 @@ static ZJUserInfoManager * manager;
[
MBProgressHUD
showError
:[
response
objectForKey
:
@"msg"
]];
}
}
failure
:^
(
NSError
*
_Nonnull
error
)
{
}];
...
...
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