diff --git a/src/pages/activityIncome/index.config.ts b/src/pages/activityIncome/index.config.ts index 0a1b9c3..e4a3ba5 100644 --- a/src/pages/activityIncome/index.config.ts +++ b/src/pages/activityIncome/index.config.ts @@ -3,5 +3,6 @@ export default { navigationBarTextStyle: 'white', enableShareAppMessage: true, navigationBarBackgroundColor: '#4A7FFF', + enablePullDownRefresh: true, backgroundColorTop: '#4A7FFF', } diff --git a/src/pages/activityIncome/index.tsx b/src/pages/activityIncome/index.tsx index b1b1cc6..05a66cd 100644 --- a/src/pages/activityIncome/index.tsx +++ b/src/pages/activityIncome/index.tsx @@ -1,6 +1,6 @@ import { Icon, Text, View } from '@tarojs/components' -import Taro, { useReady } from '@tarojs/taro' +import Taro, { usePullDownRefresh, useReady } from '@tarojs/taro' import classNames from 'classnames' import { useState } from 'react' import styles from './index.module.scss' @@ -27,8 +27,17 @@ export default () => { const { fetchData, state } = GetRebateDetail() + const getData = async() => { + await fetchData() + Taro.stopPullDownRefresh() + } + + usePullDownRefresh(() => { + getData() + }) + useReady(() => { - fetchData() + getData() }) return ( diff --git a/src/pages/details/components/orderCount/index.tsx b/src/pages/details/components/orderCount/index.tsx index ce4fe01..a419c03 100644 --- a/src/pages/details/components/orderCount/index.tsx +++ b/src/pages/details/components/orderCount/index.tsx @@ -632,7 +632,7 @@ const OrderCount = ({ show = false, onClose, title = '', productId = 0, is_first showGuidePopup && showPopup && setshowGuidePopup(false)}> } - +