Przeglądaj źródła

更新点餐布局

zhaofuxin 4 lat temu
rodzic
commit
622840cbd2

+ 20 - 0
app/debug/debug/output.json

@@ -0,0 +1,20 @@
+{
+  "version": 1,
+  "artifactType": {
+    "type": "APK",
+    "kind": "Directory"
+  },
+  "applicationId": "com.jld.vod",
+  "variantName": "debug",
+  "elements": [
+    {
+      "type": "SINGLE",
+      "filters": [],
+      "properties": [],
+      "versionCode": 193,
+      "versionName": "193",
+      "enabled": true,
+      "outputFile": "app-debug.apk"
+    }
+  ]
+}

+ 4 - 4
app/src/main/java/com/jld/vod/config/Config.kt

@@ -7,10 +7,10 @@ package com.jld.vod.config
  * @date :2020/7/21 14:18
  */
 object Config {
-//    const val ApiBaseUrl : String = "http://192.168.16.110:8088"
-//    const val ApiBaseUrlDebug : String = "http://192.168.16.110:8088"
-    const val ApiBaseUrl : String = "http://192.168.0.18:8088"
-    const val ApiBaseUrlDebug : String = "http://192.168.0.18:8088"
+    const val ApiBaseUrl : String = "http://192.168.16.110:8088"
+    const val ApiBaseUrlDebug : String = "http://192.168.16.110:8088"
+//    const val ApiBaseUrl : String = "http://192.168.0.18:8088"
+//    const val ApiBaseUrlDebug : String = "http://192.168.0.18:8088"
 //    true--有线VOD false ---无线VOD
     const val Breed:Boolean = false
 //   进入设置的密码

+ 1 - 1
app/src/main/java/com/jld/vod/service/LatLongService.kt

@@ -186,7 +186,7 @@ class LatLongService :Service() {
             }
             override fun success(call: Call?, response: Response?) {
                 val json = response!!.body!!.string()
-              //  LogUtils.logD("json"+json)
+                LogUtils.logD("initGEOAdVert"+json)
 
                 val mGEOAdvertBean= gson!!.fromJson(json, GEOAdvertBean::class.java)
                 val msg = Message()

+ 1 - 12
app/src/main/java/com/jld/vod/view/SplashActivity.kt

@@ -264,21 +264,10 @@ class SplashActivity : BaseActivity(){
             }else{
                 finishLoading()
                 ajaxInfo(getString(R.string.check_whether_the_vehicle_is_bound)+"....",null)
-                //判断是否绑定用户
-               // splashViewmodel.updateUser("1326427637489958913")
                 splashViewmodel.eqCar(this.userId!!)//检测是否绑定云
             }
         }
-//        splashViewmodel.updateUserLiveData.observe(this){res->
-//            if (res)//绑定用户成功
-//            {
-//                  splashViewmodel.eqCar(this.userId!!)//检测是否绑定云
-//                ajaxInfo(getString(R.string.User_binding_succeeded)+"....",null)
-//            }else{
-//                ajaxInfo(getString(R.string.Failure_to_Bind_a_user)+"....",null)
-//            }
-//
-//        }
+
         //3.获取apk路径,下载更新
         splashViewmodel.previewAPKliveData.observe(this){res ->
             //有更新

+ 3 - 0
app/src/main/java/com/jld/vod/viewmodel/SplashViewModel.kt

@@ -188,9 +188,11 @@ class SplashViewModel(app: Application) : AndroidViewModel(app) {
      * 检测车辆是否绑定云平台
      */
     fun eqCar(userId: Long): MutableLiveData<String> {
+        LogUtils.logD("eqCartuserId"+userId)
         eqCarliveData.postValue(null)
         RetrofitUtils.eqCar(
             { t ->
+                LogUtils.logD("eqCart"+t)
                 when (t.code) {
                     20001 -> findCarByUnbound(userId)//previewAPKliveData.postValue("0")
                     20000 -> eqCarliveData.postValue("20000")
@@ -198,6 +200,7 @@ class SplashViewModel(app: Application) : AndroidViewModel(app) {
                 }
             },
             { ex ->
+                LogUtils.logD("eqCar"+ex)
                 eqCarliveData.postValue(ex.message!!)
             }
         )

+ 111 - 24
app/src/main/res/layout/activity_order.xml

@@ -2,31 +2,118 @@
     xmlns:tools="http://schemas.android.com/tools"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
+    android:background="@mipmap/order_bg"
     android:orientation="horizontal">
-    <RelativeLayout
-        android:alpha="70"
-        android:layout_width="880dp"
-        android:layout_height="576dp"
-        android:background="@mipmap/bg_masking"
-        android:layout_marginLeft="50dp"
-        android:layout_marginBottom="20dp">
-
-        <ImageView
-            android:id="@+id/iv_order"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:src="@mipmap/order_icon"
-            android:layout_centerInParent="true"
-            />
-        <TextView
-            android:layout_centerInParent="true"
-            android:layout_below="@+id/iv_order"
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:padding="20dp"
+        android:layout_alignParentTop="true"
+        android:id="@+id/ll_top"
+        >
+        <LinearLayout
             android:layout_width="wrap_content"
+            android:layout_height="wrap_content">
+            <ImageView
+                android:id="@+id/iv_logo_main"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:src="@mipmap/logo">
+            </ImageView>
+        </LinearLayout>
+        <LinearLayout
+
+            android:id="@+id/ll_main_date"
+            android:layout_width="match_parent"
             android:layout_height="wrap_content"
-            android:textColor="@color/white"
-            android:textSize="24sp"
-            android:layout_marginTop="10dp"
-            android:text="点餐"
-            />
-    </RelativeLayout>
+            android:orientation="vertical"
+            android:paddingRight="20dp"
+            android:paddingLeft="20dp"
+            android:paddingBottom="10dp"
+            android:layout_gravity="center"
+            android:gravity="right">
+            <TextView
+                android:textSize="48sp"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:textColor="#fff"
+                android:id="@+id/tv_main_time"
+                android:text="18:58"/>
+            <TextView
+                android:textSize="16sp"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:textColor="#fff"
+                android:id="@+id/tv_main_week"
+                android:text="11月25日 周三"/>
+
+        </LinearLayout>
+    </LinearLayout>
+    <LinearLayout
+        android:layout_below="@+id/ll_top"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:background="@color/white"
+        android:layout_marginBottom="90dp"
+        >
+    </LinearLayout>
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="90dp"
+        android:layout_alignParentBottom="true"
+        android:orientation="horizontal">
+
+        <LinearLayout
+            android:gravity="left"
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:layout_weight="0.5">
+            <ImageView
+                android:layout_gravity="center_vertical"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_marginRight="30dp"
+                android:src="@mipmap/shopping_cart">
+            </ImageView>
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_gravity="center_vertical"
+                android:text="合计:¥3000"
+                android:textColor="@color/white"
+                />
+            <Button
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:background="@mipmap/bt_bg_red"
+                android:text="确认"
+                android:textColor="@color/white"
+                android:layout_gravity="center_vertical"
+                />
+        </LinearLayout>
+
+        <LinearLayout
+            android:layout_weight="0.5"
+            android:gravity="right"
+            android:layout_width="match_parent"
+            android:layout_height="match_parent">
+            <Button
+                android:layout_gravity="center_vertical"
+                android:text="我的订单"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:background="@mipmap/bt_white_bg"
+                android:layout_marginEnd="10dp"
+                />
+            <ImageView
+                android:layout_gravity="center_vertical"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_marginRight="30dp"
+                android:src="@mipmap/back_up">
+            </ImageView>
+        </LinearLayout>
+
+    </LinearLayout>
 </RelativeLayout>

BIN
app/src/main/res/mipmap-hdpi/bt_bg_red.png


BIN
app/src/main/res/mipmap-hdpi/bt_white_bg.png


BIN
app/src/main/res/mipmap-hdpi/order_bg.png


BIN
app/src/main/res/mipmap-hdpi/shopping_cart.png