From 00a7a61df86db969f2ba61c508d02ba4709ce3d4 Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期五, 05 六月 2026 10:09:06 +0800
Subject: [PATCH] 改bug

---
 small-program/shop/pages/store-home/store-home.vue |   53 ++++++++++++++++++++++++++++++++++++++---------------
 1 files changed, 38 insertions(+), 15 deletions(-)

diff --git a/small-program/shop/pages/store-home/store-home.vue b/small-program/shop/pages/store-home/store-home.vue
index 6de6a02..cfaf3bf 100644
--- a/small-program/shop/pages/store-home/store-home.vue
+++ b/small-program/shop/pages/store-home/store-home.vue
@@ -19,28 +19,34 @@
 			<view :class="'tab-item  '+(active ==1?'active':'')" @click="changeActive(1)">鏈湀</view>
 			<view :class="'tab-item  '+(active ==2?'active':'')" @click="changeActive(2)">涓婃湀</view>
         </view>
-        <text class="tab-item right">鍦ㄥ簱璁㈠崟: {{countData.storageCount||0}}</text>
+        <text class="tab-item right">鍦ㄥ簱璁㈠崟: {{countData.storageCount > 99 ? '99+' : countData.storageCount || 0}}</text>
       </view>
       
       <view class="stats-cards">
         <view class="stat-card">
           <view class="stat-label">
             <text>閿�鍞(鍏�)</text>
-            <image class="stat-icon" src="/static/icon/ic_visible@2x.png"></image>
+            <u-icon v-if="showMoney" name="eye" color="#ffffff" size="18" @click="showMoney = !showMoney"></u-icon>
+					  <u-icon v-if="!showMoney" name="eye-off" color="#eeeeee" size="18" @click="showMoney = !showMoney"></u-icon>
+            <!-- <image v-if="showMoney" class="stat-icon" src="/static/icon/ic_visible@2x.png" @click="showMoney = false"></image>
+            <image v-if="!showMoney" class="stat-icon" src="/static/icon/ic_invisible@2x.png" @click="showMoney = true"></image> -->
           </view>
-          <text class="stat-value">{{countData.salesAmount}}</text>
+          <text class="stat-value" v-if="showMoney">{{((countData.salesAmount || 0)/100).toFixed(2)}}</text>
+          <text class="stat-value" v-if="!showMoney">****</text>
         </view>
         <view class="stat-card">
           <view class="stat-label">
             <text>缁撶畻鍒╂鼎(鍏�)</text>
           </view>
-          <text class="stat-value">{{countData.settlementProfit}}</text>
+          <text class="stat-value" v-if="showMoney">{{((countData.settlementProfit|| 0)/100).toFixed(2)}}</text>
+          <text class="stat-value" v-if="!showMoney">****</text>
         </view>
         <view class="stat-card">
           <view class="stat-label">
             <text>璁㈠崟鏁�</text>
           </view>
-          <text class="stat-value">{{countData.orderCount||0}}</text>
+          <text class="stat-value" v-if="showMoney">{{countData.orderCount > 99 ? '99+' : countData.orderCount || 0}}</text>
+          <text class="stat-value" v-if="!showMoney">****</text>
         </view>
       </view>
     </view>
@@ -62,7 +68,7 @@
       </view>
       <view class="func-btn" @click="goToQualification">
         <image class="func-icon" src="/shop/static/icon/ic_wodezizhi@2x.png"></image>
-        <text class="func-text">闂ㄥ簵璧勮川</text>
+        <text class="func-text">钀ユ敹鍒嗘瀽</text>
       </view>
     </view>
     <text class="section-title">寰呭鐞嗚鍗�({{total||0}})</text>
@@ -71,16 +77,17 @@
       <view class="order-item" v-for="(item,index) in dataList" :key="item.id">
         <view class="order-header"  @click="jumpOrderDetails(item.id)">
           <view style="display: flex; align-items: center;">
-            <view class="order-tag">{{item.type===1?'鍚屽煄閰嶉��':'灏卞湴瀵勫瓨'}}</view>
-            <text class="order-user">{{item.takeUser || ''}} {{item.takePhone||''}}</text>
+            <view class="order-tag" :class="{ 'city-delivery': item.type === 1 }">{{item.type===1?'鍚屽煄瀵勯��':'灏卞湴瀵勫瓨'}}</view>
+            <text class="order-user">{{formatName(item.takeUser)}} {{formatPhoneStar(item.takePhone)||''}}</text>
           </view>
-		  <view style="display: flex;flex-direction: column;">
+		  <view style="display: flex;flex-direction: column;align-items: flex-end;">
 			  <text  v-if="item.status ===5 && item.overdueStatus ===1 "  class="order-status" style="color: red;">瓒呮椂鏈彇浠�</text>
 			  <text  v-else-if="item.status ===5 && item.overdueStatus ===3 "  class="order-status" style="color: red;">瓒呮椂鍒板簵鍙栦欢</text>
 			  <text v-else class="order-status">{{item.statusName || ''}}</text>
 			  <text v-if="item.status ===5 && item.overdueStatus ===1 "  class="order-status" style="color: red;font-size: 24rpx;">閫炬湡璐圭敤楼{{((item.overdueFee || 0)/100).toFixed(2)}}</text>
 			  <text v-if="item.status ===5 && item.overdueStatus ===3 "  class="order-status" style="color: red;font-size: 24rpx;">閫炬湡璐圭敤楼{{((item.overdueFee || 0)/100).toFixed(2)}}</text>
-		  </view>
+        <text v-if="item.abnormalOrder === 1" class="order-status" style="color: red;">寮傚父杞瓨</text>
+      </view>
         </view>
         <view class="order-items"  @click="jumpOrderDetails(item.id)">
           <view class="order-product" v-for="(item1,index1) in item.detailList" :key="item1.id">
@@ -101,9 +108,9 @@
             <text>楼{{((item.estimatedAmount || 0)/100).toFixed(2) }}</text>
           </text>
           <view class="order-buttons">
-            <button class="btn secondary" @click="contactPhoneDo(item.takePhone)">鑱旂郴瀹㈡埛</button>
-			<button class="btn secondary" @click="contactPhoneDo(item.driverPhone)" v-if="item.type ===1&&(item.status === 4 || item.status === 3)">鑱旂郴楠戞墜</button>
-            <button class="btn primary"  v-if="item.status ===1 " @click="jumpHexiaoOrder(item)">鏀朵欢鏍搁攢</button>
+<!--            <button class="btn secondary" @click="contactPhoneDo(item.takePhone)">鑱旂郴瀹㈡埛</button>
+			<button class="btn secondary" @click="contactPhoneDo(item.driverPhone)" v-if="item.type ===1&&(item.status === 4 || item.status === 3)">鑱旂郴楠戞墜</button> -->
+            <button class="btn primary"  v-if="item.status ===1  ||item.status ===4" @click="jumpHexiaoOrder(item)">鏀朵欢鏍搁攢</button>
             <button class="btn primary" v-if="item.status ===5 &&(item.overdueStatus ==0 || item.overdueStatus == 1)" @click="jumpHexiaoOrder(item)">纭鍒板簵</button>
             <button class="btn primary"  v-if="item.status ===5 && (item.overdueStatus == 4 || item.overdueStatus == 2) " @click="jumpHexiaoOrder(item)">鍙栦欢鏍搁攢</button>
 		   </view>
@@ -120,6 +127,7 @@
 
 <script>
 import { mapState } from 'vuex'
+import { formatPhoneStar } from '@/utils/utils.js'
 import CustomTabbar from '@/components/custom-tabbar/custom-tabbar.vue'
 export default {
   components: {
@@ -144,6 +152,13 @@
  	 this.getFirstPageData()
  },
   methods: {
+    formatPhoneStar(phone){
+      return formatPhoneStar(phone)
+    },
+    formatName(name) {
+      if (!name) return ''
+      return name.length > 7 ? name.substring(0, 7) + '...' : name
+    },
 	  changeActive(index){
 	  	this.getCountData(index)
 	  },
@@ -248,13 +263,16 @@
 		},
 		goToQualification() {
 		  uni.navigateTo({
-			url: '/shop/pages/qualification/qualification'
+			url: '/shop/pages/revenue-analysis/revenue-analysis'
 		  })
 		},
 		goToStore() {
+      this.$store.commit('setUserType', 0)
+      setTimeout(() => {
 		  uni.switchTab({
-			url: '/pages/index/index'
+			  url: '/pages/index/index'
 		  })
+      }, 100)
 		},
 		jumpShopLogin() {
 			uni.redirectTo({
@@ -445,6 +463,7 @@
 
 .stat-label {
   display: flex;
+  align-items: center;
   height: 40rpx;
   text {
     font-size: 24rpx;
@@ -539,6 +558,10 @@
   background: #10B2FA;
   border-radius: 8rpx;
   margin-right: 20rpx;
+
+  &.city-delivery {
+    background: #FA8010;
+  }
 }
 
 .order-user {

--
Gitblit v1.9.3