sys пре 2 година
родитељ
комит
91f467ba10
3 измењених фајлова са 15 додато и 9 уклоњено
  1. 1 1
      pages.json
  2. 10 5
      pages/login/index.vue
  3. 4 3
      pages/login/model/loginContent.nvue

+ 1 - 1
pages.json

@@ -4,7 +4,7 @@
       "path": "pages/login/index",
       "style": {
         "navigationStyle": "custom",
-        "navigationBarTitleText": "登陆首页",
+        "navigationBarTitleText": "登陆",
         "enablePullDownRefresh": false,
         "app-plus": {
           "subNVues": [

+ 10 - 5
pages/login/index.vue

@@ -9,7 +9,9 @@
              :muted="true"
              :loop="true"
              id="videoRef"
-             class="video">
+             class="video"
+          @loadedmetadata="videoPlay"
+      >
       </video>
     </view>
     <login-content v-if="showContent"></login-content>
@@ -24,7 +26,8 @@ export default {
   data() {
     return {
       VideoContext: {},
-      showContent:false
+      showContent:false,
+      isPlay:false
     }
   },
   onLoad(query) {
@@ -35,12 +38,14 @@ export default {
   onShow() {
     // 当app切到后台再切回前台的时候会触发onShow这个时候视频应该继续播放,不这样做视频会暂停的
     this.$nextTick(() => {
-      this.VideoContext = uni.createVideoContext('videoRef');
-      this.VideoContext.play()
+        this.videoPlay()
     })
   },
   methods: {
-
+    videoPlay(){
+      this.VideoContext = uni.createVideoContext('videoRef');
+      this.VideoContext.play()
+    }
   }
 }
 </script>

+ 4 - 3
pages/login/model/loginContent.nvue

@@ -1,6 +1,6 @@
 <template>
   <view class="login-content" @touchmove.stop.prevent>
-    <view class="data">
+    <view class="data" >
       <view class="data-img">
         <image :style="{'margin-left':((windowWidth-124)/2)+'rpx'}" class="img" src="/static/img/common/logo.png" mode="aspectFill"></image>
       </view>
@@ -9,11 +9,11 @@
           ICOCO是为了人们摆脱自己单身的生活 而去结交 认识他人的过程一个网络交友平台
         </text>
       </view>
-      <view class="data-but" @click="goToLogin" >
+      <view class="data-but" @click.stop="goToLogin" >
         <!--          开始ICOCO-->
         <image class="but-img" src="/static/img/login/login-but.png" mode="aspectFill"></image>
       </view>
-      <login-agreement></login-agreement>
+      <login-agreement ></login-agreement>
 
     </view>
   </view>
@@ -41,6 +41,7 @@ export default {
     // console.log('width:'+width)
   },
   methods: {
+
     goToLogin(){
       uni.navigateTo({
         'url':'/pages/login/localPhoneLogin'