Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
YDL-Component-Medical
Overview
Overview
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
杨凯
YDL-Component-Medical
Commits
8259f321
Commit
8259f321
authored
Aug 16, 2022
by
王佳洋
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加举报投诉入口
parent
baf849fe
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
52 additions
and
77 deletions
+52
-77
FeedBackActivity.kt
m-user/src/main/java/com/yidianling/user/mine/FeedBackActivity.kt
+2
-2
colors.xml
ydl-platform/src/main/res/values/colors.xml
+1
-0
PopUtils.java
ydl-webview/src/main/java/com/ydl/utils/PopUtils.java
+0
-31
MoreClickView.kt
ydl-webview/src/main/java/com/ydl/view/MoreClickView.kt
+33
-37
NewH5Activity.java
ydl-webview/src/main/java/com/ydl/webview/NewH5Activity.java
+10
-7
platform_ic_pop_feed.png
ydl-webview/src/main/res/drawable-xhdpi/platform_ic_pop_feed.png
+0
-0
bg_corner_8_white.xml
ydl-webview/src/main/res/drawable/bg_corner_8_white.xml
+6
-0
web_ui_new_more.xml
ydl-webview/src/main/res/layout/web_ui_new_more.xml
+0
-0
No files found.
m-user/src/main/java/com/yidianling/user/mine/FeedBackActivity.kt
View file @
8259f321
...
@@ -59,8 +59,8 @@ class FeedBackActivity : BaseActivity(), View.OnClickListener {
...
@@ -59,8 +59,8 @@ class FeedBackActivity : BaseActivity(), View.OnClickListener {
private
var
isPhoneNull
=
true
private
var
isPhoneNull
=
true
private
var
imgFiles
:
MutableList
<
File
>?
=
null
private
var
imgFiles
:
MutableList
<
File
>?
=
null
internal
var
work_time
=
if
(
PlatformDataManager
.
getRam
().
getGlobalInfo
()
==
null
)
"早8:30-凌晨2:00"
else
PlatformDataManager
.
getRam
().
getGlobalInfo
()
?.
info
?.
work_time
private
var
work_time
=
if
(
PlatformDataManager
.
getRam
().
getGlobalInfo
()
==
null
)
"早8:30-凌晨2:00"
else
PlatformDataManager
.
getRam
().
getGlobalInfo
()
?.
info
?.
work_time
internal
var
tel
=
if
(
PlatformDataManager
.
getRam
().
getGlobalInfo
()
==
null
)
"400-765-1010"
else
PlatformDataManager
.
getRam
().
getGlobalInfo
()
?.
info
?.
tel
private
var
tel
=
if
(
PlatformDataManager
.
getRam
().
getGlobalInfo
()
==
null
)
"400-765-1010"
else
PlatformDataManager
.
getRam
().
getGlobalInfo
()
?.
info
?.
tel
override
fun
getStatusViewOptions
():
StatusBarOptions
{
override
fun
getStatusViewOptions
():
StatusBarOptions
{
return
StatusBarOptions
(
true
,
true
)
return
StatusBarOptions
(
true
,
true
)
}
}
...
...
ydl-platform/src/main/res/values/colors.xml
View file @
8259f321
...
@@ -131,5 +131,6 @@
...
@@ -131,5 +131,6 @@
<color
name=
"color_EFEFF1"
>
#EFEFF1
</color>
<color
name=
"color_EFEFF1"
>
#EFEFF1
</color>
<color
name=
"color_FAFAFF"
>
#FAFAFF
</color>
<color
name=
"color_FAFAFF"
>
#FAFAFF
</color>
<color
name=
"color_242424"
>
#242424
</color>
<color
name=
"color_242424"
>
#242424
</color>
<color
name=
"color_E5E5E5"
>
#E5E5E5
</color>
</resources>
</resources>
ydl-webview/src/main/java/com/ydl/utils/PopUtils.java
deleted
100644 → 0
View file @
baf849fe
package
com
.
ydl
.
utils
;
import
android.content.Context
;
import
android.graphics.drawable.BitmapDrawable
;
import
android.view.Gravity
;
import
android.view.View
;
import
android.view.WindowManager
;
import
android.widget.PopupWindow
;
import
com.ydl.view.MoreClickView
;
import
com.ydl.webview.IJavascriptHandler
;
/**
* Created by Wi1ls on 2016/10/17;
*/
public
class
PopUtils
{
public
static
PopupWindow
showMoreItem
(
Context
context
,
View
view
,
IJavascriptHandler
jtoJHandle
){
MoreClickView
v
=
new
MoreClickView
(
context
,
jtoJHandle
);
WindowManager
windowManager
=
(
WindowManager
)
context
.
getSystemService
(
Context
.
WINDOW_SERVICE
);
final
PopupWindow
popupWindow
=
new
PopupWindow
(
v
,
windowManager
.
getDefaultDisplay
().
getWidth
(),
windowManager
.
getDefaultDisplay
().
getHeight
());
v
.
setPopupWindow
(
popupWindow
);
popupWindow
.
setFocusable
(
false
);
popupWindow
.
setOutsideTouchable
(
true
);
popupWindow
.
setBackgroundDrawable
(
new
BitmapDrawable
());
popupWindow
.
showAtLocation
(
view
,
Gravity
.
CENTER
,
0
,
0
);
return
popupWindow
;
}
}
ydl-webview/src/main/java/com/ydl/view/MoreClickView.kt
View file @
8259f321
...
@@ -20,12 +20,17 @@ import kotlinx.android.synthetic.main.web_ui_new_more.view.*
...
@@ -20,12 +20,17 @@ import kotlinx.android.synthetic.main.web_ui_new_more.view.*
/**
/**
* Created by Wi1ls on 2016/10/17;
* Created by Wi1ls on 2016/10/17;
*/
*/
class
MoreClickView
(
context
:
Context
,
jtoJHandle
:
IJavascriptHandler
)
:
RelativeLayout
(
context
),
View
.
OnClickListener
{
class
MoreClickView
(
context
:
Context
,
jtoJHandle
:
IJavascriptHandler
)
:
RelativeLayout
(
context
),
private
var
mJtoJHandle
:
IJavascriptHandler
?=
jtoJHandle
View
.
OnClickListener
{
private
var
mJtoJHandle
:
IJavascriptHandler
?
=
jtoJHandle
private
var
mPopupWindow
:
PopupWindow
?
=
null
private
var
mPopupWindow
:
PopupWindow
?
=
null
private
val
work_time
=
if
(
PlatformDataManager
.
getRam
().
getGlobalInfo
()
==
null
)
"早8:30-凌晨2:00"
else
PlatformDataManager
.
getRam
().
getGlobalInfo
()
?.
info
?.
work_time
private
val
work_time
=
if
(
PlatformDataManager
.
getRam
()
private
val
tel
=
if
(
PlatformDataManager
.
getRam
().
getGlobalInfo
()
==
null
)
"400-765-1010"
else
PlatformDataManager
.
getRam
().
getGlobalInfo
()
?.
info
?.
tel
.
getGlobalInfo
()
==
null
)
"早8:30-凌晨2:00"
else
PlatformDataManager
.
getRam
().
getGlobalInfo
()
?.
info
?.
work_time
private
val
tel
=
if
(
PlatformDataManager
.
getRam
()
.
getGlobalInfo
()
==
null
)
"400-765-1010"
else
PlatformDataManager
.
getRam
().
getGlobalInfo
()
?.
info
?.
tel
init
{
init
{
View
.
inflate
(
context
,
R
.
layout
.
web_ui_new_more
,
this
)
View
.
inflate
(
context
,
R
.
layout
.
web_ui_new_more
,
this
)
...
@@ -33,38 +38,41 @@ class MoreClickView(context: Context, jtoJHandle: IJavascriptHandler) : Relative
...
@@ -33,38 +38,41 @@ class MoreClickView(context: Context, jtoJHandle: IJavascriptHandler) : Relative
}
}
internal
fun
init
()
{
internal
fun
init
()
{
fl_main
.
setOnClickListener
(
this
)
if
(
mJtoJHandle
?.
setMoreMsg
()
!=
null
)
{
if
(
mJtoJHandle
?.
setMoreMsg
()!=
null
){
more_msg
.
setOnClickListener
(
mJtoJHandle
?.
setMoreMsg
())
more_msg
.
setOnClickListener
(
mJtoJHandle
?.
setMoreMsg
())
}
else
{
}
else
{
more_msg
.
setOnClickListener
(
this
)
more_msg
.
setOnClickListener
(
this
)
}
}
if
(
mJtoJHandle
?.
setMoreHomePage
()!=
null
)
{
if
(
mJtoJHandle
?.
setMoreHomePage
()
!=
null
)
{
more_homepage
.
setOnClickListener
(
mJtoJHandle
?.
setMoreHomePage
())
more_homepage
.
setOnClickListener
(
mJtoJHandle
?.
setMoreHomePage
())
}
else
{
}
else
{
more_homepage
.
setOnClickListener
(
this
)
more_homepage
.
setOnClickListener
(
this
)
}
}
if
(
mJtoJHandle
?.
setMoreService
()!=
null
)
{
if
(
mJtoJHandle
?.
setMoreService
()
!=
null
)
{
more_service
.
setOnClickListener
(
mJtoJHandle
?.
setMoreService
())
more_service
.
setOnClickListener
(
mJtoJHandle
?.
setMoreService
())
}
else
{
}
else
{
more_service
.
setOnClickListener
(
this
)
more_service
.
setOnClickListener
(
this
)
}
}
if
(
mJtoJHandle
?.
setMoreCall
()!=
null
)
{
if
(
mJtoJHandle
?.
setMoreCall
()
!=
null
)
{
more_ray
.
setOnClickListener
(
mJtoJHandle
?.
setMoreCall
())
more_ray
.
setOnClickListener
(
mJtoJHandle
?.
setMoreCall
())
}
else
{
}
else
{
more_ray
.
setOnClickListener
(
this
)
more_ray
.
setOnClickListener
(
this
)
}
}
if
(
mJtoJHandle
?.
setMoreCall
()
!=
null
)
{
more_feed
.
setOnClickListener
(
mJtoJHandle
?.
setMoreCall
())
}
else
{
more_feed
.
setOnClickListener
(
this
)
}
/* if (YdlCommonRouterManager.getYdlCommonRoute().isHasUnread()) {
/* if (YdlCommonRouterManager.getYdlCommonRoute().isHasUnread()) {
msg_new.setVisibility(View.VISIBLE)
msg_new.setVisibility(View.VISIBLE)
} else {
} else {
msg_new.setVisibility(View.INVISIBLE)
msg_new.setVisibility(View.INVISIBLE)
}*/
}*/
va
r
unreadNum
=
ModularServiceManager
.
provide
(
IImService
::
class
.
java
).
getAllUnReadNum
()
va
l
unreadNum
=
ModularServiceManager
.
provide
(
IImService
::
class
.
java
).
getAllUnReadNum
()
if
(
unreadNum
<=
0
)
{
if
(
unreadNum
<=
0
)
{
un_read_num
.
visibility
=
View
.
GONE
un_read_num
.
visibility
=
View
.
GONE
}
}
else
{
else
{
if
(
unreadNum
>
99
)
{
if
(
unreadNum
>
99
)
{
un_read_num
.
text
=
"${unreadNum}+"
un_read_num
.
text
=
"${unreadNum}+"
}
else
{
}
else
{
...
@@ -80,8 +88,6 @@ class MoreClickView(context: Context, jtoJHandle: IJavascriptHandler) : Relative
...
@@ -80,8 +88,6 @@ class MoreClickView(context: Context, jtoJHandle: IJavascriptHandler) : Relative
mPopupWindow
!!
.
dismiss
()
mPopupWindow
!!
.
dismiss
()
}
}
when
(
view
.
id
)
{
when
(
view
.
id
)
{
R
.
id
.
fl_main
->
{
}
R
.
id
.
more_msg
->
{
R
.
id
.
more_msg
->
{
setMoreMsg
()
setMoreMsg
()
}
}
...
@@ -92,7 +98,7 @@ class MoreClickView(context: Context, jtoJHandle: IJavascriptHandler) : Relative
...
@@ -92,7 +98,7 @@ class MoreClickView(context: Context, jtoJHandle: IJavascriptHandler) : Relative
setMoreService
()
setMoreService
()
}
}
R
.
id
.
more_ray
->
{
R
.
id
.
more_ray
->
{
setMoreRay
()
setMoreRay
()
}
}
}
}
...
@@ -116,24 +122,14 @@ class MoreClickView(context: Context, jtoJHandle: IJavascriptHandler) : Relative
...
@@ -116,24 +122,14 @@ class MoreClickView(context: Context, jtoJHandle: IJavascriptHandler) : Relative
private
fun
setMoreRay
()
{
private
fun
setMoreRay
()
{
CommonDialog
(
context
)
CommonDialog
(
context
)
.
setMessage
(
"欢迎致电壹点灵客服热线\n$tel\n服务时间:$work_time"
)
.
setMessage
(
"欢迎致电壹点灵客服热线\n$tel\n服务时间:$work_time"
)
.
setLeftOnclick
(
"取消"
,
null
)
.
setLeftOnclick
(
"取消"
,
null
)
.
setRightClick
(
"拨打"
)
{
.
setRightClick
(
"拨打"
)
{
if
(
null
!=
tel
&&
!
TextUtils
.
isEmpty
(
tel
))
{
if
(
null
!=
tel
&&
!
TextUtils
.
isEmpty
(
tel
))
{
val
phoneIntent
=
Intent
(
Intent
.
ACTION_DIAL
,
Uri
.
parse
(
"tel:$tel"
))
val
phoneIntent
=
Intent
(
Intent
.
ACTION_DIAL
,
Uri
.
parse
(
"tel:$tel"
))
context
.
startActivity
(
phoneIntent
)
context
.
startActivity
(
phoneIntent
)
}
}
}.
show
()
}.
show
()
}
private
var
callBack
:
CallPhoneCallBack
?
=
null
fun
setCallPhoneCallBack
(
callBack
:
CallPhoneCallBack
)
{
this
.
callBack
=
callBack
}
interface
CallPhoneCallBack
{
fun
call
(
tel
:
String
,
action
:
String
)
}
}
fun
setPopupWindow
(
popupWindow
:
PopupWindow
)
{
fun
setPopupWindow
(
popupWindow
:
PopupWindow
)
{
...
...
ydl-webview/src/main/java/com/ydl/webview/NewH5Activity.java
View file @
8259f321
...
@@ -15,8 +15,10 @@ import android.os.Bundle;
...
@@ -15,8 +15,10 @@ import android.os.Bundle;
import
android.os.Handler
;
import
android.os.Handler
;
import
android.text.TextUtils
;
import
android.text.TextUtils
;
import
android.util.Log
;
import
android.util.Log
;
import
android.view.Gravity
;
import
android.view.KeyEvent
;
import
android.view.KeyEvent
;
import
android.view.View
;
import
android.view.View
;
import
android.view.WindowManager
;
import
android.widget.ImageView
;
import
android.widget.ImageView
;
import
android.widget.LinearLayout
;
import
android.widget.LinearLayout
;
import
android.widget.PopupWindow
;
import
android.widget.PopupWindow
;
...
@@ -34,10 +36,10 @@ import com.tencent.smtt.sdk.WebView;
...
@@ -34,10 +36,10 @@ import com.tencent.smtt.sdk.WebView;
import
com.tencent.smtt.sdk.WebViewClient
;
import
com.tencent.smtt.sdk.WebViewClient
;
import
com.umeng.socialize.UMShareAPI
;
import
com.umeng.socialize.UMShareAPI
;
import
com.umeng.socialize.bean.SHARE_MEDIA
;
import
com.umeng.socialize.bean.SHARE_MEDIA
;
import
com.ydl.utils.PopUtils
;
import
com.ydl.utils.ProxyCheckUtils
;
import
com.ydl.utils.ProxyCheckUtils
;
import
com.ydl.utils.WebUrlParamsUtils
;
import
com.ydl.utils.WebUrlParamsUtils
;
import
com.ydl.view.ArticleDialogFragment
;
import
com.ydl.view.ArticleDialogFragment
;
import
com.ydl.view.MoreClickView
;
import
com.ydl.view.ShareMeditationDialog
;
import
com.ydl.view.ShareMeditationDialog
;
import
com.ydl.ydl_router.manager.YDLRouterManager
;
import
com.ydl.ydl_router.manager.YDLRouterManager
;
import
com.ydl.ydlcommon.base.BaseActivity
;
import
com.ydl.ydlcommon.base.BaseActivity
;
...
@@ -131,8 +133,6 @@ public class NewH5Activity extends BaseActivity implements PtrHandler {
...
@@ -131,8 +133,6 @@ public class NewH5Activity extends BaseActivity implements PtrHandler {
private
ShareMeditationDialog
shareMeditationDialog
;
private
ShareMeditationDialog
shareMeditationDialog
;
private
ArticleDialogFragment
commentArticleDialog
;
private
ArticleDialogFragment
commentArticleDialog
;
protected
PopupWindow
popupWindow
;
protected
ValueCallback
<
Uri
>
uploadMessage
;
protected
ValueCallback
<
Uri
>
uploadMessage
;
protected
ValueCallback
<
Uri
[]>
uploadMessageAboveL
;
protected
ValueCallback
<
Uri
[]>
uploadMessageAboveL
;
private
boolean
shouldClearHistory
=
false
;
private
boolean
shouldClearHistory
=
false
;
...
@@ -536,8 +536,12 @@ public class NewH5Activity extends BaseActivity implements PtrHandler {
...
@@ -536,8 +536,12 @@ public class NewH5Activity extends BaseActivity implements PtrHandler {
}
}
public
void
openRightTopMenu
()
{
public
void
openRightTopMenu
()
{
popupWindow
=
PopUtils
.
showMoreItem
(
this
,
MoreClickView
moreView
=
new
MoreClickView
(
this
,
jtoJHandle
);
tb_title
.
getRootView
(),
jtoJHandle
);
PopupWindow
popupWindow
=
new
PopupWindow
(
moreView
,
WindowManager
.
LayoutParams
.
WRAP_CONTENT
,
WindowManager
.
LayoutParams
.
WRAP_CONTENT
);
moreView
.
setPopupWindow
(
popupWindow
);
popupWindow
.
setOutsideTouchable
(
true
);
popupWindow
.
setFocusable
(
true
);
// 防止外部点击事件穿透
popupWindow
.
showAtLocation
(
tb_title
,
Gravity
.
TOP
|
Gravity
.
END
,
0
,
0
);
}
}
public
void
openShareMenu
(
H5JsBean
.
H5JsCmd
.
Params
params
)
{
public
void
openShareMenu
(
H5JsBean
.
H5JsCmd
.
Params
params
)
{
...
@@ -641,8 +645,7 @@ public class NewH5Activity extends BaseActivity implements PtrHandler {
...
@@ -641,8 +645,7 @@ public class NewH5Activity extends BaseActivity implements PtrHandler {
purl
=
intent
.
getStringExtra
(
"purl"
);
purl
=
intent
.
getStringExtra
(
"purl"
);
//要加"more"按钮
//要加"more"按钮
if
(
h5Params
.
isShowMenu
())
{
if
(
h5Params
.
isShowMenu
())
{
tb_title
.
setRightImageListener
(
v
->
popupWindow
=
PopUtils
.
showMoreItem
(
this
,
tb_title
.
setRightImageListener
(
v
->
openRightTopMenu
());
tb_title
.
getRootView
(),
jtoJHandle
));
tb_title
.
setRightImageIfShouldSee
();
tb_title
.
setRightImageIfShouldSee
();
}
else
{
}
else
{
tb_title
.
setRightImageIfNoSee
();
tb_title
.
setRightImageIfNoSee
();
...
...
ydl-webview/src/main/res/drawable-xhdpi/platform_ic_pop_feed.png
0 → 100644
View file @
8259f321
2.3 KB
ydl-webview/src/main/res/drawable/bg_corner_8_white.xml
0 → 100644
View file @
8259f321
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<corners
android:radius=
"8dp"
/>
<solid
android:color=
"@android:color/white"
/>
</shape>
\ No newline at end of file
ydl-webview/src/main/res/layout/web_ui_new_more.xml
View file @
8259f321
This diff is collapsed.
Click to expand it.
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