|
@@ -1,11 +1,8 @@
|
1
|
1
|
import React, { useState, useEffect, useRef } from 'react'
|
2
|
2
|
import CustomNav from '@/components/CustomNav'
|
3
|
3
|
import { useRouter } from '@tarojs/taro'
|
4
|
|
-import baozan from '@/assets/icons/housemantj/bgood.png'
|
5
|
|
-
|
6
|
|
-import { getShopList, getShopMoney, getAccount, getVerifiedOrder, setGetVerifiedOrder } from '@/services/shopBoss'
|
|
4
|
+import { getShopList, getShopMoney, getVerifiedOrder } from '@/services/shopBoss'
|
7
|
5
|
import { withSubscribeMessage } from '@/utils/subscribeMessage'
|
8
|
|
-import SpinBox from "@/components/Spin/SpinBox";
|
9
|
6
|
import withLayout from '@/layouts'
|
10
|
7
|
import {
|
11
|
8
|
TPL_MESSAGE_SHOP_PAY_SUCCESS,
|
|
@@ -23,12 +20,13 @@ import { View } from '@tarojs/components'
|
23
|
20
|
export default withLayout((props) => {
|
24
|
21
|
const { router, person } = props
|
25
|
22
|
const { params } = useRouter()
|
26
|
|
- const { tab,cardShop } = params || {}
|
|
23
|
+ const { tab,shopOrderId } = params || {}
|
27
|
24
|
const [currentTab, setCurrentTab] = useState(0)
|
28
|
25
|
//顶部的商铺列表
|
29
|
26
|
const [shopList, setShopList] = useState([])
|
30
|
27
|
//当前商铺
|
31
|
28
|
const [shop, setShop] = useState()
|
|
29
|
+ // const shopOrderId='1a8deba868489b0be19cba941e6f577e'
|
32
|
30
|
const shopId = shop?.shopId
|
33
|
31
|
|
34
|
32
|
|
|
@@ -53,7 +51,12 @@ export default withLayout((props) => {
|
53
|
51
|
getShopList().then((res) => {
|
54
|
52
|
const { shopList: list, shop: current } = res
|
55
|
53
|
setShopList(list)
|
56
|
|
- setShop(current)
|
|
54
|
+ if (shopOrderId) {
|
|
55
|
+ setShop(list.filter(x=>x.shopId==shopOrderId)[0])
|
|
56
|
+ }
|
|
57
|
+ else{
|
|
58
|
+ setShop(current)
|
|
59
|
+ }
|
57
|
60
|
})
|
58
|
61
|
}, [])
|
59
|
62
|
|