Browse Source

fix: 测试第一版推送消息流程

master
wangxiang 2 years ago
parent
commit
545fa14d99
  1. 3
      src/api/platform/common/controller/pushConcernFan.ts
  2. 1
      src/views/common/push/pushConcern/index.vue
  3. 1
      src/views/common/push/pushFan/index.vue
  4. 4
      src/views/common/push/pushFriend/index.vue
  5. 5
      src/views/common/push/pushFriendAudit/FriendAuditModal.vue

3
src/api/platform/common/controller/pushConcernFan.ts

@ -8,6 +8,7 @@ enum Api {
add = '/common_proxy/common/pushConcernFan/save', add = '/common_proxy/common/pushConcernFan/save',
edit = '/common_proxy/common/pushConcernFan/update', edit = '/common_proxy/common/pushConcernFan/update',
del = '/common_proxy/common/pushConcernFan/remove', del = '/common_proxy/common/pushConcernFan/remove',
audit = '/common_proxy/common/pushConcernFan/audit',
} }
export const listPushConcernFan = (params?: Partial<PushConcernFanParams>) => defHttp.get<PushConcernFanResult>({ url: Api.list, params }, { isReturnResultResponse: true }); export const listPushConcernFan = (params?: Partial<PushConcernFanParams>) => defHttp.get<PushConcernFanResult>({ url: Api.list, params }, { isReturnResultResponse: true });
@ -21,3 +22,5 @@ export const editPushConcernFan = (params: Partial<PushConcernFan>) => defHttp.p
export const getPushConcernFan = (id: string) => defHttp.get<PushConcernFan>({ url: `${Api.get}/${id}` }); export const getPushConcernFan = (id: string) => defHttp.get<PushConcernFan>({ url: `${Api.get}/${id}` });
export const delPushConcernFan = (ids: string) => defHttp.delete({ url: `${Api.del}/${ids}` }); export const delPushConcernFan = (ids: string) => defHttp.delete({ url: `${Api.del}/${ids}` });
export const auditPushConcernFan = (id: string) => defHttp.get({ url: `${Api.audit}`, params: { id } });

1
src/views/common/push/pushConcern/index.vue

@ -112,6 +112,7 @@
fixed: false fixed: false
}, },
searchInfo: { searchInfo: {
onType: '1',
status: '1', status: '1',
fanUserId: userInfoStore.id fanUserId: userInfoStore.id
}, },

1
src/views/common/push/pushFan/index.vue

@ -24,6 +24,7 @@
label: '移除', label: '移除',
icon: 'ant-design:delete-outlined', icon: 'ant-design:delete-outlined',
color: 'error', color: 'error',
disabled: record?.cfType == 1,
onClick: handleDel.bind(null, record) onClick: handleDel.bind(null, record)
}]" }]"
/> />

4
src/views/common/push/pushFriend/index.vue

@ -92,8 +92,8 @@
content: `是否关注用户为${record?.nickName}?`, content: `是否关注用户为${record?.nickName}?`,
onOk: async () => { onOk: async () => {
await addPushConcernFan({ await addPushConcernFan({
concernUserId: userInfoStore.id, concernUserId: record?.id,
fanUserId: record?.id fanUserId: userInfoStore.id
}); });
createMessage.success('申请成功!'); createMessage.success('申请成功!');
handleRefreshTable(); handleRefreshTable();

5
src/views/common/push/pushFriendAudit/FriendAuditModal.vue

@ -16,7 +16,7 @@
<script lang="ts" setup> <script lang="ts" setup>
import { BasicForm, useForm } from '/@/components/Form/index'; import { BasicForm, useForm } from '/@/components/Form/index';
import { formSchema } from '../pushConcern/concern.data'; import { formSchema } from '../pushConcern/concern.data';
import { getPushConcernFan, editPushConcernFan, delPushConcernFan } from '/@/api/platform/common/controller/pushConcernFan'; import { getPushConcernFan, editPushConcernFan, delPushConcernFan, auditPushConcernFan } from '/@/api/platform/common/controller/pushConcernFan';
import { BasicModal, ModalProps, useModalInner } from '/@/components/Modal'; import { BasicModal, ModalProps, useModalInner } from '/@/components/Modal';
import { ref } from 'vue'; import { ref } from 'vue';
import { useMessage } from '/@/hooks/web/useMessage'; import { useMessage } from '/@/hooks/web/useMessage';
@ -55,9 +55,8 @@
async function handleSubmit() { async function handleSubmit() {
try { try {
const formData = await validate(); const formData = await validate();
formData.status = '1';
setModalProps({ confirmLoading: true }); setModalProps({ confirmLoading: true });
await editPushConcernFan(formData); await auditPushConcernFan(formData.id);
closeModal(); closeModal();
createMessage.success('审核通过!'); createMessage.success('审核通过!');
emit('success'); emit('success');

Loading…
Cancel
Save