优化页面
This commit is contained in:
@@ -1,154 +0,0 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../common/vendor.js");
|
||||
const components_request = require("../../components/request.js");
|
||||
const components_formatDate = require("../../components/formatDate.js");
|
||||
const common_assets = require("../../common/assets.js");
|
||||
const _sfc_main = {
|
||||
data() {
|
||||
return {
|
||||
customData: {},
|
||||
SenderData: {},
|
||||
ReceiverData: {},
|
||||
PkIDInfodata: {}
|
||||
};
|
||||
},
|
||||
onLoad(options) {
|
||||
this.customData = JSON.parse(options.customData);
|
||||
this.getPkyourInfo();
|
||||
this.getPkmineInfo();
|
||||
this.getPkIDInfo();
|
||||
},
|
||||
methods: {
|
||||
//根据当前消息ID查询pk信息
|
||||
async getPkIDInfo() {
|
||||
await components_request.request({
|
||||
url: "pk/singleRecord",
|
||||
method: "POST",
|
||||
data: {
|
||||
id: this.customData.id
|
||||
},
|
||||
userInfo: true
|
||||
}).then((res) => {
|
||||
this.PkIDInfodata = res.data;
|
||||
common_vendor.index.__f__("log", "at pages/PKMessageprocessing/PKMessageprocessing.vue:177", this.PkIDInfodata);
|
||||
});
|
||||
},
|
||||
//发布者
|
||||
async getPkyourInfo() {
|
||||
await components_request.request({
|
||||
url: "pk/pkInfoDetail",
|
||||
method: "POST",
|
||||
data: {
|
||||
id: this.customData.pkIdA
|
||||
},
|
||||
userInfo: true
|
||||
}).then((res) => {
|
||||
this.SenderData = res.data;
|
||||
common_vendor.index.__f__("log", "at pages/PKMessageprocessing/PKMessageprocessing.vue:191", this.SenderData);
|
||||
});
|
||||
},
|
||||
//被邀请者
|
||||
async getPkmineInfo() {
|
||||
await components_request.request({
|
||||
url: "pk/pkInfoDetail",
|
||||
method: "POST",
|
||||
data: {
|
||||
id: this.customData.pkIdB
|
||||
},
|
||||
userInfo: true
|
||||
}).then((res) => {
|
||||
this.ReceiverData = res.data;
|
||||
common_vendor.index.__f__("log", "at pages/PKMessageprocessing/PKMessageprocessing.vue:205", this.ReceiverData);
|
||||
});
|
||||
},
|
||||
goBack() {
|
||||
common_vendor.wx$1.navigateBack({
|
||||
delta: 1
|
||||
});
|
||||
},
|
||||
formatDate: components_formatDate.formatDate,
|
||||
async operation(status) {
|
||||
common_vendor.index.__f__("log", "at pages/PKMessageprocessing/PKMessageprocessing.vue:216", "``````", this.customData);
|
||||
common_vendor.index.__f__("log", "at pages/PKMessageprocessing/PKMessageprocessing.vue:217", status);
|
||||
await components_request.request({
|
||||
url: "pk/updatePkStatus",
|
||||
method: "POST",
|
||||
data: {
|
||||
id: this.customData.id,
|
||||
pkStatus: status
|
||||
},
|
||||
userInfo: true
|
||||
}).then((res) => {
|
||||
common_vendor.index.__f__("log", "at pages/PKMessageprocessing/PKMessageprocessing.vue:228", res.data);
|
||||
const Hinttext = status === 1 ? "接受邀请成功" : "拒绝邀请成功";
|
||||
if (res.code === 200) {
|
||||
this.getPkIDInfo();
|
||||
common_vendor.wx$1.showToast({
|
||||
title: Hinttext,
|
||||
icon: "success",
|
||||
duration: 2e3
|
||||
});
|
||||
common_vendor.wx$1.navigateBack({
|
||||
delta: 1
|
||||
});
|
||||
} else {
|
||||
common_vendor.wx$1.showToast({
|
||||
title: "操作失败",
|
||||
icon: "none",
|
||||
duration: 2e3
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
return common_vendor.e({
|
||||
a: common_assets._imports_0$1,
|
||||
b: common_assets._imports_1,
|
||||
c: common_vendor.o$1((...args) => $options.goBack && $options.goBack(...args)),
|
||||
d: $data.SenderData.anchorIcon,
|
||||
e: common_vendor.t($data.SenderData.anchorId),
|
||||
f: $data.SenderData.sex === "1"
|
||||
}, $data.SenderData.sex === "1" ? {
|
||||
g: common_assets._imports_2,
|
||||
h: common_vendor.t($data.SenderData.sex == 1 ? "男" : "女")
|
||||
} : {
|
||||
i: common_assets._imports_3,
|
||||
j: common_vendor.t($data.SenderData.sex == 1 ? "男" : "女")
|
||||
}, {
|
||||
k: common_vendor.t($data.SenderData.country),
|
||||
l: common_vendor.t($options.formatDate($data.SenderData.pkTime)),
|
||||
m: common_assets._imports_4$2,
|
||||
n: common_vendor.t($data.SenderData.coin),
|
||||
o: common_assets._imports_5$2,
|
||||
p: common_vendor.t($data.SenderData.pkNumber),
|
||||
q: $data.ReceiverData.anchorIcon,
|
||||
r: common_vendor.t($data.ReceiverData.anchorId),
|
||||
s: $data.ReceiverData.sex === "1"
|
||||
}, $data.ReceiverData.sex === "1" ? {
|
||||
t: common_assets._imports_2,
|
||||
v: common_vendor.t($data.ReceiverData.sex == 1 ? "男" : "女")
|
||||
} : {
|
||||
w: common_assets._imports_3,
|
||||
x: common_vendor.t($data.ReceiverData.sex == 1 ? "男" : "女")
|
||||
}, {
|
||||
y: common_vendor.t($data.ReceiverData.country),
|
||||
z: common_vendor.t($options.formatDate($data.ReceiverData.pkTime)),
|
||||
A: common_assets._imports_4$2,
|
||||
B: common_vendor.t($data.ReceiverData.coin),
|
||||
C: common_assets._imports_5$2,
|
||||
D: common_vendor.t($data.ReceiverData.pkNumber),
|
||||
E: $data.PkIDInfodata.pkStatus === 0
|
||||
}, $data.PkIDInfodata.pkStatus === 0 ? {
|
||||
F: common_vendor.o$1(($event) => $options.operation(1)),
|
||||
G: common_vendor.o$1(($event) => $options.operation(2))
|
||||
} : {}, {
|
||||
H: $data.PkIDInfodata.pkStatus === 1
|
||||
}, $data.PkIDInfodata.pkStatus === 1 ? {} : {}, {
|
||||
I: $data.PkIDInfodata.pkStatus === 2
|
||||
}, $data.PkIDInfodata.pkStatus === 2 ? {} : {});
|
||||
}
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-cadadfe7"]]);
|
||||
wx.createPage(MiniProgramPage);
|
||||
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/PKMessageprocessing/PKMessageprocessing.js.map
|
||||
Reference in New Issue
Block a user