吃个甘蔗嚼一年 3 years ago
parent
commit
44bc642c42

+ 1
- 1
src/components/add-tipsFood/index.js View File

32
       let { screenWidth } = wx.getSystemInfoSync()
32
       let { screenWidth } = wx.getSystemInfoSync()
33
       this.setData({
33
       this.setData({
34
         navbarHeight: rect.bottom,
34
         navbarHeight: rect.bottom,
35
-        arrowR: screenWidth - rect.right + rect.width * 0.5 / 1 - 20,
35
+        arrowR: screenWidth - rect.right + rect.width * 0.7 / 2 - 1.5,
36
         bodyR: screenWidth - rect.right
36
         bodyR: screenWidth - rect.right
37
       })
37
       })
38
       this.startTimer = setTimeout(() => {
38
       this.startTimer = setTimeout(() => {

+ 9
- 5
src/pages/details/foodDetails/foodDetails.jsx View File

148
   const [isScroll, setScroll] = useState(true)
148
   const [isScroll, setScroll] = useState(true)
149
   return (
149
   return (
150
     <view className='page-index'>
150
     <view className='page-index'>
151
+
151
       {
152
       {
152
-        guidance === 'shareOn' && (<add-tipsFood logo={logo} custom duration={-1} />)
153
+        guidance === 'shareOn' ? <view className='index-navbar'>
154
+          <add-tipsFood logo={logo} custom duration={-1} />
155
+          <CustomNav title='十公里' noback />
156
+        </view> :
157
+          <view className='index-navbar'>
158
+            <CustomNav title='十公里' />
159
+          </view>
153
       }
160
       }
154
-      {/* <add-tipsFood custom duration={-1} /> */}
155
-      <view className='index-navbar'>
156
-        <CustomNav title='十公里' />
157
-      </view>
161
+
158
       <SpinBox loading={loading} className='index-container' style={{ padding: '0 30rpx' }}>
162
       <SpinBox loading={loading} className='index-container' style={{ padding: '0 30rpx' }}>
159
         <scroll-view
163
         <scroll-view
160
           scrollY={isScroll}
164
           scrollY={isScroll}

+ 4
- 1
src/pages/details/mjDetails/sceneryDetails.config.js View File

1
 export default {
1
 export default {
2
   navigationBarTitleText: '美景详情',
2
   navigationBarTitleText: '美景详情',
3
   disableScroll: true,
3
   disableScroll: true,
4
-
5
   navigationStyle: 'custom',
4
   navigationStyle: 'custom',
5
+  usingComponents: {
6
+    "add-tipsFood": "../../../components/add-tipsFood/index"
7
+
8
+  }
6
 }
9
 }

+ 33
- 16
src/pages/details/mjDetails/sceneryDetails.jsx View File

14
 import TabIcon from '@/components/HorTabbar/TabIcon'
14
 import TabIcon from '@/components/HorTabbar/TabIcon'
15
 import { useState, useEffect } from 'react'
15
 import { useState, useEffect } from 'react'
16
 import { getTouristDetail, getExtendContent, getRecommendList } from '@/services/home'
16
 import { getTouristDetail, getExtendContent, getRecommendList } from '@/services/home'
17
-import { Swiper, SwiperItem, Button,View } from '@tarojs/components';
17
+import { Swiper, SwiperItem, Button, View } from '@tarojs/components';
18
 import useSave from "@/utils/hooks/useSave"
18
 import useSave from "@/utils/hooks/useSave"
19
 import useLike from "@/utils/hooks/useLike"
19
 import useLike from "@/utils/hooks/useLike"
20
 import Cards from '@/components/foodCards/foodCards.jsx'
20
 import Cards from '@/components/foodCards/foodCards.jsx'
21
 import Taro, { useShareAppMessage } from '@tarojs/taro'
21
 import Taro, { useShareAppMessage } from '@tarojs/taro'
22
 import Extend from '../components/Extend/extend'
22
 import Extend from '../components/Extend/extend'
23
+import logo from "../foodDetails/laba.png";
24
+
23
 import './sceneryDetails.less'
25
 import './sceneryDetails.less'
24
 
26
 
25
 export default withLayout((props) => {
27
 export default withLayout((props) => {
54
       scale: 12,
56
       scale: 12,
55
     })
57
     })
56
   }
58
   }
59
+  //引导显隐
60
+  const [guidance, setGuidance] = useState('shareOff')
61
+  useEffect(() => {
62
+    if (router.params.enterType === "share") {
63
+      setGuidance('shareOn')
64
+    }
65
+  }, [router.params.enterType])
66
+
57
 
67
 
58
   useEffect(() => {
68
   useEffect(() => {
59
     if (id) {
69
     if (id) {
83
   useShareAppMessage(() => {
93
   useShareAppMessage(() => {
84
     return {
94
     return {
85
       title: detail.touristName,
95
       title: detail.touristName,
86
-      path: `/pages/details/mjDetails/sceneryDetails?id=${id}`,
96
+      path: `/pages/details/mjDetails/sceneryDetails?id=${id}&enterType=share`,
87
       imageUrl: detail.poster,
97
       imageUrl: detail.poster,
88
     }
98
     }
89
 
99
 
90
   })
100
   })
91
   return (
101
   return (
92
     <view className='page-index'>
102
     <view className='page-index'>
93
-      <view className='index-navbar'>
94
-        <CustomNav title='十公里' />
95
-      </view>
103
+      {
104
+        guidance === 'shareOn' ? <view className='index-navbar'>
105
+          <add-tipsFood logo={logo} custom duration={-1} />
106
+          <CustomNav title='十公里' noback />
107
+        </view> :
108
+          <view className='index-navbar'>
109
+            <CustomNav title='十公里' />
110
+          </view>
111
+      }
112
+
96
 
113
 
97
       <SpinBox loading={loading} style={{ overflow: 'hidden', padding: '0 30rpx', height: '100%', background: '#F8F8F8' }}>
114
       <SpinBox loading={loading} style={{ overflow: 'hidden', padding: '0 30rpx', height: '100%', background: '#F8F8F8' }}>
98
         <scroll-view scrollY style={{ height: '100%' }}>
115
         <scroll-view scrollY style={{ height: '100%' }}>
99
           <view className='storeDetails'>
116
           <view className='storeDetails'>
100
-          <View className='huadong'>
101
-            <Swiper
102
-              className='swiper'
103
-              circular
104
-              onChange={handchange}
105
-            >
106
-              {
107
-                imglist.map((item) =>(
108
-                  <SwiperItem>
109
-                    <image src={compressImage(item.url)} mode='aspectFit' className='storeImage' />
117
+            <View className='huadong'>
118
+              <Swiper
119
+                className='swiper'
120
+                circular
121
+                onChange={handchange}
122
+              >
123
+                {
124
+                  imglist.map((item) => (
125
+                    <SwiperItem>
126
+                      <image src={compressImage(item.url)} mode='aspectFit' className='storeImage' />
110
                     </SwiperItem>
127
                     </SwiperItem>
111
-                ))}
128
+                  ))}
112
               </Swiper>
129
               </Swiper>
113
               <view className='tpPage'>
130
               <view className='tpPage'>
114
                 <text>
131
                 <text>