Browse Source

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

吃个甘蔗嚼一年 3 years ago
parent
commit
3bbe8b77ea
2 changed files with 2 additions and 21 deletions
  1. 1
    1
      src/components/CustomNav/index.jsx
  2. 1
    20
      src/shop/pages/spread/spreadIndex.jsx

+ 1
- 1
src/components/CustomNav/index.jsx View File

65
   }
65
   }
66
 
66
 
67
   const goHome = () => {
67
   const goHome = () => {
68
-    Taro.navigateTo({
68
+    Taro.reLaunch({
69
       url: '/pages/index/index'
69
       url: '/pages/index/index'
70
     })
70
     })
71
   }
71
   }

+ 1
- 20
src/shop/pages/spread/spreadIndex.jsx View File

33
   const listRef = useRef()
33
   const listRef = useRef()
34
 
34
 
35
   const handleTabChange = (e) => {
35
   const handleTabChange = (e) => {
36
-
37
     const { index } = e.detail
36
     const { index } = e.detail
37
+    index?setAmountType('commission'):setAmountType('order')
38
     setCurrentTab(index)
38
     setCurrentTab(index)
39
     //如果context有的话代表他滚动了   那么切换tab页就置顶
39
     //如果context有的话代表他滚动了   那么切换tab页就置顶
40
     if (listRef.current?.context) {
40
     if (listRef.current?.context) {
43
 
43
 
44
     withSubscribeMessage([TPL_MESSAGE_SHOP_PAY_SUCCESS, TPL_MESSAGE_SHOP_VERIFY_RESULT])
44
     withSubscribeMessage([TPL_MESSAGE_SHOP_PAY_SUCCESS, TPL_MESSAGE_SHOP_VERIFY_RESULT])
45
   }
45
   }
46
-
47
-  const handelTypeOrder = () => {
48
-    setAmountType('order')
49
-  }
50
-
51
-  const handelType = () => {
52
-    setAmountType('commission')
53
-  }
54
-
55
   //商铺列表
46
   //商铺列表
56
   useEffect(() => {
47
   useEffect(() => {
57
     getShopList().then((res) => {
48
     getShopList().then((res) => {
59
       setShopList(list)
50
       setShopList(list)
60
       setShop(current)
51
       setShop(current)
61
     })
52
     })
62
-
63
   }, [])
53
   }, [])
64
 
54
 
65
 
55
 
66
   // 搜索核销手机号
56
   // 搜索核销手机号
67
   const setVer = (e) => {
57
   const setVer = (e) => {
68
     setVerifiedOrder(e.records)
58
     setVerifiedOrder(e.records)
69
-
70
-
71
-
72
   }
59
   }
73
 
60
 
74
 
61
 
85
     if (shopId) {
72
     if (shopId) {
86
       getShopMoney(shopId, amountType).then((e) => {
73
       getShopMoney(shopId, amountType).then((e) => {
87
         setShopMoney(e)
74
         setShopMoney(e)
88
-
89
       })
75
       })
90
     }
76
     }
91
 
77
 
100
         pageNum: 1,
86
         pageNum: 1,
101
         pageSize: 99,
87
         pageSize: 99,
102
         shopId: current.shopId,
88
         shopId: current.shopId,
103
-
104
       }).then((res) => {
89
       }).then((res) => {
105
         const order = res.records
90
         const order = res.records
106
         setVerifiedOrder(order)
91
         setVerifiedOrder(order)
107
-
108
       })
92
       })
109
     })
93
     })
110
   }
94
   }
124
         {currentTab === 0 && <ShopKeeper isVerified={isVerified} shopId={shopId} amountType={amountType} setVer={setVer} onVarifiedTwo={onVarifiedTwo} onVarified={onVarified} verifiedOrder={verifiedOrder} shopList={shopList} shop={shop} onHotelChange={handleHotelChange} shopMoney={shopMoney} />
108
         {currentTab === 0 && <ShopKeeper isVerified={isVerified} shopId={shopId} amountType={amountType} setVer={setVer} onVarifiedTwo={onVarifiedTwo} onVarified={onVarified} verifiedOrder={verifiedOrder} shopList={shopList} shop={shop} onHotelChange={handleHotelChange} shopMoney={shopMoney} />
125
         }
109
         }
126
         {currentTab === 1 && <Sparead shopList={shopList} shop={shop} verifiedOrder={verifiedOrder} onHotelChange={handleHotelChange} shopMoney={shopMoney} />}
110
         {currentTab === 1 && <Sparead shopList={shopList} shop={shop} verifiedOrder={verifiedOrder} onHotelChange={handleHotelChange} shopMoney={shopMoney} />}
127
-      </view>
128
-      <view className='index-tabbar'>
129
-
130
       </view>
111
       </view>
131
       <view className='index-tabbar'>
112
       <view className='index-tabbar'>
132
         <mp-tabbar extClass='custom-tabbar' current={currentTab} list={tabList} onChange={handleTabChange}></mp-tabbar>
113
         <mp-tabbar extClass='custom-tabbar' current={currentTab} list={tabList} onChange={handleTabChange}></mp-tabbar>