Browse Source

订单列表增加授权码显示

zk 1 year ago
parent
commit
475ee3e058

+ 5 - 0
app/src/main/res/drawable/bg_order_auth_copy.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android">
+    <corners android:radius="11dp" />
+    <solid android:color="#EFEFEF" />
+</shape>

+ 1 - 1
app/src/main/res/layout/item_member_goods.xml

@@ -87,7 +87,7 @@
             android:id="@+id/tv_member_buy_price"
             android:id="@+id/tv_member_buy_price"
             android:layout_width="wrap_content"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_height="wrap_content"
-            android:text="@{TextUtil.formatFloatWithout0End(goodsBean.originalAmount, 1)}"
+            android:text="@{TextUtil.formatFloatWithout0End(goodsBean.RMBAmount, 2)}"
             android:textColor="@{goodsBean.select ? @color/member_buy_price_text_selected : @color/member_buy_price_text_normal}"
             android:textColor="@{goodsBean.select ? @color/member_buy_price_text_selected : @color/member_buy_price_text_normal}"
             android:textSize="40sp"
             android:textSize="40sp"
             android:textStyle="bold"
             android:textStyle="bold"

+ 66 - 15
app/src/main/res/layout/item_order.xml

@@ -20,13 +20,13 @@
 
 
 
 
         <View
         <View
+            android:layout_width="0dp"
+            android:layout_height="0dp"
             android:background="@drawable/bg_order_card"
             android:background="@drawable/bg_order_card"
-            app:layout_constraintStart_toStartOf="@+id/order_header"
-            app:layout_constraintEnd_toEndOf="@+id/order_header"
-            app:layout_constraintTop_toTopOf="@+id/order_header"
             app:layout_constraintBottom_toBottomOf="@+id/space6"
             app:layout_constraintBottom_toBottomOf="@+id/space6"
-            android:layout_width="0dp"
-            android:layout_height="0dp" />
+            app:layout_constraintEnd_toEndOf="@+id/order_header"
+            app:layout_constraintStart_toStartOf="@+id/order_header"
+            app:layout_constraintTop_toTopOf="@+id/order_header" />
 
 
         <View
         <View
             android:id="@+id/order_header"
             android:id="@+id/order_header"
@@ -38,11 +38,11 @@
             app:layout_constraintTop_toTopOf="parent" />
             app:layout_constraintTop_toTopOf="parent" />
 
 
         <TextView
         <TextView
-            android:text="@{orderBean.outTradeNo}"
             android:id="@+id/tv_order"
             android:id="@+id/tv_order"
             android:layout_width="wrap_content"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_height="wrap_content"
             android:layout_marginStart="12dp"
             android:layout_marginStart="12dp"
+            android:text="@{orderBean.outTradeNo}"
             android:textColor="#202020"
             android:textColor="#202020"
             android:textSize="14sp"
             android:textSize="14sp"
             android:textStyle="bold"
             android:textStyle="bold"
@@ -83,15 +83,16 @@
             app:layout_constraintTop_toBottomOf="@+id/space1" />
             app:layout_constraintTop_toBottomOf="@+id/space1" />
 
 
         <TextView
         <TextView
-            android:text="@{orderBean.itemName}"
             style="@style/Order_List_Content_Txt"
             style="@style/Order_List_Content_Txt"
             android:layout_width="wrap_content"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_height="wrap_content"
             android:layout_marginStart="16dp"
             android:layout_marginStart="16dp"
+            android:text="@{orderBean.itemName}"
             app:layout_constraintBaseline_toBaselineOf="@+id/tv_order_buy_type"
             app:layout_constraintBaseline_toBaselineOf="@+id/tv_order_buy_type"
             app:layout_constraintStart_toEndOf="@+id/tv_order_buy_type"
             app:layout_constraintStart_toEndOf="@+id/tv_order_buy_type"
             tools:text="图片恢复" />
             tools:text="图片恢复" />
 
 
+
         <Space
         <Space
             android:id="@+id/space2"
             android:id="@+id/space2"
             android:layout_width="match_parent"
             android:layout_width="match_parent"
@@ -99,6 +100,56 @@
             app:layout_constraintDimensionRatio="360:8"
             app:layout_constraintDimensionRatio="360:8"
             app:layout_constraintTop_toBottomOf="@+id/tv_order_buy_type" />
             app:layout_constraintTop_toBottomOf="@+id/tv_order_buy_type" />
 
 
+
+        <TextView
+            isGone="@{!orderBean.isShowLink}"
+            android:id="@+id/tv_auth_code_title"
+            style="@style/Order_List_Content_Txt"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:text="@string/order_auth_code"
+            app:layout_constraintLeft_toLeftOf="@+id/tv_order"
+            app:layout_constraintTop_toBottomOf="@+id/space2" />
+
+
+        <TextView
+            android:singleLine="true"
+            android:maxWidth="100dp"
+            android:text="@{orderBean.authCode}"
+            isGone="@{!orderBean.isShowLink}"
+            android:id="@+id/tv_auth_code"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_marginStart="16dp"
+            android:textColor="@color/colorPrimary"
+            android:textSize="14sp"
+            android:textStyle="bold"
+            app:layout_constraintBaseline_toBaselineOf="@+id/tv_auth_code_title"
+            app:layout_constraintStart_toEndOf="@id/tv_auth_code_title"
+            tools:text="259647" />
+
+        <TextView
+            isGone="@{!orderBean.isShowLink}"
+            android:background="@drawable/bg_order_auth_copy"
+            android:layout_marginStart="6dp"
+            app:layout_constraintStart_toEndOf="@+id/tv_auth_code"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:paddingHorizontal="8dp"
+            android:paddingVertical="1dp"
+            android:text="@string/order_copy"
+            android:textColor="#404040"
+            android:textSize="12sp"
+            app:layout_constraintBaseline_toBaselineOf="@+id/tv_auth_code" />
+
+        <Space
+            isGone="@{!orderBean.isShowLink}"
+            android:id="@+id/space_auth_code"
+            android:layout_width="match_parent"
+            android:layout_height="0dp"
+            app:layout_constraintDimensionRatio="360:8"
+            app:layout_constraintTop_toBottomOf="@+id/tv_auth_code" />
+
         <TextView
         <TextView
             android:id="@+id/tv_order_buy_time"
             android:id="@+id/tv_order_buy_time"
             style="@style/Order_List_Content_Txt"
             style="@style/Order_List_Content_Txt"
@@ -106,14 +157,14 @@
             android:layout_height="wrap_content"
             android:layout_height="wrap_content"
             android:text="@string/order_buy_time"
             android:text="@string/order_buy_time"
             app:layout_constraintLeft_toLeftOf="@+id/tv_order"
             app:layout_constraintLeft_toLeftOf="@+id/tv_order"
-            app:layout_constraintTop_toBottomOf="@+id/space2" />
+            app:layout_constraintTop_toBottomOf="@+id/space_auth_code" />
 
 
         <TextView
         <TextView
-            android:text="@{DateUtil.formatNormalDate(DateUtil.YYYY_MM_DD,orderBean.startTimestamp)}"
             style="@style/Order_List_Content_Txt"
             style="@style/Order_List_Content_Txt"
             android:layout_width="wrap_content"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_height="wrap_content"
             android:layout_marginStart="16dp"
             android:layout_marginStart="16dp"
+            android:text="@{DateUtil.formatNormalDate(DateUtil.YYYY_MM_DD,orderBean.startTimestamp)}"
             app:layout_constraintBaseline_toBaselineOf="@+id/tv_order_buy_time"
             app:layout_constraintBaseline_toBaselineOf="@+id/tv_order_buy_time"
             app:layout_constraintStart_toEndOf="@+id/tv_order_buy_time"
             app:layout_constraintStart_toEndOf="@+id/tv_order_buy_time"
             tools:text="2023-12-16" />
             tools:text="2023-12-16" />
@@ -137,11 +188,11 @@
             app:layout_constraintTop_toBottomOf="@+id/space3" />
             app:layout_constraintTop_toBottomOf="@+id/space3" />
 
 
         <TextView
         <TextView
-            android:text="@{orderBean.expireDate}"
             style="@style/Order_List_Content_Txt"
             style="@style/Order_List_Content_Txt"
             android:layout_width="wrap_content"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_height="wrap_content"
             android:layout_marginStart="16dp"
             android:layout_marginStart="16dp"
+            android:text="@{orderBean.expireDate}"
             app:layout_constraintBaseline_toBaselineOf="@+id/tv_order_member_validity"
             app:layout_constraintBaseline_toBaselineOf="@+id/tv_order_member_validity"
             app:layout_constraintStart_toEndOf="@+id/tv_order_member_validity"
             app:layout_constraintStart_toEndOf="@+id/tv_order_member_validity"
             tools:text="永久有效" />
             tools:text="永久有效" />
@@ -171,9 +222,9 @@
             app:layout_constraintTop_toBottomOf="@+id/v_line" />
             app:layout_constraintTop_toBottomOf="@+id/v_line" />
 
 
         <TextView
         <TextView
-            android:text="@{@string/member_price(orderBean.amount)}"
             android:layout_width="wrap_content"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_height="wrap_content"
+            android:text="@{@string/member_price(orderBean.amount)}"
             android:textColor="#404040"
             android:textColor="#404040"
             android:textSize="14sp"
             android:textSize="14sp"
             app:layout_constraintBottom_toTopOf="@+id/space7"
             app:layout_constraintBottom_toTopOf="@+id/space7"
@@ -183,8 +234,8 @@
 
 
 
 
         <TextView
         <TextView
-            isGone="@{!orderBean.isShowLink}"
             android:id="@+id/tv_copy_link"
             android:id="@+id/tv_copy_link"
+            isGone="@{!orderBean.isShowLink}"
             android:layout_width="0dp"
             android:layout_width="0dp"
             android:layout_height="0dp"
             android:layout_height="0dp"
             android:layout_marginEnd="12dp"
             android:layout_marginEnd="12dp"
@@ -201,11 +252,11 @@
             app:layout_constraintWidth_percent="0.3333333333333333" />
             app:layout_constraintWidth_percent="0.3333333333333333" />
 
 
         <Space
         <Space
-            app:layout_constraintBottom_toTopOf="@+id/space6"
             android:id="@+id/space7"
             android:id="@+id/space7"
-            app:layout_constraintDimensionRatio="360:5"
             android:layout_width="match_parent"
             android:layout_width="match_parent"
-            android:layout_height="0dp" />
+            android:layout_height="0dp"
+            app:layout_constraintBottom_toTopOf="@+id/space6"
+            app:layout_constraintDimensionRatio="360:5" />
 
 
         <Space
         <Space
             android:id="@+id/space6"
             android:id="@+id/space6"

+ 2 - 1
app/src/main/res/values/strings.xml

@@ -13,7 +13,7 @@
     <string name="agreement_disagree">不同意</string>
     <string name="agreement_disagree">不同意</string>
     <string name="agreement_kind_tips">温馨提示</string>
     <string name="agreement_kind_tips">温馨提示</string>
     <string name="agreement_exit">退出</string>
     <string name="agreement_exit">退出</string>
-    <string name="agreement_consider_it">考虑一下</string>
+    <string name="agreement_consider_it">同意</string>
     <string name="agreement_one_step_content">欢迎使用文件恢复大师!在开始之前,请花一些时间仔细阅读《用户协议》和《隐私政策》。这些文件描述了您与我们之间的权利和义务,以及我们收集、使用和保护您的个人信息的方式,我们建议您阅读用户协议和隐私政策,以确保理解您的权益和我们的责任,只有在您理解并同意协议和政策内容后,才能继续使用我们的服务。</string>
     <string name="agreement_one_step_content">欢迎使用文件恢复大师!在开始之前,请花一些时间仔细阅读《用户协议》和《隐私政策》。这些文件描述了您与我们之间的权利和义务,以及我们收集、使用和保护您的个人信息的方式,我们建议您阅读用户协议和隐私政策,以确保理解您的权益和我们的责任,只有在您理解并同意协议和政策内容后,才能继续使用我们的服务。</string>
     <string name="agreement_two_step_content">您需要同意相关协议才能使用本产品</string>
     <string name="agreement_two_step_content">您需要同意相关协议才能使用本产品</string>
     <string name="user_terms_text">《用户协议》</string>
     <string name="user_terms_text">《用户协议》</string>
@@ -180,4 +180,5 @@
     <string name="img_clear_sure_content">清除后,图片将彻底消失</string>
     <string name="img_clear_sure_content">清除后,图片将彻底消失</string>
     <string name="dialog_no_login">您需要先登录才能使用服务</string>
     <string name="dialog_no_login">您需要先登录才能使用服务</string>
     <string name="dialog_no_login_title">请登录</string>
     <string name="dialog_no_login_title">请登录</string>
+    <string name="order_auth_code">授权编码</string>
 </resources>
 </resources>