xcx 4 lat temu
rodzic
commit
cf3b54e179
1 zmienionych plików z 12 dodań i 1 usunięć
  1. 12
    1
      src/pages/WuYe/BaoXiuFeiYong/index.jsx

+ 12
- 1
src/pages/WuYe/BaoXiuFeiYong/index.jsx Wyświetl plik

@@ -1,5 +1,9 @@
1 1
 import React, { useState, useEffect } from 'react'
2
+<<<<<<< HEAD
2 3
 import Taro, { Current } from '@tarojs/taro'
4
+=======
5
+import Taro, { useRouter } from '@tarojs/taro'
6
+>>>>>>> fb306f05e5e66c8bd62a5225ca10b7caaf677cd0
3 7
 import SlidePopup from '@/components/SlidePopup/index'
4 8
 import UploadImg from '@/components/UploadImg/index'
5 9
 import Page from '@/layouts'
@@ -11,17 +15,24 @@ import '@/assets/css/iconfont.less'
11 15
 import './index.less'
12 16
 
13 17
 export default function BaoXiuFeiYong () {
18
+  const router = useRouter()
14 19
 
15 20
   const { user } = useModel('user')
16 21
   const [ShowPopup, setShowPopup] = useState(false)
17 22
   const [PopupType, setPopupType] = useState(0)
18
-  const [CurrnetBaoXiuId] = useState(Current.router.params !== null ? Current.router.params.id : null)
23
+  const [CurrnetBaoXiuId] = useState(router.params.id)
19 24
   const [DetailInfo, setDetailInfo] = useState(null)
20 25
   const [BillInfo, setBillInfo] = useState(null)
21 26
 
27
+<<<<<<< HEAD
22 28
   useEffect(() => {
23 29
     Init()
24 30
   }, [CurrnetBaoXiuId])
31
+=======
32
+  useDidShow(() => {
33
+    Init()
34
+  })
35
+>>>>>>> fb306f05e5e66c8bd62a5225ca10b7caaf677cd0
25 36
 
26 37
   const Init = () => {
27 38
     request({ ...apis.getGongDanDetail, args: { orgId: user.orgId }, params: { ticketId: CurrnetBaoXiuId } }).then((res) => { // 获取工单详情