Browse Source

Merge branch 'dev' of http://git.ycjcjy.com/shigongli/miniapp-v2 into dev

吃个甘蔗嚼一年 3 years ago
parent
commit
aecb1b4bf5

+ 2
- 2
src/shop/components/ShopKeeper/shopKeeper.jsx View File

@@ -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 View File

@@ -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 View File

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