gemercheung 2 rokov pred
rodič
commit
30a7bb798d

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

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

@@ -636,6 +636,7 @@ export default {
     ),
     onFileInputChange(e) {
       e.files.forEach(async (eachFile, i) => {
+        console.log("fileInputAcceptType", this.fileInputAcceptType);
         if (this.fileInputAcceptType.indexOf(eachFile.type) <= -1) {
           console.log("格式不对!");
           setTimeout(() => {
@@ -1054,8 +1055,8 @@ export default {
 </style>
 
 <style lang="less">
-
-.material-list,.material-list.dark {
+.material-list,
+.material-list.dark {
   .crumbs {
     // display: none;
     ul > li {

+ 62 - 59
packages/qjkankan-editor/src/components/shared/UploadFile.vue

@@ -1,74 +1,77 @@
 <template>
-    <input ref="file" type="file" name="file" id style="display:none" />
+  <input ref="file" type="file" name="file" id style="display: none" />
 </template>
 <script>
 import * as fileInfo from "../../utils/file";
+
 export default {
-    props: {
-        mediaType: String
-    },
-    data() {
-        return {
-            ext: "",
-            name: "",
-            type: "",
-            size: 0,
-        };
-    },
-    mounted() {
-        this.$el.addEventListener("change", e => {
-            if (!window.FileReader) {
-                this.$confirm({ content: this.$t('common.uploads.cant_upload') });
-                return;
-            }
+  props: {
+    mediaType: String,
+  },
+  data() {
+    return {
+      ext: "",
+      name: "",
+      type: "",
+      size: 0,
+    };
+  },
+  mounted() {
+    this.$el.addEventListener("change", (e) => {
+      if (!window.FileReader) {
+        this.$confirm({ content: this.$t("common.uploads.cant_upload") });
+        return;
+      }
 
-            if (e.target.files.length === 0) {
-                this.ext = "";
-                this.name = "";
-                this.type = "";
-                this.size = 0;
-                this.dataURL = "";
-                return;
-            }
+      if (e.target.files.length === 0) {
+        this.ext = "";
+        this.name = "";
+        this.type = "";
+        this.size = 0;
+        this.dataURL = "";
+        return;
+      }
 
-            const file = e.target.files[0];
+      const file = e.target.files[0];
 
-            if (!fileInfo.checkMediaMime(this.mediaType, file.name)) {
-                return this.$confirm({
-                    content: this.$t('common.uploads.not_support', { fileType: fileInfo.mediaTypes[this.mediaType]})
-                });
-            }
+      if (!fileInfo.checkMediaMime(this.mediaType, file.name)) {
+        return this.$confirm({
+          content: this.$t("common.uploads.not_support", {
+            fileType: fileInfo.mediaTypes[this.mediaType],
+          }),
+        });
+      }
 
-            if (!fileInfo.checkSizeLimit(this.mediaType, file.size)) {
-                return this.$confirm({
-                    content: this.$t('common.uploads.not_support', { fileType: fileInfo.mediaMaxSize[this.mediaType]})
-                });
-            }
+      if (!fileInfo.checkSizeLimit(this.mediaType, file.size)) {
+        return this.$confirm({
+          content: this.$t("common.uploads.not_support", {
+            fileType: fileInfo.mediaMaxSize[this.mediaType],
+          }),
+        });
+      }
 
-            const reader = new FileReader();
+      const reader = new FileReader();
 
-            reader.readAsDataURL(file);
+      reader.readAsDataURL(file);
 
-            reader.onload = e => {
-                this.dataURL && window.URL.revokeObjectURL(this.dataURL);
-                this.name = file.name
-                this.type = file.type
-                this.mime =  fileInfo.getMime(file.name)
-                this.size = file.size
-                this.dataURL = fileInfo.base64ToDataURL(e.target.result)
-                this.$emit("file-change", this, e);
-            };
+      reader.onload = (e) => {
+        this.dataURL && window.URL.revokeObjectURL(this.dataURL);
+        this.name = file.name;
+        this.type = file.type;
+        this.mime = fileInfo.getMime(file.name);
+        this.size = file.size;
+        this.dataURL = fileInfo.base64ToDataURL(e.target.result);
+        this.$emit("file-change", this, e);
+      };
 
-            e.target.value = ''
-        });
+      e.target.value = "";
+    });
+  },
+  methods: {
+    click() {
+      this.$el.click();
     },
-    methods: {
-        click() {
-            this.$el.click();
-        },
-        upload(){
-
-        }
-    }
+    upload() {},
+  },
 };
-</script>
+</script>

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

@@ -182,7 +182,7 @@ export default {
       if (data == this.hotspot.name) {
         window.__krfn.utils.looktohotspot(this.$getKrpano(), this.hotspot.name);
         if (!this.showPanel) {
-          debugger
+          // debugger
           this.open(this.someData.hotspots[idx]);
         }
         return;

+ 63 - 21
packages/qjkankan-editor/src/views/hotspot/hotspotIconType/personalized_tag.vue

@@ -11,7 +11,17 @@
     <div class="svg-wrapper"></div>
 
     <div class="remark-highlight">{{ $i18n.t("hotspot.hotspot_title") }}</div>
-    <div class="title-input-wrapper has-textarea">
+
+    <div class="title-input-wrapper">
+      <input
+        v-model.trim="hotspot.hotspotTitle"
+        type="text"
+        maxlength="50"
+        :placeholder="$i18n.t('hotspot.title_placeholder')"
+      />
+      <span class="count">{{ hotspot.hotspotTitle.length }}/50</span>
+    </div>
+    <!-- <div class="title-input-wrapper has-textarea">
       <Input
         ref="titleTextarea"
         class="titleTextarea"
@@ -21,8 +31,9 @@
         :autosize="{ minRows: 3}"
         :placeholder="$i18n.t('hotspot.title_placeholder')"
       />
+      
       <span class="count">{{ hotspot.hotspotTitle.length }}/50</span>
-    </div>
+    </div> -->
 
     <div class="remark">{{ $i18n.t("hotspot.hotspot_title") }}</div>
     <div class="color-picker-wrap">
@@ -495,10 +506,48 @@ export default {
     border: 1px solid #404040;
   }
 
+  // > .title-input-wrapper {
+  //   position: relative;
+  //   border: 1px solid rgba(151, 151, 151, 0.2);
+  //   padding: 5px 0;
+  //   background: #1a1b1d;
+  //   border-radius: 2px;
+  //   height: 36px;
+  //   width: 100%;
+  //   margin-top: 18px;
+  //   &:focus-within {
+  //     border-color: #0076f6;
+  //   }
+  //   > input,
+  //   textarea {
+  //     border: none;
+  //     background: transparent;
+  //     outline: none;
+  //     height: 100%;
+  //     width: calc(100% - 50px);
+  //     padding: 0;
+  //     color: #fff;
+  //     letter-spacing: 1px;
+  //     font-size: 14px;
+  //   }
+  //   &.has-textarea {
+  //     min-height: 72px;
+  //     height: auto;
+  //     position: relative;
+  //   }
+  //   > .count {
+  //     position: absolute;
+  //     bottom: 10px;
+  //     // transform: translateY(-50%);
+  //     right: 10px;
+  //     font-size: 14px;
+  //     color: rgba(255, 255, 255, 0.2);
+  //   }
+  // }
   > .title-input-wrapper {
     position: relative;
     border: 1px solid rgba(151, 151, 151, 0.2);
-    padding: 5px 0;
+    padding: 0 16px;
     background: #1a1b1d;
     border-radius: 2px;
     height: 36px;
@@ -507,8 +556,7 @@ export default {
     &:focus-within {
       border-color: #0076f6;
     }
-    > input,
-    textarea {
+    > input {
       border: none;
       background: transparent;
       outline: none;
@@ -519,21 +567,15 @@ export default {
       letter-spacing: 1px;
       font-size: 14px;
     }
-    &.has-textarea {
-      min-height: 72px;
-      height: auto;
-      position: relative;
-    }
     > .count {
       position: absolute;
-      bottom: 10px;
-      // transform: translateY(-50%);
-      right: 10px;
+      top: 50%;
+      transform: translateY(-50%);
+      right: 16px;
       font-size: 14px;
       color: rgba(255, 255, 255, 0.2);
     }
   }
-
   > .color-picker-wrap {
     margin-top: 16px;
     height: 36px;
@@ -603,11 +645,11 @@ export default {
 }
 </style>
 <style lang="less">
-.title-input-wrapper {
-  .el-textarea__inner {
-    background-color: transparent;
-    color: white;
-    border: none;
-  }
-}
+// .title-input-wrapper {
+//   .el-textarea__inner {
+//     background-color: transparent;
+//     color: white;
+//     border: none;
+//   }
+// }
 </style>

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

@@ -347,6 +347,7 @@ export default {
     onUploadFile() {
       checkUserSize({}, (data) => {
         //判断已用是否大于3G
+
         if (data.data / 1024 / 1024 > 3) {
           this.$alert({ content: i18n.t("tips_code.FAILURE_3024") });
         } else {
@@ -511,7 +512,18 @@ export default {
     },
     onFileChange(e) {
       e.files.forEach((eachFile, i) => {
-        if (eachFile.name.toLowerCase().indexOf("mp3") <= -1) {
+        console.log(
+          "check-audio-1",
+          eachFile.name.toLowerCase().indexOf("mp3")
+        );
+        console.log(
+          "check-audio-2",
+          eachFile.type.toLowerCase().indexOf("mp3")
+        );
+        if (
+          eachFile.name.toLowerCase().indexOf("mp3") <= -1 ||
+          eachFile.type.toLowerCase().indexOf("mp3") <= -1
+        ) {
           setTimeout(() => {
             this.$msg({
               message: `“${eachFile.name}”${i18n.t("gather.audio_fail")}`,

+ 5 - 2
packages/qjkankan-editor/src/views/material/video/index.vue

@@ -12,7 +12,7 @@
       </div>
     </div>
     <div class="second-line" :class="{ disabled: searchKey }">
-      <template >
+      <template>
         <div class="btn">
           <button
             @mouseover.stop="showList = true"
@@ -515,7 +515,10 @@ export default {
     },
     onFileChange(e) {
       e.files.forEach((eachFile, i) => {
-        if (eachFile.name.toLowerCase().indexOf("mp4") <= -1) {
+        if (
+          eachFile.name.toLowerCase().indexOf("mp4") <= -1 ||
+          eachFile.type.toLowerCase().indexOf("mp4") <= -1
+        ) {
           setTimeout(() => {
             this.$msg({
               message: `“${eachFile.name}”${i18n.t("gather.video_fail")}`,

+ 3 - 3
packages/qjkankan-kankan-view/.env.testprod

@@ -3,10 +3,10 @@ NODE_ENV=production
 VUE_APP_RESOURCE_URL=https://4dkk.4dage.com/
 # 静态资源地址
 VUE_APP_CDN_URL=https://4dkk.4dage.com/v4/www/
-# sdk文件地址
-# VUE_APP_SDK_DIR=https://4dkk.4dage.com/v4/www/sdk/
+# sdk 正式服
+VUE_APP_SDK_DIR=https://4dkk.4dage.com/v4/www/sdk/
 # sdk 测试服
-VUE_APP_SDK_DIR=https://4dkk.4dage.com/v4-test/www/sdk/ 
+# VUE_APP_SDK_DIR=https://4dkk.4dage.com/v4-test/www/sdk/ 
 
 
 

+ 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.0-alpha.43"></script>
-        <script src="<%= VUE_APP_SDK_DIR %>kankan-sdk.js?v=4.8.0-alpha.43"></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="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.0-alpha.43"></script>
-        <script src="<%= VUE_APP_SDK_DIR %>kankan-sdk.js?v=4.8.0-alpha.43"></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>
 
         <!-- built files will be auto injected -->
     </body>

+ 19 - 0
packages/qjkankan-kankan-view/src/app.js

@@ -9,6 +9,25 @@ export function createApp(opitons = {}, forceNew = false) {
     opitons.deploy = process.env.VUE_APP_DEPLOY
     opitons.region = process.env.VUE_APP_REGION_URL
     opitons.resource = process.env.VUE_APP_RESOURCE_URL
+    opitons.link = {
+        target: 'self',
+        onAction: function (url) {
+            const newUrl = new URL(url);
+            const isV3 = newUrl.pathname.indexOf('spc.html') >= -1 ;
+            let result
+            if (!isV3) {
+                const newPathname = '/panorama' + newUrl.pathname;
+                result = newUrl.origin + newPathname + newUrl.search;
+                // var result = newUrl.protocol + part1 + '/panorama/' + part2;
+                console.log('场景V4Link:', result);
+            } else {
+                result = url
+                console.log('场景V3Link:', result);
+            }
+
+            return result
+        }
+    }
     _num = opitons.num
     _app = new KanKan(opitons)
     deferred.resolve(_app)

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

+ 6 - 5
packages/qjkankan-view/public/showviewer/lib/krpano/tooltip.xml

@@ -197,7 +197,7 @@
             set_label_pos(get(tooltipname),get(pos));
          ); -->
           if(hoverstatus == 0,
-            delayedcall(0.2,
+            delayedcall(0.5,
             txtadd(tooltipname, 'tooltip_', get(name)); 
             set_label_pos(get(tooltipname),get(pos));
             );
@@ -209,7 +209,7 @@
         if(hoverstatus == 2,
             <!-- trace('测试'); -->
            set(layer[get(tooltipname)].visible,false);
-            delayedcall(0.2,
+            delayedcall(0.5,
              txtadd(tooltipname, 'tooltip_', get(name)); 
                 set_label_pos(get(tooltipname),get(pos));
                 set(layer[get(tooltipname)].visible,false);
@@ -383,11 +383,12 @@
 
        copy(hwidth, hotspot[get(hp)].width);
        copy(hheight, hotspot[get(hp)].height);
-       trace('hwidth::',get(hwidth));
+       <!-- trace('hwidth::',get(hwidth)); -->
        copy(lwidth, layer[get(posName)].width);
        copy(lheight, layer[get(posName)].height);
-       trace(calc('当前热点动态宽高::' + ),get(hwidth));
-       trace('lheight::',get(lheight));
+       trace(calc('当前热点动态宽::' + get(hp)+"::"),get(lwidth));
+       trace(calc('当前热点动态高::' + get(hp)+"::"),get(lheight));
+
         if(
             pos == 'top',
             add(all,lheight,hheight);

+ 12 - 3
packages/qjkankan-view/src/components/assembly/Tags/metas/metas-imagetext.vue

@@ -19,8 +19,14 @@
           />
         </div>
         <div class="toolbar-container">
-          <div class="toolbar">
-            <div class="left">
+          <div
+            class="toolbar"
+            :class="{ multi: currentTag.imageTextInfo.imageList.length > 1 }"
+          >
+            <div
+              class="left"
+              v-if="currentTag.imageTextInfo.imageList.length > 1"
+            >
               <i
                 v-if="currentTag.imageTextInfo.imageList.length > 1"
                 class="iconfont icon-material_preview_previous hover-tips"
@@ -350,10 +356,13 @@ watchEffect(() => {
     display: flex;
     justify-content: center;
     align-items: center;
-    width: 292px;
+    width: 182px;
     height: 60px;
     border-radius: 8px;
     background: rgba(0, 0, 0, 0.6);
+    &.multi {
+      width: 292px;
+    }
 
     z-index: 2;
     .left {