lisen 3 anos atrás
pai
commit
a012b29f7c

+ 3
- 3
src/components/BossCard/index.jsx Ver arquivo

@@ -10,7 +10,7 @@ import starOn from '@/assets/icons/housemantj/onlove.png'
10 10
 import starOff from '@/assets/icons/housemantj/景点爆赞.png'
11 11
 import food from '@/assets/icons/ProCard/food.png'
12 12
 import ProCard_hot from '@/assets/icons/ProCard/ProCard_hot.png'
13
-
13
+import formatPrice from "@/utils/formatPrice";
14 14
 import { getQueryString } from '@/utils/index'
15 15
 //入住指引--老板推荐
16 16
 
@@ -61,7 +61,7 @@ export default (props) => {
61 61
         <view class='left-complete-one'  >
62 62
           <image className='left-image-1' src={ProCard_hot}></image>
63 63
           <view className='left-viewText'>
64
-            返现¥{(item.cashback / 100)?.toFixed(2)}
64
+            返现¥{formatPrice(item.cashback)}
65 65
           </view>
66 66
           {/* 评分 */}
67 67
           <view className='card-box-star'>
@@ -76,7 +76,7 @@ export default (props) => {
76 76
             <view className='Pro-title' onClick={() => { goFood() }} >
77 77
               <view className='title-text'>{(item.description).toString().length > 25 ? (item.description).substring(0, 25) + '...' : (item.description)}</view>
78 78
             </view>
79
-            <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' >¥{formatPrice(item.actualPrice)}元<text className='title-money-2'>门市价{formatPrice(item.standardPrice)}元</text></text>
80 80
             <view className='title-position-on'>
81 81
               <image className='title-position' src={position} />
82 82
               <text className='title-position-image'>{city.areaName=='南京市'?city.areaName:city.areaPName+'/'+city.areaName}</text>

+ 3
- 2
src/hotel/components/Income/income.jsx Ver arquivo

@@ -6,6 +6,7 @@ import cutoverUser from '@/assets/icons/UserCenter/cutoverUser.png'
6 6
 import ToggleRole from '@/components/toggleRole/ToggleRole'
7 7
 import Picker from '@/components/Picker'
8 8
 import formatTime from "@/utils/formatTime";
9
+import formatPrice from '@/utils/formatPrice'
9 10
 import { getAccountLogList } from '@/services/landlord'
10 11
 import NoData from '@/components/NoData'
11 12
 import List from '@/components/List';
@@ -54,7 +55,7 @@ export default (props) => {
54 55
             <view className='sleft'>
55 56
               <view className='lword'>全年收入(税前)</view>
56 57
               <view className='yearMoney'>
57
-                <text>{isyear ? account?.amounts/100 : '******'}</text>元
58
+                <text>{isyear ? formatPrice(account?.amounts): '******'}</text>元
58 59
                 <image className='micon' src={isyear ? eyes : ceyes} onClick={handleYear} />
59 60
               </view>
60 61
             </view>
@@ -62,7 +63,7 @@ export default (props) => {
62 63
             <view className='sright'>
63 64
               <view className='rword'>当月收入(税前)</view>
64 65
               <view className='monthMoney'>
65
-                <text>{isMomth ? account?.currentCharges/100 : '******'}</text>元
66
+                <text>{isMomth ? formatPrice(account?.currentCharges) : '******'}</text>元
66 67
                 <image className='micon2' src={isMomth ? eyes : ceyes} onClick={handleMonth}></image>
67 68
               </view></view>
68 69
           </view>

+ 2
- 2
src/pages/MineUserAll/RefundMoney/CheckRefund/index.jsx Ver arquivo

@@ -84,12 +84,12 @@ export default withLayout((props) => {
84 84
       refundDecription: checkeds?.map(x => options.filter(y => y.key == x)[0]?.title).join(';'),
85 85
       refundReason: explain,
86 86
     }).then((res) => {
87
+      Taro.navigateBack({ delta: 1 })
87 88
       Taro.showToast({
88 89
         title: "退款成功",
89 90
         icon: "none",
90
-        duration: 2000,
91
+        duration: 3000,
91 92
       });
92
-      Taro.navigateBack({ delta: 1 })
93 93
     });
94 94
   };
95 95
   useEffect(() => {

+ 10
- 1
src/pages/MineUserAll/RefundMoney/index.jsx Ver arquivo

@@ -1,5 +1,5 @@
1 1
 import { useState, useEffect } from "react";
2
-import Taro from "@tarojs/taro";
2
+import Taro, { useDidShow } from "@tarojs/taro";
3 3
 import image from "@/assets/icons/ProCard/8kb.jpg";
4 4
 import food from "@/assets/icons/ProCard/food.png";
5 5
 import ProCard_hot from "@/assets/icons/ProCard/ProCard_hot.png";
@@ -23,8 +23,10 @@ export default withLayout((props) => {
23 23
   const [IsPull, setPull] = useState(false);
24 24
   const [pageNum, setNumber] = useState(1);
25 25
   const [HasNextPage, setHasNextPage] = useState(true);
26
+  const [isFirst, setFirst] = useState(true)
26 27
 
27 28
   const getList = () => {
29
+    setFirst(false)
28 30
     setHasNextPage(false);
29 31
     getOrderSub({
30 32
       pageNum,
@@ -57,6 +59,13 @@ export default withLayout((props) => {
57 59
     }
58 60
   };
59 61
 
62
+  useDidShow(() => {
63
+    if (!isFirst) {
64
+      getList();
65
+    }
66
+
67
+  })
68
+
60 69
   useEffect(() => {
61 70
     // 下拉刷新触发
62 71
     if (IsPull) {

+ 8
- 1
src/pages/index/index.jsx Ver arquivo

@@ -13,6 +13,7 @@ import Mine from './tabs/Mine'
13 13
 import Recommend from './tabs/Recommend'
14 14
 
15 15
 import './index.less'
16
+import { useDidShow } from '@tarojs/taro'
16 17
 
17 18
 
18 19
 
@@ -29,6 +30,12 @@ export default withLayout((props) => {
29 30
   const { hotelId } = extend
30 31
 
31 32
   const [currentTab, setCurrentTab] = useState(0)
33
+
34
+  const [isDidShow,setIsDidShow] = useState(0)
35
+
36
+  useDidShow(()=>{
37
+    setIsDidShow(isDidShow + 1)
38
+  })
32 39
   const handleTabChange = (e) => {
33 40
     const { index } = e.detail
34 41
     setCurrentTab(index)
@@ -72,7 +79,7 @@ export default withLayout((props) => {
72 79
         {currentTab === 0 && <Recommend location={location} />}
73 80
         {currentTab === 1 && <Guide person={person} router={router} location={location} />}
74 81
         {/* {currentTab === 2 && <Strategy />} */}
75
-        {currentTab === 2 && <Mine person={person} />}
82
+        {currentTab === 2 && <Mine person={person} isDidShow={isDidShow}/>}
76 83
       </view>
77 84
       <view className='index-tabbar'>
78 85
         <mp-tabbar extClass='custom-tabbar' current={currentTab} list={tabList} onChange={handleTabChange}></mp-tabbar>

+ 2
- 2
src/pages/index/tabs/Mine.jsx Ver arquivo

@@ -22,7 +22,7 @@ import './MineCss/style.less'
22 22
 
23 23
 
24 24
 export default (props) => {
25
-  const { person } = props
25
+  const { person,isDidShow } = props
26 26
   const { getAvatar } = useModel('person')
27 27
   const [showCutover, setShowCutover] = useState(false)
28 28
   const hasAvatar = !!person.avatar
@@ -39,7 +39,7 @@ export default (props) => {
39 39
   useEffect(() => {
40 40
     getMineOrder().then(res => setOrderNum(res))
41 41
 
42
-  }, [])
42
+  }, [isDidShow])
43 43
 
44 44
 
45 45
   // 通过getUserProfile获取微信用户信息