浏览代码

Signed-off-by: 1004749546@qq.com <1004749546@qq.com>
bug修改

1004749546@qq.com 4 年之前
父节点
当前提交
cd9772c605
共有 2 个文件被更改,包括 5 次插入4 次删除
  1. 2 2
      pages/toDoList/addBacklog.vue
  2. 3 2
      pages/toDoList/toDoList.vue

+ 2 - 2
pages/toDoList/addBacklog.vue

@@ -160,7 +160,7 @@
 						const backlogPhotoList = []
 						this.lists.map(item =>{
 							let photo = {
-								photoPath:item.response.data
+								photoPath:item.response&&item.response.data?item.response.data:''
 							}
 							backlogPhotoList.push(photo)
 						})
@@ -182,7 +182,7 @@
 						saveBackLog(params).then(res=>{
 							this.toashMsg(res.message)
 							if(res.status == 200) {
-								this.$emit('refreshBL')
+								uni.$emit('refreshBL',{msg:'页面更新'})
 								uni.navigateBack()
 							} 
 							this.loading = false

+ 3 - 2
pages/toDoList/toDoList.vue

@@ -145,11 +145,11 @@
 			}
 		},
 		onLoad() {
-			this.$on('refreshBL',this.getRow(1))
+			uni.$on('refreshBL',this.refresh)
 			this.pageInit()
 		},
 		onUnload() {
-			this.$off('refreshBL',this.getRow(1))
+			uni.$off('refreshBL',this.refresh)
 		},
 		methods:{
 			pageInit () {
@@ -208,6 +208,7 @@
 			},
 			// 查询列表
 			getRow (pageNo) {
+				console.log(222222222)
 			  let _this = this
 			  if (pageNo) {
 			    this.pageNo = pageNo