| | |
| | | <script setup lang="ts"> |
| | | import { QuillEditor, Quill } from '@vueup/vue-quill'; |
| | | import '@vueup/vue-quill/dist/vue-quill.snow.css'; |
| | | import { getToken } from "@/utils/auth"; |
| | | import { propTypes } from '@/utils/propTypes'; |
| | | import { globalHeaders } from "@/utils/request"; |
| | | |
| | | const props = defineProps({ |
| | | /* 编辑器的内容 */ |
| | |
| | | const { proxy } = getCurrentInstance() as ComponentInternalInstance; |
| | | |
| | | const upload = reactive<UploadOption>({ |
| | | headers: { Authorization: "Bearer " + getToken() }, |
| | | headers: globalHeaders, |
| | | url: import.meta.env.VITE_APP_BASE_API + '/resource/oss/upload' |
| | | }) |
| | | const myQuillEditor = ref(); |
| | |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | import { getToken } from "@/utils/auth"; |
| | | import { listByIds, delOss } from "@/api/system/oss"; |
| | | import { propTypes } from '@/utils/propTypes'; |
| | | import { globalHeaders } from "@/utils/request"; |
| | | |
| | | const props = defineProps({ |
| | | modelValue: [String, Object, Array], |
| | |
| | | |
| | | const baseUrl = import.meta.env.VITE_APP_BASE_API; |
| | | const uploadFileUrl = ref(baseUrl + "/resource/oss/upload"); // 上传文件服务器地址 |
| | | const headers = ref({ Authorization: "Bearer " + getToken() }); |
| | | const headers = ref(globalHeaders); |
| | | |
| | | const fileList = ref<any[]>([]); |
| | | const showTip = computed( |
| | |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | import { getToken } from "@/utils/auth"; |
| | | import { listByIds, delOss } from "@/api/system/oss"; |
| | | import { ComponentInternalInstance, PropType } from "vue"; |
| | | import { ComponentInternalInstance } from "vue"; |
| | | import { OssVO } from "@/api/system/oss/types"; |
| | | import { propTypes } from '@/utils/propTypes'; |
| | | import {globalHeaders} from "@/utils/request"; |
| | | |
| | | const props = defineProps({ |
| | | modelValue: [String, Object, Array], |
| | |
| | | |
| | | const baseUrl = import.meta.env.VITE_APP_BASE_API; |
| | | const uploadImgUrl = ref(baseUrl + "/resource/oss/upload"); // 上传的图片服务器地址 |
| | | const headers = ref({ Authorization: "Bearer " + getToken() }); |
| | | const headers = ref(globalHeaders); |
| | | |
| | | const fileList = ref<any[]>([]); |
| | | const showTip = computed( |
| | |
| | | import axios from 'axios'; |
| | | import FileSaver from 'file-saver'; |
| | | import { getToken } from '@/utils/auth'; |
| | | import errorCode from '@/utils/errorCode'; |
| | | import { blobValidate } from '@/utils/ruoyi'; |
| | | import { LoadingInstance } from 'element-plus/es/components/loading/src/loading'; |
| | | import { globalHeaders } from "@/utils/request"; |
| | | |
| | | const baseURL = import.meta.env.VITE_APP_BASE_API; |
| | | let downloadLoadingInstance: LoadingInstance; |
| | |
| | | method: 'get', |
| | | url: url, |
| | | responseType: 'blob', |
| | | headers: { |
| | | Authorization: 'Bearer ' + getToken(), |
| | | clientid: import.meta.env.VITE_APP_CLIENT_ID |
| | | } |
| | | headers: globalHeaders, |
| | | }); |
| | | const isBlob = blobValidate(res.data); |
| | | if (isBlob) { |
| | |
| | | method: 'get', |
| | | url: url, |
| | | responseType: 'blob', |
| | | headers: { |
| | | Authorization: 'Bearer ' + getToken(), |
| | | datasource: localStorage.getItem('dataName'), |
| | | clientid: import.meta.env.VITE_APP_CLIENT_ID |
| | | } |
| | | headers: globalHeaders, |
| | | }); |
| | | const isBlob = blobValidate(res.data); |
| | | if (isBlob) { |
| | |
| | | let downloadLoadingInstance: LoadingInstance; |
| | | // 是否显示重新登录 |
| | | export const isRelogin = { show: false }; |
| | | export const globalHeaders = { |
| | | Authorization: "Bearer " + getToken(), |
| | | clientid: import.meta.env.VITE_APP_CLIENT_ID |
| | | } |
| | | |
| | | axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8'; |
| | | axios.defaults.headers['clientid'] = import.meta.env.VITE_APP_CLIENT_ID; |
| | |
| | | import { RoleVO } from "@/api/system/role/types"; |
| | | import { PostVO } from "@/api/system/post/types"; |
| | | import { to } from "await-to-js"; |
| | | import { globalHeaders } from "@/utils/request"; |
| | | |
| | | const router = useRouter(); |
| | | const { proxy } = getCurrentInstance() as ComponentInternalInstance |
| | |
| | | // 是否更新已经存在的用户数据 |
| | | updateSupport: 0, |
| | | // 设置上传的请求头部 |
| | | headers: { Authorization: "Bearer " + getToken() }, |
| | | headers: globalHeaders, |
| | | // 上传的地址 |
| | | url: import.meta.env.VITE_APP_BASE_API + "/system/user/importData" |
| | | }) |