1
0
Просмотр исходного кода

编辑器:修改配置,解决部署测试环境时报错的问题。

(cherry picked from commit 1d47807e8ad609fc9cbb4149a3b72513515bd35a)
任一存 3 лет назад
Родитель
Сommit
d006a4db4e

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

@@ -1,8 +1,8 @@
+# 部署测试环境时用这个
 NODE_ENV=production
 VUE_APP_MAIN_COLOR=''
 VUE_APP_STATIC_DIR=static
 VUE_APP_INNERNET=https://fcb.intranet.4dkankan.com
 VUE_APP_CDN=https://oss-xiaoan.oss-cn-shenzhen.aliyuncs.com
 VUE_APP_PROXY_URL='http://test.4dkankan.com/qjkankan/'
-VUE_APP_PROXY_4DKANKAN_URL=''
-VUE_APP_URL_FILL=/qjkankan
+VUE_APP_URL_FILL=https://test.4dkankan.com/qjkankan/

+ 3 - 0
packages/qjkankan-editor/README.md

@@ -1,6 +1,9 @@
 # 测试环境发布路径
 /阿里云-四维时代-官网web测试服务器-120.25.146.52/var/www/html/test-4dkankan/web/panorama
 
+# 针对测试环境打包
+npm run build-testprod
+
 # someData模板
 
 ## 位置

+ 1 - 0
packages/qjkankan-editor/package.json

@@ -8,6 +8,7 @@
     "serve-local": "vue-cli-service serve --mode bendi",
     "build": "vue-cli-service build",
     "build-prod": "vue-cli-service build --mode prod",
+    "build-testprod": "vue-cli-service build --mode testprod",
     "lint": "vue-cli-service lint"
   },
   "dependencies": {

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

@@ -82,6 +82,7 @@
         </div>
       </div>
       <div class="ui-between footer" app-border dir-top>
+        <button class="ui-button deepcancel"  :class="{disable: false}" @click="confirmCancel">取消</button>
         <button class="ui-button submit"  :class="{disable: false}" @click="save">完成</button>
       </div>
     </div>
@@ -512,8 +513,11 @@ export default {
   .footer {
     flex: 0 0 auto;
     padding: 15px;
+    .deepcancel {
+      margin-right: 10px;
+    }
     .ui-button {
-      width: 100%;
+      width: 112px;
     }
   }
 }

+ 33 - 10
packages/qjkankan-editor/src/views/hotspot/hotspotType/link.vue

@@ -1,12 +1,14 @@
 <template>
   <div>
-    <input
-      type="text"
-      class="ui-input"
-      placeholder="https://"
-      v-model.trim="hyperlink"
-      @change="onUrlChange()"
-    />
+    <div class="input-wrapper">
+      <input
+        v-model.trim="hyperlink"
+        type="text"
+        maxlength="15"
+        placeholder="https://"
+        @change="onUrlChange()"
+      />
+    </div>
   </div>
 </template>
 
@@ -36,8 +38,29 @@ export default {
 }
 </script>
 
-<style lang="less" src="./style.less"></style>
-
 <style lang="less" scoped>
-
+.input-wrapper {
+  position: relative;
+  border: 1px solid rgba(151, 151, 151, 0.2);
+  padding: 0 16px;
+  background: #1A1B1D;
+  border-radius: 2px;
+  height: 36px;
+  width: 100%;
+  margin-top: 18px;
+  &:focus-within {
+    border-color: #0076F6;
+  }
+  > input {
+    border: none;
+    background: transparent;
+    outline: none;
+    height: 100%;
+    width: 100%;
+    padding: 0;
+    color: #fff;
+    letter-spacing: 1px;
+    font-size: 14px;
+  }
+}
 </style>

+ 83 - 56
packages/qjkankan-editor/src/views/hotspot/hotspotType/scene.vue

@@ -1,25 +1,20 @@
 <template>
   <div>
+    
     <div class="medias">
-    <div class="btn-push">
-      <span v-if="!selected.icon">选择场景</span>
-      <div class="scene-con" v-else>
-        <i class="iconfont iconedit_type_3d"
-                    :class="{'iconedit_type_panorama':selected.type!=='4dkk'}"></i>
-        <img class="icon" :src="selected.icon||$thumb" alt="">
-        <span class="shenglve">{{selected.sceneTitle||'名字'}}</span>
-        <i @click="del" class="iconfont iconedit_case_delete"></i>
+      <div class="btn-push">
+        <span v-if="!selected.icon">选择场景</span>
+        <div class="scene-con" v-else>
+          <i class="iconfont iconedit_type_3d" :class="{'iconedit_type_panorama':selected.type!=='4dkk'}"></i>
+          <img class="icon" :src="selected.icon||$thumb" alt="">
+          <span class="shenglve">{{selected.sceneTitle||'名字'}}</span>
+          <i @click="del" class="iconfont iconedit_case_delete"></i>
+        </div>
       </div>
     </div>
-  </div>
-  <button class="ui-button submit" @click="showScene = true">选择场景</button>
-  <div class="dialog" style="z-index: 2000" v-if="showScene">
-      <Select
-        @cancle="showScene = false"
-        :selected='selected'
-        :title="'选择素材'"
-        @submit="handleSelect"
-      >
+    <button class="ui-button submit" @click="showScene = true">选择场景</button>
+    <div class="dialog" style="z-index: 2000" v-if="showScene">
+      <Select @cancle="showScene = false" :selected='selected' :title="'选择素材'" @submit="handleSelect">
       </Select>
     </div>
   </div>
@@ -51,50 +46,82 @@ export default {
 }
 </script>
 
-<style lang="less" src="./style.less"></style>
-
 <style lang="less" scoped>
-.ui-button{
-  width: 100%;
-  margin-top: 10px;
-}
-.medias{
+.medias {
+  height: 105px; 
+  width: 210px;
+  position: relative;
+  background: #161A1A;
+  border: 1px solid #555A5A;
+  overflow: hidden;
   height: 122px;
   cursor: auto;
+  .btn-push {
+    position: absolute;
+    top: 50%;
+    left: 50%;
+    transform: translate(-50%,-50%);
+    text-align: center;
+    font-size: 12px;
+    width: 100%;
+    height: 100%;
+    >span {
+      position: absolute;
+      top: 50%;
+      left: 50%;
+      transform: translate(-50%,-50%);
+    }
+    .scene-con {
+      display: flex;
+      justify-content: space-between;
+      padding: 10px;
+      width: 100%;
+      height: 100%;
+      position: relative;
+      .iconfont{
+        position: absolute;
+        left: 18px;
+        top: 18px;
+        color: #fff;
+        background: rgba(0, 0, 0, 0.5);
+        border-radius: 2px;
+        padding: 8px;
+      }
+      .icon{
+        width: 102px;
+        height: 102px;
+      }
+      >span{
+        flex: 1;
+        text-align: left;
+        padding-left: 10px;
+        white-space: break-spaces;
+      }
+      .iconedit_case_delete{
+        left: auto;
+        top: auto;
+        right: 10px;
+        bottom: 10px;
+        border-radius: 50%;
+        cursor: pointer;
+      }
+    }
+  }
 }
-.scene-con{
-  display: flex;
-  justify-content: space-between;
-  padding: 10px;
+
+.dialog {
+  position: fixed;
+  z-index: 30;
+  left: 0;
+  top: 0;
   width: 100%;
   height: 100%;
-  position: relative;
-  .iconfont{
-    position: absolute;
-    left: 18px;
-    top: 18px;
-    color: #fff;
-    background: rgba(0, 0, 0, 0.5);
-    border-radius: 2px;
-    padding: 8px;
-  }
-  .icon{
-    width: 102px;
-    height: 102px;
-  }
-  >span{
-    flex: 1;
-    text-align: left;
-    padding-left: 10px;
-    white-space: break-spaces;
-  }
-  .iconedit_case_delete{
-    left: auto;
-    top: auto;
-    right: 10px;
-    bottom: 10px;
-    border-radius: 50%;
-    cursor: pointer;
-  }
+  background-color: rgba(0, 0, 0, 0.5);
 }
+
+.ui-button{
+  width: 100%;
+  margin-top: 10px;
+}
+
 </style>

+ 2 - 2
packages/qjkankan-editor/vue.config.js

@@ -1,5 +1,5 @@
-const proxy_url = process.env.VUE_APP_PROXY_URL || 'https://fcb.test.4dkankan.com'
-// https://vr-web01-uat.fcb.com.cn/
+const proxy_url = process.env.VUE_APP_PROXY_URL
+
 let pages = {
   edit: 'src/pages/edit.js',
   show: 'src/pages/show.js',