diff --git a/src/api/model/common.js b/src/api/model/common.js index 656ff82..e677b69 100644 --- a/src/api/model/common.js +++ b/src/api/model/common.js @@ -1,14 +1,14 @@ import http from "@/utils/request" export default { upload: { - url: '/upload', + url: '/upload/admin/upload', post: async function(data, config = {}) { return await http.post(this.url, data, config); } }, uploadFile: { post: async function(data, config = {}) { - return await http.post('/upload?type=file', data, config); + return await http.post('/upload/admin/upload?type=file', data, config); } }, } \ No newline at end of file diff --git a/src/components/xEditor/index.vue b/src/components/xEditor/index.vue index 6e6d74a..dfb11d1 100644 --- a/src/components/xEditor/index.vue +++ b/src/components/xEditor/index.vue @@ -68,10 +68,10 @@ data() { return { init: { - language_url: (process.env.PUBLIC_PATH === 'production' ? process.env.PUBLIC_PATH: '') + 'tinymce/langs/zh_CN.js', + language_url: process.env.BASE_URL + 'tinymce/langs/zh_CN.js', language: 'zh_CN', - skin_url: (process.env.PUBLIC_PATH === 'production' ? process.env.PUBLIC_PATH: '') + 'tinymce/skins/ui/oxide', - content_css: (process.env.PUBLIC_PATH === 'production' ? process.env.PUBLIC_PATH: '') + "tinymce/skins/content/default/content.css", + skin_url: process.env.BASE_URL + 'tinymce/skins/ui/oxide', + content_css: process.env.BASE_URL + "tinymce/skins/content/default/content.css", menubar: false, statusbar: true, plugins: this.plugins, @@ -133,6 +133,9 @@ } }, mounted() { + + console.log(process.env) + tinymce.init({}) }, methods: {