瀏覽代碼

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

吃个甘蔗嚼一年 3 年之前
父節點
當前提交
3bbe8b77ea
共有 2 個文件被更改,包括 2 次插入21 次删除
  1. 1
    1
      src/components/CustomNav/index.jsx
  2. 1
    20
      src/shop/pages/spread/spreadIndex.jsx

+ 1
- 1
src/components/CustomNav/index.jsx 查看文件

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

+ 1
- 20
src/shop/pages/spread/spreadIndex.jsx 查看文件

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