优化代码

This commit is contained in:
pengxiaolong
2025-07-29 14:23:27 +08:00
parent 36005c9604
commit 3eddd94922
38 changed files with 4423 additions and 20192 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -335,7 +335,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
B: common_vendor.p({
type: "textarea",
placeholder: "备注",
maxlength: "-1",
maxlength: 50,
modelValue: $data.remarks
}),
C: common_vendor.o(($event) => $options.Publish()),

File diff suppressed because one or more lines are too long

View File

@@ -12,7 +12,7 @@ const _sfc_main = {
name: "",
id: "",
info: {},
userSig: ""
useravatar: ""
};
},
onLoad(option) {
@@ -21,13 +21,7 @@ const _sfc_main = {
success: (res) => {
this.id = res.data.id;
this.name = res.data.nickName;
this.userinfo = res.data.headerIcon;
}
});
common_vendor.index.getStorage({
key: "userSig",
success: (res) => {
this.userSig = res.data;
this.userinfo = this.useravatar = res.data.headerIcon;
}
});
},
@@ -53,18 +47,14 @@ const _sfc_main = {
title: "修改中...",
mask: true
});
components_postFile.uploadFile({
path: this.userinfo,
name: components_generateFileName.generateFileName()
}).then((res) => {
if (this.useravatar == this.userinfo) {
components_request.request({
url: "user/updateUserInfo",
method: "POST",
data: {
id: this.id,
headerIcon: res.split("/").pop(),
nickName: this.name,
usersig: this.userSig.userSig
headerIcon: this.userinfo.split("/").pop(),
nickName: this.name
},
userInfo: true
}).then((ress) => {
@@ -86,9 +76,44 @@ const _sfc_main = {
});
}
});
}).catch((err) => {
common_vendor.index.__f__("log", "at pages/Setting/Setting.vue:112", err);
});
} else {
components_postFile.uploadFile({
path: this.userinfo,
name: components_generateFileName.generateFileName()
}).then((res) => {
components_request.request({
url: "user/updateUserInfo",
method: "POST",
data: {
id: this.id,
headerIcon: res.split("/").pop(),
nickName: this.name
},
userInfo: true
}).then((ress) => {
common_vendor.index.__f__("log", "at pages/Setting/Setting.vue:112", "修改调用返回", ress);
if (ress.code === 200) {
common_vendor.index.showToast({
title: "修改成功",
icon: "success"
});
common_vendor.index.setStorageSync("userinfo", ress.data.info);
components_goEasyTool_tool.goEasylogin(this.$goeasy, String(ress.data.info.id), ress.data.info.headerIcon, ress.data.info.nickName);
common_vendor.index.hideLoading();
common_vendor.index.navigateBack({
delta: 1
});
} else {
common_vendor.index.showToast({
title: "修改失败",
icon: "none"
});
}
});
}).catch((err) => {
common_vendor.index.__f__("log", "at pages/Setting/Setting.vue:135", "上传失败", err);
});
}
}
}
};

View File

@@ -104,9 +104,12 @@ const _sfc_main = {
onHide() {
this.onPage = false;
},
onUnload() {
this.onPage = false;
},
onLoad(options) {
this.recorderManager.onStop((res) => {
common_vendor.index.__f__("log", "at pages/index/chat/chat.vue:384", "录音结束", res);
common_vendor.index.__f__("log", "at pages/index/chat/chat.vue:387", "录音结束", res);
if (this.ioshide != 0) {
if (res.fileSize < 20 * 1024) {
common_vendor.index.showToast({
@@ -183,7 +186,7 @@ const _sfc_main = {
}).exec();
});
components_goEasyTool_tool.messageRead(this.$goeasy, this.userId).then((res) => {
common_vendor.index.__f__("log", "at pages/index/chat/chat.vue:466", "已读对方的消息");
common_vendor.index.__f__("log", "at pages/index/chat/chat.vue:469", "已读对方的消息");
});
this.getIOSDeviceType();
var im = this.$goeasy.im;
@@ -208,7 +211,7 @@ const _sfc_main = {
data: { avatar: this.avatar, nickname: this.nickname }
},
onProgress: function(event) {
common_vendor.index.__f__("log", "at pages/index/chat/chat.vue:491", "file uploading:", event);
common_vendor.index.__f__("log", "at pages/index/chat/chat.vue:494", "file uploading:", event);
}
//获取上传进度
});
@@ -221,7 +224,7 @@ const _sfc_main = {
},
//长按语音
voiceTouchstart() {
common_vendor.index.__f__("log", "at pages/index/chat/chat.vue:503", "长按语音");
common_vendor.index.__f__("log", "at pages/index/chat/chat.vue:506", "长按语音");
this.voicepopUpstart = true;
this.recorderManager.start();
this.notplayVoice(false);
@@ -231,7 +234,7 @@ const _sfc_main = {
setTimeout(() => {
this.recorderManager.stop();
}, 100);
common_vendor.index.__f__("log", "at pages/index/chat/chat.vue:513", "松开语音");
common_vendor.index.__f__("log", "at pages/index/chat/chat.vue:516", "松开语音");
this.voicepopUpstart = false;
},
//移动语音
@@ -248,7 +251,7 @@ const _sfc_main = {
},
//中断语音
voiceTouchcancel() {
common_vendor.index.__f__("log", "at pages/index/chat/chat.vue:529", "中断语音");
common_vendor.index.__f__("log", "at pages/index/chat/chat.vue:532", "中断语音");
this.voicepopUpstart = false;
this.voiceCancelOrSend = false;
},
@@ -407,14 +410,14 @@ const _sfc_main = {
});
setTimeout(() => {
this.chatList = [...this.MoreMessageList, ...this.chatList];
common_vendor.index.__f__("log", "at pages/index/chat/chat.vue:695", "获取更多聊天记录", this.chatList);
common_vendor.index.__f__("log", "at pages/index/chat/chat.vue:698", "获取更多聊天记录", this.chatList);
this.LastTime = this.chatList[0].timestamp;
this.ElementPositioning = this.Record;
}, 300);
},
//监听已读消息
onMessageRead(message) {
common_vendor.index.__f__("log", "at pages/index/chat/chat.vue:702", "1已读消息", message);
common_vendor.index.__f__("log", "at pages/index/chat/chat.vue:705", "1已读消息", message);
},
//监听接受消息
onPrivateMessageReceived(message) {
@@ -429,7 +432,7 @@ const _sfc_main = {
this.chatList.push(message);
if (this.onPage) {
components_goEasyTool_tool.messageRead(this.$goeasy, this.userId).then((res) => {
common_vendor.index.__f__("log", "at pages/index/chat/chat.vue:717", "已读对方的消息");
common_vendor.index.__f__("log", "at pages/index/chat/chat.vue:720", "已读对方的消息");
});
}
},
@@ -443,7 +446,7 @@ const _sfc_main = {
this.avatar,
this.nickname
).then((res) => {
common_vendor.index.__f__("log", "at pages/index/chat/chat.vue:731", "发送成功", res);
common_vendor.index.__f__("log", "at pages/index/chat/chat.vue:734", "发送成功", res);
this.ElementPositioning = res.id = components_ChatId.generateId();
res.timestampStatus = this.checkInterval(res.timestamp);
this.chatList.push(res);
@@ -521,7 +524,7 @@ const _sfc_main = {
data: { avatar: this.avatar, nickname: this.nickname }
},
onProgress: function(event) {
common_vendor.index.__f__("log", "at pages/index/chat/chat.vue:811", "file uploading:", event);
common_vendor.index.__f__("log", "at pages/index/chat/chat.vue:814", "file uploading:", event);
}
//获取上传进度
});
@@ -555,7 +558,7 @@ const _sfc_main = {
data: { avatar: this.avatar, nickname: this.nickname }
},
onProgress: function(event) {
common_vendor.index.__f__("log", "at pages/index/chat/chat.vue:841", "上传进度", event);
common_vendor.index.__f__("log", "at pages/index/chat/chat.vue:844", "上传进度", event);
}
//获取上传进度
});

View File

@@ -17,12 +17,14 @@
top: 120rpx;
width: 46rpx;
height: 46rpx;
z-index: 1;
z-index: 2;
}
.title.data-v-f4b42ac4 {
position: fixed;
top: 120rpx;
left: 325rpx;
left:0;
right: 0;
text-align: center;
font-size: 34rpx;
color: #100e0f;
font-weight: bold;

View File

@@ -16,11 +16,7 @@ const _sfc_main = {
chatInfo: {},
currentConversation: null,
inid: null,
chatPartnerinfo: {},
// parentMessage: null,
style: {
backgroundColor: "#ffffff"
}
chatPartnerinfo: {}
};
},
onShareAppMessage(res) {
@@ -194,15 +190,13 @@ const _sfc_main = {
}
};
if (!Array) {
const _easycom_uni_easyinput2 = common_vendor.resolveComponent("uni-easyinput");
const _easycom_uni_popup2 = common_vendor.resolveComponent("uni-popup");
const _component_NewAddedPk = common_vendor.resolveComponent("NewAddedPk");
(_easycom_uni_easyinput2 + _easycom_uni_popup2 + _component_NewAddedPk)();
(_easycom_uni_popup2 + _component_NewAddedPk)();
}
const _easycom_uni_easyinput = () => "../../uni_modules/uni-easyinput/components/uni-easyinput/uni-easyinput.js";
const _easycom_uni_popup = () => "../../uni_modules/uni-popup/components/uni-popup/uni-popup.js";
if (!Math) {
(_easycom_uni_easyinput + _easycom_uni_popup)();
_easycom_uni_popup();
}
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return common_vendor.e({
@@ -215,27 +209,19 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
f: common_vendor.t($options.formatDate($data.item.pkTime)),
g: common_vendor.t($data.item.coin),
h: common_vendor.t($data.item.pkNumber),
i: common_vendor.s($data.style),
j: common_vendor.o(($event) => $data.item.remark = $event),
k: common_vendor.p({
type: "textarea",
placeholder: "备注",
maxlength: "-1",
disabled: "true",
modelValue: $data.item.remark
}),
l: $data.item.senderId !== $data.id
i: common_vendor.t($data.item.remark),
j: $data.item.senderId !== $data.id
}, $data.item.senderId !== $data.id ? {
m: common_vendor.o(($event) => $options.openChat()),
n: common_vendor.o(($event) => $options.open())
k: common_vendor.o(($event) => $options.openChat()),
l: common_vendor.o(($event) => $options.open())
} : {}, {
o: $data.list.length !== 0
m: $data.list.length !== 0
}, $data.list.length !== 0 ? {
p: common_vendor.f($data.list, (item, index, i0) => {
n: common_vendor.f($data.list, (item, index, i0) => {
return {
a: item.anchorIcon,
b: common_vendor.t(item.anchorId),
c: common_vendor.t($options.TimeFormatting(item.pkTime)),
c: common_vendor.t($options.TimeFormatting(item.pkTime * 1e3)),
d: common_vendor.t(item.coin),
e: common_vendor.o(($event) => $options.Select(item.id, index), index),
f: $data.selectedId === item.id ? "#b8ff8c74" : "#ffffff",
@@ -243,20 +229,20 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
};
})
} : {}, {
q: $data.list.length === 0
o: $data.list.length === 0
}, $data.list.length === 0 ? {} : {}, {
r: common_vendor.o(($event) => $options.invite()),
s: common_vendor.o(($event) => $options.close()),
t: common_vendor.sr("popup", "9639f721-1"),
v: common_vendor.p({
p: common_vendor.o(($event) => $options.invite()),
q: common_vendor.o(($event) => $options.close()),
r: common_vendor.sr("popup", "9639f721-0"),
s: common_vendor.p({
type: "center",
["border-radius"]: "10px 10px 0 0"
}),
w: common_vendor.sr("createModule", "9639f721-2"),
x: common_vendor.o(($event) => $options.inviteHint()),
y: common_vendor.o(($event) => $options.closeHint()),
z: common_vendor.sr("popups", "9639f721-3"),
A: common_vendor.p({
t: common_vendor.sr("createModule", "9639f721-1"),
v: common_vendor.o(($event) => $options.inviteHint()),
w: common_vendor.o(($event) => $options.closeHint()),
x: common_vendor.sr("popups", "9639f721-2"),
y: common_vendor.p({
type: "center",
["border-radius"]: "10px 10px 0 0"
})

View File

@@ -2,7 +2,6 @@
"navigationBarTitleText": "PK详情",
"usingComponents": {
"new-added-pk": "../NewAddedPk/NewAddedPk",
"uni-easyinput": "../../uni_modules/uni-easyinput/components/uni-easyinput/uni-easyinput",
"uni-popup": "../../uni_modules/uni-popup/components/uni-popup/uni-popup"
}
}

File diff suppressed because one or more lines are too long

View File

@@ -310,11 +310,33 @@
margin-top: 60rpx;
width: 90%;
}
.Remarkscroll.data-v-9639f721{
width: 100%;
height: 300rpx;
}
.Remarkscroll.data-v-9639f721 ::-webkit-scrollbar {
width: 0;
height: 0;
color: transparent;
display: none;
}
.Remarkscss.data-v-9639f721{
padding: 20rpx;
word-break: break-all; /* 强制换行 */
white-space: pre-line; /* 保留空白符并换行 */
width: 100%;
font-size: 28rpx;
}
.buttonflex.data-v-9639f721{
position: fixed;
left: 0;
right: 0;
bottom: 40rpx;
}
.button.data-v-9639f721 {
display: flex;
justify-content: center;
align-items: center;
margin-top: 500rpx;
}
.accept.data-v-9639f721 {
width: 325.38rpx;

View File

@@ -109,7 +109,7 @@ const _sfc_main = {
if (res.code == 200) {
this.AnchorList = res.data;
} else {
common_vendor.index.__f__("log", "at pages/Mine/minecomponents/recompose/recompose.vue:300", res.msg);
common_vendor.index.__f__("log", "at pages/Mine/minecomponents/recompose/recompose.vue:301", res.msg);
}
});
},
@@ -344,6 +344,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
C: common_vendor.p({
type: "textarea",
placeholder: "备注",
maxlength: 50,
modelValue: $data.remarks
}),
D: common_vendor.o(($event) => $options.Publish()),