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