|
@@ -22,15 +22,16 @@ import { View } from '@tarojs/components'
|
22
|
22
|
|
23
|
23
|
export default withLayout((props) => {
|
24
|
24
|
const { router, person } = props
|
25
|
|
-
|
26
|
25
|
const { params } = useRouter()
|
27
|
|
- const { tab } = params || {}
|
|
26
|
+ const { tab,cardShop } = params || {}
|
28
|
27
|
const [currentTab, setCurrentTab] = useState(0)
|
|
28
|
+ //顶部的商铺列表
|
29
|
29
|
const [shopList, setShopList] = useState([])
|
|
30
|
+ //当前商铺
|
30
|
31
|
const [shop, setShop] = useState()
|
31
|
32
|
const shopId = shop?.shopId
|
32
|
|
- const [loading, setLoading] = useState(false)
|
33
|
33
|
|
|
34
|
+
|
34
|
35
|
const [amountType, setAmountType] = useState('order')
|
35
|
36
|
const [isVerified, setisVerified] = useState(0)
|
36
|
37
|
const [shopMoney, setShopMoney] = useState([])
|
|
@@ -73,14 +74,11 @@ export default withLayout((props) => {
|
73
|
74
|
}
|
74
|
75
|
|
75
|
76
|
useEffect(() => {
|
76
|
|
- setLoading(true)
|
77
|
77
|
if (shopId) {
|
78
|
78
|
getShopMoney(shopId, amountType).then((e) => {
|
79
|
79
|
setShopMoney(e)
|
80
|
|
- setLoading(false)
|
81
|
|
- }).catch(setLoading(false))
|
|
80
|
+ })
|
82
|
81
|
}
|
83
|
|
-
|
84
|
82
|
}, [amountType, shopId, currentTab])
|
85
|
83
|
|
86
|
84
|
//店铺选择
|