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 43d5d2c..41d572d 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,17 +55,16 @@ export default { } }, receiveMessage(event) { - // if (event.origin !== "https://example.com") { - // // 确保消息来自预期的源 - // return; - // } - // console.log("iframe中的event是", event); + console.log('接收到消息:', event); + + this.userid = sessionStorage.getItem('userId') const data = event.data; - if (data && data.orderInfo && data.orderInfo.orderId) { + console.log('data是', data); + + if (data && data.orderInfo && data.orderInfo.refundInfo) { // 检查接收到的数据是否包含 orderId 或者 orderIdList this.loading = true - - const orderId = data.orderInfo.orderId + const orderId = String(data.orderInfo.refundInfo.uuidList) console.log('接收到订单ID:', orderId); let ploay = { order_id: orderId, @@ -74,10 +73,6 @@ 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: { @@ -86,31 +81,15 @@ 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 - } - }, + } } }