吃个甘蔗嚼一年 3 年之前
父節點
當前提交
1c7fc7ef09

+ 2
- 2
src/components/BossCard/index.jsx 查看文件

41
   return (
41
   return (
42
     <view class='container'>
42
     <view class='container'>
43
       <view class='wrapper'>
43
       <view class='wrapper'>
44
-        <view class='left-complete-one' onClick={() => { goFood() }} >
44
+        <view class='left-complete-one'  >
45
           <image className='left-image-1' src={ProCard_hot}></image>
45
           <image className='left-image-1' src={ProCard_hot}></image>
46
           <view className='left-viewText'>
46
           <view className='left-viewText'>
47
             返现¥{item.cashback / 100}
47
             返现¥{item.cashback / 100}
56
             <image className='image-2' src={food}></image>
56
             <image className='image-2' src={food}></image>
57
           </view>
57
           </view>
58
           <view className='title-content'>
58
           <view className='title-content'>
59
-            <view className='Pro-title'>
59
+            <view className='Pro-title' onClick={() => { goFood() }} >
60
               <view className='title-text'>{(item.description).toString().length > 25 ? (item.description).substring(0, 25) + '...' : (item.description)}</view>
60
               <view className='title-text'>{(item.description).toString().length > 25 ? (item.description).substring(0, 25) + '...' : (item.description)}</view>
61
             </view>
61
             </view>
62
             <text className='title-money' >¥{item.actualPrice / 100}元<text className='title-money-2'>门市价{item.standardPrice / 100}元</text></text>
62
             <text className='title-money' >¥{item.actualPrice / 100}元<text className='title-money-2'>门市价{item.standardPrice / 100}元</text></text>

+ 23
- 0
src/components/ShopCommission/index.jsx 查看文件

1
+import Taro from '@tarojs/taro'
2
+import { useEffect } from 'react'
3
+import { getAccount } from '@/services/shopBoss'
4
+import formatTimes from '@/utils/formatTime'
5
+
6
+import './style.less'
7
+
8
+
9
+export default (props) => {
10
+
11
+  const { item } = props
12
+
13
+
14
+  return (
15
+    <view className='spreadCard'>
16
+      <view className='spreadDate'>日期:<text>{formatTimes(item.createDate, "yyyy/MM/dd")}</text></view>
17
+      <view className='card'>
18
+        <view className='spreadTime'>时&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;间:<text>{formatTimes(item.createDate, "yyyy/MM/dd hh:ss")}</text></view>
19
+        <view className='spreadMoney'>收入金额:<text>{item.amount / 100}</text>元</view>
20
+      </view>
21
+    </view>
22
+  )
23
+}

+ 21
- 0
src/components/ShopCommission/style.less 查看文件

1
+.spreadCard{
2
+  margin-bottom: 1px;
3
+  .spreadDate{
4
+    font-size: 20px;
5
+    color: #202020;
6
+    line-height: 60px;
7
+  }
8
+  .card{
9
+    height: 166px;
10
+    background: #FFF;
11
+    box-shadow: 0px 8px 32px 0px rgba(0, 0, 0, 0.08);
12
+    border-radius: 12px;
13
+    padding: 40px 0 43px 22px;
14
+    font-size: 24px;
15
+    color: #202020;
16
+    box-sizing: border-box;
17
+    .spreadMoney{
18
+      line-height: 60px;
19
+    }
20
+  }
21
+}

+ 39
- 0
src/components/ShopUnused/index.jsx 查看文件

1
+import Taro from '@tarojs/taro'
2
+import { useState, useEffect } from 'react'
3
+import iconsearch from '@/assets/icons/housemantj/search.png'
4
+import ms from '@/assets/icons/housemantj/ms3.jpg'
5
+import cutoverUser from '@/assets/icons/UserCenter/cutoverUser.png'
6
+import './style.less'
7
+
8
+
9
+export default (props) => {
10
+  const { } = props
11
+
12
+
13
+
14
+  useEffect(() => {
15
+
16
+  }, [])
17
+
18
+  return (
19
+    <view className='orderCard'>
20
+      <view style={{ overflow: 'hidden' }}>
21
+        <view className='orderId'>订单编号:<text>ABC123456789</text></view>
22
+        <view className='orderTime'>下单日期:<text>2021-06-22 12:35</text></view>
23
+      </view>
24
+      <view className='order'>
25
+        <image className='orderImg' src={ms} mode='aspectFit' />
26
+        <view className='orderRight'>
27
+          <view className='foodName'>【SEOUL.创意韩国料理】火爆全南京,
28
+            新街口又开新店啦...</view>
29
+          <view className='price'>合计金额:¥<text style={{ fontSize: '24rpx' }}>88</text>元 <text className='pnum'>数量:<text>1</text>张</text> </view>
30
+          <view>已下单:等待客户上门就餐</view>
31
+        </view>
32
+        <view className='line' />
33
+
34
+        <view className='phone'>客户手机:<text>136****9434</text></view>
35
+        <view className='tripTime'>客户行程日期:预计在<text>2021-06-21中下午10:30-16:30</text></view>
36
+      </view>
37
+    </view>
38
+  )
39
+}

+ 93
- 0
src/components/ShopUnused/style.less 查看文件

1
+.orderCard{
2
+  margin-bottom: 20px;
3
+  .orderId{
4
+    font-size: 20px;
5
+    color: #666666;
6
+    line-height: 44px;
7
+    float: left;
8
+    margin: 60px 0 32px 0;
9
+
10
+  }
11
+  .orderTime{    
12
+    font-size: 20px;
13
+    color: #666666;
14
+    line-height: 44px;
15
+    float: right;
16
+    margin: 60px 0 32px 0;
17
+  }
18
+  .order{
19
+    background: #FFFFFF;
20
+    box-shadow: 0px 8px 32px 0px rgba(0, 0, 0, 0.08);
21
+    border-radius: 12px;
22
+    padding: 20px;
23
+    .orderImg{
24
+      width: 194px;
25
+      height: 194px;
26
+      border-radius: 22px;
27
+      float: left;
28
+      margin:0 26px 30px 0;
29
+    }
30
+    .orderRight{
31
+      .foodName{
32
+        height: 63px;
33
+        font-size: 24px;
34
+        color: #333333;
35
+        line-height: 40px;
36
+      }
37
+      .price{
38
+        font-size: 20px;
39
+        font-weight: bold;
40
+        color: #202020;
41
+        line-height: 44px;
42
+        margin: 37px 0 40px 0;
43
+        height: 19px;
44
+        .pnum{
45
+          color: #333333;
46
+          font-weight: 400;
47
+          margin-left: 47px;         
48
+        }
49
+      }
50
+      .price+view{
51
+        font-size: 20px;
52
+        font-weight: bold;
53
+        color: #FF3434;
54
+        line-height: 44px;
55
+        margin-bottom: 35px;
56
+        height: 19px;
57
+      }
58
+    }
59
+    .line{
60
+      width: 100%;
61
+      height: 2px;
62
+      background: #000;
63
+      opacity: 0.1;
64
+    }
65
+    .phone{
66
+      font-size: 24px;
67
+      color: #666666;
68
+      line-height: 44px;
69
+      height: 23px;
70
+      margin: 30px 0;
71
+    }
72
+    .button-OK{
73
+      width: 160px;
74
+    height: 40px;
75
+    background: #1A3B83;
76
+    /* margin: 0 auto; */
77
+    line-height: 40px;
78
+    border-radius: 12px;
79
+    font-size: 23px;
80
+    color: #ffffff;
81
+    position: relative;
82
+    right: -8em;
83
+    top: -2em;
84
+    }
85
+    .tripTime{
86
+      font-size: 24px;
87
+      color: #666666;
88
+      line-height: 44px;
89
+      margin-bottom: 30px;
90
+    }
91
+  }
92
+  
93
+}

+ 39
- 0
src/components/ShopUsed/index.jsx 查看文件

1
+import Taro from '@tarojs/taro'
2
+import { useState, useEffect } from 'react'
3
+import iconsearch from '@/assets/icons/housemantj/search.png'
4
+import ms from '@/assets/icons/housemantj/ms3.jpg'
5
+import cutoverUser from '@/assets/icons/UserCenter/cutoverUser.png'
6
+import './style.less'
7
+
8
+
9
+export default (props) => {
10
+  const { } = props
11
+
12
+
13
+
14
+  useEffect(() => {
15
+
16
+  }, [])
17
+
18
+  return (
19
+    <view className='orderCard'>
20
+      <view style={{ overflow: 'hidden' }}>
21
+        <view className='orderId'>订单编号:<text>ABC123456789</text></view>
22
+        <view className='orderTime'>下单日期:<text>2021-06-22 12:35</text></view>
23
+      </view>
24
+      <view className='order'>
25
+        <image className='orderImg' src={ms} mode='aspectFit' />
26
+        <view className='orderRight'>
27
+          <view className='foodName'>【SEOUL.创意韩国料理】火爆全南京,
28
+            新街口又开新店啦...</view>
29
+          <view className='price'>合计金额:¥<text style={{ fontSize: '24rpx' }}>88</text>元 <text className='pnum'>数量:<text>1</text>张</text> </view>
30
+          <view>已下单:等待客户上门就餐</view>
31
+        </view>
32
+        <view className='line' />
33
+
34
+        <view className='phone'>客户手机:<text>136****9434</text><button className='button-OK'  >确认核销</button> </view>
35
+        <view className='tripTime'>客户行程日期:预计在<text>2021-06-21中下午10:30-16:30</text></view>
36
+      </view>
37
+    </view>
38
+  )
39
+}

+ 100
- 0
src/components/ShopUsed/style.less 查看文件

1
+.orderCard{
2
+  margin-bottom: 20px;
3
+  .orderId{
4
+    font-size: 20px;
5
+    color: #666666;
6
+    line-height: 44px;
7
+    float: left;
8
+    margin: 60px 0 32px 0;
9
+
10
+  }
11
+  .orderTime{    
12
+    font-size: 20px;
13
+    color: #666666;
14
+    line-height: 44px;
15
+    float: right;
16
+    margin: 60px 0 32px 0;
17
+  }
18
+  .order{
19
+    background: #FFFFFF;
20
+    box-shadow: 0px 8px 32px 0px rgba(0, 0, 0, 0.08);
21
+    border-radius: 12px;
22
+    padding: 20px;
23
+    .orderImg{
24
+      width: 194px;
25
+      height: 194px;
26
+      border-radius: 22px;
27
+      float: left;
28
+      margin:0 26px 30px 0;
29
+    }
30
+    .orderRight{
31
+      .foodName{
32
+        height: 63px;
33
+        font-size: 24px;
34
+        color: #333333;
35
+        line-height: 40px;
36
+      }
37
+      .price{
38
+        font-size: 20px;
39
+        font-weight: bold;
40
+        color: #202020;
41
+        line-height: 44px;
42
+        margin: 37px 0 40px 0;
43
+        height: 19px;
44
+        .pnum{
45
+          color: #333333;
46
+          font-weight: 400;
47
+          margin-left: 47px;         
48
+        }
49
+      }
50
+      .price+view{
51
+        font-size: 20px;
52
+        font-weight: bold;
53
+        color: #FF3434;
54
+        line-height: 44px;
55
+        margin-bottom: 35px;
56
+        height: 19px;
57
+      }
58
+    }
59
+    .line{
60
+      width: 100%;
61
+      height: 2px;
62
+      background: #000;
63
+      opacity: 0.1;
64
+    }
65
+    .phone{
66
+      font-size: 24px;
67
+      color: #666666;
68
+      line-height: 44px;
69
+      height: 23px;
70
+      margin: 30px 0;
71
+    }
72
+    .button-OK{
73
+      width: 160px;
74
+    height: 40px;
75
+    background: #1A3B83;
76
+    /* margin: 0 auto; */
77
+    line-height: 40px;
78
+    border-radius: 12px;
79
+    font-size: 23px;
80
+    color: #ffffff;
81
+    position: relative;
82
+    right: -8em;
83
+    top: -2em;
84
+    }
85
+    .tripTime{
86
+      font-size: 24px;
87
+      color: #666666;
88
+      line-height: 44px;
89
+      margin-bottom: 30px;
90
+    }
91
+  }
92
+  
93
+}
94
+.botton{
95
+  font-size: 28px;   
96
+  color: #C0C8D3;
97
+  line-height: 34px;
98
+  text-align: center;
99
+  padding:40px 0 100px 0;
100
+}

+ 49
- 43
src/components/foodCards/foodCards.jsx 查看文件

7
 import baixin from '@/assets/icons/housemantj/收藏.png'
7
 import baixin from '@/assets/icons/housemantj/收藏.png'
8
 import './style.less'
8
 import './style.less'
9
 import useSave from "@/utils/hooks/useSave"
9
 import useSave from "@/utils/hooks/useSave"
10
-import {getShopDetail,getShopcity} from '@/services/home'
10
+import { getShopDetail, getShopcity } from '@/services/home'
11
 import { useState, useEffect } from 'react'
11
 import { useState, useEffect } from 'react'
12
 
12
 
13
 
13
 
15
 //套餐卡片
15
 //套餐卡片
16
 export default (props) => {
16
 export default (props) => {
17
   const { item } = props
17
   const { item } = props
18
-  const [isSaved, toggleSave] = useSave(item.isSaved,'shop_package', item.packageId)
19
-  const [city,setCity]=useState({})
20
-  const [detail,setDetail]=useState({})
18
+  const { shopId } = props.item
19
+  const [isSaved, toggleSave] = useSave(item.isSaved, 'shop_package', item.packageId)
20
+  const [city, setCity] = useState({})
21
+  const [detail, setDetail] = useState({})
22
+
23
+  const goFood = () => {
24
+    Taro.navigateTo({ url: `/pages/details/foodDetails/foodDetails?id=${shopId}` })
25
+
26
+  }
21
 
27
 
22
   useEffect(() => {
28
   useEffect(() => {
23
-  getShopDetail(item.shopId).then((res)=>{
24
-    setDetail(res)
25
-    getShopcity(res.cityId).then((res2)=>{
26
-      setCity(res2)
29
+    getShopDetail(item.shopId).then((res) => {
30
+      setDetail(res)
31
+      getShopcity(res.cityId).then((res2) => {
32
+        setCity(res2)
33
+      })
27
     })
34
     })
28
-  })
29
-}, [])
30
-const star=parseFloat(((detail.sweetScore+detail.environmentScore+detail.serviceScore)/3).toFixed(1)); 
35
+  }, [])
36
+  const star = parseFloat(((detail.sweetScore + detail.environmentScore + detail.serviceScore) / 3).toFixed(1));
31
 
37
 
32
   return (
38
   return (
33
-      <view className='foodCard'>
34
-        <view className='fCleft'>
35
-          <view className='backMoney'>
36
-            返现¥{item.cashback/100}
37
-          </view>
38
-          <view className='appraise'>
39
-            <Star star={star} />
40
-            <text className='storezf'>{star}</text>
39
+    <view className='foodCard'>
40
+      <view className='fCleft'>
41
+        <view className='backMoney'>
42
+          返现¥{item.cashback / 100}
43
+        </view>
44
+        <view className='appraise'>
45
+          <Star star={star} />
46
+          <text className='storezf'>{star}</text>
47
+        </view>
48
+        <view>
49
+          <view className='contentImg'>
50
+            <image src={item.poster} className='img1'></image>
51
+            <image src={msTip} className='mstip'></image>
41
           </view>
52
           </view>
42
-          <view>
43
-            <view className='contentImg'>
44
-              <image src={item.poster} className='img1'></image>
45
-              <image src={msTip} className='mstip'></image>
53
+          <view className='neirong'>
54
+            <view className='textword'>{(item.description).toString().length > 25 ? (item.description).substring(0, 25) + '...' : (item.description)}</view>
55
+            <view className='jiage' onClick={() => { goFood() }} >
56
+              <text className='rmb' >¥&nbsp;&nbsp;</text>
57
+              <text className='p1'><text className='price' >{item.actualPrice / 100}</text>元&nbsp;&nbsp;</text>
58
+              <text className='p2'>门市价<text className='oldprice' >{item.standardPrice / 100}</text>元</text>
46
             </view>
59
             </view>
47
-            <view className='neirong'>
48
-              <view className='textword'>{(item.description).toString().length>25?(item.description).substring(0, 25)+'...':(item.description)}</view>
49
-              <view className='jiage'>
50
-                <text className='rmb' >¥&nbsp;&nbsp;</text>
51
-                <text className='p1'><text className='price' >{item.actualPrice/100}</text>元&nbsp;&nbsp;</text>
52
-                <text className='p2'>门市价<text className='oldprice' >{item.standardPrice/100}</text>元</text>
53
-              </view>
54
-              <view className='address'>
55
-                <image className='dw' src={wz} />
56
-                <text className='wz'>{city.areaPName}/{city.areaName}</text>
57
-                <view style={{display:'inline-block'}} onClick={toggleSave}>
58
-                <image className='star' src={isSaved>0?hongxin:baixin}></image>
59
-                <text className='collection'>{isSaved>0?'已收藏':'加入收藏'}</text>
60
-              </view>
60
+            <view className='address'>
61
+              <image className='dw' src={wz} />
62
+              <text className='wz'>{city.areaPName}/{city.areaName}</text>
63
+              <view style={{ display: 'inline-block' }} onClick={toggleSave}>
64
+                <image className='star' src={isSaved > 0 ? hongxin : baixin}></image>
65
+                <text className='collection'>{isSaved > 0 ? '已收藏' : '加入收藏'}</text>
61
               </view>
66
               </view>
62
             </view>
67
             </view>
63
           </view>
68
           </view>
64
         </view>
69
         </view>
65
-        <view className='fCright' onClick={()=>{Taro.navigateTo({ url: `/pages/PayOrder/index?packageId=${item.packageId}` });}}>
66
-          <image src={pay} />
67
-          <view>支付</view>
68
-        </view>
69
-        <view className='columnLine'></view>
70
       </view>
70
       </view>
71
-    
71
+      <view className='fCright' onClick={() => { Taro.navigateTo({ url: `/pages/PayOrder/index?packageId=${item.packageId}` }); }}>
72
+        <image src={pay} />
73
+        <view>支付</view>
74
+      </view>
75
+      <view className='columnLine'></view>
76
+    </view>
77
+
72
   )
78
   )
73
 }
79
 }

+ 3
- 0
src/pages/details/foodDetails/foodDetails.jsx 查看文件

2
 import withLayout from '@/layouts'
2
 import withLayout from '@/layouts'
3
 import { getShopDetail, getShopPackage, getExtendContent } from '@/services/home'
3
 import { getShopDetail, getShopPackage, getExtendContent } from '@/services/home'
4
 import { useState, useEffect, useRef } from 'react'
4
 import { useState, useEffect, useRef } from 'react'
5
+
5
 import { Swiper, SwiperItem } from '@tarojs/components';
6
 import { Swiper, SwiperItem } from '@tarojs/components';
7
+import BossCard from '@/components/BossCard'
8
+
6
 import Star from '@/components/Star/Star.jsx'
9
 import Star from '@/components/Star/Star.jsx'
7
 import Cards from '@/components/foodCards/foodCards.jsx'
10
 import Cards from '@/components/foodCards/foodCards.jsx'
8
 import ax from '@/assets/icons/housemantj/onlove.png'
11
 import ax from '@/assets/icons/housemantj/onlove.png'

+ 3
- 0
src/pages/details/mjDetails/sceneryDetails.jsx 查看文件

1
 import CustomNav from '@/components/CustomNav'
1
 import CustomNav from '@/components/CustomNav'
2
+import BossCard from '@/components/BossCard'
3
+
2
 import ax from '../../../assets/icons/housemantj/onlove.png'
4
 import ax from '../../../assets/icons/housemantj/onlove.png'
3
 import hongxin from '../../../assets/icons/housemantj/已收藏.png'
5
 import hongxin from '../../../assets/icons/housemantj/已收藏.png'
4
 import baixin from '../../../assets/icons/housemantj/收藏.png'
6
 import baixin from '../../../assets/icons/housemantj/收藏.png'
9
 import share from '../../../assets/icons/housemantj/景点分享.png'
11
 import share from '../../../assets/icons/housemantj/景点分享.png'
10
 import good from '../../../assets/icons/housemantj/景点爆赞.png'
12
 import good from '../../../assets/icons/housemantj/景点爆赞.png'
11
 import collection from '../../../assets/icons/housemantj/景点收藏.png'
13
 import collection from '../../../assets/icons/housemantj/景点收藏.png'
14
+
12
 import withLayout from '@/layouts'
15
 import withLayout from '@/layouts'
13
 import { useState, useEffect, useRef } from 'react'
16
 import { useState, useEffect, useRef } from 'react'
14
 import { getTouristDetail, getExtendContent, getRecommendList } from '@/services/home'
17
 import { getTouristDetail, getExtendContent, getRecommendList } from '@/services/home'

+ 1
- 12
src/pages/index/tabs/Guide.jsx 查看文件

1
 import { useState, useEffect, useRef } from "react";
1
 import { useState, useEffect, useRef } from "react";
2
 import Taro from '@tarojs/taro'
2
 import Taro from '@tarojs/taro'
3
 import MoreGuide from "@/components/MoreGuide";
3
 import MoreGuide from "@/components/MoreGuide";
4
-import Cards from '@/components/foodCards/foodCards.jsx'
5
 import BossCard from '@/components/BossCard'
4
 import BossCard from '@/components/BossCard'
6
-import image from '@/assets/icons/ProCard/8kb.jpg'
7
-import Pay from '@/assets/icons/GuideCheck/Pay_logo.png'
8
-import food from '@/assets/icons/ProCard/food.png'
9
-import ProCard_hot from '@/assets/icons/ProCard/ProCard_hot.png'
10
 import Taxi from '@/assets/icons/GuideCheck/taxi.png'
5
 import Taxi from '@/assets/icons/GuideCheck/taxi.png'
11
 import WiFi from '@/assets/icons/GuideCheck/WiFi.png'
6
 import WiFi from '@/assets/icons/GuideCheck/WiFi.png'
12
 import GoHere from '@/assets/icons/GuideCheck/GoHere.png'
7
 import GoHere from '@/assets/icons/GuideCheck/GoHere.png'
13
-import position from '@/assets/icons/GuideCheck/position_logo.png'
14
 import Cup from '@/assets/icons/GuideCheck/Cup.png'
8
 import Cup from '@/assets/icons/GuideCheck/Cup.png'
15
 import BlackSpot from '@/assets/icons/GuideCheck/BlackSpot.png'
9
 import BlackSpot from '@/assets/icons/GuideCheck/BlackSpot.png'
16
-import starOn from '@/assets/icons/GuideCheck/starOn.png'
17
-import starOff from '@/assets/icons/GuideCheck/starOff.png'
18
-import { getRecommendList, getExtendContent, getShopPackage } from '@/services/home'
10
+import { getRecommendList, getExtendContent } from '@/services/home'
19
 import sleep from '@/assets/icons/GuideCheck/sleep_logo.png'
11
 import sleep from '@/assets/icons/GuideCheck/sleep_logo.png'
20
 import { getTaRoom, goToRoomForm } from '@/services/taRoom​'
12
 import { getTaRoom, goToRoomForm } from '@/services/taRoom​'
21
 import showMore from '../../../assets/icons/housemantj/查看更多.png'
13
 import showMore from '../../../assets/icons/housemantj/查看更多.png'
23
 import './GuideCss/style.less'
15
 import './GuideCss/style.less'
24
 
16
 
25
 
17
 
26
-const scoreList = new Array(5).fill(0)
27
-const score = '3.9'
28
 
18
 
29
 
19
 
30
 
20
 
243
           </view>
233
           </view>
244
         </view>
234
         </view>
245
         {spackage?.map((item, index) => <BossCard key={(index)} item={item} />)}
235
         {spackage?.map((item, index) => <BossCard key={(index)} item={item} />)}
246
-
247
         {/* 卡片------------- */}
236
         {/* 卡片------------- */}
248
         {/* <view className='Guide-Content-box-two'>
237
         {/* <view className='Guide-Content-box-two'>
249
           <view className='title-image-two'>
238
           <view className='title-image-two'>

+ 27
- 0
src/services/shopBoss.js 查看文件

1
+
2
+import request from '@/utils/request'
3
+
4
+
5
+/**
6
+ * 商铺老板详情
7
+ * @param {*} 
8
+ * @returns 
9
+ */
10
+export const getShopList = (params) => request(`/shop/manage/index`, { params })
11
+
12
+
13
+/**
14
+ * 商铺账户全年订单收入/推广
15
+ * @param {*} 
16
+ * @returns 
17
+ */
18
+export const getShopMoney = (id, amountType) => request(`/shop/${id}/account?amountType=${amountType}`, { id })
19
+
20
+
21
+/**
22
+ * 商铺推广收入
23
+ * @param {*} 
24
+ * @returns 
25
+ */
26
+export const getAccount = (id,) => request(`/shop/account/${id}/log`, { id })
27
+

+ 32
- 63
src/shop/components/ShopKeeper/shopKeeper.jsx 查看文件

1
 import { React, useState, useEffect, } from 'react'
1
 import { React, useState, useEffect, } from 'react'
2
 import Taro, { useRouter } from '@tarojs/taro'
2
 import Taro, { useRouter } from '@tarojs/taro'
3
 import CustomNav from '@/components/CustomNav'
3
 import CustomNav from '@/components/CustomNav'
4
+import Picker from '@/components/Picker'
4
 import Popup from '@/components/Popup'
5
 import Popup from '@/components/Popup'
6
+import ShopUsed from '@/components/ShopUsed' //已核销
7
+import ShopUnused from '@/components/ShopUnused' //未核销
5
 import eyes from '@/assets/icons/shopKeeper/小眼睛.png'
8
 import eyes from '@/assets/icons/shopKeeper/小眼睛.png'
6
 import ceyes from '@/assets/icons/shopKeeper/小眼睛-闭上.png'
9
 import ceyes from '@/assets/icons/shopKeeper/小眼睛-闭上.png'
7
 import iconsearch from '@/assets/icons/housemantj/search.png'
10
 import iconsearch from '@/assets/icons/housemantj/search.png'
18
 
21
 
19
 
22
 
20
 export default (props) => {
23
 export default (props) => {
21
-
24
+  const { shopList, shop, account, onHotelChange, accountlog, shopMoney } = props
22
   const [activeTab, setActiveTab] = useState(0)
25
   const [activeTab, setActiveTab] = useState(0)
23
   const { params } = useRouter()
26
   const { params } = useRouter()
24
   const { tabJump } = params || {}
27
   const { tabJump } = params || {}
28
+
29
+  const [isyear, setYear] = useState(false)
30
+  const [isMomth, setMonth] = useState(false)
31
+  //小眼睛开关
32
+  const handleYear = () => {
33
+    isyear ? setYear(false) : setYear(true)
34
+  }
35
+  const handleMonth = () => {
36
+    isMomth ? setMonth(false) : setMonth(true)
37
+  }
38
+
39
+
40
+  const handleHotelChange = (shopId, current) => {
41
+    onHotelChange(current)
42
+  }
43
+
25
   useEffect(() => {
44
   useEffect(() => {
26
     if (tabJump) {
45
     if (tabJump) {
27
       setActiveTab(tabJump - 0)
46
       setActiveTab(tabJump - 0)
41
     },
60
     },
42
   ]
61
   ]
43
 
62
 
63
+
44
   const [showCutover, setShowCutover] = useState(false)
64
   const [showCutover, setShowCutover] = useState(false)
45
   const ShowMoldeOn = () => {
65
   const ShowMoldeOn = () => {
46
     setShowCutover(true)
66
     setShowCutover(true)
51
   return (
71
   return (
52
     <view>
72
     <view>
53
       <view>
73
       <view>
54
-        <CustomNav title='十公里' />
55
       </view>
74
       </view>
56
       <ToggleRole showCutover={showCutover} onClose={onClose} role='shop' />
75
       <ToggleRole showCutover={showCutover} onClose={onClose} role='shop' />
57
-
58
       <view style={{ padding: '30rpx', height: '100%' }}>
76
       <view style={{ padding: '30rpx', height: '100%' }}>
59
-        <scroll-view scroll-y="true" scroll-view='true' bindscrolltoupper="upper" bindscrolltolower="lower" bindscroll="scroll" style={{ height: 'calc(100vh - 120px)' }}>
77
+        <scroll-view scroll-y scroll-view='true' bindscrolltoupper="upper" bindscrolltolower="lower" bindscroll="scroll" style={{ height: 'calc(100vh - 120px)' }}>
60
           <view className='storexx'>
78
           <view className='storexx'>
61
-            <view className='storeName'>店名:<text>Yun咖 云里 咖啡店</text></view>
79
+            <view className='storeName'>店名:<Picker style={{ display: 'inline-block' }} placeholder="请选择商铺" value={shop?.shopId} kv={['shopName', 'shopId']} dicts={shopList} onChange={handleHotelChange} /></view>
62
             <view onClick={ShowMoldeOn} className='User-info-cutover'>
80
             <view onClick={ShowMoldeOn} className='User-info-cutover'>
63
               <image className='User-info-cutover-image' src={cutoverUser} />
81
               <image className='User-info-cutover-image' src={cutoverUser} />
64
             </view>
82
             </view>
66
             <view className='money'>
84
             <view className='money'>
67
               <view className='sleft'>
85
               <view className='sleft'>
68
                 <view className='lword'>全年订单收入(税前)</view>
86
                 <view className='lword'>全年订单收入(税前)</view>
87
+
69
                 <view className='yearMoney'>
88
                 <view className='yearMoney'>
70
-                  <text>2800000</text>元
71
-                  <image className='micon' src={eyes}></image>
89
+                  <text>{isyear ? shopMoney?.totalCharges : '******'}</text>元
90
+                  <image className='micon' src={isyear ? eyes : ceyes} onClick={handleYear} />
72
                 </view>
91
                 </view>
73
               </view>
92
               </view>
74
               <view className='line' />
93
               <view className='line' />
75
               <view className='sright'>
94
               <view className='sright'>
76
                 <view className='rword'>当月订单收入(税前)</view>
95
                 <view className='rword'>当月订单收入(税前)</view>
77
                 <view className='monthMoney'>
96
                 <view className='monthMoney'>
78
-                  <text>******</text>元
79
-                  <image className='micon2' src={ceyes}></image>
97
+                  <text>{isMomth ? shopMoney?.currentCharges : '******'}</text>元
98
+                  <image className='micon2' src={isMomth ? eyes : ceyes} onClick={handleMonth}></image>
80
                 </view></view>
99
                 </view></view>
81
             </view>
100
             </view>
82
           </view>
101
           </view>
99
           </view>
118
           </view>
100
 
119
 
101
           <view>
120
           <view>
121
+            {/* 未核销 */}
102
             {activeTab === 0 &&
122
             {activeTab === 0 &&
103
-              <view className='orderCard'>
104
-                <view style={{ overflow: 'hidden' }}>
105
-                  <view className='orderId'>订单编号:<text>ABC123456789</text></view>
106
-                  <view className='orderTime'>下单日期:<text>2021-06-22 12:35</text></view>
107
-                </view>
108
-                <view className='order'>
109
-                  <image className='orderImg' src={ms} mode='aspectFit' />
110
-                  <view className='orderRight'>
111
-                    <view className='foodName'>【SEOUL.创意韩国料理】火爆全南京,
112
-                      新街口又开新店啦...</view>
113
-                    <view className='price'>合计金额:¥<text style={{ fontSize: '24rpx' }}>88</text>元 <text className='pnum'>数量:<text>1</text>张</text> </view>
114
-                    <view>已下单:等待客户上门就餐</view>
115
-                  </view>
116
-                  <view className='line' />
117
-                  <view className='phone'>客户手机:<text>136****9434</text></view>
118
-                  <view className='tripTime'>客户行程日期:预计在<text>2021-06-21中下午10:30-16:30</text></view>
119
-                </view>
120
-              </view>
123
+              <ShopUnused />
121
             }
124
             }
125
+            {/* 已核销 */}
122
             {activeTab === 1 &&
126
             {activeTab === 1 &&
123
               <>
127
               <>
124
-                <view className='orderCard'>
125
-                  <view style={{ overflow: 'hidden' }}>
126
-                    <view className='orderId'>订单编号:<text>ABC123456789</text></view>
127
-                    <view className='orderTime'>下单日期:<text>2021-06-22 12:35</text></view>
128
-                  </view>
129
-                  <view className='order'>
130
-                    <image className='orderImg' src={ms} mode='aspectFit' />
131
-                    <view className='orderRight'>
132
-                      <view className='foodName'>【SEOUL.创意韩国料理】火爆全南京,
133
-                        新街口又开新店啦...</view>
134
-                      <view className='price'>合计金额:¥<text style={{ fontSize: '24rpx' }}>88</text>元 <text className='pnum'>数量:<text>1</text>张</text> </view>
135
-                      <view>已下单:等待客户上门就餐</view>
136
-                    </view>
137
-                    <view className='line' />
138
-                    <view className='phone'>客户手机:<text>136****9434</text></view>
139
-                    <view className='tripTime'>客户行程日期:预计在<text>2021-06-21中下午10:30-16:30</text></view>
140
-                  </view>
141
-                </view>
142
-                <view className='orderCard'>
143
-                  <view style={{ overflow: 'hidden' }}>
144
-                    <view className='orderId'>订单编号:<text>ABC123456789</text></view>
145
-                    <view className='orderTime'>下单日期:<text>2021-06-22 12:35</text></view>
146
-                  </view>
147
-                  <view className='order'>
148
-                    <image className='orderImg' src={ms} mode='aspectFit' />
149
-                    <view className='orderRight'>
150
-                      <view className='foodName'>【SEOUL.创意韩国料理】火爆全南京,
151
-                        新街口又开新店啦...</view>
152
-                      <view className='price'>合计金额:¥<text style={{ fontSize: '24rpx' }}>88</text>元 <text className='pnum'>数量:<text>1</text>张</text> </view>
153
-                      <view>已下单:等待客户上门就餐</view>
154
-                    </view>
155
-                    <view className='line' />
156
-                    <view className='phone'>客户手机:<text>136****9434</text></view>
157
-                    <view className='tripTime'>客户行程日期:预计在<text>2021-06-21中下午10:30-16:30</text></view>
158
-                  </view>
159
-                </view>
128
+                <ShopUsed />
160
               </>
129
               </>
161
             }
130
             }
162
           </view>
131
           </view>

+ 16
- 3
src/shop/components/ShopKeeper/shopKeeper.less 查看文件

136
         color: #FF3434;
136
         color: #FF3434;
137
       }
137
       }
138
       .micon2{
138
       .micon2{
139
-        width: 34px;
140
-        height: 16px;
139
+        width: 38px;
140
+        height: 22px;
141
         margin-left: 23px;
141
         margin-left: 23px;
142
-        margin-bottom: 7px;
142
+        margin-bottom: -2px;
143
       }
143
       }
144
     }
144
     }
145
   }
145
   }
265
       height: 23px;
265
       height: 23px;
266
       margin: 30px 0;
266
       margin: 30px 0;
267
     }
267
     }
268
+    .button-OK{
269
+      width: 160px;
270
+    height: 40px;
271
+    background: #1A3B83;
272
+    /* margin: 0 auto; */
273
+    line-height: 40px;
274
+    border-radius: 12px;
275
+    font-size: 23px;
276
+    color: #ffffff;
277
+    position: relative;
278
+    right: -8em;
279
+    top: -2em;
280
+    }
268
     .tripTime{
281
     .tripTime{
269
       font-size: 24px;
282
       font-size: 24px;
270
       color: #666666;
283
       color: #666666;

+ 50
- 24
src/shop/components/Sparead/spreadMoney.jsx 查看文件

1
-import { useState } from 'react'
1
+import { useState, useEffect } from 'react'
2
 import Taro from '@tarojs/taro'
2
 import Taro from '@tarojs/taro'
3
 import CustomNav from '@/components/CustomNav'
3
 import CustomNav from '@/components/CustomNav'
4
 import Popup from '@/components/Popup'
4
 import Popup from '@/components/Popup'
5
+import Picker from '@/components/Picker'
6
+import ShopCommission from '@/components/ShopCommission'
5
 import eyes from '@/assets/icons/shopKeeper/小眼睛.png'
7
 import eyes from '@/assets/icons/shopKeeper/小眼睛.png'
6
 import ceyes from '@/assets/icons/shopKeeper/小眼睛-闭上.png'
8
 import ceyes from '@/assets/icons/shopKeeper/小眼睛-闭上.png'
7
 import cutoverUser from '@/assets/icons/UserCenter/cutoverUser.png'
9
 import cutoverUser from '@/assets/icons/UserCenter/cutoverUser.png'
8
 import touristOFF from '@/assets/icons/UserCenter/touristOFF.png'
10
 import touristOFF from '@/assets/icons/UserCenter/touristOFF.png'
9
 import hotelBossOFF from '@/assets/icons/UserCenter/hotelBossOFF.png'
11
 import hotelBossOFF from '@/assets/icons/UserCenter/hotelBossOFF.png'
10
 import shopBossON from '@/assets/icons/UserCenter/shopBossON.png'
12
 import shopBossON from '@/assets/icons/UserCenter/shopBossON.png'
13
+import { getAccount } from '@/services/shopBoss'
14
+
11
 import './spreadMoney.less'
15
 import './spreadMoney.less'
12
 import ToggleRole from '@/components/toggleRole/ToggleRole'
16
 import ToggleRole from '@/components/toggleRole/ToggleRole'
13
 
17
 
14
 export default (props) => {
18
 export default (props) => {
15
-
19
+  const { shopList, shop, account, onHotelChange, accountlog, shopMoney } = props
16
   const [showCutover, setShowCutover] = useState(false)
20
   const [showCutover, setShowCutover] = useState(false)
21
+  const [isyear, setYear] = useState(false)
22
+  const [isMomth, setMonth] = useState(false)
23
+  const [shopAccount, setShopAccount] = useState([])
24
+  const acc = shopMoney?.acc
25
+  const { accountId } = acc
26
+
27
+
28
+
29
+  useEffect(() => {
30
+    getAccount(accountId).then((e) => {
31
+      const accContent = e.records
32
+      setShopAccount(accContent)
33
+
34
+    })
35
+  }, [accountId])
36
+
37
+  //小眼睛开关
38
+  const handleYear = () => {
39
+    isyear ? setYear(false) : setYear(true)
40
+  }
41
+  const handleMonth = () => {
42
+    isMomth ? setMonth(false) : setMonth(true)
43
+  }
44
+
45
+  //商铺更改
46
+  const handleHotelChange = (shopId, current) => {
47
+    onHotelChange(current)
48
+  }
49
+
50
+
51
+
17
   const ShowMoldeOn = () => {
52
   const ShowMoldeOn = () => {
18
     setShowCutover(true)
53
     setShowCutover(true)
19
   }
54
   }
24
   return (
59
   return (
25
     <view>
60
     <view>
26
       <view>
61
       <view>
27
-        <CustomNav title='十公里' />
28
       </view>
62
       </view>
29
       <ToggleRole showCutover={showCutover} onClose={onClose} role='shop' />
63
       <ToggleRole showCutover={showCutover} onClose={onClose} role='shop' />
30
       <view style={{ padding: '30rpx', height: '100%' }}>
64
       <view style={{ padding: '30rpx', height: '100%' }}>
31
         <scroll-view scroll-y="true" scroll-view='true' bindscrolltoupper="upper" bindscrolltolower="lower" bindscroll="scroll" style={{ height: 'calc(100vh - 120px)' }}>
65
         <scroll-view scroll-y="true" scroll-view='true' bindscrolltoupper="upper" bindscrolltolower="lower" bindscroll="scroll" style={{ height: 'calc(100vh - 120px)' }}>
32
           <view className='storexx'>
66
           <view className='storexx'>
33
-            <view className='storeName'>店名:<text>Yun咖 云里 咖啡店</text></view>
67
+            <view className='storeName'>店名:<Picker style={{ display: 'inline-block' }} placeholder="请选择商铺" value={shop?.shopId} kv={['shopName', 'shopId']} dicts={shopList} onChange={handleHotelChange} /></view>
34
             <view onClick={ShowMoldeOn} className='User-info-cutover'>
68
             <view onClick={ShowMoldeOn} className='User-info-cutover'>
35
               <image className='User-info-cutover-image' src={cutoverUser} />
69
               <image className='User-info-cutover-image' src={cutoverUser} />
36
             </view>
70
             </view>
39
               <view className='sleft'>
73
               <view className='sleft'>
40
                 <view className='lword'>全年推广收入(税前)</view>
74
                 <view className='lword'>全年推广收入(税前)</view>
41
                 <view className='yearMoney'>
75
                 <view className='yearMoney'>
42
-                  <text>2800000</text>元
43
-                  <image className='micon' src={eyes}></image>
76
+                  <text>{isyear ? shopMoney?.totalCharges : '******'}</text>元
77
+                  <image className='micon' src={isyear ? eyes : ceyes} onClick={handleYear} />
44
                 </view>
78
                 </view>
45
               </view>
79
               </view>
46
               <view className='line' />
80
               <view className='line' />
47
               <view className='sright'>
81
               <view className='sright'>
48
                 <view className='rword'>当月推广收入(税前)</view>
82
                 <view className='rword'>当月推广收入(税前)</view>
49
                 <view className='monthMoney'>
83
                 <view className='monthMoney'>
50
-                  <text>******</text>元
51
-                  <image className='micon2' src={ceyes}></image>
84
+                  <text>{isMomth ? shopMoney?.currentCharges : '******'}</text>元
85
+                  <image className='micon2' src={isMomth ? eyes : ceyes} onClick={handleMonth}></image>
52
                 </view></view>
86
                 </view></view>
53
             </view>
87
             </view>
54
           </view>
88
           </view>
55
           <view className='title'>推广收入记录</view>
89
           <view className='title'>推广收入记录</view>
56
-          <view>
57
-            <view className='spreadCard'>
58
-              <view className='spreadDate'>日期:<text>2021-06-24</text></view>
59
-              <view className='card'>
60
-                <view className='spreadTime'>时&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;间:<text>2021-06-24  20:45</text></view>
61
-                <view className='spreadMoney'>收入金额:<text>5.00</text>元</view>
62
-              </view>
63
-            </view>
64
-            <view className='spreadCard'>
65
-              <view className='spreadDate'>日期:<text>2021-06-24</text></view>
66
-              <view className='card'>
67
-                <view className='spreadTime'>时&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;间:<text>2021-06-24  20:45</text></view>
68
-                <view className='spreadMoney'>收入金额:<text>5.00</text>元</view>
69
-              </view>
70
-            </view>
71
-          </view>
90
+          {
91
+            shopAccount.map((item, index) => {
92
+              return (
93
+                <ShopCommission item={item} />
94
+
95
+              )
96
+            })
97
+          }
72
           <view className='botton'>已经到底了~</view>
98
           <view className='botton'>已经到底了~</view>
73
         </scroll-view>
99
         </scroll-view>
74
       </view>
100
       </view>

+ 4
- 24
src/shop/components/Sparead/spreadMoney.less 查看文件

138
         color: #FF3434;
138
         color: #FF3434;
139
       }
139
       }
140
       .micon2{
140
       .micon2{
141
-        width: 34px;
142
-        height: 16px;
141
+        width: 38px;
142
+        height: 22px;
143
         margin-left: 23px;
143
         margin-left: 23px;
144
-        margin-bottom: 7px;
144
+        margin-bottom: -2px;
145
       }
145
       }
146
     }
146
     }
147
   }
147
   }
152
   line-height: 60px;
152
   line-height: 60px;
153
   margin: 62px 0 10px 1px;
153
   margin: 62px 0 10px 1px;
154
 }
154
 }
155
-.spreadCard{
156
-  margin-bottom: 1px;
157
-  .spreadDate{
158
-    font-size: 20px;
159
-    color: #202020;
160
-    line-height: 60px;
161
-  }
162
-  .card{
163
-    height: 166px;
164
-    background: #FFF;
165
-    box-shadow: 0px 8px 32px 0px rgba(0, 0, 0, 0.08);
166
-    border-radius: 12px;
167
-    padding: 40px 0 43px 22px;
168
-    font-size: 24px;
169
-    color: #202020;
170
-    box-sizing: border-box;
171
-    .spreadMoney{
172
-      line-height: 60px;
173
-    }
174
-  }
175
-}
155
+
176
 .botton{
156
 .botton{
177
   font-size: 28px;   
157
   font-size: 28px;   
178
   color: #C0C8D3;
158
   color: #C0C8D3;

+ 59
- 5
src/shop/pages/spread/spreadIndex.jsx 查看文件

1
 import React, { useState, useEffect } from 'react'
1
 import React, { useState, useEffect } from 'react'
2
+import CustomNav from '@/components/CustomNav'
2
 import { useRouter } from '@tarojs/taro'
3
 import { useRouter } from '@tarojs/taro'
4
+import { getShopList, getShopMoney, getAccount } from '@/services/shopBoss'
3
 import ShopKeeper from '../../components/ShopKeeper/shopKeeper'
5
 import ShopKeeper from '../../components/ShopKeeper/shopKeeper'
4
 import Sparead from '../../components/Sparead/spreadMoney'
6
 import Sparead from '../../components/Sparead/spreadMoney'
5
 import TabBar from '@/components/CustTabBar'
7
 import TabBar from '@/components/CustTabBar'
7
 import onShopImg from '@/assets/icons/shopKeeper/订单收入按下.png'
9
 import onShopImg from '@/assets/icons/shopKeeper/订单收入按下.png'
8
 import spareadImg from '@/assets/icons/shopKeeper/推广收入.png'
10
 import spareadImg from '@/assets/icons/shopKeeper/推广收入.png'
9
 import onSpareadImg from '@/assets/icons/shopKeeper/推广收入按下.png'
11
 import onSpareadImg from '@/assets/icons/shopKeeper/推广收入按下.png'
10
-import './spreadIndex.less'
11
 import withLayout from '@/layouts'
12
 import withLayout from '@/layouts'
12
 
13
 
14
+import './spreadIndex.less'
15
+
16
+
13
 export default withLayout((props) => {
17
 export default withLayout((props) => {
14
   const { router, person } = props
18
   const { router, person } = props
15
 
19
 
16
   const { params } = useRouter()
20
   const { params } = useRouter()
17
   const { tab } = params || {}
21
   const { tab } = params || {}
18
-
19
   const [currentTab, setCurrentTab] = useState(0)
22
   const [currentTab, setCurrentTab] = useState(0)
23
+  const [shopList, setShopList] = useState([])
24
+  const [shop, setShop] = useState()
25
+  const shopId = shop?.shopId
26
+  console.log("🚀 ~ file: spreadIndex.jsx ~ line 26 ~ withLayout ~ shopId", shopId)
27
+  const [account, setAccount] = useState()
28
+  const [accountlog, setAccountLog] = useState([])
20
 
29
 
30
+  const [amountType, setAmountType] = useState('order')
31
+  const [shopMoney, setShopMoney] = useState([])
21
   const handleTabChange = (e) => {
32
   const handleTabChange = (e) => {
22
     const { index } = e.detail
33
     const { index } = e.detail
23
     setCurrentTab(index)
34
     setCurrentTab(index)
24
   }
35
   }
25
 
36
 
37
+  const handelType = () => {
38
+    setAmountType('commission')
39
+  }
40
+
41
+  useEffect(() => {
42
+    getShopList().then((res) => {
43
+      const { shopList: list, account: acc, shop: current } = res
44
+      setShopList(list)
45
+      setShop(current)
46
+      setAccount(acc)
47
+      console.log("🚀 ~ file: shopKeeper.jsx ~ line 48 ~ getShopList ~ res", res)
48
+
49
+
50
+
51
+    })
52
+
53
+  }, [])
54
+
55
+  useEffect(() => {
56
+    if (shopId) {
57
+      getShopMoney(shopId, amountType).then((e) => {
58
+        setShopMoney(e)
59
+
60
+      })
61
+    }
62
+
63
+  }, [amountType, shopId])
64
+
65
+
66
+  const handleHotelChange = (current) => {
67
+    console.log('已选择店铺', current);
68
+    // getNowHotelManage(current.shopId).then((res) => {
69
+    //   const { account: acc } = res
70
+    //   setAccount(acc)
71
+    //   setHotel(current)
72
+    //   getAccountLogList(acc.accountId).then((res2) => {
73
+    //     setAccountLog(res2.records || [])
74
+    //   })
75
+    // })
76
+  }
77
+
26
   useEffect(() => {
78
   useEffect(() => {
27
     if (tab) {
79
     if (tab) {
28
       setCurrentTab(tab - 0)
80
       setCurrentTab(tab - 0)
31
 
83
 
32
   return (
84
   return (
33
     <view className='page-index'>
85
     <view className='page-index'>
86
+      <CustomNav title={shop?.shopName} />
87
+
34
       <view className='index-container'>
88
       <view className='index-container'>
35
-        {currentTab === 0 && <ShopKeeper />}
36
-        {currentTab === 1 && <Sparead />}
89
+        {currentTab === 0 && <ShopKeeper shopList={shopList} shop={shop} account={account} onHotelChange={handleHotelChange} accountlog={accountlog} shopMoney={shopMoney} />}
90
+        {currentTab === 1 && <Sparead shopList={shopList} shop={shop} account={account} onHotelChange={handleHotelChange} accountlog={accountlog} shopMoney={shopMoney} />}
37
       </view>
91
       </view>
38
       <view className='index-tabbar'>
92
       <view className='index-tabbar'>
39
         <TabBar extClass='custom-tabbar bottomTab' current={currentTab} onChange={handleTabChange}>
93
         <TabBar extClass='custom-tabbar bottomTab' current={currentTab} onChange={handleTabChange}>
40
           <view className={`${currentTab === 0 ? 'orderstab' : ''}`}>
94
           <view className={`${currentTab === 0 ? 'orderstab' : ''}`}>
41
             <image className='incomes' src={currentTab === 0 ? onShopImg : shopImg} /><text>订单收入</text>
95
             <image className='incomes' src={currentTab === 0 ? onShopImg : shopImg} /><text>订单收入</text>
42
           </view>
96
           </view>
43
-          <view className={`${currentTab === 1 ? 'spreadtab' : ''}`}>
97
+          <view className={`${currentTab === 1 ? 'spreadtab' : ''}`} onClick={() => { handelType() }} >
44
             <image className='house' src={currentTab === 1 ? onSpareadImg : spareadImg} /><text>推广收入</text>
98
             <image className='house' src={currentTab === 1 ? onSpareadImg : spareadImg} /><text>推广收入</text>
45
           </view>
99
           </view>
46
         </TabBar>
100
         </TabBar>