121
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
// https://nuxt.com/docs/api/configuration/nuxt-config
|
||||
export default defineNuxtConfig({
|
||||
ssr: false,
|
||||
srcDir: 'src/',
|
||||
components: {
|
||||
dirs: [
|
||||
@@ -23,7 +24,7 @@ export default defineNuxtConfig({
|
||||
|
||||
// 自动导入配置 - 使用完整路径
|
||||
imports: {
|
||||
dirs: ['stores', 'composables', 'extends','utility', 'services/**', 'model/**'],
|
||||
dirs: ['stores', 'composables', 'extends', 'utility', 'services/**', 'model/**'],
|
||||
},
|
||||
|
||||
pinia: {
|
||||
@@ -55,10 +56,10 @@ export default defineNuxtConfig({
|
||||
type: 'image/x-icon'
|
||||
}
|
||||
]
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
css: ['~/assets/css/style.css','~/assets/css/home.css'],
|
||||
css: ['~/assets/css/style.css', '~/assets/css/home.css'],
|
||||
|
||||
compatibilityDate: '2024-04-03',
|
||||
})
|
||||
|
||||
13
Web/src/components/Base/Aimage.vue
Normal file
13
Web/src/components/Base/Aimage.vue
Normal file
@@ -0,0 +1,13 @@
|
||||
<template>
|
||||
<img :src="BaseConfig.BaseMediaUrl + url" :class="_class" :alt="_alt">
|
||||
</template>
|
||||
<script setup>
|
||||
import { BaseConfig } from "@/config/BaseConfig";
|
||||
// 1. 定义接收父组件传来的参数 props
|
||||
const props = defineProps({
|
||||
// 字段名、类型、默认值
|
||||
url: String,
|
||||
_class: String,
|
||||
_alt:String
|
||||
})
|
||||
</script>
|
||||
@@ -9,12 +9,15 @@
|
||||
<span v-if="item.chat.code != 'System'">
|
||||
<GameUser :data="item.user" :show-icon="1"></GameUser>:
|
||||
</span>
|
||||
<span v-html="item.chat.sign" @click="HtmlEvent">
|
||||
<span v-html="item.chat.sign" @click="HtmlEvent">
|
||||
</span>
|
||||
<span v-if="showTime == 1">
|
||||
({{ TimeExtend.StrToFormat(item.chat.addTime, "dd日HH:mm") }})
|
||||
</span>
|
||||
</span>
|
||||
<span v-if="CheckRole(item.chat.code)">
|
||||
[<Abutton @click="DelChat(item.chat.chatId)">删除</Abutton>]
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -24,7 +27,8 @@ const props = defineProps({
|
||||
data: Array<any>,
|
||||
showTime: Number,
|
||||
page: Number,
|
||||
limit: Number
|
||||
limit: Number,
|
||||
role: Number
|
||||
})
|
||||
|
||||
const GetChatType = (type: string) => {
|
||||
@@ -52,4 +56,22 @@ const GetChatType = (type: string) => {
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
const CheckRole = (type: string): boolean => {
|
||||
if ((type == 'Public' || type == 'Region') && (props.role ?? 0) > 0) {
|
||||
return true;
|
||||
}
|
||||
else if (type == 'Dress' && (props.role ?? 0) > 1) {
|
||||
return true;
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// 1. 声明要触发的事件
|
||||
const emit = defineEmits(['delChat'])
|
||||
|
||||
const DelChat = async (chatId: string) => {
|
||||
emit('delChat', { chatId: chatId });
|
||||
}
|
||||
|
||||
</script>
|
||||
@@ -1,13 +1,17 @@
|
||||
<template>
|
||||
<span v-if="data.userNo == '0'">海精灵</span>
|
||||
<span v-else>
|
||||
<Abar :href='"/user/user?no=" + data.userNo'>{{ data.nick }}</Abar>
|
||||
<Abar :href='"/user/user?no=" + data.userNo'>
|
||||
{{ showArea==1?"["+data.area+"区]":"" }}
|
||||
{{ data.nick }}
|
||||
</Abar>
|
||||
</span>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
const props = defineProps({
|
||||
// 字段名、类型、默认值
|
||||
data: null,
|
||||
showIcon: Number
|
||||
showIcon: Number,
|
||||
showArea:Number
|
||||
})
|
||||
</script>
|
||||
@@ -5,9 +5,9 @@
|
||||
<Abar href="/chat">聊天</Abar>
|
||||
</div>
|
||||
<div class="common">
|
||||
<Abar href="/friend">好友</Abar>.
|
||||
<Abar href="/user/friend">好友</Abar>.
|
||||
<Abar href="/trade">交易</Abar>.
|
||||
<Abar href="/team">队伍</Abar>
|
||||
<Abar href="/user/team">队伍</Abar>
|
||||
</div>
|
||||
<div class="common">
|
||||
<Abar href="/mall">商城</Abar>.
|
||||
|
||||
@@ -2,5 +2,7 @@
|
||||
统一配置中心
|
||||
*/
|
||||
export class BaseConfig {
|
||||
public static BaseUrl:string="https://localhost:7198";
|
||||
//public static BaseUrl:string="https://localhost:7198";
|
||||
public static BaseUrl:string="http://192.168.0.110:5032";
|
||||
public static BaseMediaUrl:string="https://localhost:7198";
|
||||
}
|
||||
@@ -9,28 +9,34 @@
|
||||
<Acheak @click="ChangeChat('2')" :on-value="type" on-cheak="2">帮派</Acheak>.
|
||||
<Acheak @click="ChangeChat('3')" :on-value="type" on-cheak="3">全区</Acheak>.
|
||||
<Acheak @click="ChangeChat('4')" :on-value="type" on-cheak="4">全服</Acheak>.
|
||||
<Acheak @click="ChangeChat('5')" :on-value="type" on-cheak="5">系统</Acheak>
|
||||
<Acheak @click="ChangeChat('5')" :on-value="type" on-cheak="5">系统</Acheak>
|
||||
</div>
|
||||
<div class="content">
|
||||
<GameChat :data="data" :show-time="1"></GameChat>
|
||||
<GameChat :data="data" :show-time="1" :role="chatRole" @delChat="DelChat"></GameChat>
|
||||
<span v-if="data.length == 0">暂无发言.</span>
|
||||
</div>
|
||||
<div class="content">
|
||||
<Pagination :currentPage="currentPage" :limit="10" :total="total" @pageChange="handlePageChange" />
|
||||
</div>
|
||||
<div class="content" v-if="type != '5'">
|
||||
<span>请输入聊天信息:</span><br>
|
||||
<div v-if="goodsName != ''">
|
||||
{{ goodsName }}:{{ goodsCount }} <span style="font-size: 18px;">(每次发言需要1个哦)</span>
|
||||
<div class="common" v-if="chatRole < 0">
|
||||
*发言权限已封禁!
|
||||
</div>
|
||||
<div>
|
||||
<textarea name="sign" id="sign" rows="2" cols="20" maxlength="80" class="ipt emojiTxt"
|
||||
v-model="sign"></textarea>
|
||||
</div>
|
||||
<div>
|
||||
<input type="submit" value="发言" class="btn btn-danger" @click="SendChat" />.
|
||||
<Abutton @click="Refresh">刷新</Abutton>
|
||||
<div class="common" v-else>
|
||||
<span>请输入聊天信息:</span><br>
|
||||
<div v-if="goodsName != ''">
|
||||
{{ goodsName }}:{{ goodsCount }} <span style="font-size: 18px;">(每次发言需要1个哦)</span>
|
||||
</div>
|
||||
<div>
|
||||
<textarea name="sign" id="sign" rows="2" cols="20" maxlength="80" class="ipt emojiTxt"
|
||||
v-model="sign"></textarea>
|
||||
</div>
|
||||
<div>
|
||||
<input type="submit" value="发言" class="btn btn-danger" @click="SendChat" />.
|
||||
<Abutton @click="Refresh">刷新</Abutton>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="content">
|
||||
<Abar href="/customer/chat">*公聊频道发言规范</Abar><br />
|
||||
@@ -51,6 +57,7 @@ const data = ref<Array<any>>([]);
|
||||
const goodsCount = ref(0);
|
||||
const goodsName = ref('');
|
||||
const sign = ref('');
|
||||
const chatRole = ref(0);
|
||||
|
||||
onMounted(async () => {
|
||||
try {
|
||||
@@ -68,6 +75,7 @@ const BindData = async (): Promise<void> => {
|
||||
goodsCount.value = result.data.sendGoodsCount
|
||||
goodsName.value = result.data.sendGoodsName
|
||||
total.value = result.data.total;
|
||||
chatRole.value = result.data.chatRole;
|
||||
}
|
||||
else {
|
||||
MessageExtend.ShowDialog("提示", result.msg);
|
||||
@@ -121,4 +129,22 @@ const ChangeChat = async (typeid: string): Promise<void> => {
|
||||
await BindData();
|
||||
};
|
||||
|
||||
//删除记录
|
||||
const DelChat = async (data: any) => {
|
||||
MessageExtend.ShowConfirmDialogAsyc("频道管理", `您确定要删除该发言吗?`, async () => {
|
||||
MessageExtend.LoadingToast("删除中...");
|
||||
let result = await ChatService.DeleteChat(data.chatId);
|
||||
MessageExtend.LoadingClose();
|
||||
if (result.code == 0) {
|
||||
await BindData();
|
||||
MessageExtend.Notify("删除成功!", "success");
|
||||
}
|
||||
else {
|
||||
MessageExtend.ShowDialog("删除操作", result.msg);
|
||||
}
|
||||
|
||||
return true;
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
3
Web/src/pages/group/index.vue
Normal file
3
Web/src/pages/group/index.vue
Normal file
@@ -0,0 +1,3 @@
|
||||
<template>
|
||||
暂未开放
|
||||
</template>
|
||||
@@ -14,6 +14,9 @@
|
||||
<option value="1">男</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="input" v-if="isNeedCode">
|
||||
激活码:<input name="nick" placeholder="联系客服获取激活码" maxlength="50" class="ipt" type="text" v-model="code" />
|
||||
</div>
|
||||
<div class="input">
|
||||
<input type="button"" class=" btn btn-danger" value="注册角色" @click="SubRegInfo" />.
|
||||
<Abar href="/">返回首页</Abar>
|
||||
@@ -29,6 +32,9 @@ definePageMeta({
|
||||
|
||||
const nick = ref('');
|
||||
const sex = ref(0);
|
||||
const code = ref('');
|
||||
const isNeedCode = ref(false);
|
||||
const data = ref<any>({});
|
||||
|
||||
const SubRegInfo = async (): Promise<void> => {
|
||||
if (nick.value == null || nick.value == '') {
|
||||
@@ -36,9 +42,9 @@ const SubRegInfo = async (): Promise<void> => {
|
||||
return;
|
||||
}
|
||||
MessageExtend.LoadingToast("注册中...");
|
||||
let result = await LoginService.RegisterInfo(nick.value, sex.value);
|
||||
let result = await LoginService.RegisterInfo(nick.value, sex.value, code.value);
|
||||
MessageExtend.LoadingClose();
|
||||
if (result.code == 0) {
|
||||
if (result.code == 0) {
|
||||
PageExtend.Redirect("/map");
|
||||
}
|
||||
else {
|
||||
@@ -49,10 +55,24 @@ const SubRegInfo = async (): Promise<void> => {
|
||||
|
||||
onMounted(async () => {
|
||||
try {
|
||||
|
||||
await BindData();
|
||||
}
|
||||
finally {
|
||||
PageLoading.Close();
|
||||
}
|
||||
})
|
||||
|
||||
const BindData = async () => {
|
||||
let result = await PubService.GetOnAreaInfo();
|
||||
if (result.code == 0) {
|
||||
data.value = result.data;
|
||||
isNeedCode.value = result.data.isNeedCode == 1;
|
||||
}
|
||||
else {
|
||||
MessageExtend.ShowDialogEvent("提示", result.msg, () => {
|
||||
PageExtend.RedirectTo('/');
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
@@ -20,7 +20,7 @@
|
||||
</div>
|
||||
<div class="content">
|
||||
<div class="item" v-for="item in npcData">
|
||||
<Abar :href='"/npc?npc=" + item.npcId'>{{ item.npcName }}{{ item.tips }}</Abar>
|
||||
<Abar :href='"/map/npc?npc=" + item.npcId'>{{ item.npcName }}{{ item.tips }}</Abar>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
</div>
|
||||
<div class="content">
|
||||
<div class="item" v-for="(item, index) in data" :key="index">
|
||||
{{ index + 1 }}.<GameUser :data="item" :show-icon="0"></GameUser>
|
||||
{{ index + 1 }}.<GameUser :data="item" :show-icon="0" :show-area="mapInfo.lookArea == 0 ? 1 : 0"></GameUser>
|
||||
</div>
|
||||
<span v-if="data.length == 0">暂无玩家.</span>
|
||||
</div>
|
||||
@@ -22,6 +22,7 @@ definePageMeta({
|
||||
const currentPage = ref<number>(1);
|
||||
const total = ref<number>(0);
|
||||
const data = ref<Array<any>>([]);
|
||||
const mapInfo = ref<any>({});
|
||||
|
||||
onMounted(async () => {
|
||||
try {
|
||||
@@ -37,6 +38,7 @@ const BindData = async (): Promise<void> => {
|
||||
if (result.code == 0) {
|
||||
data.value = result.data.data;
|
||||
total.value = result.data.total;
|
||||
mapInfo.value = result.data.map;
|
||||
}
|
||||
else {
|
||||
MessageExtend.ShowDialog("提示", result.msg);
|
||||
|
||||
1
Web/src/pages/privilege/index.vue
Normal file
1
Web/src/pages/privilege/index.vue
Normal file
@@ -0,0 +1 @@
|
||||
<template>暂未开放</template>
|
||||
1
Web/src/pages/privilege/liang/index.vue
Normal file
1
Web/src/pages/privilege/liang/index.vue
Normal file
@@ -0,0 +1 @@
|
||||
<template>未开放.</template>
|
||||
1
Web/src/pages/trade/user.vue
Normal file
1
Web/src/pages/trade/user.vue
Normal file
@@ -0,0 +1 @@
|
||||
<template></template>
|
||||
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>
|
||||
@@ -30,6 +30,15 @@
|
||||
<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">
|
||||
@@ -37,7 +46,7 @@
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
<div class="content">
|
||||
➢<Abar href="/friend/search">添加好友</Abar>
|
||||
➢<Abar href="/user/friend/search">添加好友</Abar>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
@@ -111,8 +120,8 @@ const handlePageChange = async (page: number): Promise<void> => {
|
||||
await BindData();
|
||||
};
|
||||
|
||||
const FriendHandle = async (no:string): Promise<void> => {
|
||||
MessageExtend.ShowConfirmDialogAsyc("好友操作", `您确定要删除好友吗?`, async () => {
|
||||
const FriendHandle = async (no: string): Promise<void> => {
|
||||
MessageExtend.ShowConfirmDialogAsyc("好友操作", `您确定要删除好友吗?`, async () => {
|
||||
let result = await RelationService.FriendHandle(no);
|
||||
if (result.code == 0) {
|
||||
await BindData();
|
||||
@@ -126,4 +135,19 @@ const FriendHandle = async (no:string): Promise<void> => {
|
||||
});
|
||||
}
|
||||
|
||||
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>
|
||||
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>
|
||||
@@ -16,4 +16,11 @@ export class ChatService {
|
||||
static async SendChat(type: number, sign: string) {
|
||||
return await ApiService.Request("post", "/Chat/Chat/SendChat", { type, sign });
|
||||
}
|
||||
/**
|
||||
* 删除聊天记录
|
||||
* GET /Chat/Chat/DeleteChat
|
||||
*/
|
||||
static async DeleteChat(chatId: string) {
|
||||
return await ApiService.Request("get", "/Chat/Chat/DeleteChat", { chatId });
|
||||
}
|
||||
}
|
||||
@@ -30,4 +30,12 @@ export class PubService {
|
||||
static async GetMyGame(sid: string) {
|
||||
return await ApiService.Request("get", "/Pub/GetMyGame", { sid });
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取区服信息
|
||||
* GET /Pub/GetOnAreaInfo
|
||||
*/
|
||||
static async GetOnAreaInfo() {
|
||||
return await ApiService.Request("get", "/Pub/GetOnAreaInfo");
|
||||
}
|
||||
}
|
||||
@@ -43,13 +43,24 @@ export class LoginService {
|
||||
return await ApiService.Request("get", "/Login/LoginGame", { sid, user });
|
||||
}
|
||||
|
||||
/**
|
||||
* RefreshToken
|
||||
* POST /Login/RefreshToken
|
||||
* @param refToken body
|
||||
* @param token body
|
||||
*/
|
||||
static async RefreshToken(refToken: string, token: string) {
|
||||
return await ApiService.Request("post", "/Login/RefreshToken", { refToken, token });
|
||||
}
|
||||
|
||||
/**
|
||||
* 注册角色信息
|
||||
* POST /Login/RegisterInfo
|
||||
* @param nick body
|
||||
* @param sex body
|
||||
* @param code body
|
||||
*/
|
||||
static async RegisterInfo(nick: string, sex: number) {
|
||||
return await ApiService.Request("post", "/Login/RegisterInfo", { nick, sex });
|
||||
static async RegisterInfo(nick: string, sex: number, code: string) {
|
||||
return await ApiService.Request("post", "/Login/RegisterInfo", { nick, sex, code });
|
||||
}
|
||||
}
|
||||
@@ -8,10 +8,26 @@ export class RelationService {
|
||||
}
|
||||
|
||||
/**
|
||||
* FriendHandle
|
||||
* 好友处理
|
||||
* GET /User/Relation/FriendHandle
|
||||
*/
|
||||
static async FriendHandle(no: string) {
|
||||
return await ApiService.Request("get", "/User/Relation/FriendHandle", { no });
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除仇人
|
||||
* GET /User/Relation/DeleteEnemy
|
||||
*/
|
||||
static async DeleteEnemy(no: string) {
|
||||
return await ApiService.Request("get", "/User/Relation/DeleteEnemy", { no });
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加仇人
|
||||
* GET /User/Relation/AddEnemy
|
||||
*/
|
||||
static async AddEnemy(no: string) {
|
||||
return await ApiService.Request("get", "/User/Relation/AddEnemy", { no });
|
||||
}
|
||||
}
|
||||
@@ -22,4 +22,31 @@ export class UserService {
|
||||
static async GetHomeInfo(no: string) {
|
||||
return await ApiService.Request("get", "/User/User/GetHomeInfo", { no });
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新昵称
|
||||
* POST /User/User/UpdateUserNick
|
||||
* @param nick body
|
||||
*/
|
||||
static async UpdateUserNick(nick: string) {
|
||||
return await ApiService.Request("post", "/User/User/UpdateUserNick", { nick });
|
||||
}
|
||||
|
||||
/**
|
||||
* 变更性别
|
||||
* POST /User/User/UpdateUserSex
|
||||
* @param sex body
|
||||
*/
|
||||
static async UpdateUserSex(sex: string) {
|
||||
return await ApiService.Request("post", "/User/User/UpdateUserSex", { sex });
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新签名
|
||||
* POST /User/User/UpdateUserSign
|
||||
* @param sign body
|
||||
*/
|
||||
static async UpdateUserSign(sign: string) {
|
||||
return await ApiService.Request("post", "/User/User/UpdateUserSign", { sign });
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user