fix: 修改我的订阅
This commit is contained in:
parent
f616ada3a6
commit
bcdd56b510
|
@ -7,13 +7,13 @@
|
|||
<!-- <div class="tip">请先绑定企业微信账号</div> -->
|
||||
</template>
|
||||
<template v-else-if="getType === 'notifier-email'">
|
||||
<div class="tip"> 绑定账号:{{ user.userInfos.email }}</div>
|
||||
<div class="tip"> 绑定账号:{{ user.userInfos?.email }}</div>
|
||||
</template>
|
||||
<template v-else>
|
||||
<div class="tip">绑定账号:{{ user.userInfos.telephone }}</div>
|
||||
<div class="tip">绑定账号:{{ user.userInfos?.telephone }}</div>
|
||||
</template>
|
||||
<template #footer>
|
||||
<j-button @click="emit('unsubscribe', )">取消订阅</j-button>
|
||||
<j-button @click="emit('unsubscribe', current)">取消订阅</j-button>
|
||||
<j-button
|
||||
@click="onBind"
|
||||
type="primary"
|
||||
|
|
|
@ -100,7 +100,7 @@
|
|||
:current="current"
|
||||
@close="visible = false"
|
||||
/>
|
||||
<Detail @save="onSave" @close="_visible = false" v-if="_visible" :current="current" :data="props.data" />
|
||||
<Detail @unsubscribe="onUnSubscribe" @save="onSave" @close="_visible = false" v-if="_visible" :current="current" :data="props.data" />
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
|
@ -157,17 +157,13 @@ const onSubscribe = async (obj: any) => {
|
|||
if (resp.status === 200) {
|
||||
onlyMessage('操作成功');
|
||||
emits('refresh');
|
||||
_visible.value = false
|
||||
} else {
|
||||
onlyMessage('操作失败', 'error');
|
||||
}
|
||||
};
|
||||
|
||||
const onUnSubscribe = async (obj: any) => {
|
||||
// const resp = await remove_api(id);
|
||||
// if (resp.status === 200) {
|
||||
// onlyMessage('操作成功');
|
||||
// emits('refresh');
|
||||
// }
|
||||
const _set = new Set(props.subscribe?.notifyChannels || []);
|
||||
_set.delete(obj?.id);
|
||||
const _obj = {
|
||||
|
@ -179,6 +175,7 @@ const onUnSubscribe = async (obj: any) => {
|
|||
};
|
||||
const resp = await save_api(_obj);
|
||||
if (resp.status === 200) {
|
||||
_visible.value = false
|
||||
onlyMessage('操作成功');
|
||||
emits('refresh');
|
||||
} else {
|
||||
|
|
|
@ -100,6 +100,7 @@ const onBind = () => {
|
|||
|
||||
const onSave = () => {
|
||||
editInfoVisible.value = false;
|
||||
user.getUserInfo();
|
||||
emit('save', props.current);
|
||||
emit('close');
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue