Browse Source

正式版本5.7.1

SpringBoots 9 years ago
parent
commit
27a9c4c6da

+ 15 - 0
WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/account/LoginActivity.java

@@ -8,6 +8,7 @@ import android.text.TextUtils;
 import android.util.Log;
 import android.view.View;
 import android.widget.EditText;
+import android.widget.TextView;
 
 import com.alibaba.fastjson.JSON;
 import com.android.volley.Response.ErrorListener;
@@ -49,6 +50,10 @@ public class LoginActivity extends BaseActivity implements View.OnClickListener
     private EditText mPhoneNumberEdit;
     private EditText mPasswordEdit;
 
+    private TextView tv_register;
+
+    private TextView tv_findPwd;
+
     @Override
     protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
@@ -76,6 +81,8 @@ public class LoginActivity extends BaseActivity implements View.OnClickListener
         mPhoneNumberEdit = (EditText) findViewById(R.id.phone_numer_edit);
         mPasswordEdit = (EditText) findViewById(R.id.password_edit);
         mHeader = (CircleImageView) findViewById(R.id.iv_head);
+        tv_findPwd= (TextView) findViewById(R.id.tv_findPwd);
+        tv_register= (TextView) findViewById(R.id.tv_register);
         if (MyApplication.getInstance().mLoginUser.getTelephone() != null && MyApplication.getInstance().mLoginUser.getTelephone().length() > 0) {
             mPhoneNumberEdit.setText(MyApplication.getInstance().mLoginUser.getTelephone());
         }
@@ -84,6 +91,8 @@ public class LoginActivity extends BaseActivity implements View.OnClickListener
         }
         //登陆账号
         findViewById(R.id.login_btn).setOnClickListener(this);
+        tv_findPwd.setOnClickListener(this);
+        tv_register.setOnClickListener(this);
         if (!StringUtils.isEmpty(MyApplication.getInstance().mLoginUser.getUserId())) {
             AvatarHelper.getInstance().display(MyApplication.getInstance().mLoginUser.getUserId(), mHeader, true, true);
         }
@@ -95,6 +104,12 @@ public class LoginActivity extends BaseActivity implements View.OnClickListener
             case R.id.login_btn:// 登陆
                 login();
                 break;
+            case R.id.tv_register:
+                ViewUtil.webLinks(mContext, "https://account.ubtob.com/sso/register", "新用户注册");
+                break;
+            case R.id.tv_findPwd:
+                ViewUtil.webLinks(mContext, "https://account.ubtob.com/user/pwd?appId=home&returnURL=http%3A%2F%2Fwww.ubtob.com%2F", "密码找回");
+                break;
         }
     }
 

+ 6 - 3
WeiChat/src/main/res/layout/activity_login.xml

@@ -8,7 +8,8 @@
     
     <RelativeLayout
         android:layout_width="match_parent"
-        android:layout_height="match_parent">
+        android:layout_height="match_parent"
+        >
         <de.hdodenhof.circleimageview.CircleImageView
             android:id="@+id/iv_head"
             android:layout_width="80dp"
@@ -61,21 +62,23 @@
           
         </LinearLayout>
         <TextView
+            android:id="@+id/tv_findPwd"
             android:layout_below="@+id/ll_content"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_marginLeft="20dp"
-            android:onClick="onFindPWD"
+          
             android:textColor="@color/titleBlue"
             android:text="忘记密码"/>
         
         <TextView
+            android:id="@+id/tv_register"
             android:layout_below="@+id/ll_content"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:textColor="@color/titleBlue"
             android:layout_alignParentRight="true"
-            android:onClick="onRegister"
+         
             android:layout_marginRight="20dp"
             android:text="新用户注册"/>
     </RelativeLayout>