uptada BaiDuYun
This commit is contained in:
parent
2aeaeb23b5
commit
289b8ffb5a
@ -55,15 +55,17 @@ export default {
|
||||
}
|
||||
},
|
||||
receiveMessage(event) {
|
||||
console.log('接收到消息:', event);
|
||||
|
||||
this.userid = sessionStorage.getItem('userId')
|
||||
// if (event.origin !== "https://example.com") {
|
||||
// // 确保消息来自预期的源
|
||||
// return;
|
||||
// }
|
||||
// console.log("iframe中的event是", event);
|
||||
const data = event.data;
|
||||
if (data && data.orderInfo && data.orderInfo.refundInfo) {
|
||||
if (data && data.orderInfo && data.orderInfo.orderId) {
|
||||
// 检查接收到的数据是否包含 orderId 或者 orderIdList
|
||||
this.loading = true
|
||||
|
||||
const orderId = data.orderInfo.refundInfo.uuidList
|
||||
const orderId = data.orderInfo.orderId
|
||||
console.log('接收到订单ID:', orderId);
|
||||
let ploay = {
|
||||
order_id: orderId,
|
||||
@ -72,6 +74,10 @@ export default {
|
||||
reqBaiduJudgePrice(ploay).then((res) => {
|
||||
console.log("二级接口是", res)
|
||||
if (res.status) {
|
||||
// let lastPloay = {
|
||||
// orderid: res.orderid,
|
||||
// product_url: this.$route.params.listUrl ? this.$route.params.listUrl : localStorage.getItem('userRescourseUrl')
|
||||
// }
|
||||
this.$router.push({
|
||||
name: 'userResource',
|
||||
params: {
|
||||
@ -80,15 +86,31 @@ export default {
|
||||
}
|
||||
})
|
||||
this.$message.success('退订成功')
|
||||
|
||||
// reqBaiduOrderCost(lastPloay).then(res => {
|
||||
// if (res.status) {
|
||||
// this.loading = false
|
||||
// this.$message.success('购买成功')
|
||||
// this.$router.push({
|
||||
// name: 'userResource',
|
||||
// params: {
|
||||
// listUrl: this.$route.params.listUrl,
|
||||
// url: this.$route.params.url
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
//
|
||||
// })
|
||||
} else {
|
||||
this.loading = false
|
||||
this.$message.error(res.msg)
|
||||
}
|
||||
})
|
||||
// 在这里处理接收到的订单ID
|
||||
const orderLog = data
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user