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
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
130 additions
and
131 deletions
+130
-131
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
+24
-28
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
+87
-63
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 {
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 @
8259f321
...
...
@@ -131,5 +131,6 @@
<color
name=
"color_EFEFF1"
>
#EFEFF1
</color>
<color
name=
"color_FAFAFF"
>
#FAFAFF
</color>
<color
name=
"color_242424"
>
#242424
</color>
<color
name=
"color_E5E5E5"
>
#E5E5E5
</color>
</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.*
/**
* 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
()
}
...
...
@@ -126,16 +132,6 @@ class MoreClickView(context: Context, jtoJHandle: IJavascriptHandler) : Relative
}.
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
)
{
mPopupWindow
=
popupWindow
}
...
...
ydl-webview/src/main/java/com/ydl/webview/NewH5Activity.java
View file @
8259f321
...
...
@@ -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 @
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
<?xml version="1.0" encoding="utf-8"?>
<
Frame
Layout
xmlns:android=
"http://schemas.android.com/apk/res/android"
<
Linear
Layout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:tools=
"http://schemas.android.com/tools"
android:id=
"@+id/fl_main"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
<LinearLayout
android:layout_width=
"150dp"
android:layout_width=
"145dp"
android:layout_height=
"wrap_content"
android:orientation=
"vertical"
android:layout_gravity=
"right"
android:elevation=
"4dp"
android:background=
"@color/platform_white"
android:layout_marginTop=
"55dp"
android:layout_marginRight=
"5dp"
>
android:layout_marginEnd=
"5dp"
android:background=
"@drawable/bg_corner_8_white"
android:elevation=
"4dp"
android:orientation=
"vertical"
>
<LinearLayout
android:id=
"@+id/more_msg"
android:layout_width=
"match_parent"
android:layout_height=
"50dp"
android:orientation=
"horizontal"
android:gravity=
"center_vertical"
>
android:layout_height=
"48dp"
android:paddingStart=
"20dp"
android:gravity=
"center_vertical"
android:orientation=
"horizontal"
>
<ImageView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"19
dp"
android:layout_marginRight=
"15dp"
android:src=
"@drawable/platform_ic_pop_news"
/>
android:layout_marginEnd=
"17
dp"
android:src=
"@drawable/platform_ic_pop_news"
/>
<TextView
android:id=
"@+id/tv_msg"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:textSize=
"17sp"
android:text=
"消息"
android:textColor=
"#333333"
/>
android:textColor=
"@color/platform_color_333333"
android:textSize=
"14sp"
/>
<TextView
android:id=
"@+id/un_read_num"
android:layout_width=
"wrap_content"
android:layout_height=
"14dp"
android:layout_marginStart=
"5dp"
android:background=
"@drawable/web_message_num_bg"
android:gravity=
"center"
android:minWidth=
"14dp"
android:textSize=
"10dp"
tools:text=
"10"
android:textColor=
"#ffffff"
android:paddingLeft=
"3dp"
android:paddingRight=
"3dp"
android:gravity=
"center
"
android:background=
"@drawable/web_message_num_bg
"
android:layout_marginLeft=
"5dp"
/>
android:textColor=
"#ffffff
"
android:textSize=
"11sp
"
tools:text=
"10"
/>
</LinearLayout>
<View
android:layout_width=
"match_parent"
android:layout_height=
"1dp"
android:background=
"#e5e5e5"
android:layout_marginRight=
"2dp"
/>
android:layout_height=
"0.5dp"
android:background=
"@color/color_E5E5E5"
/>
<LinearLayout
android:id=
"@+id/more_homepage"
android:layout_width=
"match_parent"
android:layout_height=
"50dp"
android:orientation=
"horizontal"
android:gravity=
"center_vertical"
>
android:layout_height=
"48dp"
android:paddingStart=
"20dp"
android:gravity=
"center_vertical"
android:orientation=
"horizontal"
>
<ImageView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"19
dp"
android:layout_marginRight=
"15dp"
android:src=
"@drawable/platform_ic_pop_home"
/>
android:layout_marginEnd=
"17
dp"
android:src=
"@drawable/platform_ic_pop_home"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:textSize=
"17sp"
android:text=
"首页"
android:textColor=
"#333333"
/>
android:textColor=
"@color/platform_color_333333"
android:textSize=
"14sp"
/>
</LinearLayout>
<View
android:layout_width=
"match_parent"
android:layout_height=
"1dp"
android:background=
"#e5e5e5"
android:layout_marginRight=
"2dp"
/>
android:layout_height=
"0.5dp"
android:background=
"@color/color_E5E5E5"
/>
<LinearLayout
android:id=
"@+id/more_service"
android:layout_width=
"match_parent"
android:layout_height=
"50dp"
android:orientation=
"horizontal"
android:gravity=
"center_vertical"
>
android:layout_height=
"48dp"
android:paddingStart=
"20dp"
android:gravity=
"center_vertical"
android:orientation=
"horizontal"
>
<ImageView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"19
dp"
android:layout_marginRight=
"15dp"
android:src=
"@drawable/platform_ic_pop_kefu"
/>
android:layout_marginEnd=
"17
dp"
android:src=
"@drawable/platform_ic_pop_kefu"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:textSize=
"17sp"
android:text=
"在线客服"
android:textColor=
"#333333"
/>
android:textColor=
"@color/platform_color_333333"
android:textSize=
"14sp"
/>
</LinearLayout>
<View
android:layout_width=
"match_parent"
android:layout_height=
"1dp"
android:background=
"#e5e5e5"
android:layout_marginRight=
"2dp"
/>
android:layout_height=
"0.5dp"
android:background=
"@color/color_E5E5E5"
/>
<LinearLayout
android:id=
"@+id/more_ray"
android:layout_width=
"match_parent"
android:layout_height=
"50dp"
android:orientation=
"horizontal"
android:gravity=
"center_vertical"
>
android:layout_height=
"48dp"
android:paddingStart=
"20dp"
android:gravity=
"center_vertical"
android:orientation=
"horizontal"
>
<ImageView
android:layout_width=
"wrap_content
"
android:layout_height=
"wrap_content
"
android:layout_marginLeft=
"19
dp"
android:layout_marginRight=
"15dp"
android:src=
"@drawable/platform_ic_pop_phone"
/>
android:layout_width=
"24dp
"
android:layout_height=
"24dp
"
android:layout_marginEnd=
"17
dp"
android:src=
"@drawable/platform_ic_pop_phone"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:textSize=
"17sp"
android:text=
"免费热线"
android:textColor=
"#333333"
/>
android:textColor=
"@color/platform_color_333333"
android:textSize=
"14sp"
/>
</LinearLayout>
<View
android:layout_width=
"match_parent"
android:layout_height=
"0.5dp"
android:background=
"@color/color_E5E5E5"
/>
<LinearLayout
android:id=
"@+id/more_feed"
android:layout_width=
"match_parent"
android:layout_height=
"48dp"
android:paddingStart=
"20dp"
android:gravity=
"center_vertical"
android:orientation=
"horizontal"
>
<ImageView
android:layout_width=
"24dp"
android:layout_height=
"24dp"
android:layout_marginEnd=
"17dp"
android:src=
"@drawable/platform_ic_pop_feed"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"投诉与反馈"
android:textColor=
"@color/platform_color_333333"
android:textSize=
"14sp"
/>
</LinearLayout>
</FrameLayout>
\ No newline at end of file
</LinearLayout>
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