全部权益页面弹窗点击放弃绑定接口报错问题调整,接口通了需关闭弹窗

This commit is contained in:
chong.yanning@ebiz-digits.com
2025-10-31 16:42:58 +08:00
parent 86b7f8953f
commit 7901911976
2 changed files with 15 additions and 2 deletions

View File

@@ -90,7 +90,7 @@
</template>
<script>
import { fetchBenefitCheck, fetchBenefitServiceUrl, fetchBenefitInfoListV2 } from '@/api/benefits'
import { fetchBenefitCheck, fetchBenefitServiceUrl, fetchBenefitInfoListV2, giveUpAddCustomerFamilyMember } from '@/api/benefits'
import { fetchUserInfo } from '@/api/user/token'
import AddFamilyMember from './components/addFamilyMember.vue'
@@ -255,7 +255,18 @@ export default {
this.showErrorDialog('获取服务链接失败')
})
},
// 放弃绑定
giveUpBtn() {
giveUpAddCustomerFamilyMember({}).then((res) => {
if (res.content.result == '0') {
this.tipsPopupShow = false
this.getBenefitsUrl(this.selectedItem)
} else {
this.tipsPopupShow = false
this.$toast(res.content.content || '放弃绑定失败')
}
})
},
// 显示错误对话框
showErrorDialog(message) {
// 这里可以使用项目中的对话框组件

View File

@@ -267,8 +267,10 @@ export default {
giveUpBtn() {
giveUpAddCustomerFamilyMember({}).then((res) => {
if (res.content.result == '0') {
this.tipsPopupShow = false
this.getBenefitsUrl(this.selectedItem)
} else {
this.tipsPopupShow = false
this.$toast(res.content.content || '放弃绑定失败')
}
})