|
@@ -1,14 +1,20 @@
|
|
|
package com.sheep.gamegroup.view.activity;
|
|
package com.sheep.gamegroup.view.activity;
|
|
|
|
|
|
|
|
import android.app.Activity;
|
|
import android.app.Activity;
|
|
|
|
|
+import android.text.TextUtils;
|
|
|
import android.view.View;
|
|
import android.view.View;
|
|
|
import android.widget.EditText;
|
|
import android.widget.EditText;
|
|
|
import android.widget.TextView;
|
|
import android.widget.TextView;
|
|
|
|
|
|
|
|
-import com.kfzs.duanduan.G;
|
|
|
|
|
|
|
+import com.sheep.gamegroup.di.components.DaggerCommitWxMakeMoneyComponent;
|
|
|
|
|
+import com.sheep.gamegroup.di.modules.CommitWxMakeMoneyModule;
|
|
|
|
|
+import com.sheep.gamegroup.presenter.CommitWxMakeMoneyContract;
|
|
|
import com.sheep.gamegroup.presenter.CommitWxMakeMoneyPresenter;
|
|
import com.sheep.gamegroup.presenter.CommitWxMakeMoneyPresenter;
|
|
|
|
|
+import com.sheep.jiuyan.samllsheep.BuildConfig;
|
|
|
import com.sheep.jiuyan.samllsheep.R;
|
|
import com.sheep.jiuyan.samllsheep.R;
|
|
|
|
|
+import com.sheep.jiuyan.samllsheep.SheepApp;
|
|
|
import com.sheep.jiuyan.samllsheep.base.BaseActivity;
|
|
import com.sheep.jiuyan.samllsheep.base.BaseActivity;
|
|
|
|
|
+import com.sheep.jiuyan.samllsheep.utils.G;
|
|
|
import com.sheep.jiuyan.samllsheep.utils.TitleBarUtils;
|
|
import com.sheep.jiuyan.samllsheep.utils.TitleBarUtils;
|
|
|
|
|
|
|
|
import javax.inject.Inject;
|
|
import javax.inject.Inject;
|
|
@@ -22,7 +28,7 @@ import butterknife.OnClick;
|
|
|
* realicing@sina.com
|
|
* realicing@sina.com
|
|
|
*/
|
|
*/
|
|
|
|
|
|
|
|
-public class CommitWxAct extends BaseActivity {
|
|
|
|
|
|
|
+public class CommitWxAct extends BaseActivity implements CommitWxMakeMoneyContract.View{
|
|
|
|
|
|
|
|
@BindView(R.id.tv_wx_commit)
|
|
@BindView(R.id.tv_wx_commit)
|
|
|
TextView tv_wx_commit;
|
|
TextView tv_wx_commit;
|
|
@@ -34,7 +40,17 @@ public class CommitWxAct extends BaseActivity {
|
|
|
public void onViewClicked(View view) {
|
|
public void onViewClicked(View view) {
|
|
|
switch (view.getId()) {
|
|
switch (view.getId()) {
|
|
|
case R.id.tv_wx_commit:
|
|
case R.id.tv_wx_commit:
|
|
|
- G.showToast("该功能正在建设中");
|
|
|
|
|
|
|
+ String account = et_wx_account.getText().toString();
|
|
|
|
|
+ String password = et_wx_pwd.getText().toString();
|
|
|
|
|
+ if(TextUtils.isEmpty(account)){
|
|
|
|
|
+ G.showToast("微信账号不能为空");
|
|
|
|
|
+ } else if(TextUtils.isEmpty(password)){
|
|
|
|
|
+ G.showToast("微信密码不能为空");
|
|
|
|
|
+ } else if(presenter != null) {
|
|
|
|
|
+ presenter.postWebchat(account, password);
|
|
|
|
|
+ } else {
|
|
|
|
|
+ if(BuildConfig.DEBUG) G.showToast("功能不正常");
|
|
|
|
|
+ }
|
|
|
break;
|
|
break;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -55,6 +71,11 @@ public class CommitWxAct extends BaseActivity {
|
|
|
TitleBarUtils.getInstance()
|
|
TitleBarUtils.getInstance()
|
|
|
.setTitle(activity, "挂机赚钱")
|
|
.setTitle(activity, "挂机赚钱")
|
|
|
.setTitleFinish(activity);
|
|
.setTitleFinish(activity);
|
|
|
|
|
+ DaggerCommitWxMakeMoneyComponent.builder()
|
|
|
|
|
+ .netComponent(SheepApp.get(this).getNetComponent())
|
|
|
|
|
+ .commitWxMakeMoneyModule(new CommitWxMakeMoneyModule(this))
|
|
|
|
|
+ .build()
|
|
|
|
|
+ .inject(this);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
@@ -66,4 +87,14 @@ public class CommitWxAct extends BaseActivity {
|
|
|
public void initData() {
|
|
public void initData() {
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public void postWebchatUpdataView(Object o) {
|
|
|
|
|
+ G.showToast("updateData2View");
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public void failPostWebchat2View(Object o) {
|
|
|
|
|
+ G.showToast("updateData2View");
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|