Bladeren bron

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

张延森 3 jaren geleden
bovenliggende
commit
f9899e66d6

+ 1
- 1
src/components/CompoentsOrder/TobePaid/index.jsx Bestand weergeven

@@ -17,7 +17,7 @@ export default (props) => {
17 17
     Taro.navigateTo({ url: '/pages/PayOrder/index' })
18 18
   }
19 19
   return (
20
-    <scroll-view scroll-y style='height:100%;'  >
20
+    <scroll-view scrollY style='height:100%;'  >
21 21
 
22 22
       <view className='TobePaid-box'>
23 23
         <view className='OrderNumber'>订单编号:ABC123456789</view>

+ 1
- 1
src/components/CompoentsOrder/TobeWritten/index.jsx Bestand weergeven

@@ -9,7 +9,7 @@ import './style.less'
9 9
 export default (props) => {
10 10
 
11 11
   return (
12
-    <scroll-view scroll-y style='height:100%;'  >
12
+    <scroll-view scrollY style='height:100%;'  >
13 13
 
14 14
 
15 15
       <view className='TobeWritten-box'>

+ 1
- 1
src/components/CompoentsOrder/complete/index.jsx Bestand weergeven

@@ -110,7 +110,7 @@ export default (props) => {
110 110
 
111 111
   return (
112 112
     <scroll-view
113
-      scroll-y
113
+      scrollY
114 114
       style="height: 90vh;"
115 115
       refresher-enabled
116 116
       refresher-triggered={IsPull}

+ 0
- 20
src/hotel/components/Income/income.jsx Bestand weergeven

@@ -86,26 +86,6 @@ export default (props) => {
86 86
           )}
87 87
         >
88 88
         </List>
89
-        {/*<view className='title' >{accountlog.length==0?'推广收入记录':'暂无推广收入'}</view>
90
-         <List
91
-          style={{ height: '50vh' }}
92
-          request={fetchAPI}
93
-          params={queryParams}
94
-          onDataChange={setAccountlog}
95
-          noData="暂无推广收入"
96
-        >
97
-          <view className='waterfall'>
98
-            {
99
-              accountlog.map((item,index) => <view className='spreadCard' key={index}>
100
-                <view className='card'>
101
-                  <view className='spreadTime'>时&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;间:<text>{formatTime(item.createDate, 'yyyy/MM/dd hh:mm:ss')}</text></view>
102
-                  <view className='spreadMoney'>收入金额:<text>{parseFloat((item.amount / 100).toFixed(2))}</text>元</view>
103
-                  <image className='spreadImg' src={sImg} />
104
-                </view>
105
-              </view>)
106
-            }
107
-          </view>
108
-        </List> */}
109 89
       </view>
110 90
     </view>
111 91
   )

+ 1
- 1
src/hotel/pages/landlord/roomOrder/roomOrder.jsx Bestand weergeven

@@ -45,7 +45,7 @@ export default withLayout((props) => {
45 45
   return (
46 46
     <View style={{ padding: '0 30px' }}>
47 47
       <CustomNav title={roomName ? roomName : '房间名'} />
48
-      <scroll-view scroll-y="true" scroll-view='true' bindscrolltoupper="upper" bindscrolltolower="lower" bindscroll="scroll" style={{ height: 'calc(100vh - 65px)' }}>
48
+      <scroll-view scrollY style={{ height: 'calc(100vh - 65px)' }}>
49 49
 
50 50
         {
51 51
           detail.length==0?<View className='houseCard'>暂无入住人数据</View>

+ 131
- 126
src/pages/MineUserAll/RefundMoney/CheckRefund/index.jsx Bestand weergeven

@@ -110,141 +110,146 @@ export default withLayout((props) => {
110 110
   return (
111 111
     <view className='box-content'>
112 112
       <CustomNav title='售后退款' />
113
-      <view className='Refund-Content-box'>
114
-        <view className='title-image'>
115
-          <image
116
-            mode='scaleToFill'
117
-            className='title-image-cup'
118
-            src={BlackSpot}
119
-          />
120
-          <text className='title-title-boss'>商品信息</text>
113
+      <scroll-view scroll-y style='height: calc(100vh - 176rpx);' >
114
+
115
+        <view className='Refund-Content-box'>
116
+
117
+          <view className='title-image'>
118
+            <image
119
+              mode='scaleToFill'
120
+              className='title-image-cup'
121
+              src={BlackSpot}
122
+            />
123
+            <text className='title-title-boss'>商品信息</text>
124
+          </view>
121 125
         </view>
122
-      </view>
123
-      {/* 商品信息结束 */}
124
-      <view>
125
-        {(list || []).map((item) => {
126
-          return (
127
-            <view class='wrapper' key={item.orderId}>
128
-              <view class='left-complete-one'>
129
-                <image className='left-image-1' src={ProCard_hot}></image>
130
-                <view className='left-viewText'>
131
-                  返现¥{formatPrice(item.cashback)}
132
-                </view>
133
-                <view className='title-image'>
134
-                  <image
135
-                    className='image-1'
136
-                    mode='scaleToFill'
137
-                    src={item.poster}
138
-                  ></image>
139
-                  <image className='image-2' src={food}></image>
140
-                </view>
141
-                <view className='title-content'>
142
-                  <view className='Pro-title'>
143
-                    <view className='title-text'>
144
-                      {item.packageDescription}
126
+        {/* 商品信息结束 */}
127
+        <view>
128
+          {(list || []).map((item) => {
129
+            return (
130
+              <view class='wrapper' key={item.orderId}>
131
+                <view class='left-complete-one'>
132
+                  <image className='left-image-1' src={ProCard_hot}></image>
133
+                  <view className='left-viewText'>
134
+                    返现¥{formatPrice(item.cashback)}
135
+                  </view>
136
+                  <view className='title-image'>
137
+                    <image
138
+                      className='image-1'
139
+                      mode='scaleToFill'
140
+                      src={item.poster}
141
+                    ></image>
142
+                    <image className='image-2' src={food}></image>
143
+                  </view>
144
+                  <view className='title-content'>
145
+                    <view className='Pro-title'>
146
+                      <view className='title-text'>
147
+                        {item.packageDescription}
148
+                        <text className='title-money-2'>
149
+                          数量:{item.amount}张
150
+                        </text>
151
+                      </view>
152
+                    </view>
153
+                    <text className='title-money'>
154
+                      ¥{formatPrice(item.unitPrice)}元
145 155
                       <text className='title-money-2'>
146
-                        数量:{item.amount}张
156
+                        门市价{formatPrice(item.standardPrice)}元
147 157
                       </text>
148
-                    </view>
149
-                  </view>
150
-                  <text className='title-money'>
151
-                    ¥{formatPrice(item.unitPrice)}元
152
-                    <text className='title-money-2'>
153
-                      门市价{formatPrice(item.standardPrice)}元
154 158
                     </text>
155
-                  </text>
156
-                  <view className='title-time'>
157
-                    有效期:{formatTime(item?.startTime, "yyyy/MM/dd")}-
158
-                    {formatTime(item.endTime, "yyyy/MM/dd")}
159
+                    <view className='title-time'>
160
+                      有效期:{formatTime(item?.startTime, "yyyy/MM/dd")}-
161
+                      {formatTime(item.endTime, "yyyy/MM/dd")}
162
+                    </view>
159 163
                   </view>
160 164
                 </view>
165
+                <view class='right-complete-two'>
166
+                  <view className='right-content'></view>
167
+                </view>
161 168
               </view>
162
-              <view class='right-complete-two'>
163
-                <view className='right-content'></view>
164
-              </view>
165
-            </view>
166
-          );
167
-        })}
168
-      </view>
169
-
170
-      {/* 卡片结束 */}
171
-      <view className='Refund-Content-box'>
172
-        <view className='title-image'>
173
-          <image
174
-            mode='scaleToFill'
175
-            className='title-image-cup'
176
-            src={BlackSpot}
177
-          />
178
-          <text className='title-title-boss'>退款原因</text>
169
+            );
170
+          })}
179 171
         </view>
180
-        {/* 退款结束 */}
181
-      </view>
182
-      <view className='Refund-content'>
183
-        {options.map((x) => {
184
-          return (
185
-            <text
186
-              className={`Refund-star-view${x.key} ${checkeds.indexOf(x.key) > -1
187
-                ? "bg2"
188
-                : `Refund-star-view${x.key}`
189
-                }`}
190
-              key={x.key}
191
-              onClick={() => viewOK(x)}
192
-            >
193
-              {x.title}
194
-            </text>
195
-          );
196
-        })}
197
-      </view>
198
-
199
-      <view className='Refund-Content-box'>
200
-        <view className='title-image'>
201
-          <image
202
-            mode='scaleToFill'
203
-            className='title-image-cup'
204
-            src={BlackSpot}
172
+
173
+        {/* 卡片结束 */}
174
+        <view className='Refund-Content-box'>
175
+          <view className='title-image'>
176
+            <image
177
+              mode='scaleToFill'
178
+              className='title-image-cup'
179
+              src={BlackSpot}
180
+            />
181
+            <text className='title-title-boss'>退款原因</text>
182
+          </view>
183
+          {/* 退款结束 */}
184
+        </view>
185
+        <view className='Refund-content'>
186
+          {options.map((x) => {
187
+            return (
188
+              <text
189
+                className={`Refund-star-view${x.key} ${checkeds.indexOf(x.key) > -1
190
+                  ? "bg2"
191
+                  : `Refund-star-view${x.key}`
192
+                  }`}
193
+                key={x.key}
194
+                onClick={() => viewOK(x)}
195
+              >
196
+                {x.title}
197
+              </text>
198
+            );
199
+          })}
200
+        </view>
201
+
202
+        <view className='Refund-Content-box'>
203
+          <view className='title-image'>
204
+            <image
205
+              mode='scaleToFill'
206
+              className='title-image-cup'
207
+              src={BlackSpot}
208
+            />
209
+            <text className='title-title-boss'>退款说明</text>
210
+          </view>
211
+        </view>
212
+        <view class='section'>
213
+          <Textarea
214
+            placeholder='请补充退款说明(选填)!'
215
+            onInput={(e) => setExplain(e.detail.value)}
216
+            confirm-type='done'
205 217
           />
206
-          <text className='title-title-boss'>退款说明</text>
207 218
         </view>
208
-      </view>
209
-      <view class='section'>
210
-        <Textarea
211
-          placeholder='请补充退款说明(选填)!'
212
-          onInput={(e) => setExplain(e.detail.value)}
213
-          confirm-type='done'
214
-        />
215
-      </view>
216
-      <view className='money-title'>
217
-        实付金额:{" "}
218
-        <text className='money-name'>{formatPrice(totalPrice.charges)}元</text>
219
-      </view>
220
-      <view className='money-title'>
221
-        已获返现:{" "}
222
-        <text className='money-name'>{formatPrice(totalPrice.cashback)}元</text>
223
-      </view>
224
-      <view className='money-title'>
225
-        退款金额:{" "}
226
-        <text className='money-name'>{formatPrice(totalPrice.refundPrice)}元</text>
227
-      </view>
228
-      <view className='ul-li-text'>
229
-        <view className='ul-li-view'></view>
230
-        <text className='ul-li-textname'>退款金额不可修改</text>
231
-      </view>
232
-      <view className='ul-li-text'>
233
-        <view className='ul-li-view'></view>
234
-        <text className='ul-li-textname'>
235
-          下单获得返现金额,会在退款时被扣除;
236
-        </text>
237
-      </view>
238
-      <view className='ul-li-text'>
239
-        <view className='ul-li-view'></view>
240
-        <text className='ul-li-textname'>退款将在七个工作日内原路退还。</text>
241
-      </view>
242
-
243
-      <view className='button-info'>
244
-        <Button className='button-box' onClick={() => onRefund()}>
245
-          提交申请
246
-        </Button>
247
-      </view>
248
-    </view>
219
+        <view className='money-title'>
220
+          实付金额:{" "}
221
+          <text className='money-name'>{formatPrice(totalPrice.charges)}元</text>
222
+        </view>
223
+        <view className='money-title'>
224
+          已获返现:{" "}
225
+          <text className='money-name'>{formatPrice(totalPrice.cashback)}元</text>
226
+        </view>
227
+        <view className='money-title'>
228
+          退款金额:{" "}
229
+          <text className='money-name'>{formatPrice(totalPrice.refundPrice)}元</text>
230
+        </view>
231
+        <view className='ul-li-text'>
232
+          <view className='ul-li-view'></view>
233
+          <text className='ul-li-textname'>退款金额不可修改</text>
234
+        </view>
235
+        <view className='ul-li-text'>
236
+          <view className='ul-li-view'></view>
237
+          <text className='ul-li-textname'>
238
+            下单获得返现金额,会在退款时被扣除;
239
+          </text>
240
+        </view>
241
+        <view className='ul-li-text'>
242
+          <view className='ul-li-view'></view>
243
+          <text className='ul-li-textname'>退款将在七个工作日内原路退还。</text>
244
+        </view>
245
+
246
+        <view className='button-info'>
247
+          <Button className='button-box' onClick={() => onRefund()}>
248
+            提交申请
249
+          </Button>
250
+        </view>
251
+      </scroll-view>
252
+
253
+    </view >
249 254
   );
250 255
 });

+ 1
- 1
src/pages/MineUserAll/RefundMoney/index.jsx Bestand weergeven

@@ -76,7 +76,7 @@ export default withLayout((props) => {
76 76
     <view className="box-content">
77 77
       <CustomNav title="售后退款" />
78 78
       <scroll-view
79
-        scroll-y
79
+        scrollY
80 80
         style="height: calc(100vh - 176rpx);"
81 81
         refresher-enabled
82 82
         refresher-triggered={IsPull}

+ 1
- 1
src/pages/details/foodDetails/foodDetails.jsx Bestand weergeven

@@ -155,7 +155,7 @@ export default withLayout((props) => {
155 155
         style={{ overflow: "hidden", padding: "0 30rpx", height: '100%', background: "#F8F8F8" }}
156 156
       >
157 157
         <scroll-view
158
-          scroll-y="true"
158
+          scrollY
159 159
           style={{ height: '100%' }}
160 160
         >
161 161
           <view className="storeDetails">

+ 1
- 1
src/pages/details/mjDetails/sceneryDetails.jsx Bestand weergeven

@@ -100,7 +100,7 @@ export default withLayout((props) => {
100 100
         <CustomNav title='十公里' />
101 101
       </view>
102 102
       <view style={{ overflow: 'hidden', padding: '0 30rpx', height: '100%', background: '#F8F8F8' }}>
103
-        <scroll-view scroll-y="true" style={{ height: '100%' }}>
103
+        <scroll-view scrollY style={{ height: '100%' }}>
104 104
           <view className='storeDetails'>
105 105
             <Swiper
106 106
               className='.swiper'

+ 1
- 1
src/pages/index/tabs/Guide.jsx Bestand weergeven

@@ -162,7 +162,7 @@ export default (props) => {
162 162
 
163 163
 
164 164
   return (
165
-    <scroll-view scroll-y style='height:100%;'  >
165
+    <scroll-view scrollY style='height:100%;'  >
166 166
 
167 167
       <view className='Guide-Home-box'>
168 168
         {

+ 1
- 1
src/pages/index/tabs/Mine.jsx Bestand weergeven

@@ -104,7 +104,7 @@ export default (props) => {
104 104
 
105 105
 
106 106
   return !person.phone ? <AuthPage /> : (
107
-    <scroll-view scroll-y style='height: 100%;' >
107
+    <scroll-view scrollY style='height: 100%;' >
108 108
 
109 109
 
110 110
       <view className='User-box'>

+ 8
- 1
src/pages/index/tabs/Recommend.jsx Bestand weergeven

@@ -32,10 +32,11 @@ export default (props) => {
32 32
       ...queryParams,
33 33
       typeId: tab
34 34
     })
35
+
35 36
     if (index == 0) {
36 37
       setQueryParams({ location: location, pageNum: 1, pageSize: 10, typeId: '' })
37 38
     }
38
-
39
+    //如果context有的话代表他滚动了   那么切换tab页就置顶
39 40
     if (listRef.current?.context) {
40 41
       listRef.current.context.scrollTo({ top: 0 })
41 42
     }
@@ -47,11 +48,17 @@ export default (props) => {
47 48
     })
48 49
   }, [])
49 50
 
51
+
52
+
50 53
   const onSearch = () => {
51 54
     // 用绝对路径
52 55
     Taro.navigateTo({ url: '/pages/search/search' });
53 56
   }
54 57
 
58
+
59
+
60
+
61
+
55 62
   return (
56 63
     <view style={{ height: '100%', overflow: 'hidden' }}>
57 64
       <view className='search' onClick={onSearch}>

+ 7
- 1
src/pages/searchResult/searchResult.jsx Bestand weergeven

@@ -1,4 +1,4 @@
1
-import { React, useState } from 'react'
1
+import { React, useState,useRef } from 'react'
2 2
 // .就是当前路径
3 3
 import iconsearch from '../../assets/icons/housemantj/search.png'
4 4
 import CustomNav from '@/components/CustomNav'
@@ -33,6 +33,8 @@ export default withLayout((props) => {
33 33
       title: '景点',
34 34
     },
35 35
   ]
36
+  const listRef = useRef()
37
+
36 38
   const handleTabChange = (e) => {
37 39
     const { index } = e.detail
38 40
     setActiveTab(index)
@@ -45,6 +47,10 @@ export default withLayout((props) => {
45 47
     else {
46 48
       setQueryParams({ q: q, targetType: 'tourist', location: location, pageNum: 1, pageSize: 10, typeId: '' })
47 49
     }
50
+    //如果context有的话代表他滚动了   那么切换tab页就置顶
51
+    if (listRef.current?.context) {
52
+      listRef.current.context.scrollTo({ top: 0 })
53
+    }
48 54
   }
49 55
 
50 56
 

+ 7
- 3
src/shop/components/ShopKeeper/shopKeeper.jsx Bestand weergeven

@@ -1,4 +1,4 @@
1
-import { React, useState, useEffect, useMemo } from 'react'
1
+import { React, useState, useEffect, useMemo,useRef } from 'react'
2 2
 import Taro, { useRouter } from '@tarojs/taro'
3 3
 import Picker from '@/components/Picker'
4 4
 import ShopUsed from '@/components/ShopUsed' //已核销
@@ -50,6 +50,7 @@ export default (props) => {
50 50
     onHotelChange(current)
51 51
   }
52 52
 
53
+  const listRef = useRef()
53 54
 
54 55
   const handelSearch = (e) => {
55 56
     const val = e.detail.value
@@ -65,7 +66,10 @@ export default (props) => {
65 66
     const { index } = e.detail
66 67
     setActiveTab(index)
67 68
     setisVerified(index)
68
-
69
+//如果context有的话代表他滚动了   那么切换tab页就置顶
70
+if (listRef.current?.context) {
71
+  listRef.current.context.scrollTo({ top: 0 })
72
+}
69 73
   }
70 74
   const tabs = [
71 75
     {
@@ -95,7 +99,7 @@ export default (props) => {
95 99
       </view>
96 100
       <ToggleRole showCutover={showCutover} maskClosable={showCutover} onClose={onClose} role='shop' />
97 101
       <view style={{ padding: '30rpx', height: '100%' }}>
98
-        <scroll-view scroll-y scroll-view='true' bindscrolltoupper='upper' bindscrolltolower='lower' bindscroll='scroll' style={{ height: 'calc(100vh - 120px)' }}>
102
+        <scroll-view scrollY style={{ height: 'calc(100vh - 120px)' }}>
99 103
           <view className='storexx'>
100 104
             <view className='storeName'>店名:<Picker style={{ display: 'inline-block' }} placeholder='请选择商铺' value={shop?.shopId} kv={['shopName', 'shopId']} dicts={shopList} onChange={handleHotelChange} /></view>
101 105
             <view onClick={ShowMoldeOn} className='User-info-cutover'>

+ 1
- 1
src/shop/components/Sparead/spreadMoney.jsx Bestand weergeven

@@ -57,7 +57,7 @@ export default (props) => {
57 57
       </view>
58 58
       <ToggleRole showCutover={showCutover} maskClosable={showCutover} onClose={onClose} role='shop' />
59 59
       <view style={{ padding: '30rpx', height: '100%' }}>
60
-        <scroll-view scroll-y="true" scroll-view='true' bindscrolltoupper="upper" bindscrolltolower="lower" bindscroll="scroll" style={{ height: 'calc(100vh - 120px)' }}>
60
+        <scroll-view scrollY style={{ height: 'calc(100vh - 120px)' }}>
61 61
           <view className='storexx'>
62 62
             <view className='storeName'>店名:<Picker style={{ display: 'inline-block' }} placeholder="请选择商铺" value={shop?.shopId} kv={['shopName', 'shopId']} dicts={shopList} onChange={handleHotelChange} /></view>
63 63
             <view onClick={ShowMoldeOn} className='User-info-cutover'>

+ 6
- 1
src/shop/pages/spread/spreadIndex.jsx Bestand weergeven

@@ -1,4 +1,4 @@
1
-import React, { useState, useEffect } from 'react'
1
+import React, { useState, useEffect,useRef } from 'react'
2 2
 import CustomNav from '@/components/CustomNav'
3 3
 import { useRouter } from '@tarojs/taro'
4 4
 import { getShopList, getShopMoney, getAccount, getVerifiedOrder, setGetVerifiedOrder } from '@/services/shopBoss'
@@ -30,10 +30,15 @@ export default withLayout((props) => {
30 30
   const [isVerified, setisVerified] = useState(0)
31 31
   const [shopMoney, setShopMoney] = useState([])
32 32
   const [verifiedOrder, setVerifiedOrder] = useState([])
33
+  const listRef = useRef()
33 34
 
34 35
   const handleTabChange = (e) => {
35 36
     const { index } = e.detail
36 37
     setCurrentTab(index)
38
+    //如果context有的话代表他滚动了   那么切换tab页就置顶
39
+    if (listRef.current?.context) {
40
+      listRef.current.context.scrollTo({ top: 0 })
41
+    }
37 42
   }
38 43
 
39 44
   const handelType = () => {