xcx пре 4 година
родитељ
комит
6db5b41238
1 измењених фајлова са 10 додато и 4 уклоњено
  1. 10
    4
      src/pages/WuYe/BaoXiuFeiYong/index.jsx

+ 10
- 4
src/pages/WuYe/BaoXiuFeiYong/index.jsx Прегледај датотеку

@@ -1,5 +1,5 @@
1 1
 import React, { useState, useEffect } from 'react'
2
-import Taro, { Current } from '@tarojs/taro'
2
+import Taro, { Current, useDidShow } from '@tarojs/taro'
3 3
 import SlidePopup from '@/components/SlidePopup/index'
4 4
 import UploadImg from '@/components/UploadImg/index'
5 5
 import Page from '@/layouts'
@@ -19,9 +19,15 @@ export default function BaoXiuFeiYong () {
19 19
   const [DetailInfo, setDetailInfo] = useState(null)
20 20
   const [BillInfo, setBillInfo] = useState(null)
21 21
 
22
-  useEffect(() => {
23
-    Init()
24
-  }, [CurrnetBaoXiuId])
22
+  // useEffect(() => {
23
+  //   Init()
24
+  // }, [CurrnetBaoXiuId])
25
+
26
+  useDidShow(() => {
27
+    if (CurrnetBaoXiuId !== null) {
28
+      Init()
29
+    }
30
+  })
25 31
 
26 32
   const Init = () => {
27 33
     request({ ...apis.getGongDanDetail, args: { orgId: user.orgId }, params: { ticketId: CurrnetBaoXiuId } }).then((res) => { // 获取工单详情