Bläddra i källkod

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

Your Name 3 år sedan
förälder
incheckning
745dfa2ddb

+ 1
- 1
project.config.dev.json Visa fil

@@ -4,7 +4,7 @@
4 4
   "description": "十公里",
5 5
   "appid": "wx835627a9b9b3932a",
6 6
   "setting": {
7
-    "urlCheck": true,
7
+    "urlCheck": false,
8 8
     "es6": false,
9 9
     "postcss": false,
10 10
     "minified": false

Binär
src/assets/icons/GuideCheck/Pay_logo.png Visa fil


Binär
src/assets/icons/housemantj/pay.png Visa fil


Binär
src/assets/icons/tabbar/recommend.gif Visa fil


Binär
src/assets/icons/tabbar/recommend.png Visa fil


Binär
src/assets/icons/tabbar/recommend_active.png Visa fil


+ 0
- 4
src/components/AuthPage/login.less Visa fil

@@ -30,20 +30,16 @@
30 30
   bottom: 80px;
31 31
   width: 100%;
32 32
   vertical-align: middle;
33
-
34 33
   radio-group {
35 34
     display: inline-block;
36 35
     vertical-align: middle;
37 36
   }
38
-
39 37
   radio {
40 38
     transform: scale(.8);
41 39
   }
42
-
43 40
   view {
44 41
     display: inline-block;
45 42
     vertical-align: middle;
46
-
47 43
     text{
48 44
       color: #274190;
49 45
       text-decoration: underline;

+ 2
- 2
src/components/BossCard/index.jsx Visa fil

@@ -1,6 +1,6 @@
1 1
 import Taro from '@tarojs/taro'
2 2
 import { View, Text } from '@tarojs/components'
3
-import Pay from '@/assets/icons/GuideCheck/Pay_logo.png'
3
+import Pay from '@/assets/icons/housemantj/pay.png'
4 4
 import { getQueryString } from '@/utils/index'
5 5
 import CouponCard from '@/components/CouponCard'
6 6
 import { compressImage } from '@/utils'
@@ -33,7 +33,7 @@ export default (props) => {
33 33
       <CouponMedia onClick={goFood}>
34 34
         <CouponMedia.Header
35 35
           cashback={item.cashback}
36
-          image={compressImage(item.poster)}
36
+          image={compressImage(item.poster, 'thumb')}
37 37
           badge='food'
38 38
         />
39 39
         <CouponMedia.Body star={st}>

+ 1
- 11
src/components/CompoentsOrder/OrderCard/index.jsx Visa fil

@@ -9,7 +9,7 @@ import { getQrcode } from '@/services/miniapp'
9 9
 import QRcode from "@/assets/icons/UserCenter/QRcode.png";
10 10
 import refund from "@/assets/icons/GuideCheck/refund.png";
11 11
 import Cancel from "@/assets/icons/UserCenter/Cancel.png";
12
-import Pay from "@/assets/icons/GuideCheck/Pay_logo.png";
12
+import Pay from "@/assets/icons/housemantj/pay.png";
13 13
 import Null from "@/assets/icons/UserCenter/null_logo.png";
14 14
 import Evaluated from "@/assets/icons/UserCenter/evaluated.png";
15 15
 import Refund from "@/assets/icons/UserCenter/Refund.png";
@@ -75,16 +75,6 @@ export default (props) => {
75 75
       url: `/pages/MineUserAll/RefundMoney/CheckRefund/index?id=${item.orderId}`,
76 76
     });
77 77
   };
78
-  // const PayAction =
79
-  //   kkp == '1' ? null ://空卡片用于售后详情页面
80
-  //     sh == '1' ? <Action.Icon icon={Refund} text='售后/退款' onClick={() => handleRefund(item)} /> ://售后页面卡片
81
-  //       item.status === 0 ? <Action.Icon icon={Pay} text='支付' onClick={handleDetail} /> ://待支付
82
-  //         item.status === 1 && item.isVerified == false ? <Action.Icon icon={QRcode} text='扫码核销' onClick={() => onWriteOff(item)} /> ://待核销
83
-  //           item.status === 2 && item.isVerified == false ? <Action.Image image={refund} /> ://已退费
84
-  //             item.status === 7 && item.isVerified == false ? <Action.Image image={Cancel} /> ://已取消
85
-  //               item.status === 9 ? <Action.Image image={Null} /> ://已过期
86
-  //                 item.isVerified == true && item.isEvaluated > 0 ? <Action.Image image={Evaluated} /> ://已评价
87
-  //                   item.isVerified == true ? <Action.Icon icon={Evaluation} text='评价' onClick={() => evaluation(item)} /> : null//待评价
88 78
 
89 79
   let PayAction = null
90 80
   if (kkp == '1') {//空卡片用于售后详情页面

+ 1
- 1
src/components/CouponCard/Action/IconAction.jsx Visa fil

@@ -18,7 +18,7 @@ export default (props) => {
18 18
     <View className='cpn-action cpn-icon-action'>
19 19
       <View onClick={handleClick}>
20 20
         <Image src={icon} />
21
-        {text?<Text>{text}</Text>:null}
21
+        {text?<Text style={{color:text=='支付'?'#FC9C57':'#202020'}}>{text}</Text>:null}
22 22
       </View>
23 23
     </View>
24 24
   )

+ 1
- 1
src/components/CouponCard/Media/Header.jsx Visa fil

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

+ 1
- 15
src/components/SearchBar/style.less Visa fil

@@ -1,41 +1,27 @@
1
-
2 1
 .searchBar{
3 2
   margin: 35px 0;
4 3
   .weui-search-bar{
5 4
     padding: 0px;
6 5
     border-radius: 45px;
7 6
     background: #F8F8F8;
8
-
9
-    .weui-search-bar__label{
10
-      background: #F8F8F8;
11
-    }
12 7
     .weui-search-bar__form{
13 8
       border-radius: 45px;
14 9
       background: #F8F8F8;
15
-      
16
-
17 10
     }
18
-
19 11
     .weui-search-bar__label{
20 12
       border-radius: 45px;
21 13
       background: #F8F8F8;
22
-
23
-
24 14
     }
25 15
     .weui-search-bar__input{
26 16
       text-align: center;
27 17
       background: #F8F8F8;
28
-
29
-    }
30
-  
18
+    }  
31 19
     .weui-search-bar__cancel-btn{
32 20
       position: relative;
33 21
       left: -10px;
34 22
       font-size: 31px;
35 23
       padding-left: 5px;
36 24
       background: #F8F8F8;
37
-
38
-
39 25
     }
40 26
   }
41 27
 }

+ 29
- 7
src/components/foodCards/foodCards.jsx Visa fil

@@ -1,11 +1,13 @@
1 1
 import Taro from '@tarojs/taro'
2
-import { View, Text } from '@tarojs/components'
2
+import { View, Text, Image, Button, ScrollView } from '@tarojs/components'
3 3
 import CouponCard from '@/components/CouponCard'
4 4
 import Location from '@/components/Location'
5 5
 import { compressImage } from '@/utils'
6 6
 import SaveIcon from '@/components/SaveIcon'
7 7
 import Pay from '@/assets/icons/housemantj/pay.png'
8
+import Popup from '@/components/Popup'
8 9
 import './style.less'
10
+import { useState } from 'react'
9 11
 
10 12
 
11 13
 const CouponMedia = CouponCard.Media
@@ -13,25 +15,45 @@ const Action = CouponCard.Action
13 15
 
14 16
 //套餐卡片
15 17
 export default (props) => {
16
-  const { item, st, det, editable, goshop, scene, subOrderId, id } = props
18
+  const { item, st, det, editable,setScroll, goshop, scene, subOrderId, id } = props
17 19
   const { shopId } = props.item
18 20
   const goFood = () => {
19 21
     Taro.navigateTo({ url: `/pages/details/foodDetails/foodDetails?id=${shopId}` })
20 22
   }
23
+  const [showCutover, setShowCutover] = useState(false)
24
+  const goDetail = () => {
25
+    //打开当前套餐详情弹窗
26
+    setShowCutover(true)
27
+    //使父组件禁止滚动
28
+    setScroll(false)
29
+  }
30
+  const onClose = () => {
31
+    //关闭当前套餐详情弹窗
32
+    setShowCutover(false)
33
+    //使父组件恢复滚动
34
+    setScroll(true)
35
+  }
21 36
 
22
-  // 支付成功--判断---有---问--没有--跳转到全部订单
23 37
 
24 38
 
25 39
   const handlePayClick = () => {
26 40
     Taro.navigateTo({ url: `/pages/PayOrder/index?packageId=${item.packageId}&scene=${scene || ''}&subOrderId=${subOrderId}&id=${id}` })
27
-    console.log("🚀 ~ file: foodCards.jsx ~ line 17 ~ scene", item.packageId, scene)
28
-
29 41
   }
30 42
   const PayAction = <Action.Icon icon={Pay} text='支付' onClick={handlePayClick} />
31 43
   return (
32
-    <View style={{ margin: '15px 5px' }}>
44
+    <View style={{ margin: '15px 5px' }} >
45
+      <View className='packageDetail' style={{display:goshop?'':'none'}}>
46
+        <Popup show={showCutover} maskClosable={showCutover}  onClose={onClose}>
47
+          <ScrollView
48
+            scrollY
49
+            style={{ maxHeight: '60vh' }}
50
+          >
51
+            <Image mode='widthFix' src={item.details ? item.details : item.poster} />
52
+          </ScrollView>
53
+        </Popup >
54
+      </View>
33 55
       <CouponCard action={PayAction}>
34
-        <CouponMedia onClick={goshop ? '' : goFood}>
56
+        <CouponMedia onClick={goshop ? goDetail : goFood}>
35 57
           <CouponMedia.Header
36 58
             cashback={item.cashback}
37 59
             image={compressImage(item.poster)}

+ 9
- 0
src/components/foodCards/style.less Visa fil

@@ -35,4 +35,13 @@
35 35
       flex: 1;
36 36
     }
37 37
   }
38
+}
39
+.packageDetail{
40
+  Image{
41
+    width: 100%;
42
+  }
43
+  .weui-dialog__bd{
44
+    padding: 0;
45
+    margin: 0;
46
+  }
38 47
 }

+ 27
- 16
src/hotel/pages/components/Extend/style.less Visa fil

@@ -1,28 +1,28 @@
1
-#det{
2
-  .editword{
1
+#det {
2
+  .editword {
3 3
     padding-top: 60px;
4
-    .srl{
4
+    .srl {
5 5
       font-size: 30px;
6 6
       font-weight: bold;
7 7
       color: #202020;
8
-    }  
9
-    .mg{
8
+    }
9
+    .mg {
10 10
       font-size: 38px;
11 11
       margin: 0 20px 50px 20px;
12 12
     }
13
-    .rzline{
13
+    .rzline {
14 14
       border-top: 2px #999 dashed;
15 15
       height: 2px;
16 16
       width: 160px;
17 17
       display: inline-block;
18 18
       margin-bottom: 8px;
19
-    } 
20
-    .cancel{
19
+    }
20
+    .cancel {
21 21
       color: #274290;
22 22
       display: inline-block;
23 23
       margin-right: 44px;
24
-      width: 240px;      
25
-      font-size: 30px;      
24
+      width: 240px;
25
+      font-size: 30px;
26 26
       font-weight: bold;
27 27
       height: 78px;
28 28
       line-height: 78px;
@@ -34,30 +34,41 @@
34 34
       letter-spacing: 3px;
35 35
       width: 240px;
36 36
       height: 78px;
37
-      font-size: 30px;      
37
+      font-size: 30px;
38 38
       line-height: 78px;
39 39
       background: #274290;
40 40
       font-weight: bold;
41 41
       border-radius: 12px;
42 42
       display: inline-block;
43 43
       color: #fff;
44
-    }  
44
+    }
45 45
   }
46
-  .storezn{
46
+  .storezn {
47
+    // color: #202020;
48
+    // line-height: 64px;
49
+    // margin-bottom: 60px;
50
+    // overflow: hidden;
51
+    // text-align: justify;
52
+    // white-space: pre-wrap;
53
+
47 54
     color: #202020;
48 55
     line-height: 64px;
49 56
     margin-bottom: 60px;
57
+    overflow: hidden;
50 58
     text-align: justify;
59
+    padding: 0 21px 0 11px;
60
+    /* padding-right: -12px; */
51 61
     white-space: pre-wrap;
62
+    overflow-wrap: break-word;
52 63
   }
53
-  Textarea{
64
+  Textarea {
54 65
     height: 300px;
55 66
     width: 100%;
56 67
     padding: 30px;
57
-    background: #F8F8F8;
68
+    background: #f8f8f8;
58 69
     border-radius: 8px;
59 70
     box-sizing: border-box;
60 71
     height: 254px;
61 72
     font-size: 26px;
62 73
   }
63
-}
74
+}

+ 5
- 4
src/hotel/pages/landlord/addRoom/addRoom.jsx Visa fil

@@ -34,13 +34,14 @@ export default withLayout((props) => {
34 34
 
35 35
   const onRoomMap = () => {
36 36
     Taro.chooseLocation().then((res) => {
37
-      setRoomModel({ ...roomModel, location: res.longitude + ',' + res.latitude, locName: res.name })
37
+      console.log("🚀 ~ file: addRoom.jsx ~ line 37 ~ Taro.chooseLocation ~ res", res)
38
+      setRoomModel({ ...roomModel, location: res.longitude + ',' + res.latitude, locName: res.name, address: res.address })
38 39
     })
39 40
   }
40
-  
41
+
41 42
   const onParkMap = () => {
42 43
     Taro.chooseLocation().then((res) => {
43
-      setRoomModel({ ...roomModel, parkingLocation: res.longitude + ',' + res.latitude, pkLocName: res.name })
44
+      setRoomModel({ ...roomModel, parkingLocation: res.longitude + ',' + res.latitude, pkLocName: res.name, parkingAddress: res.address })
44 45
     })
45 46
   }
46 47
   const sumbit = () => {
@@ -174,7 +175,7 @@ export default withLayout((props) => {
174 175
         <CustomNav title={hotelName} />
175 176
       </view>
176 177
       <view className='roomDetail' style={{ height: '100%', overflow: "hidden", }} >
177
-        <scroll-view scrollY style={{ height: '100%' }}>
178
+        <scroll-view scrollY style={{ height: '87%' }}>
178 179
           <View id='det'>
179 180
             <Popup show={showCutover} onClose={onClose}>
180 181
               <View className='editword'>

+ 19
- 6
src/hotel/pages/landlord/addRoom/addRoom.less Visa fil

@@ -56,14 +56,27 @@
56 56
     }
57 57
   }
58 58
   .button-OK {
59
-    height: 92px;
59
+    // height: 92px;
60
+    // background: #274291;
61
+    // margin: 60px 0 30px 0;
62
+    // letter-spacing: 5px;
63
+    // line-height: 92px;
64
+    // border-radius: 12px;
65
+    // font-size: 30px;
66
+    // font-weight: bold;
67
+    // color: #fff;
68
+    /* height: 95rpx; */
69
+
60 70
     background: #274291;
61
-    margin: 60px 0 30px 0;
62
-    letter-spacing: 5px;
63
-    line-height: 92px;
64
-    border-radius: 12px;
65
-    font-size: 30px;
71
+    margin: 60rpx 0 30rpx 0;
72
+    letter-spacing: 5rpx;
73
+    line-height: 92rpx;
74
+    border-radius: 12rpx;
75
+    font-size: 30rpx;
66 76
     font-weight: bold;
67 77
     color: #fff;
78
+    position: fixed;
79
+    top: 37em;
80
+    width: 23em;
68 81
   }
69 82
 }

+ 1
- 1
src/layouts/Loading.jsx Visa fil

@@ -24,7 +24,7 @@ export default (props) => {
24 24
           textAlign: 'center',
25 25
           opacity: '0.8',
26 26
           animation: ' logo-opacity 2s linear infinite',
27
-          fontSize: '4vw',
27
+          fontSize: '4.3vw',
28 28
         }}
29 29
       >
30 30
         收集人间美好

+ 32
- 41
src/pages/MineUserAll/AllOrder/index.jsx Visa fil

@@ -1,11 +1,33 @@
1
-import { useState, useEffect, } from 'react'
2
-import { Taro, useRouter } from '@tarojs/taro'
1
+import { useState, useEffect, useMemo, } from 'react'
2
+import { Current, Taro, useRouter } from '@tarojs/taro'
3 3
 import { View } from '@tarojs/components'
4 4
 import withLayout from '@/layouts'
5 5
 import CustomNav from '@/components/CustomNav'
6 6
 import Complete from '@/components/CompoentsOrder/complete'
7 7
 import './style.less'
8 8
 
9
+const tabs = ['全部', '待支付', '待核销', '已使用', '已过期'].map(x => ({ title: x }))
10
+
11
+const TabBar = (props) => {
12
+  const handleClick = (e) => {
13
+    const { index } = e.detail
14
+    props.onClick(index)
15
+  }
16
+
17
+  return (
18
+    <mp-tabs
19
+      tabClass='tabs-extend'
20
+      activeClass='tabs-extend-active'
21
+      swiperClass='tabs-extend-swiper'
22
+      tabUnderlineColor='#000'
23
+      tabs={tabs}
24
+      activeTab={props.current}
25
+      onTabclick={handleClick}
26
+    >
27
+    </mp-tabs>
28
+  )
29
+}
30
+
9 31
 
10 32
 export default withLayout((props) => {
11 33
   const [activeTab, setActiveTab] = useState(0)
@@ -13,7 +35,6 @@ export default withLayout((props) => {
13 35
   const { params } = useRouter()
14 36
   const { tabJump } = params || {}
15 37
 
16
-
17 38
   useEffect(() => {
18 39
     if (tabJump) {
19 40
       setActiveTab(tabJump - 0)
@@ -21,52 +42,22 @@ export default withLayout((props) => {
21 42
   }, [tabJump])
22 43
 
23 44
 
45
+  const handleTabClick = (index) => {
46
+    console.log('------tab-----event--------', index)
47
+    setActiveTab(index)
24 48
 
25
-  const tabs = [
26
-    {
27
-      title: '全部',
28
-    },
29
-    {
30
-      title: '待支付',
31
-
32
-    },
33
-    {
34
-      title: '待核销',
35
-
36
-    },
37
-    {
38
-      title: '已使用',
39
-
40
-    },
41
-    {
42
-      title: '已过期',
49
+  }
43 50
 
44
-    },
45
-  ]
51
+  console.log('------setActiveTab--------', activeTab)
46 52
 
47
-  const handleTabChange = (e) => {
48
-    const { index } = e.detail
49
-    setActiveTab(index)
50
-  }
51 53
   return (
52 54
     <view className='page-index box-content'>
53
-      <view className='index-navbar'>
55
+      <view className='index-navbar'  >
54 56
         <CustomNav title='我的订单' />
55 57
       </view>
56
-      <View className='index-container' style={{display:'flex',flexDirection:'column',boxSizing:'border-box'}}>
58
+      <View className='index-container' style={{ display: 'flex', flexDirection: 'column', boxSizing: 'border-box' }}>
57 59
         <view className='index-tabs'>
58
-          <mp-tabs
59
-            tabClass='tabs-Unselected'
60
-            swiperClass='tabs-swiper'
61
-            activeClass='tabs-Selected'
62
-            tabUnderlineColor='#000'
63
-            tabInactiveTextColor='#C0C8D3'
64
-            tabs={tabs}
65
-            current={activeTab}
66
-            onChange={handleTabChange}
67
-            activeTab={activeTab}
68
-          >
69
-          </mp-tabs>
60
+          <TabBar onClick={handleTabClick} current={activeTab} />
70 61
         </view>
71 62
         {activeTab === 0 && <Complete />}
72 63
         {activeTab === 1 && <Complete type={0} />}

+ 10
- 11
src/pages/MineUserAll/AllOrder/style.less Visa fil

@@ -3,25 +3,24 @@
3 3
   .index-tabs {
4 4
     width: 100%;
5 5
 
6
-    .tabs-Unselected {
6
+    .tabs-extend {
7 7
       width: 20vw;
8 8
       text-align: center;
9
-      height: 26px;
9
+      line-height: 84px;
10
+      height: 84px;
10 11
       font-size: 28px;
11 12
       font-weight: bold;
12 13
       color: #c0c8d3;
14
+      box-sizing: border-box;
13 15
     }
14
-    .tabs-swiper {
15
-      max-height: 0px;
16
-    }
17
-    .tabs-Selected {
18
-      height: 30px;
19
-      font-size: 32px;
20
-      font-weight: bold;
16
+
17
+    .tabs-extend-active {
21 18
       color: #4c4c4c;
22
-      padding-top: 33px;
23
-      padding-bottom: 28px;
24 19
       border-bottom: 5px solid black;
25 20
     }
21
+
22
+    .tabs-extend-swiper {
23
+      max-height: 0;
24
+    }
26 25
   }
27 26
 }

+ 4
- 2
src/pages/details/foodDetails/foodDetails.config.js Visa fil

@@ -2,6 +2,8 @@ export default {
2 2
   navigationBarTitleText: '美食详情',
3 3
   navigationStyle: 'custom',
4 4
   disableScroll: true,
5
-
6
-  enableShareAppMessage: true
5
+  enableShareAppMessage: true,
6
+  usingComponents: {
7
+    "mp-dialog": "weui-miniprogram/dialog/dialog",
8
+  }
7 9
 }

+ 3
- 3
src/pages/details/foodDetails/foodDetails.jsx Visa fil

@@ -126,7 +126,7 @@ export default withLayout((props) => {
126 126
       imageUrl: detail.poster,
127 127
     };
128 128
   });
129
-
129
+ const [isScroll,setScroll]=useState(true)
130 130
   return (
131 131
     <view className='page-index'>
132 132
       <view className='index-navbar'>
@@ -134,7 +134,7 @@ export default withLayout((props) => {
134 134
       </view>
135 135
       <SpinBox loading={loading} className='index-container' style={{ padding: '0 30rpx' }}>
136 136
         <scroll-view
137
-          scrollY
137
+          scrollY={isScroll}
138 138
           style={{ height: '100%' }}
139 139
         >
140 140
           <view className='storeDetails'>
@@ -217,7 +217,7 @@ export default withLayout((props) => {
217 217
                     <text>返现套餐</text>
218 218
                   </view>
219 219
                   {(spackage || []).map((item) => (
220
-                    <Cards scene={scene} id={id} subOrderId={subOrderId} key={item.packageId} editable='1' st={star} goshop='1' item={item} det={detail} />
220
+                    <Cards scene={scene} id={id} setScroll={setScroll} subOrderId={subOrderId} key={item.packageId} editable='1' st={star} goshop='1' item={item} det={detail} />
221 221
                   ))}
222 222
                 </view>
223 223
                 <view

+ 1
- 5
src/pages/index/components/Card/style.less Visa fil

@@ -6,11 +6,9 @@
6 6
   margin-bottom: 30px;
7 7
   break-inside: avoid;
8 8
   position: relative;
9
-
10 9
   width: calc(100% - 30px);
11 10
   box-sizing: border-box;
12 11
   margin-left: 15px;
13
-
14 12
   .cardTop{
15 13
     border-radius: 24px 24px 0px 0px;
16 14
     .cCardimg{
@@ -40,10 +38,8 @@
40 38
       color: #404040;
41 39
       text-align: justify;
42 40
     }
43
-
44 41
     .cCBottom {
45
-      display: flex;
46
-    
42
+      display: flex;    
47 43
       .cCleft{
48 44
         flex: 3;
49 45
         position: relative;

+ 2
- 2
src/pages/index/tabbar.js Visa fil

@@ -1,8 +1,8 @@
1 1
 
2 2
 const tabbar = [
3
-  {
3
+  {//recommend_active
4 4
     text: '老板推荐',
5
-    iconPath: require('@/assets/icons/tabbar/recommend.png'),
5
+    iconPath: require('@/assets/icons/tabbar/recommend.gif'),
6 6
     selectedIconPath: require('@/assets/icons/tabbar/recommend_active.png'),
7 7
   },
8 8
   {

+ 2
- 1
src/pages/index/tabs/Guide.jsx Visa fil

@@ -253,9 +253,10 @@ export default (props) => {
253 253
             <text className='title-title-boss' >老板推荐好吃的</text>
254 254
           </view>
255 255
         </view>
256
-        <view style={{ marginTop: '10rpx', marginBottom: '60rpx' }}>
256
+        <view style={{ marginTop: '10rpx', paddingBottom: '60rpx' }}>
257 257
           {(spackage || []).map((item, index) => <BossCard det={item} st={parseFloat(item.score.toFixed(1))} key={(index)} trackClick={trackClick} taRoomContent={taRoomContent} item={item} />)}
258 258
         </view>
259
+        {/* <Image src={} /> */}
259 260
       </view>
260 261
     </scroll-view>
261 262
   )

+ 10
- 5
src/pages/index/tabs/Recommend.jsx Visa fil

@@ -11,6 +11,7 @@ import { getIndexType, getResourceList } from '@/services/home'
11 11
 import { random } from '@/utils'
12 12
 import Card from '../components/Card'
13 13
 import './less/Recommend.less'
14
+import { OfficialAccount } from '@tarojs/components'
14 15
 
15 16
 const listStyle = { height: '100%' }
16 17
 
@@ -32,17 +33,18 @@ export default (props) => {
32 33
 
33 34
   //分类标签
34 35
   const tabs = [{ title: '附近' }].concat(typeList.map(x => ({ ...x, title: x.typeName })))
35
-  //切换上面的标签
36
-  const handleTabChange = (e) => {
37
-    const { index } = e.detail
36
+  const details=(index,tab)=>{
38 37
     setActiveTab(index)
39
-    const tab = tabs[index].typeId || ''
40
-
41 38
     setQueryParams({
42 39
       ...queryParams,
43 40
       typeId: tab
44 41
     })
45 42
   }
43
+  //切换上面的标签
44
+  const handleTabChange = (e) => {
45
+    const { index } = e.detail
46
+    details(index,tabs[index].typeId||'')
47
+  }
46 48
 
47 49
   const handleDataChange = (value, e) => {
48 50
     if (e.paramsChanged) {
@@ -61,6 +63,8 @@ export default (props) => {
61 63
     //查询分类标签表
62 64
     getIndexType({ pageSize: 20 }).then((res) => {
63 65
       setTypeList(res.records || [])
66
+      details(1,res.records[0].typeId)
67
+
64 68
     })
65 69
   }, [])
66 70
 
@@ -75,6 +79,7 @@ export default (props) => {
75 79
 
76 80
   return (
77 81
     <view style={{ height: '100%', overflow: 'hidden', display: 'flex', flexDirection: 'column' }}>
82
+      <OfficialAccount>s21</OfficialAccount>
78 83
       <view className='search' onClick={onSearch} >
79 84
         <input className='searchInput' disabled />
80 85
         <image className='searchicon' src={iconsearch} />

+ 4
- 2
src/utils/index.js Visa fil

@@ -61,15 +61,17 @@ export function random(prefix) {
61 61
  * @param {*} url 
62 62
  * @returns 
63 63
  */
64
-export function compressImage(url) {
64
+export function compressImage(url, typ) {
65 65
   if (!url) return url;
66 66
 
67 67
   // GIF 不压缩
68 68
   if (url.indexOf('.gif') > -1) return url;
69 69
 
70
+  const style = typ || 'cmp80'
71
+
70 72
   // eslint-disable-next-line no-undef
71 73
   if (url.indexOf(OSS) > -1) {
72
-    return `${url}?x-oss-process=style/cmp80`
74
+    return `${url}?x-oss-process=style/${style}`.replace('http://', 'https://')
73 75
   }
74 76
 
75 77
   return url;