问题修复

This commit is contained in:
zhanglei
2025-07-09 16:22:25 +08:00
parent a97a11c0a1
commit f629d4dde2
13 changed files with 137 additions and 4 deletions
+1 -1
View File
@@ -65,7 +65,7 @@
android:theme="@style/Theme.HearthyClients">
<meta-data
android:name="com.amap.api.v2.apikey"
android:value="62fe51fa2942941774fc033ece96bbad" />
android:value="7beba04fc2b34330900b0438639aca58" />
<!--高德定位服务-->
<service android:name="com.amap.api.location.APSService"></service>
<activity
@@ -113,6 +113,9 @@ class ConsultRecordViewModel : BaseViewModel() {
* 获取咨询列表
*/
fun getConsultRecordList(isRefresh: Boolean) {
if (consultType.value==0) {
return
}
if (1 == consultType.value &&
(CONSULT_IMAGE_TEXT_STATE_IN_PROGRESS == consultState.value ||
CONSULT_IMAGE_TEXT_STATE_WAIT_REPLY == consultState.value)) { //如果是图文咨询并且是咨询中的状态需单独去IM获取未读会话列表再匹配咨询列表,以获取未读消息数

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

+1 -1
View File
@@ -1,6 +1,6 @@
<resources xmlns:tools="http://schemas.android.com/tools"
tools:ignore="MissingTranslation">
<string name="app_name">专家端</string>
<string name="app_name">健康油我专家端</string>
<!--页面标题-->
<string name="title_workbench">健康专家库</string>
@@ -5,6 +5,7 @@ import android.content.res.Resources
import android.os.Bundle
import android.view.View
import android.widget.TextView
import android.widget.Toast
import androidx.appcompat.app.ActionBar
import androidx.appcompat.app.AppCompatActivity
import androidx.appcompat.widget.Toolbar
@@ -21,6 +22,7 @@ import com.btpj.lib_base.base.BaseViewModel.Companion.LOADING_STATE_SHOW
import com.btpj.lib_base.event.LoginEvent
import com.btpj.lib_base.ext.hideLoading
import com.btpj.lib_base.ext.showLoading
import com.btpj.lib_base.utils.CustomToast
import com.btpj.lib_base.utils.LogUtil
import com.btpj.lib_base.utils.StatusBarUtil
import com.btpj.lib_base.utils.ToastUtil
@@ -0,0 +1,108 @@
package com.btpj.lib_base.utils;
import android.content.Context;
import android.graphics.drawable.Drawable;
import android.view.Gravity;
import android.view.View;
import android.widget.TextView;
import android.widget.Toast;
import com.btpj.lib_base.R;
/**
* 自定义弹出对话框
*
* @author wyy
*/
public class CustomToast extends Toast {
private TextView textView;
private static String mText = "";
private View view;
private int time;
private Context context;
private Drawable drawable;
private static CustomToast result;
public CustomToast(Context context, String text, int time) {
super(context);
this.context = context;
this.mText = text;
this.time = time;
init();
}
public CustomToast(Context context, String text, int time, Drawable drawable) {
super(context);
this.context = context;
this.mText = text;
this.time = time;
this.drawable=drawable;
init();
}
public CustomToast(Context context, String text, int time, int gravity ) {
super(context);
this.context = context;
this.mText = text;
this.time = time;
init2(gravity);
}
private void init() {
try {
view = View.inflate(context, R.layout.custom_toast, null);
setView(view);
textView = (TextView) view.findViewById(R.id.textView);
textView.setText(mText);
if (drawable!=null) {
textView.setCompoundDrawables(null,drawable,null,null);
}
setGravity(Gravity.CENTER, 0, -100);
setDuration(time);
} catch (Exception e) {
}
}
private void init2(int gravity) {
try {
view = View.inflate(context, R.layout.custom_toast, null);
setView(view);
textView = (TextView) view.findViewById(R.id.textView);
textView.setText(mText);
textView.setGravity(gravity);
if (drawable!=null) {
textView.setCompoundDrawables(null,drawable,null,null);
}
setGravity(Gravity.CENTER, 0, -100);
setDuration(time);
} catch (Exception e) {
}
}
public static CustomToast makeText(Context context, CharSequence text, int duration,int gravity) {
if (result == null || !mText.equals(text) ) {
result = new CustomToast(context, text.toString(), duration,gravity);
}
return result;
}
public static CustomToast makeText(Context context, CharSequence text, int duration) {
if (result == null || !mText.equals(text) ) {
result = new CustomToast(context, text.toString(), duration);
}
return result;
}
public static CustomToast makeText(Context context, CharSequence text, int duration, Drawable drawable) {
if (result == null || !mText.equals(text) ) {
result = new CustomToast(context, text.toString(), duration,drawable);
}
return result;
}
public static void reset(){
result=null;
}
}
@@ -23,7 +23,9 @@ object ToastUtil {
if(msg.isNullOrEmpty()){
return
}
Toast.makeText(context.applicationContext, msg, Toast.LENGTH_SHORT).show()
// Toast.makeText(context.applicationContext, msg, Toast.LENGTH_SHORT).show()
CustomToast.makeText(context,msg,Toast.LENGTH_SHORT).show()
}
fun showShort(context: Context, @StringRes resId: Int) {
Toast.makeText(context.applicationContext, resId, Toast.LENGTH_SHORT).show()
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="vertical">
<TextView
android:id="@+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/bg_toast_shape"
android:gravity="center"
android:textSize="16dp"
android:padding="16dp"
android:textColor="@color/white" />
</LinearLayout>
Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 11 KiB

@@ -17,7 +17,7 @@ import com.tencent.qcloud.tuikit.tuichat.util.StringUtils;
* */
public class LocationMessageHolder extends MessageContentHolder {
MessageAdapterContentLocationBinding mBinding;
String mapKey = "9e4aac9a04b8296e9039adce3b472f28";
String mapKey = "7583ea1d558307d4e476cd205339c4ae";
String priKey = "4985aa1abb49ce2daa20d032a374eb58";
public LocationMessageHolder(View itemView) {
super(itemView);