From 289b8ffb5a5b6d14e5e718c81673db13c5347b19 Mon Sep 17 00:00:00 2001 From: hrx <18603305412@163.com> Date: Fri, 19 Sep 2025 11:54:47 +0800 Subject: [PATCH] uptada BaiDuYun --- .../unsubscribe/BaiduNetdisk.vue/index.vue | 36 +++++++++++++++---- 1 file changed, 29 insertions(+), 7 deletions(-) diff --git a/f/web-kboss/src/views/customer/unsubscribe/BaiduNetdisk.vue/index.vue b/f/web-kboss/src/views/customer/unsubscribe/BaiduNetdisk.vue/index.vue index 53d1ab7..43d5d2c 100644 --- a/f/web-kboss/src/views/customer/unsubscribe/BaiduNetdisk.vue/index.vue +++ b/f/web-kboss/src/views/customer/unsubscribe/BaiduNetdisk.vue/index.vue @@ -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 + } - } + }, } }