吃个甘蔗嚼一年 3 lat temu
rodzic
commit
a86b16d90b
35 zmienionych plików z 409 dodań i 264 usunięć
  1. 1
    1
      config/dev.js
  2. 1
    1
      config/prod.js
  3. 1
    1
      project.config.json
  4. BIN
      src/assets/icons/UserCenter/tips.png
  5. BIN
      src/assets/icons/housemantj/loc-o.png
  6. BIN
      src/assets/icons/housemantj/phone-o.png
  7. 4
    4
      src/components/CouponCard/Cashback/index.jsx
  8. 1
    1
      src/components/CouponCard/Cashback/style.less
  9. 1
    1
      src/components/CouponCard/Media/Header.jsx
  10. 20
    27
      src/components/List/index.jsx
  11. 36
    0
      src/components/MasonryLayout/Column.jsx
  12. 10
    30
      src/components/MasonryLayout/Item.jsx
  13. 48
    0
      src/components/MasonryLayout/Waterfall.jsx
  14. 69
    37
      src/components/MasonryLayout/index.jsx
  15. 15
    4
      src/components/MasonryLayout/style.less
  16. 1
    1
      src/components/MoreGuide/style.less
  17. 5
    8
      src/components/ShopUnused/style.less
  18. 2
    5
      src/components/ShopUsed/style.less
  19. 14
    7
      src/components/Spin/SpinBox.jsx
  20. 8
    14
      src/components/Spin/style.less
  21. 1
    1
      src/hotel/components/HouseManage/houseManage.jsx
  22. 1
    1
      src/hotel/pages/components/Extend/style.less
  23. 3
    7
      src/pages/MineUserAll/RefundMoney/CheckRefund/index.jsx
  24. 4
    1
      src/pages/details/components/Extend/extend.less
  25. 24
    4
      src/pages/details/foodDetails/foodDetails.jsx
  26. 5
    5
      src/pages/details/foodDetails/foodDetails.less
  27. 2
    2
      src/pages/details/mjDetails/sceneryDetails.jsx
  28. 4
    4
      src/pages/details/mjDetails/sceneryDetails.less
  29. 31
    16
      src/pages/index/components/Card/index.jsx
  30. 34
    26
      src/pages/index/components/Card/style.less
  31. 1
    4
      src/pages/index/index.jsx
  32. 8
    11
      src/pages/index/tabs/Guide.jsx
  33. 39
    30
      src/pages/index/tabs/Recommend.jsx
  34. 14
    8
      src/pages/index/tabs/less/Recommend.less
  35. 1
    2
      src/shop/components/ShopKeeper/shopKeeper.jsx

+ 1
- 1
config/dev.js Wyświetl plik

@@ -4,7 +4,7 @@ module.exports = {
4 4
   },
5 5
   defineConstants: {
6 6
     // HOST: '"http://192.168.89.147:8080"',
7
-    HOST: '"https://sgl-v2-test.njyunzhi.com"',
7
+    HOST: '"https://sgl-v2.njyunzhi.com"',
8 8
   },
9 9
   mini: {},
10 10
   h5: {}

+ 1
- 1
config/prod.js Wyświetl plik

@@ -3,7 +3,7 @@ module.exports = {
3 3
     NODE_ENV: '"production"'
4 4
   },
5 5
   defineConstants: {
6
-    HOST: '"https://sgl-v2-test.njyunzhi.com"',
6
+    HOST: '"https://sgl-v2.njyunzhi.com"',
7 7
   },
8 8
   mini: {},
9 9
   h5: {

+ 1
- 1
project.config.json Wyświetl plik

@@ -2,7 +2,7 @@
2 2
   "miniprogramRoot": "./dist",
3 3
   "projectname": "miniapp",
4 4
   "description": "十公里",
5
-  "appid": "wx835627a9b9b3932a",
5
+  "appid": "wx06a7372d48d56843",
6 6
   "setting": {
7 7
     "urlCheck": true,
8 8
     "es6": false,

BIN
src/assets/icons/UserCenter/tips.png Wyświetl plik


BIN
src/assets/icons/housemantj/loc-o.png Wyświetl plik


BIN
src/assets/icons/housemantj/phone-o.png Wyświetl plik


+ 4
- 4
src/components/CouponCard/Cashback/index.jsx Wyświetl plik

@@ -4,14 +4,14 @@ import { View, Text } from '@tarojs/components'
4 4
 import './style.less'
5 5
 
6 6
 export default (props) => {
7
-  const { money, prefix = '返', style } = props
7
+  const { money, prefix = '返', style } = props
8 8
 
9
-  const yuan = Number(money / 100).toFixed(2)
9
+  const yuan = Number(money / 100).toFixed(0)
10 10
 
11 11
   return (
12 12
     <View className='cpn_cashback' style={style}>
13
-      <Text>{prefix}</Text>
14
-      <Text>{`${yuan}`}</Text>
13
+      <Text style={{ fontSize: '.6em' }}>{`${prefix}¥`}</Text>
14
+      <Text>{`${yuan}`}</Text>
15 15
     </View>
16 16
   )
17 17
 }

+ 1
- 1
src/components/CouponCard/Cashback/style.less Wyświetl plik

@@ -4,7 +4,7 @@
4 4
   background: url('~@/assets/icons/ProCard/ProCard_hot.png') no-repeat;
5 5
   background-size: 100% 100%;
6 6
   padding: 16px 25px 10px 10px;
7
-  font-size: 20px;
7
+  font-size: 44px;
8 8
   color: #fff;
9 9
   line-height: 1em;
10 10
 }

+ 1
- 1
src/components/CouponCard/Media/Header.jsx Wyświetl plik

@@ -11,7 +11,7 @@ export default (props) => {
11 11
 
12 12
   return (
13 13
     <View className='coupun-media_header'>
14
-      {enableCashback && <Cashback money={cashback} style={{ marginTop: '10px' }} />}
14
+      {enableCashback && <Cashback money={cashback} style={{ marginTop: '-10px' }} />}
15 15
       <View className='coupun-media_thumb'>
16 16
         <BadgeTag type={badge} />
17 17
         <Image src={image} />

+ 20
- 27
src/components/List/index.jsx Wyświetl plik

@@ -16,47 +16,44 @@ export default React.forwardRef((props, ref) => {
16 16
     className,
17 17
     ...leftProps
18 18
   } = props
19
-  const [loading, setLoading] = useState(false)
20 19
 
20
+  const [loading, setLoading] = useState(false)
21 21
   const contextRef = useRef()
22
-  const loadingRef = useRef(false)
23
-  const [payload, setPayload] = useState(params)
22
+  const [forceUpdate, setForceUpdate] = useState(0)
24 23
   const [list, setList] = useState([])
25
-  const pageRef = useRef({ current: 1, pages: 0 })
26
-  const hasMore = pageRef.current.current < pageRef.current.pages
24
+  const pageRef = useRef({ current: 1 })
25
+  const [hasMore, setHasMore] = useState(false)
27 26
 
28 27
   // 滚动
29 28
   const handleScrollToLower = (e) => {
30
-    const loading = loadingRef.current
31
-
32 29
     if (!loading && hasMore) {
33
-      setPayload({
34
-        ...payload,
35
-        pageNum: pageRef.current.current + 1
36
-      })
30
+      pageRef.current.current += 1
31
+      setForceUpdate(forceUpdate + 1)
37 32
     }
38 33
   }
39 34
 
40
-  const fetchList = (params) => {
35
+  const fetchList = () => {
41 36
     if (!request) return;
42 37
 
43 38
     setLoading(true)
44
-    loadingRef.current = true
45
-    request(params).then((res) => {
39
+    request({
40
+      ...params,
41
+      pageSize,
42
+      pageNum: pageRef.current.current
43
+    }).then((res) => {
46 44
       const { records, ...pageInfo } = res || {}
47 45
       const lst = pageInfo.current === 1 ? records || [] : list.concat(records || [])
48 46
       setList(lst)
47
+      setHasMore(pageInfo.current < pageInfo.pages)
48
+
49 49
       if (onDataChange) {
50
-        onDataChange(lst)
50
+        onDataChange(lst, { paramsChanged: pageInfo.current === 1 })
51 51
       }
52 52
 
53 53
       pageRef.current = pageInfo
54
-      loadingRef.current = false
55
-
56 54
       setLoading(false)
57 55
 
58 56
     }).catch((err) => {
59
-      loadingRef.current = false
60 57
       console.error(err)
61 58
       setLoading(false)
62 59
 
@@ -69,19 +66,15 @@ export default React.forwardRef((props, ref) => {
69 66
   const fetchRef = useRef()
70 67
   fetchRef.current = fetchList
71 68
 
72
-  // 联动状态, 设置查询参数
73 69
   useEffect(() => {
74
-    setPayload({
75
-      ...params || {},
76
-      pageNum: 1,
77
-      pageSize,
78
-    })
79
-  }, [pageSize, params])
70
+    pageRef.current.current = 1
71
+    setHasMore(false)
72
+  }, [params])
80 73
 
81 74
   // 请求数据
82 75
   useEffect(() => {
83
-    fetchRef.current(payload)
84
-  }, [payload, request])
76
+    fetchRef.current()
77
+  }, [params, forceUpdate])
85 78
 
86 79
   useEffect(() => {
87 80
     Taro.nextTick(() => {

+ 36
- 0
src/components/MasonryLayout/Column.jsx Wyświetl plik

@@ -0,0 +1,36 @@
1
+import React, { useEffect, useRef } from 'react'
2
+import { View } from '@tarojs/components'
3
+import Item from './Item'
4
+import { classNames } from './utils'
5
+
6
+export default (props) => {
7
+  const { className, list = [], render, onRenderFinish, ...leftProps } = props
8
+
9
+  const heightRef = useRef(0)
10
+
11
+  const handleRenderFinish = (item, index) => (rect) => {
12
+    const { height } = rect;
13
+    item.__height = height
14
+    
15
+    if (index === 0) {
16
+      heightRef.current = height
17
+    } else {
18
+      heightRef.current += height
19
+    }
20
+
21
+    onRenderFinish(heightRef.current)
22
+  }
23
+
24
+  return (
25
+    <View {...leftProps} className={classNames(className, 'masonry-column')}>
26
+      {
27
+        list.map((item, index) => {
28
+
29
+          return (
30
+            <Item key={item.__vid} item={item} render={render} onRenderFinish={handleRenderFinish(item, index)} />
31
+          )
32
+        })
33
+      }
34
+    </View>
35
+  )
36
+}

+ 10
- 30
src/components/MasonryLayout/Item.jsx Wyświetl plik

@@ -1,43 +1,23 @@
1 1
 
2
-import React, { useMemo, useEffect } from 'react'
2
+import React, { useMemo } from 'react'
3
+import Taro from '@tarojs/taro';
3 4
 import { View } from '@tarojs/components'
4
-import { classNames, getRect } from './utils';
5
+import { classNames } from './utils';
5 6
 import './style.less'
6 7
 
7 8
 export default (props) => {
8
-  const { className, item, render, onRenderFinish } = props
9
+  const { className, item, top, render, onRenderFinish } = props
9 10
 
11
+  // const uqClass = useMemo(() => `f-${Math.random().toString(36).substring(2)}`, [])
10 12
   const vid = item.__vid;
11 13
   
12
-  useEffect(() => {
13
-    const calcHeight = () => {
14
-      getRect(`.${vid}`).then((res) => {
15
-        if (!res) {
16
-          // 找不到 node , 则一直重复查询
17
-          const t = setTimeout(() => {
18
-            clearTimeout(t)
19
-            calcHeight()
20
-          }, 300)
21
-        } else {
22
-          if (Array.isArray(res)) {
23
-            onRenderFinish(res[0])
24
-          } else {
25
-            onRenderFinish(res)
26
-          }
27
-        }
28
-      })
29
-    }
30
-
31
-    calcHeight()
32
-  })
33
-
14
+  const handleCallback = () => {
15
+    Taro.createSelectorQuery().select(`.${vid}`).boundingClientRect(rect => onRenderFinish(rect)).exec()
16
+  }
34 17
 
35 18
   return (
36
-    <View
37
-      key={vid}
38
-      className={classNames(className, 'masonry-item', vid)}
39
-    >
40
-      {render(item)}
19
+    <View className={classNames(className, 'masonry-item', vid)}>
20
+      {render(item, handleCallback)}
41 21
     </View>
42 22
   )
43 23
 }

+ 48
- 0
src/components/MasonryLayout/Waterfall.jsx Wyświetl plik

@@ -0,0 +1,48 @@
1
+import React, { useEffect, useMemo, useState } from 'react'
2
+import Taro from '@tarojs/taro';
3
+import { View } from '@tarojs/components'
4
+import { classNames, getRect } from './utils';
5
+import './style.less'
6
+
7
+export default (props) => {
8
+  const { className, itemClassName, style, gutter = 0, list, render, ...leftProps } = props
9
+  const uqClass = useMemo(() => `f-${Math.random().toString(36).substring(2)}`, [])
10
+
11
+  const [styles, setStyles] = useState([])
12
+
13
+  const handleImage = index => (e) => {
14
+    const { height } = e
15
+    const span = Math.ceil(height / 10)
16
+
17
+    const itemStyle = { gridRow: `auto/span ${span}` }
18
+    styles[index] = itemStyle
19
+    
20
+    if (styles.filter(Boolean).length === list.length) {    
21
+      setStyles(styles.slice())
22
+    }
23
+  }
24
+
25
+  // useEffect(() => {
26
+  //   const t = setTimeout(() => {
27
+  //     Taro.createSelectorQuery().selectAll(`.${uqClass} .waterfall-item`).boundingClientRect(rects => {
28
+  //       console.log('---------waterfall-item---------->', rects)
29
+  //     }).exec()
30
+  //     clearTimeout(t)
31
+  //   }, 500)
32
+  // }, [list, uqClass])
33
+
34
+  return (
35
+    <View className={classNames(className, 'waterfall-wrapper', uqClass)}>
36
+      {
37
+        list.map((item, index) => {
38
+          const st = styles[index]
39
+          return (
40
+            <View key={index} className={classNames(itemClassName, 'waterfall-item')} style={st}>
41
+              {render(item, handleImage(index))}
42
+            </View>
43
+          )
44
+        })
45
+      }
46
+    </View>
47
+  )
48
+}

+ 69
- 37
src/components/MasonryLayout/index.jsx Wyświetl plik

@@ -1,75 +1,107 @@
1 1
 import React, { useEffect, useMemo, useRef, useState } from 'react';
2 2
 import Taro from '@tarojs/taro';
3 3
 import { View } from '@tarojs/components';
4
-import Item from './Item';
4
+import usePrevious from '@/utils/hooks/usePrevious';
5
+import Column from './Column';
5 6
 import { useList } from './hooks';
6 7
 import { classNames, getRect } from './utils';
7 8
 
8 9
 import './style.less'
9 10
 
11
+/**
12
+ * 核心原理, 左右2栏,一个个放元素,同时记录高度,优先放入低高度区域
13
+ * 元素高度获取,主要是通过图片的 onLoad 来确保加载完成
14
+ * 
15
+ * 复杂度, 多数据公用 list,
16
+ * 需要区分是否更换数据源,是否未更换数据源,只是新增了数据
17
+ */
18
+
10 19
 export default (props) => {
11
-  const { className, itemClassName, style, gutter = 0, list, render, ...leftProps } = props
20
+  const { className, listData, itemKey, render } = props
21
+
22
+  // rfTimes 用来区分是否更换数据源
23
+  const { list, rfTimes: refresh } = listData
24
+
25
+  // 用来绘制页面的数据
26
+  const renderListRef = useRef([])
12 27
 
13
-  const splitStyle = { width: `${gutter}rpx` }
28
+  const lastList = usePrevious(list)
29
+  const lastRf = usePrevious(refresh)
14 30
 
15
-  const leftBottom = useRef(0)
16
-  const rightBottom = useRef(0)
31
+  // 记录左右2栏的数据及高度
32
+  const leftHeight = useRef(0)
33
+  const rightHeight = useRef(0)
17 34
   const [leftList, leftRef, setLeftList] = useList()
18 35
   const [rightList, rightRef, setRightList] = useList()
19
-  const [cursor, setCursor] = useState(0)
20 36
 
21
-  const listRef = useRef([])
22
-  listRef.current = list
23
-
24
-  const handleRenderFinish = (direct) => (rect) => {
25
-    const { bottom } = rect
37
+  // 用来强制更新组件
38
+  const [cursor, setCursor] = useState(-1)
26 39
 
40
+  // 每个元素渲染完成, 会拿到当前栏的高度
41
+  const handleRenderFinish = (direct) => (height) => {
27 42
     if (direct === 'left') {
28
-      leftBottom.current = bottom
43
+      leftHeight.current = height
29 44
     } else {
30
-      rightBottom.current = bottom
45
+      rightHeight.current = height
31 46
     }
32 47
 
48
+    // 触发强制渲染
33 49
     setCursor(cursor + 1)
34 50
   }
35 51
     
36 52
   useEffect(() => {
37
-    setCursor(0)
38
-    setLeftList([])
39
-    setRightList([])
40
-    listRef.current = list ? list.slice() : []
53
+    // 新数据源 = 首次进入 或者 切换数据源
54
+    const isNew = (!lastList?.length && list.length) || (lastRf !== refresh)
55
+    
56
+    if (!isNew) {
57
+      // 非新数据源, list 变更那就说明是执行了上拉加载
58
+      const addedList = []
59
+      for (let item of list) {
60
+        const found = lastList.filter(x => x[itemKey] === item[itemKey])[0]
61
+        if (!found) {
62
+          addedList.push(item)
63
+        }
64
+      }
65
+      
66
+      // 于是, 只继续绘制变更的那部分
67
+      renderListRef.current = addedList
68
+      setCursor(-2)
69
+    } else {
70
+      setCursor(0)
71
+      setLeftList([])
72
+      setRightList([])
73
+      renderListRef.current = list ? list.slice() : []
74
+      leftHeight.current = 0
75
+      rightHeight.current = 0
76
+  
77
+      if (renderListRef.current.length) {
78
+        setCursor(0)
79
+      } else {
80
+        setCursor(-1)
81
+      }
82
+    }
41 83
   }, [list])
42 84
 
43 85
   useEffect(() => {
44
-    const len = !list ? 0 : list.length;
45
-    if (leftRef.current.length + rightRef.current.length >= len) return;
86
+    // 如果当前渲染数据为空
87
+    if (!renderListRef.current.length) return;
46 88
 
47
-    const item = listRef.current.shift()
89
+    // 每次把数组最上面的一个拿出来
90
+    const item = renderListRef.current.shift()
48 91
     item.__vid = `f-${Math.random().toString(36).substring(2)}`
49 92
 
50
-    if (leftBottom.current <= rightBottom.current) {
93
+    // 优先放入低高度的栏里面
94
+    if (leftHeight.current <= rightHeight.current) {
51 95
       setLeftList([...leftRef.current, item])
52 96
     } else {
53 97
       setRightList([...rightRef.current, item])
54 98
     }
55
-  }, [cursor, list])
99
+  }, [cursor])
56 100
 
57 101
   return (
58
-    <View
59
-      style={style}
60
-      className={classNames(className, 'masonry-layout')}
61
-    >
62
-      <View className='masonry-column'>
63
-        {
64
-          leftList.map(item => <Item key={item.__vid} className={itemClassName} item={item} render={render} onRenderFinish={handleRenderFinish('left')} />)
65
-        }
66
-      </View>
67
-      <View className='masonry-split' style={splitStyle} />
68
-      <View className='masonry-column'>
69
-        {
70
-          rightList.map(item => <Item key={item.__vid} className={itemClassName} item={item} render={render} onRenderFinish={handleRenderFinish('right')} />)
71
-        }
72
-      </View>
102
+    <View className={classNames(className, 'masonry-layout')}>
103
+      <Column list={leftList} render={render} onRenderFinish={handleRenderFinish('left')} />
104
+      <Column list={rightList} render={render} onRenderFinish={handleRenderFinish('right')} />
73 105
     </View>
74 106
   )
75 107
 }

+ 15
- 4
src/components/MasonryLayout/style.less Wyświetl plik

@@ -6,14 +6,25 @@
6 6
 
7 7
   .masonry-column {
8 8
     flex: 1;
9
+    overflow: hidden;
10
+    position: relative;
9 11
   }
10 12
   
11
-  .masonry-split {
12
-    flex: none;
13
+  .masonry-item {
14
+    width: 100%;
13 15
   }
16
+}
14 17
 
15
-  .masonry-item {
18
+
19
+.waterfall-wrapper {
20
+  display: grid;
21
+  grid-template-columns: repeat(auto-fill, minmax(50%, 1fr));
22
+  grid-gap: 0;
23
+  grid-auto-flow: row dense;
24
+  grid-auto-rows: 20px;
25
+
26
+  .waterfall-item {
16 27
     width: 100%;
17
-    overflow-x: hidden;
28
+    grid-row: auto/span 10;
18 29
   }
19 30
 }

+ 1
- 1
src/components/MoreGuide/style.less Wyświetl plik

@@ -6,6 +6,6 @@
6 6
     font-size: 28px;
7 7
     font-weight: 400;
8 8
     color: #202020;
9
-    line-height: 54px;
9
+    line-height: 64px;
10 10
     padding-bottom: 10px;
11 11
   }

+ 5
- 8
src/components/ShopUnused/style.less Wyświetl plik

@@ -5,7 +5,7 @@
5 5
     color: #666666;
6 6
     line-height: 44px;
7 7
     float: left;
8
-    margin: 60px 0 32px 0;
8
+    margin: 60px 0 0 0;
9 9
 
10 10
   }
11 11
   .orderTime{    
@@ -13,7 +13,7 @@
13 13
     color: #666666;
14 14
     line-height: 44px;
15 15
     float: right;
16
-    margin: 60px 0 32px 0;
16
+    margin: 60px 0 0 0;
17 17
   }
18 18
   .order{
19 19
     background: #FFFFFF;
@@ -25,21 +25,19 @@
25 25
       height: 194px;
26 26
       border-radius: 22px;
27 27
       float: left;
28
-      margin:0 26px 30px 0;
28
+      margin:0 26px 0 0;
29 29
     }
30 30
     .orderRight{
31 31
       .foodName{
32 32
         font-size: 24px;
33 33
         color: #333333;
34
-        line-height: 40px;
34
+        margin-top: 40px;
35 35
       }
36 36
       .price{
37 37
         font-size: 20px;
38 38
         font-weight: bold;
39 39
         color: #202020;
40
-        line-height: 44px;
41
-        margin: 37px 0 40px 0;
42
-        height: 19px;
40
+        margin: 0 0 10px 0;
43 41
         .pnum{
44 42
           color: #333333;
45 43
           font-weight: 400;
@@ -72,7 +70,6 @@
72 70
       width: 160px;
73 71
     height: 40px;
74 72
     background: #1A3B83;
75
-    /* margin: 0 auto; */
76 73
     line-height: 40px;
77 74
     border-radius: 12px;
78 75
     font-size: 23px;

+ 2
- 5
src/components/ShopUsed/style.less Wyświetl plik

@@ -28,17 +28,14 @@
28 28
     }
29 29
     .orderRight {
30 30
       .foodName {
31
-        height: 63px;
32 31
         font-size: 24px;
33 32
         color: #333333;
34
-        line-height: 40px;
35 33
       }
36 34
       .price {
37 35
         font-size: 20px;
38 36
         font-weight: bold;
39 37
         color: #202020;
40 38
         line-height: 44px;
41
-        margin: 37px 0 40px 0;
42 39
         height: 19px;
43 40
         .pnum {
44 41
           color: #333333;
@@ -57,16 +54,16 @@
57 54
     }
58 55
     .veri_Date {
59 56
       color: red;
60
-      height: 5px;
61 57
       letter-spacing: 1px;
62 58
       font-size: 30px;
59
+      padding-top: 20px;
63 60
     }
64 61
     .line {
65 62
       width: 100%;
66 63
       height: 2px;
67 64
       background: #000;
68 65
       opacity: 0.1;
69
-      margin-top: 100px;
66
+      margin-top: 30px;
70 67
     }
71 68
     .phone {
72 69
       font-size: 24px;

+ 14
- 7
src/components/Spin/SpinBox.jsx Wyświetl plik

@@ -4,6 +4,19 @@ import { View } from '@tarojs/components'
4 4
 import Spin from '.'
5 5
 import './style.less'
6 6
 
7
+const Loading = (props) => {
8
+  const { loading, size = '64rpx', ...leftProps } = props
9
+
10
+  const cls = ['loading-box', loading? 'active' : undefined].filter(Boolean).join(' ')
11
+
12
+  return (
13
+    <View className={cls}>
14
+      <Spin size={size} {...leftProps} />
15
+    </View>
16
+  )
17
+}
18
+
19
+
7 20
 export default (props) => {
8 21
   const { className, style, loading, size = '64rpx', ...leftProps } = props
9 22
 
@@ -11,14 +24,8 @@ export default (props) => {
11 24
 
12 25
   return (
13 26
     <View className={cls} style={style}>
14
-      {
15
-        loading && (
16
-          <View className='loading-box'>
17
-            <Spin size={size} {...leftProps} />
18
-          </View>
19
-        )
20
-      }
21 27
       {props.children}
28
+      <Loading loading={loading} size={size} {...leftProps} />
22 29
     </View>
23 30
   )
24 31
 }

+ 8
- 14
src/components/Spin/style.less Wyświetl plik

@@ -140,22 +140,11 @@
140 140
 .loading-wrapper {
141 141
   height: 100%;
142 142
   position: relative;
143
+  overflow: hidden;
143 144
 
144 145
   .loading-box {
145
-    // position: absolute;
146
-    // z-index: 10;
147
-    // top: 0;
148
-    // left: 0;
149
-    // width: 100%;
150
-    // height: 100%;
151
-    // min-height: 72px;
152
-    // padding-top: 60%;
153
-    // padding-left: 50%;
154
-    // background: rgba(255, 255, 255, .95);
155
-    // box-sizing: border-box;
156
-
157 146
     position: absolute;
158
-    z-index: 10;
147
+    z-index: -10;
159 148
     top: 0;
160 149
     left: 0;
161 150
     width: 100%;
@@ -164,7 +153,12 @@
164 153
     padding-top: 35%;
165 154
     padding-left: 50%;
166 155
     background: rgba(255, 255, 255, 0.95);
167
-    -webkit-box-sizing: border-box;
168 156
     box-sizing: border-box;
157
+    opacity: 0;
158
+
159
+    &.active {
160
+      opacity: 1;
161
+      z-index: 10;
162
+    }
169 163
   }
170 164
 }

+ 1
- 1
src/hotel/components/HouseManage/houseManage.jsx Wyświetl plik

@@ -99,7 +99,7 @@ export default React.forwardRef((props, ref) => {
99 99
       setShowCard(false)
100 100
       console.log(`/pages/index/index?tab=1&roomId=${room.roomId}&roomOrderId=${roomOrderId}&fromType=hotel&recommender=${hotel.hotelId}`)
101 101
       return {
102
-        title: room.roomName,
102
+        title: `欢迎来到${room.roomName}`,
103 103
         path: `/pages/index/index?tab=1&roomId=${room.roomId}&roomOrderId=${roomOrderId}&fromType=hotel&recommender=${hotel.hotelId}`,
104 104
         imageUrl: shareImage,
105 105
       }

+ 1
- 1
src/hotel/pages/components/Extend/style.less Wyświetl plik

@@ -45,7 +45,7 @@
45 45
   }
46 46
   .storezn{
47 47
     color: #202020;
48
-    line-height: 54px;
48
+    line-height: 64px;
49 49
     margin-bottom: 60px;
50 50
     text-align: justify;
51 51
   }

+ 3
- 7
src/pages/MineUserAll/RefundMoney/CheckRefund/index.jsx Wyświetl plik

@@ -122,10 +122,8 @@ export default withLayout((props) => {
122 122
         <CustomNav title='售后退款' />
123 123
       </view>
124 124
       <View className='index-container'>
125
-        <View className='box-content'>
126
-          <scroll-view scroll-y style='height: 100%;' >
127
-            <SpinBox loading={loading}>
128
-
125
+        <SpinBox loading={loading} className='box-content'>
126
+          <scroll-view scroll-y style={{ height: '100%' }} >
129 127
               <view className='Refund-Content-box'>
130 128
                 <view className='title-image'>
131 129
                   <image
@@ -220,10 +218,8 @@ export default withLayout((props) => {
220 218
                   提交申请
221 219
                 </Button>
222 220
               </view>
223
-            </SpinBox>
224
-
225 221
           </scroll-view>
226
-        </View>
222
+        </SpinBox>
227 223
       </View>
228 224
 
229 225
     </view >

+ 4
- 1
src/pages/details/components/Extend/extend.less Wyświetl plik

@@ -1,8 +1,11 @@
1 1
 .cardext{
2
+  padding: 0 30px;
3
+  box-sizing: border-box;
4
+
2 5
   .storezn{
3 6
     font-size: 28px;    
4 7
     color: #202020;
5
-    line-height: 54px;
8
+    line-height: 64px;
6 9
     margin-bottom: 40px;
7 10
     text-align: justify;
8 11
   }

+ 24
- 4
src/pages/details/foodDetails/foodDetails.jsx Wyświetl plik

@@ -16,7 +16,8 @@ import SpinBox from "@/components/Spin/SpinBox";
16 16
 import TabIcon from "@/components/HorTabbar/TabIcon";
17 17
 import ax from "@/assets/icons/housemantj/onlove.png";
18 18
 import yysj from "@/assets/icons/housemantj/openTime.png";
19
-import dw from "@/assets/icons/housemantj/loc.png";
19
+import dw from "@/assets/icons/housemantj/loc-o.png";
20
+import phoneImg from "@/assets/icons/housemantj/phone-o.png";
20 21
 import zhuandao from "@/assets/icons/housemantj/backTop.png";
21 22
 import titlezs from "@/assets/icons/housemantj/titleTip.png";
22 23
 import showMore from "@/assets/icons/housemantj/setMore.png";
@@ -99,6 +100,22 @@ export default withLayout((props) => {
99 100
   const log = useRef("");
100 101
   const lat = useRef("");
101 102
 
103
+
104
+  const handlePhone = () => {
105
+    if (!detail.phone) {
106
+      Taro.showToast({
107
+        title: '暂无商家联系方式',
108
+        icon: 'none',
109
+      })
110
+
111
+      return;
112
+    }
113
+
114
+    Taro.makePhoneCall({
115
+      phoneNumber: detail.phone
116
+    })
117
+  }
118
+
102 119
   useEffect(() => {
103 120
     if (id) {
104 121
       setLoading(true)
@@ -109,12 +126,12 @@ export default withLayout((props) => {
109 126
         setimglist(res.imageList || []);
110 127
         setLoading(false)
111 128
       }).catch(() => setLoading(false));
112
-      getShopPackage(id, { pageNum: 9999 }).then((res) => {
129
+      getShopPackage(id, { pageSize: 500 }).then((res) => {
113 130
         setPackage(res.records || []);
114 131
         setNewpgNum(res.records.length);
115 132
         setAllpgNum(res.total);
116 133
       });
117
-      getExtendContent("shop", id, { pageNum: 999 }).then((res) => {
134
+      getExtendContent("shop", id, { pageSize: 500 }).then((res) => {
118 135
         setExtend(res.records || []);
119 136
         setAllextNum(res.total);
120 137
         setNewextNum(res.records.length);
@@ -197,7 +214,10 @@ export default withLayout((props) => {
197 214
               </view>
198 215
               <view className='yysj'>
199 216
                 <image src={yysj} className='yysjImg' />
200
-                营业时间:{detail.businessHours}
217
+                <text>营业时间:{detail.businessHours}</text>
218
+                <view style={{ float: 'right', paddingLeft: '30rpx', borderLeft: '1px dotted #999' }} onClick={handlePhone}>
219
+                  <image src={phoneImg} style={{ width: '32rpx', height: '32rpx' }} />
220
+                </view>
201 221
               </view>
202 222
               <view className='dpPosition' onClick={openMap}>
203 223
                 <image src={dw} className='dwTip' />

+ 5
- 5
src/pages/details/foodDetails/foodDetails.less Wyświetl plik

@@ -79,11 +79,11 @@
79 79
       margin-top: 40px;
80 80
       position: relative;
81 81
       .dwTip {
82
-        width: 28px;
83
-        height: 28px;
82
+        width: 48px;
83
+        height: 48px;
84
+        top: -8px;
85
+        left: -16px;
84 86
         position: absolute;
85
-        top: 4px;
86
-        left: 0;
87 87
       }
88 88
       view {
89 89
         font-size: 24px;
@@ -164,7 +164,7 @@
164 164
 .storezn {
165 165
   font-size: 28px;
166 166
   color: #202020;
167
-  line-height: 54px;
167
+  line-height: 64px;
168 168
   margin-bottom: 44px;
169 169
 }
170 170
 .storezn + image {

+ 2
- 2
src/pages/details/mjDetails/sceneryDetails.jsx Wyświetl plik

@@ -1,6 +1,6 @@
1 1
 import CustomNav from '@/components/CustomNav'
2 2
 import ax from '@/assets/icons/housemantj/onlove.png'
3
-import dw from '@/assets/icons/housemantj/loc.png'
3
+import dw from '@/assets/icons/housemantj/loc-o.png'
4 4
 import titlejd from '@/assets/icons/housemantj/goodTourist.png'
5 5
 import titlems from '@/assets/icons/housemantj/goodFood.png'
6 6
 import showMore from '@/assets/icons/housemantj/setMore.png'
@@ -79,7 +79,7 @@ export default withLayout((props) => {
79 79
           setRecommend(res2 || [])
80 80
         })
81 81
       })
82
-      getExtendContent('tourist', id, { pageNum: 9999 }).then((res) => {
82
+      getExtendContent('tourist', id, { pageSize: 500 }).then((res) => {
83 83
         setExtend(res.records || [])
84 84
         setAllextNum(res.total)
85 85
         setNewextNum(res.records.length)

+ 4
- 4
src/pages/details/mjDetails/sceneryDetails.less Wyświetl plik

@@ -55,11 +55,11 @@
55 55
     .dpPosition {
56 56
       position: relative;
57 57
       .dwTip {
58
-        width: 28px;
59
-        height: 28px;
58
+        width: 48px;
59
+        height: 48px;
60
+        top: -8px;
61
+        left: -8px;
60 62
         position: absolute;
61
-        top: 4px;
62
-        left: 0;
63 63
       }
64 64
       .distance {
65 65
         padding-left: 38px;

+ 31
- 16
src/pages/index/components/Card/index.jsx Wyświetl plik

@@ -1,5 +1,6 @@
1 1
 
2
-import Taro, { useDidShow } from '@tarojs/taro'
2
+import { useMemo } from 'react'
3
+import Taro from '@tarojs/taro'
3 4
 import useSave from "@/utils/hooks/useSave"
4 5
 import msTip from '@/assets/icons/housemantj/foodtip.png'
5 6
 import mjTip from '@/assets/icons/housemantj/mjtip.png'
@@ -10,7 +11,13 @@ import './style.less'
10 11
 
11 12
 export default (props) => {
12 13
 
13
-  const { item, style } = props
14
+  const { className, item, style, onImageLoad } = props
15
+  
16
+  const uqClass = useMemo(() => {
17
+    return `f-${Math.random().toString(36).substring(2)}`
18
+  }, [])
19
+
20
+  const cls = useMemo(() => [className, 'contentCard', uqClass].filter(Boolean).join(' '), [className, uqClass])
14 21
 
15 22
   const [isSaved, toggleSave] = useSave(item.isSaved, item.targetType, item.targetId)
16 23
   const Detail = () => {
@@ -22,23 +29,31 @@ export default (props) => {
22 29
     }
23 30
   }
24 31
 
25
-
32
+  const handleLoad = () => {
33
+    Taro.createSelectorQuery().select(`.${uqClass}`).boundingClientRect(rect => {
34
+      onImageLoad(rect)
35
+    }).exec()
36
+  }
26 37
 
27 38
   return (
28
-    <view className='contentCard' style={style}>
29
-      <view className='cardTop'>
30
-        <image mode='widthFix' onClick={Detail} src={item.poster} className='cCardimg' />
31
-        <image className='lefttips' src={item.targetType === 'tourist' ? mjTip : msTip} />
32
-        <image onClick={toggleSave} src={isSaved > 0 ? onlove : love} className='loveharde'></image>
33
-      </view>
34
-      <view className='bContent' onClick={Detail}>
35
-        <view className='cCword'>{(item.title).toString().length > 35 ? (item.title).substring(0, 35) + '...' : (item.title)}</view>
36
-        <view className='cCleft'>
37
-          <image src={location} className='cCicon'></image>
38
-          <view className='distance'><text>{(item.distance / 1000).toFixed(2)}</text>公里</view>
39
+    <view className={uqClass} style={{ overflow: 'hidden' }}>
40
+      <view className='contentCard' style={style}>
41
+        <view className='cardTop'>
42
+          <image mode='widthFix' onClick={Detail} src={item.poster} className='cCardimg' onLoad={handleLoad} />
43
+          <image className='lefttips' src={item.targetType === 'tourist' ? mjTip : msTip} />
44
+          <image onClick={toggleSave} src={isSaved > 0 ? onlove : love} className='loveharde'></image>
39 45
         </view>
40
-        <view className='cCright'>
41
-          <view className='price'><text className='money'>¥</text><text>{item.averagePrice / 100}</text>/人</view>
46
+        <view className='bContent' onClick={Detail}>
47
+          <view className='cCword'>{(item.title).toString().length > 35 ? (item.title).substring(0, 35) + '...' : (item.title)}</view>
48
+          <view className='cCBottom'>
49
+            <view className='cCleft'>
50
+              <image src={location} className='cCicon'></image>
51
+              <view className='distance'><text>{(item.distance / 1000).toFixed(2)}</text>公里</view>
52
+            </view>
53
+            <view className='cCright'>
54
+              <view className='price'><text className='money'>¥</text><text>{item.averagePrice / 100}</text>/人</view>
55
+            </view>
56
+          </view>
42 57
         </view>
43 58
       </view>
44 59
     </view>

+ 34
- 26
src/pages/index/components/Card/style.less Wyświetl plik

@@ -3,10 +3,14 @@
3 3
   box-shadow: 0px 8px 38px 0px rgba(0, 0, 0, 0.12);
4 4
   border-radius: 24px;
5 5
   overflow: hidden;
6
-  margin-bottom:50px;
6
+  margin-bottom: 30px;
7 7
   break-inside: avoid;
8 8
   position: relative;
9 9
 
10
+  width: calc(100% - 30px);
11
+  box-sizing: border-box;
12
+  margin-left: 15px;
13
+
10 14
   .cardTop{
11 15
     border-radius: 24px 24px 0px 0px;
12 16
     .cCardimg{
@@ -36,33 +40,37 @@
36 40
       color: #404040;
37 41
       text-align: justify;
38 42
     }
43
+
44
+    .cCBottom {
45
+      display: flex;
39 46
     
40
-    .cCleft{
41
-      float: left;
42
-      position: relative;
43
-      padding:40px 0 30px 0;
44
-      .cCicon{
45
-        width: 17px;
46
-        height: 21px;
47
-        position: absolute;
48
-        left: 0;
49
-        top: 48px;
50
-      }
51
-      .distance{
52
-        padding-left: 24px;
53
-        font-size: 24px;
54
-        color: #C0C8D3;
47
+      .cCleft{
48
+        flex: 3;
49
+        position: relative;
50
+        padding:40px 0 30px 0;
51
+        .cCicon{
52
+          width: 17px;
53
+          height: 21px;
54
+          position: absolute;
55
+          left: 0;
56
+          top: 48px;
57
+        }
58
+        .distance{
59
+          padding-left: 24px;
60
+          font-size: 24px;
61
+          color: #C0C8D3;
62
+        }
55 63
       }
56
-    }
57
-    .cCright{
58
-      position: relative;
59
-      float: right;
60
-      padding:40px 0 30px 0;
61
-      .price{          
62
-        font-size: 24px;
63
-        color: #FF3434;
64
-        .money{
65
-          font-size: 20px;
64
+      .cCright{
65
+        flex: 2;
66
+        position: relative;
67
+        padding:40px 0 30px 0;
68
+        .price{          
69
+          font-size: 24px;
70
+          color: #FF3434;
71
+          .money{
72
+            font-size: 20px;
73
+          }
66 74
         }
67 75
       }
68 76
     }

+ 1
- 4
src/pages/index/index.jsx Wyświetl plik

@@ -4,7 +4,6 @@ import React, { useState, useEffect } from 'react'
4 4
 import Taro, { useDidShow } from '@tarojs/taro'
5 5
 import CustomNav from '@/components/CustomNav'
6 6
 import logo from '@/assets/icons/comm/logo_small.png'
7
-import tips from '@/assets/icons/UserCenter/tips.png'
8 7
 
9 8
 import { getHotelDetail } from '@/services/landlord'
10 9
 import { getTaRoom } from '@/services/taRoom​'
@@ -19,7 +18,7 @@ import Recommend from './tabs/Recommend'
19 18
 
20 19
 import './index.less'
21 20
 
22
-
21
+const tips = 'https://yz-shigongli.oss-cn-shanghai.aliyuncs.com/images/sgl-v2-tips.png'
23 22
 
24 23
 export default withLayout((props) => {
25 24
   const { router, person, location } = props
@@ -42,8 +41,6 @@ export default withLayout((props) => {
42 41
     roomId = rid
43 42
   }
44 43
 
45
-
46
-
47 44
   useDidShow(() => {
48 45
     setIsDidShow(isDidShow + 1)
49 46
   })

+ 8
- 11
src/pages/index/tabs/Guide.jsx Wyświetl plik

@@ -48,7 +48,7 @@ export default (props) => {
48 48
     if (roomOrderId) {
49 49
       goToRoomForm(roomOrderId).then((res) => {
50 50
         if (res.status !== 1 && res.personNum > 0) {
51
-          Taro.navigateTo({
51
+          Taro.reLaunch({
52 52
             url: `/pages/RoomOrder/index?roomOrderId=${roomOrderId}&status=${res.status}&roomId=${roomId}`,
53 53
           })
54 54
         }
@@ -67,9 +67,7 @@ export default (props) => {
67 67
 
68 68
   const geiZy = () => {
69 69
     setLoading(true)
70
-    getExtendContent('room', roomId, {
71
-
72
-    }).then((res) => {
70
+    getExtendContent('room', roomId, { pageSize: 500 }).then((res) => {
73 71
       // setExtend(res.records || [])
74 72
       setExtend(res.records)
75 73
       setIfroomId('reality')
@@ -162,9 +160,7 @@ export default (props) => {
162 160
   }
163 161
 
164 162
   return (
165
-    <scroll-view scrollY style='height:100%;'  >
166
-      <SpinBox loading={loading}>
167
-
163
+    <scroll-view scrollY style={{ height: '100%' }}  >
168 164
         <view className='Guide-Home-box'>
169 165
           {
170 166
             ifroomId === 'havenot' && (
@@ -177,7 +173,7 @@ export default (props) => {
177 173
           {/* 有民宿的情况下 */}
178 174
           {
179 175
             ifroomId === 'reality' && (
180
-              <view>
176
+              <SpinBox loading={loading}>
181 177
                 <view className='room-box-info-ROOM'>
182 178
                   <view className='room-bi-name-ROOM' >
183 179
                     <view className='room-bin-title-ROOM'>房屋名称</view>
@@ -245,9 +241,11 @@ export default (props) => {
245 241
                     <image mode='scaleToFill' className='title-image-cup' src={BlackSpot} />
246 242
                     <text className='title-title-boss' >更多指引</text>
247 243
                   </view>
248
-                  {(extend || []).map((item, index) => <MoreGuide key={(index)} item={item} />)}
244
+                  <view style={{ padding: '0 30rpx', boxSizing: 'border-box' }}>
245
+                    {(extend || []).map((item, index) => <MoreGuide key={(index)} item={item} />)}
246
+                  </view>
249 247
                 </view>
250
-              </view>
248
+              </SpinBox>
251 249
             )
252 250
           }
253 251
           <view className='Guide-Content-box'>
@@ -261,7 +259,6 @@ export default (props) => {
261 259
           </view>
262 260
 
263 261
         </view>
264
-      </SpinBox>
265 262
     </scroll-view>
266 263
   )
267 264
 }

+ 39
- 30
src/pages/index/tabs/Recommend.jsx Wyświetl plik

@@ -7,10 +7,12 @@ import Tip from '@/components/tip'
7 7
 import List from '@/components/List';
8 8
 import NoData from '@/components/NoData'
9 9
 import MasonryLayout from '@/components/MasonryLayout';
10
+import Waterfall from '@/components/MasonryLayout/Waterfall';
10 11
 import { getIndexType, getResourceList } from '@/services/home'
11 12
 import Card from '../components/Card'
12 13
 import './less/Recommend.less'
13 14
 
15
+const listStyle = { height: 'calc(100% - 145px)' }
14 16
 
15 17
 export default (props) => {
16 18
   const { router, person, location } = props
@@ -19,30 +21,40 @@ export default (props) => {
19 21
   const [typeList, setTypeList] = useState([])
20 22
   const listRef = useRef()
21 23
 
22
-  const [queryParams, setQueryParams] = useState({ location: location, pageNum: 1, pageSize: 10, typeId: '' })
24
+  const [queryParams, setQueryParams] = useState({ location, pageNum: 1, pageSize: 10, typeId: '' })
25
+  const rfTimes = useRef(0)
23 26
 
24 27
   // 获取资源表信息
25
-  const [alllist, setAllList] = useState([])
28
+  // const [alllist, setAllList] = useState([])
29
+  const [listData, setListData] = useState({ list: [], rfTimes: 0 })
30
+
26 31
   //分类标签
27 32
   const tabs = [{ title: '附近' }].concat(typeList.map(x => ({ ...x, title: x.typeName })))
28 33
   //切换上面的标签
29 34
   const handleTabChange = (e) => {
30 35
     const { index } = e.detail
31 36
     setActiveTab(index)
32
-    const tab = tabs[index].typeId
37
+    const tab = tabs[index].typeId || ''
38
+
33 39
     setQueryParams({
34 40
       ...queryParams,
35 41
       typeId: tab
36 42
     })
37 43
 
38
-    if (index == 0) {
39
-      setQueryParams({ location: location, pageNum: 1, pageSize: 10, typeId: '' })
40
-    }
41 44
     //如果context有的话代表他滚动了   那么切换tab页就置顶
42 45
     if (listRef.current?.context) {
43 46
       listRef.current.context.scrollTo({ top: 0 })
44 47
     }
45 48
   }
49
+
50
+  const handleDataChange = (value, e) => {
51
+    if (e.paramsChanged) {
52
+      rfTimes.current += 1
53
+    }
54
+
55
+    setListData({ list: value, rfTimes: rfTimes.current })
56
+  }
57
+
46 58
   useEffect(() => {
47 59
     //查询分类标签表
48 60
     getIndexType({ pageSize: 20 }).then((res) => {
@@ -50,26 +62,21 @@ export default (props) => {
50 62
     })
51 63
   }, [])
52 64
 
53
-
54
-
55 65
   const onSearch = () => {
56 66
     // 用绝对路径
57 67
     Taro.navigateTo({ url: '/pages/search/search' });
58 68
   }
59
-  // 联动收藏
60
-  const likeLook = () => {
61
-    getResourceList().then(e => {
62
-      setAllList(e.records)
63
-    })
64
-
65
-  }
66
-
67
-
68
-  useDidShow(() => {
69
-    likeLook()
70
-  })
69
+  // // 联动收藏
70
+  // const likeLook = () => {
71
+  //   getResourceList().then(e => {
72
+  //     setAllList(e.records)
73
+  //   })
71 74
 
75
+  // }
72 76
 
77
+  // useDidShow(() => {
78
+  //   likeLook()
79
+  // })
73 80
 
74 81
   return (
75 82
     // <view style={{ height: '100%', overflow: 'hidden',display:'flex',flexDirection:'column' }}>
@@ -102,18 +109,20 @@ export default (props) => {
102 109
       {/* <View style={{ flex:'auto' }}> */}
103 110
         <List
104 111
           ref={listRef}
105
-          style={{ height: 'calc(100% - 145px)' }}
106
-          // style={{ flex: 'auto', height: '100%' }}
112
+          style={listStyle}
107 113
           request={getResourceList}
108 114
           params={queryParams}
109
-          onDataChange={setAllList}
115
+          onDataChange={handleDataChange}
110 116
         >
111
-          {/* <MasonryLayout
112
-            list={alllist}
113
-            render={item => <Card item={item} />}
114
-          /> */}
115
-
116
-          {
117
+          <view style={{ padding: '30rpx 15rpx' }}>
118
+            <MasonryLayout
119
+              itemKey='resourceNo'
120
+              listData={listData}
121
+              render={(item, callback) => <Card item={item} onImageLoad={callback} />}
122
+            />
123
+          </view>
124
+
125
+          {/* {
117 126
             alllist.length == 0 ?
118 127
               <NoData /> :
119 128
               <view className='waterfall'>
@@ -121,7 +130,7 @@ export default (props) => {
121 130
                   alllist.map((item) => <Card key={item.resourceNo} item={item} />)
122 131
                 }
123 132
               </view>
124
-          }
133
+          } */}
125 134
         </List>
126 135
       {/* </View> */}
127 136
     </view>

+ 14
- 8
src/pages/index/tabs/less/Recommend.less Wyświetl plik

@@ -27,12 +27,12 @@
27 27
       letter-spacing: 0.2em;
28 28
     }
29 29
 }
30
-.waterfall{
31
-  column-count: 2;      //分两列
32
-  column-gap: 30px;    //列间距
33
-  background-color: #F8F8F8;
34
-  padding:30px 30px 0 30px; 
35
-}
30
+// .waterfall{
31
+//   column-count: 2;      //分两列
32
+//   column-gap: 30px;    //列间距
33
+//   background-color: #F8F8F8;
34
+//   padding:30px 30px 0 30px; 
35
+// }
36 36
 .botton{
37 37
   font-size: 28px;
38 38
   color: #C0C8D3;
@@ -70,21 +70,27 @@
70 70
     }
71 71
   }
72 72
   .tabs-Unselected {
73
-    width: 25vw;      
73
+    // width: 25vw;
74 74
     color: #C0C8D3; 
75 75
     text-align: center;
76 76
     font-size: 28px;
77 77
     line-height: 91px;
78
+    box-sizing: border-box;
79
+    padding: 0 32px;
80
+    letter-spacing: 2px;
78 81
   }
79 82
   .tabs-swiper {
80 83
     max-height: 0;
81 84
   }
82 85
   .tabs-Selected {
86
+    box-sizing: border-box;
83 87
     font-size: 32px;
84 88
     color: #4C4C4C;
85
-    width: 25vw;      
89
+    // width: 25vw;
86 90
     font-weight: bold;
87 91
     text-align: center;
88 92
     border-bottom: 6px solid #4C4C4C;
93
+    padding: 0 32px;
94
+    letter-spacing: 2px;
89 95
   }
90 96
 }

+ 1
- 2
src/shop/components/ShopKeeper/shopKeeper.jsx Wyświetl plik

@@ -1,7 +1,6 @@
1 1
 import { React, useState, useEffect, useMemo, useRef } from 'react'
2 2
 import Taro, { useRouter } from '@tarojs/taro'
3
-import { getShopList, getShopMoney, getAccount, getVerifiedOrder, setGetVerifiedOrder } from '@/services/shopBoss'
4
-
3
+import { getVerifiedOrder } from '@/services/shopBoss'
5 4
 import Picker from '@/components/Picker'
6 5
 import ShopUsed from '@/components/ShopUsed' //已核销
7 6
 import ShopUnused from '@/components/ShopUnused' //未核销