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
674cf978
Commit
674cf978
authored
May 26, 2022
by
范玉宾
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'd/4.3.93_muse' into 'd/lancet/4.3.93_muse'
# Conflicts: # config.gradle
parents
89f8a399
cf83bbfe
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
208 additions
and
48 deletions
+208
-48
config.gradle
config.gradle
+8
-8
build.gradle
m-fm/build.gradle
+0
-1
home_button_banner_view.xml
m-home/src/ydl/res/layout/home_button_banner_view.xml
+1
-1
MineFragment.kt
m-user/src/main/java/com/yidianling/user/mine/MineFragment.kt
+14
-16
YDLShareDialog.kt
ydl-platform/src/main/java/com/ydl/ydlcommon/view/dialog/YDLShareDialog.kt
+163
-22
platform_dialog_share.xml
ydl-platform/src/main/res/layout/platform_dialog_share.xml
+2
-0
ReloadUrlEvent.kt
ydl-webview/src/main/java/com/ydl/event/ReloadUrlEvent.kt
+13
-0
NewH5Activity.java
ydl-webview/src/main/java/com/ydl/webview/NewH5Activity.java
+7
-0
No files found.
config.gradle
View file @
674cf978
...
@@ -8,8 +8,8 @@ ext {
...
@@ -8,8 +8,8 @@ ext {
"m-confide"
:
"0.0.49.74"
,
"m-confide"
:
"0.0.49.74"
,
"m-consultant"
:
"0.0.60.25"
,
"m-consultant"
:
"0.0.60.25"
,
"m-fm"
:
"0.0.30.08"
,
"m-fm"
:
"0.0.30.08"
,
"m-user"
:
"0.0.62.1
2
"
,
"m-user"
:
"0.0.62.1
6
"
,
"m-home"
:
"0.0.23.
58
"
,
"m-home"
:
"0.0.23.
61
"
,
"m-im"
:
"0.0.21.44"
,
"m-im"
:
"0.0.21.44"
,
"m-dynamic"
:
"0.0.7.73"
,
"m-dynamic"
:
"0.0.7.73"
,
"m-article"
:
"0.0.0.10"
,
"m-article"
:
"0.0.0.10"
,
...
@@ -35,10 +35,10 @@ ext {
...
@@ -35,10 +35,10 @@ ext {
//mdt 组件
//mdt 组件
"ydl-tuicore"
:
"0.0.23"
,
"ydl-tuicore"
:
"0.0.23"
,
//第一步
//第一步
"ydl-platform"
:
"0.0.41.
06
"
,
"ydl-platform"
:
"0.0.41.
15
"
,
//第二步 若干
//第二步 若干
"ydl-webview"
:
"0.0.38.7
5
"
,
"ydl-webview"
:
"0.0.38.7
9
"
,
"ydl-media"
:
"0.0.21.44"
,
"ydl-media"
:
"0.0.21.44"
,
"ydl-pay"
:
"0.0.18.19"
,
"ydl-pay"
:
"0.0.18.19"
,
"m-audioim"
:
"0.0.49.29.90"
,
"m-audioim"
:
"0.0.49.29.90"
,
...
@@ -93,8 +93,8 @@ ext {
...
@@ -93,8 +93,8 @@ ext {
"m-confide"
:
"0.0.49.74"
,
"m-confide"
:
"0.0.49.74"
,
"m-consultant"
:
"0.0.60.25"
,
"m-consultant"
:
"0.0.60.25"
,
"m-fm"
:
"0.0.30.08"
,
"m-fm"
:
"0.0.30.08"
,
"m-user"
:
"0.0.62.1
2
"
,
"m-user"
:
"0.0.62.1
6
"
,
"m-home"
:
"0.0.23.
58
"
,
"m-home"
:
"0.0.23.
61
"
,
"m-im"
:
"0.0.21.44"
,
"m-im"
:
"0.0.21.44"
,
"m-dynamic"
:
"0.0.7.73"
,
"m-dynamic"
:
"0.0.7.73"
,
"m-article"
:
"0.0.0.8"
,
"m-article"
:
"0.0.0.8"
,
...
@@ -118,10 +118,10 @@ ext {
...
@@ -118,10 +118,10 @@ ext {
//mdt组件
//mdt组件
"ydl-tuicore"
:
"0.0.23"
,
"ydl-tuicore"
:
"0.0.23"
,
//第一步
//第一步
"ydl-platform"
:
"0.0.41.
06
"
,
"ydl-platform"
:
"0.0.41.
15
"
,
//第二步 若干
//第二步 若干
"ydl-webview"
:
"0.0.38.7
5
"
,
"ydl-webview"
:
"0.0.38.7
9
"
,
"ydl-media"
:
"0.0.21.44"
,
"ydl-media"
:
"0.0.21.44"
,
"ydl-pay"
:
"0.0.18.19"
,
"ydl-pay"
:
"0.0.18.19"
,
"m-audioim"
:
"0.0.49.29.90"
,
"m-audioim"
:
"0.0.49.29.90"
,
...
...
m-fm/build.gradle
View file @
674cf978
...
@@ -73,7 +73,6 @@ dependencies {
...
@@ -73,7 +73,6 @@ dependencies {
if
(
rootProject
.
ext
.
dev_mode
){
if
(
rootProject
.
ext
.
dev_mode
){
//开发时使用
//开发时使用
api
project
(
":ydl-platform"
)
api
project
(
":ydl-platform"
)
api
project
(
':m-user'
)
implementation
modularPublication
(
'com.ydl:m-user-api'
)
implementation
modularPublication
(
'com.ydl:m-user-api'
)
implementation
modularPublication
(
'com.ydl:m-dynamic-api'
)
implementation
modularPublication
(
'com.ydl:m-dynamic-api'
)
implementation
project
(
':ydl-media'
)
implementation
project
(
':ydl-media'
)
...
...
m-home/src/ydl/res/layout/home_button_banner_view.xml
View file @
674cf978
...
@@ -53,7 +53,7 @@
...
@@ -53,7 +53,7 @@
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:textColor=
"@color/platform_color_FFFFFF"
android:textColor=
"@color/platform_color_FFFFFF"
android:textSize=
"@dimen/platform_dp_12"
android:textSize=
"@dimen/platform_dp_12"
android:text=
"
应有尽有
"
/>
android:text=
"
抑郁测量
"
/>
</RelativeLayout>
</RelativeLayout>
<RelativeLayout
<RelativeLayout
...
...
m-user/src/main/java/com/yidianling/user/mine/MineFragment.kt
View file @
674cf978
...
@@ -27,6 +27,7 @@ import com.ydl.ydlcommon.utils.BuryPointUtils
...
@@ -27,6 +27,7 @@ import com.ydl.ydlcommon.utils.BuryPointUtils
import
com.ydl.ydlcommon.utils.Utils
import
com.ydl.ydlcommon.utils.Utils
import
com.ydl.ydlcommon.utils.YdlBuryPointUtil
import
com.ydl.ydlcommon.utils.YdlBuryPointUtil
import
com.ydl.ydlcommon.utils.actionutil.ActionCountUtils.Companion.count
import
com.ydl.ydlcommon.utils.actionutil.ActionCountUtils.Companion.count
import
com.ydl.ydlcommon.view.dialog.YDLShareDialog
import
com.ydl.ydlcommon.view.dialog.YDLShareDialog.Companion.style4
import
com.ydl.ydlcommon.view.dialog.YDLShareDialog.Companion.style4
import
com.yidianling.consultant.api.IConsultantService
import
com.yidianling.consultant.api.IConsultantService
import
com.yidianling.dynamic.api.IDynamicService
import
com.yidianling.dynamic.api.IDynamicService
...
@@ -53,6 +54,7 @@ import io.reactivex.android.schedulers.AndroidSchedulers
...
@@ -53,6 +54,7 @@ import io.reactivex.android.schedulers.AndroidSchedulers
import
io.reactivex.functions.Consumer
import
io.reactivex.functions.Consumer
import
io.reactivex.schedulers.Schedulers
import
io.reactivex.schedulers.Schedulers
import
kotlinx.android.synthetic.main.user_mine_fragment_mine.*
import
kotlinx.android.synthetic.main.user_mine_fragment_mine.*
import
java.util.*
/**
/**
* 我的Tab
* 我的Tab
...
@@ -65,7 +67,7 @@ class MineFragment : BaseFragment(), SwipeRefreshLayout.OnRefreshListener, View.
...
@@ -65,7 +67,7 @@ class MineFragment : BaseFragment(), SwipeRefreshLayout.OnRefreshListener, View.
var
share_head
=
"http://static.ydlcdn.com/v1/images/logo320.png"
var
share_head
=
"http://static.ydlcdn.com/v1/images/logo320.png"
var
share_url
=
"http://m.yidianling.com/app"
var
share_url
=
"http://m.yidianling.com/app"
var
userInfoData
:
UserResponseBean
.
UserInfo
?
=
null
var
userInfoData
:
UserResponseBean
.
UserInfo
?
=
null
private
var
mShareDialog
:
YDLShareDialog
?
=
null
private
var
startTime
:
Long
=
0
private
var
startTime
:
Long
=
0
private
var
endTime
:
Long
=
0
private
var
endTime
:
Long
=
0
override
fun
layoutResId
():
Int
{
override
fun
layoutResId
():
Int
{
...
@@ -131,14 +133,10 @@ class MineFragment : BaseFragment(), SwipeRefreshLayout.OnRefreshListener, View.
...
@@ -131,14 +133,10 @@ class MineFragment : BaseFragment(), SwipeRefreshLayout.OnRefreshListener, View.
.
getGlobalInfo
()
?.
info
&&
null
!=
PlatformRamImpl
.
getInstance
()
.
getGlobalInfo
()
?.
info
&&
null
!=
PlatformRamImpl
.
getInstance
()
.
getGlobalInfo
()
?.
info
?.
app_share
.
getGlobalInfo
()
?.
info
?.
app_share
)
{
)
{
share_title
=
share_title
=
PlatformRamImpl
.
getInstance
().
getGlobalInfo
()
?.
info
?.
app_share
?.
title
.
toString
()
PlatformRamImpl
.
getInstance
().
getGlobalInfo
()
?.
info
?.
app_share
?.
title
.
toString
()
share_context
=
PlatformRamImpl
.
getInstance
().
getGlobalInfo
()
?.
info
?.
app_share
?.
descrip
.
toString
()
share_context
=
share_head
=
PlatformRamImpl
.
getInstance
().
getGlobalInfo
()
?.
info
?.
app_share
?.
cover_url
.
toString
()
PlatformRamImpl
.
getInstance
().
getGlobalInfo
()
?.
info
?.
app_share
?.
descrip
.
toString
()
share_url
=
PlatformRamImpl
.
getInstance
().
getGlobalInfo
()
?.
info
?.
app_share
?.
dl_url
.
toString
()
share_head
=
PlatformRamImpl
.
getInstance
().
getGlobalInfo
()
?.
info
?.
app_share
?.
cover_url
.
toString
()
share_url
=
PlatformRamImpl
.
getInstance
().
getGlobalInfo
()
?.
info
?.
app_share
?.
dl_url
.
toString
()
}
}
}
}
...
@@ -393,8 +391,7 @@ class MineFragment : BaseFragment(), SwipeRefreshLayout.OnRefreshListener, View.
...
@@ -393,8 +391,7 @@ class MineFragment : BaseFragment(), SwipeRefreshLayout.OnRefreshListener, View.
.
put
(
"mine_name"
,
"我的动态"
)
.
put
(
"mine_name"
,
"我的动态"
)
.
burryPoint
(
"mine"
)
.
burryPoint
(
"mine"
)
try
{
try
{
val
intentm
=
val
intentm
=
provide
(
IDynamicService
::
class
.
java
).
getMyTrendsActivityIntent
(
activity
)
provide
(
IDynamicService
::
class
.
java
).
getMyTrendsActivityIntent
(
activity
)
startActivity
(
intentm
)
startActivity
(
intentm
)
}
catch
(
e
:
Exception
)
{
}
catch
(
e
:
Exception
)
{
e
.
printStackTrace
()
e
.
printStackTrace
()
...
@@ -421,8 +418,7 @@ class MineFragment : BaseFragment(), SwipeRefreshLayout.OnRefreshListener, View.
...
@@ -421,8 +418,7 @@ class MineFragment : BaseFragment(), SwipeRefreshLayout.OnRefreshListener, View.
BuryPointUtils
.
getInstance
().
createMap
()
BuryPointUtils
.
getInstance
().
createMap
()
.
put
(
"mine_name"
,
"预约订单"
)
.
put
(
"mine_name"
,
"预约订单"
)
.
burryPoint
(
"mine"
)
.
burryPoint
(
"mine"
)
val
h5Params3
=
val
h5Params3
=
H5Params
(
MH5_URL
+
"wb/user/order/list?needOrderHelperAlert=1"
,
null
)
H5Params
(
MH5_URL
+
"wb/user/order/list?needOrderHelperAlert=1"
,
null
)
NewH5Activity
.
start
(
activity
,
h5Params3
)
NewH5Activity
.
start
(
activity
,
h5Params3
)
}
}
...
@@ -515,10 +511,12 @@ class MineFragment : BaseFragment(), SwipeRefreshLayout.OnRefreshListener, View.
...
@@ -515,10 +511,12 @@ class MineFragment : BaseFragment(), SwipeRefreshLayout.OnRefreshListener, View.
}
}
private
fun
share
()
{
private
fun
share
()
{
val
dialog
=
mActivity
?.
let
{
activity
->
if
(
mShareDialog
==
null
)
{
style4
(
activity
,
share_title
,
share_url
,
share_context
,
share_head
)
mShareDialog
=
mActivity
?.
let
{
activity
->
style4
(
activity
,
share_title
,
share_url
,
share_context
,
share_head
)
}
}
}
d
ialog
?.
show
(
activity
?.
fragmentManager
,
"lose"
)
mShareD
ialog
?.
show
(
activity
?.
fragmentManager
,
"lose"
)
}
}
/**
/**
...
...
ydl-platform/src/main/java/com/ydl/ydlcommon/view/dialog/YDLShareDialog.kt
View file @
674cf978
...
@@ -42,6 +42,7 @@ class YDLShareDialog : DialogFragment {
...
@@ -42,6 +42,7 @@ class YDLShareDialog : DialogFragment {
//小程序页面地址
//小程序页面地址
private
var
path
:
String
?
=
null
private
var
path
:
String
?
=
null
//小程序id
//小程序id
private
var
minProgramId
:
String
?
=
null
private
var
minProgramId
:
String
?
=
null
...
@@ -50,7 +51,13 @@ class YDLShareDialog : DialogFragment {
...
@@ -50,7 +51,13 @@ class YDLShareDialog : DialogFragment {
private
var
llmargin
=
0
private
var
llmargin
=
0
@SuppressLint
(
"ValidFragment"
)
@SuppressLint
(
"ValidFragment"
)
constructor
(
activity
:
Activity
,
shareTitle
:
String
?,
shareUrl
:
String
?,
shareContent
:
String
?,
shareHead
:
String
?)
:
super
()
{
constructor
(
activity
:
Activity
,
shareTitle
:
String
?,
shareUrl
:
String
?,
shareContent
:
String
?,
shareHead
:
String
?
)
:
super
()
{
this
.
mActivity
=
activity
this
.
mActivity
=
activity
this
.
shareTitle
=
shareTitle
this
.
shareTitle
=
shareTitle
this
.
shareUrl
=
shareUrl
this
.
shareUrl
=
shareUrl
...
@@ -60,7 +67,15 @@ class YDLShareDialog : DialogFragment {
...
@@ -60,7 +67,15 @@ class YDLShareDialog : DialogFragment {
//传递小程序参数
//传递小程序参数
@SuppressLint
(
"ValidFragment"
)
@SuppressLint
(
"ValidFragment"
)
constructor
(
activity
:
Activity
,
shareTitle
:
String
?,
shareUrl
:
String
?,
shareContent
:
String
?,
shareHead
:
String
?,
path
:
String
?,
minProgramId
:
String
?)
:
super
()
{
constructor
(
activity
:
Activity
,
shareTitle
:
String
?,
shareUrl
:
String
?,
shareContent
:
String
?,
shareHead
:
String
?,
path
:
String
?,
minProgramId
:
String
?
)
:
super
()
{
this
.
mActivity
=
activity
this
.
mActivity
=
activity
this
.
shareTitle
=
shareTitle
this
.
shareTitle
=
shareTitle
this
.
shareUrl
=
shareUrl
this
.
shareUrl
=
shareUrl
...
@@ -80,6 +95,7 @@ class YDLShareDialog : DialogFragment {
...
@@ -80,6 +95,7 @@ class YDLShareDialog : DialogFragment {
companion
object
{
companion
object
{
var
typeStyle
:
Int
=
0
var
typeStyle
:
Int
=
0
/**
/**
* 1.为显示1排(5个) 2.为显示2排(隐藏动态和举报)3.为显示2排(隐藏动态和删除) 4.为显示1排(4个)隐藏动态按钮 5:生成海报按钮、隐藏动态 6:保存海报按钮、隐藏动态 7.为显示1排(4个)隐藏动态按钮
* 1.为显示1排(5个) 2.为显示2排(隐藏动态和举报)3.为显示2排(隐藏动态和删除) 4.为显示1排(4个)隐藏动态按钮 5:生成海报按钮、隐藏动态 6:保存海报按钮、隐藏动态 7.为显示1排(4个)隐藏动态按钮
*/
*/
...
@@ -90,6 +106,7 @@ class YDLShareDialog : DialogFragment {
...
@@ -90,6 +106,7 @@ class YDLShareDialog : DialogFragment {
const
val
TYPE5
=
5
const
val
TYPE5
=
5
const
val
TYPE6
=
6
const
val
TYPE6
=
6
const
val
TYPE7
=
7
const
val
TYPE7
=
7
/**
/**
* 点击事件类型 1.动态 2.删除 3.举报 4.返回首页 5:生成海报 6:保存本地 7:分享纯图片
* 点击事件类型 1.动态 2.删除 3.举报 4.返回首页 5:生成海报 6:保存本地 7:分享纯图片
*/
*/
...
@@ -101,55 +118,127 @@ class YDLShareDialog : DialogFragment {
...
@@ -101,55 +118,127 @@ class YDLShareDialog : DialogFragment {
const
val
CLICK_SAVE
=
6
const
val
CLICK_SAVE
=
6
const
val
CLICK_SHARE_IMAGE
=
7
const
val
CLICK_SHARE_IMAGE
=
7
fun
style1
(
activity
:
Activity
,
shareTitle
:
String
?,
shareUrl
:
String
?,
shareContent
:
String
?,
shareHead
:
String
?):
YDLShareDialog
{
fun
style1
(
activity
:
Activity
,
shareTitle
:
String
?,
shareUrl
:
String
?,
shareContent
:
String
?,
shareHead
:
String
?
):
YDLShareDialog
{
typeStyle
=
TYPE1
typeStyle
=
TYPE1
return
YDLShareDialog
(
activity
,
shareTitle
,
shareUrl
,
shareContent
,
shareHead
)
return
YDLShareDialog
(
activity
,
shareTitle
,
shareUrl
,
shareContent
,
shareHead
)
}
}
//支持分享小程序
//支持分享小程序
fun
style1
(
activity
:
Activity
,
shareTitle
:
String
?,
shareUrl
:
String
?,
shareContent
:
String
?,
shareHead
:
String
?,
minProgramPath
:
String
?
=
""
,
minProgramId
:
String
?
=
""
):
YDLShareDialog
{
fun
style1
(
activity
:
Activity
,
shareTitle
:
String
?,
shareUrl
:
String
?,
shareContent
:
String
?,
shareHead
:
String
?,
minProgramPath
:
String
?
=
""
,
minProgramId
:
String
?
=
""
):
YDLShareDialog
{
typeStyle
=
TYPE1
typeStyle
=
TYPE1
return
YDLShareDialog
(
activity
,
shareTitle
,
shareUrl
,
shareContent
,
shareHead
,
minProgramPath
,
minProgramId
)
return
YDLShareDialog
(
activity
,
shareTitle
,
shareUrl
,
shareContent
,
shareHead
,
minProgramPath
,
minProgramId
)
}
}
fun
style2
(
activity
:
Activity
,
shareTitle
:
String
?,
shareUrl
:
String
?,
shareContent
:
String
?,
shareHead
:
String
?):
YDLShareDialog
{
fun
style2
(
activity
:
Activity
,
shareTitle
:
String
?,
shareUrl
:
String
?,
shareContent
:
String
?,
shareHead
:
String
?
):
YDLShareDialog
{
typeStyle
=
TYPE2
typeStyle
=
TYPE2
return
YDLShareDialog
(
activity
,
shareTitle
,
shareUrl
,
shareContent
,
shareHead
)
return
YDLShareDialog
(
activity
,
shareTitle
,
shareUrl
,
shareContent
,
shareHead
)
}
}
fun
style3
(
activity
:
Activity
,
shareTitle
:
String
?,
shareUrl
:
String
?,
shareContent
:
String
?,
shareHead
:
String
?):
YDLShareDialog
{
fun
style3
(
activity
:
Activity
,
shareTitle
:
String
?,
shareUrl
:
String
?,
shareContent
:
String
?,
shareHead
:
String
?
):
YDLShareDialog
{
typeStyle
=
TYPE3
typeStyle
=
TYPE3
return
YDLShareDialog
(
activity
,
shareTitle
,
shareUrl
,
shareContent
,
shareHead
)
return
YDLShareDialog
(
activity
,
shareTitle
,
shareUrl
,
shareContent
,
shareHead
)
}
}
fun
style4
(
activity
:
Activity
,
shareTitle
:
String
?,
shareUrl
:
String
?,
shareContent
:
String
?,
shareHead
:
String
?):
YDLShareDialog
{
fun
style4
(
activity
:
Activity
,
shareTitle
:
String
?,
shareUrl
:
String
?,
shareContent
:
String
?,
shareHead
:
String
?
):
YDLShareDialog
{
typeStyle
=
TYPE4
typeStyle
=
TYPE4
return
YDLShareDialog
(
activity
,
shareTitle
,
shareUrl
,
shareContent
,
shareHead
)
return
YDLShareDialog
(
activity
,
shareTitle
,
shareUrl
,
shareContent
,
shareHead
)
}
}
fun
style5
(
activity
:
Activity
,
shareTitle
:
String
?,
shareUrl
:
String
?,
shareContent
:
String
?,
shareHead
:
String
?):
YDLShareDialog
{
fun
style5
(
activity
:
Activity
,
shareTitle
:
String
?,
shareUrl
:
String
?,
shareContent
:
String
?,
shareHead
:
String
?
):
YDLShareDialog
{
typeStyle
=
TYPE5
typeStyle
=
TYPE5
return
YDLShareDialog
(
activity
,
shareTitle
,
shareUrl
,
shareContent
,
shareHead
)
return
YDLShareDialog
(
activity
,
shareTitle
,
shareUrl
,
shareContent
,
shareHead
)
}
}
fun
style6
(
activity
:
Activity
,
shareTitle
:
String
?,
shareUrl
:
String
?,
shareContent
:
String
?,
shareHead
:
String
?):
YDLShareDialog
{
fun
style6
(
activity
:
Activity
,
shareTitle
:
String
?,
shareUrl
:
String
?,
shareContent
:
String
?,
shareHead
:
String
?
):
YDLShareDialog
{
typeStyle
=
TYPE6
typeStyle
=
TYPE6
return
YDLShareDialog
(
activity
,
shareTitle
,
shareUrl
,
shareContent
,
shareHead
)
return
YDLShareDialog
(
activity
,
shareTitle
,
shareUrl
,
shareContent
,
shareHead
)
}
}
//支持分享小程序
//支持分享小程序
fun
style7
(
activity
:
Activity
,
shareTitle
:
String
?,
shareUrl
:
String
?,
shareContent
:
String
?,
shareHead
:
String
?,
minProgramPath
:
String
?
=
""
,
minProgramId
:
String
?
=
""
):
YDLShareDialog
{
fun
style7
(
activity
:
Activity
,
shareTitle
:
String
?,
shareUrl
:
String
?,
shareContent
:
String
?,
shareHead
:
String
?,
minProgramPath
:
String
?
=
""
,
minProgramId
:
String
?
=
""
):
YDLShareDialog
{
typeStyle
=
TYPE7
typeStyle
=
TYPE7
return
YDLShareDialog
(
activity
,
shareTitle
,
shareUrl
,
shareContent
,
shareHead
,
minProgramPath
,
minProgramId
)
return
YDLShareDialog
(
activity
,
shareTitle
,
shareUrl
,
shareContent
,
shareHead
,
minProgramPath
,
minProgramId
)
}
}
}
}
override
fun
onCreateView
(
inflater
:
LayoutInflater
?,
container
:
ViewGroup
?,
savedInstanceState
:
Bundle
?):
View
{
override
fun
onCreateView
(
inflater
:
LayoutInflater
?,
container
:
ViewGroup
?,
savedInstanceState
:
Bundle
?
):
View
{
//去掉dialog的标题,需要在setContentView()之前
//去掉dialog的标题,需要在setContentView()之前
this
.
dialog
.
requestWindowFeature
(
Window
.
FEATURE_NO_TITLE
)
this
.
dialog
.
requestWindowFeature
(
Window
.
FEATURE_NO_TITLE
)
val
window
=
this
.
dialog
.
window
val
window
=
this
.
dialog
.
window
//去掉dialog默认的padding
//去掉dialog默认的padding
window
!!
.
decorView
.
setPadding
(
0
,
0
,
0
,
0
)
window
?.
decorView
?
.
setPadding
(
0
,
0
,
0
,
0
)
val
lp
=
window
.
attributes
val
lp
=
window
.
attributes
lp
.
width
=
WindowManager
.
LayoutParams
.
MATCH_PARENT
lp
.
width
=
WindowManager
.
LayoutParams
.
MATCH_PARENT
lp
.
height
=
WindowManager
.
LayoutParams
.
WRAP_CONTENT
lp
.
height
=
WindowManager
.
LayoutParams
.
WRAP_CONTENT
...
@@ -184,49 +273,71 @@ class YDLShareDialog : DialogFragment {
...
@@ -184,49 +273,71 @@ class YDLShareDialog : DialogFragment {
when
(
typeStyle
)
{
when
(
typeStyle
)
{
TYPE1
->
{
TYPE1
->
{
//样式1
//样式1
//删除、举报、首页
ll_layout2
.
visibility
=
View
.
GONE
ll_layout2
.
visibility
=
View
.
GONE
//动态
ll_dynamic
.
visibility
=
View
.
VISIBLE
}
}
TYPE2
->
{
TYPE2
->
{
//样式2
//样式2
//删除、举报、首页
ll_layout2
.
visibility
=
View
.
VISIBLE
//动态
ll_dynamic
.
visibility
=
View
.
GONE
ll_dynamic
.
visibility
=
View
.
GONE
//举报
ll_report
.
visibility
=
View
.
GONE
ll_report
.
visibility
=
View
.
GONE
setStyle
()
setStyle
()
val
deleteParams
=
LinearLayout
.
LayoutParams
(
dp55
,
ViewGroup
.
LayoutParams
.
WRAP_CONTENT
)
val
deleteParams
=
LinearLayout
.
LayoutParams
(
dp55
,
ViewGroup
.
LayoutParams
.
WRAP_CONTENT
)
deleteParams
.
setMargins
(
dp7
,
0
,
llmargin
,
0
)
deleteParams
.
setMargins
(
dp7
,
0
,
llmargin
,
0
)
deleteParams
.
weight
=
0f
deleteParams
.
weight
=
0f
ll_delete
.
layoutParams
=
deleteParams
ll_delete
.
layoutParams
=
deleteParams
}
}
TYPE3
->
{
TYPE3
->
{
//样式3
//样式3
//删除、举报、首页
ll_layout2
.
visibility
=
View
.
VISIBLE
ll_report
.
visibility
=
View
.
VISIBLE
//动态
ll_dynamic
.
visibility
=
View
.
GONE
ll_dynamic
.
visibility
=
View
.
GONE
ll_delete
.
visibility
=
View
.
GONE
ll_delete
.
visibility
=
View
.
GONE
setStyle
()
setStyle
()
val
reportParams
=
LinearLayout
.
LayoutParams
(
dp55
,
ViewGroup
.
LayoutParams
.
WRAP_CONTENT
)
val
reportParams
=
LinearLayout
.
LayoutParams
(
dp55
,
ViewGroup
.
LayoutParams
.
WRAP_CONTENT
)
reportParams
.
setMargins
(
dp7
,
0
,
llmargin
,
0
)
reportParams
.
setMargins
(
dp7
,
0
,
llmargin
,
0
)
reportParams
.
weight
=
0f
reportParams
.
weight
=
0f
ll_report
.
layoutParams
=
reportParams
ll_report
.
layoutParams
=
reportParams
}
}
TYPE4
->
{
TYPE4
->
{
//样式4
//样式4
//动态
ll_dynamic
.
visibility
=
View
.
GONE
ll_dynamic
.
visibility
=
View
.
GONE
//删除、举报、首页
ll_layout2
.
visibility
=
View
.
GONE
ll_layout2
.
visibility
=
View
.
GONE
setStyle
()
setStyle
()
}
}
TYPE5
->
{
TYPE5
->
{
//样式5
//样式5
//动态
ll_dynamic
.
visibility
=
View
.
GONE
ll_dynamic
.
visibility
=
View
.
GONE
ll_poster
.
visibility
=
View
.
VISIBLE
ll_poster
.
visibility
=
View
.
VISIBLE
//删除、举报、首页
ll_layout2
.
visibility
=
View
.
GONE
ll_layout2
.
visibility
=
View
.
GONE
}
}
TYPE6
->
{
TYPE6
->
{
//样式6
//样式6
//动态
ll_dynamic
.
visibility
=
View
.
GONE
ll_dynamic
.
visibility
=
View
.
GONE
ll_save
.
visibility
=
View
.
VISIBLE
ll_save
.
visibility
=
View
.
VISIBLE
//删除、举报、首页
ll_layout2
.
visibility
=
View
.
GONE
ll_layout2
.
visibility
=
View
.
GONE
}
}
TYPE7
->
{
TYPE7
->
{
//样式7
//样式7
//删除、举报、首页
ll_layout2
.
visibility
=
View
.
GONE
ll_layout2
.
visibility
=
View
.
GONE
//动态
ll_dynamic
.
visibility
=
View
.
GONE
ll_dynamic
.
visibility
=
View
.
GONE
}
}
}
}
...
@@ -243,11 +354,11 @@ class YDLShareDialog : DialogFragment {
...
@@ -243,11 +354,11 @@ class YDLShareDialog : DialogFragment {
Executors
.
newCachedThreadPool
().
execute
{
Executors
.
newCachedThreadPool
().
execute
{
var
imageByte
=
Base64
.
decode
(
base64DataStr
,
Base64
.
DEFAULT
)
var
imageByte
=
Base64
.
decode
(
base64DataStr
,
Base64
.
DEFAULT
)
mActivity
!!
.
runOnUiThread
{
mActivity
?
.
runOnUiThread
{
GlideApp
.
with
(
this
)
GlideApp
.
with
(
this
)
.
load
(
imageByte
)
.
load
(
imageByte
)
.
diskCacheStrategy
(
DiskCacheStrategy
.
NONE
)
.
diskCacheStrategy
(
DiskCacheStrategy
.
NONE
)
.
into
(
img_pic
)
.
into
(
img_pic
)
}
}
}
}
...
@@ -381,7 +492,20 @@ class YDLShareDialog : DialogFragment {
...
@@ -381,7 +492,20 @@ class YDLShareDialog : DialogFragment {
}
}
private
fun
share
(
platform
:
SHARE_MEDIA
)
{
private
fun
share
(
platform
:
SHARE_MEDIA
)
{
ShareUtils
.
shareTo
(
platform
,
mActivity
!!
,
shareTitle
!!
,
shareUrl
!!
,
shareContent
,
shareHead
)
mActivity
?.
let
{
activity
->
shareTitle
?.
let
{
shareTitle
->
shareUrl
?.
let
{
shareUrl
->
ShareUtils
.
shareTo
(
platform
,
activity
,
shareTitle
,
shareUrl
,
shareContent
,
shareHead
)
}
}
}
ShareUtils
.
callBack
=
object
:
ShareActionCallBack
{
ShareUtils
.
callBack
=
object
:
ShareActionCallBack
{
override
fun
onShareSuccessed
(
share_media
:
SHARE_MEDIA
)
{
override
fun
onShareSuccessed
(
share_media
:
SHARE_MEDIA
)
{
mShareCallBack
?.
onShareSuccessed
(
share_media
)
mShareCallBack
?.
onShareSuccessed
(
share_media
)
...
@@ -399,7 +523,24 @@ class YDLShareDialog : DialogFragment {
...
@@ -399,7 +523,24 @@ class YDLShareDialog : DialogFragment {
*/
*/
private
fun
shareMinWeixin
()
{
private
fun
shareMinWeixin
()
{
//分享小程序到微信
//分享小程序到微信
ShareUtils
.
shareSmailWeixin
(
mActivity
!!
,
shareTitle
!!
,
shareUrl
!!
,
shareContent
,
shareHead
,
path
,
minProgramId
,
null
)
mActivity
?.
let
{
activity
->
shareTitle
?.
let
{
shareTitle
->
shareUrl
?.
let
{
shareUrl
->
ShareUtils
.
shareSmailWeixin
(
activity
,
shareTitle
,
shareUrl
,
shareContent
,
shareHead
,
path
,
minProgramId
,
null
)
}
}
}
dismiss
()
dismiss
()
}
}
...
...
ydl-platform/src/main/res/layout/platform_dialog_share.xml
View file @
674cf978
...
@@ -131,6 +131,7 @@
...
@@ -131,6 +131,7 @@
android:layout_width=
"55dp"
android:layout_width=
"55dp"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
android:layout_weight=
"1"
android:visibility=
"gone"
android:orientation=
"vertical"
>
android:orientation=
"vertical"
>
<ImageView
<ImageView
...
@@ -248,6 +249,7 @@
...
@@ -248,6 +249,7 @@
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/platform_dp_18"
android:layout_marginTop=
"@dimen/platform_dp_18"
android:visibility=
"gone"
android:orientation=
"horizontal"
>
android:orientation=
"horizontal"
>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
...
...
ydl-webview/src/main/java/com/ydl/event/ReloadUrlEvent.kt
0 → 100644
View file @
674cf978
package
com.ydl.event
/**
* h5页面内访问URL
*/
class
ReloadUrlEvent
{
var
url
:
String
?
=
null
constructor
(
url
:
String
)
{
this
.
url
=
url
}
}
\ No newline at end of file
ydl-webview/src/main/java/com/ydl/webview/NewH5Activity.java
View file @
674cf978
...
@@ -34,6 +34,7 @@ import com.tencent.smtt.sdk.WebView;
...
@@ -34,6 +34,7 @@ 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.event.ReloadUrlEvent
;
import
com.ydl.utils.PopUtils
;
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
;
...
@@ -1064,6 +1065,12 @@ public class NewH5Activity extends BaseActivity implements PtrHandler {
...
@@ -1064,6 +1065,12 @@ public class NewH5Activity extends BaseActivity implements PtrHandler {
}
}
}
}
public
void
onEvent
(
ReloadUrlEvent
event
)
{
//刷新页面
loadUrl
(
event
.
getUrl
());
shouldClearHistory
=
true
;
}
public
void
onEvent
(
UserBindPhoneEvent
event
)
{
public
void
onEvent
(
UserBindPhoneEvent
event
)
{
//刷新页面
//刷新页面
loadUrl
(
h5Params
.
getUrl
());
loadUrl
(
h5Params
.
getUrl
());
...
...
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