فهرست منبع

0225生产环境封版代码

tremble 4 سال پیش
والد
کامیت
20fc3f7c7c

+ 2 - 1
.env

@@ -2,4 +2,5 @@ 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=''
+VUE_APP_PROXY_URL='https://fcb.test.4dkankan.com'
+VUE_APP_CLIENT_CODE=zxd9WS2twZ3J4DuhJ2r3y6qz1OZ2hMbr

+ 2 - 1
.env.prod

@@ -2,4 +2,5 @@ VUE_APP_MAIN_COLOR=''
 VUE_APP_STATIC_DIR=static
 VUE_APP_INNERNET=https://vr-mc01.fcb.com.cn
 VUE_APP_CDN=https://vr-oss01.fcb.com.cn
-VUE_APP_PROXY_URL=''
+VUE_APP_PROXY_URL=''
+VUE_APP_CLIENT_CODE=f9DZZHYIqlBIaDHRgvTFbVwb0LBwMUe0

+ 2 - 1
.env.uat

@@ -2,4 +2,5 @@ VUE_APP_MAIN_COLOR=''
 VUE_APP_STATIC_DIR=static
 VUE_APP_INNERNET=https://vr-mc01-uat.fcb.com.cn
 VUE_APP_CDN=https://vr-web02-uat.fcb.com.cn
-VUE_APP_PROXY_URL=''
+VUE_APP_PROXY_URL='https://vr-web01-uat.fcb.com.cn'
+VUE_APP_CLIENT_CODE=dX96cHOkZm61AiCFni5k4qOlxvj8jSF7

+ 2 - 0
package.json

@@ -5,8 +5,10 @@
   "scripts": {
     "serve": "vue-cli-service serve",
     "serve-uat": "vue-cli-service serve  --mode uat",
+    "serve-prod": "vue-cli-service serve  --mode prod",
     "build": "vue-cli-service build",
     "build-uat": "vue-cli-service build --mode uat",
+    "build-prod": "vue-cli-service build --mode prod",
     "lint": "vue-cli-service lint"
   },
   "dependencies": {

BIN
public/static/panoassets/images/hotspot/xulie/new/ditu_2021.png


BIN
public/static/panoassets/images/hotspot/xulie/new/kaimen_2021.png


BIN
public/static/panoassets/images/hotspot/xulie/new/shinei_2021.png


+ 25 - 18
public/static/template/skin/vtourskin.xml.backup-2021-02-05-18-50-30

@@ -1310,12 +1310,12 @@
       set(hotspot[get(schp_name)].autoalpha,false);
       set(hotspot[get(schp_name)].distorted,false);
       set(hotspot[get(schp_name)].width,'prop');
-      set(hotspot[get(schp_name)].height,'50');
+      set(hotspot[get(schp_name)].height,34);
+      if(device.mobile,set(hotspot[get(schp_name)].height,30));
       set(hotspot[get(schp_name)].visible,true);
 	    set(hotspot[get(schp_name)].onhover,showtext(get(hotspottitle),skintext)); 
       addhotspot(get(schp_name));
-      set(hotspot[get(schp_name)].onclick,'js(__krfn.utils.linkopen(get(hotspot[get(name)].hotspotlink),%2));');
-      if(device.mobile,set(hotspot[get(schp_name)].scale,0.8));
+      set(hotspot[get(schp_name)].onclick,'js(__krfn.utils.linkopen(%8,%2));');
 
       if(%7 == false,
         , 
@@ -1324,7 +1324,7 @@
       );
 
       if(%6 == '1',
-         txtadd(hotspot[get(schp_name)].onloaded,"do_crop_animation(60,60, 30);");
+         txtadd(hotspot[get(schp_name)].onloaded,"do_crop_animation(56,56, 30);");
 		  );
     
       txtadd(hotspot[get(schp_name)].onloaded,"add_all_the_time_tooltip(hotspot[get(name)].hotspottitle);");
@@ -1335,7 +1335,7 @@
 
       txtadd(tooltipname, 'tooltip_', get(schp_name));
          
-      set(plugin[get(tooltipname)].onclick,'js(__krfn.utils.linkopen(get(hotspot[get(schp_name)].hotspotlink),%2));');
+      set(plugin[get(tooltipname)].onclick,'js(__krfn.utils.linkopen(%8,%2));');
 
       if(%10 == true,
         set(plugin[get(tooltipname)].visible,true);,
@@ -1353,26 +1353,33 @@
         set(plugin[get(tooltipname)].x,0);
         set(plugin[get(tooltipname)].y,0);
         set(plugin[get(tooltipname)].autowidth,true);
-        set(plugin[get(tooltipname)].height,36); 
-        if(device.mobile,set(plugin[get(tooltipname)].scale,0.7));
-        if(device.mobile,set(plugin[get(tooltipname)].height,48));
-
-        set(plugin[get(tooltipname)].background,true);
-        set(plugin[get(tooltipname)].backgroundcolor,0x000000); 
-        set(plugin[get(tooltipname)].roundedge,5);
-        set(plugin[get(tooltipname)].backgroundalpha,0.7);
-        set(plugin[get(tooltipname)].padding,5);
+        set(plugin[get(tooltipname)].height,34); 
+        if(device.mobile,set(plugin[get(tooltipname)].height,30));
+        if(device.mobile,set(plugin[get(tooltipname)].scale,1));
+
+        set(plugin[get(tooltipname)].background,false);
+        <!-- set(plugin[get(tooltipname)].backgroundcolor,0x000000);  -->
+        <!-- set(plugin[get(tooltipname)].roundedge,5); -->
+        set(plugin[get(tooltipname)].style,rrdius);
+
+        <!-- set(plugin[get(tooltipname)].backgroundalpha,0.7); -->
+        <!-- set(plugin[get(tooltipname)].padding,5); -->
         set(plugin[get(tooltipname)].vcenter,true); 
-        set(plugin[get(tooltipname)].border,true);
+        set(plugin[get(tooltipname)].border,false);
         set(plugin[get(tooltipname)].borderwidth,1);
         set(plugin[get(tooltipname)].bordercolor,0xFFFFFF);
         set(plugin[get(tooltipname)].borderalpha,0.2);
         set(plugin[get(tooltipname)].glow,0); 
         set(plugin[get(tooltipname)].glowcolor,0xFFFFFF);
-        set(plugin[get(tooltipname)].css,'text-align:center; color:#FFFFFF; font-family:STXihei; font-size:14px;');
+        set(plugin[get(tooltipname)].css,'display:flex;align-items:center;padding:5px 10px;margin:0;
+        text-align:center;background:rgb(0 0 0 / 60%);position: relative;left: 0px;width:100%;height:100%;
+        border-bottom-right-radius:4px;border-top-right-radius:4px; color:#FFFFFF;
+        font-family:STXihei; font-size:13px;');
         if(device.mobile,
-        set(plugin[get(tooltipname)].css,'text-align:center; color:#FFFFFF;
-        font-family:STXihei; font-weight:bold; font-size:14px;'); );
+        set(plugin[get(tooltipname)].css,'display:flex;align-items:center;padding:0 6px;margin:0;
+        text-align:center;background:rgb(0 0 0 / 60%);width:100%;height:100%;
+        border-bottom-right-radius:4px;border-top-right-radius:4px; color:#FFFFFF;
+        font-family:STXihei; font-size:14px;'););
         set(plugin[get(tooltipname)].textshadow,0);
         set(plugin[get(tooltipname)].textshadowrange,6.0); 
         set(plugin[get(tooltipname)].textshadowangle,90); 

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 1 - 1
public/static/template/skin/vtourskin.xml


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 1995
public/static/template/skin/vtourskin.xml.backup-2021-02-01-09-38-41


+ 2 - 2
public/static/template/skin/vtourskin.xml.backup-2021-02-04-17-25-15

@@ -1314,7 +1314,7 @@
       set(hotspot[get(schp_name)].visible,true);
 	    set(hotspot[get(schp_name)].onhover,showtext(get(hotspottitle),skintext)); 
       addhotspot(get(schp_name));
-      set(hotspot[get(schp_name)].onclick,'js(__krfn.utils.linkopen(get(hotspot[get(name)].hotspotlink),%2));');
+      set(hotspot[get(schp_name)].onclick,'js(__krfn.utils.linkopen(%8,%2));');
       if(device.mobile,set(hotspot[get(schp_name)].scale,0.8));
 
       if(%7 == false,
@@ -1335,7 +1335,7 @@
 
       txtadd(tooltipname, 'tooltip_', get(schp_name));
          
-      set(plugin[get(tooltipname)].onclick,'js(__krfn.utils.linkopen(get(hotspot[get(name)].hotspotlink),%2));');
+      set(plugin[get(tooltipname)].onclick,'js(__krfn.utils.linkopen(%8,%2));');
 
       if(%10 == true,
         set(plugin[get(tooltipname)].visible,true);,

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 1995
public/static/template/skin/vtourskin_backup


+ 12 - 1
src/api/index.js

@@ -14,7 +14,7 @@ const HDNumber = function() {
     return config.hengdaNum
 }
 
-const CLIENT_CODE = 'zxd9WS2twZ3J4DuhJ2r3y6qz1OZ2hMbr'
+const CLIENT_CODE =  config.client_code
 
 
 /**
@@ -47,6 +47,17 @@ export function uploadPano(data, type, ok, no) {
 }
 
 
+/**
+ * 保存初始场景
+ * @param {*} data 
+ * @param {*} ok 
+ * @param {*} no 
+ */
+export function saveUseHots(data, ok, no) {
+    return http.get(`/fcb/pano/scene/save/useHots/${data.id}/${data.sceneCodes}`, '', ok, no)
+}
+
+
 
 /**
  * 获取全景图基本信息

+ 1 - 0
src/config/index.js

@@ -12,6 +12,7 @@ const config = {
     hengdaNum: browser.urlQueryValue('h') || '6017118343179540233',
     intranet: process.env.VUE_APP_INNERNET,
     CDN: process.env.VUE_APP_CDN,
+    client_code: process.env.VUE_APP_CLIENT_CODE,
     panoSetting:{
       angle_of_view:{
         viewSettings:[

+ 1 - 0
src/core/utils.js

@@ -75,6 +75,7 @@ export default class Utils {
     krpano.call("screentosphere(curscreen_x, curscreen_y, curscreen_ath, curscreen_atv);");
     let ath = krpano.get("curscreen_ath");
     let atv = krpano.get("curscreen_atv");
+    // param.img = '/static/panoassets/images/hotspot/xulie/location_icon@2x.png'
     krpano.call(`addImgTextHotSpot(
       ${param.img},
       ${param.name},

+ 45 - 2
src/utils/request.js

@@ -23,7 +23,9 @@ let postQueue = []
 export const statusCode = {
     NEXT: -999, //继续执行 
     SUCCESS: 0, //成功
-    EXCEPTION: 1, //异常错误
+    EXCEPTION: -1, //异常错误
+    FAILURE_CODE_7007: 7007, //房源不存在
+    FAILURE_CODE_7008: 7008, //有关联场景使用此场景,不能删除
     FAILURE_CODE_7005: 7005, //审核中不能编辑
     FAILURE_CODE_7006: 7006, //已审核不能编辑
     FAILURE_CODE_5001: 5001 //token失效
@@ -35,6 +37,9 @@ export const statusCode = {
 // const defineErrorCode = []
 
 let __showNetworkError = false
+let __showNoHouseError = false
+
+
 
 const showLoginTips = () => {
     // 防止多次请求弹出
@@ -93,8 +98,46 @@ export function statusCodesHandler(result, callback) {
         }})
     }
 
+    if (result.code == statusCode.FAILURE_CODE_7008) {
+        if (__showNoHouseError) {
+            return
+        }
+        __showNoHouseError = true
+        return $alert({ 
+            content: `此场景有被热点关联,不能删除`,
+            forceOK:true,
+              ok:()=>{
+                __showNoHouseError = false
+                $waiting.hide()
+            }})
+    }
+
+    if (result.code == statusCode.FAILURE_CODE_7007) {
+        if (__showNoHouseError) {
+            return
+        }
+        __showNoHouseError = true
+        return $alert({ 
+            content: `房源不存在`,
+            forceOK:true,
+              ok:()=>{
+                __showNoHouseError = false
+                $waiting.hide()
+            }})
+    }
+
     if (result.code == statusCode.EXCEPTION) {
-        return !http.__loading && $alert({ content: `${result.message},请稍后再试`})
+        if (__showNoHouseError) {
+            return
+        }
+        __showNoHouseError = true
+        return $alert({
+            content: `${result.msg}`,
+            forceOK:true,
+            ok:()=>{
+            __showNoHouseError = false
+            $waiting.hide()
+        }})
     }
 
     

+ 3 - 3
src/views/base/Toolbar.vue

@@ -13,7 +13,7 @@
           </div>
           <div class="upload-btn">
             <span class="ui-remark">建议512*512px<br />支持jpg/png格式</span>
-            <button class="ui-button submit" @click="$refs.upload.click()">
+            <button :class="{disable:!info}" class="ui-button submit" @click="$refs.upload.click()">
               上传
               <upload
                 ref="upload"
@@ -117,8 +117,8 @@ export default {
       uploadCover(
         { file: base64, filename: "image.jpg" },
         (data) => {
-          this.baseIcon = base64 || data.data;
-          this.info.coverImagUrl = data.data;
+            this.baseIcon = base64 || data.data;
+            this.info.coverImagUrl = data.data;
         },
         () => {
           this.$alert({

+ 2 - 0
src/views/hotspot/Setting.vue

@@ -113,6 +113,7 @@ export default {
                 sceneTitle: this.activeItem.sceneTitle,
                 someData:this.someData
             },()=>{
+                this.activeItem.someData = JSON.stringify(this.someData)
                 this.$tips({content:this.editTitle+'成功',icon:'ok'})
             })
         },
@@ -124,6 +125,7 @@ export default {
                 someData:this.someData
             },()=>{
                 this.deleteKRHotspot(data)
+                this.activeItem.someData = JSON.stringify(this.someData)
                 this.$tips({content:'删除成功',icon:'ok'})
             })
         },

+ 0 - 3
src/views/hotspot/index.vue

@@ -133,9 +133,6 @@ export default {
     handelSelect() {
       this.$bus.emit('selectUrl',this.activeItem)
       this.show = false
-    },
-    updateGoods(){
-
     }
   }
 };

+ 14 - 2
src/views/information/Toolbar.vue

@@ -59,14 +59,15 @@ import { getImgWH } from '@/utils/file'
 import { $waiting } from '@/components/shared/loading'
 import draggable from 'vuedraggable'
 
-const LONGPOLLINGTIME = 10
+const LONGPOLLINGTIME = 30
 
 export default {
   data(){
     return {
       type:'building',
       interval:null,
-      list:[]
+      list:[],
+      isLongPolling:false
     }
   },
   watch:{
@@ -82,6 +83,16 @@ export default {
           this.Longpolling()
         }
       }
+    },
+    isLongPolling:{
+      immediate:true,
+      handler:function (newVal) {
+        if (!newVal) {
+          this.clearinter()
+        }else{
+          this.Longpolling()
+        }
+      }
     }
   },
   mounted(){
@@ -130,6 +141,7 @@ export default {
         islongpolling
       },data=>{
         this.list = data.data.list
+        this.isLongPolling = data.isCheck
         this.$store.commit("SetVrList", data.data.list);
         this.$bus.emit('undateAllVrList',islongpolling)
         this.$bus.emit('setInitScene',islongpolling)

+ 3 - 3
vue.config.js

@@ -1,6 +1,6 @@
-// const proxy_url = process.env.VUE_APP_PROXY_URL || 'http://8.135.98.231:8084'
-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 || 'https://vr-web01-uat.fcb.com.cn'
+// const proxy_url = process.env.VUE_APP_PROXY_URL || 'https://fcb.test.4dkankan.com'
+// 
 let pages = {
   edit: 'src/pages/edit.js',
   show: 'src/pages/show.js',