|
|
|
@ -1,15 +1,12 @@
|
|
|
|
|
package com.example.logistics.ui;
|
|
|
|
|
|
|
|
|
|
import com.example.logistics.R;
|
|
|
|
|
import com.example.logistics.manager.goodManager;
|
|
|
|
|
import com.example.logistics.manager.operationManager;
|
|
|
|
|
import com.example.logistics.manager.userManager;
|
|
|
|
|
import com.example.logistics.entity.User;
|
|
|
|
|
|
|
|
|
|
import android.annotation.SuppressLint;
|
|
|
|
|
import android.app.Activity;
|
|
|
|
|
import android.app.AlertDialog;
|
|
|
|
|
import android.content.DialogInterface;
|
|
|
|
|
import android.content.Intent;
|
|
|
|
|
import android.os.Bundle;
|
|
|
|
|
import android.os.Handler;
|
|
|
|
@ -20,11 +17,8 @@ import android.widget.Button;
|
|
|
|
|
import android.widget.EditText;
|
|
|
|
|
import android.widget.Toast;
|
|
|
|
|
|
|
|
|
|
import org.json.JSONException;
|
|
|
|
|
import org.json.JSONObject;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public class LoginActivity extends Activity {
|
|
|
|
|
public class LoginUI extends Activity {
|
|
|
|
|
|
|
|
|
|
private int islogin = 0;
|
|
|
|
|
private Button loginButton;
|
|
|
|
@ -50,9 +44,9 @@ public class LoginActivity extends Activity {
|
|
|
|
|
phonenumButton = (Button) this.findViewById(R.id.phonenum);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
AlertDialog.Builder builder = new AlertDialog.Builder(LoginActivity.this);
|
|
|
|
|
AlertDialog.Builder builder = new AlertDialog.Builder(LoginUI.this);
|
|
|
|
|
|
|
|
|
|
View view2 = View.inflate(LoginActivity.this, R.layout.forget, null);
|
|
|
|
|
View view2 = View.inflate(LoginUI.this, R.layout.forget, null);
|
|
|
|
|
|
|
|
|
|
builder.setTitle("取件").setView(view2);
|
|
|
|
|
|
|
|
|
@ -76,7 +70,7 @@ public class LoginActivity extends Activity {
|
|
|
|
|
new View.OnClickListener() {
|
|
|
|
|
@Override
|
|
|
|
|
public void onClick(View v) {
|
|
|
|
|
Intent intent = new Intent(LoginActivity.this, SignUpActivity.class);
|
|
|
|
|
Intent intent = new Intent(LoginUI.this, SignUpUI.class);
|
|
|
|
|
Log.d(TAG, "signup");
|
|
|
|
|
startActivity(intent);
|
|
|
|
|
}
|
|
|
|
@ -156,7 +150,7 @@ public class LoginActivity extends Activity {
|
|
|
|
|
hand1.sendEmptyMessage(msg);
|
|
|
|
|
if(msg == 1){
|
|
|
|
|
User owner = userManager.findUser(userName.getText().toString().trim());
|
|
|
|
|
Intent intent = new Intent(LoginActivity.this, MenuActivity.class);
|
|
|
|
|
Intent intent = new Intent(LoginUI.this, MenuActivity.class);
|
|
|
|
|
if(flag == 1){
|
|
|
|
|
intent.putExtra("user", userName.getText().toString().trim());
|
|
|
|
|
}else{
|
|
|
|
@ -190,9 +184,9 @@ public class LoginActivity extends Activity {
|
|
|
|
|
@Override
|
|
|
|
|
public void handleMessage(Message msg) {
|
|
|
|
|
if(msg.what == 0){
|
|
|
|
|
Toast.makeText(LoginActivity.this, "修改失败", Toast.LENGTH_SHORT).show();
|
|
|
|
|
Toast.makeText(LoginUI.this, "修改失败", Toast.LENGTH_SHORT).show();
|
|
|
|
|
}else if(msg.what == 1) {
|
|
|
|
|
Toast.makeText(LoginActivity.this, "修改成功", Toast.LENGTH_SHORT).show();
|
|
|
|
|
Toast.makeText(LoginUI.this, "修改成功", Toast.LENGTH_SHORT).show();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
};
|