正在查看: 微商客 v2.1.2 应用的 SYMyActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: 微商客 v2.1.2 应用的 SYMyActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.jianzhen.wsk.ui;
import android.view.View;
import android.widget.TextView;
import com.jianzhen.wsk.BaseActivity;
import com.jianzhen.wsk.R;
import com.jianzhen.wsk.dialog.CustomerServiceDialog;
import com.jianzhen.wsk.net.api.Constant;
import com.jianzhen.wsk.net.bean.LoginBean;
import com.jianzhen.wsk.ui.login.LoginActivity;
import com.jianzhen.wsk.ui.set.BackWebActivity;
import com.jianzhen.wsk.ui.set.SettingActivity;
import com.jianzhen.wsk.utils.DataSaveUtils;
import com.jianzhen.wsk.utils.Utils;
public class SYMyActivity extends BaseActivity implements View.OnClickListener {
private CustomerServiceDialog customerServiceDialog;
private TextView idTv;
private TextView nameTv;
@Override
protected int getLayoutId() {
return R.layout.my_layout;
}
@Override
protected void initTitle() {
}
@Override
protected boolean isSetBaseTitle() {
return false;
}
@Override
protected void initPageView() {
findViewById(R.id.my_back_iv).setOnClickListener(this);
findViewById(R.id.my_go_login).setOnClickListener(this);
findViewById(R.id.my_set).setOnClickListener(this);
findViewById(R.id.back_feed_lay).setOnClickListener(this);
findViewById(R.id.customer_service_lay).setOnClickListener(this);
findViewById(R.id.my_qunfabao).setOnClickListener(this);
findViewById(R.id.jiaoben).setOnClickListener(this);
this.nameTv = (TextView) findViewById(R.id.name_tv);
this.idTv = (TextView) findViewById(R.id.id_tv);
}
protected void onResume() {
super.onResume();
LoginBean.ResultBean loginData = DataSaveUtils.getLoginData(this);
if (DataSaveUtils.isLogin(this) && loginData != null) {
String phoneNumber = DataSaveUtils.getLoginData(this).getPhoneNumber();
String petName = DataSaveUtils.getLoginData(this).getPetName();
if (phoneNumber != null && !"".equals(phoneNumber) && !phoneNumber.isEmpty()) {
this.nameTv.setText(Utils.showPhoneNum(phoneNumber));
} else {
this.nameTv.setText(petName);
}
if (loginData.getYsUserId() > 0) {
this.idTv.setVisibility(0);
this.idTv.setText("ID:" + loginData.getYsUserId());
return;
} else {
this.idTv.setVisibility(8);
return;
}
}
this.nameTv.setText("请登录");
this.idTv.setVisibility(8);
}
@Override
public void onClick(View view) {
switch (view.getId()) {
case R.id.back_feed_lay:
if (!DataSaveUtils.isLogin(this)) {
startIntent(this, LoginActivity.class);
break;
} else {
BackWebActivity.startWebActivity(this, "意见反馈", Constant.feedbackUrl);
break;
}
case R.id.customer_service_lay:
if (this.customerServiceDialog == null) {
this.customerServiceDialog = new CustomerServiceDialog(this, 1);
}
this.customerServiceDialog.show();
break;
case R.id.my_back_iv:
finish();
break;
case R.id.my_go_login:
if (!DataSaveUtils.isLogin(this)) {
startIntent(this, LoginActivity.class);
break;
}
break;
case R.id.my_set:
startIntent(this, SettingActivity.class);
break;
}
}
}