Bladeren bron

设置服务器地址不生效问题
签到签离语音提示

ifengouy 2 jaren geleden
bovenliggende
commit
c28002f363

+ 3 - 1
app/src/main/java/com/sunwin/visitorapp/activity/VisitSignActivity.java

@@ -194,7 +194,6 @@ public class VisitSignActivity extends BaseActivity implements IdCardReadCallbac
                 } catch (Exception e) {
 
                 }
-
                 requsetModel.setPhone(infoModel.getPhone());
                 long insert = DatabaseManager.getInstance().insert(requsetModel);
                 LogUtil.e(TAG, "insert sign record =" + insert);
@@ -258,6 +257,8 @@ public class VisitSignActivity extends BaseActivity implements IdCardReadCallbac
                 @Override
                 public void run() {
                     ToastUtils.showToast(visitType == 1 ? "签到成功!" : "签离成功!");
+
+                    BaseApplication.getSystemTTS().playText(visitType == 1 ? "签到成功" : "签离成功");
                     finish();
                 }
             });
@@ -266,6 +267,7 @@ public class VisitSignActivity extends BaseActivity implements IdCardReadCallbac
                 @Override
                 public void run() {
                     ToastUtils.showToast("用户不存在!");
+                    BaseApplication.getSystemTTS().playText("用户不存在");
                 }
             });
         }

+ 7 - 5
app/src/main/java/com/sunwin/visitorapp/fragment/SystemOptionFr.java

@@ -14,6 +14,7 @@ import androidx.annotation.Nullable;
 import com.sunwin.visitorapp.BaseFragment;
 import com.sunwin.visitorapp.R;
 import com.sunwin.visitorapp.face.FRImpl;
+import com.sunwin.visitorapp.net.RetrofitUtil;
 import com.sunwin.visitorapp.utils.Constant;
 import com.sunwin.visitorapp.utils.SharePrefenceUtils;
 import com.sunwin.visitorapp.utils.ToastUtils;
@@ -55,12 +56,12 @@ public class SystemOptionFr extends BaseFragment implements View.OnClickListener
         String serverUrl = SharePrefenceUtils.getString(Constant.ISharePrefence.BASEURL, Constant.BASE_HOST);
 
         int lastIndex = serverUrl.lastIndexOf(":");
-        mEtIpServer.setText(serverUrl.substring(0,lastIndex));
-        mEtIpPort.setText(serverUrl.substring(lastIndex+1,serverUrl.length()-1));
+        mEtIpServer.setText(serverUrl.substring(0, lastIndex));
+        mEtIpPort.setText(serverUrl.substring(lastIndex + 1, serverUrl.length() - 1));
 
-        mEtCompareValue.setText(Constant.COMPARSION_VALUE+"");
-        mEtLivenessValue.setText(Constant.LIVENESS_VALUE+"");
-        mEtCompareNum.setText(Constant.COMPARSION_FREQUENCY+"");
+        mEtCompareValue.setText(Constant.COMPARSION_VALUE + "");
+        mEtLivenessValue.setText(Constant.LIVENESS_VALUE + "");
+        mEtCompareNum.setText(Constant.COMPARSION_FREQUENCY + "");
 
 
     }
@@ -115,6 +116,7 @@ public class SystemOptionFr extends BaseFragment implements View.OnClickListener
             return;
         }
         SharePrefenceUtils.putString(Constant.ISharePrefence.BASEURL, address);
+        RetrofitUtil.initRetrofit();
 
         //人脸比对参数
         try {