uptada BaiDuYun

This commit is contained in:
hrx 2025-09-18 17:17:26 +08:00
parent 278aa1465b
commit 835e1bff46

View File

@ -23,13 +23,16 @@ export default {
return { return {
userToken: '', userToken: '',
url: '', url: '',
loading: true loading: true,
} }
}, },
async created() { async created() {
await this.getToken(); await this.getToken();
}, },
methods: { methods: {
// 退
// token
// this.userid = sessionStorage.getItem('userId')
async getToken() { async getToken() {
try { try {
this.loading = true; this.loading = true;
@ -48,6 +51,47 @@ export default {
} finally { } finally {
this.loading = false; this.loading = false;
} }
},
receiveMessage(event) {
// if (event.origin !== "https://example.com") {
// //
// return;
// }
// console.log("iframeevent", event);
const data = event.data;
if (data && data.orderInfo && data.orderInfo.orderId) {
// orderId orderIdList
this.loading = true
const orderId = data.orderInfo.orderId
console.log('接收到订单ID:', orderId);
let ploay = {
order_id: orderId,
userid: this.userid
}
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: {
listUrl: this.$route.params.listUrl,
url: this.$route.params.url
}
})
this.$message.success('退订成功')
} else {
this.loading = false
this.$message.error(res.msg)
}
})
// ID
const orderLog = data
}
} }
} }
} }