Преглед изворни кода

refactor: 调整应用名称、环境配置与标记计算逻辑

1. 将应用名称从"云飞智控"简化为"智控"
2. 切换到智控的正式环境配置,注释云飞智控配置
3. 修复图片标记坐标计算,处理宽高为负值的异常情况
allen пре 1 дан
родитељ
комит
0e16ca4dd4
3 измењених фајлова са 7 додато и 7 уклоњено
  1. 1 1
      manifest.json
  2. 4 4
      pages/cbd/devicePhoto.vue
  3. 2 2
      util/neutral.js

+ 1 - 1
manifest.json

@@ -1,5 +1,5 @@
 {
-    "name" : "云飞智控",
+    "name" : "智控",
     "appid" : "__UNI__DBA6730",
     "description" : "",
     "versionName" : "1.15.14",

+ 4 - 4
pages/cbd/devicePhoto.vue

@@ -510,10 +510,10 @@ export default {
           this.is_mark = 1
           const { startX, startY,text } = item;
           // 使用缩放比例计算标记位置和尺寸
-          const x = (startX * scaleRatio / this.imageWidth) * 105;
-          const y = (startY * scaleRatio / this.imageHeight) * 105;
-          const width = (item.width * scaleRatio / this.imageWidth) * 100;
-          const height = (item.height * scaleRatio / this.imageHeight) * 100;
+          const x = item.width > 0 ? (startX * scaleRatio / this.imageWidth) * 105 : ((startX + item.width) * scaleRatio / this.imageWidth) * 105;
+          const y = item.height > 0 ? (startY * scaleRatio / this.imageHeight) * 105 : ((startY + item.height) * scaleRatio / this.imageHeight) * 105;
+          const width = (item.width > 0 ? item.width : -item.width) * scaleRatio / this.imageWidth * 100;
+          const height = (item.height > 0 ? item.height : -item.height) * scaleRatio / this.imageHeight * 100;
 
           // 从字典中获取虫子名字(尝试字符串和数字两种类型)
           const pestName = text;

+ 2 - 2
util/neutral.js

@@ -1,6 +1,6 @@
 export default {
-  isneutral:true,//云飞智控
-  // isneutral: false, //智控
+  // isneutral:true,//云飞智控
+  isneutral: false, //智控
   developAPI:'https://uat.hnyfwlw.com',//测试环境访问地址
   // productAPI:'http://8.136.98.49:8002',//生产环境
   productAPI:'https://web.hnyfwlw.com',//生产环境