瀏覽代碼

fix: 商机跟进记录删除不生效问题

liujt 9 月之前
父節點
當前提交
cd7001665d

+ 5 - 5
pages/saleManage/businessOpportunity/components/drawer.vue

@@ -132,10 +132,10 @@
 			uni.$on('setBusinessOpportunity', () => {
 				this.save()
 			})
-			uni.$off('delFollowList')
-			uni.$on('delFollowList', (item) => {
-				deletefollowList([item.id])
-			})
+			// uni.$off('delFollowList')
+			// uni.$on('delFollowList', (item) => {
+			// 	deletefollowList([item.id])
+			// })
 			uni.$off('savefollowList')
 			uni.$on('savefollowList', (item) => {
 				item.contactId=this.form.contactId
@@ -175,7 +175,7 @@
 		},
 		onUnload() {
 			uni.$off('setBusinessOpportunity')
-			uni.$off('delFollowList')
+			// uni.$off('delFollowList')
 			uni.$off('savefollowList')
 		},
 		methods: {

+ 7 - 1
pages/saleManage/businessOpportunity/followList.vue

@@ -18,7 +18,8 @@
 	import {
 		getfollowList,
 		savefollowList,
-		getDetail
+		getDetail,
+		deletefollowList,
 	} from '@/api/saleManage/businessOpportunity/index.js'
 	export default {
 		components: {
@@ -43,6 +44,10 @@
 			
 				savefollowList(item)
 			})
+			uni.$off('delFollowList')
+			uni.$on('delFollowList', (item) => {
+				deletefollowList([item.id])
+			})
 			getDetail(data.id).then(async res => {
 				this.form = res
 				const {
@@ -66,6 +71,7 @@
 		},
 		onUnload() {
 			uni.$off('savefollowList')
+			uni.$off('delFollowList')
 		},
 		methods: {