@qywh/package 0.0.3-beta06 → 0.0.3-beta08
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -6,6 +6,8 @@ import {
|
|
|
6
6
|
import logParamHandle from '../utils/logParamHandle'
|
|
7
7
|
import { offset } from '../utils'
|
|
8
8
|
|
|
9
|
+
let jumpXcxToQuestionRunning = false
|
|
10
|
+
|
|
9
11
|
/**
|
|
10
12
|
* link
|
|
11
13
|
*/
|
|
@@ -80,6 +82,10 @@ export function goodsBuy (this: any, params: any) {
|
|
|
80
82
|
}
|
|
81
83
|
|
|
82
84
|
export async function jumpXcxToQuestion (this: any, params: any) {
|
|
85
|
+
if (jumpXcxToQuestionRunning) {
|
|
86
|
+
return
|
|
87
|
+
}
|
|
88
|
+
jumpXcxToQuestionRunning = true
|
|
83
89
|
const pageData = (window as any).__PAGE_DATA__ || {}
|
|
84
90
|
const actId = (pageData.actInfo && pageData.actInfo.actId) || ''
|
|
85
91
|
|
|
@@ -104,10 +110,14 @@ export async function jumpXcxToQuestion (this: any, params: any) {
|
|
|
104
110
|
qId: params.qId || '',
|
|
105
111
|
}
|
|
106
112
|
try {
|
|
113
|
+
const pvidValue = JSON.stringify({
|
|
114
|
+
successInfo,
|
|
115
|
+
tf_ext_data: tfExtData
|
|
116
|
+
})
|
|
107
117
|
const pvRes = await fetch('/common/pvid', {
|
|
108
118
|
method: 'POST',
|
|
109
119
|
headers: { 'Content-Type': 'application/json' },
|
|
110
|
-
body: JSON.stringify({
|
|
120
|
+
body: JSON.stringify({ value: pvidValue })
|
|
111
121
|
}).then(res => res.json())
|
|
112
122
|
const pvId = pvRes?.data?.pvId
|
|
113
123
|
if (pvId) {
|
|
@@ -141,6 +151,10 @@ export async function jumpXcxToQuestion (this: any, params: any) {
|
|
|
141
151
|
}
|
|
142
152
|
} catch (err) {
|
|
143
153
|
console.error('[jumpXcxToQuestion] 生成scheme失败:', err)
|
|
154
|
+
} finally {
|
|
155
|
+
window.setTimeout(() => {
|
|
156
|
+
jumpXcxToQuestionRunning = false
|
|
157
|
+
}, 1000)
|
|
144
158
|
}
|
|
145
159
|
}
|
|
146
160
|
|
package/package.json
CHANGED
|
@@ -28,7 +28,8 @@
|
|
|
28
28
|
|
|
29
29
|
<script lang="ts">
|
|
30
30
|
import { Component, Vue, Prop } from 'vue-property-decorator'
|
|
31
|
-
import
|
|
31
|
+
import request from '../../../lib/request'
|
|
32
|
+
import { getUrlParams } from '../../../lib/methods/jump'
|
|
32
33
|
|
|
33
34
|
@Component
|
|
34
35
|
export default class QyOutSuccessWechatDiversion extends Vue {
|
|
@@ -47,14 +48,10 @@ export default class QyOutSuccessWechatDiversion extends Vue {
|
|
|
47
48
|
}
|
|
48
49
|
}
|
|
49
50
|
|
|
50
|
-
get pageQuery () {
|
|
51
|
-
return (this as any).$utils ? (this as any).$utils.getUrlParams() : {}
|
|
52
|
-
}
|
|
53
|
-
|
|
54
51
|
async fetchQrCode () {
|
|
55
52
|
if (this.isEdit) return
|
|
56
53
|
|
|
57
|
-
const { orderId, userId } =
|
|
54
|
+
const { orderId, userId } = getUrlParams()
|
|
58
55
|
if (!orderId || !userId) {
|
|
59
56
|
this.error = '缺少订单参数'
|
|
60
57
|
return
|
|
@@ -63,11 +60,9 @@ export default class QyOutSuccessWechatDiversion extends Vue {
|
|
|
63
60
|
for (let i = 0; i < 5; i++) {
|
|
64
61
|
try {
|
|
65
62
|
this.error = ''
|
|
66
|
-
const res: any = await
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
if (res && res.data && res.data.qrCode) {
|
|
70
|
-
this.qrcode = res.data.qrCode
|
|
63
|
+
const res: any = await request.get('/common/api/getOrderQrCode', { orderId, userId })
|
|
64
|
+
if (res && res.qrCode) {
|
|
65
|
+
this.qrcode = res.qrCode
|
|
71
66
|
return
|
|
72
67
|
}
|
|
73
68
|
} catch (e) {
|