diff --git a/.idea/vcs.xml b/.idea/vcs.xml index 84e2493..e0abfdf 100644 --- a/.idea/vcs.xml +++ b/.idea/vcs.xml @@ -1,6 +1,7 @@ + \ No newline at end of file diff --git a/work/src/main/java/com/hnucm/weather/LoginResult.java b/work/src/main/java/com/hnucm/weather/LoginResult.java new file mode 100644 index 0000000..b94c065 --- /dev/null +++ b/work/src/main/java/com/hnucm/weather/LoginResult.java @@ -0,0 +1,5 @@ +package com.hnucm.weather; + +public class LoginResult { + +} diff --git a/work/src/main/java/com/hnucm/weather/WelcomeActivity.java b/work/src/main/java/com/hnucm/weather/WelcomeActivity.java index c6a7c6e..f420429 100644 --- a/work/src/main/java/com/hnucm/weather/WelcomeActivity.java +++ b/work/src/main/java/com/hnucm/weather/WelcomeActivity.java @@ -1,13 +1,25 @@ package com.hnucm.weather; +import androidx.annotation.NonNull; import androidx.appcompat.app.AppCompatActivity; +import android.app.DownloadManager; import android.content.Intent; import android.content.SharedPreferences; import android.os.Bundle; +import android.util.Log; import com.gyf.immersionbar.ImmersionBar; +import java.io.IOException; + +import okhttp3.Call; +import okhttp3.Callback; +import okhttp3.OkHttp; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.Response; + public class WelcomeActivity extends AppCompatActivity { @Override @@ -15,6 +27,29 @@ public class WelcomeActivity extends AppCompatActivity { super.onCreate(savedInstanceState); setContentView(R.layout.activity_welcome); ImmersionBar.with(this).init(); +// Request request = new Request.Builder() +// .url("https://test1265l.usemock.com/text3213") +// .get() +// .build(); +// OkHttpClient okHttpClient = new OkHttpClient(); +// Call call = okHttpClient.newCall(request); +// call.enqueue(new Callback() { +// @Override +// public void onFailure(@NonNull Call call, @NonNull IOException e) { +// Log.i("errorTest",e.toString()); +// } +// @Override +// public void onResponse(@NonNull Call call, @NonNull Response response) throws IOException { +// String result = response.body().string(); +// Log.i("test",result); +// runOnUiThread(new Runnable() { +// @Override +// public void run() { +// +// } +// }); +// } +// }); Thread thread = new Thread(new Runnable() { @Override public void run() {