优化
This commit is contained in:
@@ -15,16 +15,30 @@ const _sfc_main = {
|
||||
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();
|
||||
}
|
||||
const eventChannel = this.getOpenerEventChannel();
|
||||
eventChannel.on("itemDetail", (data) => {
|
||||
this.item = data.item;
|
||||
common_vendor.index.__f__("log", "at pages/pkDetail/pkDetail.vue:211", " itemDetail", data.item);
|
||||
});
|
||||
common_vendor.index.getStorage({
|
||||
key: "userinfo",
|
||||
@@ -40,6 +54,28 @@ const _sfc_main = {
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
//分享直接获取数据
|
||||
GetonShareAppMessagedata() {
|
||||
components_request.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 {
|
||||
common_vendor.index.showToast({
|
||||
title: res.msg,
|
||||
icon: "none",
|
||||
duration: 2e3
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
//修改信息
|
||||
// onRecompose(item) {
|
||||
// this.parentMessage = item;
|
||||
@@ -60,7 +96,12 @@ const _sfc_main = {
|
||||
},
|
||||
Returnfunc() {
|
||||
common_vendor.index.navigateBack({
|
||||
delta: 1
|
||||
delta: 1,
|
||||
fail: () => {
|
||||
common_vendor.index.reLaunch({
|
||||
url: "/pages/Home/Home"
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
open() {
|
||||
@@ -211,5 +252,6 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
});
|
||||
}
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-9639f721"]]);
|
||||
_sfc_main.__runtimeHooks = 2;
|
||||
wx.createPage(MiniProgramPage);
|
||||
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/pkDetail/pkDetail.js.map
|
||||
|
||||
Reference in New Issue
Block a user