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
fb8af712
Commit
fb8af712
authored
Aug 16, 2022
by
王佳洋
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '333' into feat/wjy/合规
# Conflicts: # ydl-platform/src/main/res/values/colors.xml
parents
e742fa88
8259f321
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
52 additions
and
78 deletions
+52
-78
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
-1
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 @
fb8af712
...
...
@@ -59,8 +59,8 @@ class FeedBackActivity : BaseActivity(), View.OnClickListener {
private
var
isPhoneNull
=
true
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
internal
var
tel
=
if
(
PlatformDataManager
.
getRam
().
getGlobalInfo
()
==
null
)
"400-765-1010"
else
PlatformDataManager
.
getRam
().
getGlobalInfo
()
?.
info
?.
tel
private
var
work_time
=
if
(
PlatformDataManager
.
getRam
().
getGlobalInfo
()
==
null
)
"早8:30-凌晨2:00"
else
PlatformDataManager
.
getRam
().
getGlobalInfo
()
?.
info
?.
work_time
private
var
tel
=
if
(
PlatformDataManager
.
getRam
().
getGlobalInfo
()
==
null
)
"400-765-1010"
else
PlatformDataManager
.
getRam
().
getGlobalInfo
()
?.
info
?.
tel
override
fun
getStatusViewOptions
():
StatusBarOptions
{
return
StatusBarOptions
(
true
,
true
)
}
...
...
ydl-platform/src/main/res/values/colors.xml
View file @
fb8af712
...
...
@@ -135,5 +135,5 @@
<color
name=
"color_C3C4CA"
>
#C3C4CA
</color>
<color
name=
"color_2E2E30"
>
#2E2E30
</color>
<color
name=
"color_191919"
>
#191919
</color>
<color
name=
"color_E5E5E5"
>
#E5E5E5
</color>
</resources>
ydl-webview/src/main/java/com/ydl/utils/PopUtils.java
deleted
100644 → 0
View file @
e742fa88
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 @
fb8af712
...
...
@@ -20,12 +20,17 @@ import kotlinx.android.synthetic.main.web_ui_new_more.view.*
/**
* Created by Wi1ls on 2016/10/17;
*/
class
MoreClickView
(
context
:
Context
,
jtoJHandle
:
IJavascriptHandler
)
:
RelativeLayout
(
context
),
View
.
OnClickListener
{
private
var
mJtoJHandle
:
IJavascriptHandler
?=
jtoJHandle
class
MoreClickView
(
context
:
Context
,
jtoJHandle
:
IJavascriptHandler
)
:
RelativeLayout
(
context
),
View
.
OnClickListener
{
private
var
mJtoJHandle
:
IJavascriptHandler
?
=
jtoJHandle
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
tel
=
if
(
PlatformDataManager
.
getRam
().
getGlobalInfo
()
==
null
)
"400-765-1010"
else
PlatformDataManager
.
getRam
().
getGlobalInfo
()
?.
info
?.
tel
private
val
work_time
=
if
(
PlatformDataManager
.
getRam
()
.
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
{
View
.
inflate
(
context
,
R
.
layout
.
web_ui_new_more
,
this
)
...
...
@@ -33,38 +38,41 @@ class MoreClickView(context: Context, jtoJHandle: IJavascriptHandler) : Relative
}
internal
fun
init
()
{
fl_main
.
setOnClickListener
(
this
)
if
(
mJtoJHandle
?.
setMoreMsg
()!=
null
){
if
(
mJtoJHandle
?.
setMoreMsg
()
!=
null
)
{
more_msg
.
setOnClickListener
(
mJtoJHandle
?.
setMoreMsg
())
}
else
{
}
else
{
more_msg
.
setOnClickListener
(
this
)
}
if
(
mJtoJHandle
?.
setMoreHomePage
()!=
null
)
{
if
(
mJtoJHandle
?.
setMoreHomePage
()
!=
null
)
{
more_homepage
.
setOnClickListener
(
mJtoJHandle
?.
setMoreHomePage
())
}
else
{
}
else
{
more_homepage
.
setOnClickListener
(
this
)
}
if
(
mJtoJHandle
?.
setMoreService
()!=
null
)
{
if
(
mJtoJHandle
?.
setMoreService
()
!=
null
)
{
more_service
.
setOnClickListener
(
mJtoJHandle
?.
setMoreService
())
}
else
{
}
else
{
more_service
.
setOnClickListener
(
this
)
}
if
(
mJtoJHandle
?.
setMoreCall
()!=
null
)
{
if
(
mJtoJHandle
?.
setMoreCall
()
!=
null
)
{
more_ray
.
setOnClickListener
(
mJtoJHandle
?.
setMoreCall
())
}
else
{
}
else
{
more_ray
.
setOnClickListener
(
this
)
}
if
(
mJtoJHandle
?.
setMoreCall
()
!=
null
)
{
more_feed
.
setOnClickListener
(
mJtoJHandle
?.
setMoreCall
())
}
else
{
more_feed
.
setOnClickListener
(
this
)
}
/* if (YdlCommonRouterManager.getYdlCommonRoute().isHasUnread()) {
msg_new.setVisibility(View.VISIBLE)
} else {
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
)
{
un_read_num
.
visibility
=
View
.
GONE
}
else
{
}
else
{
if
(
unreadNum
>
99
)
{
un_read_num
.
text
=
"${unreadNum}+"
}
else
{
...
...
@@ -80,8 +88,6 @@ class MoreClickView(context: Context, jtoJHandle: IJavascriptHandler) : Relative
mPopupWindow
!!
.
dismiss
()
}
when
(
view
.
id
)
{
R
.
id
.
fl_main
->
{
}
R
.
id
.
more_msg
->
{
setMoreMsg
()
}
...
...
@@ -92,7 +98,7 @@ class MoreClickView(context: Context, jtoJHandle: IJavascriptHandler) : Relative
setMoreService
()
}
R
.
id
.
more_ray
->
{
setMoreRay
()
setMoreRay
()
}
}
...
...
@@ -116,24 +122,14 @@ class MoreClickView(context: Context, jtoJHandle: IJavascriptHandler) : Relative
private
fun
setMoreRay
()
{
CommonDialog
(
context
)
.
setMessage
(
"欢迎致电壹点灵客服热线\n$tel\n服务时间:$work_time"
)
.
setLeftOnclick
(
"取消"
,
null
)
.
setRightClick
(
"拨打"
)
{
if
(
null
!=
tel
&&
!
TextUtils
.
isEmpty
(
tel
))
{
val
phoneIntent
=
Intent
(
Intent
.
ACTION_DIAL
,
Uri
.
parse
(
"tel:$tel"
))
context
.
startActivity
(
phoneIntent
)
}
}.
show
()
}
private
var
callBack
:
CallPhoneCallBack
?
=
null
fun
setCallPhoneCallBack
(
callBack
:
CallPhoneCallBack
)
{
this
.
callBack
=
callBack
}
interface
CallPhoneCallBack
{
fun
call
(
tel
:
String
,
action
:
String
)
.
setMessage
(
"欢迎致电壹点灵客服热线\n$tel\n服务时间:$work_time"
)
.
setLeftOnclick
(
"取消"
,
null
)
.
setRightClick
(
"拨打"
)
{
if
(
null
!=
tel
&&
!
TextUtils
.
isEmpty
(
tel
))
{
val
phoneIntent
=
Intent
(
Intent
.
ACTION_DIAL
,
Uri
.
parse
(
"tel:$tel"
))
context
.
startActivity
(
phoneIntent
)
}
}.
show
()
}
fun
setPopupWindow
(
popupWindow
:
PopupWindow
)
{
...
...
ydl-webview/src/main/java/com/ydl/webview/NewH5Activity.java
View file @
fb8af712
...
...
@@ -15,8 +15,10 @@ import android.os.Bundle;
import
android.os.Handler
;
import
android.text.TextUtils
;
import
android.util.Log
;
import
android.view.Gravity
;
import
android.view.KeyEvent
;
import
android.view.View
;
import
android.view.WindowManager
;
import
android.widget.ImageView
;
import
android.widget.LinearLayout
;
import
android.widget.PopupWindow
;
...
...
@@ -34,10 +36,10 @@ import com.tencent.smtt.sdk.WebView;
import
com.tencent.smtt.sdk.WebViewClient
;
import
com.umeng.socialize.UMShareAPI
;
import
com.umeng.socialize.bean.SHARE_MEDIA
;
import
com.ydl.utils.PopUtils
;
import
com.ydl.utils.ProxyCheckUtils
;
import
com.ydl.utils.WebUrlParamsUtils
;
import
com.ydl.view.ArticleDialogFragment
;
import
com.ydl.view.MoreClickView
;
import
com.ydl.view.ShareMeditationDialog
;
import
com.ydl.ydl_router.manager.YDLRouterManager
;
import
com.ydl.ydlcommon.base.BaseActivity
;
...
...
@@ -131,8 +133,6 @@ public class NewH5Activity extends BaseActivity implements PtrHandler {
private
ShareMeditationDialog
shareMeditationDialog
;
private
ArticleDialogFragment
commentArticleDialog
;
protected
PopupWindow
popupWindow
;
protected
ValueCallback
<
Uri
>
uploadMessage
;
protected
ValueCallback
<
Uri
[]>
uploadMessageAboveL
;
private
boolean
shouldClearHistory
=
false
;
...
...
@@ -536,8 +536,12 @@ public class NewH5Activity extends BaseActivity implements PtrHandler {
}
public
void
openRightTopMenu
()
{
popupWindow
=
PopUtils
.
showMoreItem
(
this
,
tb_title
.
getRootView
(),
jtoJHandle
);
MoreClickView
moreView
=
new
MoreClickView
(
this
,
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
)
{
...
...
@@ -641,8 +645,7 @@ public class NewH5Activity extends BaseActivity implements PtrHandler {
purl
=
intent
.
getStringExtra
(
"purl"
);
//要加"more"按钮
if
(
h5Params
.
isShowMenu
())
{
tb_title
.
setRightImageListener
(
v
->
popupWindow
=
PopUtils
.
showMoreItem
(
this
,
tb_title
.
getRootView
(),
jtoJHandle
));
tb_title
.
setRightImageListener
(
v
->
openRightTopMenu
());
tb_title
.
setRightImageIfShouldSee
();
}
else
{
tb_title
.
setRightImageIfNoSee
();
...
...
ydl-webview/src/main/res/drawable-xhdpi/platform_ic_pop_feed.png
0 → 100644
View file @
fb8af712
2.3 KB
ydl-webview/src/main/res/drawable/bg_corner_8_white.xml
0 → 100644
View file @
fb8af712
<?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 @
fb8af712
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