zengjiebin преди 8 години
родител
ревизия
3dcd257f88
променени са 38 файла, в които са добавени 714 реда и са изтрити 186 реда
  1. 15 15
      app/build.gradle
  2. 9 4
      app/src/main/AndroidManifest.xml
  3. 14 0
      app/src/main/java/com/kfzs/duanduan/react/upfile/UpFileListener.java
  4. 53 0
      app/src/main/java/com/kfzs/duanduan/react/upfile/UpFileUtils.java
  5. 2 0
      app/src/main/java/com/sheep/gamegroup/presenter/AccountAndSecuritPresenter.java
  6. 0 25
      app/src/main/java/com/sheep/gamegroup/util/GlideConfiguration.java
  7. 37 0
      app/src/main/java/com/sheep/gamegroup/util/GlideImageLoader.java
  8. 4 4
      app/src/main/java/com/sheep/gamegroup/util/Jump2View.java
  9. 29 38
      app/src/main/java/com/sheep/gamegroup/view/activity/AccountAndSecurityAct.java
  10. 21 23
      app/src/main/java/com/sheep/gamegroup/view/activity/CommitWxCodeAct.java
  11. 3 4
      app/src/main/java/com/sheep/gamegroup/view/activity/LieMakeMoneyAct.java
  12. 34 20
      app/src/main/java/com/sheep/gamegroup/view/activity/PersionInfoAct.java
  13. 9 8
      app/src/main/java/com/sheep/gamegroup/view/adapter/LieMakeMoneyAdp.java
  14. 77 0
      app/src/main/java/com/sheep/gamegroup/view/dialog/DialogChooseImage.java
  15. 48 0
      app/src/main/java/com/sheep/gamegroup/view/dialog/DialogShowLoading.java
  16. 18 0
      app/src/main/java/com/sheep/jiuyan/samllsheep/SheepApp.java
  17. 183 0
      app/src/main/java/com/sheep/jiuyan/samllsheep/base/AbsChooseImageActivity.java
  18. 6 0
      app/src/main/res/color/selector_color_choose_head.xml
  19. 6 0
      app/src/main/res/color/selector_color_main_tab.xml
  20. BIN
      app/src/main/res/drawable-xhdpi/wx_on_hook_abnormal.png
  21. BIN
      app/src/main/res/drawable-xxhdpi/wx_on_hook_abnormal.png
  22. 3 4
      app/src/main/res/drawable/button_full_normal_main.xml
  23. 3 4
      app/src/main/res/drawable/button_full_normal_main_click.xml
  24. 0 9
      app/src/main/res/drawable/shape_class_item_bg.xml
  25. 0 1
      app/src/main/res/layout/activity_guide_on_hook.xml
  26. 20 10
      app/src/main/res/layout/activity_main.xml
  27. 1 1
      app/src/main/res/layout/classification_gridview_item.xml
  28. 1 3
      app/src/main/res/layout/commit_wx_make_money.xml
  29. 60 0
      app/src/main/res/layout/dialog_choose_image.xml
  30. 28 0
      app/src/main/res/layout/dialog_show_loading.xml
  31. 14 5
      app/src/main/res/layout/fgt_main_category.xml
  32. 1 0
      app/src/main/res/layout/lie_make_money_abnormal_item.xml
  33. 1 1
      app/src/main/res/layout/lie_make_money_operation_item.xml
  34. 1 0
      app/src/main/res/layout/lie_make_money_processing_item.xml
  35. 2 2
      app/src/main/res/layout/lie_make_money_prompt_item.xml
  36. 4 4
      app/src/main/res/layout/xpersion_info_act_layout.xml
  37. 3 1
      app/src/main/res/values/color_app_theme_colors.xml
  38. 4 0
      app/src/main/res/values/dd_colors.xml

+ 15 - 15
app/build.gradle

@@ -124,9 +124,9 @@ dependencies {
     compile 'org.greenrobot:eventbus:3.1.1'
     compile 'com.zhy:base-adapter:3.0.3'
     compile 'com.liulishuo.filedownloader:library:1.6.9'
-    compile 'com.tencent.bugly:crashreport_upgrade:latest.release'
+    compile 'com.tencent.bugly:crashreport_upgrade:1.3.4'
     //其中latest.release指代最新版本号,也可以指定明确的版本号,例如1.2.0
-    compile 'com.tencent.bugly:nativecrashreport:latest.release'
+    compile 'com.tencent.bugly:nativecrashreport:3.3.1'
     //其中latest.release指代最
 //    compile 'com.tencent.mm.opensdk:wechat-sdk-android-with-mta:+'
     debugCompile ('com.readystatesoftware.chuck:library:1.1.0'){
@@ -140,40 +140,39 @@ dependencies {
     compile 'com.mylhyl:acp:1.1.7'
     compile 'cn.yipianfengye.android:zxing-library:2.2'
     compile 'com.github.huburt-Hu:NewbieGuide:v1.2.0'
-    debugCompile 'com.android.support:multidex:1.0.1'
-    releaseCompile 'com.android.support:multidex:1.0.3'
+    compile 'com.android.support:multidex:1.0.3'
     compile(name: 'com.kfzs.safe', ext: 'aar')
 
     //butterknife
-    compile 'com.jakewharton:butterknife:+'
-    annotationProcessor 'com.jakewharton:butterknife-compiler:+'
+    compile 'com.jakewharton:butterknife:8.8.1'
+    annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
     //dagger2
 //    compile 'com.google.dagger:dagger:+'
 //    compile 'com.google.dagger:dagger-compiler:+'
-    provided 'org.glassfish:javax.annotation:+'
+    provided 'org.glassfish:javax.annotation:10.0-b28'
     compile 'com.google.dagger:dagger:2.12'
     annotationProcessor 'com.google.dagger:dagger-compiler:2.12'
     //retrofit
-    compile 'com.squareup.retrofit2:retrofit:+'
-    compile 'com.squareup.retrofit2:converter-gson:+'
-    compile 'com.squareup.okhttp3:logging-interceptor:+'
+    compile 'com.squareup.retrofit2:retrofit:2.4.0'
+    compile 'com.squareup.retrofit2:converter-gson:2.4.0'
+    compile 'com.squareup.okhttp3:logging-interceptor:3.10.0'
 //    compile 'com.squareup.retrofit2:adapter-rxjava2:+'
     compile 'com.squareup.retrofit2:adapter-rxjava:2.1.0'
     //rxjava
-    compile 'io.reactivex.rxjava2:rxandroid:+'
-    compile 'io.reactivex.rxjava2:rxjava:+'
+    compile 'io.reactivex.rxjava2:rxandroid:2.0.2'
+    compile 'io.reactivex.rxjava2:rxjava:2.1.12'
     //获取动态权限三方库
-    compile 'pub.devrel:easypermissions:+'
+    compile 'pub.devrel:easypermissions:1.2.0'
 
     compile 'net.danlew:android.joda:2.9.3'
     compile 'com.orhanobut:logger:1.15'
 
     //友盟
-    compile 'com.umeng.sdk:common:latest.integration'
+    compile 'com.umeng.sdk:common:1.4.4'
     //compile 'com.umeng.sdk:analytics:latest.integration'
 
     //fast json
-    compile 'com.alibaba:fastjson:+'
+    compile 'com.alibaba:fastjson:1.2.47'
 
     //添加半袋米相关
     compile(name: 'appstoreutils', ext: 'aar')
@@ -218,4 +217,5 @@ dependencies {
     compile files('libs/jackson-dataformat-xml-2.1.2.jar')
     compile 'io.reactivex:rxandroid:1.2.1'
     compile 'com.github.ithedan:TextViewDrawable:v1.0'
+    compile 'com.lzy.widget:imagepicker:0.6.1'
 }

+ 9 - 4
app/src/main/AndroidManifest.xml

@@ -304,6 +304,7 @@
         <activity
             android:name="com.tencent.tauth.AuthActivity"
             android:launchMode="singleTask"
+            android:screenOrientation="portrait"
             android:noHistory="true" >
 
             <intent-filter>
@@ -320,10 +321,14 @@
             android:screenOrientation="portrait"
             android:theme="@android:style/Theme.Translucent.NoTitleBar"
             android:configChanges="orientation|keyboardHidden|screenSize"/>
-        <activity android:name="com.sheep.gamegroup.view.activity.CommitWxAct" />
-        <activity android:name="com.sheep.gamegroup.view.activity.ActGuideOnHook" />
-        <activity android:name="com.sheep.gamegroup.view.activity.CommitWxCodeAct" />
-        <activity android:name="com.sheep.gamegroup.view.activity.ActGuideDeblocked" />
+        <activity android:name="com.sheep.gamegroup.view.activity.CommitWxAct"
+            android:screenOrientation="portrait" />
+        <activity android:name="com.sheep.gamegroup.view.activity.ActGuideOnHook"
+            android:screenOrientation="portrait" />
+        <activity android:name="com.sheep.gamegroup.view.activity.CommitWxCodeAct"
+            android:screenOrientation="portrait" />
+        <activity android:name="com.sheep.gamegroup.view.activity.ActGuideDeblocked"
+            android:screenOrientation="portrait" />
 
 
         <!--友盟start-->

+ 14 - 0
app/src/main/java/com/kfzs/duanduan/react/upfile/UpFileListener.java

@@ -0,0 +1,14 @@
+package com.kfzs.duanduan.react.upfile;
+
+/**
+ * Created by howie on 2017/5/15.
+ */
+
+public interface UpFileListener {
+
+    void Success(String msg);
+
+    void Progress(String progress);
+
+    void Failure(String err);
+}

+ 53 - 0
app/src/main/java/com/kfzs/duanduan/react/upfile/UpFileUtils.java

@@ -0,0 +1,53 @@
+package com.kfzs.duanduan.react.upfile;
+
+import android.app.Activity;
+
+import com.zhy.http.okhttp.OkHttpUtils;
+import com.zhy.http.okhttp.callback.Callback;
+
+import java.io.File;
+
+import okhttp3.Call;
+import okhttp3.Response;
+import okhttp3.ResponseBody;
+
+/**
+ * Created by howie on 2017/5/11.
+ */
+
+public class UpFileUtils {
+//    private static String URL_RN_UP_IMAGE = "http://shopapi.bandaimi.com/v1/upload_pic/avatar";
+    private static String URL_RN_UP_IMAGE = "http://static.kuaifazs.com/sdkkitfile.php";
+
+    //上传图片
+    public static void upImage(File file, final UpFileListener upFileListener) {
+        OkHttpUtils.post()//
+                .addFile("uploadfile", "1.png", file)//
+                .url(URL_RN_UP_IMAGE)
+                .build()//
+                .execute(new Callback() {
+                    @Override
+                    public void inProgress(float progress, long total, int id) {
+                        super.inProgress(progress, total, id);
+                        upFileListener.Progress(String.valueOf(Math.round(progress * 100)));
+                    }
+
+                    @Override
+                    public Object parseNetworkResponse(Response response, int id) throws Exception {
+                        return response.body().string();
+                    }
+
+                    @Override
+                    public void onError(Call call, Exception e, int id) {
+                        upFileListener.Failure(e.toString());
+                    }
+
+                    @Override
+                    public void onResponse(Object response, int id) {
+                        upFileListener.Success(response.toString());
+                    }
+                });
+
+    }
+
+}

+ 2 - 0
app/src/main/java/com/sheep/gamegroup/presenter/AccountAndSecuritPresenter.java

@@ -11,6 +11,7 @@ import java.util.HashMap;
 import javax.inject.Inject;
 
 import rx.Observer;
+import rx.android.schedulers.AndroidSchedulers;
 import rx.schedulers.Schedulers;
 
 /**
@@ -34,6 +35,7 @@ public class AccountAndSecuritPresenter implements  AccountAndSecuritContract.Pr
 
 
         apiService.getInfo().subscribeOn(Schedulers.io())
+                .observeOn(AndroidSchedulers.mainThread())
                 .subscribe(new Observer<BaseMessage>() {
                     @Override
                     public void onCompleted() {

+ 0 - 25
app/src/main/java/com/sheep/gamegroup/util/GlideConfiguration.java

@@ -1,25 +0,0 @@
-package com.sheep.gamegroup.util;
-
-import android.content.Context;
-
-import com.bumptech.glide.Glide;
-import com.bumptech.glide.GlideBuilder;
-import com.bumptech.glide.load.DecodeFormat;
-import com.bumptech.glide.module.GlideModule;
-
-/**
- * Created by Mr.Yangxiufeng
- * DATE 2016/7/22
- * owspace
- */
-public class GlideConfiguration implements GlideModule{
-    @Override
-    public void applyOptions(Context context, GlideBuilder builder) {
-        builder.setDecodeFormat(DecodeFormat.PREFER_RGB_565);
-    }
-
-    @Override
-    public void registerComponents(Context context, Glide glide) {
-
-    }
-}

+ 37 - 0
app/src/main/java/com/sheep/gamegroup/util/GlideImageLoader.java

@@ -0,0 +1,37 @@
+package com.sheep.gamegroup.util;
+
+import android.app.Activity;
+import android.widget.ImageView;
+
+import com.bumptech.glide.Glide;
+import com.lzy.imagepicker.loader.ImageLoader;
+import com.sheep.jiuyan.samllsheep.R;
+
+/**
+ * Created by realicing on 2018/3/26.
+ * realicing@sina.com
+ */
+
+public class GlideImageLoader implements ImageLoader {
+    @Override
+    public void displayImage(Activity activity, String path, ImageView imageView, int width, int height) {
+        displayImage(activity, imageView, path, R.drawable.commit_wx_loadding);
+    }
+
+    @Override
+    public void displayImagePreview(Activity activity, String path, ImageView imageView, int width, int height) {
+        displayImage(activity, imageView, path, R.drawable.commit_wx_loadding);
+    }
+
+    @Override
+    public void clearMemoryCache() {
+
+    }
+    public static void displayImage(Activity activity, ImageView imageView, String path, int id){
+        Glide.with(activity)
+                .load(path)
+                .centerCrop()
+                .placeholder(id)
+                .into(imageView);
+    }
+}

+ 4 - 4
app/src/main/java/com/sheep/gamegroup/util/Jump2View.java

@@ -198,7 +198,7 @@ public class Jump2View {
         context.startActivity(intent);
     }
     /**
-     * 跳到引导用户添加微信小号H5界面
+     * 跳到引导用户  添加  微信小号H5界面
      * @param context
      * @param o
      */
@@ -206,12 +206,12 @@ public class Jump2View {
         Intent intent = new Intent(context, ActGuideOnHook.class);
 //        extraUrl = getIntent().getStringExtra(KFIntentKeys.EXTRA_WEBVIEW_URL);
 //        extraTitle = getIntent().getStringExtra(KFIntentKeys.EXTRA_WEBVIEW_TITLE);
-        intent.putExtra(KFIntentKeys.EXTRA_WEBVIEW_URL, "https://qiniu.kuaifazs.com/weixin.html");
+        intent.putExtra(KFIntentKeys.EXTRA_WEBVIEW_URL, "https://qiniu.kuaifazs.com/weixinxiaohaoliuc.html");
         intent.putExtra(KFIntentKeys.EXTRA_WEBVIEW_TITLE, "挂机引导");
         context.startActivity(intent);
     }
     /**
-     * 跳到引导用户解封微信小号H5界面
+     * 跳到引导用户   解封   微信小号H5界面
      * @param context
      * @param o
      */
@@ -219,7 +219,7 @@ public class Jump2View {
         Intent intent = new Intent(context, ActGuideDeblocked.class);
 //        extraUrl = getIntent().getStringExtra(KFIntentKeys.EXTRA_WEBVIEW_URL);
 //        extraTitle = getIntent().getStringExtra(KFIntentKeys.EXTRA_WEBVIEW_TITLE);
-        intent.putExtra(KFIntentKeys.EXTRA_WEBVIEW_URL, "https://qiniu.kuaifazs.com/weixin.html");
+        intent.putExtra(KFIntentKeys.EXTRA_WEBVIEW_URL, "https://qiniu.kuaifazs.com/jiefeng.html");
         intent.putExtra(KFIntentKeys.EXTRA_WEBVIEW_TITLE, "解封引导");
         context.startActivity(intent);
     }

+ 29 - 38
app/src/main/java/com/sheep/gamegroup/view/activity/AccountAndSecurityAct.java

@@ -15,6 +15,7 @@ import com.sheep.gamegroup.di.modules.AccountAndSercuritModule;
 import com.sheep.gamegroup.model.entity.UserInfoEntity;
 import com.sheep.gamegroup.presenter.AccountAndSecuritContract;
 import com.sheep.gamegroup.presenter.AccountAndSecuritPresenter;
+import com.sheep.gamegroup.util.GlideImageLoader;
 import com.sheep.jiuyan.samllsheep.R;
 import com.sheep.jiuyan.samllsheep.SheepApp;
 import com.sheep.jiuyan.samllsheep.utils.TitleBarUtils;
@@ -53,8 +54,8 @@ public class AccountAndSecurityAct extends BaseActivity implements AccountAndSec
     RelativeLayout rlTop;
 
     @Inject
-    AccountAndSecuritPresenter   presenter;
-    UserInfoEntity   mEntity;
+    AccountAndSecuritPresenter presenter;
+    UserInfoEntity mEntity;
 
 
     @Override
@@ -84,11 +85,13 @@ public class AccountAndSecurityAct extends BaseActivity implements AccountAndSec
     @Override
     public void initData() {
 
-        presenter.getTask(null);
-
     }
 
-
+    @Override
+    protected void onResume() {
+        super.onResume();
+        presenter.getTask(null);
+    }
 
     @OnClick({R.id.rl_phone, R.id.rl_wx, R.id.rl_auther, R.id.rl_top})
     public void onClick(View view) {
@@ -100,9 +103,9 @@ public class AccountAndSecurityAct extends BaseActivity implements AccountAndSec
             case R.id.rl_auther: ////跳转授权
                 break;
 
-            case  R.id.rl_top:
-                Intent i=new  Intent(AccountAndSecurityAct.this,PersionInfoAct.class);
-                i.putExtra("info",mEntity);
+            case R.id.rl_top:
+                Intent i = new Intent(AccountAndSecurityAct.this, PersionInfoAct.class);
+                i.putExtra("info", mEntity);
                 startActivity(i);
                 break;
         }
@@ -117,40 +120,28 @@ public class AccountAndSecurityAct extends BaseActivity implements AccountAndSec
     public void NetError(int code, String errorMsg) {
 
 
-
-
     }
 
 
     @Override
     public void showTask(final UserInfoEntity entity) {
-
-        this.runOnUiThread(new Runnable() {
-            @Override
-            public void run() {
-                mEntity=entity;
-                tvName.setText(entity.getNickname());
-                tvLinkContent.setText("绵羊号:"+entity.getInvitation_code());
-                tvPhone.setText(entity.getMobile());
-                tvWx.setText(entity.getWx_openid());
-                boolean  isBanck=TextUtils.isEmpty(entity.getBank_card());
-                boolean  isId_number=TextUtils.isEmpty(entity.getId_number());
-                boolean  isRoalName=TextUtils.isEmpty(entity.getReal_name());
-
-                if(isBanck&&isId_number&&isRoalName){
-
-                    tvAuther.setText("未认证");
-                }else if(!isBanck&&!isId_number&&!isRoalName){
-                    tvAuther.setText("已认证");
-                }else{
-                    tvAuther.setText("认证中");
-                }
-            }
-        });
-
-
-
-
-
+        mEntity = entity;
+        tvName.setText(entity.getNickname());
+        tvLinkContent.setText("绵羊号:" + entity.getInvitation_code());
+        tvPhone.setText(entity.getMobile());
+        tvWx.setText(entity.getWx_openid());
+        GlideImageLoader.displayImage(this, ivHead, entity.getAvatar(), R.drawable.logoin_head);
+        boolean isBanck = TextUtils.isEmpty(entity.getBank_card());
+        boolean isId_number = TextUtils.isEmpty(entity.getId_number());
+        boolean isRoalName = TextUtils.isEmpty(entity.getReal_name());
+
+        if (isBanck && isId_number && isRoalName) {
+
+            tvAuther.setText("未认证");
+        } else if (!isBanck && !isId_number && !isRoalName) {
+            tvAuther.setText("已认证");
+        } else {
+            tvAuther.setText("认证中");
+        }
     }
 }

+ 21 - 23
app/src/main/java/com/sheep/gamegroup/view/activity/CommitWxCodeAct.java

@@ -9,15 +9,10 @@ import android.widget.TextView;
 
 import com.alibaba.fastjson.JSONObject;
 import com.sheep.gamegroup.di.components.DaggerCommitWxCodeMakeMoneyComponent;
-import com.sheep.gamegroup.di.components.DaggerCommitWxMakeMoneyComponent;
 import com.sheep.gamegroup.di.modules.CommitWxCodeMakeMoneyModule;
-import com.sheep.gamegroup.di.modules.CommitWxMakeMoneyModule;
 import com.sheep.gamegroup.model.entity.BaseMessage;
-import com.sheep.gamegroup.model.entity.WXOnHookAccount;
 import com.sheep.gamegroup.presenter.CommitWxCodeMakeMoneyContract;
 import com.sheep.gamegroup.presenter.CommitWxCodeMakeMoneyPresenter;
-import com.sheep.gamegroup.presenter.CommitWxMakeMoneyContract;
-import com.sheep.gamegroup.presenter.CommitWxMakeMoneyPresenter;
 import com.sheep.gamegroup.util.Jump2View;
 import com.sheep.jiuyan.samllsheep.BuildConfig;
 import com.sheep.jiuyan.samllsheep.R;
@@ -32,9 +27,8 @@ import butterknife.BindView;
 import butterknife.ButterKnife;
 import butterknife.OnClick;
 
-import static com.sheep.gamegroup.view.activity.LieMakeMoneyAct.STATE_ON_HOOK_ABNORMAL_NEXT;
 import static com.sheep.gamegroup.view.activity.LieMakeMoneyAct.STATE_ON_HOOK_DEBLOCKED;
-import static com.sheep.gamegroup.view.activity.LieMakeMoneyAct.STATE_ON_HOOK_UNVERIFIED;
+import static com.sheep.gamegroup.view.activity.LieMakeMoneyAct.STATE_ON_HOOK_TOMORROW_RESET;
 import static com.sheep.gamegroup.view.activity.LieMakeMoneyAct.STATE_ON_HOOK_VERIFIED;
 
 /**
@@ -44,6 +38,10 @@ import static com.sheep.gamegroup.view.activity.LieMakeMoneyAct.STATE_ON_HOOK_VE
  */
 
 public class CommitWxCodeAct extends BaseActivity implements CommitWxCodeMakeMoneyContract.View{
+
+    public static final int ALTER_INFO = 0;
+    public static final int HAS_DEBLOCKED = 1;
+    public static final int ALTER_CODE = 2;
     @BindView(R.id.tv_wx_commit)
     TextView tv_wx_commit;
     @BindView(R.id.et_wx_account)
@@ -65,10 +63,10 @@ public class CommitWxCodeAct extends BaseActivity implements CommitWxCodeMakeMon
                     G.showToast("微信账号不能为空");
                 } else if(et_wx_pwd.getVisibility() == View.VISIBLE && TextUtils.isEmpty(password)){
                     switch (type){
-                        case STATE_ON_HOOK_VERIFIED:
+                        case ALTER_CODE:
                             G.showToast("微信验证码不能为空");
                             break;
-                        case STATE_ON_HOOK_ABNORMAL_NEXT:
+                        case ALTER_INFO:
                             G.showToast("微信密码不能为空");
                             break;
                     }
@@ -76,21 +74,21 @@ public class CommitWxCodeAct extends BaseActivity implements CommitWxCodeMakeMon
                     showProgress();
                     JSONObject jsonObject = new JSONObject();
                     switch (type){
-                        case STATE_ON_HOOK_VERIFIED:
+                        case ALTER_CODE:
+                            jsonObject.put("status", STATE_ON_HOOK_VERIFIED);
                             //用户已经验证,等待脚本验证
-                            jsonObject.put("status", type);
                             jsonObject.put("verification_code", password);
                             break;
-                        case STATE_ON_HOOK_DEBLOCKED:
-                            //用户确认已经解封,设置为等待服务器验证
-                            jsonObject.put("status", type);
-                            break;
-                        case STATE_ON_HOOK_ABNORMAL_NEXT:
-                            jsonObject.put("status", type);
-                            //因为账号异常(账号密码错误),所以修改账号,修改后将进入初始状态,即未验证
+                        case ALTER_INFO:
+                            jsonObject.put("status", STATE_ON_HOOK_VERIFIED);
+                            //因为账号异常(账号密码错误),所以修改账号,修改后将等待明天验证
                             jsonObject.put("account", account);
                             jsonObject.put("password", password);
                             break;
+                        case HAS_DEBLOCKED:
+                            jsonObject.put("status", STATE_ON_HOOK_DEBLOCKED);
+                            //用户确认已经解封,设置为等待服务器验证
+                            break;
                     }
                     presenter.putWebchat(id, jsonObject);
                 } else {
@@ -119,20 +117,20 @@ public class CommitWxCodeAct extends BaseActivity implements CommitWxCodeMakeMon
         et_wx_account.setText(account);
         String title = "提示";
         switch (type){
-            case STATE_ON_HOOK_VERIFIED:
+            case ALTER_CODE:
                 et_wx_account.setEnabled(false);
                 et_wx_pwd.setHint("请输入微信验证码");
                 et_wx_pwd.setInputType(InputType.TYPE_CLASS_NUMBER);
                 title = "提交验证码";
                 break;
-            case STATE_ON_HOOK_DEBLOCKED:
+            case ALTER_INFO:
+                title = "修改挂机微信信息";
+                break;
+            case HAS_DEBLOCKED:
                 et_wx_account.setEnabled(false);
                 et_wx_pwd.setVisibility(View.GONE);
                 tv_wx_hint.setVisibility(View.VISIBLE);
                 break;
-            case STATE_ON_HOOK_ABNORMAL_NEXT:
-                title = "修改挂机微信信息";
-                break;
         }
         TitleBarUtils.getInstance()
                 .setTitle(activity, title)

+ 3 - 4
app/src/main/java/com/sheep/gamegroup/view/activity/LieMakeMoneyAct.java

@@ -14,7 +14,6 @@ import com.sheep.gamegroup.model.entity.WXOnHookAccount;
 import com.sheep.gamegroup.presenter.LieMakeMoneyContract;
 import com.sheep.gamegroup.presenter.LieMakeMoneyPresenter;
 import com.sheep.gamegroup.view.adapter.LieMakeMoneyAdp;
-import com.sheep.gamegroup.view.dialog.DialogAccountAbnormal;
 import com.sheep.jiuyan.samllsheep.BuildConfig;
 import com.sheep.jiuyan.samllsheep.R;
 import com.sheep.jiuyan.samllsheep.SheepApp;
@@ -78,7 +77,7 @@ public class LieMakeMoneyAct extends BaseActivity implements LieMakeMoneyContrac
                 refresh.setRefreshing(false);
             }
         });
-        recyclerview.setOnScrollListener(new RecyclerView.OnScrollListener() {
+        recyclerview.addOnScrollListener(new RecyclerView.OnScrollListener() {
             @Override
             public void onScrollStateChanged(RecyclerView recyclerView, int newState) {
                 super.onScrollStateChanged(recyclerView, newState);
@@ -121,7 +120,7 @@ public class LieMakeMoneyAct extends BaseActivity implements LieMakeMoneyContrac
     public static final int STATE_ON_HOOK_ABNORMAL = 5;//账号异常
     public static final int STATE_ON_HOOK_VC_OVERTIME = 6;//验证码超时请重新上传
     public static final int STATE_ON_HOOK_VERIFIED = 7;//用户已经验证等待脚本验证
-    public static final int STATE_ON_HOOK_ABNORMAL_NEXT = 8;//用户已经验证等待脚本验证
+    public static final int STATE_ON_HOOK_TOMORROW_RESET = 8;//三次验证码失败请明日再提交
 
     //{ "data": [ { "id": 14, "Uid": 12, "account": "trhhccg", "password": "", "verification_code": "", "status": 0, "remarks": "", "normal_time": 0, "create_time": 1521854985, "update_time": 0, "phone_number": "17628083502", "is_send": 0, "device_info": null } ] }
     @Override
@@ -144,7 +143,7 @@ public class LieMakeMoneyAct extends BaseActivity implements LieMakeMoneyContrac
                 case STATE_ON_HOOK_ABNORMAL:
                 case STATE_ON_HOOK_VC_OVERTIME:
                 case STATE_ON_HOOK_VERIFIED:
-                case STATE_ON_HOOK_ABNORMAL_NEXT:
+                case STATE_ON_HOOK_TOMORROW_RESET:
                 default:
                     lieMakeMoneyAdp.add(RecyleObj.make(RecyleType.ABNORMAL_ON_HOOK, wxOnHookAccount));
                     break;

+ 34 - 20
app/src/main/java/com/sheep/gamegroup/view/activity/PersionInfoAct.java

@@ -8,13 +8,24 @@ import android.widget.ImageView;
 import android.widget.RelativeLayout;
 import android.widget.TextView;
 
+import com.bumptech.glide.Glide;
+import com.kfzs.duanduan.ActPicturesEnlarge;
+import com.kfzs.duanduan.bean.KFIntentKeys;
+import com.lzy.imagepicker.bean.ImageItem;
 import com.sheep.gamegroup.absBase.BaseActivity;
 import com.sheep.gamegroup.model.entity.UserInfoEntity;
 
+import com.sheep.gamegroup.util.GlideImageLoader;
 import com.sheep.jiuyan.samllsheep.R;
+import com.sheep.jiuyan.samllsheep.SheepApp;
+import com.sheep.jiuyan.samllsheep.base.AbsChooseImageActivity;
 import com.sheep.jiuyan.samllsheep.utils.G;
 import com.uuzuche.lib_zxing.activity.CodeUtils;
 
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.HashMap;
+
 import butterknife.BindView;
 import butterknife.OnClick;
 
@@ -23,7 +34,7 @@ import butterknife.OnClick;
  * Created by Administrator on 2018/3/16.
  */
 
-public class PersionInfoAct extends BaseActivity {
+public class PersionInfoAct extends AbsChooseImageActivity {
 
     UserInfoEntity mEntity;
     @BindView(R.id.tv_name)
@@ -36,6 +47,8 @@ public class PersionInfoAct extends BaseActivity {
     ImageView tvQr;
     @BindView(R.id.rl_qr)
     RelativeLayout rlQr;
+    @BindView(R.id.rl_head)
+    RelativeLayout rl_head;
     @BindView(R.id.iv_head_right)
     ImageView ivHeadRight;
 
@@ -64,6 +77,7 @@ public class PersionInfoAct extends BaseActivity {
                 tvSheepId.setText(mEntity.getInvitation_code());
                 Bitmap mBitmap = CodeUtils.createImage(mEntity.getShare_link(), 30, 30, null);
                 tvQr.setImageBitmap(mBitmap);
+                GlideImageLoader.displayImage(this, ivHeadRight, mEntity.getAvatar(), R.drawable.logoin_head);
             }
         }
 
@@ -92,29 +106,17 @@ public class PersionInfoAct extends BaseActivity {
 
 
     private void showHead() {
-
-        AlertDialog.Builder builder = new AlertDialog.Builder(this);
-        View view = View.inflate(this, R.layout.x_ask_qr_dialog, null);
-        builder.setView(view);
-        final AlertDialog dialog = builder.create();
-        ImageView iv = view.findViewById(R.id.iv_close);
-        ImageView iv_qr = view.findViewById(R.id.iv_qr);
-        Bitmap mBitmap = CodeUtils.createImage(mEntity.getShare_link(), G.WIDTH - 40, G.HEIGHT / 2, null);
-        iv_qr.setImageBitmap(mBitmap);
-        dialog.show();
-        iv.setOnClickListener(new View.OnClickListener() {
-            @Override
-            public void onClick(View v) {
-                dialog.dismiss();
-            }
-        });
-
-
+        final HashMap<Integer, String> mUrlsCollection = new HashMap<>();
+        mUrlsCollection.put(0,mEntity.getAvatar());
+        Intent picEnlargeIntent = new Intent(this, ActPicturesEnlarge.class);
+        picEnlargeIntent.putExtra(KFIntentKeys.EXTRA_CURRENT_PICTURE_INDEX, 0);
+        picEnlargeIntent.putExtra(KFIntentKeys.EXTRA_CURRENT_PICTURE_COLLECTIONS, mUrlsCollection);
+        startActivity(picEnlargeIntent);
     }
 
 
 
-    @OnClick({R.id.iv_head_right, R.id.tv_nike, R.id.rl_qr})
+    @OnClick({R.id.iv_head_right, R.id.tv_nike, R.id.rl_qr, R.id.rl_head})
     public void onClick(View view) {
         switch (view.getId()) {
             case R.id.iv_head_right:
@@ -127,7 +129,19 @@ public class PersionInfoAct extends BaseActivity {
                 break;
             case R.id.rl_qr:
                 showQR();
+            case R.id.rl_head:
+                showChooseDialog();
                 break;
         }
     }
+
+    @Override
+    protected void onNotGetImage(String msg) {
+        G.showToast(msg);
+    }
+
+    @Override
+    protected void onGetImage(ImageItem image) {
+        GlideImageLoader.displayImage(this, ivHeadRight, image.path, R.drawable.logoin_head);
+    }
 }

+ 9 - 8
app/src/main/java/com/sheep/gamegroup/view/adapter/LieMakeMoneyAdp.java

@@ -12,7 +12,6 @@ import com.sheep.gamegroup.model.entity.RecyleType;
 import com.sheep.gamegroup.model.entity.WXOnHookAccount;
 import com.sheep.gamegroup.util.Jump2View;
 import com.sheep.gamegroup.util.ViewHolder;
-import com.sheep.gamegroup.view.activity.CommitWxCodeAct;
 import com.sheep.gamegroup.view.activity.LieMakeMoneyAct;
 import com.sheep.gamegroup.view.dialog.DialogAccountAbnormal;
 import com.sheep.jiuyan.samllsheep.BuildConfig;
@@ -22,12 +21,14 @@ import com.sheep.jiuyan.samllsheep.utils.G;
 import java.util.List;
 import java.util.Locale;
 
+import static com.sheep.gamegroup.view.activity.CommitWxCodeAct.ALTER_CODE;
+import static com.sheep.gamegroup.view.activity.CommitWxCodeAct.ALTER_INFO;
+import static com.sheep.gamegroup.view.activity.CommitWxCodeAct.HAS_DEBLOCKED;
 import static com.sheep.gamegroup.view.activity.LieMakeMoneyAct.STATE_ON_HOOK_ABNORMAL;
-import static com.sheep.gamegroup.view.activity.LieMakeMoneyAct.STATE_ON_HOOK_ABNORMAL_NEXT;
 import static com.sheep.gamegroup.view.activity.LieMakeMoneyAct.STATE_ON_HOOK_BLOCKED;
 import static com.sheep.gamegroup.view.activity.LieMakeMoneyAct.STATE_ON_HOOK_DEBLOCKED;
 import static com.sheep.gamegroup.view.activity.LieMakeMoneyAct.STATE_ON_HOOK_NEED_VC;
-import static com.sheep.gamegroup.view.activity.LieMakeMoneyAct.STATE_ON_HOOK_UNVERIFIED;
+import static com.sheep.gamegroup.view.activity.LieMakeMoneyAct.STATE_ON_HOOK_TOMORROW_RESET;
 import static com.sheep.gamegroup.view.activity.LieMakeMoneyAct.STATE_ON_HOOK_VC_OVERTIME;
 import static com.sheep.gamegroup.view.activity.LieMakeMoneyAct.STATE_ON_HOOK_VERIFIED;
 
@@ -132,7 +133,7 @@ public class LieMakeMoneyAdp extends AdbCommonRecycler<RecyleObj> {
                 wx_is_open_tv.setText("已解封,继续赚钱");
                 wx_how_to_open_tv.setVisibility(View.VISIBLE);
                 break;
-            case STATE_ON_HOOK_ABNORMAL_NEXT://用户已经修改账号密码等待服务器验证
+            case STATE_ON_HOOK_TOMORROW_RESET://三次验证码失败请明日再提交
             case STATE_ON_HOOK_DEBLOCKED://用户已经解封等待服务器验证
                 state_name_tv.setText("账号处理中");
 //                earnings_name_tv.setText("等待验证");
@@ -172,12 +173,12 @@ public class LieMakeMoneyAdp extends AdbCommonRecycler<RecyleObj> {
                     case STATE_ON_HOOK_NEED_VC://需要用户验证码
                     case STATE_ON_HOOK_VC_OVERTIME://验证码超时请重新上传
                         //修改验证码
-                        Jump2View.getInstance().goCommitWxCodeOnHookView(context, dataObjT, STATE_ON_HOOK_VERIFIED);
+                        Jump2View.getInstance().goCommitWxCodeOnHookView(context, dataObjT, ALTER_CODE);
                         break;
                     case STATE_ON_HOOK_BLOCKED://被封
-                        Jump2View.getInstance().goCommitWxCodeOnHookView(context, dataObjT, STATE_ON_HOOK_DEBLOCKED);
+                        Jump2View.getInstance().goCommitWxCodeOnHookView(context, dataObjT, HAS_DEBLOCKED);
                         break;
-                    case STATE_ON_HOOK_ABNORMAL_NEXT://用户已经修改账号密码等待服务器验证
+                    case STATE_ON_HOOK_TOMORROW_RESET://用户已经修改账号密码等待服务器验证
                     case STATE_ON_HOOK_DEBLOCKED://用户已经解封等待服务器验证
                     case STATE_ON_HOOK_VERIFIED://用户已经验证等待脚本验证
                         if(context instanceof LieMakeMoneyAct) {
@@ -190,7 +191,7 @@ public class LieMakeMoneyAdp extends AdbCommonRecycler<RecyleObj> {
                     case STATE_ON_HOOK_ABNORMAL://账号异常
                     default:
                         //修改用户信息
-                        Jump2View.getInstance().goCommitWxCodeOnHookView(context, dataObjT, STATE_ON_HOOK_ABNORMAL_NEXT);
+                        Jump2View.getInstance().goCommitWxCodeOnHookView(context, dataObjT, ALTER_INFO);
                         break;
                 }
             }

+ 77 - 0
app/src/main/java/com/sheep/gamegroup/view/dialog/DialogChooseImage.java

@@ -0,0 +1,77 @@
+package com.sheep.gamegroup.view.dialog;
+
+import android.content.Intent;
+import android.support.v7.app.AlertDialog;
+import android.view.Gravity;
+import android.view.View;
+import android.view.ViewGroup;
+import android.view.Window;
+import android.view.WindowManager;
+import android.widget.LinearLayout;
+
+import com.kfzs.duanduan.utils.dlg.HelperUtils;
+import com.kfzs.duanduan.utils.dlg.ViewFindUtils;
+import com.lzy.imagepicker.ui.ImageGridActivity;
+import com.sheep.jiuyan.samllsheep.R;
+import com.sheep.jiuyan.samllsheep.base.AbsChooseImageActivity;
+
+import static com.sheep.jiuyan.samllsheep.base.AbsChooseImageActivity.REQUEST_CODE_CAMERA;
+import static com.sheep.jiuyan.samllsheep.base.AbsChooseImageActivity.REQUEST_CODE_SELECT;
+
+public class DialogChooseImage {
+
+    private static AlertDialog mAlertDialog;
+
+    public static AlertDialog showDialog(final AbsChooseImageActivity activity) {
+        if (mAlertDialog == null) {
+            View view = View.inflate(activity, R.layout.dialog_choose_image, null);
+            ViewFindUtils.find(view, R.id.dialog_camera)
+                    .setOnClickListener(new View.OnClickListener() {
+                        @Override
+                        public void onClick(View v) {
+                            mAlertDialog.dismiss();
+                            Intent intent = new Intent(activity, ImageGridActivity.class);
+                            intent.putExtra(ImageGridActivity.EXTRAS_TAKE_PICKERS,true); // 是否是直接打开相机
+                            activity.startActivityForResult(intent, REQUEST_CODE_CAMERA);
+                        }
+                    });
+            ViewFindUtils.find(view, R.id.dialog_close)
+                    .setOnClickListener(new View.OnClickListener() {
+                        @Override
+                        public void onClick(View v) {
+                            mAlertDialog.dismiss();
+
+                        }
+                    });
+            ViewFindUtils.find(view, R.id.dialog_choose)
+                    .setOnClickListener(new View.OnClickListener() {
+                        @Override
+                        public void onClick(View v) {
+                            mAlertDialog.dismiss();
+                            Intent intent = new Intent(activity, ImageGridActivity.class);
+                            activity.startActivityForResult(intent, REQUEST_CODE_SELECT);
+                        }
+                    });
+            mAlertDialog = new AlertDialog.Builder(activity, R.style.MyDialogActivityTheme)
+                    .setView(view)
+                    .create();
+        }
+        if (!HelperUtils.isActivityOnTop(activity)) {
+            return mAlertDialog;//如果不是顶层窗口,那就不显示了。
+        }
+        Window window = mAlertDialog.getWindow();
+        if(window != null) {
+            WindowManager.LayoutParams params = window.getAttributes();
+            if(params != null){
+                params.gravity = Gravity.BOTTOM;
+                window.setAttributes(params);
+            }
+        }
+        try {
+            mAlertDialog.show();
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return mAlertDialog;
+    }
+}

+ 48 - 0
app/src/main/java/com/sheep/gamegroup/view/dialog/DialogShowLoading.java

@@ -0,0 +1,48 @@
+package com.sheep.gamegroup.view.dialog;
+
+import android.app.Activity;
+import android.support.v7.app.AlertDialog;
+import android.view.View;
+import android.widget.TextView;
+
+import com.kfzs.duanduan.utils.dlg.HelperUtils;
+import com.kfzs.duanduan.utils.dlg.ViewFindUtils;
+import com.sheep.jiuyan.samllsheep.R;
+
+public class DialogShowLoading {
+    private TextView textView;
+    private AlertDialog alertDialog;
+
+    public static DialogShowLoading showDialog(final Activity activity) {
+        DialogShowLoading dialogShowLoading= new DialogShowLoading();
+        View view = View.inflate(activity, R.layout.dialog_show_loading, null);
+        TextView dialog_loading = ViewFindUtils.find(view, R.id.dialog_loading);
+        AlertDialog mAlertDialog = new AlertDialog.Builder(activity, R.style.MyDialogActivityTheme)
+                .setView(view)
+                .create();
+        dialogShowLoading.setAlertDialog(mAlertDialog);
+        try {
+            mAlertDialog.show();
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        dialogShowLoading.setTextView(dialog_loading);
+        return dialogShowLoading;
+    }
+
+    public TextView getTextView() {
+        return textView;
+    }
+
+    public void setTextView(TextView textView) {
+        this.textView = textView;
+    }
+
+    public AlertDialog getAlertDialog() {
+        return alertDialog;
+    }
+
+    public void setAlertDialog(AlertDialog alertDialog) {
+        this.alertDialog = alertDialog;
+    }
+}

+ 18 - 0
app/src/main/java/com/sheep/jiuyan/samllsheep/SheepApp.java

@@ -7,9 +7,12 @@ import android.support.multidex.MultiDex;
 import android.util.DisplayMetrics;
 
 import com.liulishuo.filedownloader.FileDownloader;
+import com.lzy.imagepicker.ImagePicker;
+import com.lzy.imagepicker.view.CropImageView;
 import com.sheep.gamegroup.di.components.DaggerNetComponent;
 import com.sheep.gamegroup.di.components.NetComponent;
 import com.sheep.gamegroup.di.modules.NetModule;
+import com.sheep.gamegroup.util.GlideImageLoader;
 import com.sheep.jiuyan.samllsheep.utils.G;
 import com.tencent.bugly.Bugly;
 import com.tencent.mm.opensdk.openapi.IWXAPI;
@@ -52,6 +55,21 @@ public class SheepApp extends BaseApplication {
         UMConfigure.init(this, UMConfigure.DEVICE_TYPE_PHONE, "xxxxx");
 
         initNet();
+        initImagePicker();
+    }
+
+    private void initImagePicker() {
+        ImagePicker imagePicker = ImagePicker.getInstance();
+        imagePicker.setImageLoader(new GlideImageLoader());   //设置图片加载器
+        imagePicker.setShowCamera(true);  //显示拍照按钮
+        imagePicker.setCrop(true);        //允许裁剪(单选才有效)
+        imagePicker.setSaveRectangle(true); //是否按矩形区域保存
+        imagePicker.setSelectLimit(1);    //选中数量限制
+        imagePicker.setStyle(CropImageView.Style.RECTANGLE);  //裁剪框的形状
+        imagePicker.setFocusWidth(800);   //裁剪框的宽度。单位像素(圆形自动取宽高最小值)
+        imagePicker.setFocusHeight(800);  //裁剪框的高度。单位像素(圆形自动取宽高最小值)
+        imagePicker.setOutPutX(1000);//保存文件的宽度。单位像素
+        imagePicker.setOutPutY(1000);//保存文件的高度。单位像素
     }
 
     private void initNet() {

+ 183 - 0
app/src/main/java/com/sheep/jiuyan/samllsheep/base/AbsChooseImageActivity.java

@@ -0,0 +1,183 @@
+package com.sheep.jiuyan.samllsheep.base;
+
+import android.content.Intent;
+import android.text.TextUtils;
+import android.widget.TextView;
+
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
+import com.kfzs.appstore.utils.string.HexUtils;
+import com.kfzs.duanduan.react.upfile.UpFileListener;
+import com.kfzs.duanduan.react.upfile.UpFileUtils;
+import com.lzy.imagepicker.ImagePicker;
+import com.lzy.imagepicker.bean.ImageItem;
+import com.sheep.gamegroup.model.entity.BaseMessage;
+import com.sheep.gamegroup.view.dialog.DialogChooseImage;
+import com.sheep.gamegroup.view.dialog.DialogShowLoading;
+import com.sheep.jiuyan.samllsheep.SheepApp;
+import com.sheep.jiuyan.samllsheep.utils.G;
+
+import java.io.File;
+import java.util.ArrayList;
+
+import go.kfzssafe.Kfzssafe;
+import rx.android.schedulers.AndroidSchedulers;
+import rx.functions.Action1;
+import rx.schedulers.Schedulers;
+
+/**
+ * Created by realicing on 2018/3/26.
+ * realicing@sina.com
+ */
+
+public abstract class AbsChooseImageActivity extends BaseActivity implements UpFileListener{
+    public static final int REQUEST_CODE_SELECT = 113;
+    public static final int REQUEST_CODE_CAMERA = 114;
+    private boolean isUpload = true;
+    private DialogShowLoading dialogShowLoading;
+    private ImageItem imageItem;
+    public void showChooseDialog(){
+        DialogChooseImage.showDialog(this);
+    }
+    public void showChooseDialog(boolean isUpload){
+        this.isUpload = isUpload;
+        DialogChooseImage.showDialog(this);
+    }
+    @Override
+    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
+        super.onActivityResult(requestCode, resultCode, data);
+        if (resultCode == ImagePicker.RESULT_CODE_ITEMS) {
+            if (data != null && (requestCode == REQUEST_CODE_SELECT||requestCode == REQUEST_CODE_CAMERA)) {
+                ArrayList<ImageItem> images = (ArrayList<ImageItem>) data.getSerializableExtra(ImagePicker.EXTRA_RESULT_ITEMS);
+                if(images != null && !images.isEmpty() && (imageItem = images.get(0)) != null && !TextUtils.isEmpty(imageItem.path)) {
+                    if(isUpload){
+                        AbsChooseImageActivity.this.dialogShowLoading = DialogShowLoading.showDialog(AbsChooseImageActivity.this);
+                        UpFileUtils.upImage(new File(images.get(0).path), AbsChooseImageActivity.this);
+                    } else {
+                        onGetImage(imageItem);
+                    }
+                    return;
+                }
+            }
+            onNotGetImage("没有数据");
+        }
+    }
+
+    @Override
+    public void Success(String msg) {
+        //{data: ""}
+
+        String json = null;
+        if(TextUtils.isEmpty(msg)){
+            updateError("失败");
+           return;
+        }
+        if(msg.startsWith("{")){
+            json = msg;
+        } else {
+            try {
+                byte[] bytes = HexUtils.hexStr2Bytes(msg);
+                byte[] byteDecode = Kfzssafe.XByteDecode(bytes);
+                json = new String(byteDecode);
+            } catch (Exception e) {
+                e.printStackTrace();
+                updateError("失败");
+                return;
+            }
+        }
+        UploadResult uploadResult = JSON.parseObject(json, UploadResult.class);
+        if(uploadResult != null){
+            String data = uploadResult.getData().getUrl();
+            dialogShowLoading.getTextView().setText("更新中");
+            JSONObject jsonObject = new JSONObject();
+            jsonObject.put("avatar", data);
+            SheepApp.get(this).getNetComponent().getApiService().changeBaseInfo(jsonObject)
+                    .subscribeOn(Schedulers.io())
+                    .observeOn(AndroidSchedulers.mainThread())
+            .subscribe(new Action1<BaseMessage>() {
+                @Override
+                public void call(BaseMessage baseMessage) {
+                    dialogShowLoading.getTextView().setText("完成");
+                    onGetImage(imageItem);
+                    dialogShowLoading.getAlertDialog().dismiss();
+                }
+            }, new Action1<Throwable>() {
+                @Override
+                public void call(Throwable throwable) {
+                    updateError("失败");
+                }
+            });
+        }
+    }
+
+    private void updateError(String msg) {
+        dialogShowLoading.getTextView().setText(msg);
+        onNotGetImage(msg);
+        dialogShowLoading.getAlertDialog().dismiss();
+    }
+
+    @Override
+    public void Progress(String progress) {
+        dialogShowLoading.getTextView().setText(progress);
+        dialogShowLoading.getTextView().append("%");
+    }
+
+    @Override
+    public void Failure(String err) {
+        onNotGetImage(err);
+    }
+    protected abstract void onNotGetImage(String msg);
+
+    protected abstract void onGetImage(ImageItem image);
+
+}
+class Data{
+    private String url;
+
+    public String getUrl() {
+        return url;
+    }
+
+    public void setUrl(String url) {
+        this.url = url;
+    }
+}
+
+class UploadResult{
+    private int status;
+    private String error;
+    private String error_message;
+    private Data data;
+
+    public int getStatus() {
+        return status;
+    }
+
+    public void setStatus(int status) {
+        this.status = status;
+    }
+
+    public String getError() {
+        return error;
+    }
+
+    public void setError(String error) {
+        this.error = error;
+    }
+
+    public String getError_message() {
+        return error_message;
+    }
+
+    public void setError_message(String error_message) {
+        this.error_message = error_message;
+    }
+
+    public Data getData() {
+        return data;
+    }
+
+    public void setData(Data data) {
+        this.data = data;
+    }
+}

+ 6 - 0
app/src/main/res/color/selector_color_choose_head.xml

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+
+    <item android:state_pressed="true" android:color="@color/color_choose_head_tv_press"/>
+    <item android:color="@color/color_choose_head_tv"/>
+</selector>

+ 6 - 0
app/src/main/res/color/selector_color_main_tab.xml

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+
+    <item android:state_activated="true" android:color="@color/main_tab_activated"/>
+    <item android:color="@color/main_tab"/>
+</selector>

BIN
app/src/main/res/drawable-xhdpi/wx_on_hook_abnormal.png


BIN
app/src/main/res/drawable-xxhdpi/wx_on_hook_abnormal.png


+ 3 - 4
app/src/main/res/drawable/button_full_normal_main.xml

@@ -3,8 +3,7 @@
     android:shape="rectangle">
     <corners android:radius="30dp" />
 
-    <stroke
-        android:width="1dp"
-        android:color="@color/theme_app_highlight" />
-    <solid android:color="@color/theme_app_highlight" />
+    <gradient
+        android:startColor="@color/theme_app_highlight"
+        android:endColor="@color/theme_app_highlight_more"/>
 </shape>

+ 3 - 4
app/src/main/res/drawable/button_full_normal_main_click.xml

@@ -3,8 +3,7 @@
     android:shape="rectangle">
     <corners android:radius="30dp" />
 
-    <stroke
-        android:width="1dp"
-        android:color="@color/theme_app_highlight_more" />
-    <solid android:color="@color/theme_app_highlight_more" />
+    <gradient
+        android:startColor="@color/theme_app_highlight_transparent"
+        android:endColor="@color/theme_app_highlight_more_transparent"/>
 </shape>

+ 0 - 9
app/src/main/res/drawable/shape_class_item_bg.xml

@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<shape xmlns:android="http://schemas.android.com/apk/res/android"
-    android:shape="rectangle">
-  <corners android:radius="10dp"/>
-
-  <stroke android:width="1dp"
-      android:color="@color/white"/>
-  <solid android:color="@color/white"/>
-</shape>

+ 0 - 1
app/src/main/res/layout/activity_guide_on_hook.xml

@@ -25,6 +25,5 @@
         android:gravity="center"
         android:layout_margin="@dimen/content_padding_10"
         android:text="下一步"
-        android:textColor="#010101"
         android:textSize="@dimen/text_size_15" />
 </LinearLayout>

+ 20 - 10
app/src/main/res/layout/activity_main.xml

@@ -39,32 +39,42 @@
         <LinearLayout
             android:id="@+id/tab_container"
             android:layout_width="match_parent"
-            android:layout_height="@dimen/tab_height"
+            android:layout_height="wrap_content"
+            android:paddingTop="4dp"
             android:orientation="horizontal">
             <View android:layout_weight="1"
                 android:layout_width="0dp"
                 android:layout_height="@dimen/tab_height"/>
-            <ImageView
+            <TextView
                 android:layout_width="@dimen/tab_width"
                 android:layout_height="@dimen/tab_height"
-                android:padding="@dimen/tab_padding"
-                android:src="@drawable/drawable_selector_task"/>
+                android:drawableTop="@drawable/drawable_selector_task"
+                android:textSize="12sp"
+                android:gravity="center"
+                android:textColor="@color/selector_color_main_tab"
+                android:text="@string/mine_hoggerel"/>
             <View android:layout_weight="2"
                 android:layout_width="0dp"
                 android:layout_height="@dimen/tab_height"/>
-            <ImageView
+            <TextView
                 android:layout_width="@dimen/tab_width"
                 android:layout_height="@dimen/tab_height"
-                android:padding="@dimen/tab_padding"
-                android:src="@drawable/drawable_selector_game"/>
+                android:drawableTop="@drawable/drawable_selector_game"
+                android:textSize="12sp"
+                android:gravity="center"
+                android:textColor="@color/selector_color_main_tab"
+                android:text="@string/tab_viewpager_gamestore"/>
             <View android:layout_weight="2"
                 android:layout_width="0dp"
                 android:layout_height="@dimen/tab_height"/>
-            <ImageView
+            <TextView
                 android:layout_width="@dimen/tab_width"
                 android:layout_height="@dimen/tab_height"
-                android:padding="@dimen/tab_padding"
-                android:src="@drawable/drawable_selector_class"/>
+                android:drawableTop="@drawable/drawable_selector_class"
+                android:textSize="12sp"
+                android:gravity="center"
+                android:textColor="@color/selector_color_main_tab"
+                android:text="@string/tab_viewpager_classification"/>
             <View android:layout_weight="1"
                 android:layout_width="0dp"
                 android:layout_height="@dimen/tab_height"/>

+ 1 - 1
app/src/main/res/layout/classification_gridview_item.xml

@@ -2,7 +2,7 @@
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
-    android:background="@drawable/shape_class_item_bg"
+    android:background="@drawable/x_shap_shadow_bg_rectgangle_white"
     android:layout_margin="10dp"
     android:orientation="vertical">
 

+ 1 - 3
app/src/main/res/layout/commit_wx_make_money.xml

@@ -27,7 +27,6 @@
                 android:background="@null"
                 android:drawablePadding="@dimen/content_padding_10"
                 android:drawableStart="@drawable/commit_wx_logo"
-                android:digits="@string/digits_username"
                 android:inputType="none"
                 android:hint="请输入要挂机的微信号"
                 android:paddingLeft="20dp"
@@ -77,11 +76,10 @@
             android:layout_height="wrap_content"
             android:layout_gravity="center_horizontal"
             android:layout_margin="10dp"
-            android:background="@drawable/selector_button_full_main"
+            style="@style/full.button_main"
             android:gravity="center"
             android:padding="@dimen/content_padding_10"
             android:text="确定"
-            android:textColor="@color/txt_black_010101"
             android:textSize="@dimen/text_size_18" />
     </LinearLayout>
 </LinearLayout>

+ 60 - 0
app/src/main/res/layout/dialog_choose_image.xml

@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="utf-8"?>
+<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_gravity="bottom"
+    android:layout_height="match_parent">
+
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_margin="@dimen/content_padding_10"
+            android:layout_gravity="bottom"
+            android:orientation="vertical">
+
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:orientation="vertical"
+                android:gravity="center"
+                android:background="@drawable/x_shap_shadow_bg_rectgangle_white">
+
+                <TextView
+                    android:id="@+id/dialog_camera"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:textColor="@color/selector_color_choose_head"
+                    android:textSize="14sp"
+                    android:gravity="center"
+                    android:text="拍照"
+                    android:padding="@dimen/content_padding_10"/>
+                <View
+                    android:layout_width="match_parent"
+                    android:layout_height="1px"
+                    android:layout_marginLeft="@dimen/content_padding_20"
+                    android:layout_marginRight="@dimen/content_padding_20"
+                    android:background="#DFDFDF"/>
+                <TextView
+                    android:id="@+id/dialog_choose"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:textColor="@color/selector_color_choose_head"
+                    android:textSize="14sp"
+                    android:gravity="center"
+                    android:text="相册"
+                    android:padding="@dimen/content_padding_10"/>
+
+            </LinearLayout>
+
+            <TextView
+                android:id="@+id/dialog_close"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_marginTop="@dimen/content_padding_10"
+                android:textColor="@color/selector_color_choose_head"
+                android:textSize="14sp"
+                android:gravity="center"
+                android:text="取消"
+                android:padding="@dimen/content_padding_10"
+                android:background="@drawable/x_shap_shadow_bg_rectgangle_white"/>
+        </LinearLayout>
+</FrameLayout>

+ 28 - 0
app/src/main/res/layout/dialog_show_loading.xml

@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent">
+
+        <RelativeLayout
+            android:layout_width="100dp"
+            android:layout_height="100dp"
+            android:layout_gravity="center"
+            android:orientation="vertical">
+
+            <ImageView
+                android:layout_width="100dp"
+                android:layout_height="100dp"
+                android:layout_centerInParent="true"
+                android:src="@drawable/commit_wx_loadding"/>
+
+            <TextView
+                android:id="@+id/dialog_loading"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:textColor="@color/theme_app_info_dark"
+                android:layout_centerInParent="true"
+                android:textSize="20sp"
+                android:gravity="center"
+                android:text="0%"/>
+        </RelativeLayout>
+</FrameLayout>

+ 14 - 5
app/src/main/res/layout/fgt_main_category.xml

@@ -3,10 +3,19 @@
     android:layout_width="match_parent"
     android:layout_height="match_parent"
     android:orientation="vertical">
-    <View
+    <LinearLayout
         android:layout_width="match_parent"
-        android:layout_height="2dp"
-        android:background="#EAEBED"/>
+        android:layout_height="wrap_content"
+        android:orientation="vertical">
+        <TextView
+            android:layout_width="match_parent"
+            android:layout_height="1px"
+            android:background="@color/white_ededed"/>
+        <TextView
+            android:layout_width="match_parent"
+            android:layout_height="1px"
+            android:background="@color/white_FFF7F7F7"/>
+    </LinearLayout>
     <ScrollView
         android:layout_width="match_parent"
         android:layout_height="match_parent"
@@ -23,13 +32,13 @@
                 android:paddingTop="10dp"
                 android:paddingBottom="10dp"
                 android:verticalSpacing="10dp"
-                android:background="@drawable/shape_class_item_bg"
+                android:background="@drawable/x_shap_shadow_bg_rectgangle_white"
                 android:layout_margin="10dp"/>
             <com.kfzs.duanduan.view.diag.MyListview
                 android:id="@+id/list_fgt_main_category"
                 android:layout_width="match_parent"
                 android:layout_height="match_parent"
-                android:background="@drawable/shape_class_item_bg"
+                android:background="@drawable/x_shap_shadow_bg_rectgangle_white"
                 android:layout_marginLeft="10dp"
                 android:layout_marginBottom="10dp"
                 android:layout_marginRight="10dp"

+ 1 - 0
app/src/main/res/layout/lie_make_money_abnormal_item.xml

@@ -57,6 +57,7 @@
             android:paddingLeft="8dp"
             android:paddingRight="8dp"
             android:layout_marginTop="@dimen/content_padding_10"
+            android:drawableRight="@drawable/wx_on_hook_abnormal"
             android:text="已解封"
             android:textColor="@color/txt_black_cc444444"
             android:textSize="@dimen/text_size_2"

+ 1 - 1
app/src/main/res/layout/lie_make_money_operation_item.xml

@@ -24,6 +24,6 @@
         android:layout_height="wrap_content"
         android:layout_marginTop="15dp"
         android:textSize="@dimen/text_size_12"
-        android:textColor="@color/txt_black_444444"
+        android:textColor="#5b7499"
         android:text="遇到问题?点我联系客服"/>
 </LinearLayout>

+ 1 - 0
app/src/main/res/layout/lie_make_money_processing_item.xml

@@ -41,6 +41,7 @@
         android:layout_height="wrap_content"
         android:layout_marginRight="@dimen/content_padding"
         android:text="客服沟通"
+        android:textColor="#5b7499"
         app:layout_constraintBaseline_toBaselineOf="@+id/weixin_number_tv"
         app:layout_constraintRight_toRightOf="parent" />
 

+ 2 - 2
app/src/main/res/layout/lie_make_money_prompt_item.xml

@@ -15,7 +15,7 @@
         android:drawableLeft="@drawable/shape_small_black_oval"
         android:drawablePadding="5dp"
         app:isAliganCenter="false"
-        android:text="将微信号托管到小绵羊(数量不限),由平台免费帮助用户自动挂机完成任务,每个微信号每月躺着赚300元!" />
+        android:text="将微信号托管到小绵羊(数量不限),由平台免费帮助用户自动挂机完成任务,每个微信号每月躺着赚90元!" />
     <com.hedan.textdrawablelibrary.TextViewDrawable
         style="@style/hint_txt_style"
         android:layout_width="wrap_content"
@@ -23,7 +23,7 @@
         android:drawableLeft="@drawable/shape_small_black_oval"
         android:drawablePadding="5dp"
         app:isAliganCenter="false"
-        android:text="挂机收益每日早上9点结算。" />
+        android:text="挂机收益每日晚上11点结算。" />
     <com.hedan.textdrawablelibrary.TextViewDrawable
         style="@style/hint_txt_style"
         android:layout_width="wrap_content"

+ 4 - 4
app/src/main/res/layout/xpersion_info_act_layout.xml

@@ -9,6 +9,7 @@
             layout="@layout/title"/>
 
         <RelativeLayout
+            android:id="@+id/rl_head"
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
             android:padding="15dp"
@@ -40,10 +41,9 @@
 
                 <ImageView
                     android:id="@+id/iv_head_right"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:background="@null"
-                    android:src="@mipmap/ic_launcher"
+                    android:layout_width="30dp"
+                    android:layout_height="30dp"
+                    android:src="@drawable/logoin_head"
                     android:layout_toLeftOf="@id/tv_more"
                     android:layout_centerVertical="true"
 

+ 3 - 1
app/src/main/res/values/color_app_theme_colors.xml

@@ -1,12 +1,14 @@
 <?xml version="1.0" encoding="utf-8"?>
 <resources>
     <!--app theme color-->
-    <color name="btn_color_main">#000000</color>
+    <color name="btn_color_main">#ffffff</color>
 
     <color name="theme_app_main">#29d6fd</color>
     <color name="theme_app_mid">#34a5e7</color>
     <color name="theme_app_highlight">#29d6fd</color>
     <color name="theme_app_highlight_more">#34a5e7</color>
+    <color name="theme_app_highlight_transparent">#3329d6fd</color>
+    <color name="theme_app_highlight_more_transparent">#3334a5e7</color>
 
     <!--app theme info color-->
     <color name="theme_app_info">#42a4ff</color>

+ 4 - 0
app/src/main/res/values/dd_colors.xml

@@ -29,6 +29,10 @@
     <color name="tv_about_text">#b2b2b2</color>
     <color name="B">#000000</color>
     <color name="tv_mid">@color/theme_app_mid</color>
+    <color name="main_tab_activated">#32b2ed</color>
+    <color name="main_tab">#AFAFAF</color>
+    <color name="color_choose_head_tv_press">#ff2d4b</color>
+    <color name="color_choose_head_tv">#444444</color>
     <color name="tv_black_3_2c">#2c2c2c</color>
 
 </resources>