Bladeren bron

1.增加小爱音响渠道
2.增加微信扫码登录
3.增加绑定手机号功能

FailedToRead 2 jaren geleden
bovenliggende
commit
b962ea4632
41 gewijzigde bestanden met toevoegingen van 1730 en 654 verwijderingen
  1. 5 2
      .idea/misc.xml
  2. 5 1
      app/build.gradle
  3. BIN
      app/libs/mi-soundbox-command-sdk.aar
  4. BIN
      app/libs/thirdparty-payment-sdk-2.1.1-20200527.030546-1.jar
  5. 1 0
      app/src/fragmentRecommend/layout/fragment_main_recommend.xml
  6. 4 0
      app/src/main/AndroidManifest.xml
  7. 39 9
      app/src/main/java/com/edufound/reader/activity/MainActivity.java
  8. 3 0
      app/src/main/java/com/edufound/reader/activity/PayActivity.java
  9. 1 1
      app/src/main/java/com/edufound/reader/activity/RecordActivity.java
  10. 32 0
      app/src/main/java/com/edufound/reader/activity/TmailPayActivity.java
  11. 37 4
      app/src/main/java/com/edufound/reader/activity/UserInfoSettingActivity.java
  12. 5 1
      app/src/main/java/com/edufound/reader/apiserver/OrderApiServerImpl.java
  13. 44 3
      app/src/main/java/com/edufound/reader/apiserver/UserApiServerImpl.java
  14. 2 2
      app/src/main/java/com/edufound/reader/base/BaseActivity.java
  15. 4 3
      app/src/main/java/com/edufound/reader/base/BaseFragment.java
  16. 5 0
      app/src/main/java/com/edufound/reader/bean/ChannelCodeEnum.java
  17. 4 0
      app/src/main/java/com/edufound/reader/contract/TmailPayContract.java
  18. 1 1
      app/src/main/java/com/edufound/reader/fragment/CharacterFragment.java
  19. 10 2
      app/src/main/java/com/edufound/reader/fragment/MyTabFragment.java
  20. 5 5
      app/src/main/java/com/edufound/reader/fragment/RecommendFragment.java
  21. 73 0
      app/src/main/java/com/edufound/reader/miutil/MiSoundSDKUtil.java
  22. 4 1
      app/src/main/java/com/edufound/reader/model/TmailPayModel.java
  23. 67 7
      app/src/main/java/com/edufound/reader/popwindow/PopWindowUtil.java
  24. 3 3
      app/src/main/java/com/edufound/reader/presenter/LoginAlertPresenter.java
  25. 6 6
      app/src/main/java/com/edufound/reader/presenter/MainPresenter.java
  26. 1 1
      app/src/main/java/com/edufound/reader/presenter/MyTabFragmentPresenter.java
  27. 0 41
      app/src/main/java/com/edufound/reader/presenter/PayPresenter.java
  28. 282 7
      app/src/main/java/com/edufound/reader/presenter/PopWindowPresneter.java
  29. 91 23
      app/src/main/java/com/edufound/reader/presenter/TmailPayPresenter.java
  30. 0 1
      app/src/main/java/com/edufound/reader/presenter/UserInfoSettingPresenter.java
  31. 96 2
      app/src/main/java/com/edufound/reader/util/DeviceUtil.java
  32. 16 3
      app/src/main/java/com/edufound/reader/util/EfunboxUtil.java
  33. 9 0
      app/src/main/java/com/edufound/reader/util/PermissionsUtil.java
  34. BIN
      app/src/main/res/drawable/bind_phone_num.png
  35. BIN
      app/src/main/res/drawable/mi_sound_close.png
  36. BIN
      app/src/main/res/drawable/mi_sound_login_bg.png
  37. BIN
      app/src/main/res/drawable/mi_sound_login_qrcode_bg.png
  38. 26 0
      app/src/main/res/layout/activity_pay_tmail.xml
  39. 308 283
      app/src/main/res/layout/activity_userinfo_setting.xml
  40. 243 242
      app/src/main/res/layout/fragment_main_user.xml
  41. 298 0
      app/src/main/res/layout/popupwindow_mi_sound_qrcode_layout.xml

+ 5 - 2
.idea/misc.xml

@@ -115,7 +115,7 @@
         <entry key="..\:/Work_Space/Android_Space/efunboxReader/efunboxReader-android-master/app/src/activityLoginAlert/drawable/activity_loginalert_check_selector.xml" value="0.2165" />
         <entry key="..\:/Work_Space/Android_Space/efunboxReader/efunboxReader-android-master/app/src/activityLoginAlert/drawable/activity_saffloer_window_item_divier.xml" value="0.2165" />
         <entry key="..\:/Work_Space/Android_Space/efunboxReader/efunboxReader-android-master/app/src/exception/drawable/adapter_item_video_tab_item_bg.xml" value="0.2165" />
-        <entry key="..\:/Work_Space/Android_Space/efunboxReader/efunboxReader-android-master/app/src/exception/layout/activity_event_pay.xml" value="0.2" />
+        <entry key="..\:/Work_Space/Android_Space/efunboxReader/efunboxReader-android-master/app/src/exception/layout/activity_event_pay.xml" value="0.22" />
         <entry key="..\:/Work_Space/Android_Space/efunboxReader/efunboxReader-android-master/app/src/exception/layout/popupwindow_webs_events.xml" value="0.2572992700729927" />
         <entry key="..\:/Work_Space/Android_Space/efunboxReader/efunboxReader-android-master/app/src/fragmentRecommend/drawable/activity_comment_quick_item_one_bg.xml" value="0.2165" />
         <entry key="..\:/Work_Space/Android_Space/efunboxReader/efunboxReader-android-master/app/src/fragmentRecommend/drawable/slidevideo_switch_track_selector.xml" value="0.2005" />
@@ -130,13 +130,15 @@
         <entry key="..\:/Work_Space/Android_Space/efunboxReader/efunboxReader-android-master/app/src/main/res/drawable/activity_comment_item_divier.xml" value="0.2005" />
         <entry key="..\:/Work_Space/Android_Space/efunboxReader/efunboxReader-android-master/app/src/main/res/drawable/activity_saffloer_task_divier.xml" value="0.2165" />
         <entry key="..\:/Work_Space/Android_Space/efunboxReader/efunboxReader-android-master/app/src/main/res/drawable/cusjzplayer_controller_seekbar.xml" value="0.2165" />
+        <entry key="..\:/Work_Space/Android_Space/efunboxReader/efunboxReader-android-master/app/src/main/res/layout/activity_alert_login.xml" value="0.33" />
         <entry key="..\:/Work_Space/Android_Space/efunboxReader/efunboxReader-android-master/app/src/main/res/layout/activity_comment.xml" value="0.1873479318734793" />
         <entry key="..\:/Work_Space/Android_Space/efunboxReader/efunboxReader-android-master/app/src/main/res/layout/activity_event_pay_item.xml" value="0.75" />
         <entry key="..\:/Work_Space/Android_Space/efunboxReader/efunboxReader-android-master/app/src/main/res/layout/activity_main.xml" value="0.2" />
+        <entry key="..\:/Work_Space/Android_Space/efunboxReader/efunboxReader-android-master/app/src/main/res/layout/activity_misound_pay.xml" value="0.25669099756691" />
         <entry key="..\:/Work_Space/Android_Space/efunboxReader/efunboxReader-android-master/app/src/main/res/layout/activity_otherrecord.xml" value="0.30900243309002434" />
         <entry key="..\:/Work_Space/Android_Space/efunboxReader/efunboxReader-android-master/app/src/main/res/layout/activity_pay.xml" value="0.22" />
         <entry key="..\:/Work_Space/Android_Space/efunboxReader/efunboxReader-android-master/app/src/main/res/layout/activity_pay_item.xml" value="0.21897810218978103" />
-        <entry key="..\:/Work_Space/Android_Space/efunboxReader/efunboxReader-android-master/app/src/main/res/layout/activity_pay_tmail.xml" value="0.22" />
+        <entry key="..\:/Work_Space/Android_Space/efunboxReader/efunboxReader-android-master/app/src/main/res/layout/activity_pay_tmail.xml" value="0.25" />
         <entry key="..\:/Work_Space/Android_Space/efunboxReader/efunboxReader-android-master/app/src/main/res/layout/activity_pay_tmail_item.xml" value="0.67" />
         <entry key="..\:/Work_Space/Android_Space/efunboxReader/efunboxReader-android-master/app/src/main/res/layout/activity_record.xml" value="0.75" />
         <entry key="..\:/Work_Space/Android_Space/efunboxReader/efunboxReader-android-master/app/src/main/res/layout/activity_saffloer.xml" value="0.5" />
@@ -148,6 +150,7 @@
         <entry key="..\:/Work_Space/Android_Space/efunboxReader/efunboxReader-android-master/app/src/main/res/layout/fragment_main_character.xml" value="0.2615571776155718" />
         <entry key="..\:/Work_Space/Android_Space/efunboxReader/efunboxReader-android-master/app/src/main/res/layout/fragment_main_user.xml" value="0.67" />
         <entry key="..\:/Work_Space/Android_Space/efunboxReader/efunboxReader-android-master/app/src/main/res/layout/popupwindow_exit_app.xml" value="0.2402676399026764" />
+        <entry key="..\:/Work_Space/Android_Space/efunboxReader/efunboxReader-android-master/app/src/main/res/layout/popupwindow_mi_sound_qrcode_layout.xml" value="0.5" />
         <entry key="..\:/Work_Space/Android_Space/efunboxReader/efunboxReader-android-master/app/src/main/res/layout/popupwindow_record_status.xml" value="0.2451338199513382" />
         <entry key="..\:/Work_Space/Android_Space/efunboxReader/efunboxReader-android-master/app/src/main/res/layout/popupwindow_registration_events.xml" value="0.25" />
         <entry key="..\:/Work_Space/Android_Space/efunboxReader/efunboxReader-android-master/app/src/main/res/layout/window_deviceinfo.xml" value="0.22262773722627738" />

+ 5 - 1
app/build.gradle

@@ -12,7 +12,7 @@ android {
 
     defaultConfig {
         applicationId "com.edufound.reader"
-        minSdkVersion 21
+        minSdkVersion 26
         targetSdkVersion 30
         versionCode 20
         versionName "2.0"
@@ -102,6 +102,7 @@ android {
         }
         //小爱音响
         channel_xayx {
+            applicationIdSuffix ".xiaoai"
             signingConfig signingConfigs.efunbox
             manifestPlaceholders = [
                     appCode: "2016",
@@ -189,4 +190,7 @@ dependencies {
     implementation files('libs/registry-api-1.1.16-20201203.085134-3.jar')
     implementation files('libs/aranger.jar')
 
+    //小米音响
+    implementation files('libs/thirdparty-payment-sdk-2.1.1-20200527.030546-1.jar')
+
 }

BIN
app/libs/mi-soundbox-command-sdk.aar


BIN
app/libs/thirdparty-payment-sdk-2.1.1-20200527.030546-1.jar


+ 1 - 0
app/src/fragmentRecommend/layout/fragment_main_recommend.xml

@@ -80,6 +80,7 @@
                             android:layout_gravity="center|top"
                             android:layout_marginLeft="20dp"
                             android:gravity="center"
+                            android:maxLength="11"
                             android:text="*****"
                             android:textColor="@color/fragment_recommend_user_color"
                             android:textSize="28dp"></TextView>

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

@@ -1,5 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
     package="com.edufound.reader">
 
     <uses-permission android:name="android.permission.INTERNET" />
@@ -8,6 +9,9 @@
     <uses-permission android:name="android.permission.KILL_BACKGROUND_PROCESSES" />
     <uses-permission android:name="android.permission.READ_PHONE_STATE" />
     <uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" /> <!-- 切换⽹络通道 -->
+    <uses-permission
+        android:name="android.permission.READ_PRIVILEGED_PHONE_STATE"
+        tools:ignore="ProtectedPermissions" />
     <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> <!-- 本地信息缓存 -->
     <uses-permission android:name="android.permission.CHANGE_WIFI_STATE" /> <!-- 开关wifi状态,解决国内机型移动⽹络权限问题需要 -->
     <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />

+ 39 - 9
app/src/main/java/com/edufound/reader/activity/MainActivity.java

@@ -6,8 +6,10 @@ import android.content.BroadcastReceiver;
 import android.content.Context;
 import android.content.Intent;
 import android.content.IntentFilter;
+import android.content.pm.PackageManager;
 import android.content.res.Configuration;
 import android.net.Uri;
+import android.os.Build;
 import android.view.KeyEvent;
 import android.view.View;
 import android.view.ViewGroup;
@@ -33,9 +35,14 @@ import com.edufound.reader.popwindow.PopWindowUtil;
 import com.edufound.reader.presenter.MainPresenter;
 import com.edufound.reader.receiver.BackPageReceiver;
 import com.edufound.reader.util.Consts;
+import com.edufound.reader.util.DeviceUtil;
+import com.edufound.reader.util.DeviceUuidFactory;
+import com.edufound.reader.util.MMKVUtil;
+import com.edufound.reader.util.PermissionsUtil;
 import com.edufound.reader.util.ThroughUtil;
 import com.orhanobut.logger.Logger;
 
+import java.lang.reflect.Method;
 import java.util.HashMap;
 
 import androidx.annotation.NonNull;
@@ -81,6 +88,9 @@ public class MainActivity extends BaseMvpActivity<MainPresenter> implements Main
         });
         mPresenter.userIsLogin();
         mPresenter.checkModelIsDebug();
+        Logger.e("DeviceUuidFactory.getUuid():" + DeviceUuidFactory.getUuid());
+        //获取读取手机状态权限
+//        PermissionsUtil.readPhoneStatePermissions(mActivity);
 
 
         Uri getIntentUri = null;
@@ -113,18 +123,18 @@ public class MainActivity extends BaseMvpActivity<MainPresenter> implements Main
                 if (type.equals(ThroughType.TYPEA.getTypeCode())) {
                     //typeA类型,直接进入朗读界面
                     Logger.e("进入了TypeA类型");
-                    ThroughUtil.mThroughTypeA = new ThroughTypeA();
-                    ThroughUtil.mThroughType = ThroughType.TYPEA;
-                    ThroughUtil.mThroughTypeA.setExampleId(getIntentUri.getQueryParameter("exampleId"));
-                    //backModel只有app和home两个值,app是直接退出应用,home是返回首页
-                    ThroughUtil.mThroughTypeA.setBackModel(getIntentUri.getQueryParameter("backModel"));
-                    toNextActivity(RecordActivity.class);
+//                    ThroughUtil.mThroughTypeA = new ThroughTypeA();
+//                    ThroughUtil.mThroughType = ThroughType.TYPEA;
+//                    ThroughUtil.mThroughTypeA.setExampleId(getIntentUri.getQueryParameter("exampleId"));
+//                    //backModel只有app和home两个值,app是直接退出应用,home是返回首页
+//                    ThroughUtil.mThroughTypeA.setBackModel(getIntentUri.getQueryParameter("backModel"));
+//                    toNextActivity(RecordActivity.class);
                 } else if (type.equals(ThroughType.TYPEB.getTypeCode())) {
                     Logger.e("进入了TypeB类型");
                     //把收到的ID视频提到第一个
-                    ThroughUtil.mThroughTypeB = new ThroughTypeB();
-                    ThroughUtil.mThroughType = ThroughType.TYPEB;
-                    ThroughUtil.mThroughTypeB.setUserReadId(getIntentUri.getQueryParameter("userReadId"));
+//                    ThroughUtil.mThroughTypeB = new ThroughTypeB();
+//                    ThroughUtil.mThroughType = ThroughType.TYPEB;
+//                    ThroughUtil.mThroughTypeB.setUserReadId(getIntentUri.getQueryParameter("userReadId"));
                 }
             }
 
@@ -134,6 +144,7 @@ public class MainActivity extends BaseMvpActivity<MainPresenter> implements Main
 
     }
 
+
     @Override
     public void onGetDisconnect() {
 
@@ -310,4 +321,23 @@ public class MainActivity extends BaseMvpActivity<MainPresenter> implements Main
         super.onConfigurationChanged(newConfig);
         Logger.e("onConfigurationChanged:");
     }
+
+
+    @Override
+    public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
+        super.onRequestPermissionsResult(requestCode, permissions, grantResults);
+//        if (requestCode == PermissionsUtil.GET_READ_PHONE_STATE) {
+//            if (grantResults[0] == PackageManager.PERMISSION_GRANTED) {
+//                //获取成功
+//                Logger.e("成功了");
+//                Logger.e("de:" + DeviceUtil.SerialNumber());
+//                Logger.e("main获取的:" + DeviceUtil.getSerialNumber());
+//            } else if (grantResults[0] == -1) {
+//                //获取失败
+//                Logger.e("失败了");
+//            }
+//    }
+    }
+
+
 }

+ 3 - 0
app/src/main/java/com/edufound/reader/activity/PayActivity.java

@@ -28,6 +28,9 @@ import androidx.annotation.NonNull;
 import io.reactivex.rxjava3.annotations.Nullable;
 import io.reactivex.rxjava3.functions.Consumer;
 
+/**
+ * 普通支付的界面
+ * */
 public class PayActivity extends BaseMvpActivity<PayPresenter> implements PayContract.View {
 
     Activity mActivity;

+ 1 - 1
app/src/main/java/com/edufound/reader/activity/RecordActivity.java

@@ -116,7 +116,7 @@ public class RecordActivity extends BaseMvpActivity<RecordPresenter> implements
                 }
                 return;
             } else {
-                if (EfunboxUtil.checkLogin(mActivity)) {
+                if (EfunboxUtil.checkLogin(mActivity,getRootView())) {
                     if (EfunboxUtil.checkIsVip()) {
                         if (isRecordNow) {
                             refRecordStatus();

+ 32 - 0
app/src/main/java/com/edufound/reader/activity/TmailPayActivity.java

@@ -4,6 +4,7 @@ import android.app.Activity;
 import android.content.Intent;
 import android.view.View;
 import android.view.ViewGroup;
+import android.widget.FrameLayout;
 import android.widget.ImageView;
 import android.widget.LinearLayout;
 import android.widget.Toast;
@@ -16,9 +17,14 @@ import com.edufound.reader.base.BaseMvpActivity;
 import com.edufound.reader.contract.TmailPayContract;
 import com.edufound.reader.popwindow.PopWindowUtil;
 import com.edufound.reader.presenter.TmailPayPresenter;
+import com.edufound.reader.util.QRCodeUtil;
+import com.edufound.reader.util.SizeUtils;
 
 import io.reactivex.rxjava3.functions.Consumer;
 
+/**
+ * 天猫/小米-支付的页面
+ */
 public class TmailPayActivity extends BaseMvpActivity<TmailPayPresenter> implements TmailPayContract.View {
 
     Activity mActivity;
@@ -31,6 +37,17 @@ public class TmailPayActivity extends BaseMvpActivity<TmailPayPresenter> impleme
     @BindView(id = R.id.activity_pay_tmail_item_layouts)
     LinearLayout mItemFrame;
 
+
+    @BindView(id = R.id.activity_pay_qrcode_layout)
+    FrameLayout mQRCodeLayout;
+
+
+    @BindView(id = R.id.activity_pay_qrcode)
+    ImageView mQRCodeImg;
+
+    @BindView(id = R.id.activity_pay_qrcode_layout_close)
+    ImageView mQRCodeLayoutClose;
+
     @Override
     public int getLayoutId() {
         return R.layout.activity_pay_tmail;
@@ -106,6 +123,21 @@ public class TmailPayActivity extends BaseMvpActivity<TmailPayPresenter> impleme
     }
 
     @Override
+    public void MiSoundPayUrlSuccess(String url) {
+        mQRCodeLayout.post(new Runnable() {
+            @Override
+            public void run() {
+                mQRCodeLayout.setVisibility(View.VISIBLE);
+                mQRCodeImg.setImageBitmap(QRCodeUtil.createQRCode(url, SizeUtils.dp2px(getActivity(), 300)));
+                addUiClickListener(mQRCodeLayoutClose, o -> {
+                    mQRCodeLayout.setVisibility(View.GONE);
+                });
+            }
+        });
+
+    }
+
+    @Override
     protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
         mPresenter.onActivityResult(requestCode, resultCode, data);
         super.onActivityResult(requestCode, resultCode, data);

+ 37 - 4
app/src/main/java/com/edufound/reader/activity/UserInfoSettingActivity.java

@@ -30,7 +30,9 @@ import com.edufound.reader.botsdk.BotRegisterListener;
 import com.edufound.reader.contract.UserInfoSettingContract;
 import com.edufound.reader.cusview.CusToast;
 import com.edufound.reader.listener.PopUtilClickListener;
+import com.edufound.reader.miutil.MiSoundSDKUtil;
 import com.edufound.reader.popwindow.PopWindowUtil;
+import com.edufound.reader.presenter.PopWindowPresneter;
 import com.edufound.reader.presenter.UserInfoSettingPresenter;
 import com.edufound.reader.util.Consts;
 import com.edufound.reader.util.EfunboxUtil;
@@ -65,6 +67,8 @@ public class UserInfoSettingActivity extends BaseMvpActivity<UserInfoSettingPres
     LinearLayout mBindWeChat;
     @BindView(id = R.id.activity_userinfo_setting_switchuser_layout)
     LinearLayout mSwitchLayout;
+    @BindView(id = R.id.activity_userinfo_setting_bindphonenum_layout)
+    LinearLayout mBindPhoneNumLayout;
 
     @BindView(id = R.id.activity_userinfo_setting_nickname)
     EditText mNickName;
@@ -79,6 +83,8 @@ public class UserInfoSettingActivity extends BaseMvpActivity<UserInfoSettingPres
     @BindView(id = R.id.activity_userinfo_setting_userhead_num)
     TextView mUserNum;
 
+    boolean hasBindPhone = false;
+
 
     @Override
     public int getLayoutId() {
@@ -120,13 +126,32 @@ public class UserInfoSettingActivity extends BaseMvpActivity<UserInfoSettingPres
             //百度渠道,隐藏注销和退出登录按钮
             mCancellationLayout.setVisibility(View.GONE);
             mLoginOut.setVisibility(View.GONE);
+            mBindPhoneNumLayout.setVisibility(View.GONE);
         } else if (Consts.getUmengChannel().equals(ChannelCodeEnum.YIFANG.getChannelCode())) {
             //义方渠道
             mCancellationLayout.setVisibility(View.VISIBLE);
             mLoginOut.setVisibility(View.VISIBLE);
+            mBindPhoneNumLayout.setVisibility(View.GONE);
         } else if (Consts.getUmengChannel().equals(ChannelCodeEnum.TMAIL.getChannelCode())) {
             mSwitchLayout.setVisibility(View.GONE);
             mBindWeChat.setVisibility(View.GONE);
+            mBindPhoneNumLayout.setVisibility(View.GONE);
+        } else if (Consts.getUmengChannel().equals(ChannelCodeEnum.MISOUND.getChannelCode())) {
+            mBindWeChat.setVisibility(View.GONE);
+            mBindPhoneNumLayout.setVisibility(View.VISIBLE);
+            addUiClickListener(mBindPhoneNumLayout, o -> {
+                if (hasBindPhone) {
+                    PopWindowUtil.miSoundLoginWindow(mActivity, getRootView(), MiSoundSDKUtil.MI_SOUND_SHOW_BINDPHONENUM, null);
+                } else {
+                    PopWindowUtil.miSoundLoginWindow(mActivity, getRootView(), MiSoundSDKUtil.MI_SOUND_BIND_PHONENUM, new PopWindowPresneter.MISoundLoginCallBack() {
+                        @Override
+                        public void success() {
+                            Logger.e("绑定成功返回了!!!!!!!!!!!!!!!!!!!");
+                            hasBindPhone = true;
+                        }
+                    });
+                }
+            });
         }
         addUiClickListener(mLoginOut, o -> {
             Logger.e("mLoginOut");
@@ -179,7 +204,7 @@ public class UserInfoSettingActivity extends BaseMvpActivity<UserInfoSettingPres
                 mNickName.clearFocus();
                 return;
             }
-            EfunboxUtil.userLogin(getActivity());
+            EfunboxUtil.userLogin(getActivity(), getRootView());
         });
 
         addUiClickListener(mGenderMale, o -> {
@@ -318,20 +343,28 @@ public class UserInfoSettingActivity extends BaseMvpActivity<UserInfoSettingPres
         }
         mNickName.setText(bean.getNickName());
         mGrade.setText(EfunboxUtil.getCNGradeByEnum(bean.getGrade()));
+
+        if (!TextUtils.isEmpty(bean.getMobile())) {
+            hasBindPhone = true;
+        }
+
         if (bean.getGender().equals("1")) {
-            //男孩子
+            //男孩
             mGenderMale.setBackgroundResource(R.drawable.activity_userinfo_setting_item_sex_true_bg);
             mGenderFeMale.setBackgroundResource(R.drawable.activity_userinfo_setting_item_sex_bg);
             GlideUtils.loadImage(getActivity(), R.drawable.activity_userinfo_setting_boy, mUserHead);
         } else if (bean.getGender().equals("0")) {
-            //女孩
+            //女孩
             mGenderMale.setBackgroundResource(R.drawable.activity_userinfo_setting_item_sex_bg);
             mGenderFeMale.setBackgroundResource(R.drawable.activity_userinfo_setting_item_sex_true_bg);
             GlideUtils.loadImage(getActivity(), R.drawable.activity_userinfo_setting_girl, mUserHead);
         }
+
+        Logger.e("bean.getAvatar():" + bean.getAvatar());
         if (bean.getAvatar() == null || bean.getAvatar().equals("")) {
+
         } else {
-            GlideUtils.loadCircleWithBorderImage(getActivity(), bean.getAvatar(), mUserHead, SizeUtils.px2dp(getActivity(), 10), Color.WHITE);
+            GlideUtils.loadCircleImage(mActivity, bean.getAvatar(), mUserHead);
         }
     }
 

+ 5 - 1
app/src/main/java/com/edufound/reader/apiserver/OrderApiServerImpl.java

@@ -52,7 +52,11 @@ public class OrderApiServerImpl implements OrderApiServer {
 
     @Override
     public void getAuth(Activity activity, Callback callback) {
-        OkHttpClient.doGetAsync(activity, new HttpInfo.Builder().setUrl(API + "/auth"), callback);
+        if (activity == null) {
+            OkHttpClient.doGetAsync(new HttpInfo.Builder().setUrl(API + "/auth"), callback);
+        } else {
+            OkHttpClient.doGetAsync(activity, new HttpInfo.Builder().setUrl(API + "/auth"), callback);
+        }
     }
 
 

+ 44 - 3
app/src/main/java/com/edufound/reader/apiserver/UserApiServerImpl.java

@@ -6,6 +6,7 @@ import android.telecom.Call;
 import com.edufound.reader.bean.UserEventBean;
 import com.edufound.reader.botsdk.BotConstants;
 import com.edufound.reader.util.Consts;
+import com.edufound.reader.util.DeviceUuidFactory;
 import com.edufound.reader.util.EfunboxCallBack;
 import com.edufound.reader.util.OkHttpClient;
 import com.google.gson.Gson;
@@ -15,7 +16,6 @@ import com.okhttplib.callback.Callback;
 public class UserApiServerImpl implements userApiServer {
     private String API = Consts.getFinalApi();
 
-
     /**
      * 用户是否登录
      */
@@ -24,6 +24,11 @@ public class UserApiServerImpl implements userApiServer {
         OkHttpClient.doGetAsync(activity, HttpInfo.Builder().setUrl(API + "/user/isLogin").addParam("deviceCode", deviceCode), callback);
     }
 
+    @Override
+    public void MiSoundIsLogin(String deviceCode, Callback callback) {
+        OkHttpClient.doGetAsync(HttpInfo.Builder().setUrl(API + "/user/isLogin").addParam("deviceCode", deviceCode), callback);
+    }
+
     /**
      * 获取用户信息
      */
@@ -34,7 +39,7 @@ public class UserApiServerImpl implements userApiServer {
 
 
     /**
-     * 瞎JB注册用户
+     * 注册用户
      */
     @Override
     public void registerUser(Activity activity, String userJson, Callback callback) {
@@ -82,7 +87,12 @@ public class UserApiServerImpl implements userApiServer {
 
     @Override
     public void loginSign(Activity activity, Callback callback) {
-        OkHttpClient.doPostAsync(activity, new HttpInfo.Builder().setUrl(API + "/loginLog"), callback);
+        if (activity == null) {
+            OkHttpClient.doPostAsync(new HttpInfo.Builder().setUrl(API + "/loginLog"), callback);
+        } else {
+
+            OkHttpClient.doPostAsync(activity, new HttpInfo.Builder().setUrl(API + "/loginLog"), callback);
+        }
     }
 
     @Override
@@ -132,6 +142,20 @@ public class UserApiServerImpl implements userApiServer {
     public void getTMailPhone(String json, Callback callback) {
         OkHttpClient.doPostAsync(HttpInfo.Builder().addParamJson(json).setUrl(API + "/user/getMobile"), callback);
     }
+
+
+    /**
+     * 获取登录二维码
+     */
+    @Override
+    public void getLoginQRCode(Callback callback) {
+        OkHttpClient.doGetAsync(HttpInfo.Builder().addParam("channelCode", Consts.getUmengChannel()).addParam("deviceCode", DeviceUuidFactory.getUuid()).setUrl(API + "/user/qrCode"), callback);
+    }
+
+    @Override
+    public void bindPhoneNum(String phoneNum, Callback callback) {
+        OkHttpClient.doPostAsync(HttpInfo.Builder().setUrl(API + "/user/mobileBind").addParamJson("{\"mobileNo\":\"" + phoneNum + "\",\"uid\":\"" + Consts.getUID() + "\"}"), callback);
+    }
 }
 
 
@@ -141,6 +165,13 @@ interface userApiServer {
      */
     void isLogin(Activity activity, String deviceCode, Callback callback);
 
+
+    /**
+     * 用户是否登录
+     */
+    void MiSoundIsLogin(String deviceCode, Callback callback);
+
+
     /*
      * 获取用户信息
      * */
@@ -216,4 +247,14 @@ interface userApiServer {
 
 
     void getTMailPhone(String json, Callback callback);
+
+    /**
+     * 获取登录二维码
+     */
+    void getLoginQRCode(Callback callback);
+
+    /**
+     * 绑定手机号
+     */
+    void bindPhoneNum(String phoneNum, Callback callback);
 }

+ 2 - 2
app/src/main/java/com/edufound/reader/base/BaseActivity.java

@@ -637,7 +637,7 @@ public abstract class BaseActivity extends AppCompatActivity {
             if (intent.name.equals("all_login")) {
                 //用户主动要求登录
                 Consts.setIsNeedLogin(true);
-                EfunboxUtil.userLogin(EApplication.mActivityList.get(EApplication.mActivityList.size() - 1));
+                EfunboxUtil.userLogin(EApplication.mActivityList.get(EApplication.mActivityList.size() - 1), getRootView());
                 return;
             } else if (intent.name.equals("user_info")) {
                 //获取是不是百度VIP
@@ -720,7 +720,7 @@ public abstract class BaseActivity extends AppCompatActivity {
                                             }
                                         });
                                         //检查活动
-                                        EfunboxUtil.checkEvents(topActivity, getRootView(),true);
+                                        EfunboxUtil.checkEvents(topActivity, getRootView(), true);
                                     }
 
                                     @Override

+ 4 - 3
app/src/main/java/com/edufound/reader/base/BaseFragment.java

@@ -45,6 +45,7 @@ import java.util.concurrent.TimeUnit;
 
 import androidx.annotation.NonNull;
 import androidx.fragment.app.Fragment;
+
 import io.reactivex.rxjava3.annotations.Nullable;
 import io.reactivex.rxjava3.disposables.CompositeDisposable;
 import io.reactivex.rxjava3.disposables.Disposable;
@@ -199,7 +200,7 @@ public abstract class BaseFragment extends Fragment {
             if (intent.name.equals("all_login")) {
                 //用户主动要求登录
                 Consts.setIsNeedLogin(true);
-                EfunboxUtil.userLogin(EApplication.mActivityList.get(EApplication.mActivityList.size() - 1));
+                EfunboxUtil.userLogin(EApplication.mActivityList.get(EApplication.mActivityList.size() - 1), getView());
                 return;
             } else if (intent.name.equals("user_info")) {
                 //获取是不是百度VIP
@@ -236,7 +237,7 @@ public abstract class BaseFragment extends Fragment {
                                 map.put("channel", Consts.getUmengChannel());
                                 map.put("mobileNo", phone);
                                 map.put("nickName", EfunboxUtil.setPhoneMiddle(phone));
-                                Logger.e("Consts.getmConstsBaiDuUserBean().getUserInfo().getUserId():"+Consts.getmConstsBaiDuUserBean().getUserInfo().getUserId());
+                                Logger.e("Consts.getmConstsBaiDuUserBean().getUserInfo().getUserId():" + Consts.getmConstsBaiDuUserBean().getUserInfo().getUserId());
                                 map.put("userId", Consts.getmConstsBaiDuUserBean().getUserInfo().getUserId());
                                 if (MMKVUtil.getInstance().decodeString(MMKVEncodeKey.USER_GRADE).equals("") || MMKVUtil.getInstance().decodeString(MMKVEncodeKey.USER_GRADE) == null) {
                                     //如果没有,默认给一年级
@@ -249,7 +250,7 @@ public abstract class BaseFragment extends Fragment {
                                 userApiServer.registerUserId(topActivity, json, new Callback() {
                                     @Override
                                     public void onSuccess(HttpInfo info) throws IOException {
-                                        Logger.e("注册用户:"+info.getRetDetail());
+                                        Logger.e("注册用户:" + info.getRetDetail());
                                         HttpResultBean<UserBean> bean = info.getRetDetail(new TypeToken<HttpResultBean<UserBean>>() {
                                         }.getType());
                                         Consts.setUID(bean.getData().getUid());

+ 5 - 0
app/src/main/java/com/edufound/reader/bean/ChannelCodeEnum.java

@@ -15,6 +15,11 @@ public enum ChannelCodeEnum {
         public String getChannelCode() {//枚举对象实现抽象方法
             return "3002";
         }
+    },
+    MISOUND {
+        public String getChannelCode() {//枚举对象实现抽象方法
+            return "2016";
+        }
     };
 
     public abstract String getChannelCode();//定义抽象方法

+ 4 - 0
app/src/main/java/com/edufound/reader/contract/TmailPayContract.java

@@ -16,6 +16,8 @@ public interface TmailPayContract {
         void TMailPayGenie(Activity activity, String json, Callback callback);
 
         void TMailFlowerPay(Activity activity, String json, Callback callback);
+
+        void MiSoundPay(Activity activity, String json, Callback callback);
     }
 
     interface View extends BaseView {
@@ -24,6 +26,8 @@ public interface TmailPayContract {
         void addUiClick(android.view.View view, Consumer onNext);
 
         void isPaySuccess();
+
+        void MiSoundPayUrlSuccess(String url);
     }
 
     interface Presenter {

+ 1 - 1
app/src/main/java/com/edufound/reader/fragment/CharacterFragment.java

@@ -62,7 +62,7 @@ public class CharacterFragment extends BaseMvpFragment<CharacterFragmentPresente
         mGridLayout = view.findViewById(R.id.fragment_my_recyclerview);
         mBottomView = view.findViewById(R.id.fragment_main_character_bottomview);
         addUiClick(mCharacterImage, o -> {
-            if (EfunboxUtil.checkLogin(getActivity())) {
+            if (EfunboxUtil.checkLogin(getActivity(), getRootView())) {
                 mPresenter.getUserApi().postUserEvent(getActivity(), UserEventEnum.EVENT_INTEGRAL.getEvent());
                 toNextActivity(SafflowerActivity.class);
             }

+ 10 - 2
app/src/main/java/com/edufound/reader/fragment/MyTabFragment.java

@@ -4,6 +4,7 @@ import android.annotation.SuppressLint;
 import android.graphics.Rect;
 import android.os.Build;
 import android.os.Bundle;
+import android.text.TextUtils;
 import android.view.View;
 import android.view.ViewGroup;
 import android.widget.FrameLayout;
@@ -236,8 +237,15 @@ public class MyTabFragment extends BaseMvpFragment<MyTabFragmentPresenter> imple
         } else {
             GlideUtils.loadCircleImage(getContext(), bean.getUser().getAvatar(), mHeaderUserImg);
         }
-        mHeadUserPhone.setText(bean.getUser().getNickName());
-        mHeadUserGrade.setText(EfunboxUtil.getCNGradeByEnum(bean.getUser().getGrade()));
+        if (bean.getUser().getNickName().length() > 8) {
+            mHeadUserPhone.setText(bean.getUser().getNickName().substring(0, 8) + "...");
+        } else {
+
+            mHeadUserPhone.setText(bean.getUser().getNickName());
+        }
+        if (!TextUtils.isEmpty(bean.getUser().getGrade())) {
+            mHeadUserGrade.setText(EfunboxUtil.getCNGradeByEnum(bean.getUser().getGrade()));
+        }
         mHeadUserFans.setText(String.valueOf(bean.getFansAmount()));
         mHeadUserPlayCount.setText(String.valueOf(bean.getPlayAmount()));
         mFlowerCount.setText(String.valueOf(bean.getIntegralAmount()));

+ 5 - 5
app/src/main/java/com/edufound/reader/fragment/RecommendFragment.java

@@ -177,7 +177,7 @@ public class RecommendFragment extends BaseMvpFragment<RecommendFragmentPresente
 
         addUiClickListener(mToRecordLayout, o -> {
             mPresenter.getUserApi().postUserEvent(getActivity(), UserEventEnum.EVENT_RECREAD.getEvent());
-            if (EfunboxUtil.checkLogin(getActivity())) {
+            if (EfunboxUtil.checkLogin(getActivity(), getRootView())) {
                 //登陆了,判断是否是VIP
                 if (EfunboxUtil.checkIsVip()) {
                     //如果是VIP
@@ -291,7 +291,7 @@ public class RecommendFragment extends BaseMvpFragment<RecommendFragmentPresente
             isFollow.setVisibility(View.INVISIBLE);
             mUserHeadLayout.setClickable(true);
             addUiClickListener(mUserHeadLayout, o -> {
-                if (EfunboxUtil.checkLogin(getActivity())) {
+                if (EfunboxUtil.checkLogin(getActivity(),getRootView())) {
                     Bundle bundle = new Bundle();
                     bundle.putString("other_uid", bean.getUser().getUid());
                     bundle.putString("record_id", bean.getUserRead().getId());
@@ -314,18 +314,18 @@ public class RecommendFragment extends BaseMvpFragment<RecommendFragmentPresente
         }
 
         addUiClickListener(mCollectionLayout, o -> {
-            if (EfunboxUtil.checkLogin(getActivity())) {
+            if (EfunboxUtil.checkLogin(getActivity(),getRootView())) {
                 mPresenter.doFavorites(bean.getUserRead());
             }
         });
         addUiClickListener(mThumbsLayout, o -> {
-            if (EfunboxUtil.checkLogin(getActivity())) {
+            if (EfunboxUtil.checkLogin(getActivity(),getRootView())) {
                 mPresenter.doLike(bean.getUserRead());
             }
         });
         mThumbCount.setText(bean.getUserRead().getLikeAmount());
         addUiClickListener(mCommentLayout, o -> {
-            if (EfunboxUtil.checkLogin(getActivity())) {
+            if (EfunboxUtil.checkLogin(getActivity(),getRootView())) {
                 Logger.e("点击了评论");
                 Bundle bundle = new Bundle();
                 bundle.putString("id", bean.getUserRead().getId());

+ 73 - 0
app/src/main/java/com/edufound/reader/miutil/MiSoundSDKUtil.java

@@ -0,0 +1,73 @@
+package com.edufound.reader.miutil;
+
+import android.app.Activity;
+import android.content.Context;
+import android.content.Intent;
+import android.net.Uri;
+import android.text.TextUtils;
+import android.widget.Toast;
+
+import com.alibaba.ailabs.genie.assistant.sdk.account.UserInfoManager;
+import com.alibaba.ailabs.genie.assistant.sdk.agis.IResponseCallback;
+import com.alibaba.ailabs.genie.authservice.api.AuthProtocolParameters;
+import com.alibaba.ailabs.genie.authservice.api.AuthResponse;
+import com.alibaba.ailabs.genie.authservice.api.IRequestPermissionListener;
+import com.alibaba.ailabs.genie.authservice.api.IRequestPermissions;
+import com.alibaba.genie.waft.gcs.rpc.GenieServiceLoader;
+import com.edufound.reader.activity.LoginAlertActivity;
+import com.edufound.reader.apiserver.OrderApiServerImpl;
+import com.edufound.reader.apiserver.UserApiServerImpl;
+import com.edufound.reader.base.BaseActivity;
+import com.edufound.reader.bean.HttpResultBean;
+import com.edufound.reader.bean.UserBean;
+import com.edufound.reader.tmailsdk.TMailConstants;
+import com.edufound.reader.util.Consts;
+import com.edufound.reader.util.DeviceUuidFactory;
+import com.edufound.reader.util.EfunboxUtil;
+import com.edufound.reader.util.MMKVEncodeKey;
+import com.edufound.reader.util.MMKVUtil;
+import com.google.gson.Gson;
+import com.google.gson.reflect.TypeToken;
+import com.okhttplib.HttpInfo;
+import com.okhttplib.callback.Callback;
+import com.orhanobut.logger.Logger;
+import com.xiaomi.mitv.client.MitvClient;
+import com.xiaomi.mitv.entity.OrderInfoParam;
+import com.xiaomi.mitv.exception.MitvCommonException;
+
+import org.json.JSONArray;
+import org.json.JSONException;
+import org.json.JSONObject;
+
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+public class MiSoundSDKUtil {
+    private static Gson mGson;
+    public static final int MI_SOUND_QRCODE_TYPE = 0x19181;
+    public static final int MI_SOUND_BIND_PHONENUM = 0x19182;
+    public static final int MI_SOUND_SHOW_BINDPHONENUM = 0x19183;
+
+    public static String getShortKey(String json) {
+        Logger.e("json:" + json);
+        if (mGson == null) {
+            mGson = new Gson();
+        }
+        OrderInfoParam orderInfoParam = mGson.fromJson(json, OrderInfoParam.class);
+//        orderInfoParam.setTrxAmount(1l);
+        String result = null;
+        try {
+            result = MitvClient.createShortkey(orderInfoParam, 0, 0, false);
+        } catch (MitvCommonException e) {
+            e.printStackTrace();
+        } catch (UnsupportedEncodingException e) {
+            e.printStackTrace();
+        }
+        Logger.e("result:" + result);
+        return result;
+    }
+}

+ 4 - 1
app/src/main/java/com/edufound/reader/model/TmailPayModel.java

@@ -22,7 +22,10 @@ public class TmailPayModel implements TmailPayContract.Model {
         OkHttpClient.doPostAsync(activity, new HttpInfo.Builder().setUrl(API + "/order/genie/activity").addParamJson(json), callback);
     }
 
-
+    @Override
+    public void MiSoundPay(Activity activity, String json, Callback callback) {
+        OkHttpClient.doPostAsync(activity, new HttpInfo.Builder().setUrl(" http://reader-xiaoai-api.ai160.com/order").addParamJson(json), callback);
+    }
 
 
 //    @Override

+ 67 - 7
app/src/main/java/com/edufound/reader/popwindow/PopWindowUtil.java

@@ -24,6 +24,7 @@ import com.edufound.reader.bean.UserRecordBean;
 import com.edufound.reader.cusview.GridRadioGroup;
 import com.edufound.reader.listener.PopUtilClickListener;
 import com.edufound.reader.listener.PopupRecordStatusListener;
+import com.edufound.reader.miutil.MiSoundSDKUtil;
 import com.edufound.reader.presenter.PopWindowPresneter;
 import com.edufound.reader.util.Consts;
 import com.edufound.reader.util.DeviceUtil;
@@ -38,6 +39,7 @@ import java.util.List;
 import java.util.concurrent.TimeUnit;
 
 import androidx.annotation.Nullable;
+import androidx.constraintlayout.widget.ConstraintLayout;
 
 import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers;
 import io.reactivex.rxjava3.annotations.NonNull;
@@ -367,11 +369,11 @@ public class PopWindowUtil {
             listener.clickSubmit(null);
             return;
         }
-        event_view = (FrameLayout) LayoutInflater.from(context).inflate(R.layout.popupwindow_webs_events, null);
-        event_view.setFocusable(true);
-        ImageView img = event_view.findViewById(R.id.popupwindow_webs_events_img);
+        dialog_view = (FrameLayout) LayoutInflater.from(context).inflate(R.layout.popupwindow_webs_events, null);
+        dialog_view.setFocusable(true);
+        ImageView img = dialog_view.findViewById(R.id.popupwindow_webs_events_img);
         GlideUtils.loadImageSizeKipMemoryCache(context, "http://reader-apk.ai160.com/reader-apk/res/event_img.png", img);
-        ImageView close = event_view.findViewById(R.id.popupwindow_webs_events_close);
+        ImageView close = dialog_view.findViewById(R.id.popupwindow_webs_events_close);
         setClickListener(img, o -> {
             eventPopupWindow.dismiss();
             listener.clickSubmit(null);
@@ -381,20 +383,78 @@ public class PopWindowUtil {
             eventPopupWindow.dismiss();
             listener.clickCancel();
         });
-        eventPopupWindow = new PopupWindow(event_view, FrameLayout.LayoutParams.MATCH_PARENT, FrameLayout.LayoutParams.MATCH_PARENT);
+        eventPopupWindow = new PopupWindow(dialog_view, FrameLayout.LayoutParams.MATCH_PARENT, FrameLayout.LayoutParams.MATCH_PARENT);
         eventPopupWindow.setFocusable(true);
         eventPopupWindow.showAtLocation(parent, Gravity.CENTER, 0, 0);
         eventPopupWindow.setOnDismissListener(new PopupWindow.OnDismissListener() {
             @Override
             public void onDismiss() {
-                event_view.removeAllViews();
-                event_view = null;
+                dialog_view.removeAllViews();
+                dialog_view = null;
                 eventPopupWindow = null;
             }
         });
     }
 
 
+    public static void miSoundLoginWindow(Context context, View parent, int type, PopWindowPresneter.MISoundLoginCallBack callBack) {
+        initPresenter();
+        if (checkWindowShoing()) {
+            mPopupWindow.dismiss();
+            return;
+        }
+        dialog_view = (FrameLayout) LayoutInflater.from(context).inflate(R.layout.popupwindow_mi_sound_qrcode_layout, null);
+        dialog_view.setFocusable(true);
+        dialog_view.setOnKeyListener(new View.OnKeyListener() {
+            @Override
+            public boolean onKey(View v, int keyCode, KeyEvent event) {
+                if (keyCode == KeyEvent.KEYCODE_BACK) {
+                    return true;
+                }
+                return false;
+            }
+        });
+        ConstraintLayout mQRLoginLayout = dialog_view.findViewById(R.id.popupwindow_mi_sound_qrcode_login_layout);
+        mQRLoginLayout.setVisibility(View.GONE);
+        ConstraintLayout mBindPhoneNumLayout = dialog_view.findViewById(R.id.popupwindow_mi_sound_bind_phone_layout);
+        ConstraintLayout mShowBindNumLayout = dialog_view.findViewById(R.id.popupwindow_mi_sound_show_bind_phoneNum_layout);
+
+        mBindPhoneNumLayout.setVisibility(View.GONE);
+
+        switch (type) {
+            case MiSoundSDKUtil.MI_SOUND_QRCODE_TYPE:
+                Logger.e("显示qrcodelayout");
+                mQRLoginLayout.setVisibility(View.VISIBLE);
+                break;
+            case MiSoundSDKUtil.MI_SOUND_BIND_PHONENUM:
+                mBindPhoneNumLayout.setVisibility(View.VISIBLE);
+                break;
+            case MiSoundSDKUtil.MI_SOUND_SHOW_BINDPHONENUM:
+                mShowBindNumLayout.setVisibility(View.VISIBLE);
+                break;
+        }
+
+
+        ImageView close = dialog_view.findViewById(R.id.popupwindow_mi_sound_qrcode_layout_close);
+        setClickListener(close, o -> {
+            mPresenter.getPopHandler().removeMessages(0x1313);
+            mPopupWindow.dismiss();
+        });
+        mPresenter.initMiSoundLoginWindow(context, dialog_view, type, new PopWindowPresneter.MISoundLoginCallBack() {
+            @Override
+            public void success() {
+                Logger.e("popupwindow第一层的callback");
+                if (callBack != null) {
+                    Logger.e("调用传过来的callback的success");
+                    callBack.success();
+                }
+                mPopupWindow.dismiss();
+            }
+        });
+        newPopupWindow(parent, true);
+    }
+
+
     private static void showDeviceInfo(Activity context) {
         StringBuffer buffer = new StringBuffer();
         buffer.append("\tchannel:\t" + "\t" + Consts.getUmengChannel() + "\n");

+ 3 - 3
app/src/main/java/com/edufound/reader/presenter/LoginAlertPresenter.java

@@ -169,7 +169,7 @@ public class LoginAlertPresenter extends BasePresenter<LoginAlertContract.View>
                         Consts.setmConstsUserBean(bean.getData());
                         getYFVip();
                         //检查活动
-                        EfunboxUtil.checkEvents(mView.getActivity(), mView.getRootView(),true);
+                        EfunboxUtil.checkEvents(mView.getActivity(), mView.getRootView(), true);
 
                     }
 
@@ -195,8 +195,8 @@ public class LoginAlertPresenter extends BasePresenter<LoginAlertContract.View>
 
     private void getYFVip() {
 
-        if (Consts.getUmengChannel().equals(ChannelCodeEnum.YIFANG.getChannelCode())) {
-            //义方渠道检查权限
+        if (!Consts.getUmengChannel().equals(ChannelCodeEnum.BAIDU.getChannelCode())) {
+            //不是百度渠道,检查是否是义方VIP
             if (Consts.getmConstsUserBean() != null) {
                 OrderApiServerImpl api = new OrderApiServerImpl();
                 api.getAuth(mView.getActivity(), new Callback() {

+ 6 - 6
app/src/main/java/com/edufound/reader/presenter/MainPresenter.java

@@ -83,7 +83,7 @@ public class MainPresenter extends BasePresenter<MainContract.View> implements M
         switch (id) {
             case R.id.main_left_tab_layout_myinfo:
                 //我的
-                if (EfunboxUtil.checkLogin(mView.getActivity())) {
+                if (EfunboxUtil.checkLogin(mView.getActivity(), mView.getRootView())) {
                     mRadioCheckIndex = 0;
                     mRecommendFragment = null;
                     mFollowFragment = null;
@@ -112,7 +112,7 @@ public class MainPresenter extends BasePresenter<MainContract.View> implements M
                 break;
             case R.id.main_left_tab_layout_follow:
                 //关注
-                if (EfunboxUtil.checkLogin(mView.getActivity())) {
+                if (EfunboxUtil.checkLogin(mView.getActivity(), mView.getRootView())) {
                     mRadioCheckIndex = 2;
                     mUserFragment = null;
                     mCharacterFragment = null;
@@ -170,7 +170,7 @@ public class MainPresenter extends BasePresenter<MainContract.View> implements M
     public void checkModelIsDebug() {
         if (Consts.isIsDebug()) {
             TextView tv = new TextView(mView.getActivity());
-            tv.setLayoutParams(new FrameLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, SizeUtils.px2dp(mView.getActivity(), 100)));
+            tv.setLayoutParams(new FrameLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT));
             tv.setTextSize(SizeUtils.px2dp(mView.getActivity(), 30));
             tv.setTextColor(Color.RED);
             tv.setBackgroundColor(mView.getActivity().getResources().getColor(R.color.translucent_background));
@@ -283,7 +283,7 @@ public class MainPresenter extends BasePresenter<MainContract.View> implements M
                                             @Override
                                             public void clickSubmit(Object object) {
                                                 //点击进行登录逻辑
-                                                EfunboxUtil.checkLogin(mView.getActivity());
+                                                EfunboxUtil.checkLogin(mView.getActivity(), mView.getRootView());
                                             }
                                         });
                                     } else {
@@ -322,8 +322,8 @@ public class MainPresenter extends BasePresenter<MainContract.View> implements M
 
     private void getYFVip() {
 
-        if (Consts.getUmengChannel().equals(ChannelCodeEnum.YIFANG.getChannelCode()) || Consts.getUmengChannel().equals(ChannelCodeEnum.TMAIL.getChannelCode())) {
-            //义方渠道检查权限
+        if (!Consts.getUmengChannel().equals(ChannelCodeEnum.BAIDU.getChannelCode())) {
+            //不是百度渠道,检查是否是义方VIP
             if (Consts.getmConstsUserBean() != null) {
                 mOrderApi.getAuth(mView.getActivity(), new Callback() {
                     @Override

+ 1 - 1
app/src/main/java/com/edufound/reader/presenter/MyTabFragmentPresenter.java

@@ -281,6 +281,7 @@ public class MyTabFragmentPresenter extends BasePresenter<MyTabFragmentContract.
 
     @Override
     public void getMyRecords() {
+        Logger.e("获取我的朗读列表");
         mModel.getMyRecords(mView.getActivity(), new Callback() {
             @Override
             public void onSuccess(HttpInfo info) throws IOException {
@@ -422,7 +423,6 @@ public class MyTabFragmentPresenter extends BasePresenter<MyTabFragmentContract.
 
     @Override
     public void fragmentResume() {
-        Logger.e("Consts.getUmengChannel():" + Consts.getUmengChannel());
         if (Consts.getUmengChannel().equals(ChannelCodeEnum.BAIDU.getChannelCode())) {
             if (Consts.getmConstsBaiDuUserBean() == null) {
                 return;

+ 0 - 41
app/src/main/java/com/edufound/reader/presenter/PayPresenter.java

@@ -153,47 +153,6 @@ public class PayPresenter extends BasePresenter<PayContract.View> implements Pay
 
                 }
             });
-//            if (createOrderMap == null) {
-//                createOrderMap = new HashMap<>();
-//            }
-//            createOrderMap.put("channel", Consts.getUmengChannel());
-//            createOrderMap.put("productId", mPayResult.get(position).getId());
-//            createOrderMap.put("first", "false");
-//            mOrderApi.createdOrder(mView.getActivity(), ((BaseActivity) mView.getActivity()).getGson().toJson(createOrderMap), new Callback() {
-//                @Override
-//                public void onSuccess(HttpInfo info) throws IOException {
-//                    HttpResultBean<PayResultBean> bean = info.getRetDetail(new TypeToken<HttpResultBean<PayResultBean>>() {
-//                    }.getType());
-//
-//////                    BotSdk.getInstance().requireCharge(BotRegisterListener.mockAmountInfo(String.valueOf(Double.parseDouble(bean.getData().getPrice()) / 100)),
-//////                            BotRegisterListener.mockSellerOlrderStructure(bean.getData().getProductId(), "123123123", bean.getData().getOrderId(), bean.getData().getTitle()),
-//////                            bean.getData().getTitle());
-////                    BotRegisterListener.requestBuyProduct();
-//                    mModel.getPayQRCode(mView.getActivity(), bean.getData().getProductId(), bean.getData().getOrderId(), new Callback() {
-//                        @Override
-//                        public void onSuccess(HttpInfo info) throws IOException {
-//                            Logger.e("info.getD:" + info.getRetDetail());
-//                            handler.removeMessages(2);
-//                            HttpResultBean<String> bean = info.getRetDetail(new TypeToken<HttpResultBean<String>>() {
-//                            }.getType());
-//                            mView.setQRCode(bean.getData().toString());
-//                            isPaySuccess();
-//                        }
-//
-//                        @Override
-//                        public void onFailure(HttpInfo info) throws IOException {
-//
-//                        }
-//                    });
-//                    nowOrderId = bean.getData().getOrderId();
-//
-//                }
-//
-//                @Override
-//                public void onFailure(HttpInfo info) throws IOException {
-//
-//                }
-//            });
 
         });
         itemFrame.addView(view);

+ 282 - 7
app/src/main/java/com/edufound/reader/presenter/PopWindowPresneter.java

@@ -6,48 +6,63 @@ import android.content.Intent;
 import android.graphics.Rect;
 import android.os.Handler;
 import android.os.Message;
+import android.text.TextUtils;
 import android.view.View;
 import android.view.ViewGroup;
+import android.view.inputmethod.InputMethodManager;
+import android.widget.EditText;
 import android.widget.FrameLayout;
 import android.widget.ImageView;
 import android.widget.LinearLayout;
 import android.widget.TextView;
+import android.widget.Toast;
+
+import androidx.annotation.NonNull;
+import androidx.recyclerview.widget.LinearLayoutManager;
+import androidx.recyclerview.widget.RecyclerView;
 
 import com.edufound.reader.R;
 import com.edufound.reader.activity.MainActivity;
 import com.edufound.reader.adapter.PopupMyOrderAdapter;
+import com.edufound.reader.apiserver.OrderApiServerImpl;
 import com.edufound.reader.apiserver.UserApiServerImpl;
 import com.edufound.reader.application.EApplication;
+import com.edufound.reader.bean.ChannelCodeEnum;
 import com.edufound.reader.bean.HttpResultBean;
-import com.edufound.reader.bean.HttpResultDataListBean;
 import com.edufound.reader.bean.MyInfoBean;
 import com.edufound.reader.bean.MyOrderListBean;
 import com.edufound.reader.bean.RecordResultBean;
+import com.edufound.reader.bean.SignBean;
+import com.edufound.reader.bean.UserBean;
 import com.edufound.reader.bean.UserEventEnum;
 import com.edufound.reader.bean.UserRecordBean;
+import com.edufound.reader.cusview.CusToast;
 import com.edufound.reader.listener.PopupRecordStatusListener;
+import com.edufound.reader.miutil.MiSoundSDKUtil;
 import com.edufound.reader.model.PopWindowModelImpl;
 import com.edufound.reader.popwindow.PopWindowUtil;
 import com.edufound.reader.util.Consts;
+import com.edufound.reader.util.DeviceUuidFactory;
+import com.edufound.reader.util.EfunboxUtil;
+import com.edufound.reader.util.GlideUtils;
 import com.edufound.reader.util.OkHttpClient;
 import com.edufound.reader.util.QRCodeUtil;
 import com.edufound.reader.util.SizeUtils;
 import com.google.gson.Gson;
 import com.google.gson.reflect.TypeToken;
+import com.jakewharton.rxbinding4.view.RxView;
 import com.okhttplib.HttpInfo;
 import com.okhttplib.callback.Callback;
 import com.okhttplib.callback.ProgressCallback;
 import com.orhanobut.logger.Logger;
 
+import org.json.JSONObject;
+
 import java.io.IOException;
-import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
-
-import androidx.annotation.NonNull;
-import androidx.recyclerview.widget.LinearLayoutManager;
-import androidx.recyclerview.widget.RecyclerView;
+import java.util.concurrent.TimeUnit;
 
 public class PopWindowPresneter {
 
@@ -56,9 +71,11 @@ public class PopWindowPresneter {
     Gson mGson;
     UserApiServerImpl userApi;
     Activity mActivity;
+    OrderApiServerImpl mOrderApi;
 
     public PopWindowPresneter() {
         userApi = new UserApiServerImpl();
+        mOrderApi = new OrderApiServerImpl();
         mModel = new PopWindowModelImpl();
         mGson = new Gson();
     }
@@ -392,6 +409,159 @@ public class PopWindowPresneter {
         handler.sendMessageDelayed(message, 3000);
     }
 
+
+    boolean loginSuccess = false;
+    MISoundLoginCallBack miSoundLoginCallback;
+    int mVCodeCount = 60;
+    TextView getVCodeTimeText;
+
+    public void initMiSoundLoginWindow(Context context, View dialog_view, int type, MISoundLoginCallBack callBack) {
+        miSoundLoginCallback = callBack;
+        switch (type) {
+            case MiSoundSDKUtil.MI_SOUND_QRCODE_TYPE:
+                ImageView qrcode = dialog_view.findViewById(R.id.popupwindow_mi_sound_qrcode);
+                userApi.getLoginQRCode(new Callback() {
+                    @Override
+                    public void onSuccess(HttpInfo info) throws IOException {
+                        Logger.e("info:" + info.getRetDetail());
+                        HttpResultBean<String> bean = info.getRetDetail(new TypeToken<HttpResultBean<String>>() {
+                        }.getType());
+                        Logger.e("bean.getData:" + bean.getData());
+                        if (bean.getCode().equals("200") && bean.getSuccess()) {
+                            Logger.e("加载二维码");
+                            GlideUtils.loadImageSizeKipMemoryCache(context, bean.getData(), qrcode);
+                            loginSuccess = false;
+                            handler.sendEmptyMessageDelayed(0x1313, 1000);
+                        } else {
+                            Logger.e("加载二维码失败");
+                        }
+
+                    }
+
+                    @Override
+                    public void onFailure(HttpInfo info) throws IOException {
+                        Logger.e("获取登录二维码失败");
+                    }
+                });
+
+                break;
+            case MiSoundSDKUtil.MI_SOUND_BIND_PHONENUM: {
+                EditText bindPhoneNumEdit = dialog_view.findViewById(R.id.popupwindow_mi_sound_bind_phone_num_edit);
+                EditText bindPhoneNumGetVCode = dialog_view.findViewById(R.id.popupwindow_mi_sound_bind_phone_vcode_edit);
+                getVCodeTimeText = dialog_view.findViewById(R.id.popupwindow_mi_sound_bind_phone_getvcode_text);
+                FrameLayout mBindSubmit = dialog_view.findViewById(R.id.popupwindow_mi_sound_bind_phone_num_submit);
+                TextView mErrorText = dialog_view.findViewById(R.id.popupwindow_mi_sound_bind_phone_error_text);
+                mErrorText.setVisibility(View.GONE);
+
+//            {
+//                //测试
+//                bindPhoneNumEdit.setText("18611822573");
+//                bindPhoneNumGetVCode.setText("9999");
+//            }
+
+                RxView.focusChanges(bindPhoneNumEdit).subscribe(hasFocus -> {
+                    if (!hasFocus) {
+                        hideSoftInput(bindPhoneNumEdit);
+                    }
+                });
+                RxView.focusChanges(bindPhoneNumGetVCode).subscribe(hasFocus -> {
+                    if (!hasFocus) {
+                        hideSoftInput(bindPhoneNumGetVCode);
+                    }
+                });
+                //获取验证码
+                RxView.clicks(getVCodeTimeText).throttleFirst(2, TimeUnit.SECONDS).subscribe(o -> {
+                    String mobile = bindPhoneNumEdit.getText().toString().trim();
+                    if (!EfunboxUtil.isMobileNO(mobile)) {
+                        //弹不出来
+//                        CusToast.getInstance(context).show("请输入正确的手机号", 1000);
+                        mErrorText.setText("请输入正确的手机号");
+                        mErrorText.setVisibility(View.VISIBLE);
+                        return;
+                    }
+                    OkHttpClient.doGetAsync(HttpInfo.Builder().setUrl(Consts.getFinalApi() + "/user/verifyCode").addParam("mobileNo", mobile), new Callback() {
+                        @Override
+                        public void onSuccess(HttpInfo info) throws IOException {
+                            getVCodeTimeText.setText(String.valueOf(mVCodeCount));
+                            getVCodeTimeText.setEnabled(false);
+                            getVCodeTimeText.setClickable(false);
+                            handler.sendEmptyMessageDelayed(0x1314, 1000);
+
+                        }
+
+                        @Override
+                        public void onFailure(HttpInfo info) throws IOException {
+                            //弹不出来
+//                            CusToast.getInstance(Consts.getmApplicAtion()).show("获取验证码失败", 1000);
+                            mErrorText.setText("获取验证码失败:" + info.getRetDetail());
+                            mErrorText.setVisibility(View.VISIBLE);
+                            getVCodeTimeText.setEnabled(true);
+                            getVCodeTimeText.setClickable(true);
+
+                        }
+                    });
+
+                });
+                //提交绑定手机号
+                RxView.clicks(mBindSubmit).throttleFirst(2, TimeUnit.SECONDS).subscribe(o -> {
+                    String mobile = bindPhoneNumEdit.getText().toString().trim();
+                    if (!EfunboxUtil.isMobileNO(mobile)) {
+//                        CusToast.getInstance(context).show("请输入正确的手机号", 1000);
+                        mErrorText.setText("请输入正确的手机号");
+                        mErrorText.setVisibility(View.VISIBLE);
+                        return;
+                    }
+                    userApi.bindPhoneNum(mobile, new Callback() {
+                        @Override
+                        public void onSuccess(HttpInfo info) throws IOException {
+                            HttpResultBean<UserBean> bean = info.getRetDetail(new TypeToken<HttpResultBean<UserBean>>() {
+                            }.getType());
+                            Logger.e("绑定手机号:" + info.getRetDetail());
+                            if (bean.getCode().equals("200")) {
+                                if (bean.getSuccess()) {
+                                    Logger.e("绑定手机号成功:" + info.getRetDetail());
+                                    Consts.setmConstsUserBean(bean.getData());
+                                    Toast.makeText(context, "绑定手机号成功", Toast.LENGTH_LONG).show();
+                                    mErrorText.setText("绑定手机号成功");
+                                    mErrorText.setVisibility(View.VISIBLE);
+                                    miSoundLoginCallback.success();
+
+                                }
+                            } else if (bean.getCode().equals("706")) {
+                                mErrorText.setText("绑定手机号失败:" + bean.getMessage());
+                                mErrorText.setVisibility(View.VISIBLE);
+                            }
+
+                        }
+
+                        @Override
+                        public void onFailure(HttpInfo info) throws IOException {
+                            Logger.e("绑定手机号失败:" + info.getRetDetail());
+                            mErrorText.setText("绑定手机号失败:" + info.getRetDetail());
+                            mErrorText.setVisibility(View.VISIBLE);
+                        }
+                    });
+
+                });
+            }
+            break;
+            case MiSoundSDKUtil.MI_SOUND_SHOW_BINDPHONENUM: {
+                TextView tv = dialog_view.findViewById(R.id.popupwindow_mi_sound_show_bind_phoneNum_layout_phoneNum);
+                tv.setText("手机号码 :" + Consts.getmConstsUserBean().getMobile());
+            }
+            break;
+        }
+
+
+    }
+
+    private void hideSoftInput(View view) {
+        InputMethodManager manager = ((InputMethodManager) Consts.getmApplicAtion().getSystemService(Context.INPUT_METHOD_SERVICE));
+        if (manager != null) {
+            manager.hideSoftInputFromWindow(view.getWindowToken(), 0);
+        }
+    }
+
     public Handler getPopHandler() {
         return handler;
     }
@@ -407,11 +577,114 @@ public class PopWindowPresneter {
                 case 0x1312:
                     getMyInfo(mActivity, (TextView) message.obj);
                     break;
+                case 0x1313:
+                    //小米绑定手机号轮询查询用户逻辑
+                    if (loginSuccess) {
+                        handler.removeMessages(0x1313);
+                        return true;
+                    }
+                    userApi.MiSoundIsLogin(DeviceUuidFactory.getUuid(), new Callback() {
+                        @Override
+                        public void onSuccess(HttpInfo info) throws IOException {
+
+                            try {
+                                JSONObject object = new JSONObject(info.getRetDetail());
+                                if (object.getString("code").equals("300") || object.getInt("code") == 300) {
+                                    //暂无数据
+                                    Logger.e("暂无数据");
+                                    handler.sendEmptyMessageDelayed(0x1313, 1000);
+                                    return;
+                                } else {
+                                    Logger.e("info.getR:" + info.getRetDetail());
+                                    handler.removeMessages(0x1313);
+                                    loginSuccess = true;
+                                    HttpResultBean<UserBean> bean = info.getRetDetail(new TypeToken<HttpResultBean<UserBean>>() {
+                                    }.getType());
+                                    Consts.setUID(bean.getData().getUid());
+                                    //用户是否登录,登录了,创建Consts的userbean
+                                    Consts.setmConstsUserBean(bean.getData());
+                                    userApi.loginSign(null, new Callback() {
+                                        @Override
+                                        public void onSuccess(HttpInfo info) throws IOException {
+                                            try {
+                                                HttpResultBean<SignBean> bean = info.getRetDetail(new TypeToken<HttpResultBean<SignBean>>() {
+                                                }.getType());
+                                                if (bean.getData().getIsSign()) {
+                                                    CusToast.getInstance(Consts.getmApplicAtion()).show("恭喜签到成功\n奖励" + bean.getData().getCount() + "朵小红花", 2000);
+                                                }
+                                            } catch (Exception e) {
+                                                e.printStackTrace();
+                                            } finally {
+                                                miSoundLoginCallback.success();
+                                                if (Consts.getUmengChannel().equals(ChannelCodeEnum.YIFANG.getChannelCode()) ||
+                                                        Consts.getUmengChannel().equals(ChannelCodeEnum.TMAIL.getChannelCode()) ||
+                                                        Consts.getUmengChannel().equals(ChannelCodeEnum.MISOUND.getChannelCode())
+                                                ) {
+                                                    //义方渠道检查权限
+                                                    if (Consts.getmConstsUserBean() != null) {
+                                                        mOrderApi.getAuth(new Callback() {
+                                                            @Override
+                                                            public void onSuccess(HttpInfo info) throws IOException {
+                                                                HttpResultBean<String> bean = info.getRetDetail(new TypeToken<HttpResultBean<String>>() {
+                                                                }.getType());
+                                                                if (!TextUtils.isEmpty(bean.getData())) {
+                                                                    Consts.setIsYFVip(true);
+                                                                }
+                                                            }
+
+                                                            @Override
+                                                            public void onFailure(HttpInfo info) throws IOException {
+
+                                                            }
+                                                        });
+                                                    }
+                                                }
+                                            }
+
+                                        }
+
+                                        @Override
+                                        public void onFailure(HttpInfo info) throws IOException {
+                                            Logger.e("info:" + info.getRetDetail());
+                                        }
+                                    });
+                                }
+                            } catch (Exception e) {
+                                e.printStackTrace();
+                            } finally {
+                            }
+                        }
+
+                        @Override
+                        public void onFailure(HttpInfo info) throws IOException {
+                            Logger.e("misound_login_error_info.get:" + info.getRetDetail());
+                        }
+                    });
+                    break;
+                case 0x1314:
+                    //小米绑定手机号倒计时逻辑
+                    if (mVCodeCount == 0) {
+                        mVCodeCount = 60;
+                        handler.removeMessages(0x1314);
+                        getVCodeTimeText.setEnabled(true);
+                        getVCodeTimeText.setClickable(true);
+                        getVCodeTimeText.setText("获取验证码");
+                        return true;
+                    } else {
+                        mVCodeCount--;
+                        getVCodeTimeText.setText(String.valueOf(mVCodeCount));
+                        handler.sendEmptyMessageDelayed(0x1314, 1000);
+                    }
+                    break;
 
             }
             return false;
         }
     });
+
+    public interface MISoundLoginCallBack {
+        void success();
+    }
 }
 
 class OrderSpacesItemDecoration extends RecyclerView.ItemDecoration {
@@ -438,4 +711,6 @@ class OrderSpacesItemDecoration extends RecyclerView.ItemDecoration {
             outRect.bottom = space * 10;
         }
     }
-}
+}
+
+

+ 91 - 23
app/src/main/java/com/edufound/reader/presenter/TmailPayPresenter.java

@@ -19,17 +19,25 @@ import androidx.annotation.NonNull;
 import androidx.constraintlayout.widget.ConstraintLayout;
 
 import com.edufound.reader.R;
+import com.edufound.reader.activity.TmailPayActivity;
 import com.edufound.reader.apiserver.OrderApiServerImpl;
 import com.edufound.reader.base.BaseActivity;
 import com.edufound.reader.base.BasePresenter;
+import com.edufound.reader.bean.ChannelCodeEnum;
 import com.edufound.reader.bean.HttpResultBean;
 import com.edufound.reader.bean.PayResultBean;
 import com.edufound.reader.contract.TmailPayContract;
+import com.edufound.reader.miutil.MiSoundSDKUtil;
 import com.edufound.reader.model.PayModel;
 import com.edufound.reader.model.TmailPayModel;
 import com.edufound.reader.tmailsdk.TMailSDKUtil;
 import com.edufound.reader.util.Consts;
+import com.edufound.reader.util.DeviceUtil;
+import com.edufound.reader.util.DeviceUuidFactory;
 import com.edufound.reader.util.GlideUtils;
+import com.edufound.reader.util.QRCodeUtil;
+import com.edufound.reader.util.SizeUtils;
+import com.google.gson.Gson;
 import com.google.gson.reflect.TypeToken;
 import com.okhttplib.HttpInfo;
 import com.okhttplib.callback.Callback;
@@ -142,9 +150,6 @@ public class TmailPayPresenter extends BasePresenter<TmailPayContract.View> impl
         holder.mTitle.setText(mPayResult.get(position).getTitle());
         holder.mPayMoney.setText(String.valueOf(Double.parseDouble(mPayResult.get(position).getPrice()) / 100));
         holder.mRecommend.setVisibility(View.VISIBLE);
-        double a = (Double.parseDouble(mPayResult.get(position).getOriginPrice()) / 100);
-        double b = (Double.parseDouble(mPayResult.get(position).getPrice()) / 100);
-        holder.mOriginPrice.setText("原价:" + a);
         if (mPayResult.get(position).getPayType().equals("YEAR")) {
             holder.mConstraintLayoutBg.setBackgroundResource(R.drawable.activity_pay_tmail_item_year);
         } else if (mPayResult.get(position).getPayType().equals("MONTH")) {
@@ -164,29 +169,92 @@ public class TmailPayPresenter extends BasePresenter<TmailPayContract.View> impl
             params.put("payType", mPayResult.get(position).getPayType());
             params.put("uid", Consts.getmConstsUserBean().getUid());
             params.put("first", "false");
-            mModel.TMailPayGenie(mView.getActivity(), ((BaseActivity) mView.getActivity()).getGson().toJson(params), new Callback() {
-                @Override
-                public void onSuccess(HttpInfo info) throws IOException {
-                    Logger.e("创建订单返回信息成功:" + info.getRetDetail());
-                    Logger.e("创建订单返回信息成功:getParamJson-" + info.getParamJson());
-                    try {
-                        JSONObject object = new JSONObject(info.getRetDetail());
-                        JSONObject json = object.getJSONObject("data");
-                        Logger.e("json:" + json);
-                        TMailSDKUtil.tmailPay(mView.getActivity(), json.toString());
-                    } catch (JSONException e) {
-                        e.printStackTrace();
+            if (Consts.getUmengChannel().equals(ChannelCodeEnum.TMAIL.getChannelCode())) {
+                //去天猫支付
+                mModel.TMailPayGenie(mView.getActivity(), ((BaseActivity) mView.getActivity()).getGson().toJson(params), new Callback() {
+                    @Override
+                    public void onSuccess(HttpInfo info) throws IOException {
+                        Logger.e("创建订单返回信息成功:" + info.getRetDetail());
+                        Logger.e("创建订单返回信息成功:getParamJson-" + info.getParamJson());
+                        try {
+                            JSONObject object = new JSONObject(info.getRetDetail());
+                            JSONObject json = object.getJSONObject("data");
+                            Logger.e("json:" + json);
+                            TMailSDKUtil.tmailPay(mView.getActivity(), json.toString());
+                        } catch (JSONException e) {
+                            e.printStackTrace();
+                        }
+
+                    }
+
+                    @Override
+                    public void onFailure(HttpInfo info) throws IOException {
+                        Logger.e("创建订单返回信息失败:" + info.getRetDetail());
+                        Logger.e("创建订单返回信息成功:getParamJson-" + info.getParamJson());
+                        Toast.makeText(mView.getActivity(), "创建订单失败", Toast.LENGTH_SHORT).show();
+                    }
+                });
+            } else if (Consts.getUmengChannel().equals(ChannelCodeEnum.MISOUND.getChannelCode())) {
+                //小米支付
+                //获取shortkey
+                Logger.e("小米支付");
+                mModel.MiSoundPay(mView.getActivity(), ((BaseActivity) mView.getActivity()).getGson().toJson(params), new Callback() {
+                    @Override
+                    public void onSuccess(HttpInfo info) throws IOException {
+                        try {
+                            JSONObject object = new JSONObject(info.getRetDetail());
+                            JSONObject json = object.getJSONObject("data");
+                            String orderId = json.getString("orderId");
+                            String price = json.getString("price");
+                            String orderDesc = json.getString("title");
+
+                            Map<String, String> getShortKeyJsonMap = new HashMap<>();
+                            getShortKeyJsonMap.put("country", "CN");
+                            getShortKeyJsonMap.put("deviceID", DeviceUuidFactory.getUuid().toString());
+                            getShortKeyJsonMap.put("language", "zh");
+                            getShortKeyJsonMap.put("platform", "13201");
+                            getShortKeyJsonMap.put("sdk_version", String.valueOf(android.os.Build.VERSION.SDK_INT));
+                            getShortKeyJsonMap.put("codever", "3");
+                            getShortKeyJsonMap.put("biz", "136");
+                            getShortKeyJsonMap.put("mac", DeviceUtil.getLocalMacAddressFromIp(mView.getActivity()));
+                            getShortKeyJsonMap.put("appId", "2882303761519930481");
+                            getShortKeyJsonMap.put("customerOrderId", orderId);
+                            getShortKeyJsonMap.put("trxAmount", price);
+                            getShortKeyJsonMap.put("orderDesc", orderDesc);
+                            getShortKeyJsonMap.put("bizChannel", "MI_SOUND");
+                            getShortKeyJsonMap.put("rid", "1");
+
+                            new Thread() {
+                                @Override
+                                public void run() {
+                                    try {
+                                        String shortKeyJson = new Gson().toJson(getShortKeyJsonMap);
+                                        JSONObject resultObject = new JSONObject(MiSoundSDKUtil.getShortKey(shortKeyJson));
+                                        JSONObject shortKeyObject = new JSONObject(resultObject.getString("data"));
+                                        String shortKey = shortKeyObject.getString("shortKey");
+                                        String url = "https://h5.tv.mi.com/store/thirdparty/pricetag/shortkey/" + shortKey;
+                                        mView.MiSoundPayUrlSuccess(url);
+                                    } catch (Exception e) {
+                                        e.printStackTrace();
+                                    }
+
+                                }
+                            }.start();
+                        } catch (JSONException e) {
+                            e.printStackTrace();
+                        }
+
                     }
 
-                }
+                    @Override
+                    public void onFailure(HttpInfo info) throws IOException {
+                        Logger.e("创建订单返回信息失败:" + info.getRetDetail());
+                        Logger.e("创建订单返回信息成功:getParamJson-" + info.getParamJson());
+                        Toast.makeText(mView.getActivity(), "创建订单失败", Toast.LENGTH_SHORT).show();
+                    }
+                });
 
-                @Override
-                public void onFailure(HttpInfo info) throws IOException {
-                    Logger.e("创建订单返回信息失败:" + info.getRetDetail());
-                    Logger.e("创建订单返回信息成功:getParamJson-" + info.getParamJson());
-                    Toast.makeText(mView.getActivity(), "创建订单失败", Toast.LENGTH_SHORT).show();
-                }
-            });
+            }
 
 
         });

+ 0 - 1
app/src/main/java/com/edufound/reader/presenter/UserInfoSettingPresenter.java

@@ -68,7 +68,6 @@ public class UserInfoSettingPresenter extends BasePresenter<UserInfoSettingContr
 
     @Override
     public void upadteMyInfo(UserBean bean) {
-        Logger.e("jjjjjson:" + ((BaseActivity) mView.getActivity()).getGson().toJson(bean));
         mModel.updateMyInfo(mView.getActivity(), ((BaseActivity) mView.getActivity()).getGson().toJson(bean), new Callback() {
             @Override
             public void onSuccess(HttpInfo info) throws IOException {

+ 96 - 2
app/src/main/java/com/edufound/reader/util/DeviceUtil.java

@@ -7,8 +7,15 @@ import android.content.pm.PackageManager;
 import android.os.Build;
 import android.util.DisplayMetrics;
 
+import com.orhanobut.logger.Logger;
+
 import java.io.UnsupportedEncodingException;
+import java.lang.reflect.Method;
+import java.net.InetAddress;
+import java.net.NetworkInterface;
+import java.net.SocketException;
 import java.security.MessageDigest;
+import java.util.Enumeration;
 import java.util.Locale;
 
 public class DeviceUtil {
@@ -18,14 +25,33 @@ public class DeviceUtil {
 
     /**
      * @return 序列号 SerialNumber
-     * @author zhangmengjie
      */
-    public String SerialNumber() {
+    public static String SerialNumber() {
 
         return Build.SERIAL;
     }
 
 
+    public static String getSerialNumber() {
+        String serial = null;
+        try {
+            if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) { // 9.0 +
+                serial = Build.getSerial();
+            } else if (Build.VERSION.SDK_INT > Build.VERSION_CODES.N) { // 8.0 +
+                serial = Build.SERIAL;
+            } else { // 8.0 -
+                Class<?> c = Class.forName("android.os.SystemProperties");
+                Method get = c.getMethod("get", String.class);
+                serial = (String) get.invoke(c, "ro.serialno");
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+            Logger.e("获取设备序列号失败");
+        }
+        return serial;
+    }
+
+
     public static int getWidth(Activity context) {
         context.getWindowManager().getDefaultDisplay().getMetrics(metric);
         return metric.widthPixels; // 屏幕宽度(像素)
@@ -168,4 +194,72 @@ public class DeviceUtil {
 //        return null;
 //    }
 
+
+    /**
+     * 获取mac地址
+     */
+    // 有线ip得mac
+    public static String getLocalMacAddressFromIp(Context context) {
+        String mac_s = "";
+        String macAddress = "";
+        try {
+            byte[] mac;
+            NetworkInterface ne = NetworkInterface.getByInetAddress(InetAddress
+                    .getByName(getLocalIpAddress()));
+            mac = ne.getHardwareAddress();
+            mac_s = bytes2hex02(mac);
+
+            macAddress = mac_s.substring(0, 2) + ":" + mac_s.substring(2, 4) + ":"
+                    + mac_s.substring(4, 6) + ":" + mac_s.substring(6, 8) + ":"
+                    + mac_s.substring(8, 10) + ":" + mac_s.substring(10, 12);
+            return macAddress;
+
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+
+        return macAddress;
+
+    }
+
+    /**
+     * 二进制转十六进制
+     *
+     * @param
+     * @return
+     */
+    private static String bytes2hex02(byte[] bytes) {
+        StringBuilder sb = new StringBuilder();
+        String tmp = null;
+        for (byte b : bytes) {
+            // 将每个字节与0xFF进行与运算,然后转化为10进制,然后借助于Integer再转化为16进制
+            tmp = Integer.toHexString(0xFF & b);
+            if (tmp.length() == 1)// 每个字节8为,转为16进制标志,2个16进制位
+            {
+                tmp = "0" + tmp;
+            }
+            sb.append(tmp);
+        }
+
+        return sb.toString();
+
+    }
+
+    // 获得ip地址
+    public static String getLocalIpAddress() {
+        try {
+            for (Enumeration en = NetworkInterface.getNetworkInterfaces(); en.hasMoreElements(); ) {
+                NetworkInterface intf = (NetworkInterface) en.nextElement();
+                for (Enumeration enumIpAddr = intf.getInetAddresses(); enumIpAddr.hasMoreElements(); ) {
+                    InetAddress inetAddress = (InetAddress) enumIpAddr.nextElement();
+                    if (!inetAddress.isLoopbackAddress()) {
+                        return inetAddress.getHostAddress().toString();
+                    }
+                }
+            }
+        } catch (SocketException ex) {
+            ex.printStackTrace();
+        }
+        return null;
+    }
 }

+ 16 - 3
app/src/main/java/com/edufound/reader/util/EfunboxUtil.java

@@ -17,6 +17,7 @@ import com.edufound.reader.bean.ChannelCodeEnum;
 import com.edufound.reader.bean.HttpResultBean;
 import com.edufound.reader.botsdk.BotRegisterListener;
 import com.edufound.reader.listener.PopUtilClickListener;
+import com.edufound.reader.miutil.MiSoundSDKUtil;
 import com.edufound.reader.popwindow.PopWindowUtil;
 import com.edufound.reader.receiver.ShowPageLoadingReceiver;
 import com.edufound.reader.tmailsdk.TMailSDKUtil;
@@ -142,12 +143,12 @@ public class EfunboxUtil {
     }
 
 
-    public static boolean checkLogin(Context context) {
+    public static boolean checkLogin(Context context, View parent) {
         if (!Consts.getUID().equals(Consts.getDefaultUid())) {
             //已登录,无论登不登录都调用登录...
             return true;
         }
-        userLogin(context);
+        userLogin(context, parent);
         return false;
     }
 
@@ -163,7 +164,7 @@ public class EfunboxUtil {
         return false;
     }
 
-    public static void userLogin(Context context) {
+    public static void userLogin(Context context, View parent) {
         Logger.e("调用登录方法--Consts.getUmengChannel():" + Consts.getUmengChannel());
         if (Consts.getUmengChannel().equals(ChannelCodeEnum.BAIDU.getChannelCode())) {
             //百度渠道调用百度的授权
@@ -174,6 +175,11 @@ public class EfunboxUtil {
             context.startActivity(tologin);
         } else if (Consts.getUmengChannel().equals(ChannelCodeEnum.TMAIL.getChannelCode())) {
             TMailSDKUtil.TMailLogin(context);
+        } else if (Consts.getUmengChannel().equals(ChannelCodeEnum.MISOUND.getChannelCode())) {
+            //小米音响--
+//            Intent tologin = new Intent(context, LoginAlertActivity.class);
+//            context.startActivity(tologin);
+            PopWindowUtil.miSoundLoginWindow(context, parent, MiSoundSDKUtil.MI_SOUND_QRCODE_TYPE, null);
         }
     }
 
@@ -187,8 +193,15 @@ public class EfunboxUtil {
             Intent topay = new Intent(activity, PayActivity.class);
             activity.startActivity(topay);
         } else if (Consts.getUmengChannel().equals(ChannelCodeEnum.TMAIL.getChannelCode())) {
+            //去天猫支付界面
             Intent topay = new Intent(activity, TmailPayActivity.class);
             activity.startActivity(topay);
+        } else if (Consts.getUmengChannel().equals(ChannelCodeEnum.MISOUND.getChannelCode())) {
+            //小米支付
+//            Intent topay = new Intent(activity, TmailPayActivity.class);
+//            activity.startActivity(topay);
+            Intent topay = new Intent(activity, PayActivity.class);
+            activity.startActivity(topay);
         }
     }
 

+ 9 - 0
app/src/main/java/com/edufound/reader/util/PermissionsUtil.java

@@ -10,6 +10,7 @@ import androidx.core.app.ActivityCompat;
 
 public class PermissionsUtil {
     public static int GET_RECODE_AUDIO = 1;
+    public static int GET_READ_PHONE_STATE = 2;
     private static String[] PERMISSION_AUDIO = new String[]{Manifest.permission.RECORD_AUDIO};
 
     public static void verifyAudioPermissions(Activity activity) {
@@ -20,4 +21,12 @@ public class PermissionsUtil {
             ActivityCompat.requestPermissions(activity, PERMISSION_AUDIO, GET_RECODE_AUDIO);
         }
     }
+
+    public static void readPhoneStatePermissions(Activity activity) {
+        String[] permissions = new String[]{Manifest.permission.READ_PHONE_STATE, Manifest.permission.READ_PRECISE_PHONE_STATE};
+        int permission = ActivityCompat.checkSelfPermission(activity, Manifest.permission.RECORD_AUDIO);
+        if (permission != PackageManager.PERMISSION_GRANTED) {
+            ActivityCompat.requestPermissions(activity, permissions, GET_READ_PHONE_STATE);
+        }
+    }
 }

BIN
app/src/main/res/drawable/bind_phone_num.png


BIN
app/src/main/res/drawable/mi_sound_close.png


BIN
app/src/main/res/drawable/mi_sound_login_bg.png


BIN
app/src/main/res/drawable/mi_sound_login_qrcode_bg.png


+ 26 - 0
app/src/main/res/layout/activity_pay_tmail.xml

@@ -78,6 +78,32 @@
             </LinearLayout>
         </FrameLayout>
 
+
+        <FrameLayout
+            android:id="@+id/activity_pay_qrcode_layout"
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:background="@color/translucent_background"
+            android:visibility="gone">
+
+
+            <ImageView
+                android:id="@+id/activity_pay_qrcode"
+                android:layout_width="300dp"
+                android:layout_height="300dp"
+                android:layout_gravity="center"
+                android:layout_marginTop="30dp"
+                android:background="@color/red"></ImageView>
+
+            <ImageView
+                android:id="@+id/activity_pay_qrcode_layout_close"
+                android:layout_width="50dp"
+                android:layout_height="50dp"
+                android:layout_gravity="center"
+                android:layout_marginTop="250dp"
+                android:src="@drawable/close_icon"></ImageView>
+
+        </FrameLayout>
     </FrameLayout>
 
 </androidx.constraintlayout.widget.ConstraintLayout>

+ 308 - 283
app/src/main/res/layout/activity_userinfo_setting.xml

@@ -1,251 +1,251 @@
 <?xml version="1.0" encoding="utf-8"?>
 <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
-        xmlns:app="http://schemas.android.com/apk/res-auto"
-        xmlns:roundframelayout="http://schemas.android.com/apk/res-auto"
-        xmlns:tools="http://schemas.android.com/tools"
-        android:layout_width="match_parent"
-        android:layout_height="match_parent"
-        android:clickable="true"
-        android:focusableInTouchMode="true">
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    xmlns:roundframelayout="http://schemas.android.com/apk/res-auto"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:clickable="true"
+    android:focusableInTouchMode="true">
 
 
     <FrameLayout
-            android:id="@+id/background"
-            android:layout_width="match_parent"
-            android:layout_height="match_parent"
-            android:background="#70C1FF"
-            android:clickable="true"
-            android:focusableInTouchMode="true"
-            app:layout_constraintBottom_toBottomOf="parent"
-            app:layout_constraintEnd_toEndOf="parent"
-            app:layout_constraintStart_toStartOf="parent"
-            app:layout_constraintTop_toTopOf="parent"></FrameLayout>
+        android:id="@+id/background"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:background="#70C1FF"
+        android:clickable="true"
+        android:focusableInTouchMode="true"
+        app:layout_constraintBottom_toBottomOf="parent"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintStart_toStartOf="parent"
+        app:layout_constraintTop_toTopOf="parent"></FrameLayout>
 
 
     <LinearLayout
-            android:layout_width="1280dp"
-            android:layout_height="720dp"
-            android:clickable="true"
-            android:focusableInTouchMode="true"
-            android:orientation="vertical"
-            app:layout_constraintBottom_toBottomOf="parent"
-            app:layout_constraintDimensionRatio="h,16:9"
-            app:layout_constraintEnd_toEndOf="parent"
-            app:layout_constraintStart_toStartOf="parent"
-            app:layout_constraintTop_toTopOf="parent">
+        android:layout_width="1280dp"
+        android:layout_height="720dp"
+        android:clickable="true"
+        android:focusableInTouchMode="true"
+        android:orientation="vertical"
+        app:layout_constraintBottom_toBottomOf="parent"
+        app:layout_constraintDimensionRatio="h,16:9"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintStart_toStartOf="parent"
+        app:layout_constraintTop_toTopOf="parent">
 
         <ImageView
-                android:id="@+id/activity_userinfo_setting_back"
-                android:layout_width="77dp"
-                android:layout_height="77dp"
-                android:layout_gravity="left"
-                android:layout_marginLeft="32dp"
-                android:layout_marginTop="20dp"
-                android:src="@drawable/main_back"></ImageView>
+            android:id="@+id/activity_userinfo_setting_back"
+            android:layout_width="77dp"
+            android:layout_height="77dp"
+            android:layout_gravity="left"
+            android:layout_marginLeft="32dp"
+            android:layout_marginTop="20dp"
+            android:src="@drawable/main_back"></ImageView>
 
         <com.edufound.reader.cusview.RoundFrameLayout
-                android:layout_width="1185dp"
-                android:layout_height="606dp"
-                android:layout_gravity="center"
-                android:background="#FAFAD8"
-                roundframelayout:radio="60">
+            android:layout_width="1185dp"
+            android:layout_height="606dp"
+            android:layout_gravity="center"
+            android:background="#FAFAD8"
+            roundframelayout:radio="60">
 
             <com.edufound.reader.cusview.RoundFrameLayout
-                    android:layout_width="1165dp"
-                    android:layout_height="586dp"
-                    android:layout_gravity="center"
-                    android:background="#FFCE82"
-                    roundframelayout:radio="60">
+                android:layout_width="1165dp"
+                android:layout_height="586dp"
+                android:layout_gravity="center"
+                android:background="#FFCE82"
+                roundframelayout:radio="60">
 
                 <LinearLayout
-                        android:layout_width="match_parent"
-                        android:layout_height="match_parent"
-                        android:layout_gravity="center"
-                        android:divider="@drawable/main_left_tab_divider"
-                        android:gravity="center"
-                        android:orientation="vertical"
-                        android:showDividers="middle">
+                    android:layout_width="match_parent"
+                    android:layout_height="match_parent"
+                    android:layout_gravity="center"
+                    android:divider="@drawable/main_left_tab_divider"
+                    android:gravity="center"
+                    android:orientation="vertical"
+                    android:showDividers="middle">
 
                     <com.edufound.reader.cusview.RoundFrameLayout
-                            android:layout_width="1125dp"
-                            android:layout_height="313dp"
-                            android:layout_gravity="center"
-                            android:background="@color/white"
-                            android:elevation="5dp"
-                            roundframelayout:radio="40">
+                        android:layout_width="1125dp"
+                        android:layout_height="313dp"
+                        android:layout_gravity="center"
+                        android:background="@color/white"
+                        android:elevation="5dp"
+                        roundframelayout:radio="40">
 
                         <LinearLayout
-                                android:layout_width="match_parent"
-                                android:layout_height="match_parent"
-                                android:orientation="horizontal">
+                            android:layout_width="match_parent"
+                            android:layout_height="match_parent"
+                            android:orientation="horizontal">
 
                             <FrameLayout
-                                    android:layout_width="0dp"
-                                    android:layout_height="match_parent"
-                                    android:layout_weight="1">
+                                android:layout_width="0dp"
+                                android:layout_height="match_parent"
+                                android:layout_weight="1">
 
-                                <com.edufound.reader.cusview.RoundFrameLayout
-                                        android:layout_width="260dp"
-                                        android:layout_height="230dp"
-                                        android:layout_gravity="right|center"
-                                        roundframelayout:radio="40">
+                                <FrameLayout
+                                    android:layout_width="260dp"
+                                    android:layout_height="230dp"
+                                    android:layout_gravity="right|center"
+                                    roundframelayout:radio="40">
 
                                     <FrameLayout
-                                            android:layout_width="188dp"
-                                            android:layout_height="188dp"
-                                            android:layout_gravity="center|top">
+                                        android:layout_width="188dp"
+                                        android:layout_height="188dp"
+                                        android:layout_gravity="center|top">
 
                                         <ImageView
-                                                android:id="@+id/activity_userinfo_setting_userhead"
-                                                android:layout_width="match_parent"
-                                                android:layout_height="match_parent"
-                                                android:layout_gravity="center|top"></ImageView>
+                                            android:id="@+id/activity_userinfo_setting_userhead"
+                                            android:layout_width="match_parent"
+                                            android:layout_height="match_parent"
+                                            android:layout_gravity="center|top"></ImageView>
 
                                     </FrameLayout>
 
                                     <TextView
-                                            android:id="@+id/activity_userinfo_setting_userhead_num"
-                                            android:layout_width="wrap_content"
-                                            android:layout_height="wrap_content"
-                                            android:layout_gravity="center|bottom"
-                                            android:text="123123123"
-                                            android:textSize="20dp"></TextView>
-                                </com.edufound.reader.cusview.RoundFrameLayout>
+                                        android:id="@+id/activity_userinfo_setting_userhead_num"
+                                        android:layout_width="wrap_content"
+                                        android:layout_height="wrap_content"
+                                        android:layout_gravity="center|bottom"
+                                        android:text="123123123"
+                                        android:textSize="20dp"></TextView>
+                                </FrameLayout>
                             </FrameLayout>
 
                             <LinearLayout
-                                    android:layout_width="0dp"
-                                    android:layout_height="match_parent"
-                                    android:layout_weight="1.7"
-                                    android:orientation="vertical"
-                                    android:paddingLeft="103dp"
-                                    android:paddingTop="30dp"
-                                    android:paddingBottom="39dp">
+                                android:layout_width="0dp"
+                                android:layout_height="match_parent"
+                                android:layout_weight="1.7"
+                                android:orientation="vertical"
+                                android:paddingLeft="103dp"
+                                android:paddingTop="30dp"
+                                android:paddingBottom="39dp">
 
                                 <LinearLayout
-                                        android:layout_width="match_parent"
-                                        android:layout_height="0dp"
-                                        android:layout_weight="1"
-                                        android:gravity="center|left"
-                                        android:orientation="horizontal">
+                                    android:layout_width="match_parent"
+                                    android:layout_height="0dp"
+                                    android:layout_weight="1"
+                                    android:gravity="center|left"
+                                    android:orientation="horizontal">
 
                                     <TextView
-                                            android:layout_width="72dp"
-                                            android:layout_height="50dp"
-                                            android:text="昵称"
-                                            android:textColor="@color/black"
-                                            android:textSize="30dp"></TextView>
+                                        android:layout_width="72dp"
+                                        android:layout_height="50dp"
+                                        android:text="昵称"
+                                        android:textColor="@color/black"
+                                        android:textSize="30dp"></TextView>
 
                                     <FrameLayout
-                                            android:layout_width="401dp"
-                                            android:layout_height="60dp"
-                                            android:layout_marginLeft="11dp"
-                                            android:background="@drawable/activity_userinfo_setting_item_bg">
+                                        android:layout_width="401dp"
+                                        android:layout_height="60dp"
+                                        android:layout_marginLeft="11dp"
+                                        android:background="@drawable/activity_userinfo_setting_item_bg">
 
                                         <EditText
-                                                android:id="@+id/activity_userinfo_setting_nickname"
-                                                android:layout_width="match_parent"
-                                                android:layout_height="match_parent"
-                                                android:background="@color/transparent"
-                                                android:gravity="center|left"
-                                                android:hint="请输入昵称"
-                                                android:imeOptions="actionDone"
-                                                android:lines="1"
-                                                android:paddingLeft="35dp"
-                                                android:singleLine="true"
-                                                android:text=""
-                                                android:textColor="@color/white"
-                                                android:textSize="30dp"></EditText>
+                                            android:id="@+id/activity_userinfo_setting_nickname"
+                                            android:layout_width="match_parent"
+                                            android:layout_height="match_parent"
+                                            android:background="@color/transparent"
+                                            android:gravity="center|left"
+                                            android:hint="请输入昵称"
+                                            android:imeOptions="actionDone"
+                                            android:lines="1"
+                                            android:paddingLeft="35dp"
+                                            android:singleLine="true"
+                                            android:text=""
+                                            android:textColor="@color/white"
+                                            android:textSize="30dp"></EditText>
                                     </FrameLayout>
                                 </LinearLayout>
 
                                 <LinearLayout
-                                        android:layout_width="match_parent"
-                                        android:layout_height="0dp"
-                                        android:layout_weight="1"
-                                        android:gravity="center|left"
-                                        android:orientation="horizontal">
+                                    android:layout_width="match_parent"
+                                    android:layout_height="0dp"
+                                    android:layout_weight="1"
+                                    android:gravity="center|left"
+                                    android:orientation="horizontal">
 
                                     <TextView
-                                            android:layout_width="72dp"
-                                            android:layout_height="50dp"
-                                            android:text="性别"
-                                            android:textColor="@color/black"
-                                            android:textSize="30dp"></TextView>
+                                        android:layout_width="72dp"
+                                        android:layout_height="50dp"
+                                        android:text="性别"
+                                        android:textColor="@color/black"
+                                        android:textSize="30dp"></TextView>
 
                                     <LinearLayout
-                                            android:layout_width="401dp"
-                                            android:layout_height="60dp"
-                                            android:layout_marginLeft="11dp"
-                                            android:divider="@drawable/main_left_tab_divider"
-                                            android:orientation="horizontal"
-                                            android:showDividers="middle">
+                                        android:layout_width="401dp"
+                                        android:layout_height="60dp"
+                                        android:layout_marginLeft="11dp"
+                                        android:divider="@drawable/main_left_tab_divider"
+                                        android:orientation="horizontal"
+                                        android:showDividers="middle">
 
                                         <FrameLayout
-                                                android:id="@+id/activity_userinfo_setting_gender_male"
-                                                android:layout_width="191dp"
-                                                android:layout_height="60dp"
-                                                android:background="@drawable/activity_userinfo_setting_item_sex_true_bg">
+                                            android:id="@+id/activity_userinfo_setting_gender_male"
+                                            android:layout_width="191dp"
+                                            android:layout_height="60dp"
+                                            android:background="@drawable/activity_userinfo_setting_item_sex_true_bg">
 
                                             <TextView
-                                                    android:layout_width="match_parent"
-                                                    android:layout_height="match_parent"
-                                                    android:gravity="center|left"
-                                                    android:paddingLeft="35dp"
-                                                    android:text="男孩"
-                                                    android:textColor="@color/white"
-                                                    android:textSize="30dp"></TextView>
+                                                android:layout_width="match_parent"
+                                                android:layout_height="match_parent"
+                                                android:gravity="center|left"
+                                                android:paddingLeft="35dp"
+                                                android:text="男孩"
+                                                android:textColor="@color/white"
+                                                android:textSize="30dp"></TextView>
 
                                         </FrameLayout>
 
                                         <FrameLayout
-                                                android:id="@+id/activity_userinfo_setting_gender_female"
-                                                android:layout_width="191dp"
-                                                android:layout_height="60dp"
-                                                android:background="@drawable/activity_userinfo_setting_item_sex_bg">
+                                            android:id="@+id/activity_userinfo_setting_gender_female"
+                                            android:layout_width="191dp"
+                                            android:layout_height="60dp"
+                                            android:background="@drawable/activity_userinfo_setting_item_sex_bg">
 
                                             <TextView
-                                                    android:layout_width="match_parent"
-                                                    android:layout_height="match_parent"
-                                                    android:gravity="center|left"
-                                                    android:paddingLeft="35dp"
-                                                    android:text="女孩"
-                                                    android:textColor="@color/white"
-                                                    android:textSize="30dp"></TextView>
+                                                android:layout_width="match_parent"
+                                                android:layout_height="match_parent"
+                                                android:gravity="center|left"
+                                                android:paddingLeft="35dp"
+                                                android:text="女孩"
+                                                android:textColor="@color/white"
+                                                android:textSize="30dp"></TextView>
 
                                         </FrameLayout>
                                     </LinearLayout>
                                 </LinearLayout>
 
                                 <LinearLayout
-                                        android:layout_width="match_parent"
-                                        android:layout_height="0dp"
-                                        android:layout_weight="1"
-                                        android:gravity="center|left"
-                                        android:orientation="horizontal">
+                                    android:layout_width="match_parent"
+                                    android:layout_height="0dp"
+                                    android:layout_weight="1"
+                                    android:gravity="center|left"
+                                    android:orientation="horizontal">
 
                                     <TextView
-                                            android:layout_width="72dp"
-                                            android:layout_height="50dp"
-                                            android:text="年级"
-                                            android:textColor="@color/black"
-                                            android:textSize="30dp"></TextView>
+                                        android:layout_width="72dp"
+                                        android:layout_height="50dp"
+                                        android:text="年级"
+                                        android:textColor="@color/black"
+                                        android:textSize="30dp"></TextView>
 
                                     <FrameLayout
-                                            android:layout_width="401dp"
-                                            android:layout_height="60dp"
-                                            android:layout_marginLeft="11dp"
-                                            android:background="@drawable/activity_userinfo_setting_item_grade_bg">
+                                        android:layout_width="401dp"
+                                        android:layout_height="60dp"
+                                        android:layout_marginLeft="11dp"
+                                        android:background="@drawable/activity_userinfo_setting_item_grade_bg">
 
                                         <TextView
-                                                android:id="@+id/activity_userinfo_setting_grade"
-                                                android:layout_width="match_parent"
-                                                android:layout_height="match_parent"
-                                                android:gravity="center|left"
-                                                android:paddingLeft="35dp"
-                                                android:text="二年级"
-                                                android:textColor="@color/white"
-                                                android:textSize="30dp"></TextView>
+                                            android:id="@+id/activity_userinfo_setting_grade"
+                                            android:layout_width="match_parent"
+                                            android:layout_height="match_parent"
+                                            android:gravity="center|left"
+                                            android:paddingLeft="35dp"
+                                            android:text="二年级"
+                                            android:textColor="@color/white"
+                                            android:textSize="30dp"></TextView>
 
                                     </FrameLayout>
                                 </LinearLayout>
@@ -254,159 +254,184 @@
                     </com.edufound.reader.cusview.RoundFrameLayout>
 
                     <com.edufound.reader.cusview.RoundFrameLayout
-                            android:layout_width="1125dp"
-                            android:layout_height="223dp"
-                            android:layout_gravity="center"
-                            android:background="@color/white"
+                        android:layout_width="1125dp"
+                        android:layout_height="223dp"
+                        android:layout_gravity="center"
+                        android:background="@color/white"
 
-                            android:elevation="5dp"
-                            roundframelayout:radio="40">
+                        android:elevation="5dp"
+                        roundframelayout:radio="40">
 
                         <LinearLayout
-                                android:layout_width="match_parent"
+                            android:layout_width="match_parent"
+                            android:layout_height="match_parent"
+                            android:layout_gravity="center"
+                            android:gravity="center"
+                            android:orientation="horizontal"
+                            android:paddingLeft="40dp"
+                            android:paddingRight="40dp">
+
+                            <LinearLayout
+                                android:id="@+id/activity_userinfo_setting_bindphonenum_layout"
+                                android:layout_width="0dp"
                                 android:layout_height="match_parent"
-                                android:layout_gravity="center"
+                                android:layout_weight="1"
                                 android:gravity="center"
-                                android:orientation="horizontal"
-                                android:paddingLeft="40dp"
-                                android:paddingRight="40dp">
+                                android:orientation="vertical">
 
-                            <LinearLayout
-                                    android:id="@+id/activity_userinfo_setting_bindwechat_layout"
-                                    android:layout_width="0dp"
-                                    android:layout_height="match_parent"
-                                    android:layout_weight="1"
+                                <ImageView
+                                    android:layout_width="100dp"
+                                    android:scaleY="0.9"
+                                    android:scaleX="0.9"
+                                    android:layout_height="100dp"
+                                    android:src="@drawable/bind_phone_num"></ImageView>
+
+                                <TextView
+                                    android:layout_width="wrap_content"
+                                    android:layout_height="42dp"
+                                    android:layout_gravity="center"
                                     android:gravity="center"
-                                    android:orientation="vertical">
+                                    android:text="绑定手机号"
+                                    android:textColor="#333333"
+                                    android:textSize="30dp"></TextView>
+                            </LinearLayout>
+
+                            <LinearLayout
+                                android:id="@+id/activity_userinfo_setting_bindwechat_layout"
+                                android:layout_width="0dp"
+                                android:layout_height="match_parent"
+                                android:layout_weight="1"
+                                android:gravity="center"
+                                android:orientation="vertical">
 
                                 <ImageView
-                                        android:layout_width="100dp"
-                                        android:layout_height="100dp"
-                                        android:src="@drawable/activity_userinfo_setting_bindwechat"></ImageView>
+                                    android:layout_width="100dp"
+                                    android:layout_height="100dp"
+                                    android:src="@drawable/activity_userinfo_setting_bindwechat"></ImageView>
 
                                 <TextView
-                                        android:layout_width="wrap_content"
-                                        android:layout_height="42dp"
-                                        android:layout_gravity="center"
-                                        android:gravity="center"
-                                        android:text="绑定微信"
-                                        android:textColor="#333333"
-                                        android:textSize="30dp"></TextView>
+                                    android:layout_width="wrap_content"
+                                    android:layout_height="42dp"
+                                    android:layout_gravity="center"
+                                    android:gravity="center"
+                                    android:text="绑定微信"
+                                    android:textColor="#333333"
+                                    android:textSize="30dp"></TextView>
                             </LinearLayout>
 
                             <LinearLayout
-                                    android:id="@+id/activity_userinfo_setting_services_layout"
-                                    android:layout_width="0dp"
-                                    android:layout_height="match_parent"
-                                    android:layout_weight="1"
-                                    android:gravity="center"
-                                    android:orientation="vertical">
+                                android:id="@+id/activity_userinfo_setting_services_layout"
+                                android:layout_width="0dp"
+                                android:layout_height="match_parent"
+                                android:layout_weight="1"
+                                android:gravity="center"
+                                android:orientation="vertical">
 
                                 <ImageView
-                                        android:layout_width="100dp"
-                                        android:layout_height="100dp"
-                                        android:src="@drawable/activity_userinfo_setting_services"></ImageView>
+                                    android:layout_width="100dp"
+                                    android:layout_height="100dp"
+                                    android:src="@drawable/activity_userinfo_setting_services"></ImageView>
 
                                 <TextView
-                                        android:layout_width="wrap_content"
-                                        android:layout_height="42dp"
-                                        android:layout_gravity="center"
-                                        android:gravity="center"
-                                        android:text="服务协议"
-                                        android:textColor="#333333"
-                                        android:textSize="30dp"></TextView>
+                                    android:layout_width="wrap_content"
+                                    android:layout_height="42dp"
+                                    android:layout_gravity="center"
+                                    android:gravity="center"
+                                    android:text="服务协议"
+                                    android:textColor="#333333"
+                                    android:textSize="30dp"></TextView>
                             </LinearLayout>
 
                             <LinearLayout
-                                    android:id="@+id/activity_userinfo_setting_privservices_layout"
-                                    android:layout_width="0dp"
-                                    android:layout_height="match_parent"
-                                    android:layout_weight="1"
-                                    android:gravity="center"
-                                    android:orientation="vertical">
+                                android:id="@+id/activity_userinfo_setting_privservices_layout"
+                                android:layout_width="0dp"
+                                android:layout_height="match_parent"
+                                android:layout_weight="1"
+                                android:gravity="center"
+                                android:orientation="vertical">
 
                                 <ImageView
-                                        android:layout_width="100dp"
-                                        android:layout_height="100dp"
-                                        android:src="@drawable/activity_userinfo_setting_privservices"></ImageView>
+                                    android:layout_width="100dp"
+                                    android:layout_height="100dp"
+                                    android:src="@drawable/activity_userinfo_setting_privservices"></ImageView>
 
                                 <TextView
-                                        android:layout_width="wrap_content"
-                                        android:layout_height="42dp"
-                                        android:layout_gravity="center"
-                                        android:gravity="center"
-                                        android:text="隐私协议"
-                                        android:textColor="#333333"
-                                        android:textSize="30dp"></TextView>
+                                    android:layout_width="wrap_content"
+                                    android:layout_height="42dp"
+                                    android:layout_gravity="center"
+                                    android:gravity="center"
+                                    android:text="隐私协议"
+                                    android:textColor="#333333"
+                                    android:textSize="30dp"></TextView>
                             </LinearLayout>
 
                             <LinearLayout
-                                    android:id="@+id/activity_userinfo_setting_cancellation_layout"
-                                    android:layout_width="0dp"
-                                    android:layout_height="match_parent"
-                                    android:layout_weight="1"
-                                    android:gravity="center"
-                                    android:orientation="vertical">
+                                android:id="@+id/activity_userinfo_setting_cancellation_layout"
+                                android:layout_width="0dp"
+                                android:layout_height="match_parent"
+                                android:layout_weight="1"
+                                android:gravity="center"
+                                android:orientation="vertical">
 
                                 <ImageView
-                                        android:layout_width="100dp"
-                                        android:layout_height="100dp"
-                                        android:src="@drawable/activity_userinfo_setting_cancellation"></ImageView>
+                                    android:layout_width="100dp"
+                                    android:layout_height="100dp"
+                                    android:src="@drawable/activity_userinfo_setting_cancellation"></ImageView>
 
                                 <TextView
-                                        android:layout_width="wrap_content"
-                                        android:layout_height="42dp"
-                                        android:layout_gravity="center"
-                                        android:gravity="center"
-                                        android:text="注销账号"
-                                        android:textColor="#333333"
-                                        android:textSize="30dp"></TextView>
+                                    android:layout_width="wrap_content"
+                                    android:layout_height="42dp"
+                                    android:layout_gravity="center"
+                                    android:gravity="center"
+                                    android:text="注销账号"
+                                    android:textColor="#333333"
+                                    android:textSize="30dp"></TextView>
                             </LinearLayout>
 
                             <LinearLayout
-                                    android:id="@+id/activity_userinfo_setting_switchuser_layout"
-                                    android:layout_width="0dp"
-                                    android:layout_height="match_parent"
-                                    android:layout_weight="1"
-                                    android:gravity="center"
-                                    android:orientation="vertical">
+                                android:id="@+id/activity_userinfo_setting_switchuser_layout"
+                                android:layout_width="0dp"
+                                android:layout_height="match_parent"
+                                android:layout_weight="1"
+                                android:gravity="center"
+                                android:orientation="vertical">
 
                                 <ImageView
-                                        android:layout_width="100dp"
-                                        android:layout_height="100dp"
-                                        android:src="@drawable/activity_userinfo_setting_switchuser"></ImageView>
+                                    android:layout_width="100dp"
+                                    android:layout_height="100dp"
+                                    android:src="@drawable/activity_userinfo_setting_switchuser"></ImageView>
 
                                 <TextView
-                                        android:layout_width="wrap_content"
-                                        android:layout_height="42dp"
-                                        android:layout_gravity="center"
-                                        android:gravity="center"
-                                        android:text="切换用户"
-                                        android:textColor="#333333"
-                                        android:textSize="30dp"></TextView>
+                                    android:layout_width="wrap_content"
+                                    android:layout_height="42dp"
+                                    android:layout_gravity="center"
+                                    android:gravity="center"
+                                    android:text="切换用户"
+                                    android:textColor="#333333"
+                                    android:textSize="30dp"></TextView>
                             </LinearLayout>
 
                             <LinearLayout
-                                    android:id="@+id/activity_userinfo_setting_loginout_layout"
-                                    android:layout_width="0dp"
-                                    android:layout_height="match_parent"
-                                    android:layout_weight="1"
-                                    android:gravity="center"
-                                    android:orientation="vertical">
+                                android:id="@+id/activity_userinfo_setting_loginout_layout"
+                                android:layout_width="0dp"
+                                android:layout_height="match_parent"
+                                android:layout_weight="1"
+                                android:gravity="center"
+                                android:orientation="vertical">
 
                                 <ImageView
-                                        android:layout_width="100dp"
-                                        android:layout_height="100dp"
-                                        android:src="@drawable/activity_userinfo_setting_loginout"></ImageView>
+                                    android:layout_width="100dp"
+                                    android:layout_height="100dp"
+                                    android:src="@drawable/activity_userinfo_setting_loginout"></ImageView>
 
                                 <TextView
-                                        android:layout_width="wrap_content"
-                                        android:layout_height="42dp"
-                                        android:layout_gravity="center"
-                                        android:gravity="center"
-                                        android:text="退出登录"
-                                        android:textColor="#333333"
-                                        android:textSize="30dp"></TextView>
+                                    android:layout_width="wrap_content"
+                                    android:layout_height="42dp"
+                                    android:layout_gravity="center"
+                                    android:gravity="center"
+                                    android:text="退出登录"
+                                    android:textColor="#333333"
+                                    android:textSize="30dp"></TextView>
                             </LinearLayout>
                         </LinearLayout>
                     </com.edufound.reader.cusview.RoundFrameLayout>

+ 243 - 242
app/src/main/res/layout/fragment_main_user.xml

@@ -1,193 +1,194 @@
 <?xml version="1.0" encoding="utf-8"?>
 <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
-        xmlns:app="http://schemas.android.com/apk/res-auto"
-        xmlns:roundframelayout="http://schemas.android.com/apk/res-auto"
-        xmlns:tools="http://schemas.android.com/tools"
-        android:layout_width="match_parent"
-        android:layout_height="match_parent"
-        android:layout_gravity="center"
-        android:layout_marginLeft="25dp"
-        android:paddingTop="30dp">
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    xmlns:roundframelayout="http://schemas.android.com/apk/res-auto"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:layout_gravity="center"
+    android:layout_marginLeft="25dp"
+    android:paddingTop="30dp">
 
 
     <HorizontalScrollView
-            android:id="@+id/fragment_main_user_scrollview"
-            android:layout_width="match_parent"
-            android:layout_height="match_parent"
-            android:scrollbars="none">
+        android:id="@+id/fragment_main_user_scrollview"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:scrollbars="none">
 
 
         <LinearLayout
-                android:layout_width="match_parent"
-                android:layout_height="match_parent"
-                android:orientation="horizontal">
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:orientation="horizontal">
 
             <FrameLayout
-                    android:id="@+id/fragment_main_user_head_layout"
-                    android:layout_width="wrap_content"
-                    android:layout_height="match_parent">
+                android:id="@+id/fragment_main_user_head_layout"
+                android:layout_width="wrap_content"
+                android:layout_height="match_parent">
 
                 <LinearLayout
-                        android:layout_width="519dp"
-                        android:layout_height="match_parent"
-                        android:divider="@drawable/fragment_user_info_divider"
-                        android:orientation="vertical"
-                        android:showDividers="middle">
+                    android:layout_width="519dp"
+                    android:layout_height="match_parent"
+                    android:divider="@drawable/fragment_user_info_divider"
+                    android:orientation="vertical"
+                    android:showDividers="middle">
 
                     <TextView
-                            android:layout_width="match_parent"
-                            android:layout_height="wrap_content"
-                            android:gravity="center|left"
-                            android:text="个人信息"
-                            android:textColor="@color/white"
-                            android:textSize="26dp"></TextView>
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:gravity="center|left"
+                        android:text="个人信息"
+                        android:textColor="@color/white"
+                        android:textSize="26dp"></TextView>
 
                     <com.edufound.reader.cusview.RoundFrameLayout
-                            android:id="@+id/fragment_main_user_layout"
-                            android:layout_width="match_parent"
-                            android:layout_height="188dp"
-                            android:background="@color/white">
+                        android:id="@+id/fragment_main_user_layout"
+                        android:layout_width="match_parent"
+                        android:layout_height="188dp"
+                        android:background="@color/white">
 
                         <LinearLayout
-                                android:layout_width="match_parent"
-                                android:layout_height="match_parent"
-                                android:orientation="horizontal">
+                            android:layout_width="match_parent"
+                            android:layout_height="match_parent"
+                            android:orientation="horizontal">
 
                             <FrameLayout
-                                    android:layout_width="0dp"
-                                    android:layout_height="match_parent"
-                                    android:layout_weight="2">
+                                android:layout_width="0dp"
+                                android:layout_height="match_parent"
+                                android:layout_weight="2">
 
                                 <ImageView
-                                        android:id="@+id/fragment_main_user_head"
-                                        android:layout_width="102dp"
-                                        android:layout_height="102dp"
-                                        android:layout_gravity="center"></ImageView>
+                                    android:id="@+id/fragment_main_user_head"
+                                    android:layout_width="102dp"
+                                    android:layout_height="102dp"
+                                    android:layout_gravity="center"></ImageView>
                             </FrameLayout>
 
                             <FrameLayout
-                                    android:layout_width="0dp"
-                                    android:layout_height="match_parent"
-                                    android:layout_weight="6">
+                                android:layout_width="0dp"
+                                android:layout_height="match_parent"
+                                android:layout_weight="6">
 
                                 <androidx.constraintlayout.widget.ConstraintLayout
-                                        android:layout_width="match_parent"
-                                        android:layout_height="match_parent"
-                                        android:paddingTop="10dp">
+                                    android:layout_width="match_parent"
+                                    android:layout_height="match_parent"
+                                    android:paddingTop="10dp">
 
                                     <TextView
-                                            android:id="@+id/fragment_main_user_phonenum"
-                                            android:layout_width="wrap_content"
-                                            android:layout_height="48dp"
-                                            android:textColor="#272727"
-                                            android:textSize="30dp"
-                                            app:layout_constraintStart_toStartOf="parent"
-                                            app:layout_constraintTop_toTopOf="parent"></TextView>
+                                        android:id="@+id/fragment_main_user_phonenum"
+                                        android:layout_width="wrap_content"
+                                        android:layout_height="48dp"
+                                        android:maxLength="11"
+                                        android:textColor="#272727"
+                                        android:textSize="30dp"
+                                        app:layout_constraintStart_toStartOf="parent"
+                                        app:layout_constraintTop_toTopOf="parent"></TextView>
 
                                     <TextView
-                                            android:id="@+id/fragment_main_user_grade"
-                                            android:layout_width="wrap_content"
-                                            android:layout_height="48dp"
-                                            android:layout_marginBottom="80dp"
-                                            android:textColor="#999999"
-                                            android:textSize="27dp"
-                                            app:layout_constraintBottom_toBottomOf="parent"
-                                            app:layout_constraintStart_toStartOf="parent"></TextView>
+                                        android:id="@+id/fragment_main_user_grade"
+                                        android:layout_width="wrap_content"
+                                        android:layout_height="48dp"
+                                        android:layout_marginBottom="80dp"
+                                        android:textColor="#999999"
+                                        android:textSize="27dp"
+                                        app:layout_constraintBottom_toBottomOf="parent"
+                                        app:layout_constraintStart_toStartOf="parent"></TextView>
 
                                     <ImageView
-                                            android:id="@+id/fragment_main_user_setting"
-                                            android:layout_width="99dp"
-                                            android:layout_height="35dp"
-                                            android:layout_marginTop="8dp"
-                                            android:layout_marginEnd="16dp"
-                                            android:src="@drawable/fragment_my_setting"
-                                            app:layout_constraintEnd_toEndOf="parent"
-                                            app:layout_constraintTop_toTopOf="parent"></ImageView>
+                                        android:id="@+id/fragment_main_user_setting"
+                                        android:layout_width="99dp"
+                                        android:layout_height="35dp"
+                                        android:layout_marginTop="8dp"
+                                        android:layout_marginEnd="16dp"
+                                        android:src="@drawable/fragment_my_setting"
+                                        app:layout_constraintEnd_toEndOf="parent"
+                                        app:layout_constraintTop_toTopOf="parent"></ImageView>
 
                                     <FrameLayout
-                                            android:layout_width="match_parent"
-                                            android:layout_height="1dp"
-                                            android:layout_marginRight="12dp"
-                                            android:alpha="0.2"
-                                            android:background="#000000"
-                                            app:layout_constraintBottom_toBottomOf="parent"
-                                            app:layout_constraintEnd_toEndOf="parent"
-                                            app:layout_constraintStart_toStartOf="parent"
-                                            app:layout_constraintTop_toTopOf="parent"
-                                            app:layout_constraintVertical_bias="0.609"></FrameLayout>
+                                        android:layout_width="match_parent"
+                                        android:layout_height="1dp"
+                                        android:layout_marginRight="12dp"
+                                        android:alpha="0.2"
+                                        android:background="#000000"
+                                        app:layout_constraintBottom_toBottomOf="parent"
+                                        app:layout_constraintEnd_toEndOf="parent"
+                                        app:layout_constraintStart_toStartOf="parent"
+                                        app:layout_constraintTop_toTopOf="parent"
+                                        app:layout_constraintVertical_bias="0.609"></FrameLayout>
 
                                     <LinearLayout
-                                            android:layout_width="wrap_content"
-                                            android:layout_height="40dp"
-                                            android:layout_marginBottom="18dp"
-                                            android:gravity="center"
-                                            android:orientation="horizontal"
-                                            app:layout_constraintBottom_toBottomOf="parent"
-                                            app:layout_constraintStart_toStartOf="parent">
+                                        android:layout_width="wrap_content"
+                                        android:layout_height="40dp"
+                                        android:layout_marginBottom="18dp"
+                                        android:gravity="center"
+                                        android:orientation="horizontal"
+                                        app:layout_constraintBottom_toBottomOf="parent"
+                                        app:layout_constraintStart_toStartOf="parent">
 
                                         <TextView
-                                                android:layout_width="wrap_content"
-                                                android:layout_height="match_parent"
-                                                android:gravity="center"
-                                                android:text="粉丝"
-                                                android:textColor="#999999"
-                                                android:textSize="27dp"></TextView>
+                                            android:layout_width="wrap_content"
+                                            android:layout_height="match_parent"
+                                            android:gravity="center"
+                                            android:text="粉丝"
+                                            android:textColor="#999999"
+                                            android:textSize="27dp"></TextView>
 
                                         <Space
-                                                android:layout_width="5dp"
-                                                android:layout_height="match_parent"></Space>
+                                            android:layout_width="5dp"
+                                            android:layout_height="match_parent"></Space>
 
                                         <TextView
-                                                android:id="@+id/fragment_main_user_fans"
-                                                android:layout_width="wrap_content"
-                                                android:layout_height="match_parent"
-                                                android:gravity="center"
-                                                android:text="0"
-                                                android:textColor="#999999"
-                                                android:textSize="27dp"></TextView>
+                                            android:id="@+id/fragment_main_user_fans"
+                                            android:layout_width="wrap_content"
+                                            android:layout_height="match_parent"
+                                            android:gravity="center"
+                                            android:text="0"
+                                            android:textColor="#999999"
+                                            android:textSize="27dp"></TextView>
                                     </LinearLayout>
 
                                     <FrameLayout
-                                            android:layout_width="1dp"
-                                            android:layout_height="32dp"
-                                            android:layout_marginBottom="22dp"
-                                            android:alpha="0.2"
-                                            android:background="#000000"
-                                            app:layout_constraintBottom_toBottomOf="parent"
-                                            app:layout_constraintEnd_toEndOf="parent"
-                                            app:layout_constraintHorizontal_bias="0.437"
-                                            app:layout_constraintStart_toStartOf="parent"></FrameLayout>
+                                        android:layout_width="1dp"
+                                        android:layout_height="32dp"
+                                        android:layout_marginBottom="22dp"
+                                        android:alpha="0.2"
+                                        android:background="#000000"
+                                        app:layout_constraintBottom_toBottomOf="parent"
+                                        app:layout_constraintEnd_toEndOf="parent"
+                                        app:layout_constraintHorizontal_bias="0.437"
+                                        app:layout_constraintStart_toStartOf="parent"></FrameLayout>
 
                                     <LinearLayout
-                                            android:layout_width="wrap_content"
-                                            android:layout_height="40dp"
-                                            android:layout_marginRight="12dp"
-                                            android:layout_marginBottom="18dp"
-                                            android:gravity="center"
-                                            android:orientation="horizontal"
-                                            app:layout_constraintBottom_toBottomOf="parent"
-                                            app:layout_constraintEnd_toEndOf="parent">
+                                        android:layout_width="wrap_content"
+                                        android:layout_height="40dp"
+                                        android:layout_marginRight="12dp"
+                                        android:layout_marginBottom="18dp"
+                                        android:gravity="center"
+                                        android:orientation="horizontal"
+                                        app:layout_constraintBottom_toBottomOf="parent"
+                                        app:layout_constraintEnd_toEndOf="parent">
 
                                         <TextView
-                                                android:layout_width="wrap_content"
-                                                android:layout_height="match_parent"
-                                                android:gravity="center"
-                                                android:text="播放"
-                                                android:textColor="#999999"
-                                                android:textSize="27dp"></TextView>
+                                            android:layout_width="wrap_content"
+                                            android:layout_height="match_parent"
+                                            android:gravity="center"
+                                            android:text="播放"
+                                            android:textColor="#999999"
+                                            android:textSize="27dp"></TextView>
 
                                         <Space
-                                                android:layout_width="5dp"
-                                                android:layout_height="match_parent"></Space>
+                                            android:layout_width="5dp"
+                                            android:layout_height="match_parent"></Space>
 
                                         <TextView
-                                                android:id="@+id/fragment_main_user_playcount"
-                                                android:layout_width="wrap_content"
-                                                android:layout_height="match_parent"
-                                                android:gravity="center"
-                                                android:text="0"
-                                                android:textColor="#999999"
-                                                android:textSize="27dp"></TextView>
+                                            android:id="@+id/fragment_main_user_playcount"
+                                            android:layout_width="wrap_content"
+                                            android:layout_height="match_parent"
+                                            android:gravity="center"
+                                            android:text="0"
+                                            android:textColor="#999999"
+                                            android:textSize="27dp"></TextView>
                                     </LinearLayout>
                                 </androidx.constraintlayout.widget.ConstraintLayout>
                             </FrameLayout>
@@ -195,115 +196,115 @@
                     </com.edufound.reader.cusview.RoundFrameLayout>
 
                     <LinearLayout
-                            android:layout_width="match_parent"
-                            android:layout_height="195dp"
-                            android:divider="@drawable/fragment_user_info_divider"
-                            android:orientation="horizontal"
-                            android:showDividers="middle">
+                        android:layout_width="match_parent"
+                        android:layout_height="195dp"
+                        android:divider="@drawable/fragment_user_info_divider"
+                        android:orientation="horizontal"
+                        android:showDividers="middle">
 
                         <FrameLayout
-                                android:id="@+id/fragment_main_user_vip"
-                                android:layout_width="0dp"
-                                android:layout_height="match_parent"
-                                android:layout_weight="1"
-                                android:background="@drawable/fragment_my_vip">
+                            android:id="@+id/fragment_main_user_vip"
+                            android:layout_width="0dp"
+                            android:layout_height="match_parent"
+                            android:layout_weight="1"
+                            android:background="@drawable/fragment_my_vip">
 
 
                             <TextView
-                                    android:id="@+id/fragment_main_user_vip_date"
-                                    android:layout_width="match_parent"
-                                    android:layout_height="wrap_content"
-                                    android:layout_gravity="center|bottom"
-                                    android:layout_marginBottom="8dp"
-                                    android:gravity="center"
-                                    android:text="到期:2020-01-06"
-                                    android:textColor="@color/white"
-                                    android:textSize="26dp"
-                                    android:visibility="gone"></TextView>
+                                android:id="@+id/fragment_main_user_vip_date"
+                                android:layout_width="match_parent"
+                                android:layout_height="wrap_content"
+                                android:layout_gravity="center|bottom"
+                                android:layout_marginBottom="8dp"
+                                android:gravity="center"
+                                android:text="到期:2020-01-06"
+                                android:textColor="@color/white"
+                                android:textSize="26dp"
+                                android:visibility="gone"></TextView>
                         </FrameLayout>
 
 
                         <FrameLayout
-                                android:id="@+id/fragment_main_user_redflower"
-                                android:layout_width="0dp"
-                                android:layout_height="match_parent"
-                                android:layout_weight="1"
-                                android:background="@drawable/fragment_my_redflower">
+                            android:id="@+id/fragment_main_user_redflower"
+                            android:layout_width="0dp"
+                            android:layout_height="match_parent"
+                            android:layout_weight="1"
+                            android:background="@drawable/fragment_my_redflower">
 
                             <TextView
-                                    android:id="@+id/fragment_main_user_redflower_text"
-                                    android:layout_width="100dp"
-                                    android:layout_height="42dp"
-                                    android:layout_gravity="right"
-                                    android:layout_marginTop="25dp"
-                                    android:layout_marginRight="30dp"
-                                    android:gravity="center|left"
-                                    android:text="0"
-                                    android:textColor="@color/white"
-                                    android:textSize="30dp"></TextView>
+                                android:id="@+id/fragment_main_user_redflower_text"
+                                android:layout_width="100dp"
+                                android:layout_height="42dp"
+                                android:layout_gravity="right"
+                                android:layout_marginTop="25dp"
+                                android:layout_marginRight="30dp"
+                                android:gravity="center|left"
+                                android:text="0"
+                                android:textColor="@color/white"
+                                android:textSize="30dp"></TextView>
                         </FrameLayout>
                     </LinearLayout>
 
                     <LinearLayout
-                            android:layout_width="match_parent"
-                            android:layout_height="80dp"
-                            android:divider="@drawable/main_left_tab_divider"
-                            android:orientation="horizontal"
-                            android:showDividers="middle">
+                        android:layout_width="match_parent"
+                        android:layout_height="80dp"
+                        android:divider="@drawable/main_left_tab_divider"
+                        android:orientation="horizontal"
+                        android:showDividers="middle">
 
                         <ImageView
-                                android:id="@+id/fragment_main_user_myattention"
-                                android:layout_width="0dp"
-                                android:layout_height="match_parent"
-                                android:layout_weight="1"
-                                android:src="@drawable/fragment_my_attention"></ImageView>
+                            android:id="@+id/fragment_main_user_myattention"
+                            android:layout_width="0dp"
+                            android:layout_height="match_parent"
+                            android:layout_weight="1"
+                            android:src="@drawable/fragment_my_attention"></ImageView>
 
                         <ImageView
-                                android:id="@+id/fragment_main_user_mycollection"
-                                android:layout_width="0dp"
-                                android:layout_height="match_parent"
-                                android:layout_weight="1"
-                                android:src="@drawable/fragment_my_collection"></ImageView>
+                            android:id="@+id/fragment_main_user_mycollection"
+                            android:layout_width="0dp"
+                            android:layout_height="match_parent"
+                            android:layout_weight="1"
+                            android:src="@drawable/fragment_my_collection"></ImageView>
 
                     </LinearLayout>
 
                     <LinearLayout
-                            android:layout_width="match_parent"
-                            android:layout_height="80dp"
-                            android:divider="@drawable/fragment_user_info_divider"
-                            android:orientation="horizontal"
-                            android:showDividers="middle">
+                        android:layout_width="match_parent"
+                        android:layout_height="80dp"
+                        android:divider="@drawable/fragment_user_info_divider"
+                        android:orientation="horizontal"
+                        android:showDividers="middle">
 
                         <FrameLayout
-                                android:id="@+id/fragment_main_user_messagenotification"
-                                android:layout_width="0dp"
-                                android:layout_height="match_parent"
-                                android:layout_weight="1">
+                            android:id="@+id/fragment_main_user_messagenotification"
+                            android:layout_width="0dp"
+                            android:layout_height="match_parent"
+                            android:layout_weight="1">
 
 
                             <ImageView
-                                    android:layout_width="match_parent"
-                                    android:layout_height="match_parent"
-                                    android:src="@drawable/fragment_my_message_notification"></ImageView>
+                                android:layout_width="match_parent"
+                                android:layout_height="match_parent"
+                                android:src="@drawable/fragment_my_message_notification"></ImageView>
 
                             <com.edufound.reader.cusview.RoundFrameLayout
-                                    android:id="@+id/fragment_main_user_unread_icon"
-                                    android:layout_width="11dp"
-                                    android:layout_height="11dp"
-                                    android:layout_gravity="right|top"
-                                    android:layout_marginTop="10dp"
-                                    android:layout_marginRight="10dp"
-                                    android:background="@color/red"
-                                    android:visibility="invisible"
-                                    roundframelayout:radio="30"></com.edufound.reader.cusview.RoundFrameLayout>
+                                android:id="@+id/fragment_main_user_unread_icon"
+                                android:layout_width="11dp"
+                                android:layout_height="11dp"
+                                android:layout_gravity="right|top"
+                                android:layout_marginTop="10dp"
+                                android:layout_marginRight="10dp"
+                                android:background="@color/red"
+                                android:visibility="invisible"
+                                roundframelayout:radio="30"></com.edufound.reader.cusview.RoundFrameLayout>
                         </FrameLayout>
 
                         <ImageView
-                                android:id="@+id/fragment_main_user_customerservice"
-                                android:layout_width="0dp"
-                                android:layout_height="match_parent"
-                                android:layout_weight="1"
-                                android:src="@drawable/fragment_my_customer_service"></ImageView>
+                            android:id="@+id/fragment_main_user_customerservice"
+                            android:layout_width="0dp"
+                            android:layout_height="match_parent"
+                            android:layout_weight="1"
+                            android:src="@drawable/fragment_my_customer_service"></ImageView>
 
                     </LinearLayout>
                 </LinearLayout>
@@ -311,49 +312,49 @@
 
 
             <LinearLayout
-                    android:layout_width="match_parent"
-                    android:layout_height="match_parent"
-                    android:divider="@drawable/fragment_user_info_divider"
-                    android:orientation="vertical"
-                    android:paddingLeft="50dp"
-                    android:showDividers="middle">
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+                android:divider="@drawable/fragment_user_info_divider"
+                android:orientation="vertical"
+                android:paddingLeft="50dp"
+                android:showDividers="middle">
 
                 <TextView
-                        android:id="@+id/fragment_main_user_myrecordsize"
-                        android:layout_width="match_parent"
-                        android:layout_height="wrap_content"
-                        android:gravity="center|left"
-                        android:paddingLeft="10dp"
-                        android:text="我的作品:0"
-                        android:textColor="@color/white"
-                        android:textSize="26dp"></TextView>
+                    android:id="@+id/fragment_main_user_myrecordsize"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:gravity="center|left"
+                    android:paddingLeft="10dp"
+                    android:text="我的作品:0"
+                    android:textColor="@color/white"
+                    android:textSize="26dp"></TextView>
 
 
                 <FrameLayout
-                        android:id="@+id/fragment_main_user_norecord"
-                        android:layout_width="400dp"
-                        android:layout_height="match_parent"
-                        android:visibility="gone">
+                    android:id="@+id/fragment_main_user_norecord"
+                    android:layout_width="400dp"
+                    android:layout_height="match_parent"
+                    android:visibility="gone">
 
                     <ImageView
-                            android:layout_width="wrap_content"
-                            android:layout_height="wrap_content"
-                            android:layout_gravity="center"
-                            android:src="@drawable/fragment_user_no_record"></ImageView>
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_gravity="center"
+                        android:src="@drawable/fragment_user_no_record"></ImageView>
                 </FrameLayout>
 
                 <GridLayout
-                        android:id="@+id/fragment_my_recyclerview"
-                        android:layout_width="match_parent"
-                        android:layout_height="match_parent"
-                        android:layout_gravity="center"
-                        android:orientation="vertical"></GridLayout>
+                    android:id="@+id/fragment_my_recyclerview"
+                    android:layout_width="match_parent"
+                    android:layout_height="match_parent"
+                    android:layout_gravity="center"
+                    android:orientation="vertical"></GridLayout>
             </LinearLayout>
 
             <Space
-                    android:id="@+id/fragment_main_user_bottomview"
-                    android:layout_width="50dp"
-                    android:layout_height="match_parent"></Space>
+                android:id="@+id/fragment_main_user_bottomview"
+                android:layout_width="50dp"
+                android:layout_height="match_parent"></Space>
         </LinearLayout>
     </HorizontalScrollView>
 

+ 298 - 0
app/src/main/res/layout/popupwindow_mi_sound_qrcode_layout.xml

@@ -0,0 +1,298 @@
+<?xml version="1.0" encoding="utf-8"?>
+<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    xmlns:roundframelayout="http://schemas.android.com/apk/res-auto"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:clickable="true"
+    android:focusableInTouchMode="true">
+
+
+    <FrameLayout
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:background="@color/translucent_background"></FrameLayout>
+
+    <androidx.constraintlayout.widget.ConstraintLayout
+        android:layout_width="match_parent"
+        android:layout_height="match_parent">
+
+        <androidx.constraintlayout.widget.ConstraintLayout
+            android:layout_width="1280dp"
+            android:layout_height="720dp"
+            android:clickable="true"
+            android:focusableInTouchMode="true"
+            android:orientation="vertical"
+            app:layout_constraintBottom_toBottomOf="parent"
+            app:layout_constraintDimensionRatio="h,16:9"
+            app:layout_constraintEnd_toEndOf="parent"
+            app:layout_constraintStart_toStartOf="parent"
+            app:layout_constraintTop_toTopOf="parent">
+
+
+            <!--扫码登录-->
+            <androidx.constraintlayout.widget.ConstraintLayout
+                android:id="@+id/popupwindow_mi_sound_qrcode_login_layout"
+                android:layout_width="686dp"
+                android:layout_height="515dp"
+                android:layout_gravity="center"
+                android:background="@drawable/mi_sound_login_bg"
+                android:visibility="gone"
+                app:layout_constraintBottom_toBottomOf="parent"
+                app:layout_constraintEnd_toEndOf="parent"
+                app:layout_constraintStart_toStartOf="parent"
+                app:layout_constraintTop_toTopOf="parent">
+
+                <TextView
+                    android:id="@+id/textView3"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_marginTop="41dp"
+                    android:text="微信扫码登录"
+                    android:textSize="36dp"
+                    app:layout_constraintBottom_toBottomOf="parent"
+                    app:layout_constraintEnd_toEndOf="parent"
+                    app:layout_constraintStart_toStartOf="parent"
+                    app:layout_constraintTop_toTopOf="parent"
+                    app:layout_constraintVertical_bias="0.0"></TextView>
+
+
+                <FrameLayout
+                    android:layout_width="316dp"
+                    android:layout_height="316dp"
+                    android:background="@drawable/mi_sound_login_qrcode_bg"
+                    app:layout_constraintBottom_toBottomOf="parent"
+                    app:layout_constraintEnd_toEndOf="parent"
+                    app:layout_constraintStart_toStartOf="parent"
+                    app:layout_constraintTop_toTopOf="parent"
+                    app:layout_constraintVertical_bias="0.7">
+
+                    <ImageView
+                        android:id="@+id/popupwindow_mi_sound_qrcode"
+                        android:layout_width="300dp"
+                        android:layout_height="300dp"
+                        android:layout_gravity="center"
+                        android:scaleX="0.99"
+                        android:scaleY="0.99"></ImageView>
+
+
+                </FrameLayout>
+            </androidx.constraintlayout.widget.ConstraintLayout>
+
+            <!--扫码登录 end-->
+
+
+            <!-- 绑定手机号-->
+
+            <androidx.constraintlayout.widget.ConstraintLayout
+                android:id="@+id/popupwindow_mi_sound_bind_phone_layout"
+                android:layout_width="686dp"
+                android:layout_height="515dp"
+                android:layout_gravity="center"
+                android:background="@drawable/mi_sound_login_bg"
+                android:visibility="gone"
+                app:layout_constraintBottom_toBottomOf="parent"
+                app:layout_constraintEnd_toEndOf="parent"
+                app:layout_constraintStart_toStartOf="parent"
+                app:layout_constraintTop_toTopOf="parent">
+
+
+                <FrameLayout
+                    android:layout_width="720dp"
+                    android:layout_height="560dp"
+                    android:layout_gravity="center"
+                    app:layout_constraintBottom_toBottomOf="parent"
+                    app:layout_constraintEnd_toEndOf="parent"
+                    app:layout_constraintStart_toStartOf="parent"
+                    app:layout_constraintTop_toTopOf="parent">
+
+                    <FrameLayout
+
+                        android:layout_width="690dp"
+                        android:layout_height="515dp"
+                        android:layout_gravity="center">
+
+                        <androidx.constraintlayout.widget.ConstraintLayout
+
+                            android:layout_width="match_parent"
+                            android:layout_height="match_parent">
+
+                            <TextView
+                                android:id="@+id/textView5"
+                                android:layout_width="wrap_content"
+                                android:layout_height="48dp"
+                                android:layout_marginTop="32dp"
+                                android:text="绑定手机号"
+                                android:textColor="#333333"
+                                android:textSize="34dp"
+                                app:layout_constraintEnd_toEndOf="parent"
+                                app:layout_constraintStart_toStartOf="parent"
+                                app:layout_constraintTop_toTopOf="parent"></TextView>
+
+
+                            <TextView
+                                android:id="@+id/popupwindow_mi_sound_bind_phone_error_text"
+                                android:layout_width="wrap_content"
+                                android:layout_height="48dp"
+                                android:gravity="center"
+                                android:text=""
+                                android:textColor="#333333"
+                                android:textSize="24dp"
+                                app:layout_constraintBottom_toBottomOf="parent"
+                                app:layout_constraintEnd_toEndOf="parent"
+                                app:layout_constraintStart_toStartOf="parent"
+                                app:layout_constraintTop_toTopOf="parent"
+                                app:layout_constraintVertical_bias="0.68"></TextView>
+
+                            <FrameLayout
+                                android:layout_width="568dp"
+                                android:layout_height="78dp"
+                                android:layout_marginTop="115dp"
+                                android:background="@drawable/activity_loginalert_edit_bg"
+                                app:layout_constraintEnd_toEndOf="parent"
+                                app:layout_constraintStart_toStartOf="parent"
+                                app:layout_constraintTop_toTopOf="parent">
+
+                                <EditText
+                                    android:id="@+id/popupwindow_mi_sound_bind_phone_num_edit"
+                                    android:layout_width="match_parent"
+                                    android:layout_height="match_parent"
+                                    android:background="@null"
+                                    android:gravity="center|left"
+                                    android:hint="输入手机号码"
+                                    android:inputType="numberSigned"
+                                    android:maxLength="11"
+                                    android:paddingLeft="40dp"
+                                    android:textColorHint="#333333"
+                                    android:textSize="30dp"></EditText>
+                            </FrameLayout>
+
+                            <LinearLayout
+                                android:layout_width="568dp"
+                                android:layout_height="78dp"
+                                android:layout_marginTop="223dp"
+                                android:background="@drawable/activity_loginalert_edit_bg"
+                                android:orientation="horizontal"
+                                app:layout_constraintEnd_toEndOf="parent"
+                                app:layout_constraintStart_toStartOf="parent"
+                                app:layout_constraintTop_toTopOf="parent">
+
+                                <EditText
+                                    android:id="@+id/popupwindow_mi_sound_bind_phone_vcode_edit"
+                                    android:layout_width="350dp"
+                                    android:layout_height="match_parent"
+                                    android:background="@null"
+                                    android:gravity="center|left"
+                                    android:hint="输入验证码"
+                                    android:inputType="numberSigned"
+                                    android:maxLength="4"
+                                    android:paddingLeft="40dp"
+                                    android:textColorHint="#333333"
+                                    android:textSize="30dp"></EditText>
+
+                                <FrameLayout
+                                    android:id="@+id/activity_loginalert_getvercode"
+                                    android:layout_width="200dp"
+                                    android:layout_height="60dp"
+                                    android:layout_gravity="center|right"
+                                    android:layout_marginRight="25dp"
+                                    android:background="@drawable/activity_loginalert_verificationcode_bg">
+
+                                    <TextView
+                                        android:id="@+id/popupwindow_mi_sound_bind_phone_getvcode_text"
+                                        android:layout_width="match_parent"
+                                        android:layout_height="match_parent"
+                                        android:gravity="center"
+                                        android:text="获取验证码"
+                                        android:textColor="@color/white"
+                                        android:textSize="30dp"></TextView>
+                                </FrameLayout>
+                            </LinearLayout>
+
+                            <FrameLayout
+                                android:id="@+id/popupwindow_mi_sound_bind_phone_num_submit"
+                                android:layout_width="328dp"
+                                android:layout_height="80dp"
+                                android:layout_marginBottom="50dp"
+                                android:background="@drawable/activity_loginalert_btn_ok_bg"
+                                app:layout_constraintBottom_toBottomOf="parent"
+                                app:layout_constraintEnd_toEndOf="parent"
+                                app:layout_constraintStart_toStartOf="parent">
+
+                                <TextView
+                                    android:layout_width="match_parent"
+                                    android:layout_height="match_parent"
+                                    android:gravity="center"
+                                    android:text="确  定"
+                                    android:textColor="@color/white"
+                                    android:textSize="34dp"></TextView>
+                            </FrameLayout>
+
+                        </androidx.constraintlayout.widget.ConstraintLayout>
+
+                    </FrameLayout>
+
+                </FrameLayout>
+
+
+            </androidx.constraintlayout.widget.ConstraintLayout>
+
+
+            <!-- 绑定手机号 end-->
+
+
+            <!--扫码登录-->
+            <androidx.constraintlayout.widget.ConstraintLayout
+                android:id="@+id/popupwindow_mi_sound_show_bind_phoneNum_layout"
+                android:layout_width="686dp"
+                android:layout_height="515dp"
+                android:layout_gravity="center"
+                android:background="@drawable/mi_sound_login_bg"
+                android:visibility="gone"
+                app:layout_constraintBottom_toBottomOf="parent"
+                app:layout_constraintEnd_toEndOf="parent"
+                app:layout_constraintStart_toStartOf="parent"
+                app:layout_constraintTop_toTopOf="parent">
+
+
+                <TextView
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:text="已绑定手机号"
+                    android:textSize="35dp"
+                    app:layout_constraintBottom_toBottomOf="parent"
+                    app:layout_constraintEnd_toEndOf="parent"
+                    app:layout_constraintStart_toStartOf="parent"
+                    app:layout_constraintTop_toTopOf="parent"
+                    app:layout_constraintVertical_bias="0.37"></TextView>
+
+                <TextView
+                    android:id="@+id/popupwindow_mi_sound_show_bind_phoneNum_layout_phoneNum"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:text="手机号码 :"
+                    android:textSize="35dp"
+                    app:layout_constraintBottom_toBottomOf="parent"
+                    app:layout_constraintEnd_toEndOf="parent"
+                    app:layout_constraintStart_toStartOf="parent"
+                    app:layout_constraintTop_toTopOf="parent"
+                    app:layout_constraintVertical_bias="0.59000003"></TextView>
+            </androidx.constraintlayout.widget.ConstraintLayout>
+
+            <ImageView
+                android:id="@+id/popupwindow_mi_sound_qrcode_layout_close"
+                android:layout_width="60dp"
+                android:layout_height="60dp"
+                android:layout_marginTop="10dp"
+                android:src="@drawable/mi_sound_close"
+                app:layout_constraintBottom_toBottomOf="parent"
+                app:layout_constraintEnd_toEndOf="parent"
+                app:layout_constraintHorizontal_bias="0.78"
+                app:layout_constraintStart_toStartOf="parent"
+                app:layout_constraintTop_toTopOf="parent"
+                app:layout_constraintVertical_bias="0.110000014"></ImageView>
+
+        </androidx.constraintlayout.widget.ConstraintLayout>
+    </androidx.constraintlayout.widget.ConstraintLayout>
+</FrameLayout>