Commit 1384ee59 by 刘鹏

feat : webview ssl验证失败弹窗回复,前置信息收集数据添加回来

parent e8d62187
...@@ -7,6 +7,7 @@ import android.text.TextUtils; ...@@ -7,6 +7,7 @@ import android.text.TextUtils;
import android.text.style.ForegroundColorSpan; import android.text.style.ForegroundColorSpan;
import android.view.View; import android.view.View;
import android.widget.ImageView; import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView; import android.widget.TextView;
import androidx.core.content.ContextCompat; import androidx.core.content.ContextCompat;
...@@ -16,7 +17,10 @@ import androidx.recyclerview.widget.RecyclerView; ...@@ -16,7 +17,10 @@ import androidx.recyclerview.widget.RecyclerView;
import com.chad.library.adapter.base.BaseMultiItemQuickAdapter; import com.chad.library.adapter.base.BaseMultiItemQuickAdapter;
import com.chad.library.adapter.base.BaseQuickAdapter; import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder; import com.chad.library.adapter.base.BaseViewHolder;
import com.ydl.webview.H5Params;
import com.ydl.webview.NewH5Activity;
import com.ydl.ydl_image.module.GlideApp; import com.ydl.ydl_image.module.GlideApp;
import com.ydl.ydlcommon.utils.actionutil.ActionCountUtils;
import com.yidianling.avchatkit.AVChatKit; import com.yidianling.avchatkit.AVChatKit;
import com.yidianling.im.R; import com.yidianling.im.R;
import com.yidianling.im.helper.SpanUtils; import com.yidianling.im.helper.SpanUtils;
...@@ -50,6 +54,10 @@ public class QuestionAdapter extends BaseMultiItemQuickAdapter<QuestionMultiItem ...@@ -50,6 +54,10 @@ public class QuestionAdapter extends BaseMultiItemQuickAdapter<QuestionMultiItem
addItemType(5, R.layout.item_left_describe_layout); addItemType(5, R.layout.item_left_describe_layout);
//主诉----单选 //主诉----单选
addItemType(6, R.layout.item_left_one_check_layout); addItemType(6, R.layout.item_left_one_check_layout);
//主诉----单选
addItemType(6, R.layout.item_left_one_check_layout);
//中断 图文
addItemType(7, R.layout.item_left_img_url_layout);
} }
...@@ -91,6 +99,30 @@ public class QuestionAdapter extends BaseMultiItemQuickAdapter<QuestionMultiItem ...@@ -91,6 +99,30 @@ public class QuestionAdapter extends BaseMultiItemQuickAdapter<QuestionMultiItem
break; break;
case 6: case 6:
convertType6(helper, item); convertType6(helper, item);
case 7:
helper.setText(R.id.multiple_type7_title, item.questionsBean.name);
ImageView image = helper.getView(R.id.image);
LinearLayout jumpUrlView = helper.getView(R.id.jump_url);
if (item.questionsBean.image != null) {
GlideApp.with(mContext)
.load(item.questionsBean.image)
.dontAnimate()
.into(image);
}
if (!TextUtils.isEmpty(item.questionsBean.url)) {
helper.setVisible(R.id.jump_url,true);
jumpUrlView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
ActionCountUtils.Companion.count("daoyi_consult_assess_page|leave_click",item.questionsBean.questionPaperId);
NewH5Activity.start(mContext,new H5Params(item.questionsBean.url, ""));
}
});
} else {
helper.setVisible(R.id.jump_url,false);
}
break; break;
default: default:
break; break;
......
...@@ -15,7 +15,7 @@ public class QuestionMultiItem implements MultiItemEntity { ...@@ -15,7 +15,7 @@ public class QuestionMultiItem implements MultiItemEntity {
public String type1Text; public String type1Text;
public String type2Text; public String type2Text;
public String type2Other; public String type2Other;
/***type 3 单选 type 4 多选 type 6 */ /***type 3 单选 type 4 多选 type 6 终止选项 type 7*/
public QuestionsBean questionsBean; public QuestionsBean questionsBean;
public boolean type3CanClick = true; public boolean type3CanClick = true;
public boolean type4CanClick = true; public boolean type4CanClick = true;
......
...@@ -30,6 +30,10 @@ public class QuestionsBean implements Serializable { ...@@ -30,6 +30,10 @@ public class QuestionsBean implements Serializable {
public String category; public String category;
public String order; public String order;
public String name; public String name;
/**结束流程图片*/
public String image;
/**结束流程跳转地址*/
public String url;
/***类型: /***类型:
* radio(单选) * radio(单选)
* /check(复选) * /check(复选)
......
...@@ -1007,8 +1007,16 @@ public class NewH5Activity extends BaseActivity implements PtrHandler { ...@@ -1007,8 +1007,16 @@ public class NewH5Activity extends BaseActivity implements PtrHandler {
} }
private void onReceivedSslErrorHandle(SslErrorHandler handler) { private void onReceivedSslErrorHandle(SslErrorHandler handler) {
//和天宇沟通,去掉弹窗提示,直接重新验证证书 if (BaseApp.instance.getGlobalConfig().getAppDebug()) {
handler.proceed(); handler.proceed();
return;
}
final AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setMessage(R.string.platform_notification_error_ssl_cert_invalid);
builder.setPositiveButton("继续", (dialog, which) -> handler.proceed());
builder.setNegativeButton("取消", (dialog, which) -> handler.cancel());
final AlertDialog dialog = builder.create();
dialog.show();
} }
private void initShareMenu() { private void initShareMenu() {
......
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