Bläddra i källkod

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

吃个甘蔗嚼一年 3 år sedan
förälder
incheckning
aecb1b4bf5

+ 2
- 2
src/shop/components/ShopKeeper/shopKeeper.jsx Visa fil

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

+ 2
- 2
src/shop/components/Sparead/spreadMoney.jsx Visa fil

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

+ 7
- 4
src/shop/pages/spread/spreadIndex.jsx Visa fil

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