gemercheung 2 gadi atpakaļ
vecāks
revīzija
7ae8087315

+ 2 - 2
packages/qjkankan-view/.env.testprod

@@ -7,7 +7,7 @@ VUE_APP_PROXY_URL='https://test.4dkankan.com/qjkankan/'
 VUE_APP_URL_FILL=/qjkankan
 # 接口请求地址
 VUE_APP_APIS_URL=https://test.4dkankan.com/
-VUE_APP_DEBBUG_FLAG=0616-01
-VUE_APP_DEBBUG_NOTIFY=1
+VUE_APP_DEBBUG_FLAG=0616-02
+VUE_APP_DEBBUG_NOTIFY=0
 VUE_APP_DEBBUG_V4=0
 VUE_APP_DEBBUG_V4_URL="http://192.168.0.186:8081"

+ 12 - 9
packages/qjkankan-view/src/components/assembly/OpeningMobile.vue

@@ -30,6 +30,7 @@
       x5-video-orientation="portraint"
       x5-video-player-fullscreen="true"
       class="video"
+      id="videoMo"
       ref="openvideo$"
       preload
       autoplay
@@ -358,20 +359,22 @@ onUnmounted(() => {
     openvideo$.value.addEventListener("ended", handleVideoEnded, false);
   }
 });
-function WeixinPlay(){
-  WeixinJSBridge.invoke('getNetworkType', {}, function (e) {
+function WeixinPlay() {
+  WeixinJSBridge.invoke("getNetworkType", {}, function (e) {
     openvideo$.value.play();
-  })
+  });
 }
 
-
 onMounted(async () => {
-  console.log("coverData", unref(props.coverData));
-  if (typeof wx != "undefined") {
-    await toConfigure();
-  }
-
   if (openvideo$.value) {
+    document.addEventListener("touchstart", function () {
+      function videoPlay() {
+        const video = document.getElementById("videoMo");
+        video && video.play();
+      }
+      videoPlay();
+    });
+
     openvideo$.value.addEventListener("ended", handleVideoEnded, false);
 
     openvideo$.value.addEventListener("playing", () => {

+ 3 - 2
packages/qjkankan-view/src/hooks/useAudio.js

@@ -134,7 +134,7 @@ class AudioPlayer {
   constructor(options) {
     this._src = options.src;
     this._loop = options.loop;
-    this._autoplay = options.autoplay;
+    this._autoplay = options.autoplay || false;
     this._isPlaying = false;
     this._firstPlay = false;
     this._lock = false;
@@ -223,7 +223,8 @@ class AudioPlayer {
       if (!this._isPlaying && !this._lock) {
         // console.log("play---1", this._autoplay, this._lock, this._firstPlay);
         console.log(
-          `playStatus: audioplay->${this._autoplay},lock:${this._lock},firstPlay:${this._firstPlay}`
+          `playStatus: audioplay->${this._autoplay},
+          lock:${this._lock},firstPlay:${this._firstPlay},loop:${this._loop}`
         );
         if (this._autoplay || this._firstPlay) {
           await this.audio.play();