Browse Source

fix: 优化记录列表对齐及手机号替换成****

t_finder 1 month ago
parent
commit
e6c7d0ba49

+ 24 - 16
pages/activity/invite-user/components/BuyRecordList.vue

@@ -8,10 +8,10 @@
     </div>
     <div class="record-list">
       <div class="record-item" v-for="(item, index) in data" :key="index">
-        <div class="body-text record-account">{{ item.newPhone }}</div>
-        <div class="body-text record-pay">{{ item.totalAmount }}</div>
+        <div class="body-text record-account">{{ item.newPhone | phone }}</div>
+        <div class="body-text record-pay">¥{{ item.totalAmount }}</div>
         <div class="body-text record-time">{{ item.finishTime }}</div>
-        <div class="body-text record-back">{{ item.rakeBackAmount }}</div>
+        <div class="body-text record-back">¥{{ item.rakeBackAmount }}</div>
       </div>
     </div>
   </div>
@@ -25,6 +25,12 @@ export default {
       type: Array,
       default: () => []
     }
+  },
+  filters: {
+    phone(val) {
+      if (!val) return ''
+      return val.slice(0, 3) + '****' + val.slice(7)
+    }
   }
 }
 </script>
@@ -36,20 +42,7 @@ export default {
   flex-wrap: nowrap;
   justify-content: space-around;
 
-  .haeder-account,.record-account{
-    flex: 0.22;
-  }
   
-  .haeder-pay.record-pay{
-    flex: 0.15;
-  }
-  .header-time,.record-time{
-    flex: 0.37;
-  }
-
-  .header-back,.record-back{
-    flex: 0.1;
-  }
 
   .header-text{
     text-align: center;
@@ -60,6 +53,21 @@ export default {
   }
 }
 
+.haeder-account,.record-account{
+  flex: 0 0 75px;
+}
+
+.haeder-pay.record-pay{
+  flex: 0 0 48px;
+}
+.header-time,.record-time{
+  flex: 0 0 130px;
+}
+
+.header-back,.record-back{
+  flex: 0 0 48px;
+}
+
 .record-list{
   min-height: 165px;
 }

+ 7 - 1
pages/activity/invite-user/components/RecordList.vue

@@ -6,7 +6,7 @@
     </div>
     <div class="record-list">
       <div class="record-item" v-for="(item, index) in data" :key="index">
-        <div class="record-title">{{ item.phoneNumber }}</div>
+        <div class="record-title">{{ item.phoneNumber | phone }}</div>
         <div class="record-time">{{ item.createTime }}</div>
       </div>
     </div>
@@ -21,6 +21,12 @@ export default {
       type: Array,
       default: () => []
     }
+  },
+  filters: {
+    phone(val) {
+      if (!val) return ''
+      return val.slice(0, 3) + '****' + val.slice(7)
+    }
   }
 }
 </script>

+ 1 - 1
pages/activity/invite-user/components/WithdrawalRecord.vue

@@ -7,7 +7,7 @@
     <div class="record-list">
       <div class="record-item" v-for="(item, index) in data" :key="index">
         <div class="record-title">{{ item.withdrawalTime }}</div>
-        <div class="record-time">{{ item.withdrawalMoney }}</div>
+        <div class="record-time">¥{{ item.withdrawalMoney }}</div>
       </div>
     </div>
   </div>

+ 9 - 1
pages/activity/invite-user/invite-new-user.vue

@@ -23,7 +23,7 @@
         </div>
         <div class="possess-warp mb-3">
           <div class="withdrawal-text">可提现<span class="withdrawal-money ml-2">¥{{ withdrawalBalance }}</span></div>
-          <div class="withdrawal-btn" @click="withdrawalHandle">提现</div>
+          <div class="withdrawal-btn" :class="{'disable': withdrawalBalance < withdrawalThreshold || withdrawalBalance === 0 }" @click="()=>(withdrawalBalance >= withdrawalThreshold && withdrawalHandle())">提现</div>
         </div>
         <div class="userinfo-detail">
           <div class="userinfo-detail-item pt-4 pr-3 pb-3 pl-3">
@@ -101,6 +101,7 @@ export default {
       registerCount: 0, // 今日注册人数
       nickname: '', // 用户昵称
       withdrawalBalance: 0, // 可提现余额
+      withdrawalThreshold: 0, // 提现门槛值
       inviteBuyAmount: 0, // 累计邀请金额
       accumulatedWithdrawal: 0, // 累计提现金额,
       // 查询参数
@@ -189,6 +190,7 @@ export default {
         registerCount, // 今日注册人数
         nickname, // 用户昵称
         withdrawalBalance, // 可提现余额
+        withdrawalThreshold, // 提现门槛值
         inviteBuyAmount, // 累计邀请金额
         activityId, // 活动ID
         accumulatedWithdrawal, // 累计提现金额
@@ -199,6 +201,7 @@ export default {
       this.registerCount = registerCount;
       this.nickname = nickname;
       this.withdrawalBalance = withdrawalBalance;
+      this.withdrawalThreshold = withdrawalThreshold;
       this.inviteBuyAmount = inviteBuyAmount;
       this.accumulatedWithdrawal = accumulatedWithdrawal;
       // 查询参数
@@ -398,6 +401,11 @@ $-bg-yellow: rgb(255, 253, 241);
         color: #fff;
         font-size: 14px;
         text-align: center;
+
+        &.disable{
+          background-color: #E0E0E0;
+          color: #979797;
+        }
       }
     }