Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
S
ShorthandMaster
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
ShorthandMaster
Commits
6d626ed9
Commit
6d626ed9
authored
Sep 03, 2020
by
lmj_521aiau@163.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
ca98cde2
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
35 additions
and
47 deletions
+35
-47
project.pbxproj
ShorthandMaster.xcodeproj/project.pbxproj
+4
-4
AppDelegate.swift
ShorthandMaster/AppDelegate.swift
+4
-1
SHWebViewController.swift
ShorthandMaster/Base/SHWebViewController.swift
+1
-1
Goods.storyboard
ShorthandMaster/Goods/Goods.storyboard
+2
-1
SHGoodsViewController.swift
ShorthandMaster/Goods/SHGoodsViewController.swift
+5
-0
Info.plist
ShorthandMaster/Info.plist
+0
-2
PrefixHeader.pch
ShorthandMaster/PrefixHeader.pch
+0
-32
SHRecordViewController.swift
ShorthandMaster/Record/SHRecordViewController.swift
+13
-0
SHStoreManager.swift
ShorthandMaster/Share/Managers/SHStoreManager.swift
+5
-5
SHUserAccountManager.swift
ShorthandMaster/Share/Managers/SHUserAccountManager.swift
+1
-1
No files found.
ShorthandMaster.xcodeproj/project.pbxproj
View file @
6d626ed9
...
...
@@ -1115,7 +1115,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME
=
AppIcon
;
CODE_SIGN_ENTITLEMENTS
=
"ShorthandMaster/速记大师.entitlements"
;
CODE_SIGN_STYLE
=
Automatic
;
CURRENT_PROJECT_VERSION
=
1
;
CURRENT_PROJECT_VERSION
=
2
;
DEFINES_MODULE
=
YES
;
DEVELOPMENT_TEAM
=
8F4PP38DC3
;
GCC_INPUT_FILETYPE
=
automatic
;
...
...
@@ -1136,7 +1136,7 @@
SWIFT_OBJC_BRIDGING_HEADER
=
"$(SRCROOT)/ShorthandMaster/ShorthandMaster-Bridging-Header.h"
;
SWIFT_OBJC_INTERFACE_HEADER_NAME
=
"ShorthandMaster-Swift.h"
;
SWIFT_VERSION
=
5.0
;
TARGETED_DEVICE_FAMILY
=
"1,2"
;
TARGETED_DEVICE_FAMILY
=
1
;
};
name
=
Debug
;
};
...
...
@@ -1147,7 +1147,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME
=
AppIcon
;
CODE_SIGN_ENTITLEMENTS
=
"ShorthandMaster/速记大师.entitlements"
;
CODE_SIGN_STYLE
=
Automatic
;
CURRENT_PROJECT_VERSION
=
1
;
CURRENT_PROJECT_VERSION
=
2
;
DEFINES_MODULE
=
YES
;
DEVELOPMENT_TEAM
=
8F4PP38DC3
;
GCC_INPUT_FILETYPE
=
automatic
;
...
...
@@ -1168,7 +1168,7 @@
SWIFT_OBJC_BRIDGING_HEADER
=
"$(SRCROOT)/ShorthandMaster/ShorthandMaster-Bridging-Header.h"
;
SWIFT_OBJC_INTERFACE_HEADER_NAME
=
"ShorthandMaster-Swift.h"
;
SWIFT_VERSION
=
5.0
;
TARGETED_DEVICE_FAMILY
=
"1,2"
;
TARGETED_DEVICE_FAMILY
=
1
;
};
name
=
Release
;
};
...
...
ShorthandMaster/AppDelegate.swift
View file @
6d626ed9
...
...
@@ -40,5 +40,8 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
return
true
}
func
applicationDidBecomeActive
(
_
application
:
UIApplication
)
{
NotificationCenter
.
default
.
post
(
name
:
NSNotification
.
Name
(
rawValue
:
"recordAlive"
),
object
:
nil
)
}
}
ShorthandMaster/Base/SHWebViewController.swift
View file @
6d626ed9
...
...
@@ -78,7 +78,7 @@ class SHWebViewController: SHBaseViewController {
})
if
presentingViewController
!=
nil
{
self
.
navigationItem
.
leftBarButtonItem
=
UIBarButtonItem
.
init
(
image
:
UIImage
(
named
:
"nav_
left
"
),
style
:
.
done
,
target
:
self
,
action
:
#selector(
backSwipeGestureAction
)
)
self
.
navigationItem
.
leftBarButtonItem
=
UIBarButtonItem
.
init
(
image
:
UIImage
(
named
:
"nav_
back
"
),
style
:
.
done
,
target
:
self
,
action
:
#selector(
backSwipeGestureAction
)
)
}
}
...
...
ShorthandMaster/Goods/Goods.storyboard
View file @
6d626ed9
...
...
@@ -16,7 +16,7 @@
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"375"
height=
"812"
/>
<autoresizingMask
key=
"autoresizingMask"
widthSizable=
"YES"
heightSizable=
"YES"
/>
<subviews>
<imageView
clipsSubviews=
"YES"
userInteractionEnabled=
"NO"
contentMode=
"scaleAspectFi
t
"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
image=
"goods_bg"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"iye-Iu-Z0h"
>
<imageView
clipsSubviews=
"YES"
userInteractionEnabled=
"NO"
contentMode=
"scaleAspectFi
ll
"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
image=
"goods_bg"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"iye-Iu-Z0h"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"375"
height=
"510"
/>
<constraints>
<constraint
firstAttribute=
"width"
secondItem=
"iye-Iu-Z0h"
secondAttribute=
"height"
multiplier=
"375:510"
id=
"P6H-DC-o9o"
/>
...
...
@@ -365,6 +365,7 @@
<viewLayoutGuide
key=
"safeArea"
id=
"vu7-FC-44s"
/>
</view>
<connections>
<outlet
property=
"bgImvConstaint"
destination=
"P6H-DC-o9o"
id=
"xdP-K4-4SM"
/>
<outlet
property=
"yearStoreBtn"
destination=
"Soc-NE-Z9a"
id=
"gtO-sc-RfA"
/>
<outlet
property=
"yearStoreBtnBgView"
destination=
"7CA-md-1C7"
id=
"6wY-y2-b5j"
/>
<outlet
property=
"yearStoreLab"
destination=
"bYQ-iK-LKQ"
id=
"2Sn-TX-2Bt"
/>
...
...
ShorthandMaster/Goods/SHGoodsViewController.swift
View file @
6d626ed9
...
...
@@ -14,6 +14,8 @@ class SHGoodsViewController: SHBaseViewController {
@IBOutlet
weak
var
yearStoreBtn
:
UIButton
!
@IBOutlet
weak
var
yearStoreBtnBgView
:
UIView
!
@IBOutlet
weak
var
bgImvConstaint
:
NSLayoutConstraint
!
@objc
public
var
logValue
:
String
?
let
startTime
:
CFTimeInterval
=
CACurrentMediaTime
()
...
...
@@ -31,6 +33,9 @@ class SHGoodsViewController: SHBaseViewController {
let
params
=
[
"event"
:
"guazinovel"
,
"action"
:
"pay_page_show"
,
"value"
:
logValue
]
CMNetworkManager
.
shared
.
postLogRequest
(
withPath
:
.
logCollection
,
parameters
:
params
as
[
String
:
Any
])
{
(
json
,
error
)
in
}
if
UIDevice
.
init
()
.
type
==
.
iPad
{
bgImvConstaint
.
constant
=
SCREEN_HEIGHT
/
4
}
}
override
func
viewWillAppear
(
_
animated
:
Bool
)
{
...
...
ShorthandMaster/Info.plist
View file @
6d626ed9
...
...
@@ -52,8 +52,6 @@
<
k
e
y
>
UISupportedInterfaceOrientations
<
/k
e
y
>
<
a
rr
a
y
>
<
string
>
UIInterfaceOrientationPortrait
<
/string
>
<
string
>
UIInterfaceOrientationLandscapeLeft
<
/string
>
<
string
>
UIInterfaceOrientationLandscapeRight
<
/string
>
<
/
a
rr
a
y
>
<
k
e
y
>
UISupportedInterfaceOrientations
~
ipad
<
/k
e
y
>
<
a
rr
a
y
>
...
...
ShorthandMaster/PrefixHeader.pch
View file @
6d626ed9
...
...
@@ -81,38 +81,6 @@ isPhoneX = [[UIApplication sharedApplication] delegate].window.safeAreaInsets.bo
#import "ShorthandMaster-Swift.h"
// 第三方头文件
#import <Masonry.h>
//#import <YYModel.h>
//#import <SDWebImage.h>
//#import <MBProgressHUD/MBProgressHUD.h>
//#import "BasicMacro.h"
//#import "Data.h"
//#import <IQKeyboardManager/IQKeyboardManager.h>
//#import "SDAutoLayout.h"
//#import "MBProgressHUD+MJ.h"
//#import <MJRefresh/MJRefresh.h>
//#import <UMCommon/MobClick.h>
//#import "DESTool.h"
//#import <Bugly/Bugly.h>
//
////分类的头文件
//#import "UIColor+HExtension.h"
//#import "UILabel+HExtension.h"
//#import "UIView+HExtension.h"
//#import "UIView+Toast.h"
//#import "UIButton+HExtension.h"
//#import "UITableViewCell+Category.h"
//#import "UIControl+Extension.h"
//// 公共类的头文件
//#import "HCoverView.h"
//#import "ZJBaseViewController.h"
//#import "TQNetworkTools.h"
//#import "ZJBasetableView.h"
//#import "ZJNavViewController.h"
//#import "ZJAccountManager.h"
//#import "ZJZMFAPIFactory.h"
//// 网络资源文件
//#import "ResourceHeader.pch"
//#import "ControlSwitch.h"
#ifndef PrefixHeader_pch
#define PrefixHeader_pch
...
...
ShorthandMaster/Record/SHRecordViewController.swift
View file @
6d626ed9
...
...
@@ -79,7 +79,20 @@ class SHRecordViewController: SHBaseViewController{
setupUI
()
configPathFile
()
configRecorder
()
NotificationCenter
.
default
.
addObserver
(
self
,
selector
:
#selector(
backGroundAlive
)
,
name
:
NSNotification
.
Name
(
rawValue
:
"recordAlive"
),
object
:
nil
)
}
override
func
viewDidDisappear
(
_
animated
:
Bool
)
{
NotificationCenter
.
default
.
removeObserver
(
self
)
}
@objc
func
backGroundAlive
(){
if
recorder
?
.
isRecording
==
true
&&
recognitionTask
?
.
isFinishing
==
true
{
configSpeechTask
()
}
}
override
func
setupUI
()
{
super
.
setupUI
()
...
...
ShorthandMaster/Share/Managers/SHStoreManager.swift
View file @
6d626ed9
...
...
@@ -13,17 +13,17 @@ class SHStoreManager: NSObject {
@objc
class
func
purchaseWithProductId
(
productId
:
String
,
inView
:
UIView
,
success
:
@escaping(()
->
Void
)
,
faliure
:
@escaping((String)
->
Void
))
{
let
hud
=
MBProgressHUD
.
show
(
"支付中..."
,
view
:
inView
)
MBProgressHUD
.
showMessage
(
"支付中..."
,
delayTime
:
90
,
mode
:
.
indeterminate
,
to
:
inView
)
SwiftyStoreKit
.
purchaseProduct
(
productId
,
quantity
:
1
,
atomically
:
true
)
{
result
in
hud
?
.
hide
(
animated
:
true
)
MBProgressHUD
.
hide
(
for
:
inView
)
switch
result
{
case
.
success
(
let
product
):
log
(
"Purchase Success:
\(
product
.
productId
)
"
)
let
appleValidator
=
AppleReceiptValidator
(
service
:
.
production
,
sharedSecret
:
"fea7fab4406346e783c9f7d966ea8041"
)
let
innerHud
=
MBProgressHUD
.
show
(
"校验中..."
,
view
:
inView
)
MBProgressHUD
.
showMessage
(
"校验中..."
,
delayTime
:
90
,
mode
:
.
indeterminate
,
to
:
inView
)
SwiftyStoreKit
.
verifyReceipt
(
using
:
appleValidator
)
{
result
in
innerHud
?
.
hide
(
animated
:
true
)
MBProgressHUD
.
hide
(
for
:
inView
)
if
case
.
success
(
let
receipt
)
=
result
{
let
purchaseResult
=
SwiftyStoreKit
.
verifySubscription
(
ofType
:
.
autoRenewable
,
...
...
@@ -68,7 +68,7 @@ class SHStoreManager: NSObject {
print
(
"productId transactionId receiptData:
\(
dict
)
"
)
// TODO: 服务器验证
CMNetworkManager
.
shared
.
postRequestWithBody
(
withPath
:
.
iosIPAVerifyReceipt
,
body
:
dict
)
{
(
json
,
error
)
in
innerHud
?
.
hide
(
animated
:
true
)
MBProgressHUD
.
hide
(
for
:
inView
)
print
(
"success----iosIPAVerifyReceipt-----------------
\(
json
)
------"
)
let
result
:
Bool
=
json
[
"result"
][
"data"
][
"status"
]
.
boolValue
...
...
ShorthandMaster/Share/Managers/SHUserAccountManager.swift
View file @
6d626ed9
...
...
@@ -34,7 +34,7 @@ import SwiftyJSON
@objc
var
isMember
:
Bool
{
//
return true
return
true
let
dateFormatter
=
DateFormatter
()
dateFormatter
.
locale
=
Locale
(
identifier
:
"en_CN"
)
...
...
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