121
This commit is contained in:
1
Web/src/pages/user/attr.vue
Normal file
1
Web/src/pages/user/attr.vue
Normal file
@@ -0,0 +1 @@
|
||||
<template></template>
|
||||
3
Web/src/pages/user/badge/index.vue
Normal file
3
Web/src/pages/user/badge/index.vue
Normal file
@@ -0,0 +1,3 @@
|
||||
<template>
|
||||
暂未开放.
|
||||
</template>
|
||||
1
Web/src/pages/user/equ/index.vue
Normal file
1
Web/src/pages/user/equ/index.vue
Normal file
@@ -0,0 +1 @@
|
||||
<template></template>
|
||||
153
Web/src/pages/user/friend/index.vue
Normal file
153
Web/src/pages/user/friend/index.vue
Normal file
@@ -0,0 +1,153 @@
|
||||
<template>
|
||||
<div class="content">
|
||||
【
|
||||
<Acheak @click="ChangeBag('0')" :on-value="type" on-cheak="0">好友</Acheak>|<Acheak @click="ChangeBag('1')"
|
||||
:on-value="type" on-cheak="1">密友</Acheak>|<Acheak @click="ChangeBag('2')" :on-value="type" on-cheak="2">
|
||||
师徒</Acheak>|<Acheak @click="ChangeBag('3')" :on-value="type" on-cheak="3">仇人</Acheak>
|
||||
】
|
||||
</div>
|
||||
<div class="content">
|
||||
在线/所有({{ online }}/{{ total }})<Abutton @click="Refresh">刷新</Abutton>
|
||||
</div>
|
||||
<div class="content" v-if="type == '0' || type == '1'">
|
||||
<div class="item" v-for="(item, index) in data" :key="index">
|
||||
{{ PageExtend.GetPageIndex(currentPage, 10, index + 1) }}.
|
||||
{{ item.isOnline == 1 ? "[在线]" : "[离线]" }}
|
||||
<GameUser :data="item.user" :show-icon="1"></GameUser>
|
||||
<span v-if="type == '0'">
|
||||
({{ item.user.lev }}级,{{ item.cityName }}{{ item.mapName }})
|
||||
<Abutton @click="FriendHandle(item.user.userNo)">[×]</Abutton>
|
||||
</span>
|
||||
<span v-else>
|
||||
(亲密度:{{ item.near }})
|
||||
</span>
|
||||
</div>
|
||||
<span v-if="data.length == 0">
|
||||
{{ type == '0' ? "暂无好友." : "暂无密友." }}
|
||||
</span>
|
||||
</div>
|
||||
<div class="content" v-if="type == '2'">
|
||||
<span v-if="data.length == 0">暂无师徒.</span>
|
||||
</div>
|
||||
<div class="content" v-if="type == '3'">
|
||||
<div class="item" v-for="(item, index) in data" :key="index">
|
||||
{{ PageExtend.GetPageIndex(currentPage, 10, index + 1) }}.
|
||||
{{ item.isOnline == 1 ? "[在线]" : "[离线]" }}
|
||||
<GameUser :data="item.user" :show-icon="1"></GameUser>
|
||||
<span>
|
||||
({{ item.user.lev }}级,{{ item.cityName }}{{ item.mapName }})
|
||||
<Abutton @click="DeleteEnemy(item.user.userNo)">[×]</Abutton>
|
||||
</span>
|
||||
</div>
|
||||
<span v-if="data.length == 0">暂无仇人.</span>
|
||||
</div>
|
||||
<div class="content">
|
||||
<Pagination :currentPage="currentPage" :limit="10" :total="total" @pageChange="handlePageChange" />
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
<div class="content">
|
||||
➢<Abar href="/user/friend/search">添加好友</Abar>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
|
||||
interface friendStorage {
|
||||
type: string
|
||||
page: number
|
||||
}
|
||||
|
||||
definePageMeta({
|
||||
layout: layout.default,
|
||||
middleware: 'page-loading'
|
||||
})
|
||||
|
||||
const currentPage = ref<number>(1);
|
||||
const total = ref<number>(0);
|
||||
const data = ref<Array<any>>([]);
|
||||
const type = ref('0');
|
||||
const online = ref(0);
|
||||
|
||||
|
||||
onMounted(async () => {
|
||||
try {
|
||||
let localData = LocalStorageExtend.Get<friendStorage>("FriendCache");
|
||||
if (localData != null) {
|
||||
type.value = localData.type;
|
||||
currentPage.value = localData.page;
|
||||
}
|
||||
await BindData();
|
||||
}
|
||||
finally {
|
||||
PageLoading.Close();
|
||||
}
|
||||
})
|
||||
|
||||
const BindData = async (): Promise<void> => {
|
||||
let result = await RelationService.GetRelation(Number(type.value), currentPage.value);
|
||||
if (result.code == 0) {
|
||||
data.value = result.data.data;
|
||||
total.value = result.data.total;
|
||||
online.value = result.data.online;
|
||||
console.log(result);
|
||||
//存储请求参数
|
||||
let addLocalData: friendStorage = { type: type.value, page: currentPage.value };
|
||||
LocalStorageExtend.Set("FriendCache", addLocalData);
|
||||
}
|
||||
else {
|
||||
MessageExtend.ShowDialog("提示", result.msg);
|
||||
}
|
||||
};
|
||||
|
||||
/**切换背包 */
|
||||
const ChangeBag = async (_type: string): Promise<void> => {
|
||||
type.value = _type;
|
||||
await BindData();
|
||||
}
|
||||
|
||||
|
||||
/**刷新 */
|
||||
const Refresh = async (): Promise<void> => {
|
||||
MessageExtend.LoadingToast("刷新中...");
|
||||
currentPage.value = 1;
|
||||
await BindData();
|
||||
MessageExtend.LoadingClose();
|
||||
PageExtend.ScrollToTop();
|
||||
}
|
||||
|
||||
/**翻页 */
|
||||
const handlePageChange = async (page: number): Promise<void> => {
|
||||
currentPage.value = page;
|
||||
await BindData();
|
||||
};
|
||||
|
||||
const FriendHandle = async (no: string): Promise<void> => {
|
||||
MessageExtend.ShowConfirmDialogAsyc("好友操作", `您确定要删除好友吗?`, async () => {
|
||||
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;
|
||||
});
|
||||
}
|
||||
|
||||
const DeleteEnemy = async (no: string): Promise<void> => {
|
||||
MessageExtend.ShowConfirmDialogAsyc("关系操作", `您确定要删除仇人吗?`, async () => {
|
||||
let result = await RelationService.DeleteEnemy(no);
|
||||
if (result.code == 0) {
|
||||
await BindData();
|
||||
MessageExtend.Notify(result.msg, "success");
|
||||
}
|
||||
else {
|
||||
MessageExtend.Notify(result.msg, "danger");
|
||||
}
|
||||
|
||||
return true;
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
50
Web/src/pages/user/friend/search.vue
Normal file
50
Web/src/pages/user/friend/search.vue
Normal file
@@ -0,0 +1,50 @@
|
||||
<template>
|
||||
<div class="content">
|
||||
【查找好友】
|
||||
</div>
|
||||
<div class="content">
|
||||
<div class="common">
|
||||
<div class="input">
|
||||
玩家ID:<input name="no" type="number" placeholder="输入玩家ID" maxlength="12" class="ipt" v-model="no" />
|
||||
</div>
|
||||
<div class="input">
|
||||
<input type="button"" class=" btn btn-danger" value="查找玩家" @click="search" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
definePageMeta({
|
||||
layout: layout.default,
|
||||
middleware: middleware.loading
|
||||
})
|
||||
|
||||
const no = ref('');
|
||||
|
||||
const search = async (): Promise<void> => {
|
||||
if (no.value == null || no.value == '') {
|
||||
MessageExtend.ShowToast("玩家ID不能为空!", "default");
|
||||
return;
|
||||
}
|
||||
MessageExtend.LoadingToast("查找中...");
|
||||
let result = await UserService.GetUserBaseInfo(no.value);
|
||||
MessageExtend.LoadingClose();
|
||||
if (result.code == 0) {
|
||||
PageExtend.Redirect("/user/user?no=" + result.data.userNo);
|
||||
}
|
||||
else {
|
||||
MessageExtend.ShowDialog("查找玩家", result.msg);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
onMounted(async () => {
|
||||
try {
|
||||
|
||||
}
|
||||
finally {
|
||||
PageLoading.Close();
|
||||
}
|
||||
})
|
||||
</script>
|
||||
1
Web/src/pages/user/gift/give.vue
Normal file
1
Web/src/pages/user/gift/give.vue
Normal file
@@ -0,0 +1 @@
|
||||
<template></template>
|
||||
3
Web/src/pages/user/gift/index.vue
Normal file
3
Web/src/pages/user/gift/index.vue
Normal file
@@ -0,0 +1,3 @@
|
||||
<template>
|
||||
暂未开放.
|
||||
</template>
|
||||
1
Web/src/pages/user/home/index.vue
Normal file
1
Web/src/pages/user/home/index.vue
Normal file
@@ -0,0 +1 @@
|
||||
<template></template>
|
||||
1
Web/src/pages/user/home/study/index.vue
Normal file
1
Web/src/pages/user/home/study/index.vue
Normal file
@@ -0,0 +1 @@
|
||||
<template></template>
|
||||
1
Web/src/pages/user/honnor/index.vue
Normal file
1
Web/src/pages/user/honnor/index.vue
Normal file
@@ -0,0 +1 @@
|
||||
<template>成就暂未开放.</template>
|
||||
@@ -1,17 +1,17 @@
|
||||
<template>
|
||||
<div class="content">
|
||||
<Abar href="">更换称号</Abar><br>
|
||||
ID:{{ userData.userNo }} [<Abar href="">升靓号</Abar>]<br>
|
||||
昵称:<Abar href="">{{ userData.nick }}</Abar><br>
|
||||
性别:<Abar href="">{{ userData.sex }}</Abar><br>
|
||||
<Abar>特权</Abar>:<br>
|
||||
徽章:<Abar>显示</Abar><br>
|
||||
社交:<Abar>未收到礼物</Abar><br>
|
||||
<div class="content">
|
||||
<Abar href="/user/maxname">更换称号</Abar><br>
|
||||
ID:{{ userData.userNo }} [<Abar href="/privilege/liang">升靓号</Abar>]<br>
|
||||
昵称:<Abar href="/user/nick">{{ userData.nick }}</Abar><br>
|
||||
性别:<Abar href="/user/sex">{{ userData.sex }}</Abar><br>
|
||||
<Abar href="/privilege/">特权</Abar>:<br>
|
||||
徽章:<Abar href="/user/badge/">显示</Abar><br>
|
||||
社交:<Abar href="/user/gift">未收到礼物</Abar><br>
|
||||
婚姻:单身<br>
|
||||
个性签名:{{ userData.sign }}.<Abar>修改</Abar><br>
|
||||
个性签名:{{ userData.sign }}<Abar href="/user/sign">修改</Abar><br>
|
||||
宠物:暂无<br>
|
||||
坐骑:无<br>
|
||||
成就:<Abar>展示成就</Abar><br>
|
||||
成就:<Abar href="/user/honnor">展示成就</Abar><br>
|
||||
等级:{{ attrData.lev }}<br>
|
||||
综合战力:{{attrData.score}}<br>
|
||||
经验:{{ expData.exp }}/{{ expData.upExp }}<br>
|
||||
@@ -31,19 +31,19 @@
|
||||
</div>
|
||||
<div class="content">
|
||||
<div class="item">
|
||||
<Abar>装备</Abar>.
|
||||
<Abar>技能</Abar>.
|
||||
<Abar>特性</Abar>
|
||||
<Abar href="/user/equ">装备</Abar>.
|
||||
<Abar href="/user/skill">技能</Abar>.
|
||||
<Abar href="/user/attr">特性</Abar>
|
||||
</div>
|
||||
<div class="item">
|
||||
<Abar>帮派</Abar>.
|
||||
<Abar href="/group">帮派</Abar>.
|
||||
<Abar href="/pet">宠物</Abar>.
|
||||
<Abar>船队</Abar>
|
||||
<Abar href="/user/ship">船队</Abar>
|
||||
</div>
|
||||
<div class="item">
|
||||
<Abar>山寨</Abar>.
|
||||
<Abar>房产</Abar>.
|
||||
<Abar>设置</Abar>
|
||||
<Abar href="/user/home/study">山寨</Abar>.
|
||||
<Abar href="/user/home">房产</Abar>.
|
||||
<Abar href="/user/setting">设置</Abar>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
1
Web/src/pages/user/interact/dou.vue
Normal file
1
Web/src/pages/user/interact/dou.vue
Normal file
@@ -0,0 +1 @@
|
||||
<template></template>
|
||||
1
Web/src/pages/user/master/add.vue
Normal file
1
Web/src/pages/user/master/add.vue
Normal file
@@ -0,0 +1 @@
|
||||
<template></template>
|
||||
1
Web/src/pages/user/maxname/index.vue
Normal file
1
Web/src/pages/user/maxname/index.vue
Normal file
@@ -0,0 +1 @@
|
||||
<template>暂未开放</template>
|
||||
63
Web/src/pages/user/nick.vue
Normal file
63
Web/src/pages/user/nick.vue
Normal file
@@ -0,0 +1,63 @@
|
||||
<template>
|
||||
<div class="module-title">
|
||||
【更改昵称】
|
||||
</div>
|
||||
<div class="module-content">
|
||||
<div class="inArea">
|
||||
<input name="nick" type="text" class="ipt" maxlength="12" v-model="nick" />
|
||||
</div>
|
||||
<div class="inArea">
|
||||
<input type="button" class="btn btn-danger" value="更改昵称" @click="ChangeNick" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="module-content" style="font-size:15px;font-weight:bold">
|
||||
*更改昵称需要改名卡 1 张。<br>
|
||||
*昵称修改需要符合《<Abar href="/customer/rule">游戏用户守则规范</Abar>》。
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
definePageMeta({
|
||||
layout: layout.default,
|
||||
middleware: middleware.loading
|
||||
})
|
||||
|
||||
const nick = ref('');
|
||||
|
||||
|
||||
onMounted(async () => {
|
||||
try {
|
||||
await BindData();
|
||||
}
|
||||
finally {
|
||||
PageLoading.Close();
|
||||
}
|
||||
})
|
||||
|
||||
const BindData = async () => {
|
||||
let result = await UserService.GetUserBaseInfo("");
|
||||
if (result.code == 0) {
|
||||
nick.value = result.data.nick;
|
||||
}
|
||||
else {
|
||||
MessageExtend.ShowDialog("更改昵称", result.msg);
|
||||
}
|
||||
}
|
||||
|
||||
const ChangeNick = async (): Promise<void> => {
|
||||
if (nick.value == null || nick.value == '') {
|
||||
MessageExtend.ShowToast("昵称不能为空!", "default");
|
||||
return;
|
||||
}
|
||||
MessageExtend.LoadingToast("更改中...");
|
||||
let result = await UserService.UpdateUserNick(nick.value);
|
||||
MessageExtend.LoadingClose();
|
||||
if (result.code == 0) {
|
||||
MessageExtend.Notify("修改成功!","success");
|
||||
}
|
||||
else {
|
||||
MessageExtend.ShowDialog("更改昵称", result.msg);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
1
Web/src/pages/user/setting/index.vue
Normal file
1
Web/src/pages/user/setting/index.vue
Normal file
@@ -0,0 +1 @@
|
||||
<template></template>
|
||||
66
Web/src/pages/user/sex.vue
Normal file
66
Web/src/pages/user/sex.vue
Normal file
@@ -0,0 +1,66 @@
|
||||
<template>
|
||||
<div class="module-title">
|
||||
【更改性别】
|
||||
</div>
|
||||
<div class="module-content">
|
||||
<div class="inArea">
|
||||
请选择性别:
|
||||
<select class="ipt" id="sex" name="sex" v-model="sex">
|
||||
<option value="男">男</option>
|
||||
<option value="女">女</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="inArea">
|
||||
<input type="button" class="btn btn-danger" value="更改性别" @click="ChangeSex" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="module-content" style="font-size:15px;font-weight:bold">
|
||||
*更改昵称需要变性卡 1 张。
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
definePageMeta({
|
||||
layout: layout.default,
|
||||
middleware: middleware.loading
|
||||
})
|
||||
|
||||
const sex = ref('');
|
||||
|
||||
|
||||
onMounted(async () => {
|
||||
try {
|
||||
await BindData();
|
||||
}
|
||||
finally {
|
||||
PageLoading.Close();
|
||||
}
|
||||
})
|
||||
|
||||
const BindData = async () => {
|
||||
let result = await UserService.GetUserBaseInfo("");
|
||||
if (result.code == 0) {
|
||||
sex.value = result.data.sex;
|
||||
}
|
||||
else {
|
||||
MessageExtend.ShowDialog("更改性别", result.msg);
|
||||
}
|
||||
}
|
||||
|
||||
const ChangeSex = async (): Promise<void> => {
|
||||
if (sex.value == null || sex.value == '') {
|
||||
MessageExtend.ShowToast("性别不能为空!", "default");
|
||||
return;
|
||||
}
|
||||
MessageExtend.LoadingToast("更改中...");
|
||||
let result = await UserService.UpdateUserSex(sex.value);
|
||||
MessageExtend.LoadingClose();
|
||||
if (result.code == 0) {
|
||||
MessageExtend.Notify("修改成功!", "success");
|
||||
}
|
||||
else {
|
||||
MessageExtend.ShowDialog("更改性别", result.msg);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
1
Web/src/pages/user/ship/index.vue
Normal file
1
Web/src/pages/user/ship/index.vue
Normal file
@@ -0,0 +1 @@
|
||||
<template></template>
|
||||
62
Web/src/pages/user/sign.vue
Normal file
62
Web/src/pages/user/sign.vue
Normal file
@@ -0,0 +1,62 @@
|
||||
<template>
|
||||
<div class="module-title">
|
||||
【修改签名】
|
||||
</div>
|
||||
<div class="module-content">
|
||||
<div class="inArea">
|
||||
<textarea name="sign" rows="2" cols="20" maxlength="80" class="ipt" v-model="sign"></textarea>
|
||||
</div>
|
||||
<div class="inArea">
|
||||
<input type="button" class="btn btn-danger" value="保存签名" @click="ChangeSign" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="module-content" style="font-size:15px;font-weight:bold">
|
||||
*签名要求在80个字符以内。
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
definePageMeta({
|
||||
layout: layout.default,
|
||||
middleware: middleware.loading
|
||||
})
|
||||
|
||||
const sign = ref('');
|
||||
|
||||
|
||||
onMounted(async () => {
|
||||
try {
|
||||
await BindData();
|
||||
}
|
||||
finally {
|
||||
PageLoading.Close();
|
||||
}
|
||||
})
|
||||
|
||||
const BindData = async () => {
|
||||
let result = await UserService.GetUserBaseInfo("");
|
||||
if (result.code == 0) {
|
||||
sign.value = result.data.sign;
|
||||
}
|
||||
else {
|
||||
MessageExtend.ShowDialog("修改签名", result.msg);
|
||||
}
|
||||
}
|
||||
|
||||
const ChangeSign = async (): Promise<void> => {
|
||||
if (sign.value == null || sign.value == '') {
|
||||
MessageExtend.ShowToast("签名不能为空!", "default");
|
||||
return;
|
||||
}
|
||||
MessageExtend.LoadingToast("保存中...");
|
||||
let result = await UserService.UpdateUserSign(sign.value);
|
||||
MessageExtend.LoadingClose();
|
||||
if (result.code == 0) {
|
||||
MessageExtend.Notify("保存成功!","success");
|
||||
}
|
||||
else {
|
||||
MessageExtend.ShowDialog("修改签名", result.msg);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
1
Web/src/pages/user/skill/index.vue
Normal file
1
Web/src/pages/user/skill/index.vue
Normal file
@@ -0,0 +1 @@
|
||||
<template></template>
|
||||
1
Web/src/pages/user/team/index.vue
Normal file
1
Web/src/pages/user/team/index.vue
Normal file
@@ -0,0 +1 @@
|
||||
<template></template>
|
||||
@@ -1,8 +1,11 @@
|
||||
<template>
|
||||
<div class="content">
|
||||
<Abar :href='"/message/read?id=" + userData.userNo'>私聊</Abar>. <Abar>送礼物</Abar>. <Abar>逗一下</Abar><br />
|
||||
<Abar>拜师</Abar>. <Abar>山寨</Abar>. <Abar>送道具</Abar><br>
|
||||
<Abutton @click="FriendHandle">{{ isFriend ? "删除好友" : "加好友" }}</Abutton>. <Abar>加仇人</Abar>
|
||||
<Abar :href='"/message/read?id=" + userData.userNo'>私聊</Abar>. <Abar :href='"/user/gift/give?no="+userData.userNo'>送礼物</Abar>. <Abar href="/user/interact/dou">逗一下</Abar><br />
|
||||
<Abar href="/user/master/add">拜师</Abar>. <Abar :href='"/trade/user?no="+userData.userNo'>交易</Abar>. <Abar href="/bag/give">送道具</Abar><br>
|
||||
<Abutton @click="FriendHandle">{{ isFriend ? "删除好友" : "加好友" }}</Abutton>
|
||||
<span v-if="isEnemy == false">
|
||||
.<Abutton @click="AddEnemy">加仇人</Abutton>
|
||||
</span>
|
||||
</div>
|
||||
<div class="content"></div>
|
||||
<div class="content">
|
||||
@@ -52,6 +55,7 @@ const accData = ref<any>({});
|
||||
const online = ref(0);
|
||||
const onMap = ref('');
|
||||
const isFriend = ref(false);
|
||||
const isEnemy = ref(false);
|
||||
|
||||
onMounted(async () => {
|
||||
try {
|
||||
@@ -74,6 +78,7 @@ const BindData = async (): Promise<void> => {
|
||||
online.value = result.data.isOnline;
|
||||
onMap.value = result.data.onMapName;
|
||||
isFriend.value = result.data.isFriend;
|
||||
isEnemy.value = result.data.isEnemy;
|
||||
console.log(result);
|
||||
}
|
||||
else if (result.code == 101) {
|
||||
@@ -105,4 +110,20 @@ const FriendHandle = async (): Promise<void> => {
|
||||
});
|
||||
}
|
||||
|
||||
const AddEnemy = async (): Promise<void> => {
|
||||
MessageExtend.ShowConfirmDialogAsyc("关系操作", `您确定要添加Ta为仇人吗?(添加消耗50金元)`, async () => {
|
||||
let no = PageExtend.QueryString("no");
|
||||
let result = await RelationService.AddEnemy(no);
|
||||
if (result.code == 0) {
|
||||
await BindData();
|
||||
MessageExtend.Notify(result.msg, "success");
|
||||
}
|
||||
else {
|
||||
MessageExtend.Notify(result.msg, "danger");
|
||||
}
|
||||
|
||||
return true;
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
Reference in New Issue
Block a user