Commit e48045d6 authored by 胡占生's avatar 胡占生 🇨🇳
Browse files

fix:算法详情接口对接,算法详情展示接口联调

parent d69ee4e9
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -6,3 +6,6 @@ VITE_APP_ENV = 'development'

# AI视频分析平台/开发环境
VITE_APP_BASE_API = '/dev-api'

# 图片服务器地址
VITE_IMG_BASE_PATH = 'http://192.168.4.206'
+4 −1
Original line number Diff line number Diff line
@@ -9,3 +9,6 @@ VITE_APP_BASE_API = '/ai'

# 是否在打包时开启压缩,支持 gzip 和 brotli
VITE_BUILD_COMPRESS = gzip

# 图片服务器地址
VITE_IMG_BASE_PATH = 'http://192.168.4.206'
 No newline at end of file
+4 −1
Original line number Diff line number Diff line
@@ -9,3 +9,6 @@ VITE_APP_BASE_API = '/stage-api'

# 是否在打包时开启压缩,支持 gzip 和 brotli
VITE_BUILD_COMPRESS = gzip

# 图片服务器地址
VITE_IMG_BASE_PATH = 'http://192.168.4.206'
 No newline at end of file
+2 −2
Original line number Diff line number Diff line
@@ -40,7 +40,7 @@ const realSrc = computed(() => {
  if (isExternal(real_src)) {
    return real_src;
  }
  return import.meta.env.VITE_APP_BASE_API + real_src;
  return import.meta.env.VITE_IMG_BASE_PATH + real_src;
});

const realSrcList = computed(() => {
@@ -53,7 +53,7 @@ const realSrcList = computed(() => {
    if (isExternal(item)) {
      return srcList.push(item);
    }
    return srcList.push(import.meta.env.VITE_APP_BASE_API + item);
    return srcList.push(import.meta.env.VITE_IMG_BASE_PATH + item);
  });
  return srcList;
});
+11 −1
Original line number Diff line number Diff line
@@ -70,6 +70,11 @@ const props = defineProps({
    type: Boolean,
    default: true
  },
  // 是否显示提示
  defaultUrl: {
    type: String,
    default: import.meta.env.VITE_APP_BASE_API
  },
});

const { proxy } = getCurrentInstance();
@@ -79,7 +84,10 @@ const uploadList = ref([]);
const dialogImageUrl = ref("");
const dialogVisible = ref(false);
const baseUrl = 'http://192.168.4.206'
const uploadImgUrl = ref(import.meta.env.VITE_APP_BASE_API + "/common/upload"); // 上传的图片服务器地址
const uploadImgUrl = computed(
  () => props.defaultUrl + "/common/upload"
);
// const uploadImgUrl = ref(import.meta.env.VITE_APP_BASE_API + "/common/upload"); // 上传的图片服务器地址
const headers = ref({ Authorization: "Bearer " + getToken() });
const fileList = ref([]);
const showTip = computed(
@@ -151,6 +159,7 @@ function handleUploadSuccess(res, file) {
  if (res.code === 200) {
    uploadList.value.push({ name: res.fileName, url: res.fileName });
    uploadedSuccessfully();
    emit("update:modelObj", res);
  } else {
    number.value--;
    proxy.$modal.closeLoading();
@@ -177,6 +186,7 @@ function uploadedSuccessfully() {
    uploadList.value = [];
    number.value = 0;
    emit("update:modelValue", listToString(fileList.value));
   
    proxy.$modal.closeLoading();
  }
}
Loading