Commit 39de8632 by 王佳洋

1,详情页去掉手机号绑定判断,统一由H5判断,H5回调bind_phone打开原生手机绑定页

2,详情页增加投诉与举报入口并优化popupwindow
parent fb8af712
...@@ -24,6 +24,7 @@ import android.widget.LinearLayout; ...@@ -24,6 +24,7 @@ import android.widget.LinearLayout;
import android.widget.RelativeLayout; import android.widget.RelativeLayout;
import android.widget.TextView; import android.widget.TextView;
import com.alibaba.android.arouter.launcher.ARouter;
import com.google.gson.internal.LinkedTreeMap; import com.google.gson.internal.LinkedTreeMap;
import com.ydl.ydl_image.module.GlideApp; import com.ydl.ydl_image.module.GlideApp;
import com.ydl.ydlcommon.base.BaseActivity; import com.ydl.ydlcommon.base.BaseActivity;
...@@ -493,6 +494,7 @@ public class MembersActivity extends BaseActivity implements View.OnClickListene ...@@ -493,6 +494,7 @@ public class MembersActivity extends BaseActivity implements View.OnClickListene
dialog_datas.add("解除屏蔽"); dialog_datas.add("解除屏蔽");
} }
dialog_datas.add("举报"); dialog_datas.add("举报");
dialog_datas.add("投诉与反馈");
int itemTextColor = getResources().getColor(R.color.dynamic_black); int itemTextColor = getResources().getColor(R.color.dynamic_black);
ListDialog.Builder builder1 = new ListDialog.Builder(MembersActivity.this, dialog_datas, itemTextColor); ListDialog.Builder builder1 = new ListDialog.Builder(MembersActivity.this, dialog_datas, itemTextColor);
builder1.SetLastStr("取消"); builder1.SetLastStr("取消");
...@@ -517,6 +519,9 @@ public class MembersActivity extends BaseActivity implements View.OnClickListene ...@@ -517,6 +519,9 @@ public class MembersActivity extends BaseActivity implements View.OnClickListene
case 1: case 1:
report(); report();
break; break;
case 2:
ARouter.getInstance().build("/mine/FeedBackActivity").navigation();
break;
} }
} }
dialog.dismiss(); dialog.dismiss();
......
...@@ -63,7 +63,6 @@ class NewH5_JavascriptHandler(private val webView: WebView?, private val wvEnven ...@@ -63,7 +63,6 @@ class NewH5_JavascriptHandler(private val webView: WebView?, private val wvEnven
if (jsData.url.equals("http")) { if (jsData.url.equals("http")) {
if (jsData.cmd?.params?.toUid != 0) { if (jsData.cmd?.params?.toUid != 0) {
if (checkBindPhone(webView?.context, userService)) return
wvEnventPro?.chat( wvEnventPro?.chat(
userService.getUserInfo()?.uid?.toInt() ?: 0, userService.getUserInfo()?.uid?.toInt() ?: 0,
jsData.cmd?.params?.toUid ?: 0, jsData.cmd?.params?.toUid ?: 0,
...@@ -131,7 +130,6 @@ class NewH5_JavascriptHandler(private val webView: WebView?, private val wvEnven ...@@ -131,7 +130,6 @@ class NewH5_JavascriptHandler(private val webView: WebView?, private val wvEnven
"chat" -> "chat" ->
//私聊 //私聊
if (wvEnventPro != null) { if (wvEnventPro != null) {
if (checkBindPhone(webView?.context, userService)) return
wvEnventPro.chat(userService.getUserResponse()?.uid?.toInt() ?: 0, wvEnventPro.chat(userService.getUserResponse()?.uid?.toInt() ?: 0,
jsData.cmd!!.params!!.toUid, 0, jsData.cmd!!.params!!.toUid, 0,
JsModularService.getIUserService().getUserInfo()?.accessToken, JsModularService.getIUserService().getUserInfo()?.accessToken,
...@@ -143,7 +141,6 @@ class NewH5_JavascriptHandler(private val webView: WebView?, private val wvEnven ...@@ -143,7 +141,6 @@ class NewH5_JavascriptHandler(private val webView: WebView?, private val wvEnven
} }
"chat_send_message" -> { "chat_send_message" -> {
//跳转私聊:并发送消息 //跳转私聊:并发送消息
if (checkBindPhone(webView?.context, userService)) return
wvEnventPro?.chatSendMessage( wvEnventPro?.chatSendMessage(
userService.getUserResponse()?.uid?.toInt() ?: 0, userService.getUserResponse()?.uid?.toInt() ?: 0,
jsData.cmd!!.params!!.toUid, jsData.cmd!!.params!!.toUid,
...@@ -177,7 +174,6 @@ class NewH5_JavascriptHandler(private val webView: WebView?, private val wvEnven ...@@ -177,7 +174,6 @@ class NewH5_JavascriptHandler(private val webView: WebView?, private val wvEnven
"set_time_warn" -> "set_time_warn" ->
//提醒专家设置时间 //提醒专家设置时间
if (wvEnventPro != null) { if (wvEnventPro != null) {
if (checkBindPhone(webView?.context, userService)) return
wvEnventPro.sendSubscriptionTimeMessage("" + jsData.cmd?.params?.toUid) wvEnventPro.sendSubscriptionTimeMessage("" + jsData.cmd?.params?.toUid)
} }
"user_home" -> if (wvEnventPro != null) { "user_home" -> if (wvEnventPro != null) {
...@@ -517,18 +513,4 @@ class NewH5_JavascriptHandler(private val webView: WebView?, private val wvEnven ...@@ -517,18 +513,4 @@ class NewH5_JavascriptHandler(private val webView: WebView?, private val wvEnven
} }
} }
private fun checkBindPhone(context: Context?, userService: IUserService): Boolean {
if (!userService.isBindPhone() && context is Activity) {
CommonDialog(context)
.setMessage("为了及时接收消息通知,请立即绑定收集")
.setLeftOnclick("忍痛放弃") {}
.setRightClick("果断绑定") {
userService.wxBindToInputhonePage(context) // 跳转绑定手机号页面
}
.setCancelAble(false)
.show()
return true
}
return false
}
} }
...@@ -7,6 +7,7 @@ import android.text.TextUtils ...@@ -7,6 +7,7 @@ import android.text.TextUtils
import android.view.View import android.view.View
import android.widget.PopupWindow import android.widget.PopupWindow
import android.widget.RelativeLayout import android.widget.RelativeLayout
import com.alibaba.android.arouter.launcher.ARouter
import com.ydl.webview.IJavascriptHandler import com.ydl.webview.IJavascriptHandler
import com.ydl.webview.R import com.ydl.webview.R
import com.ydl.ydlcommon.base.config.ChannelConfig import com.ydl.ydlcommon.base.config.ChannelConfig
...@@ -58,11 +59,7 @@ class MoreClickView(context: Context, jtoJHandle: IJavascriptHandler) : Relative ...@@ -58,11 +59,7 @@ class MoreClickView(context: Context, jtoJHandle: IJavascriptHandler) : Relative
} else { } else {
more_ray.setOnClickListener(this) more_ray.setOnClickListener(this)
} }
if (mJtoJHandle?.setMoreCall() != null) {
more_feed.setOnClickListener(mJtoJHandle?.setMoreCall())
} else {
more_feed.setOnClickListener(this) more_feed.setOnClickListener(this)
}
/* if (YdlCommonRouterManager.getYdlCommonRoute().isHasUnread()) { /* if (YdlCommonRouterManager.getYdlCommonRoute().isHasUnread()) {
msg_new.setVisibility(View.VISIBLE) msg_new.setVisibility(View.VISIBLE)
} else { } else {
...@@ -100,6 +97,9 @@ class MoreClickView(context: Context, jtoJHandle: IJavascriptHandler) : Relative ...@@ -100,6 +97,9 @@ class MoreClickView(context: Context, jtoJHandle: IJavascriptHandler) : Relative
R.id.more_ray -> { R.id.more_ray -> {
setMoreRay() setMoreRay()
} }
R.id.more_feed -> {
ARouter.getInstance().build("/mine/FeedBackActivity").navigation()
}
} }
} }
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
android:layout_width="145dp" android:layout_width="145dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="55dp" android:layout_marginTop="55dp"
android:layout_marginEnd="5dp" android:layout_marginEnd="10dp"
android:background="@drawable/bg_corner_8_white" android:background="@drawable/bg_corner_8_white"
android:elevation="4dp" android:elevation="4dp"
android:orientation="vertical"> android:orientation="vertical">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment