232
This commit is contained in:
@@ -2,7 +2,6 @@
|
||||
统一配置中心
|
||||
*/
|
||||
export class BaseConfig {
|
||||
//public static BaseUrl:string="https://localhost:7198";
|
||||
public static BaseUrl:string="http://192.168.0.110:5032";
|
||||
public static BaseUrl:string="https://localhost:7198";
|
||||
public static BaseMediaUrl:string="https://localhost:7198";
|
||||
}
|
||||
@@ -131,10 +131,8 @@ const ChangeChat = async (typeid: string): Promise<void> => {
|
||||
|
||||
//删除记录
|
||||
const DelChat = async (data: any) => {
|
||||
MessageExtend.ShowConfirmDialogAsyc("频道管理", `您确定要删除该发言吗?`, async () => {
|
||||
MessageExtend.LoadingToast("删除中...");
|
||||
let result = await ChatService.DeleteChat(data.chatId);
|
||||
MessageExtend.LoadingClose();
|
||||
MessageExtend.ShowConfirmDialogAsyc("频道管理", `您确定要删除该发言吗?`, async () => {
|
||||
let result = await ChatService.DeleteChat(data.chatId);
|
||||
if (result.code == 0) {
|
||||
await BindData();
|
||||
MessageExtend.Notify("删除成功!", "success");
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
{{ cityInfo.cityName }}·{{ mapInfo.mapName }}
|
||||
<Abutton @click="Refresh">刷新</Abutton>
|
||||
<Abar href="/task/">任务</Abar>
|
||||
<Abar href="/message/">消息{{ messageCount > 0 ? "(" + messageCount + ")" : "" }}</Abar>
|
||||
<Abar href="/user/message/">消息{{ messageCount > 0 ? "(" + messageCount + ")" : "" }}</Abar>
|
||||
</div>
|
||||
|
||||
<div class="notification">
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<div class="module-content" v-if="type == '0' || type == '1'">
|
||||
<div class="item border-btm" v-for="(item, index) in data" :key="index">
|
||||
{{ PageExtend.GetPageIndex(currentPage, 10, index + 1) }}.
|
||||
<Abar :href='"/message/read?id=" + item.user.userNo'>
|
||||
<Abar :href='"/user/message/read?id=" + item.user.userNo'>
|
||||
{{ item.user.nick }}:{{ item.sign }}</Abar>
|
||||
[<Abutton @click="delTlak(item.user.userNo)">×</Abutton>]
|
||||
</div>
|
||||
@@ -51,7 +51,7 @@
|
||||
<div class="module-content" v-if="type == '3'">
|
||||
<div class="item border-btm" v-for="(item, index) in data" :key="index">
|
||||
{{ PageExtend.GetPageIndex(currentPage, 10, index + 1) }}.
|
||||
<Abar :href='"/message/mail?id=" + item.mailId'>
|
||||
<Abar :href='"/user/message/mail?id=" + item.mailId'>
|
||||
{{ item.name }}</Abar>
|
||||
<span v-if="item.isRead == 0" style="color: red;font-size: 16px;">(未读)</span>
|
||||
<span v-else-if="item.isGet == 0" style="color: red;font-size: 16px;">(未领取)</span>
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="crumb-nav-large">
|
||||
<Abar href="/message/">我的邮件</Abar>>邮件信息
|
||||
<Abar href="/user/message/">我的邮件</Abar>>邮件信息
|
||||
</div>
|
||||
<div class="module-title">
|
||||
{{ data.name }}
|
||||
@@ -55,7 +55,7 @@ const BindData = async (): Promise<void> => {
|
||||
}
|
||||
else {
|
||||
MessageExtend.ShowDialogEvent("提示", result.msg, () => {
|
||||
return PageExtend.Redirect("/message");
|
||||
return PageExtend.Redirect("/user/message");
|
||||
}, "确认");
|
||||
}
|
||||
};
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="crumb-nav-large">
|
||||
<Abar href="/message">我的消息</Abar>>发送消息
|
||||
<Abar href="/user/message">我的消息</Abar>>发送消息
|
||||
</div>
|
||||
<div class="module-title" v-if="user.userNo != '0'">
|
||||
【<Abar :href='"/user/user?no=" + user.userNo'>{{ user.nick }}</Abar> ({{ user.userNo }})】
|
||||
@@ -39,7 +39,7 @@
|
||||
<small>[{{ TimeExtend.Format(item.addTime, "yyyy-MM-dd HH:mm:ss") }}]</small><br />
|
||||
</div>
|
||||
|
||||
<Abar :href='"/message/log?no="+user.userNo' v-if="logs.length > 0">查看记录>></Abar>
|
||||
<Abar :href='"/user/message/log?no="+user.userNo' v-if="logs.length > 0">查看记录>></Abar>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
83
Web/src/pages/user/setting/bag.vue
Normal file
83
Web/src/pages/user/setting/bag.vue
Normal file
@@ -0,0 +1,83 @@
|
||||
<template>
|
||||
<div class="module-title">
|
||||
百宝箱设置
|
||||
</div>
|
||||
<div class="module-content" v-if="role == -1">
|
||||
您还未开启百宝箱,
|
||||
<Abutton @click="OpenSetting">立即开启</Abutton>?
|
||||
</div>
|
||||
<div class="module-content" v-if="role != -1">
|
||||
<div class="item">
|
||||
当前设置:
|
||||
<span v-if="role == 0">[不自动拾取物品]</span>
|
||||
<span v-if="role == 1">[自动拾取物品]</span>
|
||||
</div>
|
||||
<div class="common">
|
||||
请选择设置:<br>
|
||||
<div class="item" v-if="role != 1">
|
||||
<Abutton @click="UpdateState(1)">[自动拾取物品]</Abutton>
|
||||
</div>
|
||||
<div class="item" v-if="role != 0">
|
||||
<Abutton @click="UpdateState(0)">[不自动拾取物品]</Abutton>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="item"></div>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
|
||||
definePageMeta({
|
||||
layout: layout.default,
|
||||
middleware: 'page-loading'
|
||||
})
|
||||
const role = ref(0);
|
||||
onMounted(async () => {
|
||||
try {
|
||||
await BindData();
|
||||
}
|
||||
finally {
|
||||
PageLoading.Close();
|
||||
}
|
||||
})
|
||||
|
||||
const BindData = async (): Promise<void> => {
|
||||
let result = await SettingService.GetUserConfig(2);
|
||||
if (result.code == 0) {
|
||||
role.value = result.data;
|
||||
}
|
||||
else {
|
||||
MessageExtend.ShowDialog("提示", result.msg);
|
||||
}
|
||||
};
|
||||
|
||||
const UpdateState = async (state: number) => {
|
||||
MessageExtend.LoadingToast("设置中...");
|
||||
let result = await SettingService.UpdateUserConfig(2, state);
|
||||
MessageExtend.LoadingClose();
|
||||
if (result.code == 0) {
|
||||
await BindData();
|
||||
MessageExtend.Notify("操作成功!", "success");
|
||||
}
|
||||
else {
|
||||
MessageExtend.ShowDialog("设置操作", result.msg);
|
||||
}
|
||||
}
|
||||
|
||||
const OpenSetting = async () => {
|
||||
MessageExtend.ShowConfirmDialogAsyc("设置操作", `您确定要开启百宝箱吗?`, async () => {
|
||||
let result = await SettingService.UpdateUserConfig(2, 1);
|
||||
MessageExtend.LoadingClose();
|
||||
if (result.code == 0) {
|
||||
await BindData();
|
||||
MessageExtend.Notify("操作成功!", "success");
|
||||
}
|
||||
else {
|
||||
MessageExtend.ShowToast(result.msg);
|
||||
}
|
||||
return true;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
83
Web/src/pages/user/setting/drug.vue
Normal file
83
Web/src/pages/user/setting/drug.vue
Normal file
@@ -0,0 +1,83 @@
|
||||
<template>
|
||||
<div class="module-title">
|
||||
急救箱设置
|
||||
</div>
|
||||
<div class="module-content" v-if="role == -1">
|
||||
您还未开启急救箱,
|
||||
<Abutton @click="OpenSetting">立即开启</Abutton>?
|
||||
</div>
|
||||
<div class="module-content" v-if="role != -1">
|
||||
<div class="item">
|
||||
当前设置:
|
||||
<span v-if="role == 0">[不自动使用药品]</span>
|
||||
<span v-if="role == 1">[自动使用物品]</span>
|
||||
</div>
|
||||
<div class="common">
|
||||
请选择设置:<br>
|
||||
<div class="item" v-if="role != 1">
|
||||
<Abutton @click="UpdateState(1)">[自动使用物品]</Abutton>
|
||||
</div>
|
||||
<div class="item" v-if="role != 0">
|
||||
<Abutton @click="UpdateState(0)">[不自动使用药品]</Abutton>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="item"></div>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
|
||||
definePageMeta({
|
||||
layout: layout.default,
|
||||
middleware: 'page-loading'
|
||||
})
|
||||
const role = ref(0);
|
||||
onMounted(async () => {
|
||||
try {
|
||||
await BindData();
|
||||
}
|
||||
finally {
|
||||
PageLoading.Close();
|
||||
}
|
||||
})
|
||||
|
||||
const BindData = async (): Promise<void> => {
|
||||
let result = await SettingService.GetUserConfig(3);
|
||||
if (result.code == 0) {
|
||||
role.value = result.data;
|
||||
}
|
||||
else {
|
||||
MessageExtend.ShowDialog("提示", result.msg);
|
||||
}
|
||||
};
|
||||
|
||||
const UpdateState = async (state: number) => {
|
||||
MessageExtend.LoadingToast("设置中...");
|
||||
let result = await SettingService.UpdateUserConfig(3, state);
|
||||
MessageExtend.LoadingClose();
|
||||
if (result.code == 0) {
|
||||
await BindData();
|
||||
MessageExtend.Notify("操作成功!", "success");
|
||||
}
|
||||
else {
|
||||
MessageExtend.ShowDialog("设置操作", result.msg);
|
||||
}
|
||||
}
|
||||
|
||||
const OpenSetting = async () => {
|
||||
MessageExtend.ShowConfirmDialogAsyc("设置操作", `您确定要开启急救箱吗?`, async () => {
|
||||
let result = await SettingService.UpdateUserConfig(3, 1);
|
||||
MessageExtend.LoadingClose();
|
||||
if (result.code == 0) {
|
||||
await BindData();
|
||||
MessageExtend.Notify("操作成功!", "success");
|
||||
}
|
||||
else {
|
||||
MessageExtend.ShowToast(result.msg);
|
||||
}
|
||||
return true;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
68
Web/src/pages/user/setting/friend.vue
Normal file
68
Web/src/pages/user/setting/friend.vue
Normal file
@@ -0,0 +1,68 @@
|
||||
<template>
|
||||
<div class="module-title">
|
||||
好友权限设置
|
||||
</div>
|
||||
<div class="module-content">
|
||||
|
||||
<div class="item">
|
||||
当前设置:
|
||||
<span v-if="role == 0">[拒绝人添加好友]</span>
|
||||
<span v-if="role == 1">[验证好友请求]</span>
|
||||
<span v-if="role == 2">[允许任何添加好友]</span>
|
||||
</div>
|
||||
<div class="common">
|
||||
请选择设置:<br>
|
||||
<div class="item" v-if="role != 2">
|
||||
<Abutton @click="UpdateState(2)">[允许任何添加好友]</Abutton>
|
||||
</div>
|
||||
<div class="item" v-if="role != 1">
|
||||
<Abutton @click="UpdateState(1)">[验证好友请求]</Abutton>
|
||||
</div>
|
||||
<div class="item" v-if="role != 0">
|
||||
<Abutton @click="UpdateState(0)">[拒绝人添加好友]</Abutton>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="item"></div>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
|
||||
definePageMeta({
|
||||
layout: layout.default,
|
||||
middleware: 'page-loading'
|
||||
})
|
||||
const role = ref(0);
|
||||
onMounted(async () => {
|
||||
try {
|
||||
await BindData();
|
||||
}
|
||||
finally {
|
||||
PageLoading.Close();
|
||||
}
|
||||
})
|
||||
|
||||
const BindData = async (): Promise<void> => {
|
||||
let result = await SettingService.GetUserConfig(0);
|
||||
if (result.code == 0) {
|
||||
role.value = result.data;
|
||||
}
|
||||
else {
|
||||
MessageExtend.ShowDialog("提示", result.msg);
|
||||
}
|
||||
};
|
||||
|
||||
const UpdateState = async (state: number) => {
|
||||
MessageExtend.LoadingToast("设置中...");
|
||||
let result = await SettingService.UpdateUserConfig(0,state);
|
||||
MessageExtend.LoadingClose();
|
||||
if (result.code == 0) {
|
||||
await BindData();
|
||||
MessageExtend.Notify("操作成功!", "success");
|
||||
}
|
||||
else {
|
||||
MessageExtend.ShowDialog("设置操作", result.msg);
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
64
Web/src/pages/user/setting/give.vue
Normal file
64
Web/src/pages/user/setting/give.vue
Normal file
@@ -0,0 +1,64 @@
|
||||
<template>
|
||||
<div class="module-title">
|
||||
赠送权限设置
|
||||
</div>
|
||||
<div class="module-content">
|
||||
|
||||
<div class="item">
|
||||
当前设置:
|
||||
<span v-if="role == 0">[任何人可赠送]</span>
|
||||
<span v-if="role == 1">[仅允许好友赠送]</span>
|
||||
</div>
|
||||
<div class="common">
|
||||
请选择设置:<br>
|
||||
<div class="item" v-if="role != 1">
|
||||
<Abutton @click="UpdateState(1)">[仅允许好友赠送]</Abutton>
|
||||
</div>
|
||||
<div class="item" v-if="role != 0">
|
||||
<Abutton @click="UpdateState(0)">[任何人可赠送]</Abutton>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="item"></div>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
|
||||
definePageMeta({
|
||||
layout: layout.default,
|
||||
middleware: 'page-loading'
|
||||
})
|
||||
const role = ref(0);
|
||||
onMounted(async () => {
|
||||
try {
|
||||
await BindData();
|
||||
}
|
||||
finally {
|
||||
PageLoading.Close();
|
||||
}
|
||||
})
|
||||
|
||||
const BindData = async (): Promise<void> => {
|
||||
let result = await SettingService.GetUserConfig(1);
|
||||
if (result.code == 0) {
|
||||
role.value = result.data;
|
||||
}
|
||||
else {
|
||||
MessageExtend.ShowDialog("提示", result.msg);
|
||||
}
|
||||
};
|
||||
|
||||
const UpdateState = async (state: number) => {
|
||||
MessageExtend.LoadingToast("设置中...");
|
||||
let result = await SettingService.UpdateUserConfig(1, state);
|
||||
MessageExtend.LoadingClose();
|
||||
if (result.code == 0) {
|
||||
await BindData();
|
||||
MessageExtend.Notify("操作成功!", "success");
|
||||
}
|
||||
else {
|
||||
MessageExtend.ShowDialog("设置操作", result.msg);
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
@@ -1 +1,29 @@
|
||||
<template></template>
|
||||
<template>
|
||||
<div class="module-title">
|
||||
【设置中心】
|
||||
</div>
|
||||
<div class="module-content">
|
||||
<div class="item border-btm ">
|
||||
➣<Abar href="/user/setting/friend">好友设置</Abar>
|
||||
</div>
|
||||
<div class="item border-btm ">
|
||||
➣<Abar href="/user/setting/give">赠送设置</Abar>
|
||||
</div>
|
||||
<div class="item border-btm ">
|
||||
➣<Abar href="/user/setting/bag">百宝箱设置</Abar>
|
||||
</div>
|
||||
<div class="item border-btm ">
|
||||
➣<Abar href="/user/setting/drug">急救箱设置</Abar>
|
||||
</div>
|
||||
<div class="item border-btm ">
|
||||
➣<Abutton>重置负重</Abutton><span style="font-size: 14px;;">(*重置负重数据)</span>
|
||||
</div>
|
||||
<div class="item border-btm ">
|
||||
➣<Abutton>刷新图标</Abutton><span style="font-size: 14px;;">(*更新图标数据)</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
|
||||
</script>
|
||||
@@ -111,7 +111,7 @@ const FriendHandle = async (): Promise<void> => {
|
||||
}
|
||||
|
||||
const AddEnemy = async (): Promise<void> => {
|
||||
MessageExtend.ShowConfirmDialogAsyc("关系操作", `您确定要添加Ta为仇人吗?(添加消耗50金元)`, async () => {
|
||||
MessageExtend.ShowConfirmDialogAsyc("关系操作", `您确定要添加Ta为仇人吗?(添加消耗300金元)`, async () => {
|
||||
let no = PageExtend.QueryString("no");
|
||||
let result = await RelationService.AddEnemy(no);
|
||||
if (result.code == 0) {
|
||||
|
||||
17
Web/src/services/user/SettingService.ts
Normal file
17
Web/src/services/user/SettingService.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
export class SettingService {
|
||||
/**
|
||||
* 获取个人配置
|
||||
* GET /User/Setting/GetUserConfig
|
||||
*/
|
||||
static async GetUserConfig(type: number) {
|
||||
return await ApiService.Request("get", "/User/Setting/GetUserConfig", { type });
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置配置
|
||||
* GET /User/Setting/UpdateUserConfig
|
||||
*/
|
||||
static async UpdateUserConfig(type: number, state: number) {
|
||||
return await ApiService.Request("get", "/User/Setting/UpdateUserConfig", { type, state });
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user