master
3189462719@qq.com 2 years ago
parent d3d85de900
commit ae502e0332

@ -28,7 +28,7 @@ public class OkHttpClientProduct {
public List<OrangeProduct> getProduct() throws IOException {
OkHttpClient okHttpClient = new OkHttpClient();
Request request = new Request.Builder()
.url("http://10.21.221.183:8081/orange/product/search")
.url("http://10.21.192.15:8081/orange/product/search")
.build();
Response response = okHttpClient.newCall(request).execute();
JSONObject jsonObject = JSON.parseObject(Objects.requireNonNull(response.body()).string());

@ -21,7 +21,7 @@ public class OkHttpMessage {
public OrangeMessage consumeMessage() throws IOException {
OkHttpClient okHttpClient = new OkHttpClient();
Request request = new Request.Builder()
.url("http://10.21.221.183:8081/orange/message/consumeMessage")
.url("http://10.21.192.15:8081/orange/message/consumeMessage")
.build();
Response response = okHttpClient.newCall(request).execute();
JSONObject jsonObject = JSON.parseObject(Objects.requireNonNull(response.body()).string());
@ -30,7 +30,7 @@ public class OkHttpMessage {
*
*/
Request request1 = new Request.Builder()
.url("http://10.21.221.183:8081/orange/message/updateMessage")
.url("http://10.21.192.15:8081/orange/message/updateMessage")
.build();
okHttpClient.newCall(request1).execute();
return orangeMessage;

@ -29,7 +29,7 @@ public class OkHttpUser {
RequestBody requestBody = RequestBody.create(jsonStr, mediaType);
Request request = new Request.Builder()
.url("http://10.21.221.183:8081/orange/user/login")
.url("http://10.21.192.15:8081/orange/user/login")
.post(requestBody)
.build();
@ -58,7 +58,7 @@ public class OkHttpUser {
String jsonStr = JSONObject.toJSONString(orangeUser);
RequestBody requestBody = RequestBody.create(jsonStr, mediaType);
Request request = new Request.Builder()
.url("http://10.21.221.183:8081/orange/user/register")
.url("http://10.21.192.15:8081/orange/user/register")
.post(requestBody)
.build();
Response response = okHttpClient.newCall(request).execute();

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

@ -11,35 +11,124 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="160dp"
android:layout_marginTop="10dp"
android:orientation="vertical">
<ImageView
android:layout_width="91dp"
android:layout_height="96dp"
android:layout_gravity="center|left"
android:src="@drawable/caomeidangao" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:src="@drawable/cart" />
android:text="草莓蛋糕"
android:textColor="#B5B5B5"
android:textSize="20sp" />
<Button
android:id="@+id/random_search"
android:layout_width="180dp"
android:layout_height="25dp"
android:layout_marginTop="10dp"
android:background="#119C84"
android:text="立即下单"
android:textColor="#fff"
android:textSize="18sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:orientation="vertical">
<ImageView
android:layout_width="91dp"
android:layout_height="96dp"
android:layout_gravity="center|start"
android:src="@drawable/rousongxiaobei" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="肉松小贝"
android:textColor="#B5B5B5"
android:textSize="20sp" />
<Button
android:id="@+id/random_search"
android:layout_width="180dp"
android:layout_height="25dp"
android:layout_marginTop="10dp"
android:text="Cart is Empty ~"
android:background="#119C84"
android:text="立即下单"
android:textColor="#fff"
android:textSize="18sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:orientation="vertical">
<ImageView
android:layout_width="91dp"
android:layout_height="89dp"
android:layout_gravity="center|start"
android:src="@drawable/paofu" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="酸奶泡芙"
android:textColor="#B5B5B5"
android:textSize="20sp" />
<Button
android:id="@+id/random_search"
android:layout_width="180dp"
android:layout_height="50dp"
android:layout_gravity="center"
android:layout_marginTop="25dp"
android:background="@drawable/button_login"
android:text="go shopping..."
android:layout_height="25dp"
android:layout_marginTop="10dp"
android:background="#119C84"
android:text="立即下单"
android:textColor="#fff"
android:textSize="18sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="154dp"
android:layout_gravity="center"
android:orientation="vertical">
<ImageView
android:layout_width="80dp"
android:layout_height="62dp"
android:layout_gravity="center|start"
android:src="@drawable/qiepianmianbao" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="切片面包"
android:textColor="#B5B5B5"
android:textSize="20sp" />
<Button
android:id="@+id/random_search"
android:layout_width="180dp"
android:layout_height="25dp"
android:layout_marginTop="8dp"
android:background="#119C84"
android:text="立即下单"
android:textColor="#fff"
android:textSize="18sp" />
</LinearLayout>
</LinearLayout>

@ -17,14 +17,14 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:src="@drawable/orange" />
android:src="@drawable/renwu" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="22sp"
android:textColor="#000000"
android:textStyle="italic"
android:text="Orange" />
android:text="ANNIE" />
</LinearLayout>
<LinearLayout
@ -78,12 +78,12 @@
android:id="@+id/login"
android:layout_width="250dp"
android:layout_height="50dp"
android:textSize="18sp"
android:layout_gravity="center_horizontal"
android:layout_marginTop="60dp"
android:background="@drawable/button_login"
android:textColor="#FFFFFF"
android:text="登&#160;&#160;&#160;&#160;&#160;录" />
android:background="@color/liji_material_blue_500"
android:text="登&#160;&#160;&#160;&#160;&#160;录"
android:textColor="#AB0347F4"
android:textSize="18sp" />
<Button
android:id="@+id/register"

@ -14,17 +14,17 @@
android:orientation="vertical">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_width="147dp"
android:layout_height="108dp"
android:layout_gravity="center_horizontal"
android:src="@drawable/orange" />
android:src="@drawable/renwu" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="22sp"
android:textColor="#000000"
android:textStyle="italic"
android:text="Orange" />
android:text="ANNIE" />
</LinearLayout>
<LinearLayout
@ -158,11 +158,11 @@
android:id="@+id/reg_register"
android:layout_width="280dp"
android:layout_height="50dp"
android:layout_marginTop="80dp"
android:textSize="18sp"
android:layout_gravity="center_horizontal"
android:layout_marginTop="80dp"
android:background="@drawable/button_login"
android:text="注&#160;&#160;&#160;&#160;&#160;册"
android:textColor="#FFFFFF"
android:text="注&#160;&#160;&#160;&#160;&#160;" />
android:textSize="18sp" />
</LinearLayout>

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="colorPrimary">#008577</color>
<color name="colorPrimary">#4EBDB6</color>
<color name="colorPrimaryDark">#00574B</color>
<color name="colorAccent">#D81B60</color>
</resources>

Loading…
Cancel
Save