diff --git a/index.html b/index.html index 51e10fc..d6e3405 100644 --- a/index.html +++ b/index.html @@ -11,9 +11,8 @@ - \ No newline at end of file diff --git a/src/axios/ShowApi.js b/src/axios/ShowApi.js index 389c2a5..6be80e3 100644 --- a/src/axios/ShowApi.js +++ b/src/axios/ShowApi.js @@ -3,7 +3,7 @@ import service from "."; const ShowApi = { //获取众筹信息 showPage(){ - return service.get('/page'); + return service.get('https://api.homilychart.com/crowdfunding/page'); } } diff --git a/src/views/backindex.vue b/src/views/backindex.vue index 348794f..98a5114 100644 --- a/src/views/backindex.vue +++ b/src/views/backindex.vue @@ -14,7 +14,7 @@ const deleteInfo = ref(false); const info = ref({}); const getInfo = async function () { try { - const result = await axios.get("http://192.168.9.117:8092/page"); + const result = await axios.get("https://api.homilychart.com/crowdfunding/page"); info.value.title = result.data.data.title; info.value.targetNumber = result.data.data.targetNumber; } catch (error) { @@ -34,7 +34,7 @@ const putTitle = async function () { formData.append(key, titleNew.value[key]); } const result = await axios.put( - "http://192.168.9.117:8092/title", + "https://api.homilychart.com/crowdfunding/title", formData, { headers: { @@ -69,7 +69,7 @@ const putTargetNumber = async function () { formData.append(key, targetNumberNew.value[key]); } const result = await axios.put( - "http://192.168.9.117:8092/target", + "https://api.homilychart.com/crowdfunding/target", formData, { headers: { @@ -102,7 +102,7 @@ const tableData = ref([]); const get = async function () { try { const result = await axios.post( - "http://192.168.9.117:8092/users", + "https://api.homilychart.com/crowdfunding/users", search.value ); tableData.value = result.data.data; @@ -117,7 +117,7 @@ const add = ref({}); const addUser = async function () { try { const result = await axios.post( - "http://192.168.9.117:8092/addUser", + "https://api.homilychart.com/crowdfunding/addUser", add.value ); if (result.data.code == 10000) { @@ -146,7 +146,7 @@ function deleteRow(value) { const tureDelete = async function () { try { const result = await axios.delete( - "http://192.168.9.117:8092/delUser/" + idname.value + "https://api.homilychart.com/crowdfunding/delUser/" + idname.value ); if (result.data.code == 10000) { ElMessage.success("修改成功"); @@ -172,7 +172,7 @@ const searchBy = ref({ const searchByJwcodeAndIdentity = async function () { try { const result = await axios.post( - "http://192.168.9.117:8092/users", + "https://api.homilychart.com/crowdfunding/users", searchBy.value ); if (result.data.code == 10000) { diff --git a/vite.config.js b/vite.config.js index dc693ef..1cac81a 100644 --- a/vite.config.js +++ b/vite.config.js @@ -16,13 +16,13 @@ export default defineConfig({ }, }, server: { - proxy: { - '/api': { - //后端服务器地址 - target: 'http://192.168.9.117:8092', - changeOrigin: true, - rewrite: (path) => path.replace(/^\/api/, '') - } - } + // proxy: { + // '/api': { + // //后端服务器地址 + // target: 'https://api.homilychart.com/crowdfunding', + // changeOrigin: true, + // rewrite: (path) => path.replace(/^\/api/, '') + // } + // } } })