+
{{ PageExtend.GetPageIndex(currentPage, 10, index + 1) }}.
@@ -17,6 +23,42 @@
暂无消息.
+
+
+
+ {{ PageExtend.GetPageIndex(currentPage, 10, index + 1) }}.
+ {{ item.name }}
+ (未处理)
+
+
+ ⏰{{ TimeExtend.Format(item.addTime, "yyyy-MM-dd HH:mm:ss") }}
+
+
+
+
+ ◈{{
+ EventTips(item.btns, item.state) }}
+
+
+
+
暂无通知.
+
+
+
+ {{ PageExtend.GetPageIndex(currentPage, 10, index + 1) }}.
+
+ {{ item.name }}
+
(未读)
+
(未领取)
+
+
暂无邮件.
+
+
\ No newline at end of file
diff --git a/Web/src/pages/message/mail.vue b/Web/src/pages/message/mail.vue
new file mode 100644
index 0000000..58a25db
--- /dev/null
+++ b/Web/src/pages/message/mail.vue
@@ -0,0 +1,77 @@
+
+
+
+ {{ data.name }}
+
+
+
+
+ {{ data.sign }}
+
+
+
+ ---◈附件信息◈---
+
+
+
+
+ *附件已领取!
+
+
+
+ 发件人:海精灵
+ 发件时间:[{{ TimeExtend.Format(data.addTime) }}]
+ 有效时间:[{{ TimeExtend.Format(data.endTime) }}]
+
+
+
+
\ No newline at end of file
diff --git a/Web/src/pages/message/read.vue b/Web/src/pages/message/read.vue
index 7d38b4c..ea9396a 100644
--- a/Web/src/pages/message/read.vue
+++ b/Web/src/pages/message/read.vue
@@ -68,8 +68,7 @@ const BindData = async (): Promise
=> {
if (result.code == 0) {
data.value = result.data.data;
user.value = result.data.user;
- logs.value = result.data.logs;
- console.log(result);
+ logs.value = result.data.logs;
}
else {
MessageExtend.ShowDialogEvent("提示", result.msg, () => {
diff --git a/Web/src/pages/user/user.vue b/Web/src/pages/user/user.vue
index 08d8a51..57c62f4 100644
--- a/Web/src/pages/user/user.vue
+++ b/Web/src/pages/user/user.vue
@@ -2,7 +2,7 @@
私聊.
送礼物.
逗一下
拜师.
山寨.
送道具
-
加好友.
加仇人
+
{{ isFriend ? "删除好友" : "加好友" }}.
加仇人
@@ -51,6 +51,7 @@ const attrData = ref
({});
const accData = ref({});
const online = ref(0);
const onMap = ref('');
+const isFriend = ref(false);
onMounted(async () => {
try {
@@ -72,14 +73,15 @@ const BindData = async (): Promise => {
accData.value = result.data.acc;
online.value = result.data.isOnline;
onMap.value = result.data.onMapName;
+ isFriend.value = result.data.isFriend;
console.log(result);
}
else if (result.code == 101) {
- return PageExtend.Redirect("/user");
+ return PageExtend.RedirectTo("/user");
}
else if (result.code == 102) {
MessageExtend.ShowDialogEvent("提示", "玩家不存在!", () => {
- return PageExtend.Redirect("/user");
+ return PageExtend.RedirectTo("/user");
}, "确认");
}
else {
@@ -87,4 +89,20 @@ const BindData = async (): Promise => {
}
};
+const FriendHandle = async (): Promise => {
+ MessageExtend.ShowConfirmDialogAsyc("好友操作", `您确定要${isFriend.value ? "删除" : "添加"}好友吗?`, async () => {
+ let no = PageExtend.QueryString("no");
+ let result = await RelationService.FriendHandle(no);
+ if (result.code == 0) {
+ await BindData();
+ MessageExtend.Notify(result.msg, "success");
+ }
+ else {
+ MessageExtend.Notify(result.msg, "danger");
+ }
+
+ return true;
+ });
+}
+
\ No newline at end of file
diff --git a/Web/src/services/Index/MessageService.ts b/Web/src/services/Index/MessageService.ts
index 7f0ab7d..2a3b63b 100644
--- a/Web/src/services/Index/MessageService.ts
+++ b/Web/src/services/Index/MessageService.ts
@@ -40,4 +40,28 @@ export class MessageService {
static async DeleteMsg(no: number) {
return await ApiService.Request("get", "/Message/DeleteMsg", { no });
}
+
+ /**
+ * 获取邮件详情
+ * GET /Message/GetMailInfo
+ */
+ static async GetMailInfo(no: string) {
+ return await ApiService.Request("get", "/Message/GetMailInfo", { no });
+ }
+
+ /**
+ * 领取附件
+ * GET /Message/GetAward
+ */
+ static async GetAward(no: string) {
+ return await ApiService.Request("get", "/Message/GetAward", { no });
+ }
+
+ /**
+ * 处理事件消息
+ * GET /Message/EventHandle
+ */
+ static async EventHandle(eventId: string, state: number) {
+ return await ApiService.Request("get", "/Message/EventHandle", { eventId, state });
+ }
}
\ No newline at end of file
diff --git a/Web/src/services/user/RelationService.ts b/Web/src/services/user/RelationService.ts
new file mode 100644
index 0000000..060bb4b
--- /dev/null
+++ b/Web/src/services/user/RelationService.ts
@@ -0,0 +1,17 @@
+export class RelationService {
+ /**
+ * 关系列表数据
+ * GET /User/Relation/GetRelation
+ */
+ static async GetRelation(type: number, page: number) {
+ return await ApiService.Request("get", "/User/Relation/GetRelation", { type, page });
+ }
+
+ /**
+ * FriendHandle
+ * GET /User/Relation/FriendHandle
+ */
+ static async FriendHandle(no: string) {
+ return await ApiService.Request("get", "/User/Relation/FriendHandle", { no });
+ }
+}
\ No newline at end of file
diff --git a/Web/src/services/user/UserService.ts b/Web/src/services/user/UserService.ts
index 1966732..15c4d73 100644
--- a/Web/src/services/user/UserService.ts
+++ b/Web/src/services/user/UserService.ts
@@ -7,6 +7,14 @@ export class UserService {
return await ApiService.Request("get", "/User/User/GetUserInfo");
}
+ /**
+ * 获取基础资料信息
+ * GET /User/User/GetUserBaseInfo
+ */
+ static async GetUserBaseInfo(no: string) {
+ return await ApiService.Request("get", "/User/User/GetUserBaseInfo", { no });
+ }
+
/**
* 获取用户资料
* GET /User/User/GetHomeInfo
diff --git a/Web/src/utility/GameTool.ts b/Web/src/utility/GameTool.ts
index 29e8d15..314ce84 100644
--- a/Web/src/utility/GameTool.ts
+++ b/Web/src/utility/GameTool.ts
@@ -68,7 +68,7 @@ export class GameTool {
result = '金贝';
break;
case 'copper':
- return this.FormatCopper(num);
+ return this.FormatCopper(num);
break;
case 'teach':
result = '师德';
@@ -80,4 +80,35 @@ export class GameTool {
return `${num}${result}`;
}
+
+ /**物品连接处理 */
+ public static GetPropHtml(data: Array, count: number, type: number): string {
+ let result = ''
+ data.forEach(element => {
+ let num = Number(element.count) * count;
+ if (type == 0) {
+ result += `${element.name}+${num}`
+ }
+ else {
+ result += `▸${this.GetPropUrl(element.code, element.name, element.parameter)}+${num}
`;
+ }
+ });
+ result = StringExtend.trimEnd(result, ',');
+ return result;
+ }
+ public static GetPropUrl(code: string, name: string, par: string): string {
+ let result = name;
+ switch (code) {
+ case "Equ":
+ result = `${name}`;
+ break;
+ case "Goods":
+ result = `${name}`;
+ break;
+ }
+
+ return result;
+ }
+
+
}
\ No newline at end of file