吃个甘蔗嚼一年 преди 3 години
родител
ревизия
44bc642c42

+ 1
- 1
src/components/add-tipsFood/index.js Целия файл

@@ -32,7 +32,7 @@ Component({
32 32
       let { screenWidth } = wx.getSystemInfoSync()
33 33
       this.setData({
34 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 36
         bodyR: screenWidth - rect.right
37 37
       })
38 38
       this.startTimer = setTimeout(() => {

+ 9
- 5
src/pages/details/foodDetails/foodDetails.jsx Целия файл

@@ -148,13 +148,17 @@ export default withLayout((props) => {
148 148
   const [isScroll, setScroll] = useState(true)
149 149
   return (
150 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 162
       <SpinBox loading={loading} className='index-container' style={{ padding: '0 30rpx' }}>
159 163
         <scroll-view
160 164
           scrollY={isScroll}

+ 4
- 1
src/pages/details/mjDetails/sceneryDetails.config.js Целия файл

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

+ 33
- 16
src/pages/details/mjDetails/sceneryDetails.jsx Целия файл

@@ -14,12 +14,14 @@ import SpinBox from "@/components/Spin/SpinBox";
14 14
 import TabIcon from '@/components/HorTabbar/TabIcon'
15 15
 import { useState, useEffect } from 'react'
16 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 18
 import useSave from "@/utils/hooks/useSave"
19 19
 import useLike from "@/utils/hooks/useLike"
20 20
 import Cards from '@/components/foodCards/foodCards.jsx'
21 21
 import Taro, { useShareAppMessage } from '@tarojs/taro'
22 22
 import Extend from '../components/Extend/extend'
23
+import logo from "../foodDetails/laba.png";
24
+
23 25
 import './sceneryDetails.less'
24 26
 
25 27
 export default withLayout((props) => {
@@ -54,6 +56,14 @@ export default withLayout((props) => {
54 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 68
   useEffect(() => {
59 69
     if (id) {
@@ -83,32 +93,39 @@ export default withLayout((props) => {
83 93
   useShareAppMessage(() => {
84 94
     return {
85 95
       title: detail.touristName,
86
-      path: `/pages/details/mjDetails/sceneryDetails?id=${id}`,
96
+      path: `/pages/details/mjDetails/sceneryDetails?id=${id}&enterType=share`,
87 97
       imageUrl: detail.poster,
88 98
     }
89 99
 
90 100
   })
91 101
   return (
92 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 114
       <SpinBox loading={loading} style={{ overflow: 'hidden', padding: '0 30rpx', height: '100%', background: '#F8F8F8' }}>
98 115
         <scroll-view scrollY style={{ height: '100%' }}>
99 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 127
                     </SwiperItem>
111
-                ))}
128
+                  ))}
112 129
               </Swiper>
113 130
               <view className='tpPage'>
114 131
                 <text>