Browse Source

修复权限弹窗效果

xiebaomin 2 years ago
parent
commit
88e8fdaa85
2 changed files with 26 additions and 5 deletions
  1. 25 4
      pages/goods/components/cm-product-doc.vue
  2. 1 1
      pages/goods/product.vue

+ 25 - 4
pages/goods/components/cm-product-doc.vue

@@ -98,7 +98,7 @@
             class="cm-login"
             :class="{ maxBottom: !bottom && isIphoneX }"
             :style="{ bottom: bottom }"
-            v-if="TipStatus"
+            v-if="TipStatus && tipStatus"
         >
             <text>{{ TipStatus.text }}</text>
             <view class="cm-btn" @click="nextAction(TipStatus.redirect)">{{ TipStatus.btn }}</view>
@@ -109,7 +109,7 @@
             :content="TipStatus.text"
             shape="circle"
             :button="modalButton"
-            fadeIn
+            :fadeIn="true"
             @click="handleModalClick"
         ></tui-modal>
     </view>
@@ -162,7 +162,9 @@ export default {
             fileArchiveList: [], // 文件资料列表
             defaultImage: 'https://static.caimei365.com/app/img/icon2/PC-default.png', // 默认图片
             videoCover: 'https://static.caimei365.com/app/img/icon2/video-cover.png', //默认视频封面
-            videoStyle: {}
+            videoStyle: {},
+            timer: null,
+            tipStatus: true, // 状态
         }
     },
     computed: {
@@ -184,6 +186,13 @@ export default {
     },
     watch: {
         TipStatus(val) {
+            if(this.TipStatus) {
+                this.timer = setTimeout(()=>{
+                    this.tipStatus = false
+                    clearTimeout(this.timer)
+                }, 10000)
+            }
+            console.log(val)
             this.$emit('tipStatus', this.TipStatus)
         }
     },
@@ -465,7 +474,10 @@ export default {
     box-sizing: border-box;
     z-index: 9;
     &.maxBottom {
-        bottom: 175rpx;
+        bottom: -100rpx;
+        z-index: 999;
+        animation: permiMove .3s ease-in-out;
+        animation-fill-mode: forwards;
     }
     text {
         font-size: 26rpx;
@@ -626,4 +638,13 @@ export default {
         }
     }
 }
+
+@keyframes permiMove {
+    0% {
+        bottom: -100rpx;
+    }
+    100% {
+        bottom: 180rpx;
+    }
+}
 </style>

+ 1 - 1
pages/goods/product.vue

@@ -337,7 +337,7 @@
 					</view>
 				</view>
 				<!-- 相关资料 -->
-				<view class="product-details recommend product-details4" v-show="tabCurrentIndex === 4">
+				<view class="product-details recommend product-details4" v-if="tabCurrentIndex === 4">
 					<cm-product-doc
 						@previewImage="changePreViewImageStatus"
 						:archiveId="product.archiveId"