소스 검색

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

liujt 9 달 전
부모
커밋
cd7001665d
2개의 변경된 파일12개의 추가작업 그리고 6개의 파일을 삭제
  1. 5 5
      pages/saleManage/businessOpportunity/components/drawer.vue
  2. 7 1
      pages/saleManage/businessOpportunity/followList.vue

+ 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: {