Commit 641fc2d2 by 许梦竹

最后修改

parent 6b27c098
package com.danding.yang800;
package com.danding.yang800;
import android.os.Bundle;
import android.support.v4.content.ContextCompat;
......@@ -21,7 +21,6 @@ public class AboutActivity extends BaseActivity {
TextView about_backTv;
@BindView(R.id.about_scrollView)
XScrollView about_scrollView;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
......@@ -30,6 +29,7 @@ public class AboutActivity extends BaseActivity {
// StatusColorUtil.setStatusBarColor(this, R.color.white);
// StatusColorUtil.StatusBarLightMode(this, type);
// }
setContentView(R.layout.activity_about);
Sofia.with(this).statusBarDarkFont().statusBarBackground(ContextCompat.getColor(this, R.color.white));
ButterKnife.bind(this);
......
......@@ -12,6 +12,7 @@ import android.widget.RelativeLayout;
import android.widget.TextView;
import com.danding.yang800.Presenter.MyProfitActivityPresenter;
import com.danding.yang800.Util.ToastUtil;
import com.danding.yang800.View.NetworkProgressDialog;
import butterknife.BindView;
......@@ -39,11 +40,15 @@ public class MyProfitActivity extends BaseActivity {
RelativeLayout myprofit_ticket_Layout;
@BindView(R.id.myprofit_waitProfitTv)
TextView myprofit_waitProfitTv;
@BindView(R.id.myprofit_realNameTv)
TextView myprofit_realNameTv;
private NetworkProgressDialog pd;
MyProfitActivityPresenter presenter;
String storeId = "";
SharedPreferences sp;
String money = "";
boolean setrealName;
String name = "";
@Override
protected void onCreate(Bundle savedInstanceState) {
......@@ -57,18 +62,24 @@ public class MyProfitActivity extends BaseActivity {
sp = getSharedPreferences("variable", Context.MODE_PRIVATE);
storeId = sp.getString("storeId", "");
presenter = new MyProfitActivityPresenter(this);
initDialog();
}
@OnClick({R.id.profit_takebutton, R.id.myProfit_backTv, R.id.myprofit_detailedLayout, R.id.myprofit_takeNotes_Layout
, R.id.myProfit_waitApplyLayout, R.id.myprofit_ticket_Layout})
public void onViewClicked(View view) {
switch (view.getId()) {
case R.id.profit_takebutton:
startActivity(InputAliAccountActivity.class);
if (setrealName) {
startActivity(InputAliAccountActivity.class);
myprofit_realNameTv.setVisibility(View.GONE);
// startActivity(TakeOutActivity.class);
sp.edit().putString("money", money).commit();
sp.edit().putString("money", money).commit();
} else {
myprofit_realNameTv.setVisibility(View.VISIBLE);
ToastUtil.show(MyProfitActivity.this, "请先实名认证");
}
break;
case R.id.myprofit_detailedLayout:
startActivity(AccountDetailedActivity.class);
......@@ -124,6 +135,7 @@ public class MyProfitActivity extends BaseActivity {
super.onResume();
presenter.balance(storeId);
presenter.getWaitingSettlementIncome(storeId);
presenter.getInfo(sp.getInt("userId", 0) + "");
}
@Override
......@@ -132,6 +144,11 @@ public class MyProfitActivity extends BaseActivity {
sp.edit().putString("money", "").commit();
}
public void initData(boolean realNameSet, String realname) {
setrealName = realNameSet;
name = realname;
}
public void updateWaitProfit(String profit) {
myprofit_waitProfitTv.setText(profit);
}
......
......@@ -96,7 +96,11 @@ public class OrderManageActivity extends BaseActivity implements XListView.IXLis
@Override
public void onItemClick(AdapterView<?> parent, View view, int position,
long id) {
Intent intent = new Intent(OrderManageActivity.this, OrderDetailActivity.class);
intent.putExtra("orderSn", adapter.getItem(position - 1).getOrderSn());
intent.putExtra("packageSn", adapter.getItem(position - 1).getPackageSn());
intent.putExtra("status", adapter.getItem(position - 1).getStatus());
startActivityForResult(intent, 0);
}
};
......@@ -226,9 +230,9 @@ public class OrderManageActivity extends BaseActivity implements XListView.IXLis
} else if (ifpay) {
presenter.getOrderInfo("1", storeId, page + "", false);
} else if (ifsend) {
presenter.getOrderInfo("2", storeId, page + "", false);
presenter.getOrderInfo("26", storeId, page + "", false);
} else if (ifcollect) {
presenter.getOrderInfo("6", storeId, page + "", false);
presenter.getOrderInfo("1416", storeId, page + "", false);
}
}
......@@ -241,9 +245,9 @@ public class OrderManageActivity extends BaseActivity implements XListView.IXLis
} else if (ifpay) {
presenter.getOrderInfo("1", storeId, page + "", true);
} else if (ifsend) {
presenter.getOrderInfo("2", storeId, page + "", true);
presenter.getOrderInfo("26", storeId, page + "", true);
} else if (ifcollect) {
presenter.getOrderInfo("6", storeId, page + "", true);
presenter.getOrderInfo("1416", storeId, page + "", true);
}
} else {
onLoad();
......
......@@ -131,4 +131,46 @@ public class MyProfitActivityPresenter {
}
});
}
public void getInfo(final String userId) {
HashMap<String, String> map = new HashMap<>();
map.put("userId", userId);
// new VolleyUtil(context).request(context, "http://" + BuildConfig.HOSTURL + "/xhr/user/setting/toUpdateUserInfo",true, map, new HttpCallBack() {
new VolleyUtil(context).request(context, "user.setting.toUpdateUserInfo", true, map, new HttpCallBack() {
@Override
public void onSuccess(JSONObject json) {
try {
JSONObject jsonObject = json.getJSONObject("result");
boolean realNameSet = false;
String realname = "";
try {
realNameSet = jsonObject.getBoolean("realNameSet");
realname = jsonObject.getString("realname");
} catch (Exception e) {
}
context.initData(realNameSet,realname);
} catch (Exception e) {
e.printStackTrace();
}
}
@Override
public void onerrSuccess() {
}
@Override
public void onCatch() {
}
@Override
public void onFail() {
}
});
}
}
......@@ -228,4 +228,14 @@
android:textColor="@color/white"
android:textSize="28px" />
</com.zhy.autolayout.AutoLinearLayout>
<TextView
android:id="@+id/myprofit_realNameTv"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="28px"
android:layout_marginTop="14px"
android:text="为确保您的账户安全,提现前请在“设置-实名认证”完成信息认证"
android:textColor="@color/pink"
android:textSize="24px"
android:visibility="gone" />
</com.zhy.autolayout.AutoLinearLayout>
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 to comment