Explorar el Código

手持端图片路径问题解决

zengjun hace 6 meses
padre
commit
c2dd3baf24
Se han modificado 1 ficheros con 2 adiciones y 4 borrados
  1. 2 4
      src/views/processing/photoTask/index.vue

+ 2 - 4
src/views/processing/photoTask/index.vue

@@ -308,10 +308,8 @@ function showPhotos(row) {
       showNotify({ type: 'warning', message: '没有对应的拍摄' })
       return
     }
-    const baseUrl = import.meta.env.VITE_APP_BASE_API + 'statics/storage/'
-    const paths = baseUrl.split('.')
-    paths[1] = 'swms'
-    const base = paths.join('.')
+    let baseUrl = import.meta.env.VITE_APP_BASE_API + 'statics/storage/'
+    const base = baseUrl.replace("api","swms")
     // 解构图片url
     reviewImages.value = items.map(item => {
       const {path,module} = item