浏览代码

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

张延森 3 年前
父节点
当前提交
906bbf2c97

二进制
src/assets/icons/tabbar/recommend.gif 查看文件


二进制
src/assets/icons/tabbar/recommend_active.png 查看文件


+ 1
- 15
src/components/SearchBar/style.less 查看文件

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

+ 26
- 7
src/components/foodCards/foodCards.jsx 查看文件

1
 import Taro from '@tarojs/taro'
1
 import Taro from '@tarojs/taro'
2
-import { View, Text } from '@tarojs/components'
2
+import { View, Text, Image, Button, ScrollView } from '@tarojs/components'
3
 import CouponCard from '@/components/CouponCard'
3
 import CouponCard from '@/components/CouponCard'
4
 import Location from '@/components/Location'
4
 import Location from '@/components/Location'
5
 import { compressImage } from '@/utils'
5
 import { compressImage } from '@/utils'
6
 import SaveIcon from '@/components/SaveIcon'
6
 import SaveIcon from '@/components/SaveIcon'
7
 import Pay from '@/assets/icons/housemantj/pay.png'
7
 import Pay from '@/assets/icons/housemantj/pay.png'
8
+import Popup from '@/components/Popup'
8
 import './style.less'
9
 import './style.less'
10
+import { useState } from 'react'
9
 
11
 
10
 
12
 
11
 const CouponMedia = CouponCard.Media
13
 const CouponMedia = CouponCard.Media
13
 
15
 
14
 //套餐卡片
16
 //套餐卡片
15
 export default (props) => {
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
   const { shopId } = props.item
19
   const { shopId } = props.item
18
   const goFood = () => {
20
   const goFood = () => {
19
     Taro.navigateTo({ url: `/pages/details/foodDetails/foodDetails?id=${shopId}` })
21
     Taro.navigateTo({ url: `/pages/details/foodDetails/foodDetails?id=${shopId}` })
20
   }
22
   }
23
+  const [showCutover, setShowCutover] = useState(false)
21
   const goDetail = () => {
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
   const handlePayClick = () => {
39
   const handlePayClick = () => {
29
     Taro.navigateTo({ url: `/pages/PayOrder/index?packageId=${item.packageId}&scene=${scene || ''}&subOrderId=${subOrderId}&id=${id}` })
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
   const PayAction = <Action.Icon icon={Pay} text='支付' onClick={handlePayClick} />
42
   const PayAction = <Action.Icon icon={Pay} text='支付' onClick={handlePayClick} />
34
   return (
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
       <CouponCard action={PayAction}>
55
       <CouponCard action={PayAction}>
37
         <CouponMedia onClick={goshop ? goDetail : goFood}>
56
         <CouponMedia onClick={goshop ? goDetail : goFood}>
38
           <CouponMedia.Header
57
           <CouponMedia.Header

+ 9
- 0
src/components/foodCards/style.less 查看文件

35
       flex: 1;
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 查看文件

24
           textAlign: 'center',
24
           textAlign: 'center',
25
           opacity: '0.8',
25
           opacity: '0.8',
26
           animation: ' logo-opacity 2s linear infinite',
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 查看文件

46
   const handleTabClick = (index) => {
46
   const handleTabClick = (index) => {
47
     console.log('------tab-----event--------', index)
47
     console.log('------tab-----event--------', index)
48
     setActiveTab(index)
48
     setActiveTab(index)
49
+
49
   }
50
   }
50
   
51
   
51
   console.log('------setActiveTab--------', activeTab)
52
   console.log('------setActiveTab--------', activeTab)
52
 
53
 
53
   return (
54
   return (
54
     <view className='page-index box-content'>
55
     <view className='page-index box-content'>
55
-      <view className='index-navbar'>
56
+      <view className='index-navbar'  >
56
         <CustomNav title='我的订单' />
57
         <CustomNav title='我的订单' />
57
       </view>
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
         <view className='index-tabs'>
60
         <view className='index-tabs'>
60
           <TabBar onClick={handleTabClick} current={activeTab} />
61
           <TabBar onClick={handleTabClick} current={activeTab} />
61
         </view>
62
         </view>

+ 4
- 2
src/pages/details/foodDetails/foodDetails.config.js 查看文件

2
   navigationBarTitleText: '美食详情',
2
   navigationBarTitleText: '美食详情',
3
   navigationStyle: 'custom',
3
   navigationStyle: 'custom',
4
   disableScroll: true,
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 查看文件

126
       imageUrl: detail.poster,
126
       imageUrl: detail.poster,
127
     };
127
     };
128
   });
128
   });
129
-
129
+ const [isScroll,setScroll]=useState(true)
130
   return (
130
   return (
131
     <view className='page-index'>
131
     <view className='page-index'>
132
       <view className='index-navbar'>
132
       <view className='index-navbar'>
134
       </view>
134
       </view>
135
       <SpinBox loading={loading} className='index-container' style={{ padding: '0 30rpx' }}>
135
       <SpinBox loading={loading} className='index-container' style={{ padding: '0 30rpx' }}>
136
         <scroll-view
136
         <scroll-view
137
-          scrollY
137
+          scrollY={isScroll}
138
           style={{ height: '100%' }}
138
           style={{ height: '100%' }}
139
         >
139
         >
140
           <view className='storeDetails'>
140
           <view className='storeDetails'>
217
                     <text>返现套餐</text>
217
                     <text>返现套餐</text>
218
                   </view>
218
                   </view>
219
                   {(spackage || []).map((item) => (
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
                 </view>
222
                 </view>
223
                 <view
223
                 <view

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

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

+ 2
- 0
src/pages/index/tabs/Recommend.jsx 查看文件

11
 import { random } from '@/utils'
11
 import { random } from '@/utils'
12
 import Card from '../components/Card'
12
 import Card from '../components/Card'
13
 import './less/Recommend.less'
13
 import './less/Recommend.less'
14
+import { OfficialAccount } from '@tarojs/components'
14
 
15
 
15
 const listStyle = { height: '100%' }
16
 const listStyle = { height: '100%' }
16
 
17
 
75
 
76
 
76
   return (
77
   return (
77
     <view style={{ height: '100%', overflow: 'hidden', display: 'flex', flexDirection: 'column' }}>
78
     <view style={{ height: '100%', overflow: 'hidden', display: 'flex', flexDirection: 'column' }}>
79
+      <OfficialAccount>s21</OfficialAccount>
78
       <view className='search' onClick={onSearch} >
80
       <view className='search' onClick={onSearch} >
79
         <input className='searchInput' disabled />
81
         <input className='searchInput' disabled />
80
         <image className='searchicon' src={iconsearch} />
82
         <image className='searchicon' src={iconsearch} />