Quellcode durchsuchen

1.修复个人中心,底部的联系方式,从二级页面提交信息后返回个人中心变成了null。

石慧云 vor 4 Jahren
Ursprung
Commit
91fa845133

+ 26 - 26
app/src/main/java/com/quansu/heifengwuliu/fragment/OwnerMoreFragment.kt

@@ -165,28 +165,28 @@ class OwnerMoreFragment : MBFragment<OwnerMoreVModel, FragmentOwnermoreBinding>(
             UiSwitch.singleRes(this, CollectionActivity::class.java, MIntentAction.REQUEST_CODE_THREE)
 
         }
-        binding.viewHead.getEtName()!!.addTextChangedListener(textWatcher)
+//        binding.viewHead.getEtName()!!.addTextChangedListener(textWatcher)
 
     }
 
-    var oldNmae:String=""
-
-    var  textWatcher= object: SimpleTextWatcher(){
-        override fun afterTextChanged(s: Editable?) {
-            super.afterTextChanged(s)
-
-            var name=s.toString()
-            if(!TextUtils.isEmpty(oldNmae)&& oldNmae == name){
-                return
-            }
-            if(!TextUtils.isEmpty(name)) {
-                if (!VerifyUtils.isLegalName(name)) {
-                    toast("装货人姓名格式不对!!")
-                    return
-                }
-            }
-        }
-    }
+   // var oldNmae:String=""
+
+//    var  textWatcher= object: SimpleTextWatcher(){
+//        override fun afterTextChanged(s: Editable?) {
+//            super.afterTextChanged(s)
+//
+//            var name=s.toString()
+//            if(!TextUtils.isEmpty(oldNmae)&& oldNmae == name){
+//                return
+//            }
+//            if(!TextUtils.isEmpty(name)) {
+//                if (!VerifyUtils.isLegalName(name)) {
+//                    toast("装货人姓名格式不对!!")
+//                    return
+//                }
+//            }
+//        }
+//    }
 
     private fun judgeValue() {
 
@@ -409,13 +409,13 @@ class OwnerMoreFragment : MBFragment<OwnerMoreVModel, FragmentOwnermoreBinding>(
                         5->list[pos].mobile=str.toString()
                         6->list[pos].address=str.toString()
                         7->{
-                            if(!TextUtils.isEmpty(str)){
-
-                                if(!VerifyUtils.isLegalName(str!!)){
-                                    toast("卸货人姓名格式不对!!")
-                                    return
-                                }
-                            }
+//                            if(!TextUtils.isEmpty(str)){
+//
+//                                if(!VerifyUtils.isLegalName(str!!)){
+//                                    toast("卸货人姓名格式不对!!")
+//                                    return
+//                                }
+//                            }
 
                             list[pos].goods=str.toString()
                            }

+ 18 - 18
app/src/main/java/com/quansu/heifengwuliu/fragment/OwnerSingleFragment.kt

@@ -204,28 +204,28 @@ class OwnerSingleFragment : MBFragment<OwnerSingleVModel, FragmentOwnersingleBin
             UiSwitch.singleRes(this, CollectionActivity::class.java, MIntentAction.REQUEST_CODE_THREE)
 
         }
-        binding.viewHead.getEtName()!!.addTextChangedListener(textWatcher)
+//        binding.viewHead.getEtName()!!.addTextChangedListener(textWatcher)
 
 
     }
 
-    var oldNmae:String=""
-    var  textWatcher= object: SimpleTextWatcher(){
-        override fun afterTextChanged(s: Editable?) {
-            super.afterTextChanged(s)
-
-            var name=s.toString()
-            if(!TextUtils.isEmpty(oldNmae)&& oldNmae == name){
-                return
-            }
-            if(!TextUtils.isEmpty(name)) {
-                if (!VerifyUtils.isLegalName(name)) {
-                    toast("装货人姓名格式不对!!")
-                    return
-                }
-            }
-        }
-    }
+//    var oldNmae:String=""
+//    var  textWatcher= object: SimpleTextWatcher(){
+//        override fun afterTextChanged(s: Editable?) {
+//            super.afterTextChanged(s)
+//
+//            var name=s.toString()
+//            if(!TextUtils.isEmpty(oldNmae)&& oldNmae == name){
+//                return
+//            }
+//            if(!TextUtils.isEmpty(name)) {
+//                if (!VerifyUtils.isLegalName(name)) {
+//                    toast("装货人姓名格式不对!!")
+//                    return
+//                }
+//            }
+//        }
+//    }
 
 
     private fun judgeValue() {

+ 25 - 13
app/src/main/java/com/quansu/heifengwuliu/model/User.java

@@ -37,6 +37,8 @@ public class User implements IUser, Parcelable, IModel {
     public int msg_num; //未读消息
 
 
+
+
     public Boolean isDriver() {
         return type == 1;
     }
@@ -100,14 +102,33 @@ public class User implements IUser, Parcelable, IModel {
         return get() != null;
     }
 
+
+
+
+    public static final Creator<User> CREATOR = new Creator<User>() {
+        @Override
+        public User createFromParcel(Parcel in) {
+            return new User(in);
+        }
+
+        @Override
+        public User[] newArray(int size) {
+            return new User[size];
+        }
+    };
+
+
+
     protected User(Parcel in) {
         uid = in.readString();
         name = in.readString();
         mobile = in.readString();
+        kf_mobile = in.readString();
         avatar = in.readString();
         money = in.readString();
         type = in.readInt();
         status = in.readString();
+        nickname = in.readString();
         openid = in.readString();
         union_id = in.readString();
         create_time = in.readString();
@@ -118,6 +139,7 @@ public class User implements IUser, Parcelable, IModel {
         is_company = in.readInt();
         is_pay_pwd = in.readInt();
         is_pwd = in.readInt();
+        msg_num = in.readInt();
     }
 
     @Override
@@ -125,10 +147,12 @@ public class User implements IUser, Parcelable, IModel {
         dest.writeString(uid);
         dest.writeString(name);
         dest.writeString(mobile);
+        dest.writeString(kf_mobile);
         dest.writeString(avatar);
         dest.writeString(money);
         dest.writeInt(type);
         dest.writeString(status);
+        dest.writeString(nickname);
         dest.writeString(openid);
         dest.writeString(union_id);
         dest.writeString(create_time);
@@ -139,6 +163,7 @@ public class User implements IUser, Parcelable, IModel {
         dest.writeInt(is_company);
         dest.writeInt(is_pay_pwd);
         dest.writeInt(is_pwd);
+        dest.writeInt(msg_num);
     }
 
     @Override
@@ -146,17 +171,4 @@ public class User implements IUser, Parcelable, IModel {
         return 0;
     }
 
-    public static final Creator<User> CREATOR = new Creator<User>() {
-        @Override
-        public User createFromParcel(Parcel in) {
-            return new User(in);
-        }
-
-        @Override
-        public User[] newArray(int size) {
-            return new User[size];
-        }
-    };
-
-
 }