Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
A
ALand
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张杰
ALand
Commits
1c201bb3
Commit
1c201bb3
authored
Aug 26, 2016
by
Sandy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改bug
parent
041c3ee6
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
25 changed files
with
419 additions
and
44 deletions
+419
-44
project.pbxproj
ALand.xcodeproj/project.pbxproj
+27
-17
AppDelegate.m
ALand/Application/AppDelegate.m
+16
-0
Contents.json
ALand/Assets.xcassets/pingpp_alipay.imageset/Contents.json
+21
-0
pingpp_alipay.png
.../Assets.xcassets/pingpp_alipay.imageset/pingpp_alipay.png
+0
-0
Contents.json
ALand/Assets.xcassets/pingpp_wepay.imageset/Contents.json
+21
-0
pingpp_wepay.png
ALand/Assets.xcassets/pingpp_wepay.imageset/pingpp_wepay.png
+0
-0
HomeCollectionViewController.m
...eClass/Home/ViewController/HomeCollectionViewController.m
+0
-1
OrderDetailViewController.m
...ass/Home/ViewController/Order/OrderDetailViewController.m
+1
-1
StoreManagermentViewController.xib
...oller/StoreManagerment/StoreManagermentViewController.xib
+3
-3
StoreNameViewController.xib
...ewController/StoreManagerment/StoreNameViewController.xib
+2
-2
StoreQRCodeViewController.xib
...Controller/StoreManagerment/StoreQRCodeViewController.xib
+4
-4
introductionViewController.xib
...ontroller/StoreManagerment/introductionViewController.xib
+2
-2
WebViewController.m
ALand/CodeClass/Home/WebViewController.m
+53
-1
ChangeUserSignatureViewController.m
...s/MIne/ViewController/ChangeUserSignatureViewController.m
+1
-1
ChangeUserSignatureViewController.xib
...MIne/ViewController/ChangeUserSignatureViewController.xib
+4
-4
MineViewController.m
ALand/CodeClass/MIne/ViewController/MineViewController.m
+0
-1
SettingViewController.m
ALand/CodeClass/MIne/ViewController/SettingViewController.m
+1
-1
SettingViewController.xib
...d/CodeClass/MIne/ViewController/SettingViewController.xib
+2
-2
CoverShadowView.m
ALand/Global/CoverShadowView.m
+2
-0
NavigationbarView.xib
ALand/Global/NavigationbarView.xib
+2
-2
ShareContentView.xib
ALand/Global/ShareView/ShareContentView.xib
+2
-2
PayView.h
ALand/Global/pay/PayView.h
+18
-0
PayView.m
ALand/Global/pay/PayView.m
+129
-0
PayView.xib
ALand/Global/pay/PayView.xib
+100
-0
Info.plist
ALand/Info.plist
+8
-0
No files found.
ALand.xcodeproj/project.pbxproj
View file @
1c201bb3
This diff is collapsed.
Click to expand it.
ALand/Application/AppDelegate.m
View file @
1c201bb3
...
...
@@ -15,6 +15,7 @@
#import "IQKeyboardManager.h"
#import "ZCUIBaseController.h"
#import "MobClick.h"
#import "Pingpp.h"
@interface
AppDelegate
()
@end
...
...
@@ -66,6 +67,21 @@
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
}
-
(
BOOL
)
application
:
(
UIApplication
*
)
application
openURL
:
(
NSURL
*
)
url
sourceApplication
:
(
NSString
*
)
sourceApplication
annotation
:
(
id
)
annotation
{
BOOL
canHandleURL
=
[
Pingpp
handleOpenURL
:
url
withCompletion
:
nil
];
return
canHandleURL
;
}
-
(
BOOL
)
application
:
(
UIApplication
*
)
app
openURL
:
(
NSURL
*
)
url
options
:
(
NSDictionary
*
)
options
{
BOOL
canHandleURL
=
[
Pingpp
handleOpenURL
:
url
withCompletion
:
nil
];
return
canHandleURL
;
}
-
(
void
)
applicationWillEnterForeground
:
(
UIApplication
*
)
application
{
// Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
}
...
...
ALand/Assets.xcassets/pingpp_alipay.imageset/Contents.json
0 → 100644
View file @
1c201bb3
{
"images"
:
[
{
"idiom"
:
"universal"
,
"filename"
:
"pingpp_alipay.png"
,
"scale"
:
"1x"
},
{
"idiom"
:
"universal"
,
"scale"
:
"2x"
},
{
"idiom"
:
"universal"
,
"scale"
:
"3x"
}
],
"info"
:
{
"version"
:
1
,
"author"
:
"xcode"
}
}
\ No newline at end of file
ALand/Assets.xcassets/pingpp_alipay.imageset/pingpp_alipay.png
0 → 100644
View file @
1c201bb3
1.32 KB
ALand/Assets.xcassets/pingpp_wepay.imageset/Contents.json
0 → 100644
View file @
1c201bb3
{
"images"
:
[
{
"idiom"
:
"universal"
,
"filename"
:
"pingpp_wepay.png"
,
"scale"
:
"1x"
},
{
"idiom"
:
"universal"
,
"scale"
:
"2x"
},
{
"idiom"
:
"universal"
,
"scale"
:
"3x"
}
],
"info"
:
{
"version"
:
1
,
"author"
:
"xcode"
}
}
\ No newline at end of file
ALand/Assets.xcassets/pingpp_wepay.imageset/pingpp_wepay.png
0 → 100644
View file @
1c201bb3
1.24 KB
ALand/CodeClass/Home/ViewController/HomeCollectionViewController.m
View file @
1c201bb3
...
...
@@ -113,7 +113,6 @@
-
(
UICollectionReusableView
*
)
collectionView
:
(
UICollectionView
*
)
collectionView
viewForSupplementaryElementOfKind
:
(
NSString
*
)
kind
atIndexPath
:
(
NSIndexPath
*
)
indexPath
{
HomeCollectionFooterReusableView
*
footer
=
[
collectionView
dequeueReusableSupplementaryViewOfKind
:
UICollectionElementKindSectionFooter
withReuseIdentifier
:
@"footer"
forIndexPath
:
indexPath
];
return
footer
;
...
...
ALand/CodeClass/Home/ViewController/Order/OrderDetailViewController.m
View file @
1c201bb3
...
...
@@ -56,7 +56,7 @@
self
.
tableView
.
tableFooterView
=
self
.
bottomView
;
//底部查看物流按钮
if
([
self
.
orderType
isEqualToString
:
@"待支付"
])
{
if
([
[
self
.
model
.
state
getOrderStateString
]
isEqualToString
:
@"待支付"
])
{
SeeLogistics
*
viewBottom
=
[
SeeLogistics
viewWithNibName
:
@"SeeLogistics"
];
[
viewBottom
.
btn
addTarget
:
self
action
:
@selector
(
actionPay
)
forControlEvents
:
UIControlEventTouchUpInside
];
viewBottom
.
frame
=
CGRectMake
(
0
,
kHeight
-
64
-
65
,
kWidth
,
64
+
65
);
...
...
ALand/CodeClass/Home/ViewController/StoreManagerment/StoreManagermentViewController.xib
View file @
1c201bb3
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.XIB"
version=
"3.0"
toolsVersion=
"953
2"
systemVersion=
"15D21
"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
useAutolayout=
"YES"
useTraitCollections=
"YES"
>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.XIB"
version=
"3.0"
toolsVersion=
"953
1"
systemVersion=
"15E65
"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
useAutolayout=
"YES"
useTraitCollections=
"YES"
>
<dependencies>
<deployment
identifier=
"iOS"
/>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"95
30
"
/>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"95
29
"
/>
<capability
name=
"Alignment constraints to the first baseline"
minToolsVersion=
"6.0"
/>
<capability
name=
"Constraints to layout margins"
minToolsVersion=
"6.0"
/>
</dependencies>
...
...
@@ -441,7 +441,7 @@
<view
contentMode=
"scaleToFill"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"Pg9-CX-6W2"
customClass=
"CommodityManagementTopView"
>
<rect
key=
"frame"
x=
"0.0"
y=
"149"
width=
"375"
height=
"120"
/>
<subviews>
<imageView
userInteractionEnabled=
"NO"
contentMode=
"scaleAspectFit"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
image=
"btn_share_shop"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"yIe-a5-tja"
>
<imageView
userInteractionEnabled=
"NO"
contentMode=
"scaleAspectFit"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
misplaced=
"YES"
image=
"btn_share_shop"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"yIe-a5-tja"
>
<rect
key=
"frame"
x=
"128"
y=
"16"
width=
"119"
height=
"86"
/>
<constraints>
<constraint
firstAttribute=
"height"
constant=
"86"
id=
"Zet-JI-aB2"
/>
...
...
ALand/CodeClass/Home/ViewController/StoreManagerment/StoreNameViewController.xib
View file @
1c201bb3
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.XIB"
version=
"3.0"
toolsVersion=
"953
2"
systemVersion=
"15D21
"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
useAutolayout=
"YES"
useTraitCollections=
"YES"
>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.XIB"
version=
"3.0"
toolsVersion=
"953
1"
systemVersion=
"15E65
"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
useAutolayout=
"YES"
useTraitCollections=
"YES"
>
<dependencies>
<deployment
identifier=
"iOS"
/>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"95
30
"
/>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"95
29
"
/>
</dependencies>
<objects>
<placeholder
placeholderIdentifier=
"IBFilesOwner"
id=
"-1"
userLabel=
"File's Owner"
customClass=
"StoreNameViewController"
>
...
...
ALand/CodeClass/Home/ViewController/StoreManagerment/StoreQRCodeViewController.xib
View file @
1c201bb3
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.XIB"
version=
"3.0"
toolsVersion=
"953
2"
systemVersion=
"15D21
"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
useAutolayout=
"YES"
useTraitCollections=
"YES"
>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.XIB"
version=
"3.0"
toolsVersion=
"953
1"
systemVersion=
"15E65
"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
useAutolayout=
"YES"
useTraitCollections=
"YES"
>
<dependencies>
<deployment
identifier=
"iOS"
/>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"95
30
"
/>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"95
29
"
/>
</dependencies>
<objects>
<placeholder
placeholderIdentifier=
"IBFilesOwner"
id=
"-1"
userLabel=
"File's Owner"
customClass=
"StoreQRCodeViewController"
>
...
...
@@ -17,10 +17,10 @@
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"375"
height=
"667"
/>
<autoresizingMask
key=
"autoresizingMask"
widthSizable=
"YES"
heightSizable=
"YES"
/>
<subviews>
<view
contentMode=
"scaleToFill"
misplaced=
"YES"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"RFH-hd-LUV"
>
<view
contentMode=
"scaleToFill"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"RFH-hd-LUV"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"375"
height=
"349"
/>
<subviews>
<imageView
userInteractionEnabled=
"NO"
contentMode=
"scaleAspectFit"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
misplaced=
"YES"
image=
"erweima_结果"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"bLf-3W-zks"
>
<imageView
userInteractionEnabled=
"NO"
contentMode=
"scaleAspectFit"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
image=
"erweima_结果"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"bLf-3W-zks"
>
<rect
key=
"frame"
x=
"50"
y=
"50"
width=
"275"
height=
"249"
/>
</imageView>
</subviews>
...
...
ALand/CodeClass/Home/ViewController/StoreManagerment/introductionViewController.xib
View file @
1c201bb3
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.XIB"
version=
"3.0"
toolsVersion=
"953
2"
systemVersion=
"15D21
"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
useAutolayout=
"YES"
useTraitCollections=
"YES"
>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.XIB"
version=
"3.0"
toolsVersion=
"953
1"
systemVersion=
"15E65
"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
useAutolayout=
"YES"
useTraitCollections=
"YES"
>
<dependencies>
<deployment
identifier=
"iOS"
/>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"95
30
"
/>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"95
29
"
/>
</dependencies>
<objects>
<placeholder
placeholderIdentifier=
"IBFilesOwner"
id=
"-1"
userLabel=
"File's Owner"
customClass=
"introductionViewController"
>
...
...
ALand/CodeClass/Home/WebViewController.m
View file @
1c201bb3
...
...
@@ -8,10 +8,17 @@
#import "WebViewController.h"
#import <WebKit/WebKit.h>
#import <ifaddrs.h>
#import <arpa/inet.h>
#import "Pingpp.h"
#import "PayView.h"
#import "OrderViewController.h"
@interface
WebViewController
()
<
WKNavigationDelegate
,
WKUIDelegate
,
WKScriptMessageHandler
>
@property
(
nonatomic
,
weak
)
WKWebView
*
webView
;
@property
(
nonatomic
,
weak
)
UIButton
*
backItem
;
@property
(
nonatomic
,
weak
)
UIButton
*
closeItem
;
@property
(
nonatomic
,
strong
)
PayView
*
payView
;
@end
@implementation
WebViewController
...
...
@@ -58,7 +65,52 @@
/**
* body = 000100012016080100012;
*/
NSString
*
orderUuid
=
message
.
body
;
NSString
*
billNumber
=
message
.
body
;
NSDictionary
*
dic
=
billNumber
.
mj_keyValues
;
self
.
payView
=
[
PayView
viewWithNibName
:
@"PayView"
];
self
.
payView
.
ownerBillNumber
=
dic
[
@"body"
];
WS
(
weakSelf
);
UIAlertController
*
alertVC
=
[
UIAlertController
alertControllerWithTitle
:
@"订单提交成功"
message
:
@"是否立即支付?
\n
如稍后支付,可在订单管理中继续支付"
preferredStyle
:
UIAlertControllerStyleAlert
];
UIAlertAction
*
yes
=
[
UIAlertAction
actionWithTitle
:
@"立即支付"
style
:
UIAlertActionStyleCancel
handler
:^
(
UIAlertAction
*
_Nonnull
action
)
{
[
weakSelf
.
payView
show
];
}];
[
alertVC
addAction
:
yes
];
UIAlertAction
*
cancel
=
[
UIAlertAction
actionWithTitle
:
@"稍后支付"
style
:
UIAlertActionStyleDefault
handler
:^
(
UIAlertAction
*
_Nonnull
action
)
{
[
weakSelf
.
webView
loadRequest
:[
NSURLRequest
requestWithURL
:[
NSURL
URLWithString
:
self
.
URL
]]];
}];
[
alertVC
addAction
:
cancel
];
[
self
.
navigationController
PresentModalViewController
:
alertVC
animated
:
YES
];
self
.
payView
.
completion
=
^
(
NSString
*
result
,
PingppError
*
error
)
{
if
(
result
)
{
[
weakSelf
.
payView
hide
];
NSString
*
info
;
if
([
result
isEqualToString
:
@"cancel"
])
{
info
=
@"支付未完成"
;
}
else
if
([
result
isEqualToString
:
@"success"
]){
info
=
@"支付成功"
;
}
else
if
([
result
isEqualToString
:
@"fail"
]){
info
=
@"支付失败"
;
}
UIAlertController
*
alert
=
[
UIAlertController
alertControllerWithTitle
:
info
message
:
@"订单可在订单管理中查看"
preferredStyle
:
UIAlertControllerStyleAlert
];
UIAlertAction
*
toOrders
=
[
UIAlertAction
actionWithTitle
:
@"查看订单"
style
:
UIAlertActionStyleDefault
handler
:^
(
UIAlertAction
*
_Nonnull
action
)
{
OrderViewController
*
orderVC
=
[[
OrderViewController
alloc
]
init
];
orderVC
.
isShowNavigationBar
=
YES
;
[
weakSelf
.
navigationController
pushViewController
:
orderVC
animated
:
YES
];
}];
[
alert
addAction
:
toOrders
];
UIAlertAction
*
continueBuy
=
[
UIAlertAction
actionWithTitle
:
@"继续购买"
style
:
UIAlertActionStyleDefault
handler
:^
(
UIAlertAction
*
_Nonnull
action
)
{
[
weakSelf
.
webView
loadRequest
:[
NSURLRequest
requestWithURL
:[
NSURL
URLWithString
:
weakSelf
.
URL
]]];
}];
[
alert
addAction
:
continueBuy
];
[
weakSelf
.
navigationController
PresentModalViewController
:
alert
animated
:
YES
];
}
};
NSLog
(
@"%@"
,
message
.
body
);
}
}
...
...
ALand/CodeClass/MIne/ViewController/ChangeUserSignatureViewController.m
View file @
1c201bb3
...
...
@@ -17,7 +17,7 @@
-
(
void
)
viewDidLoad
{
[
super
viewDidLoad
];
self
.
textViewTop
.
m_placeHolder
=
@"输入签名…"
;
self
.
textViewTop
.
m_placeHolder
=
@"输入
个性
签名…"
;
self
.
textViewTop
.
text
=
self
.
reseller
.
internalBaseClassDescription
;
self
.
textViewTop
.
delegate
=
self
;
// Do any additional setup after loading the view from its nib.
...
...
ALand/CodeClass/MIne/ViewController/ChangeUserSignatureViewController.xib
View file @
1c201bb3
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.XIB"
version=
"3.0"
toolsVersion=
"953
2"
systemVersion=
"15D21
"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
useAutolayout=
"YES"
useTraitCollections=
"YES"
>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.XIB"
version=
"3.0"
toolsVersion=
"953
1"
systemVersion=
"15E65
"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
useAutolayout=
"YES"
useTraitCollections=
"YES"
>
<dependencies>
<deployment
identifier=
"iOS"
/>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"95
30
"
/>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"95
29
"
/>
</dependencies>
<objects>
<placeholder
placeholderIdentifier=
"IBFilesOwner"
id=
"-1"
userLabel=
"File's Owner"
customClass=
"ChangeUserSignatureViewController"
>
...
...
@@ -38,8 +38,8 @@
<constraint
firstItem=
"CrZ-m0-0RR"
firstAttribute=
"top"
secondItem=
"Wcx-lp-EEk"
secondAttribute=
"top"
id=
"s5U-mq-SFw"
/>
</constraints>
</view>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"给自己设置一个签名吧!"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"glN-vA-Czn"
>
<rect
key=
"frame"
x=
"16"
y=
"223"
width=
"1
65
"
height=
"18"
/>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"
请
给自己设置一个签名吧!"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"glN-vA-Czn"
>
<rect
key=
"frame"
x=
"16"
y=
"223"
width=
"1
80
"
height=
"18"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"15"
/>
<color
key=
"textColor"
red=
"0.50823958329999996"
green=
"0.50823958329999996"
blue=
"0.50823958329999996"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
<nil
key=
"highlightedColor"
/>
...
...
ALand/CodeClass/MIne/ViewController/MineViewController.m
View file @
1c201bb3
...
...
@@ -90,7 +90,6 @@
[
self
.
navigationController
pushViewController
:
feedbackVC
animated
:
YES
];
}
//设置
-
(
IBAction
)
actionSetting
:
(
id
)
sender
{
SettingViewController
*
settingVC
=
[[
SettingViewController
alloc
]
init
];
...
...
ALand/CodeClass/MIne/ViewController/SettingViewController.m
View file @
1c201bb3
...
...
@@ -108,7 +108,7 @@
{
ChangeUserSignatureViewController
*
changeSignatureVC
=
[[
ChangeUserSignatureViewController
alloc
]
init
];
changeSignatureVC
.
isShowNavigationBar
=
YES
;
changeSignatureVC
.
title
=
@"
设置
签名"
;
changeSignatureVC
.
title
=
@"
个性
签名"
;
changeSignatureVC
.
reseller
=
self
.
reseller
;
[
self
PushViewController
:
changeSignatureVC
animated
:
YES
];
}
...
...
ALand/CodeClass/MIne/ViewController/SettingViewController.xib
View file @
1c201bb3
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.XIB"
version=
"3.0"
toolsVersion=
"953
2"
systemVersion=
"15D21
"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
useAutolayout=
"YES"
useTraitCollections=
"YES"
>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.XIB"
version=
"3.0"
toolsVersion=
"953
1"
systemVersion=
"15E65
"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
useAutolayout=
"YES"
useTraitCollections=
"YES"
>
<dependencies>
<deployment
identifier=
"iOS"
/>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"95
30
"
/>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"95
29
"
/>
</dependencies>
<objects>
<placeholder
placeholderIdentifier=
"IBFilesOwner"
id=
"-1"
userLabel=
"File's Owner"
customClass=
"SettingViewController"
>
...
...
ALand/Global/CoverShadowView.m
View file @
1c201bb3
...
...
@@ -54,6 +54,8 @@
WS
(
weakSelf
)
[
UIView
animateWithDuration
:
0
.
2
animations
:
^
{
weakSelf
.
alpha
=
0
;
}
completion
:^
(
BOOL
finished
)
{
}];
}
...
...
ALand/Global/NavigationbarView.xib
View file @
1c201bb3
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.XIB"
version=
"3.0"
toolsVersion=
"953
2"
systemVersion=
"15D21
"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
useAutolayout=
"YES"
useTraitCollections=
"YES"
>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.XIB"
version=
"3.0"
toolsVersion=
"953
1"
systemVersion=
"15E65
"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
useAutolayout=
"YES"
useTraitCollections=
"YES"
>
<dependencies>
<deployment
identifier=
"iOS"
/>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"95
30
"
/>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"95
29
"
/>
</dependencies>
<objects>
<placeholder
placeholderIdentifier=
"IBFilesOwner"
id=
"-1"
userLabel=
"File's Owner"
/>
...
...
ALand/Global/ShareView/ShareContentView.xib
View file @
1c201bb3
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.XIB"
version=
"3.0"
toolsVersion=
"953
2"
systemVersion=
"15D21
"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
useAutolayout=
"YES"
useTraitCollections=
"YES"
>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.XIB"
version=
"3.0"
toolsVersion=
"953
1"
systemVersion=
"15E65
"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
useAutolayout=
"YES"
useTraitCollections=
"YES"
>
<dependencies>
<deployment
identifier=
"iOS"
/>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"95
30
"
/>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"95
29
"
/>
</dependencies>
<objects>
<placeholder
placeholderIdentifier=
"IBFilesOwner"
id=
"-1"
userLabel=
"File's Owner"
/>
...
...
ALand/Global/pay/PayView.h
0 → 100644
View file @
1c201bb3
//
// PayView.h
// ALand
//
// Created by Javen on 16/8/19.
// Copyright © 2016年 Z. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "Pingpp.h"
@interface
PayView
:
UIView
@property
(
nonatomic
,
copy
)
NSString
*
billUuid
;
@property
(
nonatomic
,
copy
)
NSString
*
ownerBillNumber
;
@property
(
nonatomic
,
copy
)
PingppCompletion
completion
;
-
(
void
)
show
;
-
(
void
)
hide
;
@end
ALand/Global/pay/PayView.m
0 → 100644
View file @
1c201bb3
//
// PayView.m
// ALand
//
// Created by Javen on 16/8/19.
// Copyright © 2016年 Z. All rights reserved.
//
#import "PayView.h"
#import "CoverShadowView.h"
#import <ifaddrs.h>
#import <arpa/inet.h>
/**
* 目前仅支持微信和支付宝 = ['weixin', 'alipay', 'unionpay', 'applePay', 'pingplus', 'deposit'],
*/
static
CGFloat
const
H
=
100
;
static
NSString
*
const
chanelWX
=
@"weixin"
;
static
NSString
*
const
chanelAlipay
=
@"alipay"
;
typedef
NS_ENUM
(
NSInteger
,
payType
)
{
payTypeAlipay
=
0
,
payTypeWepay
,
};
@interface
PayView
()
@property
(
nonatomic
,
strong
)
CoverShadowView
*
cover
;
@end
@implementation
PayView
-
(
void
)
awakeFromNib
{
}
-
(
void
)
hide
{
[
self
.
cover
hide
];
[
UIView
animateWithDuration
:
0
.
3
animations
:
^
{
self
.
frame
=
CGRectMake
(
0
,
kHeight
,
kWidth
,
H
);
}];
}
-
(
void
)
show
{
[
self
.
cover
show
];
[
UIView
animateWithDuration
:
0
.
3
animations
:
^
{
self
.
frame
=
CGRectMake
(
0
,
kHeight
-
H
,
kWidth
,
H
);
}];
WS
(
weakSelf
)
self
.
cover
.
tapAction
=
^
{
[
weakSelf
hide
];
};
}
-
(
IBAction
)
payWithWX
:
(
id
)
sender
{
[
self
payWithChannel
:
chanelWX
];
}
-
(
IBAction
)
payWithAlipay
:
(
id
)
sender
{
[
self
payWithChannel
:
chanelAlipay
];
}
-
(
void
)
payWithChannel
:
(
NSString
*
)
chanel
{
NSDictionary
*
params
=
@{
@"operCtx"
:
[[
UserInfo
shareInstance
]
getOperCtx
],
@"pingppReq"
:
@{
@"billUuid"
:
self
.
billUuid
?
self
.
billUuid
:
[
NSNull
null
]
,
@"ownerBillNumber"
:
self
.
ownerBillNumber
?
self
.
ownerBillNumber
:
[
NSNull
null
],
@"payMethod"
:
chanel
,
@"clientIp"
:
[
self
getIPAddress
],
@"alipayExtra"
:
[
NSNull
null
],
@"wxpayExtra"
:
[
NSNull
null
]}};
[[
HTTPCilent
shareCilent
]
POST
:
@"order/prepay"
parameters
:
params
success
:^
(
NSURLSessionDataTask
*
task
,
id
responseObject
)
{
NSString
*
charge
=
responseObject
[
@"pingppCharge"
];
[
Pingpp
createPayment
:
charge
appURLScheme
:
@"wxb7c76f3ffc6b6e5e"
withCompletion
:
self
.
completion
];
}
failure
:^
(
NSURLSessionDataTask
*
task
,
NSError
*
error
)
{
}];
}
-
(
NSString
*
)
getIPAddress
{
NSString
*
address
=
@"error"
;
struct
ifaddrs
*
interfaces
=
NULL
;
struct
ifaddrs
*
temp_addr
=
NULL
;
int
success
=
0
;
// retrieve the current interfaces - returns 0 on success
success
=
getifaddrs
(
&
interfaces
);
if
(
success
==
0
)
{
// Loop through linked list of interfaces
temp_addr
=
interfaces
;
while
(
temp_addr
!=
NULL
)
{
if
(
temp_addr
->
ifa_addr
->
sa_family
==
AF_INET
)
{
// Check if interface is en0 which is the wifi connection on the iPhone
if
([[
NSString
stringWithUTF8String
:
temp_addr
->
ifa_name
]
isEqualToString
:
@"en0"
])
{
// Get NSString from C String
address
=
[
NSString
stringWithUTF8String
:
inet_ntoa
(((
struct
sockaddr_in
*
)
temp_addr
->
ifa_addr
)
->
sin_addr
)];
}
}
temp_addr
=
temp_addr
->
ifa_next
;
}
}
// Free memory
freeifaddrs
(
interfaces
);
return
address
;
}
-
(
CoverShadowView
*
)
cover
{
if
(
!
_cover
)
{
_cover
=
[[
CoverShadowView
alloc
]
initOnTopWithHeight
:
kHeight
];
[
kWindow
addSubview
:
_cover
];
self
.
top
=
kHeight
;
[
kWindow
addSubview
:
self
];
}
return
_cover
;
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
// Drawing code
}
*/
@end
ALand/Global/pay/PayView.xib
0 → 100644
View file @
1c201bb3
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.XIB"
version=
"3.0"
toolsVersion=
"9531"
systemVersion=
"15E65"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
useAutolayout=
"YES"
useTraitCollections=
"YES"
>
<dependencies>
<deployment
identifier=
"iOS"
/>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"9529"
/>
</dependencies>
<objects>
<placeholder
placeholderIdentifier=
"IBFilesOwner"
id=
"-1"
userLabel=
"File's Owner"
/>
<placeholder
placeholderIdentifier=
"IBFirstResponder"
id=
"-2"
customClass=
"UIResponder"
/>
<view
contentMode=
"scaleToFill"
id=
"iN0-l3-epB"
customClass=
"PayView"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"375"
height=
"100"
/>
<autoresizingMask
key=
"autoresizingMask"
widthSizable=
"YES"
heightSizable=
"YES"
/>
<subviews>
<view
contentMode=
"scaleToFill"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"YBD-X8-xoO"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"375"
height=
"50"
/>
<subviews>
<view
contentMode=
"scaleToFill"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"QR4-Pc-gWC"
>
<rect
key=
"frame"
x=
"0.0"
y=
"49"
width=
"375"
height=
"1"
/>
<color
key=
"backgroundColor"
white=
"0.66666666666666663"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
<constraints>
<constraint
firstAttribute=
"height"
constant=
"1"
id=
"waN-Wr-CKo"
/>
</constraints>
</view>
<button
opaque=
"NO"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"center"
contentVerticalAlignment=
"center"
lineBreakMode=
"middleTruncation"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"MWK-hV-3Wc"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"375"
height=
"49"
/>
<inset
key=
"titleEdgeInsets"
minX=
"30"
minY=
"0.0"
maxX=
"0.0"
maxY=
"0.0"
/>
<inset
key=
"imageEdgeInsets"
minX=
"0.0"
minY=
"0.0"
maxX=
"30"
maxY=
"0.0"
/>
<state
key=
"normal"
title=
"支付宝"
image=
"pingpp_alipay"
>
<color
key=
"titleColor"
white=
"0.0"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
</state>
<connections>
<action
selector=
"payWithAlipay:"
destination=
"iN0-l3-epB"
eventType=
"touchUpInside"
id=
"zTv-4E-qvE"
/>
</connections>
</button>
</subviews>
<color
key=
"backgroundColor"
white=
"1"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
<constraints>
<constraint
firstItem=
"QR4-Pc-gWC"
firstAttribute=
"top"
secondItem=
"MWK-hV-3Wc"
secondAttribute=
"bottom"
id=
"1kV-WQ-9M4"
/>
<constraint
firstItem=
"MWK-hV-3Wc"
firstAttribute=
"leading"
secondItem=
"YBD-X8-xoO"
secondAttribute=
"leading"
id=
"4cz-y6-ieN"
/>
<constraint
firstItem=
"QR4-Pc-gWC"
firstAttribute=
"leading"
secondItem=
"YBD-X8-xoO"
secondAttribute=
"leading"
id=
"684-cp-5V4"
/>
<constraint
firstAttribute=
"bottom"
secondItem=
"QR4-Pc-gWC"
secondAttribute=
"bottom"
id=
"BiJ-hh-Rlp"
/>
<constraint
firstAttribute=
"height"
constant=
"50"
id=
"Dcb-6A-9rB"
/>
<constraint
firstItem=
"MWK-hV-3Wc"
firstAttribute=
"top"
secondItem=
"YBD-X8-xoO"
secondAttribute=
"top"
id=
"iuc-t0-117"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"QR4-Pc-gWC"
secondAttribute=
"trailing"
id=
"kLb-g6-Knj"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"MWK-hV-3Wc"
secondAttribute=
"trailing"
id=
"nZK-SX-VvI"
/>
</constraints>
</view>
<view
contentMode=
"scaleToFill"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"3s7-wp-kL8"
>
<rect
key=
"frame"
x=
"0.0"
y=
"50"
width=
"375"
height=
"50"
/>
<subviews>
<view
contentMode=
"scaleToFill"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"X2o-9b-WwM"
>
<rect
key=
"frame"
x=
"0.0"
y=
"49"
width=
"375"
height=
"1"
/>
<color
key=
"backgroundColor"
white=
"0.66666666666666663"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
<constraints>
<constraint
firstAttribute=
"height"
constant=
"1"
id=
"ZUp-N0-82K"
/>
</constraints>
</view>
<button
opaque=
"NO"
tag=
"1"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"center"
contentVerticalAlignment=
"center"
lineBreakMode=
"middleTruncation"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"k9F-6d-7hC"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"375"
height=
"49"
/>
<inset
key=
"titleEdgeInsets"
minX=
"30"
minY=
"0.0"
maxX=
"0.0"
maxY=
"0.0"
/>
<inset
key=
"imageEdgeInsets"
minX=
"0.0"
minY=
"0.0"
maxX=
"30"
maxY=
"0.0"
/>
<state
key=
"normal"
title=
" 微信 "
image=
"pingpp_wepay"
>
<color
key=
"titleColor"
white=
"0.0"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
</state>
<connections>
<action
selector=
"payWithWX:"
destination=
"iN0-l3-epB"
eventType=
"touchUpInside"
id=
"1rO-nw-5Fh"
/>
</connections>
</button>
</subviews>
<color
key=
"backgroundColor"
white=
"1"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
<constraints>
<constraint
firstAttribute=
"height"
constant=
"50"
id=
"7Eb-Ni-h3i"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"k9F-6d-7hC"
secondAttribute=
"trailing"
id=
"Cwc-MG-kvO"
/>
<constraint
firstItem=
"k9F-6d-7hC"
firstAttribute=
"leading"
secondItem=
"3s7-wp-kL8"
secondAttribute=
"leading"
id=
"Nuy-hQ-rvB"
/>
<constraint
firstItem=
"k9F-6d-7hC"
firstAttribute=
"top"
secondItem=
"3s7-wp-kL8"
secondAttribute=
"top"
id=
"eqQ-rU-v2R"
/>
<constraint
firstAttribute=
"bottom"
secondItem=
"X2o-9b-WwM"
secondAttribute=
"bottom"
id=
"hHe-Jf-AAp"
/>
<constraint
firstItem=
"X2o-9b-WwM"
firstAttribute=
"top"
secondItem=
"k9F-6d-7hC"
secondAttribute=
"bottom"
id=
"osd-vq-USC"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"X2o-9b-WwM"
secondAttribute=
"trailing"
id=
"sU7-so-YS5"
/>
<constraint
firstItem=
"X2o-9b-WwM"
firstAttribute=
"leading"
secondItem=
"3s7-wp-kL8"
secondAttribute=
"leading"
id=
"uos-ZA-0le"
/>
</constraints>
</view>
</subviews>
<color
key=
"backgroundColor"
white=
"1"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"calibratedWhite"
/>
<constraints>
<constraint
firstItem=
"YBD-X8-xoO"
firstAttribute=
"top"
secondItem=
"iN0-l3-epB"
secondAttribute=
"top"
id=
"9hY-kZ-36m"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"YBD-X8-xoO"
secondAttribute=
"trailing"
id=
"DGd-wm-a2a"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"3s7-wp-kL8"
secondAttribute=
"trailing"
id=
"HAR-vz-WGj"
/>
<constraint
firstItem=
"3s7-wp-kL8"
firstAttribute=
"top"
secondItem=
"YBD-X8-xoO"
secondAttribute=
"bottom"
id=
"L78-Zc-hDn"
/>
<constraint
firstItem=
"YBD-X8-xoO"
firstAttribute=
"leading"
secondItem=
"iN0-l3-epB"
secondAttribute=
"leading"
id=
"Lea-z9-8i7"
/>
<constraint
firstItem=
"3s7-wp-kL8"
firstAttribute=
"leading"
secondItem=
"iN0-l3-epB"
secondAttribute=
"leading"
id=
"XSJ-af-gWs"
/>
</constraints>
<freeformSimulatedSizeMetrics
key=
"simulatedDestinationMetrics"
/>
<point
key=
"canvasLocation"
x=
"248.5"
y=
"308"
/>
</view>
</objects>
<resources>
<image
name=
"pingpp_alipay"
width=
"34"
height=
"34"
/>
<image
name=
"pingpp_wepay"
width=
"36"
height=
"30"
/>
</resources>
</document>
ALand/Info.plist
View file @
1c201bb3
...
...
@@ -32,6 +32,14 @@
<
string
>
tencent100424468
<
/string
>
<
/
a
rr
a
y
>
<
/
d
i
c
t
>
<
d
i
c
t
>
<
k
e
y
>
CFBundleTypeRole
<
/k
e
y
>
<
string
>
Editor
<
/string
>
<
k
e
y
>
CFBundleURLSchemes
<
/k
e
y
>
<
a
rr
a
y
>
<
string
>
wxb7c76f3ffc6b6e5e
<
/string
>
<
/
a
rr
a
y
>
<
/
d
i
c
t
>
<
d
i
c
t
>
<
k
e
y
>
CFBundleTypeRole
<
/k
e
y
>
<
string
>
Editor
<
/string
>
...
...
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