Browse Source

Merge branch 'deploy' of http://git.chelingzhu.com/chelingzhu-web/storeCheck-app into deploy

lilei 4 years ago
parent
commit
2a3e9fbc71
3 changed files with 19 additions and 3 deletions
  1. 2 1
      pages/toDoList/addBacklog.vue
  2. 12 2
      pages/toDoList/backlogDetail.vue
  3. 5 0
      pages/toDoList/toDoList.vue

+ 2 - 1
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,6 +182,7 @@
 						saveBackLog(params).then(res=>{
 							this.toashMsg(res.message)
 							if(res.status == 200) {
+								uni.$emit('refreshBL',{msg:'页面更新'})
 								uni.navigateBack()
 							} 
 							this.loading = false

+ 12 - 2
pages/toDoList/backlogDetail.vue

@@ -2,7 +2,7 @@
 	<view class="back-content">
 		<!-- 轮播图 -->
 		<swiper v-if="infoData.backlogPhotoList && infoData.backlogPhotoList.length" class="top-ad-swiper" :indicator-dots="false" :autoplay="true" :interval="5000" :duration="600" :circular="true">
-			<swiper-item v-for="(item,index) in infoData.backlogPhotoList" :key="index">
+			<swiper-item @click="showImg" v-for="(item,index) in infoData.backlogPhotoList" :key="index">
 				<div class="swiper-item uni-bg-red">
 					<u-image mode="aspectFit" width="750upx" height="400upx" :src="item.photoPath"></u-image>
 				</div>
@@ -98,10 +98,20 @@
 			this.getRecordData(option.id)
 		},
 		methods: {
+			// 图片预览
+			showImg () {
+				let arr = []
+				this.infoData.backlogPhotoList.map(item=>{
+					arr.push(item.photoPath)
+				})
+				uni.previewImage({
+					urls: arr
+				})
+			},
 			// 获取详情数据
 			getData (id) {
 				getBackLogDetail({id:id}).then(res=>{
-					console.log(res,'rrrrrrrr')
+					// console.log(res,'rrrrrrrr')
 					if(res.status==200){
 						this.infoData = res.data 
 					} else {

+ 5 - 0
pages/toDoList/toDoList.vue

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