|
@@ -28,6 +28,7 @@ import wbsApi from '~api/data-fill/wbs';
|
|
|
import {errorToast, openDocFile, successToast, toPdfPreview} from "@/utils/tools";
|
|
|
import {getArrValue, getObjValue} from "js-fast-way";
|
|
|
import {getTokenHeader} from "@/httpApi/request/header";
|
|
|
+import {getUploadApi} from "@/httpApi/modules/upload";
|
|
|
|
|
|
const store = useAppStore()
|
|
|
|
|
@@ -90,7 +91,7 @@ const selectFileChange = ({file, path}) => {
|
|
|
if(file) {
|
|
|
uni.showLoading({title: '上传文件中...', mask: true})
|
|
|
uni.uploadFile({
|
|
|
- url: '/api/blade-manager/exceltab/add-buss-file',
|
|
|
+ url: getUploadApi() + 'blade-manager/exceltab/add-buss-file',
|
|
|
name: 'file',
|
|
|
file: file,
|
|
|
filePath: path,
|
|
@@ -124,7 +125,7 @@ const setUploadFile = async (arr) => {
|
|
|
const uploadFileApi = async (file) => {
|
|
|
return new Promise((resolve) => {
|
|
|
uni.uploadFile({
|
|
|
- url: '/api/blade-manager/exceltab/add-buss-file',
|
|
|
+ url: getUploadApi() + 'blade-manager/exceltab/add-buss-file',
|
|
|
name: 'file',
|
|
|
filePath: file,
|
|
|
formData: pageNode.value,
|
|
@@ -161,7 +162,7 @@ const fileTap = async({url, extension}) => {
|
|
|
const img = ['gif', 'jpg', 'jpeg', 'png', 'bmp', 'webp']
|
|
|
if(word.indexOf(extension) !== -1) {
|
|
|
if(extension === 'pdf') {
|
|
|
- toPdfPreview(url)
|
|
|
+ toPdfPreview(url).then()
|
|
|
} else {
|
|
|
openDocFile(url, extension)
|
|
|
}
|