|
@@ -1,61 +1,59 @@
|
1
|
1
|
import Taro, { Component } from '@tarojs/taro'
|
2
|
2
|
import { WebView } from '@tarojs/components'
|
3
|
|
-import { contractUser, contractCheck } from '@/services/project'
|
|
3
|
+// import { contractUser, contractCheck } from '@/services/project'
|
4
|
4
|
|
5
|
5
|
export default class Panorama extends Component {
|
6
|
6
|
state = {}
|
7
|
|
- tk = undefined
|
8
|
|
- tk2 = undefined
|
|
7
|
+ // tk = undefined
|
|
8
|
+ // tk2 = undefined
|
9
|
9
|
componentWillMount() {
|
10
|
|
- const { from = '', id: raiseRecordId, consultantName, consultantId } = this.$router.params
|
11
|
|
- if (from == 'raiseProfile') {
|
12
|
|
- console.log('!!!!')
|
13
|
|
- this.tk = setInterval(() => {
|
14
|
|
- contractUser({ raiseRecordId, showToast: false }).then(res => {
|
15
|
|
- console.log(res, res.status, '每5秒请求一次!!!!')
|
16
|
|
- if (res.status != 0 && res.status != 1) {
|
17
|
|
- const { id } = this.$router.params
|
18
|
|
- clearInterval(this.tk)
|
19
|
|
- Taro.navigateTo({
|
20
|
|
- url: `/onlineSelling/pages/raiseMoney/Certification?id=${res.raiseRecordId || id}&consultantName=${encodeURIComponent(consultantName)}&consultantId=${consultantId}`
|
21
|
|
- })
|
22
|
|
- }
|
23
|
|
- })
|
24
|
|
- }, 5000)
|
25
|
|
- }
|
26
|
|
- if (from == 'contractManual') {
|
27
|
|
- console.log('contractManual!!!!')
|
28
|
|
- this.tk2 = setInterval(() => {
|
29
|
|
- contractCheck({ raiseRecordId, showToast: false }).then(res => {
|
30
|
|
- console.log(res, res.status, 'contractManual每5秒请求一次!!!')
|
31
|
|
- if (res.status != 0) {
|
32
|
|
- clearInterval(this.tk2)
|
33
|
|
- Taro.navigateTo({
|
34
|
|
- url: `/onlineSelling/pages/raiseMoney/signResult?status=${res.status}&id=${raiseRecordId}&consultantName=${encodeURIComponent(consultantName)}&consultantId=${consultantId}`
|
35
|
|
- })
|
36
|
|
- }
|
37
|
|
- })
|
38
|
|
- }, 5000)
|
39
|
|
- } else {
|
40
|
|
- console.log(this.$router.params, "this.$router.paramsthis.$router.paramsthis.$router.paramsthis.$router.params")
|
41
|
|
- }
|
42
|
|
- }
|
43
|
|
- componentDidHide() {
|
44
|
|
- if (this.tk) {
|
45
|
|
- clearInterval(this.tk)
|
46
|
|
- }
|
47
|
|
- if (this.tk2) {
|
48
|
|
- clearInterval(this.tk2)
|
49
|
|
- }
|
50
|
|
- }
|
51
|
|
- componentWillUnmount() {
|
52
|
|
- if (this.tk) {
|
53
|
|
- clearInterval(this.tk)
|
54
|
|
- }
|
55
|
|
- if (this.tk2) {
|
56
|
|
- clearInterval(this.tk2)
|
57
|
|
- }
|
|
10
|
+ // const { from = '', id: raiseRecordId, consultantName, consultantId } = this.$router.params
|
|
11
|
+ // if (from == 'raiseProfile') {
|
|
12
|
+ // console.log('!!!!')
|
|
13
|
+ // this.tk = setInterval(() => {
|
|
14
|
+ // contractUser({ raiseRecordId, showToast: false }).then(res => {
|
|
15
|
+ // console.log(res, res.status, '每5秒请求一次!!!!')
|
|
16
|
+ // if (res.status != 0 && res.status != 1) {
|
|
17
|
+ // const { id } = this.$router.params
|
|
18
|
+ // clearInterval(this.tk)
|
|
19
|
+ // Taro.navigateTo({
|
|
20
|
+ // url: `/onlineSelling/pages/raiseMoney/Certification?id=${res.raiseRecordId || id}&consultantName=${encodeURIComponent(consultantName)}&consultantId=${consultantId}`
|
|
21
|
+ // })
|
|
22
|
+ // }
|
|
23
|
+ // })
|
|
24
|
+ // }, 5000)
|
|
25
|
+ // }
|
|
26
|
+ // if (from == 'contractManual') {
|
|
27
|
+ // console.log('contractManual!!!!')
|
|
28
|
+ // this.tk2 = setInterval(() => {
|
|
29
|
+ // contractCheck({ raiseRecordId, showToast: false }).then(res => {
|
|
30
|
+ // console.log(res, res.status, 'contractManual每5秒请求一次!!!')
|
|
31
|
+ // if (res.status != 0) {
|
|
32
|
+ // clearInterval(this.tk2)
|
|
33
|
+ // Taro.navigateTo({
|
|
34
|
+ // url: `/onlineSelling/pages/raiseMoney/signResult?status=${res.status}&id=${raiseRecordId}&consultantName=${encodeURIComponent(consultantName)}&consultantId=${consultantId}`
|
|
35
|
+ // })
|
|
36
|
+ // }
|
|
37
|
+ // })
|
|
38
|
+ // }, 5000)
|
|
39
|
+ // }
|
58
|
40
|
}
|
|
41
|
+ // componentDidHide() {
|
|
42
|
+ // if (this.tk) {
|
|
43
|
+ // clearInterval(this.tk)
|
|
44
|
+ // }
|
|
45
|
+ // if (this.tk2) {
|
|
46
|
+ // clearInterval(this.tk2)
|
|
47
|
+ // }
|
|
48
|
+ // }
|
|
49
|
+ // componentWillUnmount() {
|
|
50
|
+ // if (this.tk) {
|
|
51
|
+ // clearInterval(this.tk)
|
|
52
|
+ // }
|
|
53
|
+ // if (this.tk2) {
|
|
54
|
+ // clearInterval(this.tk2)
|
|
55
|
+ // }
|
|
56
|
+ // }
|
59
|
57
|
|
60
|
58
|
render() {
|
61
|
59
|
const url = decodeURIComponent(this.$router.params.url)
|