李志伟 vor 3 Jahren
Ursprung
Commit
032f282a98

+ 2
- 2
src/shop/components/ShopKeeper/shopKeeper.jsx Datei anzeigen

@@ -114,7 +114,7 @@ export default (props) => {
114 114
                 <view className='lword'>全年订单收入(税前)</view>
115 115
 
116 116
                 <view className='yearMoney'>
117
-                  <text>{isyear ? shopMoney?.totalCharges / 100 : '******'}</text>元
117
+                  <text>{isyear ? (shopMoney?.totalCharges / 100).toFixed(2) : '******'}</text>元
118 118
                   <image className='micon' src={isyear ? eyes : ceyes} onClick={handleYear} />
119 119
                 </view>
120 120
               </view>
@@ -122,7 +122,7 @@ export default (props) => {
122 122
               <view className='sright'>
123 123
                 <view className='rword'>当月订单收入(税前)</view>
124 124
                 <view className='monthMoney'>
125
-                  <text>{isMomth ? shopMoney?.currentCharges / 100 : '******'}</text>元
125
+                  <text>{isMomth ? (shopMoney?.currentCharges / 100).toFixed(2) : '******'}</text>元
126 126
                   <image className='micon2' src={isMomth ? eyes : ceyes} onClick={handleMonth}></image>
127 127
                 </view></view>
128 128
             </view>

+ 2
- 2
src/shop/components/Sparead/spreadMoney.jsx Datei anzeigen

@@ -16,7 +16,7 @@ const getList = (id) => (params) => getAccount(id, params)
16 16
 export default (props) => {
17 17
   const { shopList, shop, onHotelChange, shopMoney } = props
18 18
   const [showCutover, setShowCutover] = useState(false)
19
-  const [isyear, setYear] = useState(false)
19
+  const [isyear, setYear] = useState(true)
20 20
   const [isMomth, setMonth] = useState(false)
21 21
 
22 22
   const queryParams = useMemo(() => ({
@@ -70,7 +70,7 @@ export default (props) => {
70 70
                 <view className='lword'>全年推广收入(税前)</view>
71 71
                 <view className='yearMoney'>
72 72
                   <text>{isyear ? (shopMoney?.totalCharges / 100).toFixed(2) : '******'}</text>元
73
-                  <image className='micon' src={isyear ? eyes : ceyes} onClick={handleYear} />
73
+                  <image className='micon' src={isyear ? eyes :ceyes } onClick={handleYear} />
74 74
                 </view>
75 75
               </view>
76 76
               <view className='line' />

+ 7
- 4
src/shop/pages/spread/spreadIndex.jsx Datei anzeigen

@@ -3,6 +3,7 @@ import CustomNav from '@/components/CustomNav'
3 3
 import { useRouter } from '@tarojs/taro'
4 4
 import { getShopList, getShopMoney, getAccount, getVerifiedOrder, setGetVerifiedOrder } from '@/services/shopBoss'
5 5
 import { withSubscribeMessage } from '@/utils/subscribeMessage'
6
+import SpinBox from "@/components/Spin/SpinBox";
6 7
 import withLayout from '@/layouts'
7 8
 import {
8 9
   TPL_MESSAGE_SHOP_PAY_SUCCESS,
@@ -25,6 +26,7 @@ export default withLayout((props) => {
25 26
   const [shopList, setShopList] = useState([])
26 27
   const [shop, setShop] = useState()
27 28
   const shopId = shop?.shopId
29
+  const [loading, setLoading] = useState(false)
28 30
 
29 31
   const [amountType, setAmountType] = useState('order')
30 32
   const [isVerified, setisVerified] = useState(0)
@@ -40,7 +42,6 @@ export default withLayout((props) => {
40 42
     if (listRef.current?.context) {
41 43
       listRef.current.context.scrollTo({ top: 0 })
42 44
     }
43
-
44 45
     withSubscribeMessage([TPL_MESSAGE_SHOP_PAY_SUCCESS, TPL_MESSAGE_SHOP_VERIFY_RESULT])
45 46
   }
46 47
   //商铺列表
@@ -69,10 +70,12 @@ export default withLayout((props) => {
69 70
   }
70 71
 
71 72
   useEffect(() => {
73
+    setLoading(true)
72 74
     if (shopId) {
73 75
       getShopMoney(shopId, amountType).then((e) => {
74 76
         setShopMoney(e)
75
-      })
77
+        setLoading(false)
78
+      }).catch(setLoading(false))
76 79
     }
77 80
 
78 81
   }, [amountType, shopId, currentTab])
@@ -100,7 +103,7 @@ export default withLayout((props) => {
100 103
   }, [tab])
101 104
 
102 105
   return (
103
-    <view className='page-index'>
106
+    <SpinBox loading={loading} className='page-index'>
104 107
       <view className='index-navbar'>
105 108
         <CustomNav title={shop?.shopName} />
106 109
       </view>
@@ -112,7 +115,7 @@ export default withLayout((props) => {
112 115
       <view className='index-tabbar'>
113 116
         <mp-tabbar extClass='custom-tabbar' current={currentTab} list={tabList} onChange={handleTabChange}></mp-tabbar>
114 117
       </view>
115
-    </view>
118
+    </SpinBox>
116 119
 
117 120
   )
118 121