Commit aa5c57f0 by yu

2017-10-25,end

parent 6e4e56a1
...@@ -20,7 +20,6 @@ public class Constants { ...@@ -20,7 +20,6 @@ public class Constants {
public static final String BASE_MESSAGE = "https://47.94.101.239:7400/"; public static final String BASE_MESSAGE = "https://47.94.101.239:7400/";
// /api-count/ // /api-count/
public static final String BASE_COUNT = "https://47.94.101.239:7500/"; public static final String BASE_COUNT = "https://47.94.101.239:7500/";
/**************************测试环境根路径*******************************/ /**************************测试环境根路径*******************************/
public static final String BASE_TEST = "http://47.94.101.239:3112"; public static final String BASE_TEST = "http://47.94.101.239:3112";
/**************************正式环境根路径*******************************/ /**************************正式环境根路径*******************************/
......
package com.dayu.bigfish.activity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.dayu.bigfish.R;
import com.dayu.bigfish.base.BaseActivity;
import com.dayu.bigfish.moudle.againvisit.AgainVisitPresenter;
import com.dayu.bigfish.moudle.againvisit.AgainVisitView;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
/**
* 需要再次上门
* on 2017/9/13.
* Created by MrWang
*/
public class AgainVisitActivity extends BaseActivity<AgainVisitView, AgainVisitPresenter> implements AgainVisitView {
@BindView(R.id.title_text)
TextView titleText;
@BindView(R.id.receiving_back)
ImageView receivingBack;
@BindView(R.id.time_title)
RelativeLayout timeTitle;
@BindView(R.id.time_one)
RelativeLayout timeOne;
@BindView(R.id.time_two)
RelativeLayout timeTwo;
@BindView(R.id.time_subscribe_remark)
TextView timeSubscribeRemark;
@BindView(R.id.et_input)
EditText etInput;
@BindView(R.id.time_Three)
RelativeLayout timeThree;
@BindView(R.id.linearLayout_time)
LinearLayout linearLayoutTime;
@BindView(R.id.submit_button)
Button submitButton;
private AgainVisitPresenter againVisitPresenter;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_updata_subscribe_time);
ButterKnife.bind(this);
initView();
}
@Override
public void initListener() {
}
@Override
public void initView() {
titleText.setText("需再次上门");
}
@Override
public void initData() {
}
@Override
public AgainVisitPresenter initPresenter() {
this.againVisitPresenter = new AgainVisitPresenter(this);
return againVisitPresenter;
}
@OnClick({R.id.receiving_back, R.id.submit_button})
public void onViewClicked(View view) {
switch (view.getId()) {
case R.id.receiving_back:
finish();
break;
case R.id.submit_button:
break;
}
}
}
...@@ -133,7 +133,6 @@ public class HomeActivity extends BaseActivity<HomeView, HomePresenter> implemen ...@@ -133,7 +133,6 @@ public class HomeActivity extends BaseActivity<HomeView, HomePresenter> implemen
@Override @Override
public void initView() { public void initView() {
userId = GetUserInfo.getACCOUNT_ID(this); userId = GetUserInfo.getACCOUNT_ID(this);
token = GetUserInfo.getToken(this);
siteId = GetUserInfo.getSITE_ID(this); siteId = GetUserInfo.getSITE_ID(this);
hxUserId = GetUserInfo.getHxUserId(this); hxUserId = GetUserInfo.getHxUserId(this);
initReceiveData(token); initReceiveData(token);
...@@ -142,7 +141,6 @@ public class HomeActivity extends BaseActivity<HomeView, HomePresenter> implemen ...@@ -142,7 +141,6 @@ public class HomeActivity extends BaseActivity<HomeView, HomePresenter> implemen
.where(MessageSysDao.Properties.Flag.eq("0")) .where(MessageSysDao.Properties.Flag.eq("0"))
.build(); .build();
List<MessageSys> list1 = query1.list(); List<MessageSys> list1 = query1.list();
if (list1.size() == 0) { if (list1.size() == 0) {
imageRoundPage1.setVisibility(View.GONE); imageRoundPage1.setVisibility(View.GONE);
} else { } else {
...@@ -193,6 +191,7 @@ public class HomeActivity extends BaseActivity<HomeView, HomePresenter> implemen ...@@ -193,6 +191,7 @@ public class HomeActivity extends BaseActivity<HomeView, HomePresenter> implemen
/** /**
* 动态刷新待接单列表小红点-->显示 * 动态刷新待接单列表小红点-->显示
*/ */
@Subscribe(threadMode = ThreadMode.MAIN) @Subscribe(threadMode = ThreadMode.MAIN)
public void onRefreReceiveData(RefreReceiveData refreReceiveData) { public void onRefreReceiveData(RefreReceiveData refreReceiveData) {
if (refreReceiveData.getReceive() == 0) { if (refreReceiveData.getReceive() == 0) {
...@@ -228,6 +227,7 @@ public class HomeActivity extends BaseActivity<HomeView, HomePresenter> implemen ...@@ -228,6 +227,7 @@ public class HomeActivity extends BaseActivity<HomeView, HomePresenter> implemen
adapter = new FragmentHomeAdapter(getSupportFragmentManager(), list_fragments); adapter = new FragmentHomeAdapter(getSupportFragmentManager(), list_fragments);
viewPager.setAdapter(adapter); viewPager.setAdapter(adapter);
homeTabLayout.setupWithViewPager(viewPager); homeTabLayout.setupWithViewPager(viewPager);
//
initNetWorkTabNum(userId, token, 0); initNetWorkTabNum(userId, token, 0);
homeTabLayout.setTabMode(TabLayout.MODE_FIXED); homeTabLayout.setTabMode(TabLayout.MODE_FIXED);
viewPager.setCurrentItem(0); viewPager.setCurrentItem(0);
...@@ -548,7 +548,6 @@ public class HomeActivity extends BaseActivity<HomeView, HomePresenter> implemen ...@@ -548,7 +548,6 @@ public class HomeActivity extends BaseActivity<HomeView, HomePresenter> implemen
@Override @Override
public void getNewVersionSuccess(String msg, String downloadUrl) { public void getNewVersionSuccess(String msg, String downloadUrl) {
showUpdateDialog(msg, downloadUrl); showUpdateDialog(msg, downloadUrl);
} }
...@@ -565,7 +564,6 @@ public class HomeActivity extends BaseActivity<HomeView, HomePresenter> implemen ...@@ -565,7 +564,6 @@ public class HomeActivity extends BaseActivity<HomeView, HomePresenter> implemen
/** /**
* 弹窗选择是否更新(软更新) * 弹窗选择是否更新(软更新)
*
* @param upgradePrompt 提示语 * @param upgradePrompt 提示语
* @param downloadPath 下载的路径 * @param downloadPath 下载的路径
*/ */
......
...@@ -139,7 +139,6 @@ public class LoginActivity extends BaseActivity<LoginView, LoginPresenter> imple ...@@ -139,7 +139,6 @@ public class LoginActivity extends BaseActivity<LoginView, LoginPresenter> imple
startActivity(intent); startActivity(intent);
finish(); finish();
} else { } else {
//ToastUtils.showShortToast("该工程师暂无头像");
Intent intent = new Intent(this, HomeActivity.class); Intent intent = new Intent(this, HomeActivity.class);
startActivity(intent); startActivity(intent);
finish(); finish();
...@@ -169,6 +168,7 @@ public class LoginActivity extends BaseActivity<LoginView, LoginPresenter> imple ...@@ -169,6 +168,7 @@ public class LoginActivity extends BaseActivity<LoginView, LoginPresenter> imple
}); });
} }
userId = Integer.parseInt(accountId); userId = Integer.parseInt(accountId);
//第一次提交的数据
commitVersionInfo(userId, getIMEI(this), getPackageNum(), token); commitVersionInfo(userId, getIMEI(this), getPackageNum(), token);
} }
...@@ -326,7 +326,6 @@ public class LoginActivity extends BaseActivity<LoginView, LoginPresenter> imple ...@@ -326,7 +326,6 @@ public class LoginActivity extends BaseActivity<LoginView, LoginPresenter> imple
public static String getIMEI(Context context) { public static String getIMEI(Context context) {
TelephonyManager telephonyManager = (TelephonyManager) context.getSystemService(context.TELEPHONY_SERVICE); TelephonyManager telephonyManager = (TelephonyManager) context.getSystemService(context.TELEPHONY_SERVICE);
String imei = telephonyManager.getDeviceId(); String imei = telephonyManager.getDeviceId();
return imei; return imei;
} }
......
...@@ -53,9 +53,6 @@ public class MyApplication extends Application { ...@@ -53,9 +53,6 @@ public class MyApplication extends Application {
public SQLiteDatabase db; public SQLiteDatabase db;
public DaoMaster.DevOpenHelper helper; public DaoMaster.DevOpenHelper helper;
public DaoMaster daoMaster; public DaoMaster daoMaster;
private String hxUserId;
private String hxUserPwd;
private NetworkConnectChangedReceiver networkConnectChangedReceiver;
/** /**
* 程序的入口方法 * 程序的入口方法
*/ */
...@@ -71,7 +68,6 @@ public class MyApplication extends Application { ...@@ -71,7 +68,6 @@ public class MyApplication extends Application {
//捕获错误报告并上传到友盟服务器 //捕获错误报告并上传到友盟服务器
/* public static void reportError(Context context, String error) /* public static void reportError(Context context, String error)
public static void reportError(Context context, Throwable e)*/ public static void reportError(Context context, Throwable e)*/
//上下文 //上下文
mContext = getApplicationContext(); mContext = getApplicationContext();
// 主线程的Handler // 主线程的Handler
......
...@@ -19,7 +19,7 @@ import okhttp3.Response; ...@@ -19,7 +19,7 @@ import okhttp3.Response;
/** /**
* 首页的数据交互层 * 首页的数据交互层
* 2017/8/20. * 2017/8/20.
*/ */
public class HomePresenter extends BasePresenter<HomeView> { public class HomePresenter extends BasePresenter<HomeView> {
...@@ -29,11 +29,11 @@ public class HomePresenter extends BasePresenter<HomeView> { ...@@ -29,11 +29,11 @@ public class HomePresenter extends BasePresenter<HomeView> {
mHomeView = homeView; mHomeView = homeView;
} }
public void get(String token,String version) { public void get(String token, String version) {
//联网检测当前是否为最新版本 //联网检测当前是否为最新版本
OkGo.get(Constants.UPDATA_VERSION + "dayushifua_dayu") OkGo.get(Constants.UPDATA_VERSION + "dayushifua_dayu")
.tag(this) .tag(this)
.headers("token",token) .headers("token", token)
.execute(new StringCallback() { .execute(new StringCallback() {
@Override @Override
public void onSuccess(String s, Call call, Response response) { public void onSuccess(String s, Call call, Response response) {
...@@ -60,10 +60,11 @@ public class HomePresenter extends BasePresenter<HomeView> { ...@@ -60,10 +60,11 @@ public class HomePresenter extends BasePresenter<HomeView> {
} }
}); });
} }
/** /**
* 获取新版本的信息 * 获取新版本的信息
*/ */
public void upgradeVersion(String versionCode,String token) { public void upgradeVersion(String versionCode, String token) {
//?appId=dayushifua_dayu&versionCode=1.10.1 //?appId=dayushifua_dayu&versionCode=1.10.1
OkGo.get(Constants.UPGRADE_VERSION) OkGo.get(Constants.UPGRADE_VERSION)
.tag(this) .tag(this)
...@@ -74,7 +75,7 @@ public class HomePresenter extends BasePresenter<HomeView> { ...@@ -74,7 +75,7 @@ public class HomePresenter extends BasePresenter<HomeView> {
@Override @Override
public void onSuccess(String s, Call call, Response response) { public void onSuccess(String s, Call call, Response response) {
Gson gson = new Gson(); Gson gson = new Gson();
System.out.println("新版本返回数据"+s); System.out.println("新版本返回数据" + s);
VersionBase versionBase = gson.fromJson(s, VersionBase.class); VersionBase versionBase = gson.fromJson(s, VersionBase.class);
if (versionBase.getCode() == 0) { if (versionBase.getCode() == 0) {
//弹窗 //弹窗
...@@ -88,7 +89,7 @@ public class HomePresenter extends BasePresenter<HomeView> { ...@@ -88,7 +89,7 @@ public class HomePresenter extends BasePresenter<HomeView> {
@Override @Override
public void onError(Call call, Response response, Exception e) { public void onError(Call call, Response response, Exception e) {
mHomeView.Error("网络或服务器异常,获取新版本APK失败"); mHomeView.Error("网络或服务器异常,获取新版本APK失败");
} }
}); });
} }
......
...@@ -23,7 +23,6 @@ public class LogUtils { ...@@ -23,7 +23,6 @@ public class LogUtils {
public static final int LEVEL_OFF = 0; public static final int LEVEL_OFF = 0;
/** 日志输出级别NONE */ /** 日志输出级别NONE */
public static final int LEVEL_ALL = 7; public static final int LEVEL_ALL = 7;
/** 日志输出级别V */ /** 日志输出级别V */
public static final int LEVEL_VERBOSE = 1; public static final int LEVEL_VERBOSE = 1;
/** 日志输出级别D */ /** 日志输出级别D */
......
...@@ -71,7 +71,6 @@ ...@@ -71,7 +71,6 @@
android:layout_height="0dp" android:layout_height="0dp"
android:layout_weight="1" android:layout_weight="1"
> >
<android.support.design.widget.TabLayout <android.support.design.widget.TabLayout
android:id="@+id/home_tabLayout" android:id="@+id/home_tabLayout"
android:layout_width="match_parent" android:layout_width="match_parent"
...@@ -80,8 +79,6 @@ ...@@ -80,8 +79,6 @@
app:tabMaxWidth="0dp" app:tabMaxWidth="0dp"
app:tabMode="fixed" app:tabMode="fixed"
/> />
</RelativeLayout> </RelativeLayout>
<ImageView <ImageView
style="@style/card_line" style="@style/card_line"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment