Commit 39de8632 by 王佳洋

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

2,详情页增加投诉与举报入口并优化popupwindow
parent fb8af712
......@@ -24,6 +24,7 @@ import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.alibaba.android.arouter.launcher.ARouter;
import com.google.gson.internal.LinkedTreeMap;
import com.ydl.ydl_image.module.GlideApp;
import com.ydl.ydlcommon.base.BaseActivity;
......@@ -493,6 +494,7 @@ public class MembersActivity extends BaseActivity implements View.OnClickListene
dialog_datas.add("解除屏蔽");
}
dialog_datas.add("举报");
dialog_datas.add("投诉与反馈");
int itemTextColor = getResources().getColor(R.color.dynamic_black);
ListDialog.Builder builder1 = new ListDialog.Builder(MembersActivity.this, dialog_datas, itemTextColor);
builder1.SetLastStr("取消");
......@@ -517,6 +519,9 @@ public class MembersActivity extends BaseActivity implements View.OnClickListene
case 1:
report();
break;
case 2:
ARouter.getInstance().build("/mine/FeedBackActivity").navigation();
break;
}
}
dialog.dismiss();
......
......@@ -309,15 +309,15 @@
android:layout_weight="1">
<TextView
android:id="@+id/members_information_tv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:paddingLeft="15dp"
android:paddingRight="15dp"
android:text="个人资料"
android:textColor="@color/dynamic_text_gray"
android:textSize="18sp" />
android:id="@+id/members_information_tv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:paddingLeft="15dp"
android:paddingRight="15dp"
android:text="个人资料"
android:textColor="@color/dynamic_text_gray"
android:textSize="18sp" />
<TextView
android:id="@+id/members_information_hint_tv"
......
......@@ -63,7 +63,6 @@ class NewH5_JavascriptHandler(private val webView: WebView?, private val wvEnven
if (jsData.url.equals("http")) {
if (jsData.cmd?.params?.toUid != 0) {
if (checkBindPhone(webView?.context, userService)) return
wvEnventPro?.chat(
userService.getUserInfo()?.uid?.toInt() ?: 0,
jsData.cmd?.params?.toUid ?: 0,
......@@ -131,7 +130,6 @@ class NewH5_JavascriptHandler(private val webView: WebView?, private val wvEnven
"chat" ->
//私聊
if (wvEnventPro != null) {
if (checkBindPhone(webView?.context, userService)) return
wvEnventPro.chat(userService.getUserResponse()?.uid?.toInt() ?: 0,
jsData.cmd!!.params!!.toUid, 0,
JsModularService.getIUserService().getUserInfo()?.accessToken,
......@@ -143,7 +141,6 @@ class NewH5_JavascriptHandler(private val webView: WebView?, private val wvEnven
}
"chat_send_message" -> {
//跳转私聊:并发送消息
if (checkBindPhone(webView?.context, userService)) return
wvEnventPro?.chatSendMessage(
userService.getUserResponse()?.uid?.toInt() ?: 0,
jsData.cmd!!.params!!.toUid,
......@@ -177,7 +174,6 @@ class NewH5_JavascriptHandler(private val webView: WebView?, private val wvEnven
"set_time_warn" ->
//提醒专家设置时间
if (wvEnventPro != null) {
if (checkBindPhone(webView?.context, userService)) return
wvEnventPro.sendSubscriptionTimeMessage("" + jsData.cmd?.params?.toUid)
}
"user_home" -> if (wvEnventPro != null) {
......@@ -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
import android.view.View
import android.widget.PopupWindow
import android.widget.RelativeLayout
import com.alibaba.android.arouter.launcher.ARouter
import com.ydl.webview.IJavascriptHandler
import com.ydl.webview.R
import com.ydl.ydlcommon.base.config.ChannelConfig
......@@ -58,11 +59,7 @@ class MoreClickView(context: Context, jtoJHandle: IJavascriptHandler) : Relative
} else {
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()) {
msg_new.setVisibility(View.VISIBLE)
} else {
......@@ -100,6 +97,9 @@ class MoreClickView(context: Context, jtoJHandle: IJavascriptHandler) : Relative
R.id.more_ray -> {
setMoreRay()
}
R.id.more_feed -> {
ARouter.getInstance().build("/mine/FeedBackActivity").navigation()
}
}
}
......
......@@ -4,7 +4,7 @@
android:layout_width="145dp"
android:layout_height="wrap_content"
android:layout_marginTop="55dp"
android:layout_marginEnd="5dp"
android:layout_marginEnd="10dp"
android:background="@drawable/bg_corner_8_white"
android:elevation="4dp"
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