gemercheung 2 tahun lalu
induk
melakukan
d4e1f1ab58

+ 1 - 1
packages/qjkankan-editor/.env.testprod

@@ -7,4 +7,4 @@ VUE_APP_PROXY_URL_ROOT='https://test.4dkankan.com'
 VUE_APP_PROXY_URL='https://test.4dkankan.com/qjkankan/'
 VUE_APP_ORIGIN=
 VUE_APP_URL_FILL=/qjkankan
-VUE_APP_DEBBUG_FLAG=0426-03
+VUE_APP_DEBBUG_FLAG=0426-04

+ 2 - 2
packages/qjkankan-editor/src/api/index.js

@@ -704,7 +704,7 @@ export function moveToFolder(list, targetId, ancestors) {
     if (res.code === 0) {
       return Promise.resolve(res)
     } else {
-      return Promise.resolve(false)
+      return Promise.reject(false)
     }
   })
 }
@@ -714,7 +714,7 @@ export async function delFolder(id) {
     if (res.code === 0) {
       return Promise.resolve(res)
     } else {
-      return Promise.resolve(false)
+      return Promise.reject(false)
     }
   })
   // return http.postJson(`${URL_FILL}/manage/dir/remove/${id}`, ok, no)

+ 1 - 1
packages/qjkankan-editor/src/components/selectedImageInEditor.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="img-wrapper">
     <img :src="realImage || defaultImgSrc" alt="" />
-    <div v-if="imgSrc" class="cancel-btn-background" @click="handleCancel">
+    <div v-if="realImage" class="cancel-btn-background" @click="handleCancel">
       <i class="iconfont icon-pop-ups_shut-down"></i>
     </div>
   </div>

+ 62 - 9
packages/qjkankan-editor/src/views/base/coverBase.vue

@@ -579,6 +579,8 @@ export default {
         coverImageOrder: "before",
         isShowCover: 0,
       },
+      //引用的素材ID
+      fodderId: [],
       coverImgBacList: [
         { txt: i18n.t("edit_settings.coverImgBacSelec1"), type: "colorFill" },
         { txt: i18n.t("edit_settings.coverImgBacSelec2"), type: "imgTile" },
@@ -608,9 +610,28 @@ export default {
     ...mapGetters({
       info: "info",
     }),
-    coverPc: () => this.info.coverInfo.coverPc,
   },
-  watch: {},
+  watch: {
+    "info.coverInfo": {
+      handler(val) {
+        if (val) {
+          const folderIds = [
+            val.coverPcId,
+            val.coverMoId,
+            val.videoPcId,
+            val.videoMoId,
+            val.coverImgBacId,
+            val.videoBacImgId,
+          ].filter((i) => i);
+          console.log("folderIds", folderIds);
+          this.folderIds = folderIds;
+          // this.info.coverInfo.fodderId = folderIds;
+        }
+      },
+      immediate: true,
+      deep: true,
+    },
+  },
   methods: {
     //是否显示
     onSwitcherChange(data) {
@@ -639,50 +660,82 @@ export default {
     handleSubmitFromMaterialSelector(selected) {
       // 点击确定的时候是选择的图片上传
       if (this.upTypeSta === "imgBac") {
-        if (this.selectingFor === "pc")
+        if (this.selectingFor === "pc") {
           this.info.coverInfo.coverPc = selected[0].icon;
-        else if (this.selectingFor === "mobile")
+          this.info.coverInfo.coverPcId = selected[0].id;
+        } else if (this.selectingFor === "mobile") {
           this.info.coverInfo.coverMo = selected[0].icon;
-        else this.info.coverInfo.coverBac = selected[0].icon;
+          this.info.coverInfo.coverMoId = selected[0].id;
+        } else {
+          this.info.coverInfo.coverBac = selected[0].icon;
+          this.info.coverInfo.coverBacId = selected[0].id;
+        }
       } else {
         // 视频上传
         if (this.selectingFor === "pc") {
           console.log(selected[0], "selected[0]");
           this.info.coverInfo.videoPc = selected[0].ossPath;
           this.info.coverInfo.videoPcIcon = selected[0].icon;
+          this.info.coverInfo.videoPcId = selected[0].id;
         } else if (this.selectingFor === "mobile") {
           this.info.coverInfo.videoMo = selected[0].ossPath;
+          this.info.coverInfo.videoMoId = selected[0].id;
           this.info.coverInfo.videoMoIcon = selected[0].icon;
-        } else this.info.coverInfo.videoBacImg = selected[0].icon;
+        } else {
+          this.info.coverInfo.videoBacImg = selected[0].icon;
+          this.info.coverInfo.videoBacImgId = selected[0].id;
+        }
       }
       this.isShowSelectionWindow = false;
+
+      this.updateFolderIds();
     },
     onCancelPcTip() {
       this.$nextTick(() => {
         this.info.coverInfo.coverPc = "";
-        console.log("onCancelPcTip-1",this.info.coverInfo);
+        this.info.coverInfo.coverPcId = null;
+        this.updateFolderIds();
+        console.log("onCancelPcTip-1", this.info.coverInfo);
       });
     },
     onCancelAppTip() {
       this.$nextTick(() => {
         this.info.coverInfo.coverMo = "";
-        console.log("onCancelPcTip-2", this.info.coverInfo);
+        this.info.coverInfo.coverMoId = null;
+        this.updateFolderIds();
       });
     },
     onCancelBac() {
-      this.info.coverInfo.coverBac = "";
+      this.$nextTick(() => {
+        this.info.coverInfo.coverBac = "";
+        this.info.coverInfo.coverBacId = null;
+        this.updateFolderIds();
+      });
     },
     // 关于视频
     clearVideoPc() {
       this.info.coverInfo.videoPc = "";
+      this.info.coverInfo.videoPcId = null;
       this.info.coverInfo.videoPcIcon = "";
+      this.updateFolderIds();
     },
     clearVideoMo() {
       this.info.coverInfo.videoMo = "";
+      this.info.coverInfo.videoMoId = null;
       this.info.coverInfo.videoMoIcon = "";
+      this.updateFolderIds();
     },
     onCancelBac2() {
       this.info.coverInfo.videoBacImg = "";
+      this.info.coverInfo.videoBacImgId = null;
+      this.updateFolderIds();
+    },
+    updateFolderIds() {
+      //fodderId 以前的字段有误在先
+      setTimeout(() => {
+        console.log("updateFolderIds:", this.folderIds);
+        this.info.coverInfo.fodderId = this.folderIds;
+      }, 300);
     },
   },
   created() {

+ 34 - 31
packages/qjkankan-editor/src/views/base/customLogoSettings.vue

@@ -1,31 +1,33 @@
 <template>
   <div class="custom-logo-settings">
-    <span class="title">{{$i18n.t(`edit_settings.custom_logo`)}}</span>
-    <br>
+    <span class="title">{{ $i18n.t(`edit_settings.custom_logo`) }}</span>
+    <br />
     <div class="switch-wrapper">
-      <span class="label">{{$i18n.t(`edit_settings.show_logo`)}}</span>
+      <span class="label">{{ $i18n.t(`edit_settings.show_logo`) }}</span>
       <Switcher :value="info.isLogo" @change="onSwitcherChange"></Switcher>
     </div>
-    <div class="bottom" :class="{disabled: !info.isLogo}">
-        <SelectedImage
-          :imgSrc="info.logo"
-          :defaultImgSrc="require(`@/assets/images/default/logo_white_${$lang}.svg`)"
-          @cancel="onClickCancelCustomLogo"
-        ></SelectedImage>
+    <div class="bottom" :class="{ disabled: !info.isLogo }">
+      <SelectedImage
+        :imgSrc="info.logo"
+        :defaultImgSrc="
+          require(`@/assets/images/default/logo_white_${$lang}.svg`)
+        "
+        @cancel="onClickCancelCustomLogo"
+      ></SelectedImage>
       <div class="bottom-right">
-        <img 
+        <img
           class="select-pic-btn"
-          :src="require(`@/assets/images/select_pic_btn_${$lang}.png`)" alt=""
+          :src="require(`@/assets/images/select_pic_btn_${$lang}.png`)"
+          alt=""
           @click="onClickSelectingPicBtn"
-        >
+        />
         <!-- <button
           class="ui-button submit"
           @click="onClickSelectingPicBtn"
         >
           选择图片
         </button> -->
-        <div class="remark" v-html="$i18n.t(`edit_settings.logo_size`)">
-        </div>
+        <div class="remark" v-html="$i18n.t(`edit_settings.logo_size`)"></div>
       </div>
     </div>
 
@@ -55,22 +57,22 @@ export default {
   },
   data() {
     return {
-      password:'',
+      password: "",
       canSee: false,
       isShowSelectionWindow: false,
-    }
+    };
   },
   computed: {
     ...mapGetters({
-      info:'info'
-    })
+      info: "info",
+    }),
   },
   methods: {
     onSwitcherChange(data) {
-      this.info.isLogo = data
+      this.info.isLogo = data;
     },
     onClickSelectingPicBtn() {
-      this.isShowSelectionWindow = true
+      this.isShowSelectionWindow = true;
       // getUserInfo((res) => {
       //   try {
       //     if (res.data.incrementNum > 0) {
@@ -85,18 +87,19 @@ export default {
       // })
     },
     handleSubmitFromMaterialSelector(selected) {
-      this.info.logo = selected[0].icon
-      this.info.logoChange = true
-      this.isShowSelectionWindow = false
+      this.info.logo = selected[0].icon;
+      this.info.logoId = selected[0].id;
+      this.info.logoChange = true;
+      this.isShowSelectionWindow = false;
     },
     onClickCancelCustomLogo() {
-      this.info.logo = ''
-      this.info.logoChange = false
-    }
+      this.info.logo = "";
+      this.info.logoId = "";
+      this.info.logoChange = false;
+    },
   },
-  mounted() {
-  }
-}
+  mounted() {},
+};
 </script>
 
 <style lang="less" scoped>
@@ -106,7 +109,7 @@ export default {
   height: 546px;
   .title {
     font-size: 18px;
-    color: #FFFFFF;
+    color: #ffffff;
   }
   .switch-wrapper {
     display: flex;
@@ -170,4 +173,4 @@ export default {
     }
   }
 }
-</style>
+</style>

+ 2 - 0
packages/qjkankan-editor/src/views/base/customMaskSettings.vue

@@ -114,10 +114,12 @@ export default {
     },
     handleSubmitFromMaterialSelector(selected) {
       this.info.customMask[this.selectingFor].icon = selected[0].icon
+      this.info.customMask[this.selectingFor].fodderId = selected[0].id
       this.isShowSelectionWindow = false
     },
     onCancelSelection(cancelFor) {
       this.info.customMask[cancelFor].icon = ''
+      this.info.customMask[cancelFor].fodderId = ''
     },
   },
   mounted() {

+ 4 - 0
packages/qjkankan-editor/src/views/base/openingTipSettings.vue

@@ -98,16 +98,20 @@ export default {
     handleSubmitFromMaterialSelector(selected) {
       if (this.selectingFor === 'pc') {
         this.info.pcIcon = selected[0].icon
+        this.info.pcIconId = selected[0].id
       } else if (this.selectingFor === 'mobile') {
         this.info.appIcon = selected[0].icon
+        this.info.appIconId = selected[0].id
       }
       this.isShowSelectionWindow = false
     },
     onCancelPcTip() {
       this.info.pcIcon = ''
+      this.info.pcIconId = null
     },
     onCancelAppTip() {
       this.info.appIcon = ''
+      this.info.appIconId = null
     },
     onSwitcherChange(data){
       this.info.isRemind = data

+ 4 - 4
packages/qjkankan-editor/src/views/material/popup/cover.vue

@@ -111,8 +111,8 @@ export default {
 
 <style lang="less" scoped>
 .ui-message-confirm {
-  width: 472px;
-  height: 421px;
+  width: 682px;
+  height: 521px;
   overflow: visible;
 
   .icon_close {
@@ -127,8 +127,8 @@ export default {
       > iframe,
       > img {
         margin-bottom: 10px;
-        width: 200px;
-        height: 200px;
+        width: 300px;
+        height: 300px;
         border-radius: 4px;
       }
       > div {

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

@@ -6,4 +6,4 @@ 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=0426-03
+VUE_APP_DEBBUG_FLAG=0426-04

+ 5 - 3
packages/qjkankan-view/src/components/assembly/Opening.vue

@@ -226,8 +226,9 @@ const handleVideoPlay = () => {
 const startImageCount = () => {
   imgTimer.value = setInterval(() => {
     countdownImg.value--;
-    if (countdownImg.value == 0) {
+    if (countdownImg.value <= 0) {
       clearInterval(imgTimer.value);
+      countdownImg.value = 0;
       isImageCountDone.value = true;
       imgTimer.value = null;
       return;
@@ -239,8 +240,9 @@ const startVideoCount = () => {
   videoIndex.value = nextIndex;
   videotimer.value = setInterval(() => {
     countdownVideo.value--;
-    if (countdownVideo.value == 0) {
+    if (countdownVideo.value <= 0) {
       clearInterval(videotimer.value);
+      countdownVideo.value = 0;
       isVideoCountDone.value = true;
       videotimer.value = null;
       return;
@@ -322,7 +324,7 @@ watch(
 //跳转到app
 const toApp = () => {
   if (!unref(isToApp)) {
-    console.log("跳转到app",unref(isToApp));
+    console.log("跳转到app", unref(isToApp));
     imgShow.value = false;
     videoShow.value = false;
     isToApp.value = true;

+ 4 - 2
packages/qjkankan-view/src/components/assembly/OpeningMobile.vue

@@ -228,8 +228,9 @@ const jumpVideo = () => {
 const startImageCount = () => {
   imgTimer.value = setInterval(() => {
     countdownImg.value--;
-    if (countdownImg.value == 0) {
+    if (countdownImg.value <= 0) {
       clearInterval(imgTimer.value);
+      countdownImg.value = 0
       isImageCountDone.value = true;
       imgTimer.value = null;
       return;
@@ -241,8 +242,9 @@ const startVideoCount = () => {
   videoIndex.value = nextIndex;
   videotimer.value = setInterval(() => {
     countdownVideo.value--;
-    if (countdownVideo.value == 0) {
+    if (countdownVideo.value <= 0) {
       clearInterval(videotimer.value);
+      countdownVideo.value = 0
       isVideoCountDone.value = true;
       videotimer.value = null;
       return;

+ 1 - 0
packages/qjkankan-view/src/components/assembly/Password.vue

@@ -66,6 +66,7 @@ watch(passwordkey, () => {
     show.value = true;
   } else {
     getApp().Scene.unlock();
+    this.$emit("pass");
   }
 });
 </script>

+ 11 - 3
packages/qjkankan-view/src/pages/show.vue

@@ -1,8 +1,11 @@
 <template>
   <template v-if="workEnable">
     <LoadingLogo />
-    <Opening :coverData="coverInfo" v-if="coverInfo.isShowCover" />
-    <Password />
+    <Opening
+      :coverData="coverInfo"
+      v-if="coverInfo.isShowCover && !hasPasswordLock"
+    />
+    <Password @pass="hasPasswordLock = false" />
     <Share />
     <div class="ui-view-layout" :class="{ show: show }">
       <Pano />
@@ -50,6 +53,7 @@ const store = useStore();
 const show = ref(false);
 const workEnable = ref(true);
 const coverInfo = ref({});
+const hasPasswordLock = ref(false);
 
 const lang = getLocale();
 
@@ -84,6 +88,10 @@ onMounted(async () => {
       "scene/setPassword",
       data.password === "" ? false : data.password
     );
+    if (data.password.length > 0) {
+      hasPasswordLock.value = true;
+    }
+
     store.commit("scene/setMetaData", data);
     document.title = data.name || t("common.no_title");
 
@@ -169,7 +177,7 @@ onMounted(async () => {
       },
       passQueryParameters: true,
     });
-    console.log('gemer',currentScene.value.icon);
+    console.log("gemer", currentScene.value.icon);
 
     coverInfo.value = data.coverInfo || {};
     app.Scene.lock();