hanjing лет назад: 7
Родитель
Сommit
01b1b9bb3f

+ 3 - 3
app/build.gradle

@@ -350,7 +350,7 @@ dependencies {
 
     //    implementation 'com.google.zxing:core:3.3.0'
     implementation project(':ucrop')
-    implementation ('com.sunfusheng:marqueeview:1.3.3') {
+    implementation('com.sunfusheng:marqueeview:1.3.3') {
         exclude group: 'com.android.support', module: 'appcompat-v7'
     }
     implementation files('libs/alipaySdk-20170922.jar')
@@ -425,7 +425,7 @@ dependencies {
 //    implementation "com.android.support:exifinterface:$supportLibVersion"
 //    implementation project(':RxGalleryFinal')
     implementation "com.android.support:exifinterface:$supportLibVersion"
-    implementation ('com.qiniu:qiniu-android-sdk:7.3.13') {
+    implementation('com.qiniu:qiniu-android-sdk:7.3.13') {
         exclude group: 'com.squareup.okhttp3', module: 'okhttp'
     }
     //All arch: armeabi, armeabi-v7a, arm64-v8a, mips, x86
@@ -445,7 +445,7 @@ android.applicationVariants.all {
         variant.outputs.all {
             output ->
 //                if (buildType.name == "release") {
-                    outputFileName = "${productFlavors[0].name}_${buildType.name}_v${versionName}_${versionCode}-${releaseTime()}.apk"
+                outputFileName = "${productFlavors[0].name}_${buildType.name}_v${versionName}_${versionCode}-${releaseTime()}.apk"
 //                }
 
         }

+ 16 - 12
app/src/main/AndroidManifest.xml

@@ -86,7 +86,6 @@
     <uses-permission
         android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS"
         tools:ignore="ProtectedPermissions" />
-
     <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
     <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
     <uses-permission android:name="android.permission.CAMERA" />
@@ -100,6 +99,7 @@
         android:name="android.permission.FLASHLIGHT"
         android:permissionGroup="android.permission-group.HARDWARE_CONTROLS"
         android:protectionLevel="normal" />
+
     <!-- 百度定位权限 end -->
     <application
         android:name=".SheepApp"
@@ -202,9 +202,9 @@
             android:screenOrientation="portrait"
             android:theme="@style/SplashTheme">
             <intent-filter>
-            <action android:name="android.intent.action.MAIN" />
+                <action android:name="android.intent.action.MAIN" />
 
-            <category android:name="android.intent.category.LAUNCHER" />
+                <category android:name="android.intent.category.LAUNCHER" />
             </intent-filter>
         </activity>
         <activity
@@ -643,11 +643,12 @@
         <meta-data
             android:name="com.baidu.lbsapi.API_KEY"
             android:value="gXD6RhE7ncVIcl1crk5SeUoVm7ceNtkL" />
+
         <service
             android:name="com.baidu.location.f"
             android:enabled="true"
-            android:process=":remote"></service>
-        <!--  百度定位 sdk end -->
+            android:process=":remote" />
+        <!-- 百度定位 sdk end -->
 
         <activity
             android:name="com.sheep.gamegroup.view.activity.ActNotice"
@@ -704,7 +705,7 @@
             android:name="com.sheep.gamegroup.view.activity.MessageInteractionDetailActivity"
             android:exported="true" />
 
-        <!--start幂动科技-->
+        <!-- start幂动科技 -->
 
         <activity
             android:name="com.sheep.gamegroup.view.activity.ActMiDong"
@@ -864,13 +865,16 @@
             android:screenOrientation="portrait" />
         <activity
             android:name="com.sheep.gamegroup.module.login.LoginAct"
-            android:theme="@style/AppActionTheme"
-            android:screenOrientation="portrait">
-        </activity>
+            android:screenOrientation="portrait"
+            android:theme="@style/AppActionTheme"></activity>
         <activity
             android:name="com.sheep.gamegroup.module.login.ChangePasswordAct"
-            android:theme="@style/AppActionTheme"
-            android:screenOrientation="portrait"></activity>
+            android:screenOrientation="portrait"
+            android:theme="@style/AppActionTheme" />
+        <activity
+            android:name="com.sheep.gamegroup.module.login.ReLoginNameAct"
+            android:screenOrientation="portrait"
+            android:theme="@style/AppActionTheme"></activity>
     </application>
 
-</manifest>
+</manifest>

+ 15 - 15
app/src/main/java/com/sheep/gamegroup/greendao/download/DaoMaster.java

@@ -21,26 +21,26 @@ public class DaoMaster extends AbstractDaoMaster {
 
     /** Creates underlying database table using DAOs. */
     public static void createAllTables(Database db, boolean ifNotExists) {
-        AcceptTaskRecordDao.createTable(db, ifNotExists);
-        AppdownloadBeanDao.createTable(db, ifNotExists);
-        DownLoadInfoDao.createTable(db, ifNotExists);
         ProcessRecordDao.createTable(db, ifNotExists);
-        ScreenShotRecordDao.createTable(db, ifNotExists);
+        AppdownloadBeanDao.createTable(db, ifNotExists);
         SdkLoginUserDao.createTable(db, ifNotExists);
-        SearchRecordDao.createTable(db, ifNotExists);
+        ScreenShotRecordDao.createTable(db, ifNotExists);
+        AcceptTaskRecordDao.createTable(db, ifNotExists);
         AccountDao.createTable(db, ifNotExists);
+        SearchRecordDao.createTable(db, ifNotExists);
+        DownLoadInfoDao.createTable(db, ifNotExists);
     }
 
     /** Drops underlying database table using DAOs. */
     public static void dropAllTables(Database db, boolean ifExists) {
-        AcceptTaskRecordDao.dropTable(db, ifExists);
-        AppdownloadBeanDao.dropTable(db, ifExists);
-        DownLoadInfoDao.dropTable(db, ifExists);
         ProcessRecordDao.dropTable(db, ifExists);
-        ScreenShotRecordDao.dropTable(db, ifExists);
+        AppdownloadBeanDao.dropTable(db, ifExists);
         SdkLoginUserDao.dropTable(db, ifExists);
-        SearchRecordDao.dropTable(db, ifExists);
+        ScreenShotRecordDao.dropTable(db, ifExists);
+        AcceptTaskRecordDao.dropTable(db, ifExists);
         AccountDao.dropTable(db, ifExists);
+        SearchRecordDao.dropTable(db, ifExists);
+        DownLoadInfoDao.dropTable(db, ifExists);
     }
 
     /**
@@ -59,14 +59,14 @@ public class DaoMaster extends AbstractDaoMaster {
 
     public DaoMaster(Database db) {
         super(db, SCHEMA_VERSION);
-        registerDaoClass(AcceptTaskRecordDao.class);
-        registerDaoClass(AppdownloadBeanDao.class);
-        registerDaoClass(DownLoadInfoDao.class);
         registerDaoClass(ProcessRecordDao.class);
-        registerDaoClass(ScreenShotRecordDao.class);
+        registerDaoClass(AppdownloadBeanDao.class);
         registerDaoClass(SdkLoginUserDao.class);
-        registerDaoClass(SearchRecordDao.class);
+        registerDaoClass(ScreenShotRecordDao.class);
+        registerDaoClass(AcceptTaskRecordDao.class);
         registerDaoClass(AccountDao.class);
+        registerDaoClass(SearchRecordDao.class);
+        registerDaoClass(DownLoadInfoDao.class);
     }
 
     public DaoSession newSession() {

+ 58 - 58
app/src/main/java/com/sheep/gamegroup/greendao/download/DaoSession.java

@@ -8,23 +8,23 @@ import org.greenrobot.greendao.database.Database;
 import org.greenrobot.greendao.identityscope.IdentityScopeType;
 import org.greenrobot.greendao.internal.DaoConfig;
 
-import com.sheep.gamegroup.greendao.download.AcceptTaskRecord;
-import com.sheep.gamegroup.greendao.download.AppdownloadBean;
-import com.sheep.gamegroup.greendao.download.DownLoadInfo;
 import com.sheep.gamegroup.greendao.download.ProcessRecord;
-import com.sheep.gamegroup.greendao.download.ScreenShotRecord;
+import com.sheep.gamegroup.greendao.download.AppdownloadBean;
 import com.sheep.gamegroup.greendao.download.SdkLoginUser;
-import com.sheep.gamegroup.greendao.download.SearchRecord;
+import com.sheep.gamegroup.greendao.download.ScreenShotRecord;
+import com.sheep.gamegroup.greendao.download.AcceptTaskRecord;
 import com.sheep.gamegroup.greendao.download.Account;
+import com.sheep.gamegroup.greendao.download.SearchRecord;
+import com.sheep.gamegroup.greendao.download.DownLoadInfo;
 
-import com.sheep.gamegroup.greendao.download.AcceptTaskRecordDao;
-import com.sheep.gamegroup.greendao.download.AppdownloadBeanDao;
-import com.sheep.gamegroup.greendao.download.DownLoadInfoDao;
 import com.sheep.gamegroup.greendao.download.ProcessRecordDao;
-import com.sheep.gamegroup.greendao.download.ScreenShotRecordDao;
+import com.sheep.gamegroup.greendao.download.AppdownloadBeanDao;
 import com.sheep.gamegroup.greendao.download.SdkLoginUserDao;
-import com.sheep.gamegroup.greendao.download.SearchRecordDao;
+import com.sheep.gamegroup.greendao.download.ScreenShotRecordDao;
+import com.sheep.gamegroup.greendao.download.AcceptTaskRecordDao;
 import com.sheep.gamegroup.greendao.download.AccountDao;
+import com.sheep.gamegroup.greendao.download.SearchRecordDao;
+import com.sheep.gamegroup.greendao.download.DownLoadInfoDao;
 
 // THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
 
@@ -35,112 +35,112 @@ import com.sheep.gamegroup.greendao.download.AccountDao;
  */
 public class DaoSession extends AbstractDaoSession {
 
-    private final DaoConfig acceptTaskRecordDaoConfig;
-    private final DaoConfig appdownloadBeanDaoConfig;
-    private final DaoConfig downLoadInfoDaoConfig;
     private final DaoConfig processRecordDaoConfig;
-    private final DaoConfig screenShotRecordDaoConfig;
+    private final DaoConfig appdownloadBeanDaoConfig;
     private final DaoConfig sdkLoginUserDaoConfig;
-    private final DaoConfig searchRecordDaoConfig;
+    private final DaoConfig screenShotRecordDaoConfig;
+    private final DaoConfig acceptTaskRecordDaoConfig;
     private final DaoConfig accountDaoConfig;
+    private final DaoConfig searchRecordDaoConfig;
+    private final DaoConfig downLoadInfoDaoConfig;
 
-    private final AcceptTaskRecordDao acceptTaskRecordDao;
-    private final AppdownloadBeanDao appdownloadBeanDao;
-    private final DownLoadInfoDao downLoadInfoDao;
     private final ProcessRecordDao processRecordDao;
-    private final ScreenShotRecordDao screenShotRecordDao;
+    private final AppdownloadBeanDao appdownloadBeanDao;
     private final SdkLoginUserDao sdkLoginUserDao;
-    private final SearchRecordDao searchRecordDao;
+    private final ScreenShotRecordDao screenShotRecordDao;
+    private final AcceptTaskRecordDao acceptTaskRecordDao;
     private final AccountDao accountDao;
+    private final SearchRecordDao searchRecordDao;
+    private final DownLoadInfoDao downLoadInfoDao;
 
     public DaoSession(Database db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
             daoConfigMap) {
         super(db);
 
-        acceptTaskRecordDaoConfig = daoConfigMap.get(AcceptTaskRecordDao.class).clone();
-        acceptTaskRecordDaoConfig.initIdentityScope(type);
+        processRecordDaoConfig = daoConfigMap.get(ProcessRecordDao.class).clone();
+        processRecordDaoConfig.initIdentityScope(type);
 
         appdownloadBeanDaoConfig = daoConfigMap.get(AppdownloadBeanDao.class).clone();
         appdownloadBeanDaoConfig.initIdentityScope(type);
 
-        downLoadInfoDaoConfig = daoConfigMap.get(DownLoadInfoDao.class).clone();
-        downLoadInfoDaoConfig.initIdentityScope(type);
-
-        processRecordDaoConfig = daoConfigMap.get(ProcessRecordDao.class).clone();
-        processRecordDaoConfig.initIdentityScope(type);
+        sdkLoginUserDaoConfig = daoConfigMap.get(SdkLoginUserDao.class).clone();
+        sdkLoginUserDaoConfig.initIdentityScope(type);
 
         screenShotRecordDaoConfig = daoConfigMap.get(ScreenShotRecordDao.class).clone();
         screenShotRecordDaoConfig.initIdentityScope(type);
 
-        sdkLoginUserDaoConfig = daoConfigMap.get(SdkLoginUserDao.class).clone();
-        sdkLoginUserDaoConfig.initIdentityScope(type);
+        acceptTaskRecordDaoConfig = daoConfigMap.get(AcceptTaskRecordDao.class).clone();
+        acceptTaskRecordDaoConfig.initIdentityScope(type);
+
+        accountDaoConfig = daoConfigMap.get(AccountDao.class).clone();
+        accountDaoConfig.initIdentityScope(type);
 
         searchRecordDaoConfig = daoConfigMap.get(SearchRecordDao.class).clone();
         searchRecordDaoConfig.initIdentityScope(type);
 
-        accountDaoConfig = daoConfigMap.get(AccountDao.class).clone();
-        accountDaoConfig.initIdentityScope(type);
+        downLoadInfoDaoConfig = daoConfigMap.get(DownLoadInfoDao.class).clone();
+        downLoadInfoDaoConfig.initIdentityScope(type);
 
-        acceptTaskRecordDao = new AcceptTaskRecordDao(acceptTaskRecordDaoConfig, this);
-        appdownloadBeanDao = new AppdownloadBeanDao(appdownloadBeanDaoConfig, this);
-        downLoadInfoDao = new DownLoadInfoDao(downLoadInfoDaoConfig, this);
         processRecordDao = new ProcessRecordDao(processRecordDaoConfig, this);
-        screenShotRecordDao = new ScreenShotRecordDao(screenShotRecordDaoConfig, this);
+        appdownloadBeanDao = new AppdownloadBeanDao(appdownloadBeanDaoConfig, this);
         sdkLoginUserDao = new SdkLoginUserDao(sdkLoginUserDaoConfig, this);
-        searchRecordDao = new SearchRecordDao(searchRecordDaoConfig, this);
+        screenShotRecordDao = new ScreenShotRecordDao(screenShotRecordDaoConfig, this);
+        acceptTaskRecordDao = new AcceptTaskRecordDao(acceptTaskRecordDaoConfig, this);
         accountDao = new AccountDao(accountDaoConfig, this);
+        searchRecordDao = new SearchRecordDao(searchRecordDaoConfig, this);
+        downLoadInfoDao = new DownLoadInfoDao(downLoadInfoDaoConfig, this);
 
-        registerDao(AcceptTaskRecord.class, acceptTaskRecordDao);
-        registerDao(AppdownloadBean.class, appdownloadBeanDao);
-        registerDao(DownLoadInfo.class, downLoadInfoDao);
         registerDao(ProcessRecord.class, processRecordDao);
-        registerDao(ScreenShotRecord.class, screenShotRecordDao);
+        registerDao(AppdownloadBean.class, appdownloadBeanDao);
         registerDao(SdkLoginUser.class, sdkLoginUserDao);
-        registerDao(SearchRecord.class, searchRecordDao);
+        registerDao(ScreenShotRecord.class, screenShotRecordDao);
+        registerDao(AcceptTaskRecord.class, acceptTaskRecordDao);
         registerDao(Account.class, accountDao);
+        registerDao(SearchRecord.class, searchRecordDao);
+        registerDao(DownLoadInfo.class, downLoadInfoDao);
     }
     
     public void clear() {
-        acceptTaskRecordDaoConfig.clearIdentityScope();
-        appdownloadBeanDaoConfig.clearIdentityScope();
-        downLoadInfoDaoConfig.clearIdentityScope();
         processRecordDaoConfig.clearIdentityScope();
-        screenShotRecordDaoConfig.clearIdentityScope();
+        appdownloadBeanDaoConfig.clearIdentityScope();
         sdkLoginUserDaoConfig.clearIdentityScope();
-        searchRecordDaoConfig.clearIdentityScope();
+        screenShotRecordDaoConfig.clearIdentityScope();
+        acceptTaskRecordDaoConfig.clearIdentityScope();
         accountDaoConfig.clearIdentityScope();
+        searchRecordDaoConfig.clearIdentityScope();
+        downLoadInfoDaoConfig.clearIdentityScope();
     }
 
-    public AcceptTaskRecordDao getAcceptTaskRecordDao() {
-        return acceptTaskRecordDao;
+    public ProcessRecordDao getProcessRecordDao() {
+        return processRecordDao;
     }
 
     public AppdownloadBeanDao getAppdownloadBeanDao() {
         return appdownloadBeanDao;
     }
 
-    public DownLoadInfoDao getDownLoadInfoDao() {
-        return downLoadInfoDao;
-    }
-
-    public ProcessRecordDao getProcessRecordDao() {
-        return processRecordDao;
+    public SdkLoginUserDao getSdkLoginUserDao() {
+        return sdkLoginUserDao;
     }
 
     public ScreenShotRecordDao getScreenShotRecordDao() {
         return screenShotRecordDao;
     }
 
-    public SdkLoginUserDao getSdkLoginUserDao() {
-        return sdkLoginUserDao;
+    public AcceptTaskRecordDao getAcceptTaskRecordDao() {
+        return acceptTaskRecordDao;
+    }
+
+    public AccountDao getAccountDao() {
+        return accountDao;
     }
 
     public SearchRecordDao getSearchRecordDao() {
         return searchRecordDao;
     }
 
-    public AccountDao getAccountDao() {
-        return accountDao;
+    public DownLoadInfoDao getDownLoadInfoDao() {
+        return downLoadInfoDao;
     }
 
 }

+ 15 - 6
app/src/main/java/com/sheep/gamegroup/model/entity/UserEntity.java

@@ -27,6 +27,8 @@ public class UserEntity implements Serializable {
     private String nickname;//test332211,
     @Column(name = "user_name")
     private String user_name;//test332211,
+    @Column(name = "set_password")
+    private int set_password = 0;//test332211,
     @Column(name = "balance")
     private String balance;//0,
     @Column(name = "invitation_code")
@@ -350,10 +352,13 @@ public class UserEntity implements Serializable {
         this.bind_flag = bind_flag;
     }
 
+    public int getSet_password() {
+        return set_password;
+    }
 
-
-
-
+    public void setSet_password(int set_password) {
+        this.set_password = set_password;
+    }
 
     public boolean isNewRegistUser() {//新注册用户
         return TextUtils.equals(create_time, last_login_time);
@@ -382,27 +387,31 @@ public class UserEntity implements Serializable {
     public String getShareLink() {//测试服对应的下载地址为http://10.8.230.17:7776/newsheep?id=32778005
         return TestUtil.isSheep() ? getShare_link() : "http://10.8.210.230:8902/share.html?invitation_code=" + getInvitation_code();
     }
+
     /**
      * 是否绑定手机号
      */
-    public boolean isBindMobile(){
+    public boolean isBindMobile() {
         return BinaryUtils.is(bind_flag, 1);
     }
+
     /**
      * 是否绑定QQ号
      */
-    public boolean isBindQQ(){
+    public boolean isBindQQ() {
         return BinaryUtils.is(bind_flag, 2);
     }
+
     /**
      * 是否绑定微信号
      */
-    public boolean isBindWx(){
+    public boolean isBindWx() {
         return BinaryUtils.is(bind_flag, 3);
     }
 
     /**
      * 是否是官方包注册用户
+     *
      * @return
      */
     public boolean isKfzsPackageUser() {

+ 76 - 0
app/src/main/java/com/sheep/gamegroup/module/login/ReLoginNameAct.java

@@ -0,0 +1,76 @@
+package com.sheep.gamegroup.module.login;
+
+import android.app.Activity;
+import android.os.Bundle;
+import android.text.TextUtils;
+import android.view.View;
+import android.widget.EditText;
+
+import com.alibaba.fastjson.JSONObject;
+import com.sheep.gamegroup.absBase.BaseActivity;
+import com.sheep.gamegroup.model.entity.BaseMessage;
+import com.sheep.gamegroup.model.util.SheepSubscriber;
+import com.sheep.gamegroup.util.DataUtil;
+import com.sheep.gamegroup.util.StringUtils;
+import com.sheep.jiuyan.samllsheep.R;
+import com.sheep.jiuyan.samllsheep.SheepApp;
+import com.sheep.jiuyan.samllsheep.utils.G;
+import com.sheep.jiuyan.samllsheep.utils.TitleBarUtils;
+
+import butterknife.BindView;
+import butterknife.OnClick;
+import io.reactivex.android.schedulers.AndroidSchedulers;
+import io.reactivex.schedulers.Schedulers;
+
+public class ReLoginNameAct extends BaseActivity {
+
+    @BindView(R.id.login_name_box)
+    EditText loginNameBox;
+
+    @Override
+    protected int getLayoutId() {
+        return R.layout.activity_re_login_name;
+    }
+
+    @Override
+    public void initView() {
+        TitleBarUtils.getInstance().setShowOrHide(this, true);
+        String name = getIntent().getStringExtra("name");
+        if(!TextUtils.isEmpty(name)){
+            loginNameBox.setText(name);
+        }
+    }
+
+    @OnClick(R.id.submit_btn)
+    public void doSubmit(View v){
+        if(TextUtils.isEmpty(loginNameBox.getText().toString().trim())){
+            G.shortToast("请填写新的登录名");
+            return;
+        }
+        if(!StringUtils.isUserName(loginNameBox.getText().toString().trim())){
+            G.shortToast("用户名格式有误");
+            return;
+        }
+        showProgress();
+        JSONObject json = new JSONObject();
+        json.put("user_name", loginNameBox.getText().toString().trim());
+        SheepApp.getInstance().getNetComponent().getApiService().changeBaseInfo(json)
+                .subscribeOn(Schedulers.io())
+                .observeOn(AndroidSchedulers.mainThread())
+                .subscribe(new SheepSubscriber<BaseMessage>(SheepApp.getInstance()){
+
+                    @Override
+                    public void onNext(BaseMessage baseMessage) {
+                        hideProgress();
+                        DataUtil.getInstance().setUserLoginName(loginNameBox.getText().toString().trim());
+                        finish();
+                    }
+
+                    @Override
+                    public void onError(BaseMessage baseMessage) {
+                        hideProgress();
+                        G.shortToast(baseMessage);
+                    }
+                });
+    }
+}

+ 7 - 0
app/src/main/java/com/sheep/gamegroup/util/DataUtil.java

@@ -183,6 +183,13 @@ public class DataUtil {
             userEntity.setNickname(nickname);
 
     }
+
+    public void setUserLoginName(String loginname) {
+        if (userEntity != null)
+            userEntity.setUser_name(loginname);
+
+    }
+
     public void setUserAvatar(String avatar) {
         if (userEntity != null)
             userEntity.setAvatar(avatar);

+ 1 - 0
app/src/main/java/com/sheep/gamegroup/util/UMConfigUtils.java

@@ -129,6 +129,7 @@ public class UMConfigUtils {
         RECHARGE_QQ_PAY("充值Q币 -> 立即支付"),//5088
         USER_INFO_AVATAR("个人中心 -> 个人资料 -> 头像"),//5089
         USER_INFO_NAME("个人中心 -> 个人资料 -> 昵称"),//5090
+        USER_INFO_LOGINNAME("个人中心 -> 个人资料 -> 登录名"),//5090
         USER_INFO_NAME_MODIFY("个人中心 -> 个人资料 -> 昵称 -> 确认修改"),//5091
         QR_SHARE("我的二维码"),//5092
         QR_SAVE("保存二维码至手机"),//5093

+ 39 - 24
app/src/main/java/com/sheep/gamegroup/view/activity/PersonalInfoAct.java

@@ -14,6 +14,7 @@ import com.sheep.gamegroup.absBase.AbsObserver;
 import com.sheep.gamegroup.model.entity.BaseMessage;
 import com.sheep.gamegroup.model.entity.UserEntity;
 import com.sheep.gamegroup.model.util.SheepSubscriber;
+import com.sheep.gamegroup.module.login.ReLoginNameAct;
 import com.sheep.gamegroup.util.CommonUtil;
 import com.sheep.gamegroup.util.DataUtil;
 import com.sheep.gamegroup.util.GlideImageLoader;
@@ -41,6 +42,7 @@ import static com.sheep.gamegroup.util.UMConfigUtils.Event.BIND_QQ;
 import static com.sheep.gamegroup.util.UMConfigUtils.Event.BIND_TX_WX;
 import static com.sheep.gamegroup.util.UMConfigUtils.Event.BIND_WX;
 import static com.sheep.gamegroup.util.UMConfigUtils.Event.USER_INFO_AVATAR;
+import static com.sheep.gamegroup.util.UMConfigUtils.Event.USER_INFO_LOGINNAME;
 import static com.sheep.gamegroup.util.UMConfigUtils.Event.USER_INFO_NAME;
 
 
@@ -53,6 +55,8 @@ public class PersonalInfoAct extends AbsChooseImageActivity {
     UserEntity userEntity;
     @BindView(R.id.personal_info_name)
     TextView personal_info_name;
+    @BindView(R.id.personal_info_loginname)
+    TextView personal_info_loginname;
     @BindView(R.id.personal_info_code)
     TextView personal_info_code;
     @BindView(R.id.personal_info_qr)
@@ -145,7 +149,7 @@ public class PersonalInfoAct extends AbsChooseImageActivity {
 
     public void upLoadBirthday(final String birthday) {
         JSONObject j = new JSONObject();
-        j.put("birthday",birthday+"T00:00:00Z");
+        j.put("birthday", birthday + "T00:00:00Z");
         SheepApp.getInstance().getNetComponent().getApiService().changeBaseInfo(j)
                 .subscribeOn(Schedulers.io())
                 .observeOn(AndroidSchedulers.mainThread())
@@ -171,7 +175,8 @@ public class PersonalInfoAct extends AbsChooseImageActivity {
     @OnClick({R.id.personal_info_avatar_container, R.id.personal_info_name_container, R.id.personal_info_qr_container,
             R.id.personal_info_phone_container, R.id.personal_info_bind_tx_wx_container,
             R.id.personal_info_bind_qq_container, R.id.personal_info_bind_wx_container,
-            R.id.personal_info_authentication_container, R.id.llayout_sex, R.id.llayout_birthday})
+            R.id.personal_info_authentication_container, R.id.llayout_sex, R.id.llayout_birthday,
+            R.id.personal_info_loginname_container})
 
     public void onClick(View view) {
         if (userEntity == null) {
@@ -182,15 +187,9 @@ public class PersonalInfoAct extends AbsChooseImageActivity {
             case R.id.llayout_sex://用户性别
                 ViewUtil.choiceSex(PersonalInfoAct.this, getCurrentFocus());
                 break;
-//            case R.id.tv_sex://用户性别
-//                ViewUtil.choiceSex(PersonalInfoAct.this, getCurrentFocus());
-//                break;
             case R.id.llayout_birthday://用户生日
-                ViewUtil.showDateDialog(PersonalInfoAct.this, tvBirthday,TextUtils.isEmpty(userEntity.getBirthday())?"1990-01-01":userEntity.getBirthday());
+                ViewUtil.showDateDialog(PersonalInfoAct.this, tvBirthday, TextUtils.isEmpty(userEntity.getBirthday()) ? "1990-01-01" : userEntity.getBirthday());
                 break;
-//            case R.id.tv_birthday:
-//                ViewUtil.showDateDialog(PersonalInfoAct.this, tvBirthday,TextUtils.isEmpty(userEntity.getBirthday())?"1990-01-01":userEntity.getBirthday());
-//                break;
             case R.id.personal_info_avatar_container://头像
                 showChooseDialog();
                 USER_INFO_AVATAR.onEvent();
@@ -201,6 +200,14 @@ public class PersonalInfoAct extends AbsChooseImageActivity {
                 startActivity(i);
                 USER_INFO_NAME.onEvent();
                 break;
+            case R.id.personal_info_loginname_container:
+                if (userEntity.getSet_password() == 0) {
+                    Intent intent = new Intent(PersonalInfoAct.this, ReLoginNameAct.class);
+                    intent.putExtra("name", userEntity.getUser_name());
+                    startActivity(intent);
+                    USER_INFO_LOGINNAME.onEvent();
+                }
+                break;
             case R.id.personal_info_qr_container:
                 ViewUtil.showQR(PersonalInfoAct.this, userEntity.getShareLink(ShareLinkConfig.OTHER));
                 break;
@@ -212,7 +219,7 @@ public class PersonalInfoAct extends AbsChooseImageActivity {
                 CommonUtil.getInstance().callActionWithUserInfo(new Action1<UserEntity>() {
                     @Override
                     public void call(UserEntity userEntity) {
-                        if(userEntity == null){
+                        if (userEntity == null) {
                             G.showToast(R.string.error_data);
                         } else if (TextUtils.isEmpty(userEntity.getWx_openid())) {
                             Jump2View.getInstance().goNoBindWx(activity, ChangeWxOrTelAct.TYPE_NORMAL);
@@ -227,11 +234,11 @@ public class PersonalInfoAct extends AbsChooseImageActivity {
                 CommonUtil.getInstance().callActionWithUserInfo(new Action1<UserEntity>() {
                     @Override
                     public void call(UserEntity userEntity) {
-                        if(userEntity == null){
+                        if (userEntity == null) {
                             G.showToast(R.string.error_data);
-                        } else if(!userEntity.isBindMobile()){
+                        } else if (!userEntity.isBindMobile()) {
                             G.showToast("请先绑定手机号");
-                        } else if(!userEntity.isBindQQ()){
+                        } else if (!userEntity.isBindQQ()) {
                             bindQQ();
                         } else {
                             Jump2View.getInstance().goBindThird(activity, ActModifyThird.THIRD_TYPE_QQ);
@@ -244,11 +251,11 @@ public class PersonalInfoAct extends AbsChooseImageActivity {
                 CommonUtil.getInstance().callActionWithUserInfo(new Action1<UserEntity>() {
                     @Override
                     public void call(UserEntity userEntity) {
-                        if(userEntity == null){
+                        if (userEntity == null) {
                             G.showToast(R.string.error_data);
-                        } else if(!userEntity.isBindMobile()){
+                        } else if (!userEntity.isBindMobile()) {
                             G.showToast("请先绑定手机号");
-                        } else if(!userEntity.isBindWx()){
+                        } else if (!userEntity.isBindWx()) {
                             bindWX();
                         } else {
                             Jump2View.getInstance().goBindThird(activity, ActModifyThird.THIRD_TYPE_WX);
@@ -288,6 +295,7 @@ public class PersonalInfoAct extends AbsChooseImageActivity {
             }
         });
     }
+
     private void bindWX() {
         UMShareAPI.get(this).deleteOauth(this, SHARE_MEDIA.WEIXIN, new UMAuthListener() {
             @Override
@@ -337,11 +345,12 @@ public class PersonalInfoAct extends AbsChooseImageActivity {
 
     /**
      * access_token	string
-     open_id	string
-     platform	string
-            qzone, wechat
-     s_from	string
-            sheep, web_sheep
+     * open_id	string
+     * platform	string
+     * qzone, wechat
+     * s_from	string
+     * sheep, web_sheep
+     *
      * @param access_token
      * @param openid
      */
@@ -361,7 +370,7 @@ public class PersonalInfoAct extends AbsChooseImageActivity {
                         CommonUtil.getInstance().updateUserInfo(new Action1<UserEntity>() {
                             @Override
                             public void call(UserEntity result) {
-                                if(result != null){
+                                if (result != null) {
                                     userEntity = result;
                                     loadUserInfo();
                                 }
@@ -402,6 +411,7 @@ public class PersonalInfoAct extends AbsChooseImageActivity {
                         onGetNetImageUrl(url);
                         dismissLoaddingDialog();
                     }
+
                     @Override
                     public void onError(Throwable throwable) {
                         updateError("失败");
@@ -436,9 +446,14 @@ public class PersonalInfoAct extends AbsChooseImageActivity {
     }
 
     private void loadUserInfo() {
-        tvSex.setText((userEntity.getGender()==0)?"点击设置":(userEntity.getGender()==1?"男":"女"));
-        tvBirthday.setText((userEntity.getBirthday().substring(0,1)).equals("0")?"点击设置":userEntity.getBirthday().substring(0,10));
+        tvSex.setText((userEntity.getGender() == 0) ? "点击设置" : (userEntity.getGender() == 1 ? "男" : "女"));
+        tvBirthday.setText((userEntity.getBirthday().substring(0, 1)).equals("0") ? "点击设置" : userEntity.getBirthday().substring(0, 10));
         personal_info_name.setText(userEntity.getNickname());
+        if(TextUtils.isEmpty(userEntity.getUser_name())){
+            personal_info_loginname.setText("还未设置登录名");
+        }else {
+            personal_info_loginname.setText(userEntity.getUser_name());
+        }
         personal_info_code.setText(userEntity.getInvitation_code());
 
         GlideImageLoader.saveAndSetRqImage(personal_info_qr, userEntity.getShareLink(ShareLinkConfig.FACE_TO_FACE), 90);

+ 46 - 0
app/src/main/res/layout/activity_re_login_name.xml

@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:gravity="center_horizontal"
+    android:orientation="vertical"
+    android:padding="@dimen/content_padding_24"
+    tools:context="com.sheep.gamegroup.module.login.fragments.OldPasswordFgt">
+
+    <TextView
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="50dp"
+        android:gravity="center"
+        android:text="输入唯一标识,设置唯一登录名下次可直接登录"
+        android:textColor="@color/gray_4"
+        android:textSize="14sp"
+        android:textStyle="bold" />
+
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:orientation="horizontal">
+
+        <EditText
+            android:id="@+id/login_name_box"
+            android:layout_weight="1"
+            android:gravity="center"
+            style="@style/login_edit_style"
+            android:hint="(如邮件地支、英文名等唯一标识)" />
+
+    </LinearLayout>
+
+    <View style="@style/login_separetor_line_style" />
+
+
+
+    <Button
+        android:id="@+id/submit_btn"
+        style="@style/login_theme_round_button"
+        android:layout_marginTop="100dp"
+        android:text="确定" />
+
+</LinearLayout>

+ 17 - 0
app/src/main/res/layout/xpersion_info_act_layout.xml

@@ -43,6 +43,23 @@
             <View style="@style/style_item_line_3_0" />
 
             <LinearLayout
+                android:id="@+id/personal_info_loginname_container"
+                style="@style/style_item_container">
+
+                <TextView
+                    style="@style/style_item_label"
+                    android:text="@string/loginname" />
+
+
+                <TextView
+                    android:id="@+id/personal_info_loginname"
+                    style="@style/style_item_end_next" />
+
+            </LinearLayout>
+
+            <View style="@style/style_item_line_3_0" />
+
+            <LinearLayout
                 android:id="@+id/personal_info_name_container"
                 style="@style/style_item_container">
 

+ 1 - 0
app/src/main/res/values/gamegroup_string.xml

@@ -10,6 +10,7 @@
     <string name="auther">实名认证</string>
 
     <string name="header">头像</string>
+    <string name="loginname">登录名</string>
     <string name="niker">昵称</string>
     <string name="sheep_id">绵羊号</string>
     <string name="my_qr">我的二维码</string>