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

+ 2
- 1
src/components/CompoentsOrder/OrderCard/index.jsx View File

76
     });
76
     });
77
   };
77
   };
78
 
78
 
79
+
79
   let PayAction = null
80
   let PayAction = null
80
   if (kkp == '1') {//空卡片用于售后详情页面
81
   if (kkp == '1') {//空卡片用于售后详情页面
81
     PayAction = null
82
     PayAction = null
107
       }
108
       }
108
       {
109
       {
109
         //待支付可以左滑删除
110
         //待支付可以左滑删除
110
-        item.status === 0 ? <SlideView del onDelete={() => handeDelete(item)}  className='dzf'>
111
+        item.status === 0 ? <SlideView del onDelete={() => handeDelete(item)} className='dzf'>
111
           <CouponCard onClick={() => { Taro.navigateTo({ url: `/pages/details/foodDetails/foodDetails?id=${item.shopId}` }) }} action={PayAction}>
112
           <CouponCard onClick={() => { Taro.navigateTo({ url: `/pages/details/foodDetails/foodDetails?id=${item.shopId}` }) }} action={PayAction}>
112
             <CouponMedia>
113
             <CouponMedia>
113
               <CouponMedia.Header
114
               <CouponMedia.Header

+ 9
- 8
src/pages/index/components/Card/index.jsx View File

12
 
12
 
13
 export default (props) => {
13
 export default (props) => {
14
 
14
 
15
-  const { className, item, style, onImageLoad } = props
16
-  
15
+  const { className, item, style, } = props
16
+
17
   const uqClass = useMemo(() => random('f'), [])
17
   const uqClass = useMemo(() => random('f'), [])
18
 
18
 
19
   const cls = useMemo(() => [className, 'contentCard', uqClass].filter(Boolean).join(' '), [className, uqClass])
19
   const cls = useMemo(() => [className, 'contentCard', uqClass].filter(Boolean).join(' '), [className, uqClass])
28
     }
28
     }
29
   }
29
   }
30
 
30
 
31
-  const handleLoad = () => {
32
-    Taro.createSelectorQuery().select(`.${uqClass}`).boundingClientRect(rect => {
33
-      onImageLoad(rect)
34
-    }).exec()
35
-  }
31
+  // const handleLoad = () => {
32
+  //   Taro.createSelectorQuery().select(`.${uqClass}`).boundingClientRect(rect => {
33
+  //     onImageLoad(rect)
34
+  //   }).exec()
35
+  // }
36
+
36
 
37
 
37
   return (
38
   return (
38
     <view className={uqClass} style={{ overflow: 'hidden' }}>
39
     <view className={uqClass} style={{ overflow: 'hidden' }}>
39
       <view className='contentCard' style={style}>
40
       <view className='contentCard' style={style}>
40
         <view className='cardTop'>
41
         <view className='cardTop'>
41
-          <image mode='widthFix' onClick={Detail} src={compressImage(item.poster)} className='cCardimg' onLoad={handleLoad} />
42
+          <image mode='widthFix' onClick={Detail} src={compressImage(item.poster)} className='cCardimg' />
42
           <image className='lefttips' src={item.targetType === 'tourist' ? mjTip : msTip} />
43
           <image className='lefttips' src={item.targetType === 'tourist' ? mjTip : msTip} />
43
           <image onClick={toggleSave} src={isSaved > 0 ? onlove : love} className='loveharde'></image>
44
           <image onClick={toggleSave} src={isSaved > 0 ? onlove : love} className='loveharde'></image>
44
         </view>
45
         </view>

+ 21
- 21
src/pages/index/tabs/Recommend.jsx View File

31
 
31
 
32
   //分类标签
32
   //分类标签
33
   const tabs = [{ title: '附近' }].concat(typeList.map(x => ({ ...x, title: x.typeName })))
33
   const tabs = [{ title: '附近' }].concat(typeList.map(x => ({ ...x, title: x.typeName })))
34
-  const details=(index,tab)=>{
34
+  const details = (index, tab) => {
35
     setActiveTab(index)
35
     setActiveTab(index)
36
     setQueryParams({
36
     setQueryParams({
37
       ...queryParams,
37
       ...queryParams,
41
   //切换上面的标签
41
   //切换上面的标签
42
   const handleTabChange = (e) => {
42
   const handleTabChange = (e) => {
43
     const { index } = e.detail
43
     const { index } = e.detail
44
-    details(index,tabs[index].typeId||'')
44
+    details(index, tabs[index].typeId || '')
45
   }
45
   }
46
 
46
 
47
   const handleDataChange = (value, e) => {
47
   const handleDataChange = (value, e) => {
61
     //查询分类标签表
61
     //查询分类标签表
62
     getIndexType({ pageSize: 20 }).then((res) => {
62
     getIndexType({ pageSize: 20 }).then((res) => {
63
       setTypeList(res.records || [])
63
       setTypeList(res.records || [])
64
-      details(1,res.records[0].typeId)
64
+      details(1, res.records[0].typeId)
65
 
65
 
66
     })
66
     })
67
   }, [])
67
   }, [])
103
           </mp-tabs>
103
           </mp-tabs>
104
         </scroll-view>
104
         </scroll-view>
105
       </view>
105
       </view>
106
-      
107
-        <List
108
-          ref={listRef}
109
-          style={listStyle}
110
-          request={getResourceList}
111
-          params={queryParams}
112
-          refresherEnabled={false}
113
-          onDataChange={handleDataChange}
114
-        >
115
-          <view style={{ padding: '30rpx 15rpx' }}>
116
-            <MasonryLayout
117
-              itemKey='resourceNo'
118
-              listData={listData}
119
-              render={(item, callback) => <Card item={item} onImageLoad={callback} />}
120
-            />
121
-          </view>
122
-        </List>
123
-      
106
+
107
+      <List
108
+        ref={listRef}
109
+        style={listStyle}
110
+        request={getResourceList}
111
+        params={queryParams}
112
+        refresherEnabled={false}
113
+        onDataChange={handleDataChange}
114
+      >
115
+        <view style={{ padding: '30rpx 15rpx' }}>
116
+          <MasonryLayout
117
+            itemKey='resourceNo'
118
+            listData={listData}
119
+            render={(item) => <Card item={item} />}
120
+          />
121
+        </view>
122
+      </List>
123
+
124
     </>
124
     </>
125
   )
125
   )
126
 }
126
 }

+ 19
- 19
src/pages/searchResult/searchResult.jsx View File

69
       <view className='index-navbar'>
69
       <view className='index-navbar'>
70
         <CustomNav title='搜索' />
70
         <CustomNav title='搜索' />
71
       </view>
71
       </view>
72
-      <view className='index-container' style={{display:'flex',flexDirection:'column'}}>
72
+      <view className='index-container' style={{ display: 'flex', flexDirection: 'column' }}>
73
         <view className='search'>
73
         <view className='search'>
74
           <input className='searchInput' placeholder='搜索景点/店铺' disabled onClick={onSearch} />
74
           <input className='searchInput' placeholder='搜索景点/店铺' disabled onClick={onSearch} />
75
           <image className='searchicon' src={iconsearch} />
75
           <image className='searchicon' src={iconsearch} />
87
           >
87
           >
88
           </mp-tabs>
88
           </mp-tabs>
89
         </view>
89
         </view>
90
-        <View style={{flex:'auto',overflow:'hidden',position:'relative'}}>
91
-        <List
92
-          style={{ height: '100%' }}
93
-          request={getResourceList}
94
-          params={queryParams}
95
-          onDataChange={setAllList}
96
-          refresherEnabled={false}
97
-        >
98
-          {
99
-            alllist.length == 0 ?
100
-              <NoData /> :
101
-              <view className='waterfall'>
102
-                {
103
-                  alllist.map((item) => <Card key={item.resourceNo} item={item} onImageLoad='' />)
104
-                }
105
-              </view>
106
-          }
107
-        </List>
90
+        <View style={{ flex: 'auto', overflow: 'hidden', position: 'relative' }}>
91
+          <List
92
+            style={{ height: '100%' }}
93
+            request={getResourceList}
94
+            params={queryParams}
95
+            onDataChange={setAllList}
96
+            refresherEnabled={false}
97
+          >
98
+            {
99
+              alllist.length == 0 ?
100
+                <NoData /> :
101
+                <view className='waterfall'>
102
+                  {
103
+                    alllist.map((item) => <Card key={item.resourceNo} item={item} />)
104
+                  }
105
+                </view>
106
+            }
107
+          </List>
108
         </View>
108
         </View>
109
       </view>
109
       </view>
110
     </view>
110
     </view>