harry před 1 rokem
rodič
revize
ec16b23932

+ 15 - 2
src/components/VideoSwiper/index.less

@@ -19,14 +19,15 @@
                 height: calc(100% - 6px);
             }
 
-            .plaBtn {
+            .playBtn {
                 position: absolute;
                 left: 50%;
                 top: 50%;
                 transform: translateX(-50%) translateY(-50%);
+
                 image {
                     width: 110px;
-                    height: 100px;
+                    height: 110px;
                 }
             }
 
@@ -148,6 +149,8 @@
                         padding: 0;
                         background: transparent;
                         color: #fff;
+                        line-height: 50px;
+                        font-weight: 500;
 
                         Image {
                             width: 120px;
@@ -155,6 +158,10 @@
                             margin-bottom: 20px;
                         }
                     }
+
+                    .right::after {
+                        border: none;
+                    }
                 }
 
                 .more-video {
@@ -263,6 +270,7 @@
                     width: 30px;
                     font-size: 30px;
                     line-height: 44px;
+                    font-weight: 400;
                 }
 
             }
@@ -288,9 +296,14 @@
                     width: 90px;
                     font-size: 22px;
                     line-height: 30px;
+                    font-weight: 400;
                 }
             }
 
+            .pyq::after {
+                border: none;
+            }
+
             .more {
                 height: 60px;
                 display: flex;

+ 3 - 3
src/components/VideoSwiper/index.tsx

@@ -337,8 +337,8 @@ function CustomVideo({ video, current, index, onTimeUpdate, onProgressMove, need
         let { width = 375 } = systemInfo.safeArea
 
         // 移动中
-        //计算 seek 进度,并设置播放器 seek。 等比设置:拖动屏幕宽距离,偏移 50% 进度
-        let rate = distance / width * 0.5
+        //计算 seek 进度,并设置播放器 seek。 等比设置:拖动屏幕宽距离,偏移 90% 进度
+        let rate = distance / width * 0.9
         return rate
     }
 
@@ -360,7 +360,7 @@ function CustomVideo({ video, current, index, onTimeUpdate, onProgressMove, need
                 onSeekComplete={onSeekCom}
                 onTap={onTapVideo}
             />
-            {(playerState == PlayState.pause) && <View className='plaBtn'>
+            {(playerState == PlayState.pause) && <View className='playBtn'>
                 <Image src='http://weapppiccdn.yishihui.com/wxicon/common/icon_play_btn_dark2.png'/>
             </View>}
             <View className='progress-bg'

+ 13 - 3
src/components/VideoSwiper/index.wxss

@@ -18,15 +18,15 @@
   width: 100%;
   height: calc(100% - 6px);
 }
-.video-swiper .video-swiper-item .custom-video .plaBtn {
+.video-swiper .video-swiper-item .custom-video .playBtn {
   position: absolute;
   left: 50%;
   top: 50%;
   transform: translateX(-50%) translateY(-50%);
 }
-.video-swiper .video-swiper-item .custom-video .plaBtn image {
+.video-swiper .video-swiper-item .custom-video .playBtn image {
   width: 110px;
-  height: 100px;
+  height: 110px;
 }
 .video-swiper .video-swiper-item .custom-video .progress-bg {
   position: absolute;
@@ -134,12 +134,17 @@
   padding: 0;
   background: transparent;
   color: #fff;
+  line-height: 50px;
+  font-weight: 500;
 }
 .video-swiper .video-swiper-item .custom-video .video-play-end-cover .container .item Image {
   width: 120px;
   height: 120px;
   margin-bottom: 20px;
 }
+.video-swiper .video-swiper-item .custom-video .video-play-end-cover .container .right::after {
+  border: none;
+}
 .video-swiper .video-swiper-item .custom-video .video-play-end-cover .more-video {
   position: relative;
   width: 100%;
@@ -233,6 +238,7 @@
   width: 30px;
   font-size: 30px;
   line-height: 44px;
+  font-weight: 400;
 }
 .video-swiper .video-swiper-item .video-bar .pyq {
   display: flex;
@@ -254,6 +260,10 @@
   width: 90px;
   font-size: 22px;
   line-height: 30px;
+  font-weight: 400;
+}
+.video-swiper .video-swiper-item .video-bar .pyq::after {
+  border: none;
 }
 .video-swiper .video-swiper-item .video-bar .more {
   height: 60px;

+ 7 - 6
src/custom-tab-bar/index.tsx

@@ -1,6 +1,6 @@
 import { Component } from 'react'
 import Taro from '@tarojs/taro'
-import { CoverView, View } from '@tarojs/components'
+import { CoverView } from '@tarojs/components'
 
 import './index.less'
 
@@ -24,19 +24,20 @@ export default class Index extends Component {
     }
 
     switchTab(index, url) {
-        this.setSelected(index)
-        Taro.switchTab({ url })
+        if ( this.state.selected != index) {
+            // this.setSelected(index)
+            Taro.switchTab({ url })
+        }
     }
 
     setSelected(idx: number) {
-        this.setState({
+        this.state.selected != idx && this.setState({
             selected: idx
         })
     }
 
     render() {
         const { list, selected, color, selectedColor, backgroundColor, fontSize } = this.state
-
         return (
             <CoverView className='tab-bar' style={{ backgroundColor: backgroundColor }}>
                 <CoverView className='tab-bar-border'></CoverView>
@@ -44,7 +45,7 @@ export default class Index extends Component {
                     return (
                         <CoverView key={index} className='tab-bar-item' onClick={this.switchTab.bind(this, index, item.pagePath)}>
                             <CoverView style={{ color: selected === index ? selectedColor : color, fontSize: fontSize }}>{item.text}</CoverView>
-                            <View className='line' style={{ backgroundColor: selected === index ? 'white' : 'transparent' }}></View>
+                            <CoverView className='line' style={{ backgroundColor: selected === index ? 'white' : 'transparent' }}></CoverView>
                         </CoverView>
                     )
                 })}