adminthw 4 年之前
父节点
当前提交
9af519d440
共有 2 个文件被更改,包括 45 次插入33 次删除
  1. 20 13
      pages/attract/index.vue
  2. 25 20
      pages/index/index.vue

+ 20 - 13
pages/attract/index.vue

@@ -11,10 +11,10 @@
         v-for="(item, index) in attractList"
         :key="index"
         style="justify-content: start"
-        @click="goAttractDeatil(item.id, item.time_type)"
-        :class="{ unclick: item.time_type == 0 }"
-      >
-        <view v-if="!(item.time_type == 1)" class="forward">敬请期待</view>
+        @click="goAttractDeatil(item.id, item.time_type)">
+	    <view class="maskModal" v-if="item.time_type == 0">
+			<text>敬请期待</text>
+		</view>
         <image
           :src="item.pic_url"
           mode="aspectFill"
@@ -157,6 +157,7 @@ export default {
     }
     .notice-content-box {
       width: 100%;
+	  position: relative;
       display: flex;
       padding: 30rpx;
       background-color: #ffffff;
@@ -164,15 +165,21 @@ export default {
       border-radius: 32rpx;
       margin-top: 20rpx;
       justify-content: space-between;
-      position: relative;
-      .forward {
-        position: absolute;
-        top: 50%;
-        left: 50%;
-        transform: translate(-50%, -50%);
-        color: #ffffff;
-        font-weight: 500;
-      }
+	  .maskModal {
+		width: 100%;
+		position: absolute;
+		background-color: rgba(0, 0, 0, 0.4);
+		border-radius: 32rpx;
+		height: 100%;
+		top: 0;
+		right: 0;
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		color: #fff;
+		font-size: 28rpx;
+		font-weight: bold;
+	  }
       .notice-content-font {
         font-size: 26rpx;
         color: #0d1937;

+ 25 - 20
pages/index/index.vue

@@ -112,7 +112,7 @@
       >
         <view
           class="park-box"
-          v-for="(item, index) in parkList"
+          v-for="(item) in parkList"
           :key="item.id"
           @click="goParkDetailFn(item.id)"
         >
@@ -206,23 +206,12 @@
         class="notice-content-box"
         v-for="(item, index) in attractList"
         :key="index"
-        style="justify-content: start; position: relative"
-        @click="goAttractDeatil(item.id)"
-        :class="{ unclick: item.time_type == 0 }"
+        style="justify-content: start;position: relative;"
+        @click="goAttractDeatil(item.id,item.time_type)"
       >
-        <view
-          v-if="!(item.time_type == 1)"
-          class="forward"
-          style="
-            position: absolute;
-            top: 50%;
-            left: 50%;
-            transform: translate(-50%, -50%);
-            color: #ffffff;
-            font-weight: 500;
-          "
-          >敬请期待</view
-        >
+	  <view class="maskModal" v-if="item.time_type == 0">
+	  	<text>敬请期待</text>
+	  </view>
         <image
           :src="item.pic_url"
           mode="aspectFill"
@@ -735,7 +724,8 @@ export default {
         url: "/pages/notice/notice_deatil?id=" + id,
       });
     },
-    goAttractDeatil(id) {
+    goAttractDeatil(id,type) {
+	  if(type == '0')return
       uni.navigateTo({
         url: "/pages/attract/attract_deatil?id=" + id,
       });
@@ -832,9 +822,9 @@ export default {
 .dot.active {
   background: #ff4e54;
 }
-.swiper-content {
+ .swiper-content {
   /* border-radius: 0 0 10% 10%; */
-}
+} 
 .page-nav-box {
   width: 80%;
   /* height: 320rpx; */
@@ -898,6 +888,21 @@ export default {
   margin-top: 20rpx;
   justify-content: space-between;
 }
+.maskModal {
+	width: 100%;
+	position: absolute;
+	background-color: rgba(0, 0, 0, 0.4);
+	border-radius: 32rpx;
+	height: 100%;
+	top: 0;
+	right: 0;
+	display: flex;
+	align-items: center;
+	justify-content: center;
+	color: #fff;
+	font-size: 28rpx;
+	font-weight: bold;
+	}
 .notice-content-font {
   font-size: 26rpx;
   color: #0d1937;