Parcourir la source

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

张延森 il y a 3 ans
Parent
révision
906bbf2c97

BIN
src/assets/icons/tabbar/recommend.gif Voir le fichier


BIN
src/assets/icons/tabbar/recommend_active.png Voir le fichier


+ 1
- 15
src/components/SearchBar/style.less Voir le fichier

@@ -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
 }

+ 26
- 7
src/components/foodCards/foodCards.jsx Voir le fichier

@@ -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,26 +15,43 @@ 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)
21 24
   const goDetail = () => {
22
-    
25
+    //打开当前套餐详情弹窗
26
+    setShowCutover(true)
27
+    //使父组件禁止滚动
28
+    setScroll(false)
29
+  }
30
+  const onClose = () => {
31
+    //关闭当前套餐详情弹窗
32
+    setShowCutover(false)
33
+    //使父组件恢复滚动
34
+    setScroll(true)
23 35
   }
24 36
 
25
-  // 支付成功--判断---有---问--没有--跳转到全部订单
26 37
 
27 38
 
28 39
   const handlePayClick = () => {
29 40
     Taro.navigateTo({ url: `/pages/PayOrder/index?packageId=${item.packageId}&scene=${scene || ''}&subOrderId=${subOrderId}&id=${id}` })
30
-    console.log("🚀 ~ file: foodCards.jsx ~ line 17 ~ scene", item.packageId, scene)
31
-
32 41
   }
33 42
   const PayAction = <Action.Icon icon={Pay} text='支付' onClick={handlePayClick} />
34 43
   return (
35
-    <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>
36 55
       <CouponCard action={PayAction}>
37 56
         <CouponMedia onClick={goshop ? goDetail : goFood}>
38 57
           <CouponMedia.Header

+ 9
- 0
src/components/foodCards/style.less Voir le fichier

@@ -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
 }

+ 1
- 2
src/layouts/Loading.jsx Voir le fichier

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

+ 3
- 2
src/pages/MineUserAll/AllOrder/index.jsx Voir le fichier

@@ -46,16 +46,17 @@ export default withLayout((props) => {
46 46
   const handleTabClick = (index) => {
47 47
     console.log('------tab-----event--------', index)
48 48
     setActiveTab(index)
49
+
49 50
   }
50 51
   
51 52
   console.log('------setActiveTab--------', activeTab)
52 53
 
53 54
   return (
54 55
     <view className='page-index box-content'>
55
-      <view className='index-navbar'>
56
+      <view className='index-navbar'  >
56 57
         <CustomNav title='我的订单' />
57 58
       </view>
58
-      <View className='index-container' style={{display:'flex',flexDirection:'column',boxSizing:'border-box'}}>
59
+      <View className='index-container' style={{ display: 'flex', flexDirection: 'column', boxSizing: 'border-box' }}>
59 60
         <view className='index-tabs'>
60 61
           <TabBar onClick={handleTabClick} current={activeTab} />
61 62
         </view>

+ 4
- 2
src/pages/details/foodDetails/foodDetails.config.js Voir le fichier

@@ -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 Voir le fichier

@@ -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
- 1
src/pages/index/tabs/Guide.jsx Voir le fichier

@@ -253,7 +253,7 @@ 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 259
       </view>

+ 2
- 0
src/pages/index/tabs/Recommend.jsx Voir le fichier

@@ -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
 
@@ -75,6 +76,7 @@ export default (props) => {
75 76
 
76 77
   return (
77 78
     <view style={{ height: '100%', overflow: 'hidden', display: 'flex', flexDirection: 'column' }}>
79
+      <OfficialAccount>s21</OfficialAccount>
78 80
       <view className='search' onClick={onSearch} >
79 81
         <input className='searchInput' disabled />
80 82
         <image className='searchicon' src={iconsearch} />