Explorar o código

酒店图片添加

wcni %!s(int64=5) %!d(string=hai) anos
pai
achega
8a2f83e682
Modificáronse 4 ficheiros con 58 adicións e 6 borrados
  1. 33 3
      component/assess.vue
  2. 1 1
      pages/index/commemt.vue
  3. 19 1
      pages/index/hotel.vue
  4. 5 1
      pages/myOrder/finsh.vue

+ 33 - 3
component/assess.vue

@@ -25,30 +25,60 @@
 					</view>
 				</view>
 				<view style="color: #303133;font-size: 28upx;" class="uni-comment-content">{{item.content}}</view>
-				<view v-for="(items, index) in item.img_list" :key="index">
-					<image style="float: left;width: 100upx;height: 100upx;padding-right:18upx;" :src="items"></image>
+				<view v-for="(items, indexs) in item.img_list" :key="indexs"  >
+					<image  @click="gopicture(items)" style="float: left;width: 100upx;height: 100upx;padding-right:18upx;" :src="items"></image>
 				</view>
 			</view>
 		</view>
+		 <unipopup :images="images"  :show="ishow"/>
 	</view>
 </template>
 
 <script>
+	import unipopup from '@/component/openpictrue.vue'
 	import uniIcon from '@/component/uni-icon/uni-icon.vue'
 	export default {
+		components: {
+			unipopup
+		},
 		props: {
 			feedback_list: {
 				type: Array
+			},
+			showpicture: {
+				type: Boolean,
+				default: false,
 			}
 		},
+		
 		component:{
 			uniIcon
 		},
+		watch: {
+		'showpicture': function(val){
+			console.log(val)
+			if(val) {
+				this.ishow = true;
+			}else {
+				this.ishow = false;
+			}
+		}
+		},
 		data() {
 			return {
+				images: '',
+				ishow: false,
 				//title:"评论界面"
 			}
-		}
+		},
+		methods: {
+			gopicture(e,a) {
+				this.images = e;
+				this.ishow = true;
+				uni.$emit('changpicture')
+			}
+			
+		},
 	}
 </script>
 

+ 1 - 1
pages/index/commemt.vue

@@ -25,7 +25,7 @@
 				</view>
 				<view style="color: #303133;font-size: 28upx;" class="uni-comment-content">{{item.geval_content}}</view>
 				<view>
-					<image  v-for="(items, index) in item.images" @click="shoupicture(items)"  :key="index" :src="items" style="width: 100upx;height: 100upx;float:left;"></image>
+					<image  v-for="(items, indexs) in item.images" @click="shoupicture(items)"  :key="indexs" :src="items" style="width: 100upx;height: 100upx;float:left;"></image>
 				</view>
 			</view>
 		</view>

+ 19 - 1
pages/index/hotel.vue

@@ -124,7 +124,7 @@
                  </van-tab>
                     <van-tab  :name="1" :title="'评价' +'  '+hoteldetail.feedback_count">
                      <!-- 评价列表 -->
-                     <assess :feedback_list="feedback_list" />
+                     <assess :feedback_list="feedback_list" :showpicture="showpicture" />
                  </van-tab>
                     <van-tab  :name="2" title="酒店信息">
 						<view style="padding: 20upx 32upx 0upx 32upx;margin-bottom: 200upx;">
@@ -174,6 +174,7 @@
         },
         data() {
             return {
+				showpicture: false,
 				storeinformation: {},
 				isTop: 0,
 				hoteldetail: {},
@@ -271,6 +272,15 @@
 			this.getshopdetail(); // 获取商品详情
 			this.hotelmenu();  // 一级菜单
 			this.gethoteil();  // 获取酒店信息
+			uni.$on('changshow', (e) => {
+				this.changeshow();			
+			})
+			uni.$on('changpicture', (e) => {
+				this.changimg();			
+			})
+			
+			
+			
 		},
 		computed:{
 			...mapState([
@@ -280,6 +290,14 @@
 			]),
 		},
         methods: {
+			changeshow() {
+				console.log("关闭")
+				this.showpicture = false;
+			},
+			changimg() {
+				console.log("触发")
+				this.showpicture = true;
+			},
 			getop() {
 				this.scrollTop = this.old.scrollTop
                 this.$nextTick(function(){

+ 5 - 1
pages/myOrder/finsh.vue

@@ -35,8 +35,12 @@
 					})
 					uni.$emit('finshlist');
 				}else {
+					
+					// uni.redirectTo({
+					// 	url: `/pages/index/cart?store_id=${store_id}`
+					// })
 					uni.redirectTo({
-						url: `/pages/index/cart?store_id=${store_id}`
+						url: `/pages/index/hotel?id=${store_id}`
 					})
 				}