gemercheung 2 năm trước cách đây
mục cha
commit
d8d86a0989

+ 4 - 1
packages/qjkankan-editor/src/Store/modules/scene.js

@@ -1,3 +1,6 @@
+import { i18n } from "@/lang";
+
+
 export default {
   namespaced: true,
   state() {
@@ -88,7 +91,7 @@ export default {
     setMetaData(state, payload) {
       state.metadata = payload;
       if (location.href.includes('show.html')) {
-        document.title = payload.name || '无标题'
+        document.title = payload.name || i18n.t('common.notit')
       }
     },
   },

+ 4 - 2
packages/qjkankan-editor/src/framework/EditorHead.vue

@@ -118,7 +118,8 @@ export default {
           },
           () => {
             this.$msg.success(this.$i18n.t("gather.save_done"));
-            document.title = this.info.name;
+            // document.title = this.info.name;
+            document.title = this.info.name || this.$i18n.t("gather.no_title");
             // this.getInfo().then((res) => {
             //   // getInfo里调用了后端接口,底层用了jquery的网络请求方法,为啥会导致promise嵌套没有展平,res拿到的不是promise 对象的resolve值而是promise对象本身????
             //   res.then(() => {
@@ -266,7 +267,8 @@ export default {
           },
           () => {
             this.$msg.success(this.$i18n.t("gather.save_done"));
-            document.title = this.info.name;
+            // document.title = this.info.name;
+            document.title = this.info.name || this.$i18n.t("gather.no_title");
             $waiting.hide();
             // this.getInfo();
             // this.$store.commit("UpdateIsShowState", true);

+ 7 - 1
packages/qjkankan-editor/src/framework/show/index.vue

@@ -85,6 +85,7 @@ import popup from "./popup/";
 import { mapGetters } from "vuex";
 
 import list from "./list";
+import { i18n } from "@/lang";
 
 let __krfn = krfn.default;
 
@@ -314,7 +315,12 @@ export default {
       immediate: true,
       handler: function (newVal) {
         if (newVal) {
-          document.title = newVal.name || "无标题";
+
+          document.title =
+            newVal.name && newVal.name.length > 0
+              ? newVal.nam
+              : i18n.t("gather.no_title");
+
           let locoR = "localRemind" + newVal.id;
           if (!newVal.description) {
             this.aside.shift();

+ 1 - 1
packages/qjkankan-editor/src/framework/showMobile/index.vue

@@ -413,7 +413,7 @@ export default {
       immediate: true,
       handler: function (newVal) {
         if (newVal) {
-          document.title = newVal.name || "无标题";
+          document.title = newVal.name || this.$i18n.t('common.no_title');
           let locoR = "localRemind" + newVal.id;
 
           if (!newVal.description) {

+ 9 - 9
packages/qjkankan-editor/src/lang/_en.json

@@ -355,7 +355,7 @@
       "btn_edit_text": "Adjust the link position",
       "style": "Link icon",
       "style_name": "icon",
-      "style_desc": "upport customized icon with recommended size of 100*100 pixels. Support JPG/PNG format.",
+      "style_desc": "upport customized icon with recommended size of 100*100 pixels. Support jpg/png/gif format.",
       "style_dele": "Delete this icon? <br /> The same icon used for other links will also be deleted.",
       "desc_title": "Description",
       "desc_tips": "Please enter a description.",
@@ -371,7 +371,7 @@
       "enter_btn_text": "Set a link cover",
       "outer_title": "Exit spot position",
       "outer_style": "Exit spot icon",
-      "outer_desc": "Support customized icon with recommended size of 100*100 pixels. Support JPG/PNG format.",
+      "outer_desc": "Support customized icon with recommended size of 100*100 pixels. Support jpg/png/gif format.",
       "outer_require": "Please set the position of exit spot.",
       "outer_btn_text": "Set the position of exit spot."
     }
@@ -591,9 +591,9 @@
     "pano_fail": "Format error. Support 2:1 jpg files ≤ 120MB",
     "pano_limit": "The file is too large. Support 2:1 jpg files ≤ 120MB",
     "edit_cover": "Thumbnail Settings",
-    "img_fail": "Format error.Support jpg/png files: ≤ 10MB",
-    "img_limit": "The file is too large.Support jpg/png files: ≤ 10MB",
-    "img_size": "Support jpg/png files: ≤ 10MB",
+    "img_fail": "Format error.Support jpg/png/gif files: ≤ 10MB",
+    "img_limit": "The file is too large.Support jpg/png/gif files: ≤ 10MB",
+    "img_size": "Support jpg/png/gif files: ≤ 10MB",
     "audio_size": "Support MP3 files: ≤ 20MB",
     "audio_limit": "The file is too large. Support MP3 files: ≤ 20MB",
     "audio_fail": "Format error. Support MP3 files: ≤ 20MB",
@@ -713,11 +713,11 @@
     "link_short": "Link",
     "custom_logo": "Custom Logo",
     "show_logo": "Display Logo",
-    "logo_size": "300*300 pixels, within 600kb, <br>jpg/png format support",
+    "logo_size": "300*300 pixels, within 600kb, <br>jpg/png/gif format support",
     "sky_mask": "Top mask",
     "sky_tips": "The top mask is exhibited at the scene's top, while the bottom mask is presented at the scene's bottom.",
     "mask_setting": "Mask Settings",
-    "mask_size": "500*500 pixels, <br>jpg/png format support",
+    "mask_size": "500*500 pixels, <br>jpg/png/gif format support",
     "bottom_mask": "Bottom mask",
     "opening_setting": "Set the animations",
     "opening_animation_show": "Switch the animations",
@@ -726,14 +726,14 @@
     "pc": "PC",
     "mobile": "Mobile",
     "select_image": "Select pictures",
-    "opening_size": "Recommend 300*300 pixels, within 600kb, jpg/png format support",
+    "opening_size": "Recommend 300*300 pixels, within 600kb, jpg/png/gif format support",
     "show_setting": "Display settings",
     "first_notice": "Prompt only when the link is opened for the first time",
     "password_setting": "Set an access code",
     "password_placeholder": "Please enter the access password, limited to 20-character",
     "base_setting": "Basic Settings",
     "setting_cover": "Thumbnail Settings",
-    "cover_size": "512*512px, support jpg/png format",
+    "cover_size": "512*512px, support jpg/png/gif format",
     "title": "Title",
     "description": "Description",
     "work_placeholder": "Please enter the project title",

+ 7 - 7
packages/qjkankan-editor/src/lang/_zh.json

@@ -355,7 +355,7 @@
       "btn_edit_text": "修改关联点位置",
       "style": "关联点样式",
       "style_name": "样式",
-      "style_desc": "支持自定义图标,建议尺寸为100x100 像素,格式为jpg/png。",
+      "style_desc": "支持自定义图标,建议尺寸为100x100 像素,格式为jpg/png/gif。",
       "style_dele": "是否删除该样式?<br />如该样式在其它关联点使用,也将被删除",
       "desc_title": "描述",
       "desc_tips": "请输入描述内容",
@@ -371,7 +371,7 @@
       "enter_btn_text": "设置进入画面",
       "outer_title": "跳出点位置",
       "outer_style": "跳出点样式",
-      "outer_desc": "支持自定义图标,建议尺寸为100x100像素,格式为jpg/png。",
+      "outer_desc": "支持自定义图标,建议尺寸为100x100像素,格式为jpg/png/gif。",
       "outer_require": "请设置跳出点位置",
       "outer_btn_text": "设置跳出点位置"
     }
@@ -713,11 +713,11 @@
     "link_short": "链接",
     "custom_logo": "自定义LOGO",
     "show_logo": "显示LOGO",
-    "logo_size": "300*300px,600kb以内,支持<br>jpg/png格式",
+    "logo_size": "300*300px,600kb以内,支持<br>jpg/png/gif格式",
     "mask_setting": "遮罩设置",
     "sky_mask": "天空遮罩",
     "sky_tips": "天空遮罩显示在场景的顶部,地面遮罩显示在场景的底部。",
-    "mask_size": "建议500*500px,<br/>支持jpg/png格式",
+    "mask_size": "建议500*500px,<br/>支持jpg/png/gif格式",
     "bottom_mask": "地面遮罩",
     "opening_setting": "设置开场动画",
     "opening_animation_show": "显示开场动画",
@@ -726,14 +726,14 @@
     "pc": "PC端",
     "mobile": "移动端",
     "select_image": "选择图片",
-    "opening_size": "建议300*300px,600kb以内,<br/>支持jpg/png格式",
+    "opening_size": "建议300*300px,600kb以内,<br/>支持jpg/png/gif格式",
     "show_setting": "显示设置",
     "first_notice": "仅首次打开链接时,提示",
     "password_setting": "设置访问密码",
     "password_placeholder": "请输入访问密码,限20位",
     "base_setting": "基础设置",
     "setting_cover": "设置封面",
-    "cover_size": "512*512px,支持jpg/png格式",
+    "cover_size": "512*512px,支持jpg/png/gif格式",
     "title": "标题",
     "description": "简介",
     "work_placeholder": "请输入作品标题",
@@ -827,7 +827,7 @@
       "personalized_tag": "个性标签"
     },
     "add_icon": "添加图标",
-    "add_custom_icon_rule": "300*300px,支持jpg/png格式",
+    "add_custom_icon_rule": "300*300px,支持jpg/png/gif格式",
     "add_serial_frame_rule": "最大宽度:300px,高度不限",
     "frame_total_number": "序列帧总帧数",
     "frame_duration": "总播放时长",

+ 1 - 1
packages/qjkankan-editor/src/views/base/Toolbar.vue

@@ -30,7 +30,7 @@
           </div>
           <div class="uc-r">
             <div class="ui-title">
-              <span class="">{{ $i18n.t(`edit_settings.title`) }}</span>
+              <span class="">{{ $i18n.t(`edit_settings.title`) }} </span>
             </div>
             <div class="title-input-wrapper">
               <input

+ 2 - 2
packages/qjkankan-editor/src/views/hotspot/hotspotType/imageText.vue

@@ -49,10 +49,10 @@
         ref="editor"
         :html="hotspot.imageTextInfo.text"
         :placeholder="$i18n.t('hotspot.text_placeholder')"
-        :maxlength="500"
+        :maxlength="2000"
         @change="onEditorChange"
       />
-      <span class="count">{{ textLength }}/500</span>
+      <span class="count">{{ textLength }}/2000</span>
     </div>
 
     <!-- <div class="switcher-wrap">

+ 2 - 2
packages/qjkankan-kankan-view/src/components/Tags/constant.js

@@ -13,7 +13,7 @@ export const custom = () => {
             maxSize: 5 * 1024 * 1024,
             maxNum: 9,
             // othPlaceholder: '支持JPG、PNG图片格式,单张不超过5MB,最多支持上传9张。',
-            othPlaceholder: t('tag.toolbox.metaImageTips', { form: 'jpg/png', size: '5MB', maxlength: '9' }),
+            othPlaceholder: t('tag.toolbox.metaImageTips', { form: 'jpg/png/gif', size: '5MB', maxlength: '9' }),
         },
         video: {
             icon: 'video',
@@ -51,7 +51,7 @@ export const custom = () => {
             maxSize: 5 * 1024 * 1024,
             maxNum: 9,
             // othPlaceholder: '支持JPG、PNG图片格式,单张不超过5MB,最多支持上传9张。',
-            othPlaceholder: t('tag.toolbox.metaImageTips', { form: 'jpg/png', size: '5MB', maxlength: '9' }),
+            othPlaceholder: t('tag.toolbox.metaImageTips', { form: 'jpg/png/gif', size: '5MB', maxlength: '9' }),
         },
     }
 }

+ 1 - 1
packages/qjkankan-view/src/components/assembly/MobileTags/metas/metas-imagetext.vue

@@ -33,7 +33,7 @@
             class="iconfont icon-editor_playback"
             v-if="isPlaying"
           ></i>
-          <i @click="playAudio" class="iconfonticon-editor_play" v-else></i>
+          <i @click="playAudio" class="iconfont icon-editor_play" v-else></i>
           <span class="timeline">{{ time }} / {{ audioAllTime }}</span>
           <audio
             id="audioTag"

+ 3 - 1
packages/qjkankan-view/src/store/modules/scene.js

@@ -1,3 +1,5 @@
+import i18n from "@/i18n";
+
 /**
  * 兼容自定主义按键为中文的处理器
  */
@@ -171,7 +173,7 @@ export default {
     },
     setMetaData(state, payload) {
       state.metadata = payload;
-      document.title = payload.name || "无标题";
+      document.title = payload.name || i18n.t("common.no_title");
       // debugger
       document
         .querySelector('meta[name="description"]')

+ 32 - 29
packages/qjkankan-view/src/utils/debuggerHelper.js

@@ -2,33 +2,36 @@
 import { useToast } from "vue-toastification";
 
 export const debuggerHelper = (show = true) => {
-    const version = '1.4.0'
-    if (show) {
-        // log.setColors({
-        var css = "background: #28b561; color:#fff;font-size:14px;padding:5px;";
+  const version = "1.4.0--" + process.env.VUE_APP_DEBBUG_FLAG;
+  if (show) {
+    // log.setColors({
+    var css = "background: #28b561; color:#fff;font-size:14px;padding:5px;";
 
-        console.log(`%c 👉:当前版本::---> ${version}--${process.env.VUE_APP_DEBBUG_FLAG}`, css);
-
-    }
-    if (Number(process.env.VUE_APP_DEBBUG_NOTIFY) === 1) {
-
-        setTimeout(() => {
-            const toast = useToast();
-            toast.warning(`当前正在开发重构${version}中, 如果要指定版本,请联系开发!`, {
-                position: "top-center",
-                timeout: 400000,
-                closeOnClick: true,
-                pauseOnFocusLoss: true,
-                pauseOnHover: true,
-                draggable: true,
-                draggablePercent: 0.6,
-                showCloseButtonOnHover: false,
-                hideProgressBar: true,
-                closeButton: "button",
-                icon: true,
-                rtl: false
-            });
-        }, 500);
-
-    }
-}
+    console.log(
+      `%c 👉:当前版本::---> ${version}`,
+      css
+    );
+  }
+  if (Number(process.env.VUE_APP_DEBBUG_NOTIFY) === 1) {
+    setTimeout(() => {
+      const toast = useToast();
+      toast.warning(
+        `当前开发正在调试${version}中, 请等候!`,
+        {
+          position: "top-center",
+          timeout: 400000,
+          closeOnClick: true,
+          pauseOnFocusLoss: true,
+          pauseOnHover: true,
+          draggable: true,
+          draggablePercent: 0.6,
+          showCloseButtonOnHover: false,
+          hideProgressBar: true,
+          closeButton: "button",
+          icon: true,
+          rtl: false,
+        }
+      );
+    }, 500);
+  }
+};

+ 3 - 1
packages/qjkankan-view/src/utils/wxshare.js

@@ -1,3 +1,5 @@
+import browser from "./browser";
+
 export function toConfigure() {
   return new Promise((resolve, reject) => {
     $.ajax({
@@ -151,7 +153,7 @@ function setup({ title, link, imgUrl, desc }) {
 }
 
 export default async (args) => {
-  if (typeof wx != "undefined") {
+  if (browser.detectWeixin()) {
     //需要引入 https://res.wx.qq.com/open/js/jweixin-1.2.0.js
     await toConfigure();
     const event = new Event("weixinInit");