1111
This commit is contained in:
+2
-2
@@ -4,5 +4,5 @@
|
||||
# VITE_SIGNALR_BASE_URL = https://im.test.nxsir.cn/chat/
|
||||
|
||||
|
||||
VITE_API_BASE_URL = http://192.168.5.116:7070/api
|
||||
VITE_SIGNALR_BASE_URL = http://192.168.5.116:7070/chat/
|
||||
VITE_API_BASE_URL = http://192.168.5.100:8009/api
|
||||
VITE_SIGNALR_BASE_URL = http://192.168.5.100:8009/chat
|
||||
|
||||
@@ -5,13 +5,13 @@
|
||||
<title>Electron</title>
|
||||
<!-- https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP -->
|
||||
<meta http-equiv="Content-Security-Policy"
|
||||
content="default-src 'self' http://192.168.5.116:7070 ql-im:;
|
||||
content="default-src 'self' http://192.168.5.100:8009 ql-im:;
|
||||
script-src 'self' 'unsafe-inline';
|
||||
style-src 'self' 'unsafe-inline';
|
||||
connect-src 'self' http://localhost:5202 ws://localhost:5202 http://192.168.5.116:7070 ws://192.168.5.116:7070;
|
||||
connect-src 'self' http://localhost:5202 ws://localhost:5202 http://192.168.5.100:8009 ws://192.168.5.100:8009;
|
||||
img-src 'self' data: blob: https: http: ql-im:;
|
||||
font-src 'self' data:;
|
||||
media-src 'self' blob: http://192.168.5.116:7070; ql-im:">
|
||||
media-src 'self' blob: http://192.168.5.100:8009; ql-im:">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
@@ -17,7 +17,8 @@ export const GROUP_REQUEST_STATUS = Object.freeze({
|
||||
/** 待对方同意 */
|
||||
TARGET_PENDING: 'TargetPending',
|
||||
/** 对方拒绝 */
|
||||
TARGET_DECLINED: 'TargetDeclined'
|
||||
TARGET_DECLINED: 'TargetDeclined',
|
||||
TARGET_PASSED: 'TargetPassed'
|
||||
})
|
||||
|
||||
export const GROUP_REQUEST_ACTION = Object.freeze({
|
||||
@@ -38,6 +39,8 @@ export const getGroupRequestStatusTxt = (status) => {
|
||||
return '待对方同意';
|
||||
case GROUP_REQUEST_STATUS.TARGET_DECLINED:
|
||||
return '对方拒绝';
|
||||
case GROUP_REQUEST_STATUS.TARGET_PASSED:
|
||||
return '对方同意';
|
||||
default:
|
||||
return '未知状态';
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
<p class="sub-text">入群描述:{{ item.description }}</p>
|
||||
</div>
|
||||
|
||||
<div v-if="[GROUP_REQUEST_TYPE.INVITED, GROUP_REQUEST_TYPE.IS_GROUP].includes(item.type)" class="actions">
|
||||
<div v-if="[GROUP_REQUEST_TYPE.INVITED, GROUP_REQUEST_TYPE.IS_GROUP].includes(item.type) && [GROUP_REQUEST_STATUS.PENDING, GROUP_REQUEST_STATUS.TARGET_PENDING].includes(item.status)" class="actions">
|
||||
<button class="btn-text btn-reject">忽略</button>
|
||||
<Dropdown :disable="handleDropDownDisable" class="handleDropDown" v-model="handleValue" :options="[
|
||||
{ label: '同意', value: GROUP_REQUEST_ACTION.ACCEPT },
|
||||
@@ -162,12 +162,12 @@ const groupRequestHandler = async (request, action) => {
|
||||
let result = null
|
||||
switch (request.type) {
|
||||
case GROUP_REQUEST_TYPE.INVITED:
|
||||
requestAction = action == GROUP_REQUEST_ACTION.ACCEPT ? GROUP_REQUEST_STATUS.TARGET_PENDING : GROUP_REQUEST_STATUS.TARGET_DECLINED;
|
||||
result = await groupService.handleGroupInvite(request.id ,requestAction)
|
||||
requestAction = action == GROUP_REQUEST_ACTION.ACCEPT ? GROUP_REQUEST_STATUS.TARGET_PASSED : GROUP_REQUEST_STATUS.TARGET_DECLINED;
|
||||
result = await groupService.handleGroupInvite(request.requestId ,requestAction)
|
||||
break
|
||||
case GROUP_REQUEST_TYPE.IS_GROUP:
|
||||
requestAction = action == GROUP_REQUEST_ACTION.ACCEPT ? GROUP_REQUEST_STATUS.PASSED : GROUP_REQUEST_STATUS.DECLINED;
|
||||
result = await groupService.handleGroupRequest(request.id, requestAction)
|
||||
result = await groupService.handleGroupRequest(request.requestId, requestAction)
|
||||
break
|
||||
default:
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user