李志伟 3 years ago
parent
commit
c9fbaf517b
3 changed files with 27 additions and 18 deletions
  1. 16
    11
      src/pages/TobeShop/index.jsx
  2. 6
    7
      src/pages/TobeShop/style.less
  3. 5
    0
      src/pages/index/tabs/Recommend.jsx

+ 16
- 11
src/pages/TobeShop/index.jsx View File

1
 import Taro from "@tarojs/taro";
1
 import Taro from "@tarojs/taro";
2
-import { Button, Icon, Text, Textarea, View } from "@tarojs/components";
2
+import { Button, Icon, ScrollView, Text, Textarea, View } from "@tarojs/components";
3
 import { useState, useEffect } from "react";
3
 import { useState, useEffect } from "react";
4
 import withLayout from "@/layouts";
4
 import withLayout from "@/layouts";
5
 import CustomNav from "@/components/CustomNav";
5
 import CustomNav from "@/components/CustomNav";
108
       Taro.showLoading({
108
       Taro.showLoading({
109
         title: '核销中'
109
         title: '核销中'
110
       })
110
       })
111
-
112
       setSubmiting(true);
111
       setSubmiting(true);
113
       Promise.all(checked.map(verifyNo => putVerifyTarget(verifyNo)))
112
       Promise.all(checked.map(verifyNo => putVerifyTarget(verifyNo)))
114
         .then(res => {
113
         .then(res => {
172
           </button>
171
           </button>
173
         </view>
172
         </view>
174
       </Popup>
173
       </Popup>
175
-      <view>
174
+      <view className='index-navbar'>
176
         <view className='position-header'>
175
         <view className='position-header'>
177
           <image className='position-LocationBig' src={LocationBig} />
176
           <image className='position-LocationBig' src={LocationBig} />
178
           <text cla='position-LocationBig-text'>
177
           <text cla='position-LocationBig-text'>
187
           />
186
           />
188
           <text className='shop-title-title'>请选择你要核销的套餐</text>
187
           <text className='shop-title-title'>请选择你要核销的套餐</text>
189
         </view>
188
         </view>
190
-        <SpinBox loading={loading}>
191
-          {(list || []).map((item) => {
192
-            return (
193
-              <TBCard item={item} key={item.verifyNo} checked={checked} handleCheck={handleCheck} />             
194
-            )           
195
-          })}
196
-        </SpinBox>
189
+      </view>
190
+      <View className='index-container'>
191
+        <ScrollView scrollY style={{height:'100%'}}>
192
+          <SpinBox loading={loading}>
193
+            {(list || []).map((item) => {
194
+              return (
195
+                <TBCard item={item} key={item.verifyNo} checked={checked} handleCheck={handleCheck} />
196
+              )
197
+            })}
198
+          </SpinBox>
199
+        </ScrollView>
200
+      </View>
201
+      <View className='index-tabber'>
197
         <view className='button-info'>
202
         <view className='button-info'>
198
           <Button className='button-box' onClick={handleVerifyClick}>
203
           <Button className='button-box' onClick={handleVerifyClick}>
199
             {btnText}
204
             {btnText}
200
           </Button>
205
           </Button>
201
         </view>
206
         </view>
202
-      </view>
207
+      </View>
203
     </view>
208
     </view>
204
   );
209
   );
205
 });
210
 });

+ 6
- 7
src/pages/TobeShop/style.less View File

1
 @whiteColor: #fff;
1
 @whiteColor: #fff;
2
 
2
 
3
 .shop-Eat {
3
 .shop-Eat {
4
-  padding: 0 30px;
4
+  .coupon-card{
5
+    margin: 30px;
6
+  }
5
   .Consumption-Now {
7
   .Consumption-Now {
6
     font-size: 34px;
8
     font-size: 34px;
7
     font-weight: bold;
9
     font-weight: bold;
36
   .position-header {
38
   .position-header {
37
     display: flex;
39
     display: flex;
38
     align-items: center;
40
     align-items: center;
41
+    margin: 0 30px;
39
     .position-LocationBig {
42
     .position-LocationBig {
40
       width: 35px;
43
       width: 35px;
41
       height: 42px;
44
       height: 42px;
53
     width: 100%;
56
     width: 100%;
54
     display: flex;
57
     display: flex;
55
     align-items: center;
58
     align-items: center;
56
-    margin-top: 71px;
57
-    margin-bottom: 41px;
59
+    margin: 71px 30px 41px 30px;
58
     .shop-title-image-cup {
60
     .shop-title-image-cup {
59
       width: 32px;
61
       width: 32px;
60
       height: 32px;
62
       height: 32px;
69
     }
71
     }
70
   }
72
   }
71
   .button-info {
73
   .button-info {
72
-    margin-bottom: 80px;
73
-    position: absolute;
74
-    bottom: 0;
75
-    width: calc(100% - 60px);
74
+    margin:0 30px 80px;
76
     .button-box {
75
     .button-box {
77
       height: 92px;
76
       height: 92px;
78
       line-height: 92px;
77
       line-height: 92px;

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

5
 import Tip from '@/components/tip'
5
 import Tip from '@/components/tip'
6
 import List from '@/components/List';
6
 import List from '@/components/List';
7
 import { getIndexType, getResourceList } from '@/services/home'
7
 import { getIndexType, getResourceList } from '@/services/home'
8
+import { View } from '@tarojs/components';
8
 import Card from '../components/Card'
9
 import Card from '../components/Card'
9
 import NoData from '@/components/NoData'
10
 import NoData from '@/components/NoData'
10
 import './less/Recommend.less'
11
 import './less/Recommend.less'
60
 
61
 
61
 
62
 
62
   return (
63
   return (
64
+    // <view style={{ height: '100%', overflow: 'hidden',display:'flex',flexDirection:'column' }}>
63
     <view style={{ height: '100%', overflow: 'hidden' }}>
65
     <view style={{ height: '100%', overflow: 'hidden' }}>
64
       <view className='search' onClick={onSearch}>
66
       <view className='search' onClick={onSearch}>
65
         <input className='searchInput' disabled />
67
         <input className='searchInput' disabled />
86
           </mp-tabs>
88
           </mp-tabs>
87
         </scroll-view>
89
         </scroll-view>
88
       </view>
90
       </view>
91
+      {/* <View style={{flex:'auto'}}> */}
89
       <List
92
       <List
90
         ref={listRef}
93
         ref={listRef}
94
+        // style={{ height: '100%' }}
91
         style={{ height: 'calc(100% - 145px)' }}
95
         style={{ height: 'calc(100% - 145px)' }}
92
         request={getResourceList}
96
         request={getResourceList}
93
         params={queryParams}
97
         params={queryParams}
103
             </view>
107
             </view>
104
         }
108
         }
105
       </List>
109
       </List>
110
+      {/* </View> */}
106
     </view>
111
     </view>
107
   )
112
   )
108
 }
113
 }