This commit is contained in:
pengxiaolong
2025-06-23 22:00:46 +08:00
parent acc81963e9
commit 36a240f854
79 changed files with 426 additions and 154 deletions

View File

@@ -183,18 +183,32 @@ export default {
InvitingPartyEventindex: null,
chatInfo: {},
currentConversation: null,
inid: null,
// parentMessage: null,
style: {
backgroundColor: "#ffffff",
},
};
},
onShareAppMessage(res) {
if (res.from === 'menu') {
return {
title: '分享',
path: `${getCurrentPages()[getCurrentPages().length - 1].route}?inid=${this.item.id}`,
}
}
},
onLoad(options) {
this.inid = options.inid;
if (this.inid) {
this.GetonShareAppMessagedata();
}
// 获取源页面的eventChannel对象
const eventChannel = this.getOpenerEventChannel();
// 监听itemDetail事件
eventChannel.on("itemDetail", (data) => {
this.item = data.item; // 将接收到的数据赋值给item
console.log(" itemDetail", data.item);
});
uni.getStorage({
@@ -211,6 +225,29 @@ export default {
});
},
methods: {
//分享直接获取数据
GetonShareAppMessagedata() {
request({
url: "pk/pkInfoDetail",
method: "POST",
data: {
id: this.inid,
userId: this.id,
},
userInfo: true,
}).then((res) => {
if (res.code === 200) {
this.item = res.data;
} else {
uni.showToast({
title: res.msg,
icon: "none",
duration: 2000,
});
}
});
},
//修改信息
// onRecompose(item) {
// this.parentMessage = item;
@@ -232,6 +269,11 @@ export default {
Returnfunc() {
uni.navigateBack({
delta: 1,
fail: () => {
uni.reLaunch({
url: '/pages/Home/Home',
});
}
});
},
open() {