Browse Source

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

李志伟 3 years ago
parent
commit
ec10780f12

+ 19
- 6
src/components/BossCard/index.jsx View File

11
 import food from '@/assets/icons/ProCard/food.png'
11
 import food from '@/assets/icons/ProCard/food.png'
12
 import ProCard_hot from '@/assets/icons/ProCard/ProCard_hot.png'
12
 import ProCard_hot from '@/assets/icons/ProCard/ProCard_hot.png'
13
 
13
 
14
-import { getQueryString} from '@/utils/index'
14
+import { getQueryString } from '@/utils/index'
15
 //入住指引--老板推荐
15
 //入住指引--老板推荐
16
 
16
 
17
 
17
 
19
 import './style.less'
19
 import './style.less'
20
 
20
 
21
 export default (props) => {
21
 export default (props) => {
22
-  const { item, cardNavigateTo,taRoomContent,trackClick } = props
22
+  const { item, cardNavigateTo, taRoomContent, trackClick } = props
23
   const { shopId, packageId } = props.item
23
   const { shopId, packageId } = props.item
24
   const [isSaved, toggleSave] = useSave(item.isSaved, 'shop_package', item.packageId)
24
   const [isSaved, toggleSave] = useSave(item.isSaved, 'shop_package', item.packageId)
25
   const [city, setCity] = useState({})
25
   const [city, setCity] = useState({})
26
   const [detail, setDetail] = useState({})
26
   const [detail, setDetail] = useState({})
27
 
27
 
28
-    
28
+  const [handelareaName, setHandelareaName] = useState()
29
+
30
+  const lareaName = () => {
31
+    if (city.areaPName == null) {
32
+      setHandelareaName(city.areaPName / city.areaName)
33
+    } else {
34
+      setHandelareaName(city.areaName)
35
+    }
36
+  }
37
+
38
+
39
+
40
+
29
 
41
 
30
-  
31
   const goFood = () => {
42
   const goFood = () => {
32
-     trackClick({ eventType: 'hotel_recommend_package', eventParams: getQueryString({ hotelId:taRoomContent.hotelId,shopId:shopId,packageId:packageId})  })
43
+    trackClick({ eventType: 'hotel_recommend_package', eventParams: getQueryString({ hotelId: taRoomContent.hotelId, shopId: shopId, packageId: packageId }) })
33
     Taro.navigateTo({ url: `/pages/details/foodDetails/foodDetails?id=${shopId}` })
44
     Taro.navigateTo({ url: `/pages/details/foodDetails/foodDetails?id=${shopId}` })
34
   }
45
   }
35
 
46
 
36
   useEffect(() => {
47
   useEffect(() => {
48
+    lareaName()
49
+
37
     getShopDetail(item.shopId).then((res) => {
50
     getShopDetail(item.shopId).then((res) => {
38
       setDetail(res)
51
       setDetail(res)
39
       getShopcity(res.cityId).then((x) => {
52
       getShopcity(res.cityId).then((x) => {
66
             <text className='title-money' >¥{(item.actualPrice / 100)?.toFixed(2)}元<text className='title-money-2'>门市价{(item.standardPrice / 100)?.toFixed(2)}元</text></text>
79
             <text className='title-money' >¥{(item.actualPrice / 100)?.toFixed(2)}元<text className='title-money-2'>门市价{(item.standardPrice / 100)?.toFixed(2)}元</text></text>
67
             <view className='title-position-on'>
80
             <view className='title-position-on'>
68
               <image className='title-position' src={position} />
81
               <image className='title-position' src={position} />
69
-              <text className='title-position-image'>{city.areaPName}/{city.areaName}</text>
82
+              <text className='title-position-image'>{city.areaPName}/ {city.areaName}</text>
70
               <view style={{ display: 'inline-block' }} onClick={toggleSave}>
83
               <view style={{ display: 'inline-block' }} onClick={toggleSave}>
71
 
84
 
72
                 <image className='title-on' src={isSaved > 0 ? starOn : starOff} />
85
                 <image className='title-on' src={isSaved > 0 ? starOn : starOff} />

+ 21
- 6
src/components/CollectList/MyCollect/index.jsx View File

27
   return (
27
   return (
28
     <View>
28
     <View>
29
       {
29
       {
30
-        targetType === "shop" && (
30
+        targetType === "shop_package" && (
31
           <view class='wrapper'>
31
           <view class='wrapper'>
32
             <view class='left-complete-one'   >
32
             <view class='left-complete-one'   >
33
               <image className='left-image-1' src={ProCard_hot} style={{ display: item.targetType === 'shop_package' ? '' : 'none' }} ></image>
33
               <image className='left-image-1' src={ProCard_hot} style={{ display: item.targetType === 'shop_package' ? '' : 'none' }} ></image>
50
                 <text className='title-money' >¥{formatPrice(item.actualPrice)}元<text className='title-money-2'>门市价{formatPrice(item.standardPrice)}元</text></text>
50
                 <text className='title-money' >¥{formatPrice(item.actualPrice)}元<text className='title-money-2'>门市价{formatPrice(item.standardPrice)}元</text></text>
51
                 <view className='title-position-on'>
51
                 <view className='title-position-on'>
52
                   <image className='title-position' src={position} />
52
                   <image className='title-position' src={position} />
53
-                  <text className='title-position-image'>{item.areaPName}/{item.areaName}</text>
53
+                  <text className='title-position-image'>
54
+                    {
55
+                      targetType === "shop_package" && (
56
+                        item.areaPName == '' ? item.areaPName / item.areaName : item.areaName
57
+                      )
58
+                    }
59
+                  </text>
54
                 </view>
60
                 </view>
55
               </view>
61
               </view>
56
             </view>
62
             </view>
57
             <view class='right-complete-two'>
63
             <view class='right-complete-two'>
58
               <view className='right-content' onClick={() => { Taro.navigateTo({ url: `/pages/details/foodDetails/foodDetails?id=${item.targetId}` }); }}>
64
               <view className='right-content' onClick={() => { Taro.navigateTo({ url: `/pages/details/foodDetails/foodDetails?id=${item.targetId}` }); }}>
59
-                {/* <view className='right-number'>×1</view> */}
60
                 <image className='right-image' src={SeeDetails} />
65
                 <image className='right-image' src={SeeDetails} />
61
                 <view className='right-title'>查看详情</view>
66
                 <view className='right-title'>查看详情</view>
62
               </view>
67
               </view>
66
       }
71
       }
67
       <View>
72
       <View>
68
         {
73
         {
69
-          targetType !== "shop" && (
74
+          targetType !== "shop_package" && (
70
             <view class='wrapper-tourist'>
75
             <view class='wrapper-tourist'>
71
               <view class='left-complete-one'   >
76
               <view class='left-complete-one'   >
72
                 <view className='title-image'>
77
                 <view className='title-image'>
84
                   </view>
89
                   </view>
85
                   <view className='title-position-on'>
90
                   <view className='title-position-on'>
86
                     <image className='title-position' src={position} />
91
                     <image className='title-position' src={position} />
87
-                    <text className='title-position-image'>{item.areaPName}/{item.areaName}</text>
92
+                    <text className='title-position-image'>
93
+                      {
94
+                        targetType === "tourist" && (
95
+                          item.areaPName == '' ? item.areaPName / item.areaName : item.areaName
96
+                        )
97
+                      }
98
+                      {
99
+                        targetType === "shop" && (
100
+                          item.areaPName === null ? item.areaName : item.areaPName / item.areaName
101
+                        )
102
+                      }</text>
88
                   </view>
103
                   </view>
89
                 </view>
104
                 </view>
90
               </view>
105
               </view>
98
             </view>
113
             </view>
99
           )
114
           )
100
         }
115
         }
101
-      </View>
102
 
116
 
117
+      </View>
103
     </View>
118
     </View>
104
 
119
 
105
 
120
 

+ 22
- 10
src/components/CollectList/MyCollect/style.less View File

74
     }
74
     }
75
     //图片
75
     //图片
76
     .title-image {
76
     .title-image {
77
-      width: 145px;
77
+      height: 144px;
78
       margin-left: 20px;
78
       margin-left: 20px;
79
       border-radius: 24px;
79
       border-radius: 24px;
80
       overflow: hidden;
80
       overflow: hidden;
81
       position: relative;
81
       position: relative;
82
+     
82
       .image-1 {
83
       .image-1 {
83
-        width: 100%;
84
-        height: 145px;
84
+        width: 144px;
85
+        height: 144px;
86
+        margin: 0 ;
85
       }
87
       }
86
       .image-2 {
88
       .image-2 {
87
         width: 89px;
89
         width: 89px;
286
     }
288
     }
287
     //图片
289
     //图片
288
     .title-image {
290
     .title-image {
289
-      width: 145px;
290
-      margin-left: 20px;
291
-      border-radius: 24px;
292
-      overflow: hidden;
293
-      position: relative;
291
+      // width: 145px;
292
+      // margin-left: 20px;
293
+      // overflow: hidden;
294
+      // position: relative;
295
+      height: 144px;
296
+ margin-left: 20px;
297
+ border-radius: 24px;
298
+ overflow: hidden;
299
+ position: relative;
294
       .image-1 {
300
       .image-1 {
295
-        width: 100%;
296
-        height: 145px;
301
+        // width: 100%;
302
+        // height: 145px;
303
+        // border-radius: 10px;
304
+
305
+
306
+ width: 144px;
307
+ height: 144px;
308
+ margin: 0;
297
       }
309
       }
298
       .image-2 {
310
       .image-2 {
299
         width: 89px;
311
         width: 89px;

+ 2
- 2
src/components/foodCards/foodCards.jsx View File

58
           <text className='storezf'>{star}</text>
58
           <text className='storezf'>{star}</text>
59
         </view>
59
         </view>
60
         <view>
60
         <view>
61
-          <view className='contentImg'  onClick={() => { goFood() }}>
61
+          <view className='contentImg' onClick={() => { goFood() }}>
62
             <image src={item.poster} className='img1'></image>
62
             <image src={item.poster} className='img1'></image>
63
             <image src={msTip} className='mstip'></image>
63
             <image src={msTip} className='mstip'></image>
64
           </view>
64
           </view>
65
           <view className='neirong'>
65
           <view className='neirong'>
66
-            <view className='textword'  onClick={() => { goFood() }} >{(item.description).toString().length > 22 ? (item.description).substring(0, 22) + '...' : (item.description)}</view>
66
+            <view className='textword' onClick={() => { goFood() }} >{(item.description).toString().length > 22 ? (item.description).substring(0, 22) + '...' : (item.description)}</view>
67
             <view className='jiage' onClick={() => { goFood() }} >
67
             <view className='jiage' onClick={() => { goFood() }} >
68
               <text className='rmb' >¥</text>
68
               <text className='rmb' >¥</text>
69
               <text className='p1'><text className='price' >{(item.actualPrice / 100).toFixed(2)}</text>元&nbsp;&nbsp;</text>
69
               <text className='p1'><text className='price' >{(item.actualPrice / 100).toFixed(2)}</text>元&nbsp;&nbsp;</text>

+ 3
- 3
src/pages/details/foodDetails/foodDetails.jsx View File

1
+import Taro, { useShareAppMessage } from "@tarojs/taro";
1
 import CustomNav from "@/components/CustomNav";
2
 import CustomNav from "@/components/CustomNav";
2
 import withLayout from "@/layouts";
3
 import withLayout from "@/layouts";
3
 import {
4
 import {
20
 import good from "@/assets/icons/housemantj/景点爆赞.png";
21
 import good from "@/assets/icons/housemantj/景点爆赞.png";
21
 import baozan from "@/assets/icons/housemantj/爆赞.png";
22
 import baozan from "@/assets/icons/housemantj/爆赞.png";
22
 import weibaozan from "@/assets/icons/housemantj/未赞.png";
23
 import weibaozan from "@/assets/icons/housemantj/未赞.png";
23
-import Taro, { useShareAppMessage } from "@tarojs/taro";
24
 import useSave from "@/utils/hooks/useSave";
24
 import useSave from "@/utils/hooks/useSave";
25
 import useLike from "@/utils/hooks/useLike";
25
 import useLike from "@/utils/hooks/useLike";
26
 import Extend from "../components/Extend/extend";
26
 import Extend from "../components/Extend/extend";
130
       });
130
       });
131
     }
131
     }
132
   }, [id]);
132
   }, [id]);
133
-  
133
+
134
   const star = parseFloat(
134
   const star = parseFloat(
135
     (
135
     (
136
       (detail.sweetScore + detail.environmentScore + detail.serviceScore) / 3).toFixed(1)
136
       (detail.sweetScore + detail.environmentScore + detail.serviceScore) / 3).toFixed(1)
280
           分享
280
           分享
281
         </view>
281
         </view>
282
         <view className="tab" onClick={toggleLike}>
282
         <view className="tab" onClick={toggleLike}>
283
-          <image className="good" style={{top:'1px'}} src={isLike > 0 ? baozan : weibaozan} />
283
+          <image className="good" style={{ top: '1px' }} src={isLike > 0 ? baozan : weibaozan} />
284
           {isLike > 0 ? "已爆赞" : "爆赞"}
284
           {isLike > 0 ? "已爆赞" : "爆赞"}
285
         </view>
285
         </view>
286
         <view className="tab" onClick={toggleSave}>
286
         <view className="tab" onClick={toggleSave}>

+ 8
- 5
src/shop/components/ShopKeeper/shopKeeper.jsx View File

20
   const { tabJump } = params || {}
20
   const { tabJump } = params || {}
21
 
21
 
22
   const [activeTab, setActiveTab] = useState(0)
22
   const [activeTab, setActiveTab] = useState(0)
23
-  const [phone, setPhone] = useState()
24
-  // const [isVerified, setisVerified] = useState(0)
23
+  const [phonea, setPhone] = useState()
24
+  const [isVerifieda, setisVerified] = useState(0)
25
   // const [queryParams, setQueryParams] = useState({ isVerified: isVerified, pageNum: 1, pageSize: 10, shopId: shop?.shopId, phone: phone })
25
   // const [queryParams, setQueryParams] = useState({ isVerified: isVerified, pageNum: 1, pageSize: 10, shopId: shop?.shopId, phone: phone })
26
 
26
 
27
   const queryParams = useMemo(() => ({
27
   const queryParams = useMemo(() => ({
28
     shopId: shop?.shopId,
28
     shopId: shop?.shopId,
29
-    isVerified: `${tabJump}` === '1' ? 1 : 0,
30
-    phone: phone || '',
31
-  }), [phone, shop?.shopId, tabJump])
29
+    isVerified: isVerifieda,
30
+    // `${tabJump}` === '1' ? 1 : 0,
31
+    phone: phonea || '',
32
+  }), [phonea, shop?.shopId, isVerifieda])
32
 
33
 
33
 
34
 
34
   // 获取资源表信息
35
   // 获取资源表信息
63
   const handleTabChange = (e) => {
64
   const handleTabChange = (e) => {
64
     const { index } = e.detail
65
     const { index } = e.detail
65
     setActiveTab(index)
66
     setActiveTab(index)
67
+    setisVerified(index)
68
+
66
   }
69
   }
67
   const tabs = [
70
   const tabs = [
68
     {
71
     {