Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
X
xxsq
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
王雪伟
xxsq
Commits
5988366e
Commit
5988366e
authored
May 31, 2022
by
王雪伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[提交人]:王雪伟
[提交简述] :小象省钱 [实现方案] :
parent
c6810392
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
197 additions
and
15 deletions
+197
-15
PayDialog.kt
cms/src/main/java/com/zxhl/cms/pay/PayDialog.kt
+1
-1
CardDetailActivity.kt
...n/java/com/zxbw/modulemain/activity/CardDetailActivity.kt
+166
-9
RightsDetailActivity.kt
...java/com/zxbw/modulemain/activity/RightsDetailActivity.kt
+25
-5
activity_layout_card_detail.xml
...eMain/src/main/res/layout/activity_layout_card_detail.xml
+5
-0
No files found.
cms/src/main/java/com/zxhl/cms/pay/PayDialog.kt
View file @
5988366e
...
...
@@ -325,7 +325,7 @@ object PayDialog : PayContract.View {
return
true
//没有安装该app时,返回true,表示拦截自定义链接,但不跳转,避免弹出上面的错误页面
}
//处理http和https开头的url
view
?.
loadUrl
(
url
)
//
view?.loadUrl(url)
return
false
}
...
...
moduleMain/src/main/java/com/zxbw/modulemain/activity/CardDetailActivity.kt
View file @
5988366e
This diff is collapsed.
Click to expand it.
moduleMain/src/main/java/com/zxbw/modulemain/activity/RightsDetailActivity.kt
View file @
5988366e
...
...
@@ -247,8 +247,6 @@ class RightsDetailActivity : BaseActivity(), RightsDetailContract.View, RightsPa
isClickPayBtn
=
false
SettingPreference
.
setOutTradeNo
(
""
)
showResultLoading
(
true
)
showToast
(
"成功!"
)
Log
.
d
(
"wxw"
,
"成功"
)
}
override
fun
verifyOrderFail
(
errorMsg
:
String
)
{
...
...
@@ -319,6 +317,7 @@ class RightsDetailActivity : BaseActivity(), RightsDetailContract.View, RightsPa
)
{
val
intent
=
Intent
(
Intent
.
ACTION_VIEW
,
Uri
.
parse
(
url
))
startActivity
(
intent
)
EventUtils
.
onEvent
(
"h5_open_zfb_suc"
)
return
true
}
}
catch
(
e
:
Exception
)
{
//防止crash (如果手机上没有安装处理某个scheme开头的url的APP, 会导致crash)
...
...
@@ -346,7 +345,16 @@ class RightsDetailActivity : BaseActivity(), RightsDetailContract.View, RightsPa
error
:
WebResourceError
?
)
{
super
.
onReceivedError
(
view
,
request
,
error
)
EventUtils
.
onEvent
(
"h5_pay_error1"
,
error
.
toString
())
if
(
android
.
os
.
Build
.
VERSION
.
SDK_INT
>=
android
.
os
.
Build
.
VERSION_CODES
.
M
)
{
// Log.d("wxw", "1error${error?.errorCode}")
// Log.d("wxw", "2error${error?.description}")
EventUtils
.
onEvent
(
"h5_pay_error1"
,
"code: ${error?.errorCode} desc: ${error?.description}"
)
}
else
{
EventUtils
.
onEvent
(
"h5_pay_error1"
,
error
.
toString
())
}
showResultLoading
(
false
)
}
...
...
@@ -355,9 +363,21 @@ class RightsDetailActivity : BaseActivity(), RightsDetailContract.View, RightsPa
request
:
WebResourceRequest
?,
errorResponse
:
WebResourceResponse
?
)
{
if
(
android
.
os
.
Build
.
VERSION
.
SDK_INT
>=
android
.
os
.
Build
.
VERSION_CODES
.
LOLLIPOP
)
{
if
(
request
?.
url
?.
path
?.
endsWith
(
"/favicon.ico"
)
==
true
)
{
}
else
{
EventUtils
.
onEvent
(
"h5_pay_error2"
,
errorResponse
?.
statusCode
.
toString
()
+
" url:${request?.url}"
)
showResultLoading
(
false
)
}
}
else
{
EventUtils
.
onEvent
(
"h5_pay_error2"
,
errorResponse
.
toString
())
showResultLoading
(
false
)
}
super
.
onReceivedHttpError
(
view
,
request
,
errorResponse
)
EventUtils
.
onEvent
(
"h5_pay_error2"
,
errorResponse
.
toString
())
showResultLoading
(
false
)
}
}
id_rights_pay_web_view
.
loadUrl
(
NetConfig
.
H5
.
WEB_URL_H5_PAY
)
...
...
moduleMain/src/main/res/layout/activity_layout_card_detail.xml
View file @
5988366e
...
...
@@ -392,4 +392,9 @@
android:textSize=
"16sp"
android:textStyle=
"bold"
/>
</LinearLayout>
<WebView
android:id=
"@+id/id_rights_pay_web_view"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:visibility=
"gone"
/>
</RelativeLayout>
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