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
d0f61292
Commit
d0f61292
authored
Aug 01, 2020
by
lmj_521aiau@163.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mob event
parent
7504dca6
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
60 additions
and
113 deletions
+60
-113
.DS_Store
.DS_Store
+0
-0
project.pbxproj
Dolphins.xcodeproj/project.pbxproj
+1
-1
AppDelegate.m
Dolphins/AppDelegate.m
+1
-1
ZJBaseCareViewController.m
Dolphins/Classes/Care/Controller/ZJBaseCareViewController.m
+2
-1
ZJCareStyle2ViewController.m
...hins/Classes/Care/Controller/ZJCareStyle2ViewController.m
+1
-0
ZJCareViewController.m
Dolphins/Classes/Care/Controller/ZJCareViewController.m
+1
-0
ZJJinJiViewController.m
Dolphins/Classes/Care/Controller/ZJJinJiViewController.m
+1
-0
ZJGoodsViewController.m
Dolphins/Classes/Goods/Controller/ZJGoodsViewController.m
+2
-0
ZJElectricalRemindVC.m
Dolphins/Classes/Guard/Controller/ZJElectricalRemindVC.m
+1
-0
ZJGuardViewController.m
Dolphins/Classes/Guard/Controller/ZJGuardViewController.m
+13
-4
ZJLocationAttentionVC.xib
Dolphins/Classes/LocationAttention/ZJLocationAttentionVC.xib
+3
-2
BaseTabBarViewController.m
Dolphins/Classes/Main/Base/BaseTabBarViewController.m
+1
-1
BaseWebViewController.m
Dolphins/Classes/Main/Base/BaseWebViewController.m
+15
-18
ZJBaseMapViewController.m
Dolphins/Classes/Map/Controller/ZJBaseMapViewController.m
+1
-0
ZJMapViewController.m
Dolphins/Classes/Map/Controller/ZJMapViewController.m
+1
-0
ZJReminderCateAddController.m
...Classes/Reminder/Controller/ZJReminderCateAddController.m
+11
-0
ZJGoodsMagager.m
Dolphins/Classes/Tools/GoodsManager/ZJGoodsMagager.m
+4
-84
Info.plist
Dolphins/Info.plist
+1
-1
No files found.
.DS_Store
View file @
d0f61292
No preview for this file type
Dolphins.xcodeproj/project.pbxproj
View file @
d0f61292
...
...
@@ -984,8 +984,8 @@
A9C2B8D624D039B400010EAE
/* ZJJinJiViewController.m */
,
A9C2B8D524D039B400010EAE
/* ZJXiaoXiViewController.h */
,
A9C2B8D124D039B400010EAE
/* ZJXiaoXiViewController.m */
,
A9C2B8D424D039B400010EAE
/* ZJTianJiaViewController.m */
,
A9C2B8DA24D039B400010EAE
/* ZJTianJiaViewController.h */
,
A9C2B8D424D039B400010EAE
/* ZJTianJiaViewController.m */
,
);
path
=
Controller
;
sourceTree
=
"<group>"
;
...
...
Dolphins/AppDelegate.m
View file @
d0f61292
...
...
@@ -48,7 +48,7 @@
[
AMapServices
sharedServices
].
apiKey
=
@"501f8a894329f4b57bbfee208a11676f"
;
[
UMConfigure
initWithAppkey
:
@"5f
02fdef167edd8d9400001
2"
channel
:
nil
];
[
UMConfigure
initWithAppkey
:
@"5f
2291bcb4b08b653e8fd2a
2"
channel
:
nil
];
[
MobClick
event
:
@"app_start"
];
BuglyConfig
*
config
=
[[
BuglyConfig
alloc
]
init
];
...
...
Dolphins/Classes/Care/Controller/ZJBaseCareViewController.m
View file @
d0f61292
...
...
@@ -255,7 +255,8 @@
}
-
(
void
)
showFriendSet
:
(
ZJFriendModel
*
)
model
{
[
MobClick
event
:
@"addfriends_show_unlock_dialog"
];
__weak
typeof
(
self
)
weakSelf
=
self
;
friend
=
[[
ZJFriendSettingView
alloc
]
init
];
...
...
Dolphins/Classes/Care/Controller/ZJCareStyle2ViewController.m
View file @
d0f61292
...
...
@@ -400,6 +400,7 @@
}
-
(
void
)
myTrack
{
[
MobClick
event
:
@"home_mycard_click"
];
ZJFriendTrackMapViewController
*
trackMapVc
=
[[
ZJFriendTrackMapViewController
alloc
]
init
];
trackMapVc
.
isMyTrack
=
YES
;
[
self
.
navigationController
showViewController
:
trackMapVc
sender
:
nil
];
...
...
Dolphins/Classes/Care/Controller/ZJCareViewController.m
View file @
d0f61292
...
...
@@ -99,6 +99,7 @@
NSLog
(
@"添加关心的人"
);
[
self
logCollection
];
[
MobClick
event
:
@"home_addfriend_click"
];
[
MobClick
event
:
@"add_person"
];
ZJTianJiaViewController
*
tianJiaVC
=
[[
ZJTianJiaViewController
alloc
]
init
];
[
self
.
navigationController
pushViewController
:
tianJiaVC
animated
:
YES
];
}
...
...
Dolphins/Classes/Care/Controller/ZJJinJiViewController.m
View file @
d0f61292
...
...
@@ -117,6 +117,7 @@
#pragma mark 发送信息给所有紧急联系人
-
(
void
)
sendAllEmergencyContact
{
[
MobClick
event
:
@"alert"
];
if
(
!
[
ZJUserInfoManager
shared
].
isLogin
)
{
// [MBProgressHUD showMessage:@"请先进行登录"];
ZJOauthLoginConfig
*
config
=
[[
ZJOauthLoginConfig
alloc
]
initWithCurrentVC
:
self
];
...
...
Dolphins/Classes/Goods/Controller/ZJGoodsViewController.m
View file @
d0f61292
...
...
@@ -280,6 +280,7 @@
[
self
.
tongYButton
setTitle
:
@"购买前请先阅读并同意《海豚守护付费会员服务协议》"
forState
:
0
];
[
self
.
tongYButton
setTitleColor
:[
UIColor
colorWithHex
:
0x666666
]
forState
:
UIControlStateNormal
];
[
self
.
tongYButton
.
titleLabel
setFont
:[
UIFont
systemFontOfSize
:
KFont
(
13
)]];
self
.
tongYButton
.
titleLabel
.
adjustsFontSizeToFitWidth
=
YES
;
[
self
.
beiJingView
addSubview
:
self
.
tongYButton
];
[
self
.
tongYButton
mas_makeConstraints
:
^
(
MASConstraintMaker
*
make
)
{
make
.
left
.
equalTo
(
self
.
xuanZheButoon
.
mas_right
).
mas_offset
(
KScaleWidth
(
5
));
...
...
@@ -315,6 +316,7 @@
[
MBProgressHUD
showError
:
@"获取产品信息失败"
];
return
;
}
// dolphinsguard_lifetime_vip
[
ZTPurchaseManager
purchaseWithProductIdWithProductId
:
productId
inView
:
self
.
view
success
:^
{
if
(
self
.
payFinish
)
{
...
...
Dolphins/Classes/Guard/Controller/ZJElectricalRemindVC.m
View file @
d0f61292
...
...
@@ -91,6 +91,7 @@
NSData
*
jsonData
=
[
NSJSONSerialization
dataWithJSONObject
:
modelDic
options
:
NSJSONWritingPrettyPrinted
error
:
nil
];
NSString
*
string
=
[[
NSString
alloc
]
initWithData
:
jsonData
encoding
:
NSUTF8StringEncoding
];
[
MobClick
event
:
@"low_power_switch_click"
];
[[
TQNetworkTools
shared
]
postWithAction
:
userRemindInfoSet
parameters
:@{
@""
:
string
}
success
:^
(
id
_Nonnull
response
)
{
NSString
*
result
=
[[
NSString
alloc
]
initWithData
:
response
...
...
Dolphins/Classes/Guard/Controller/ZJGuardViewController.m
View file @
d0f61292
...
...
@@ -138,9 +138,9 @@
if
(
!
[
ZJUserInfoManager
shared
].
userInfoModel
.
isMember
){
[[
ZJGoodsMagager
shared
]
goodsWithVC
:
self
callBack
:
^
(
id
_Nonnull
s
)
{
[[
ZJUserInfoManager
shared
]
updataUserInfo
:
^
(
ZJMineUserInfoModel
*
_Nonnull
model
)
{
}
failure
:
^
(
id
_Nonnull
error
)
{
}];
}];
return
;
...
...
@@ -148,6 +148,7 @@
switch
(
sender
.
tag
-
0x64
)
{
case
0
:{
[
MobClick
event
:
@"friends_location_card_click"
];
NSDictionary
*
switchDic
=
[[
self
.
data
Read
]
objectForKey
:
@"switch"
];
BOOL
map_style2
=
switchDic
&&
[[
NSString
stringWithFormat
:
@"%@"
,[
switchDic
objectForKey
:
@"map_page_style"
]]
isEqualToString
:
@"1"
];
...
...
@@ -157,11 +158,13 @@
}
break
;
case
1
:{
[
MobClick
event
:
@"place_remind_card_click"
];
ZJLocationAttentionVC
*
vc
=
[
ZJLocationAttentionVC
new
];
[
self
.
navigationController
pushViewController
:
vc
animated
:
YES
];
}
break
;
case
2
:{
[
MobClick
event
:
@"low_power_card_click"
];
ZJElectricalRemindVC
*
remind
=
[[
UIStoryboard
storyboardWithName
:
@"Guard"
bundle
:
nil
]
instantiateViewControllerWithIdentifier
:
@"ZJElectricalRemindVC"
];
[
self
.
navigationController
pushViewController
:
remind
animated
:
YES
];
}
...
...
@@ -230,15 +233,21 @@
if
(
!
[
ZJUserInfoManager
shared
].
userInfoModel
.
isMember
){
[[
ZJGoodsMagager
shared
]
goodsWithVC
:
self
callBack
:
^
(
id
_Nonnull
s
)
{
[[
ZJUserInfoManager
shared
]
updataUserInfo
:
^
(
ZJMineUserInfoModel
*
_Nonnull
model
)
{
}
failure
:
^
(
id
_Nonnull
error
)
{
}];
}];
return
;
}
if
(
indexPath
.
row
<
4
){
NSArray
*
event
=
@[
@"vegetable_click"
,
@"getup_click"
,
@"fruit_click"
,
@"Water_click"
];
[
MobClick
event
:
event
[
indexPath
.
row
]];
}
if
(
indexPath
.
row
==
self
.
dataSource
.
count
-
1
)
{
[
MobClick
event
:
@"add_remind_click"
];
ZJAddReminderController
*
vc
=
[
ZJAddReminderController
new
];
[
self
.
navigationController
pushViewController
:
vc
animated
:
YES
];
}
else
{
...
...
Dolphins/Classes/LocationAttention/ZJLocationAttentionVC.xib
View file @
d0f61292
...
...
@@ -32,7 +32,7 @@
<rect
key=
"frame"
x=
"107"
y=
"15"
width=
"200"
height=
"194"
/>
</imageView>
<button
opaque=
"NO"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"center"
contentVerticalAlignment=
"center"
lineBreakMode=
"middleTruncation"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"Uob-FV-s6z"
>
<rect
key=
"frame"
x=
"79"
y=
"
598.
5"
width=
"256.5"
height=
"57.5"
/>
<rect
key=
"frame"
x=
"79"
y=
"
43
5"
width=
"256.5"
height=
"57.5"
/>
<state
key=
"normal"
image=
"LocationHint_back_btn_select"
/>
<state
key=
"selected"
image=
"LocationHint_back_btn_selected"
/>
<connections>
...
...
@@ -62,13 +62,14 @@
<color
key=
"backgroundColor"
systemColor=
"systemBackgroundColor"
cocoaTouchSystemColor=
"whiteColor"
/>
<constraints>
<constraint
firstItem=
"chR-61-Bcl"
firstAttribute=
"centerX"
secondItem=
"j5y-pY-6pp"
secondAttribute=
"centerX"
id=
"CSP-9Z-apR"
/>
<constraint
firstItem=
"Uob-FV-s6z"
firstAttribute=
"top"
secondItem=
"9E9-pW-Lib"
secondAttribute=
"bottom"
constant=
"80"
id=
"Dx2-tr-cB3"
/>
<constraint
firstItem=
"9E9-pW-Lib"
firstAttribute=
"top"
secondItem=
"chR-61-Bcl"
secondAttribute=
"bottom"
constant=
"20"
id=
"KIr-bb-Qf1"
/>
<constraint
firstItem=
"9E9-pW-Lib"
firstAttribute=
"centerX"
secondItem=
"chR-61-Bcl"
secondAttribute=
"centerX"
id=
"YEm-z9-yB6"
/>
<constraint
firstItem=
"j5y-pY-6pp"
firstAttribute=
"centerX"
secondItem=
"jqH-qv-uUS"
secondAttribute=
"centerX"
id=
"a0s-5I-zzr"
/>
<constraint
firstItem=
"chR-61-Bcl"
firstAttribute=
"top"
secondItem=
"j5y-pY-6pp"
secondAttribute=
"bottom"
constant=
"42"
id=
"csD-Mf-xFw"
/>
<constraint
firstItem=
"j5y-pY-6pp"
firstAttribute=
"top"
secondItem=
"jqH-qv-uUS"
secondAttribute=
"top"
constant=
"15"
id=
"p8K-u9-NQh"
/>
<constraint
firstAttribute=
"bottom"
relation=
"greaterThanOrEqual"
secondItem=
"Uob-FV-s6z"
secondAttribute=
"bottom"
constant=
"44"
id=
"pVR-te-71u"
/>
<constraint
firstItem=
"Uob-FV-s6z"
firstAttribute=
"centerX"
secondItem=
"j5y-pY-6pp"
secondAttribute=
"centerX"
id=
"rcn-3A-ghJ"
/>
<constraint
firstItem=
"Uob-FV-s6z"
firstAttribute=
"centerY"
secondItem=
"jqH-qv-uUS"
secondAttribute=
"centerY"
multiplier=
"1.4"
id=
"rpc-Bw-EIf"
/>
</constraints>
</view>
</subviews>
...
...
Dolphins/Classes/Main/Base/BaseTabBarViewController.m
View file @
d0f61292
...
...
@@ -177,7 +177,7 @@
-
(
void
)
uploadLog
:
(
NSInteger
)
index
{
NSArray
*
array
=
@[
@"
我关心的人"
,
@"定位"
,
@"我的
"
];
NSArray
*
array
=
@[
@"
tabbar_myconcern_person"
,
@"tabbar_map"
,
@"tabbar_my
"
];
NSMutableDictionary
*
dict
=
@{
@"event"
:
@"guazinovel"
,
@"action"
:
@"tab_imp"
,
@"value"
:
array
[
index
]}.
mutableCopy
;
...
...
Dolphins/Classes/Main/Base/BaseWebViewController.m
View file @
d0f61292
...
...
@@ -127,19 +127,14 @@
if
(
_payInfo
){
NSDictionary
*
switchDic
=
[[
self
.
data
Read
]
objectForKey
:
@"switch"
];
NSString
*
jsonStr
;
if
([[
switchDic
objectForKey
:
@"isLadderPay"
]
isEqual
:
@1
])
{
NSError
*
error
=
nil
;
NSData
*
jsonData
=
[
NSJSONSerialization
dataWithJSONObject
:
_payInfo
options
:
0
error
:&
error
];
jsonStr
=
[[
NSString
alloc
]
initWithData
:
jsonData
encoding
:
NSUTF8StringEncoding
];
}
else
{
jsonStr
=
[
NSString
stringWithFormat
:
@"{
\"
agree
\"
:
\"
%@
\"
,
\"
payUrl
\"
:
\"
%@
\"
,
\"
price
\"
:
\"
%@
\"
,
\"
serviceUrl
\"
:
\"
%@
\"
,
\"
hintStyle
\"
:
\"
%@
\"
,
\"
hintStyleDes
\"
:
\"
%@
\"
}"
,
[
_payInfo
objectForKey
:
@"agree"
],
[
_payInfo
objectForKey
:
@"payUrl"
],
[
_payInfo
objectForKey
:
@"price"
],
[
_payInfo
objectForKey
:
@"serviceUrl"
],
[
_payInfo
objectForKey
:
@"hintStyle"
],
[
_payInfo
objectForKey
:
@"hintStyleDes"
]];
}
NSError
*
error
=
nil
;
NSData
*
jsonData
=
[
NSJSONSerialization
dataWithJSONObject
:
_payInfo
options
:
0
error
:&
error
];
jsonStr
=
[[
NSString
alloc
]
initWithData
:
jsonData
encoding
:
NSUTF8StringEncoding
];
NSString
*
inputValueJS
=
[
NSString
stringWithFormat
:
@"getPayJson('%@')"
,
jsonStr
];
[
webView
evaluateJavaScript
:
inputValueJS
completionHandler
:
^
(
id
_Nullable
response
,
NSError
*
_Nullable
error
)
{
...
...
@@ -200,7 +195,14 @@
-
(
void
)
webView
:
(
WKWebView
*
)
webView
didReceiveAuthenticationChallenge
:
(
NSURLAuthenticationChallenge
*
)
challenge
completionHandler
:
(
void
(
^
)(
NSURLSessionAuthChallengeDisposition
disposition
,
NSURLCredential
*
__nullable
credential
))
completionHandler
{
completionHandler
(
NSURLSessionAuthChallengePerformDefaultHandling
,
nil
);
if
([
challenge
.
protectionSpace
.
authenticationMethod
isEqualToString
:
NSURLAuthenticationMethodServerTrust
])
{
NSURLCredential
*
credential
=
[[
NSURLCredential
alloc
]
initWithTrust
:
challenge
.
protectionSpace
.
serverTrust
];
completionHandler
(
NSURLSessionAuthChallengeUseCredential
,
credential
);
}
else
{
completionHandler
(
NSURLSessionAuthChallengePerformDefaultHandling
,
nil
);
}
}
-
(
WKWebView
*
)
webView
:
(
WKWebView
*
)
webView
createWebViewWithConfiguration
:
(
WKWebViewConfiguration
*
)
configuration
forNavigationAction
:
(
WKNavigationAction
*
)
navigationAction
windowFeatures
:
(
WKWindowFeatures
*
)
windowFeatures
{
...
...
@@ -222,12 +224,7 @@
if
([
message
.
name
isEqualToString
:
@"OCJSBridge"
]){
[
self
share
];
}
else
if
([
message
.
name
isEqualToString
:
@"payResultCallBack"
]){
NSDictionary
*
switchDic
=
[[
self
.
data
Read
]
objectForKey
:
@"switch"
];
if
([[
switchDic
objectForKey
:
@"isLadderPay"
]
isEqual
:
@1
])
{
[
self
orderVerify
:
message
.
body
];
}
else
{
[
self
orderVerify
:
nil
];
}
[
self
orderVerify
:
message
.
body
];
}
else
if
([
message
.
name
isEqualToString
:
@"protocolSelectedResultCallBack"
]){
NSString
*
result
=
message
.
body
;
[
_payInfo
setValue
:
result
forKey
:
@"agree"
];
...
...
Dolphins/Classes/Map/Controller/ZJBaseMapViewController.m
View file @
d0f61292
...
...
@@ -107,6 +107,7 @@
//添加关心的人
-
(
void
)
addCardFriend
{
[
MobClick
event
:
@"add_person"
];
ZJTianJiaViewController
*
tianJiaVC
=
[[
ZJTianJiaViewController
alloc
]
init
];
[
self
.
navigationController
pushViewController
:
tianJiaVC
animated
:
YES
];
}
...
...
Dolphins/Classes/Map/Controller/ZJMapViewController.m
View file @
d0f61292
...
...
@@ -38,6 +38,7 @@
//添加关心的人
-
(
void
)
addCardFriend
{
[
self
logCollection
];
[
MobClick
event
:
@"add_person"
];
ZJTianJiaViewController
*
tianJiaVC
=
[[
ZJTianJiaViewController
alloc
]
init
];
[
self
.
navigationController
pushViewController
:
tianJiaVC
animated
:
YES
];
}
...
...
Dolphins/Classes/Reminder/Controller/ZJReminderCateAddController.m
View file @
d0f61292
...
...
@@ -43,6 +43,7 @@ static NSString * const ZJReminderFooterViewID = @"ZJReminderFooterViewID";
[
super
viewDidLoad
];
// Do any additional setup after loading the view.
[
MobClick
event
:
@"place_remind_add_click"
];
[
self
setupUI
];
[
self
requestData
];
}
...
...
@@ -119,6 +120,14 @@ static NSString * const ZJReminderFooterViewID = @"ZJReminderFooterViewID";
dict
[
@"weekSetting"
]
=
self
.
weekSetting
;
NSString
*
json
=
[
self
convertToJsonData
:
dict
];
NSLog
(
@"%@"
,
json
);
NSArray
*
event
=
@[
@"vegetable_add_remind_save"
,
@"getup_add_remind_save"
,
@"fruit_add_remind_save"
,
@"Water_add_remind_save"
];
if
(
self
.
model
.
id
-
2
>=
0
||
self
.
model
.
id
-
2
<
4
)
{
[
MobClick
event
:
event
[
self
.
model
.
id
-
2
]];
}
else
{
[
MobClick
event
:
@"add_remind_click"
];
}
[[
TQNetworkTools
shared
]
postWithBodyAction
:
userRemindInfoSet
parameters
:@{}
body
:
dict
success
:^
(
NSDictionary
*
_Nonnull
response
)
{
if
([
response
[
@"status"
]
intValue
]
==
200
)
{
[
MBProgressHUD
showMessage
:
@"添加成功"
];
...
...
@@ -171,7 +180,9 @@ static NSString * const ZJReminderFooterViewID = @"ZJReminderFooterViewID";
{
// 关心的人
ZJReminderCareController
*
vc
=
[
ZJReminderCareController
new
];
__weak
typeof
(
self
)
weakSelf
=
self
;
[
MobClick
event
:
@"place_remind_selectfriend_click"
];
vc
.
backData
=
^
(
ZJFriendModel
*
_Nonnull
model
)
{
[
MobClick
event
:
@"place_remind_none_addfriends_click"
];
weakSelf
.
friendModel
=
model
;
if
(
weakSelf
.
dataArray
.
count
)
{
ZJChooseIcon
*
item
=
weakSelf
.
dataArray
[
0
];
...
...
Dolphins/Classes/Tools/GoodsManager/ZJGoodsMagager.m
View file @
d0f61292
...
...
@@ -100,14 +100,7 @@ static ZJGoodsMagager * manager;
_callBack
=
callBack
;
_currentVC
=
currentVC
;
if
([
self
.
products
firstObject
])
{
NSDictionary
*
switchDic
=
[[
self
.
data
Read
]
objectForKey
:
@"switch"
];
if
([[
switchDic
objectForKey
:
@"isLadderPay"
]
isEqual
:
@1
])
{
[
self
getUrl_new
:
0
];
}
else
{
[
self
getUrl
:[
self
.
products
firstObject
]];
}
[
self
getUrl_new
:
0
];
}
else
{
[
self
getGoods
];
}
...
...
@@ -137,13 +130,8 @@ static ZJGoodsMagager * manager;
}
}
if
([
self
.
products
firstObject
])
{
NSDictionary
*
switchDic
=
[[
self
.
data
Read
]
objectForKey
:
@"switch"
];
if
([[
switchDic
objectForKey
:
@"isLadderPay"
]
isEqual
:
@1
])
{
[
self
getUrl_new
:
0
];
}
else
{
[
self
getUrl
:[
self
.
products
firstObject
]];
}
[
self
getUrl_new
:
0
];
}
}
}
failure
:^
(
NSError
*
_Nonnull
error
)
{
...
...
@@ -157,37 +145,6 @@ static ZJGoodsMagager * manager;
}];
}
-
(
void
)
getUrl
:
(
ZJIPAProductModel
*
)
model
{
[
MBProgressHUD
showLoading
:
@"请稍后..."
toView
:
_currentVC
.
view
];
[[
TQNetworkTools
shared
]
postWithAction
:
userPay
parameters
:@{
@"payPlatform"
:
@"1"
,
@"goodsId"
:
[
NSString
stringWithFormat
:
@"%ld"
,
(
long
)
model
.
goodsId
],
@"payType"
:
@"2"
,
@"wxType"
:
@"H5"
}
success
:^
(
id
_Nonnull
response
)
{
[
MBProgressHUD
hideHUDForView
:
self
.
currentVC
.
view
];
if
([
response
[
@"status"
]
integerValue
]
==
200
&&
!
[[[
response
objectForKey
:
@"result"
]
objectForKey
:
@"data"
]
isKindOfClass
:[
NSNull
class
]])
{
[
self
webGoods
:
response
good
:
model
tradeNo
:
response
[
@"result"
][
@"data"
][
@"wakeup"
][
@"extData"
]];
}
else
{
if
(
self
.
tradeNoCount
<
3
)
{
[
self
getUrl
:[
self
.
products
firstObject
]];
self
.
tradeNoCount
++
;
NSError
*
error
=
[
NSError
errorWithDomain
:
NSCocoaErrorDomain
code
:
998
userInfo
:
nil
];
[
Bugly
reportError
:
error
];
}
}
}
failure
:^
(
NSError
*
_Nonnull
error
)
{
[
MBProgressHUD
hideHUDForView
:
self
.
currentVC
.
view
];
// [MBProgressHUD showError:@"商品信息获取失败,请稍后再试" toView:self.currentVC.view];
if
(
self
.
tradeNoCount
<
3
)
{
[
self
getUrl
:[
self
.
products
firstObject
]];
self
.
tradeNoCount
++
;
NSError
*
error
=
[
NSError
errorWithDomain
:
NSCocoaErrorDomain
code
:
999
userInfo
:
nil
];
[
Bugly
reportError
:
error
];
}
}];
}
-
(
void
)
getUrl_new
:
(
NSInteger
)
index
{
ZJIPAProductModel
*
model
=
self
.
products
[
index
];
[
MBProgressHUD
showLoading
:
@"请稍后..."
toView
:
_currentVC
.
view
];
...
...
@@ -241,38 +198,6 @@ static ZJGoodsMagager * manager;
}];
}
-
(
void
)
webGoods
:
(
id
)
response
good
:
(
ZJIPAProductModel
*
)
model
tradeNo
:
(
NSString
*
)
tradeNo
{
NSDictionary
*
dic
=
[
ZJUserInfoManager
shared
].
h5_url
;
NSDictionary
*
switchDic
=
[[
self
.
data
Read
]
objectForKey
:
@"switch"
];
NSString
*
string
=
[
NSString
stringWithFormat
:
@"%@&redirect_url=%@"
,
[[[
response
[
@"result"
]
objectForKey
:
@"data"
]
objectForKey
:
@"wakeup"
]
objectForKey
:
@"mwebUrl"
],
[
dic
objectForKey
:
@"WXbackUrl"
]];
NSString
*
serviceUrl
=
[
dic
objectForKey
:
@"pay"
]
?
:
@""
;
NSString
*
agree
=
[
switchDic
objectForKey
:
@"wd_agreement_selected"
]
?
:
@""
;
NSString
*
price
=
[
NSString
stringWithFormat
:
@"%.2f"
,
(
float
)
model
.
fen
/
100
];
NSString
*
hintStyle
=
[[
self
.
data
Read
]
objectForKey
:
@"hintStyle"
]?:
@"99"
;
NSString
*
hintStyleDes
=
[[
self
.
data
Read
]
objectForKey
:
@"hintStyleDes"
]?:
@""
;
_web
=
[[
BaseWebViewController
alloc
]
init
];
_web
.
url
=
[
dic
objectForKey
:
@"appPayUrl"
];
_web
.
payInfo
=
@{
@"payUrl"
:
string
,
@"serviceUrl"
:
serviceUrl
,
@"agree"
:
agree
,
@"price"
:
price
,
@"hintStyle"
:
hintStyle
,
@"hintStyleDes"
:
hintStyleDes
}.
mutableCopy
;
_web
.
tradeNo
=
tradeNo
;
_web
.
schemes
=
[
dic
objectForKey
:
@"WXbackUrl"
];
[
_currentVC
.
navigationController
pushViewController
:
_web
animated
:
YES
];
__weak
typeof
(
self
)
weakSelf
=
self
;
_web
.
goodsResultCallback
=
^
(
id
s
)
{
if
(
weakSelf
.
callBack
)
{
weakSelf
.
callBack
(
@""
);
};
[
weakSelf
.
web
.
navigationController
popViewControllerAnimated
:
YES
];
};
[[
NSNotificationCenter
defaultCenter
]
addObserver
:
_web
selector
:
@selector
(
isLoadGoodsUrl
)
name
:
@"loadingGoodsUrl"
object
:
nil
];
}
-
(
void
)
webGoods_new
:
(
id
)
response
{
NSDictionary
*
dic
=
[
ZJUserInfoManager
shared
].
h5_url
;
...
...
@@ -286,12 +211,7 @@ static ZJGoodsMagager * manager;
NSString
*
hintStyleDes
=
[[
self
.
data
Read
]
objectForKey
:
@"hintStyleDes"
]?:
@""
;
_web
=
[[
BaseWebViewController
alloc
]
init
];
_web
.
url
=
[
dic
objectForKey
:
@"appPayUrl"
];
if
([[
switchDic
objectForKey
:
@"isLadderPay"
]
isEqual
:
@1
])
{
_web
.
url
=
[
dic
objectForKey
:
@"LadderPayUrl"
];
}
else
{
_web
.
url
=
[
dic
objectForKey
:
@"appPayUrl"
];
}
_web
.
url
=
[
dic
objectForKey
:
@"LadderPayUrl"
];
_web
.
payInfo
=
@{
@"goodsInfo"
:
self
.
goodsInfo
,
@"serviceUrl"
:
serviceUrl
,
@"userUrl"
:
userUrl
,
@"privacyUrl"
:
privacyUrl
,
@"agree"
:
agree
,
@"hintStyle"
:
hintStyle
,
@"hintStyleDes"
:
hintStyleDes
}.
mutableCopy
;
_web
.
schemes
=
[
dic
objectForKey
:
@"WXbackUrl"
];
[
_currentVC
.
navigationController
pushViewController
:
_web
animated
:
YES
];
...
...
Dolphins/Info.plist
View file @
d0f61292
...
...
@@ -51,7 +51,7 @@
<
string
><
/string
>
<
k
e
y
>
CFBundleURLSchemes
<
/k
e
y
>
<
a
rr
a
y
>
<
string
>
h5v
2
.zhangxinzhixun.com
<
/string
>
<
string
>
h5v
1
.zhangxinzhixun.com
<
/string
>
<
/
a
rr
a
y
>
<
/
d
i
c
t
>
<
/
a
rr
a
y
>
...
...
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