Browse Source

备份3.6.1

master
XiuYun CHEN 4 years ago
parent
commit
583c527972
  1. 4
      app/build.gradle
  2. 4
      app/src/main/AndroidManifest.xml
  3. 2
      app/src/main/java/cn/shangyu/gdxzPatient/activity/DoctorEvaluateActivity.java
  4. 2
      app/src/main/java/cn/shangyu/gdxzPatient/activity/ExpertDetailActivity.java
  5. 11
      app/src/main/java/cn/shangyu/gdxzPatient/activity/HcvVideoActivity.java
  6. 4
      app/src/main/java/cn/shangyu/gdxzPatient/activity/LoginActivity.java
  7. 4
      app/src/main/java/cn/shangyu/gdxzPatient/activity/MainActivity.java
  8. 33
      app/src/main/java/cn/shangyu/gdxzPatient/ecdemo/storage/IMessageSqlManager.java
  9. 91
      app/src/main/java/cn/shangyu/gdxzPatient/ecdemo/ui/chatting/IMChattingHelper.java
  10. 3
      app/src/main/java/cn/shangyu/gdxzPatient/utils/ValidateUtils.java
  11. 2
      app/src/main/res/layout/activity_doctor_detail.xml

4
app/build.gradle

@ -20,8 +20,8 @@ android {
applicationId "cn.shangyu.gdxzPatient" applicationId "cn.shangyu.gdxzPatient"
minSdkVersion 19 minSdkVersion 19
targetSdkVersion 26 targetSdkVersion 26
versionCode 73 versionCode 74
versionName "3.6.0" versionName "3.6.1"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true multiDexEnabled true
// signingConfig signingConfigs.config // signingConfig signingConfigs.config

4
app/src/main/AndroidManifest.xml

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="cn.shangyu.gdxzPatient" package="cn.shangyu.gdxzPatient"
android:versionCode="73" android:versionCode="74"
android:versionName="3.6.0" > android:versionName="3.6.1" >
<uses-sdk <uses-sdk
android:minSdkVersion="14" android:minSdkVersion="14"

2
app/src/main/java/cn/shangyu/gdxzPatient/activity/DoctorEvaluateActivity.java

@ -75,7 +75,7 @@ public class DoctorEvaluateActivity extends BaseActivity implements View.OnClic
private List<ListAppraiseBean.NumListBean.WayNumListBean> way_num_List; private List<ListAppraiseBean.NumListBean.WayNumListBean> way_num_List;
@Override @Override
public void setTitle() { public void setTitle() {
top_title.setText("医生评价"); top_title.setText("患者评价");
top_back_layout.setOnClickListener(this); top_back_layout.setOnClickListener(this);
} }

2
app/src/main/java/cn/shangyu/gdxzPatient/activity/ExpertDetailActivity.java

@ -455,7 +455,7 @@ public class ExpertDetailActivity extends BaseActivity implements
* */ * */
if (expertDetail.getComment_list().getList().size()>0){ if (expertDetail.getComment_list().getList().size()>0){
rl_pingjia1.setVisibility(View.VISIBLE); rl_pingjia1.setVisibility(View.VISIBLE);
tv_pingjia.setText("患者评("+expertDetail.getComment_list().getTotal()+")"); tv_pingjia.setText("患者评("+expertDetail.getComment_list().getTotal()+")");
TestBean.ListBean listBean = expertDetail.getComment_list().getList().get(0); TestBean.ListBean listBean = expertDetail.getComment_list().getList().get(0);
String realname = listBean.getRealname(); String realname = listBean.getRealname();
if (!StringUtil.isEmpty(listBean.getDisease_name())){ if (!StringUtil.isEmpty(listBean.getDisease_name())){

11
app/src/main/java/cn/shangyu/gdxzPatient/activity/HcvVideoActivity.java

@ -10,6 +10,8 @@ import android.content.DialogInterface;
import android.content.Intent; import android.content.Intent;
import android.content.pm.ActivityInfo; import android.content.pm.ActivityInfo;
import android.graphics.Bitmap; import android.graphics.Bitmap;
import android.net.http.SslError;
import android.os.Build;
import android.os.Bundle; import android.os.Bundle;
import android.os.Handler; import android.os.Handler;
import android.os.Message; import android.os.Message;
@ -25,6 +27,7 @@ import android.view.View.OnTouchListener;
import android.view.ViewGroup; import android.view.ViewGroup;
import android.view.ViewGroup.LayoutParams; import android.view.ViewGroup.LayoutParams;
import android.view.WindowManager; import android.view.WindowManager;
import android.webkit.SslErrorHandler;
import android.webkit.WebChromeClient; import android.webkit.WebChromeClient;
import android.webkit.WebSettings; import android.webkit.WebSettings;
import android.webkit.WebSettings.PluginState; import android.webkit.WebSettings.PluginState;
@ -390,6 +393,10 @@ public class HcvVideoActivity extends Activity implements OnClickListener {
// mWebView.setInitialScale(50); // mWebView.setInitialScale(50);
// initWebView(); // initWebView();
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
mWebView.getSettings().setMixedContentMode(WebSettings.MIXED_CONTENT_ALWAYS_ALLOW);
}
xwebchromeclient = new myWebChromeClient(); xwebchromeclient = new myWebChromeClient();
mWebView.setWebChromeClient(xwebchromeclient); mWebView.setWebChromeClient(xwebchromeclient);
@ -468,6 +475,10 @@ public class HcvVideoActivity extends Activity implements OnClickListener {
// + errorCode + description); // + errorCode + description);
// view.loadUrl("file:///android_asset/error/error.html"); // view.loadUrl("file:///android_asset/error/error.html");
} }
@Override
public void onReceivedSslError(WebView view, SslErrorHandler handler, SslError error) {
handler.proceed();// 接受所有网站的证书
}
} }
public class myWebChromeClient extends WebChromeClient { public class myWebChromeClient extends WebChromeClient {

4
app/src/main/java/cn/shangyu/gdxzPatient/activity/LoginActivity.java

@ -404,8 +404,8 @@ public class LoginActivity extends BaseActivity implements OnClickListener {
break; break;
case R.id.tv_doctor: case R.id.tv_doctor:
Uri uri = Uri Uri uri = Uri
// .parse("http://android.myapp.com/myapp/detail.htm?apkName=cn.shangyu.gdxzExpert");//应用宝 .parse("http://android.myapp.com/myapp/detail.htm?apkName=cn.shangyu.gdxzExpert");//应用宝
.parse("http://appstore.huawei.com/app/C10526652");//华为 // .parse("http://appstore.huawei.com/app/C10526652");//华为
// .parse("https://h5coml.vivo.com.cn/h5coml/appdetail_h5/browser_v2/index.html?appId=892989&resource=301&source=1");//vivo // .parse("https://h5coml.vivo.com.cn/h5coml/appdetail_h5/browser_v2/index.html?appId=892989&resource=301&source=1");//vivo
Intent intent = new Intent(Intent.ACTION_VIEW, uri); Intent intent = new Intent(Intent.ACTION_VIEW, uri);
startActivity(intent); startActivity(intent);

4
app/src/main/java/cn/shangyu/gdxzPatient/activity/MainActivity.java

@ -485,7 +485,9 @@ public class MainActivity extends BaseActivity implements
* 跳转到渠道设置页 * 跳转到渠道设置页
*/ */
public void gotoChannelSetting(@NonNull String channelId, @NonNull Context context) { public void gotoChannelSetting(@NonNull String channelId, @NonNull Context context) {
Intent intent = new Intent(Settings.ACTION_CHANNEL_NOTIFICATION_SETTINGS); Intent intent = new Intent();
intent.setAction(Settings.ACTION_APP_NOTIFICATION_SETTINGS);
//Intent intent = new Intent(Settings.ACTION_CHANNEL_NOTIFICATION_SETTINGS);
intent.putExtra(Settings.EXTRA_APP_PACKAGE, context.getPackageName()); intent.putExtra(Settings.EXTRA_APP_PACKAGE, context.getPackageName());
intent.putExtra(Settings.EXTRA_CHANNEL_ID, channelId); intent.putExtra(Settings.EXTRA_CHANNEL_ID, channelId);
context.startActivity(intent); context.startActivity(intent);

33
app/src/main/java/cn/shangyu/gdxzPatient/ecdemo/storage/IMessageSqlManager.java

@ -379,10 +379,24 @@ public class IMessageSqlManager extends AbstractSQLManager {
} else { } else {
// 富文本 // 富文本
if (message.getType() == Type.RICH_TEXT) { if (message.getType() == Type.RICH_TEXT) {
ECPreviewMessageBody body = (ECPreviewMessageBody) message if( message.getBody() instanceof ECPreviewMessageBody )
.getBody(); {
values.put(IMessageColumn.FILE_URL, body.getUrl()); ECPreviewMessageBody body = (ECPreviewMessageBody) message
values.put(IMessageColumn.BODY, body.getTitle()); .getBody();
values.put(IMessageColumn.FILE_URL, body.getUrl());
values.put(IMessageColumn.BODY, body.getTitle());
}
else
{
ECFileMessageBody body = (ECFileMessageBody) message
.getBody();
values.put(IMessageColumn.FILE_URL, body.getRemoteUrl());
values.put(IMessageColumn.BODY, body.getFileName());
}
} else { } else {
// 其他文件类型的 // 其他文件类型的
ECFileMessageBody body = (ECFileMessageBody) message.getBody(); ECFileMessageBody body = (ECFileMessageBody) message.getBody();
@ -870,7 +884,8 @@ public class IMessageSqlManager extends AbstractSQLManager {
voiceBody.setDuration(duration); voiceBody.setDuration(duration);
} else if (msgType == Type.IMAGE.ordinal() } else if (msgType == Type.IMAGE.ordinal()
|| msgType == Type.VIDEO.ordinal() || msgType == Type.VIDEO.ordinal()
|| msgType == Type.FILE.ordinal()) { // || msgType == Type.FILE.ordinal()
) {
ECFileMessageBody fileBody = new ECFileMessageBody(); ECFileMessageBody fileBody = new ECFileMessageBody();
if (msgType == Type.FILE.ordinal()) { if (msgType == Type.FILE.ordinal()) {
ecMessage.setType(Type.FILE); ecMessage.setType(Type.FILE);
@ -886,13 +901,19 @@ public class IMessageSqlManager extends AbstractSQLManager {
fileBody.setFileName(DemoUtils fileBody.setFileName(DemoUtils
.getFileNameFormUserdata(userData)); .getFileNameFormUserdata(userData));
ecMessage.setBody(fileBody); ecMessage.setBody(fileBody);
} else if (msgType == Type.RICH_TEXT.ordinal()) { } else if (msgType == Type.RICH_TEXT.ordinal()|| msgType == Type.FILE.ordinal()) {
{ {
ECPreviewMessageBody body = new ECPreviewMessageBody(); ECPreviewMessageBody body = new ECPreviewMessageBody();
ecMessage.setType(Type.RICH_TEXT); ecMessage.setType(Type.RICH_TEXT);
String content = cursor.getString(cursor String content = cursor.getString(cursor
.getColumnIndexOrThrow(IMessageColumn.BODY)); .getColumnIndexOrThrow(IMessageColumn.BODY));
body.setTitle(content); body.setTitle(content);
if (msgType == Type.FILE.ordinal())
{
body.setTitle(DemoUtils
.getFileNameFormUserdata(userData));
}
body.setLocalUrl(cursor.getString(cursor body.setLocalUrl(cursor.getString(cursor
.getColumnIndexOrThrow(IMessageColumn.FILE_PATH))); .getColumnIndexOrThrow(IMessageColumn.FILE_PATH)));
body.setUrl(cursor.getString(cursor body.setUrl(cursor.getString(cursor

91
app/src/main/java/cn/shangyu/gdxzPatient/ecdemo/ui/chatting/IMChattingHelper.java

@ -29,6 +29,7 @@ import android.graphics.BitmapFactory;
import android.os.Handler; import android.os.Handler;
import android.os.Message; import android.os.Message;
import android.text.TextUtils; import android.text.TextUtils;
import android.util.Log;
import cn.shangyu.gdxzPatient.activity.MainActivity; import cn.shangyu.gdxzPatient.activity.MainActivity;
import cn.shangyu.gdxzPatient.application.BaseApplication; import cn.shangyu.gdxzPatient.application.BaseApplication;
@ -341,31 +342,32 @@ public class IMChattingHelper implements OnChatReceiveListener,
*/ */
@Override @Override
public void OnReceivedMessage(ECMessage msg) { public void OnReceivedMessage(ECMessage msg) {
LogUtils.v("msg.getType() == ECMessage.Type.FILE==" Log.d("gdxzECMessage",msg.toString());
+ (msg.getType() == Type.FILE));
if (msg.getType() == Type.FILE) { if (msg.getType() == Type.FILE) {
try { msg.setType(Type.RICH_TEXT);
ECFileMessageBody body = (ECFileMessageBody) msg.getBody();
String fileExt = body.getFileExt(); // try {
// ECFileMessageBody body = (ECFileMessageBody) msg.getBody();
LogUtils.v("fileExt==" + fileExt + "FileName==" // String fileExt = body.getFileExt();
+ body.getFileName() + "RemoteUrl==" //
+ body.getRemoteUrl() + "LocalUrl==" // LogUtils.v("fileExt==" + fileExt + "FileName=="
+ body.getLocalUrl()); // + body.getFileName() + "RemoteUrl=="
LogUtils.v("fileExt==" + fileExt); // + body.getRemoteUrl() + "LocalUrl=="
LogUtils.v("msg.getUserData===" + msg.getUserData()); // + body.getLocalUrl());
String aaaa = msg.getUserData(); // LogUtils.v("fileExt==" + fileExt);
System.out.println("msg.getUserData===" + msg.getUserData()); // LogUtils.v("msg.getUserData===" + msg.getUserData());
if ("card".equals(fileExt)) { // String aaaa = msg.getUserData();
return; // System.out.println("msg.getUserData===" + msg.getUserData());
} // if ("card".equals(fileExt)) {
} catch (Exception e) { // return;
// TODO Auto-generated catch block // }
e.printStackTrace(); // } catch (Exception e) {
} // // TODO Auto-generated catch block
// e.printStackTrace();
// }
} }
exture = msg.getUserData(); exture = msg.getUserData();
LogUtils.v("exture===" + exture); Log.d("gdxzECMessage","exture===" + exture);
if (msg == null) { if (msg == null) {
return; return;
} }
@ -407,7 +409,8 @@ public class IMChattingHelper implements OnChatReceiveListener,
.getAbsolutePath()); .getAbsolutePath());
} else if (msg.getType() == Type.IMAGE) { } else if (msg.getType() == Type.IMAGE) {
ECImageMessageBody imageBody = (ECImageMessageBody) body; ECImageMessageBody imageBody = (ECImageMessageBody) body;
thumbnail = !TextUtils.isEmpty(imageBody.getThumbnailFileUrl()); thumbnail=false;
// thumbnail = !TextUtils.isEmpty(imageBody.getThumbnailFileUrl());
String remoteUrl = imageBody.getRemoteUrl();//大图 String remoteUrl = imageBody.getRemoteUrl();//大图
String thumbnailFileUrl = imageBody.getThumbnailFileUrl();//缩略图 String thumbnailFileUrl = imageBody.getThumbnailFileUrl();//缩略图
LogUtil.i("getRemoteUrl = "+imageBody.getRemoteUrl()); LogUtil.i("getRemoteUrl = "+imageBody.getRemoteUrl());
@ -423,9 +426,10 @@ public class IMChattingHelper implements OnChatReceiveListener,
imageBody.setThumbnailFileUrl(replace1); imageBody.setThumbnailFileUrl(replace1);
} }
imageBody.setLocalUrl(new File(FileAccessor.getImagePathName(), DemoUtils.md5(thumbnail ? imageBody.getThumbnailFileUrl(): imageBody.getRemoteUrl())+ "." + fileExt).getAbsolutePath()); imageBody.setLocalUrl(new File(FileAccessor.getImagePathName(), DemoUtils.md5(thumbnail ? imageBody.getThumbnailFileUrl(): imageBody.getRemoteUrl())+ "." + fileExt).getAbsolutePath());
LogUtil.i("getRemoteUrl修改后 = "+imageBody.getRemoteUrl()); Log.d("gdxzECMessage",body.toString());
LogUtil.i("getThumbnailFileUrl修改后 = "+imageBody.getThumbnailFileUrl()); Log.d("gdxzECMessage","getRemoteUrl修改后 = "+imageBody.getRemoteUrl());
LogUtil.i("getHDImageURL修改后 = "+imageBody.getHDImageURL()); Log.d("gdxzECMessage","getThumbnailFileUrl修改后 = "+imageBody.getThumbnailFileUrl());
Log.d("gdxzECMessage","getHDImageURL修改后 = "+imageBody.getHDImageURL());
} else { } else {
body.setLocalUrl(new File(FileAccessor.getFilePathName(), body.setLocalUrl(new File(FileAccessor.getFilePathName(),
@ -643,7 +647,7 @@ public class IMChattingHelper implements OnChatReceiveListener,
.getForm()); .getForm());
// 与专家聊天的from:1 // 与专家聊天的from:1
LogUtils.e("普通消息》》》from:" + from); Log.d("gdxzECMessage","普通消息》》》from:" + from);
/* /*
* if (from == null || from.equals("null")) { String substring = * if (from == null || from.equals("null")) { String substring =
@ -1083,23 +1087,24 @@ public class IMChattingHelper implements OnChatReceiveListener,
mOfflineMsg = msg; mOfflineMsg = msg;
// postReceiveMessage(msg, false); // postReceiveMessage(msg, false);
if (msg.getType() == Type.FILE) { if (msg.getType() == Type.FILE) {
try { msg.setType(Type.RICH_TEXT);
ECFileMessageBody body = (ECFileMessageBody) msg.getBody(); // try {
String fileExt = body.getFileExt(); // ECFileMessageBody body = (ECFileMessageBody) msg.getBody();
// String fileExt = body.getFileExt();
LogUtils.v("fileExt==" + fileExt + "FileName==" //
+ body.getFileName() + "RemoteUrl==" // LogUtils.v("fileExt==" + fileExt + "FileName=="
+ body.getRemoteUrl() + "LocalUrl==" // + body.getFileName() + "RemoteUrl=="
+ body.getLocalUrl()); // + body.getRemoteUrl() + "LocalUrl=="
LogUtils.v("fileExt==" + fileExt); // + body.getLocalUrl());
LogUtils.v("msg.getUserData===" + msg.getUserData()); // LogUtils.v("fileExt==" + fileExt);
if ("card".equals(fileExt)) { // LogUtils.v("msg.getUserData===" + msg.getUserData());
return; // if ("card".equals(fileExt)) {
} // return;
} catch (Exception e) { // }
// } catch (Exception e) {
// TODO Auto-generated catch block // TODO Auto-generated catch block
e.printStackTrace(); // e.printStackTrace();
} // }
} }
exture = msg.getUserData(); exture = msg.getUserData();
LogUtils.v("exture===" + exture); LogUtils.v("exture===" + exture);

3
app/src/main/java/cn/shangyu/gdxzPatient/utils/ValidateUtils.java

@ -22,8 +22,7 @@ public class ValidateUtils {
// ^(13[0-9]|14[579]|15[0-3,5-9]|16[6]|17[0135678]|18[0-9]|19[89])\\d{8}$//2018.5.29修改 // ^(13[0-9]|14[579]|15[0-3,5-9]|16[6]|17[0135678]|18[0-9]|19[89])\\d{8}$//2018.5.29修改
// ^(13[0-9]|14[5-9]|15[012356789]|166|17[0-8]|18[0-9]|19[8-9])[0-9]{8}$2018.6.06修改 // ^(13[0-9]|14[5-9]|15[012356789]|166|17[0-8]|18[0-9]|19[8-9])[0-9]{8}$2018.6.06修改
Pattern p = Pattern Pattern p = Pattern.compile("^(1[3-9])[0-9]{9}$");
.compile("^(13[0-9]|14[5-9]|15[012356789]|166|17[0-8]|18[0-9]|19[8-9])[0-9]{8}$");
Matcher m = p.matcher(mobiles); Matcher m = p.matcher(mobiles);
return m.matches(); return m.matches();
} }

2
app/src/main/res/layout/activity_doctor_detail.xml

@ -920,7 +920,7 @@
android:layout_marginLeft="10dp" android:layout_marginLeft="10dp"
android:layout_marginTop="5dp" android:layout_marginTop="5dp"
android:layout_marginBottom="5dp" android:layout_marginBottom="5dp"
android:text="患者评(0)" android:text="患者评(0)"
android:textColor="@color/green_theme" android:textColor="@color/green_theme"
android:textSize="@dimen/textsizea" /> android:textSize="@dimen/textsizea" />

Loading…
Cancel
Save