|
@@ -7,6 +7,7 @@ import android.view.View;
|
|
|
import androidx.annotation.Nullable;
|
|
|
|
|
|
import com.alibaba.android.arouter.facade.annotation.Route;
|
|
|
+import com.cooleshow.base.bean.ServiceContactBean;
|
|
|
import com.cooleshow.base.router.RouterPath;
|
|
|
import com.cooleshow.base.ui.activity.BaseMVPActivity;
|
|
|
import com.cooleshow.base.utils.ToastUtil;
|
|
@@ -34,10 +35,10 @@ import io.rong.imkit.utils.StatusBarUtil;
|
|
|
public class FeedBackActivity extends BaseMVPActivity<ActivityFeedbackBinding, FeedBackPresenter> implements FeedBackContract.FeedBackView, View.OnClickListener {
|
|
|
@Override
|
|
|
public void onClick(View view) {
|
|
|
- switch (view.getId()){
|
|
|
+ switch (view.getId()) {
|
|
|
case R.id.tv_submit:
|
|
|
String content = viewBinding.etContent.getText().toString().trim();
|
|
|
- if (TextUtils.isEmpty(content)){
|
|
|
+ if (TextUtils.isEmpty(content)) {
|
|
|
ToastUtil.getInstance().showShort("请输入您的反馈意见");
|
|
|
break;
|
|
|
}
|
|
@@ -53,6 +54,7 @@ public class FeedBackActivity extends BaseMVPActivity<ActivityFeedbackBinding, F
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
@Override
|
|
|
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
|
|
super.onCreate(savedInstanceState);
|
|
@@ -66,6 +68,12 @@ public class FeedBackActivity extends BaseMVPActivity<ActivityFeedbackBinding, F
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
+ protected void onResume() {
|
|
|
+ super.onResume();
|
|
|
+ presenter.getCustomerServiceContact();
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
protected ActivityFeedbackBinding getLayoutView() {
|
|
|
return ActivityFeedbackBinding.inflate(getLayoutInflater());
|
|
|
}
|
|
@@ -80,4 +88,14 @@ public class FeedBackActivity extends BaseMVPActivity<ActivityFeedbackBinding, F
|
|
|
ToastUtil.getInstance().showShort("提交成功");
|
|
|
finish();
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void getCustomerServiceContactSuccess(ServiceContactBean data) {
|
|
|
+ if (!checkActivityExist()) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (data != null) {
|
|
|
+ viewBinding.tvContactText.setText(getString(R.string.custom_service_tip, data.getPhone(), data.getEmail()));
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|