优化页面

This commit is contained in:
pengxiaolong
2025-06-17 22:04:18 +08:00
parent 8ec7365e7c
commit e464d99af5
86 changed files with 627 additions and 178 deletions

View File

@@ -2,6 +2,7 @@
const common_vendor = require("../../../common/vendor.js");
const components_request = require("../../../components/request.js");
const components_formatDate = require("../../../components/formatDate.js");
const components_DifferenceArray = require("../../../components/DifferenceArray.js");
const Recompose = () => "./recompose/recompose2.js";
const _sfc_main = {
data() {
@@ -11,7 +12,11 @@ const _sfc_main = {
page: 0,
createModule: null,
parentMessage: null,
triggered: false
triggered: false,
pickerArray: [],
index: 0,
topPinnedPersondata: {},
Topdate: 0
};
},
onLoad() {
@@ -19,7 +24,7 @@ const _sfc_main = {
key: "userinfo",
success: (res) => {
this.userinfo = res.data;
common_vendor.index.__f__("log", "at pages/Mine/minecomponents/pkInformation.vue:127", this.userinfo);
common_vendor.index.__f__("log", "at pages/Mine/minecomponents/pkInformation.vue:145", this.userinfo);
this.getpkList();
}
});
@@ -62,10 +67,10 @@ const _sfc_main = {
}).then((res) => {
if (res.code == 200) {
this.pkList.push(...res.data);
common_vendor.index.__f__("log", "at pages/Mine/minecomponents/pkInformation.vue:170", this.pkList);
common_vendor.index.__f__("log", "at pages/Mine/minecomponents/pkInformation.vue:188", this.pkList);
this.triggered = false;
} else {
common_vendor.index.__f__("log", "at pages/Mine/minecomponents/pkInformation.vue:173", res.msg);
common_vendor.index.__f__("log", "at pages/Mine/minecomponents/pkInformation.vue:191", res.msg);
}
});
},
@@ -76,6 +81,73 @@ const _sfc_main = {
},
// 置顶
onTop(item) {
this.pickerArray = components_DifferenceArray.DifferenceArray(item.pkTime);
this.$refs.popup.open("center");
this.topPinnedPersondata = item;
},
bindPickerChange(e) {
this.index = e.detail.value;
},
closePopup() {
this.$refs.popup.close();
this.index = 0;
this.pickerArray = [];
this.topPinnedPersondata = {};
},
onTopConfirm() {
if (Math.ceil(Date.now() / 1e3 + Number(this.pickerArray[this.index]) * 3600) <= this.topPinnedPersondata.pkTime) {
this.Topdate = Math.ceil(Date.now() / 1e3 + Number(this.pickerArray[this.index]) * 3600);
} else {
this.Topdate = this.topPinnedPersondata.pkTime;
}
common_vendor.index.__f__("log", "at pages/Mine/minecomponents/pkInformation.vue:221", this.Topdate, this.topPinnedPersondata.id);
components_request.request({
url: "user/pinToTop",
method: "POST",
data: {
articleId: this.topPinnedPersondata.id,
pinExpireTime: this.Topdate
},
userInfo: true
}).then((res) => {
if (res.code == 200) {
this.onRefresherRefresh();
common_vendor.index.showToast({
title: res.msg,
icon: "none",
duration: 3e3
});
this.closePopup();
} else {
common_vendor.index.showToast({
title: res.msg,
icon: "none",
duration: 3e3
});
}
});
},
//取消置顶
onOutTop(item) {
components_request.request({
url: "user/cancelPin",
method: "POST",
data: {
articleId: item.id
},
userInfo: true
}).then((res) => {
if (res.code == 200) {
this.onRefresherRefresh();
common_vendor.index.showToast({
title: res.data,
icon: "none",
duration: 3e3
});
} else {
common_vendor.index.__f__("log", "at pages/Mine/minecomponents/pkInformation.vue:267", res.msg);
}
});
},
// 删除pk
onExpurgate(item) {
@@ -95,7 +167,7 @@ const _sfc_main = {
duration: 2e3
});
} else {
common_vendor.index.__f__("log", "at pages/Mine/minecomponents/pkInformation.vue:204", res.msg);
common_vendor.index.__f__("log", "at pages/Mine/minecomponents/pkInformation.vue:289", res.msg);
}
});
}
@@ -107,7 +179,12 @@ const _sfc_main = {
if (!Array) {
const _component_uni_card = common_vendor.resolveComponent("uni-card");
const _component_Recompose = common_vendor.resolveComponent("Recompose");
(_component_uni_card + _component_Recompose)();
const _easycom_uni_popup2 = common_vendor.resolveComponent("uni-popup");
(_component_uni_card + _component_Recompose + _easycom_uni_popup2)();
}
const _easycom_uni_popup = () => "../../../uni_modules/uni-popup/components/uni-popup/uni-popup.js";
if (!Math) {
_easycom_uni_popup();
}
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return {
@@ -125,13 +202,20 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
h: common_vendor.t(item.coin),
i: common_vendor.t($options.formatDate(item.pkTime)),
j: item.inviteStatus === 0
}, item.inviteStatus === 0 ? {
k: common_vendor.o$1(($event) => $options.onTop(item), index),
l: common_vendor.o$1(($event) => $options.onRecompose(item), index),
m: common_vendor.o$1(($event) => $options.onExpurgate(item), index)
}, item.inviteStatus === 0 ? common_vendor.e({
k: item.isPin === false
}, item.isPin === false ? {
l: common_vendor.o$1(($event) => $options.onTop(item), index)
} : {}, {
n: index,
o: "36b7ee78-0-" + i0
m: item.isPin === true
}, item.isPin === true ? {
n: common_vendor.o$1(($event) => $options.onOutTop(item), index)
} : {}, {
o: common_vendor.o$1(($event) => $options.onRecompose(item), index),
p: common_vendor.o$1(($event) => $options.onExpurgate(item), index)
}) : {}, {
q: index,
r: "36b7ee78-0-" + i0
});
}),
c: common_vendor.o$1((...args) => $options.onRefresherRefresh && $options.onRefresherRefresh(...args)),
@@ -141,6 +225,17 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
g: common_vendor.o$1($options.onRefresherRefresh),
h: common_vendor.p({
message: $data.parentMessage
}),
i: common_vendor.t($data.pickerArray[$data.index]),
j: $data.pickerArray,
k: $data.index,
l: common_vendor.o$1((...args) => $options.bindPickerChange && $options.bindPickerChange(...args)),
m: common_vendor.o$1((...args) => $options.onTopConfirm && $options.onTopConfirm(...args)),
n: common_vendor.o$1((...args) => $options.closePopup && $options.closePopup(...args)),
o: common_vendor.sr("popup", "36b7ee78-2"),
p: common_vendor.p({
type: "center",
["border-radius"]: "10px 10px 0 0"
})
};
}