gemercheung пре 2 година
родитељ
комит
16798a07a8

+ 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=0505-01
+VUE_APP_DEBBUG_FLAG=0506-01

+ 7 - 2
packages/qjkankan-editor/src/components/materialListInMaterialSelector.vue

@@ -636,8 +636,13 @@ export default {
     ),
     onFileInputChange(e) {
       e.files.forEach(async (eachFile, i) => {
-        console.log("fileInputAcceptType", this.fileInputAcceptType);
-        if (this.fileInputAcceptType.indexOf(eachFile.type) <= -1) {
+        const extension = eachFile.name.split(".").pop();
+        console.log("extension", extension);
+        if (
+          this.fileInputAcceptType.indexOf(
+            String(extension).toLocaleLowerCase()
+          ) <= -1
+        ) {
           console.log("格式不对!");
           setTimeout(() => {
             this.$msg({

+ 59 - 39
packages/qjkankan-editor/src/views/base/customButtonSettings.vue

@@ -28,43 +28,31 @@
         <div class="left">
           <i class="iconfont icon-edit_input_arrow icon-expand"></i>
           <img
-            v-if="
-              item.type === '电话' &&
-              item.isShow
-            "
+            v-if="item.type === '电话' && item.isShow"
             :src="require('@/assets/images/icons/phone.svg')"
             class="button-icon"
             alt=""
           />
           <img
-            v-if="
-              item.type === '电话' &&
-              !item.isShow
-            "
+            v-if="item.type === '电话' && !item.isShow"
             :src="require('@/assets/images/icons/phone-dark.svg')"
             class="button-icon"
             alt=""
           />
           <img
-            v-if="
-              item.type === '链接' &&
-              item.isShow
-            "
+            v-if="item.type === '链接' && item.isShow"
             :src="require('@/assets/images/icons/link.svg')"
             class="button-icon"
             alt=""
           />
           <img
-            v-if="
-              item.type === '链接' &&
-              !item.isShow
-            "
+            v-if="item.type === '链接' && !item.isShow"
             :src="require('@/assets/images/icons/link-dark.svg')"
             class="button-icon"
             alt=""
           />
           <span class="button-name">
-            {{ getButtonTypeI18n(item.type)}}
+            {{ getButtonTypeI18n(item.type) }}
           </span>
         </div>
         <div class="right">
@@ -90,11 +78,17 @@
       </div>
       <div class="edit-content">
         <div class="edit-content-item">
-          <span class="item-name">{{ $i18n.t(`edit_settings.button_type`) }}</span>
-          <div style="margin-left: 16px">{{ getButtonTypeI18n(item.type) }}</div>
+          <span class="item-name">{{
+            $i18n.t(`edit_settings.button_type`)
+          }}</span>
+          <div style="margin-left: 16px">
+            {{ getButtonTypeI18n(item.type) }}
+          </div>
         </div>
         <div class="edit-content-item">
-          <span class="item-name">{{ $i18n.t(`edit_settings.button_name`) }}</span>
+          <span class="item-name">{{
+            $i18n.t(`edit_settings.button_name`)
+          }}</span>
           <div style="margin-left: 16px">
             {{ item.name }}
           </div>
@@ -105,15 +99,17 @@
             {{ item.value }}
           </div>
         </div>
-        <div class="edit-content-item">
-          <span class="item-name">{{ $i18n.t("edit_settings.button_open_method") }}</span>
+        <div class="edit-content-item" v-if="item.type !== '电话'">
+          <span class="item-name"
+            >{{ $i18n.t("edit_settings.button_open_method") }}</span
+          >
           <div style="margin-left: 16px">
             {{ $i18n.t(`zh_key.${item.openMethod}`) }}
           </div>
         </div>
       </div>
     </div>
-
+    <!-- 编辑框 -->
     <popup v-if="isEditing" :canClose="false">
       <div class="ui-message ui-message-confirm dark edit-window">
         <div class="ui-message-header">
@@ -125,7 +121,9 @@
 
         <div class="ui-message-main">
           <div class="edit-content-item">
-            <span class="item-name">{{ $i18n.t(`edit_settings.button_name`) }}</span>
+            <span class="item-name">{{
+              $i18n.t(`edit_settings.button_name`)
+            }}</span>
             <PulldownMenuInEditor
               class="selector"
               :valueList="buttonTypeList"
@@ -142,12 +140,16 @@
             <span class="item-name">{{ editingButtonValueTip }}</span>
             <input
               class="value-input"
-              :placeholder="`${$i18n.t(`edit_settings.please_input`)}${editingButtonValueTip}`"
+              :placeholder="`${$i18n.t(
+                `edit_settings.please_input`
+              )}${editingButtonValueTip}`"
               v-model="editingInfo.value"
             />
           </div>
-          <div class="edit-content-item">
-            <span class="item-name">{{ $i18n.t('edit_settings.button_open_method') }}</span>
+          <div class="edit-content-item full" v-if="!isNotPhoneMode">
+            <span class="item-name">{{
+              $i18n.t("edit_settings.button_open_method")
+            }}</span>
             <PulldownMenuInEditor
               class="selector"
               :valueList="buttonOpenMethodList"
@@ -185,7 +187,7 @@ export default {
     return {
       expandStatus: [],
       buttonTypeList: ["电话", "链接"],
-      buttonOpenMethodList: ['弹出层打开', '新窗口打开'],
+      buttonOpenMethodList: ["弹出层打开", "新窗口打开"],
       isEditing: false,
       editingButtonIdx: -1,
       editingInfo: {
@@ -200,6 +202,10 @@ export default {
     ...mapGetters({
       info: "info",
     }),
+    isNotPhoneMode() {
+      //TODO 这个模块都有用中文做为key value (惊了?)
+      return this.editingInfo.type === "电话";
+    },
     buttonValueTips() {
       if (this.info.customButton) {
         return this.info.customButton.map((item) => {
@@ -226,10 +232,19 @@ export default {
     },
   },
   watch: {
+    // editingInfo: {
+    //   handler(val) {
+    //     console.log("editingInfo-1", val);
+    //   },
+    //   immediate: true,
+    //   deep: true,
+    // },
     "editingInfo.type": {
-      handler(vNew) {
-        this.editingInfo.name = i18n.t(`zh_key.${vNew}`);
-        this.editingInfo.value = "";
+      handler(newValue, oldValue) {
+        this.editingInfo.name = i18n.t(`zh_key.${newValue}`);
+        if (oldValue && newValue !== oldValue) {
+          this.editingInfo.value = "";
+        }
       },
     },
   },
@@ -255,8 +270,8 @@ export default {
     }
     if (!this.info.customButton[0].openMethod) {
       // 这是在v1.3版之前创建的作品,还没设置过自定义按钮的打开方式。
-      this.info.customButton[0].openMethod = '弹出层打开'
-      this.info.customButton[1].openMethod = '弹出层打开'
+      this.info.customButton[0].openMethod = "弹出层打开";
+      this.info.customButton[1].openMethod = "弹出层打开";
     }
   },
   mounted() {
@@ -269,12 +284,12 @@ export default {
   },
   methods: {
     getButtonTypeI18n(buttonType) {
-      if (buttonType === '电话') {
+      if (buttonType === "电话") {
         return i18n.t("edit_settings.phone_short");
-      } else if (buttonType === '链接') {
+      } else if (buttonType === "链接") {
         return i18n.t("edit_settings.link_short");
       } else {
-        return ''
+        return "";
       }
     },
     onRequestForChangeExpandStatus(index) {
@@ -282,10 +297,11 @@ export default {
     },
     onRequestForEdit(index) {
       this.editingButtonIdx = index;
+
       this.editingInfo.type = this.info.customButton[index].type;
       this.editingInfo.name = this.info.customButton[index].name;
       this.editingInfo.value = this.info.customButton[index].value;
-      this.editingInfo.openMethod = this.info.customButton[index].openMethod
+      this.editingInfo.openMethod = this.info.customButton[index].openMethod;
       this.isEditing = true;
     },
     checkButtonName(name) {
@@ -541,7 +557,11 @@ export default {
         margin-top: 16px;
         display: flex;
         align-items: center;
-
+        &.full {
+          .selector {
+            width: 610px;
+          }
+        }
         > .item-name {
           flex: 0 0 auto;
           font-size: 14px;
@@ -588,4 +608,4 @@ export default {
     }
   }
 }
-</style>
+</style>

+ 9 - 10
packages/qjkankan-editor/src/views/hotspot/EditPanel.vue

@@ -55,7 +55,6 @@
               v-model.trim="hotspot.hotspotTitle"
               type="text"
               maxlength="50"
-              :placeholder="$i18n.t('hotspot.title_placeholder')"
             />
             <span class="count">{{ hotspot.hotspotTitle.length }}/50</span>
           </div>
@@ -444,15 +443,15 @@ export default {
           }
           break;
         case "serial_frame":
-          // if (
-          //   !this.hotspot.serialFrameInfo.img ||
-          //   this.hotspot.serialFrameInfo.frameNumber <= 0 ||
-          //   this.hotspot.serialFrameInfo <= 0
-          // ) {
-          //   return false;
-          // }
-
-          if (!this.hotspot.serialFrameInfo.img) {
+       
+          console.log(
+            "checker",
+            this.hotspot.serialFrameInfo
+          );
+          if (
+            this.hotspot.serialFrameInfo.img &&
+            this.hotspot.serialFrameInfo.img.length === 0
+          ) {
             return false;
           }
           break;

+ 5 - 4
packages/qjkankan-editor/src/views/hotspot/HotSpotList.vue

@@ -22,7 +22,6 @@
             })
           "
         >
-       
           <img class="icon" :src="item.icon" alt="" draggable="false" />
           <div class="type-name">{{ item.name }}</div>
           <img
@@ -178,7 +177,9 @@ export default {
     });
 
     this.$bus.on("openHotspot", (data) => {
-      let idx = this.someData.hotspots.findIndex((item) => item.name.toLowerCase() == data.toLowerCase());
+      let idx = this.someData.hotspots.findIndex(
+        (item) => item.name.toLowerCase() == data.toLowerCase()
+      );
       // console.log(data);
       if (data == this.hotspot.name) {
         window.__krfn.utils.looktohotspot(this.$getKrpano(), this.hotspot.name);
@@ -256,7 +257,8 @@ export default {
       this.currentScene.someData = this.someData;
       this.$msg.success(this.editTitle + this.$i18n.t("hotspot.success"));
 
-      window.g_hotspotCurrentScale = mapFontSize[data.fontSize] || 1;
+      // window.g_hotspotCurrentScale = mapFontSize[data.fontSize] || 1;
+      window.g_hotspotCurrentScale = Math.floor(data.fontSize / 12) || 1;
 
       let iidx = this.info.scenes.findIndex(
         (item) => this.currentScene.sceneCode == item.sceneCode
@@ -416,7 +418,6 @@ export default {
             textNumPerLine: 10,
           };
         }
-  
 
         // v1.3把visible: Boolean换成了titleDisplayMode
         if (hotspotData.visible) {

+ 2 - 6
packages/qjkankan-editor/src/views/hotspot/hotspotIconType/personalized_tag.vue

@@ -13,12 +13,8 @@
     <div class="remark-highlight">{{ $i18n.t("hotspot.hotspot_title") }}</div>
 
     <div class="title-input-wrapper">
-      <input
-        v-model.trim="hotspot.hotspotTitle"
-        type="text"
-        maxlength="50"
-        :placeholder="$i18n.t('hotspot.title_placeholder')"
-      />
+      <!-- :placeholder="$i18n.t('hotspot.title_placeholder')" -->
+      <input v-model.trim="hotspot.hotspotTitle" type="text" maxlength="50" />
       <span class="count">{{ hotspot.hotspotTitle.length }}/50</span>
     </div>
     <!-- <div class="title-input-wrapper has-textarea">

+ 9 - 8
packages/qjkankan-editor/src/views/hotspot/hotspotTypeList.js

@@ -64,14 +64,15 @@ export default [
     id: 'article',
     isExperience: true,
   },
-  {
-    icon: require('@/assets/images/icons/hotspot-type/pdf.png'),
-    idxInSystemIconList: 15,
-    name: i18n.t('hotspot.pdf'),
-    id: 'pdf',
-    isExperience: true,
-    tip: i18n.t('hotspot.MB_limit', {value: '50'})
-  },
+  //pdf暂时hide
+  // {
+  //   icon: require('@/assets/images/icons/hotspot-type/pdf.png'),
+  //   idxInSystemIconList: 15,
+  //   name: i18n.t('hotspot.pdf'),
+  //   id: 'pdf',
+  //   isExperience: true,
+  //   tip: i18n.t('hotspot.MB_limit', {value: '50'})
+  // },
   {
     icon: require('@/assets/images/icons/hotspot-type/phone.png'),
     idxInSystemIconList: 16,

+ 1 - 9
packages/qjkankan-editor/src/views/material/audio/index.vue

@@ -517,16 +517,8 @@ export default {
           eachFile.name,
           eachFile.name.toLowerCase().indexOf("mp3")
         );
-        console.log(
-          "check-audio-2",
-          eachFile.type,
-          eachFile.type.toLowerCase().indexOf("mp3")
    
-        );
-        if (
-          eachFile.name.toLowerCase().indexOf("mp3") <= -1 ||
-          eachFile.type.toLowerCase().indexOf("mp3") <= -1
-        ) {
+        if (eachFile.name.toLowerCase().indexOf("mp3") <= -1) {
           setTimeout(() => {
             this.$msg({
               message: `“${eachFile.name}”${i18n.t("gather.audio_fail")}`,

+ 2 - 2
packages/qjkankan-kankan-view/public/smg.html

@@ -28,8 +28,8 @@
 
         <script src="<%= BASE_URL %><%= VUE_APP_STATIC_DIR %>/static/lib/jweixin-1.6.0.js"></script>
         
-        <script src="<%= VUE_APP_SDK_DIR %>kankan-sdk-deps.js?v=4.8.2"></script>
-        <script src="<%= VUE_APP_SDK_DIR %>kankan-sdk.js?v=4.8.2"></script>
+        <script src="<%= VUE_APP_SDK_DIR %>kankan-sdk-deps.js?v=4.8.4"></script>
+        <script src="<%= VUE_APP_SDK_DIR %>kankan-sdk.js?v=4.8.4"></script>
 
         <!-- <script src="https://4dkk.4dage.com/v4/www/sdk/kankan-sdk-deps.js?v=4.0.0-alpha.44"></script>
         <script src="https://4dkk.4dage.com/v4/www/sdk/kankan-sdk.js?v=4.0.0-alpha.44"></script> -->

+ 2 - 2
packages/qjkankan-kankan-view/public/spg.html

@@ -17,8 +17,8 @@
         </noscript>
         <div id="app"></div>
         
-        <script src="<%= VUE_APP_SDK_DIR %>kankan-sdk-deps.js?v=4.8.2"></script>
-        <script src="<%= VUE_APP_SDK_DIR %>kankan-sdk.js?v=4.8.2"></script>
+        <script src="<%= VUE_APP_SDK_DIR %>kankan-sdk-deps.js?v=4.8.4"></script>
+        <script src="<%= VUE_APP_SDK_DIR %>kankan-sdk.js?v=4.8.4"></script>
 
         <!-- built files will be auto injected -->
     </body>

+ 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=0505-01
+VUE_APP_DEBBUG_FLAG=0506-01