From 53ecded4ee17bc2a30cbdeeb5c3377f143beb264 Mon Sep 17 00:00:00 2001 From: hongxilin <17663930442@163.com> Date: Mon, 13 Jan 2025 15:37:09 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=80=E6=9C=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gold-system/README.md | 8 +- gold-system/package-lock.json | 120 ++++++++++++++++++++++ gold-system/package.json | 4 + gold-system/src/main.ts | 17 ++- gold-system/src/views/audit/rechargeAudit.vue | 12 +-- gold-system/src/views/audit/refundAudit.vue | 10 +- gold-system/src/views/consume/addConsume.vue | 10 +- gold-system/src/views/consume/allConsume.vue | 4 +- gold-system/src/views/index.vue | 2 +- gold-system/src/views/login.vue | 2 +- gold-system/src/views/managerecharge/activity.vue | 8 +- gold-system/src/views/managerecharge/rate.vue | 14 +-- gold-system/src/views/recharge/addRecharge.vue | 33 +++--- gold-system/src/views/recharge/adminRecharge.vue | 10 +- gold-system/src/views/recharge/allRecharge.vue | 6 +- gold-system/src/views/refund/addRefund.vue | 10 +- gold-system/src/views/refund/allRefund.vue | 8 +- gold-system/src/views/usergold/index.vue | 6 +- gold-system/src/views/usergoldInfo/index.vue | 4 +- gold-system/src/views/workspace/index.vue | 22 ++-- gold-system/tsconfig.app.json | 4 +- gold-system/vite.config.ts | 26 ++++- 22 files changed, 250 insertions(+), 90 deletions(-) diff --git a/gold-system/README.md b/gold-system/README.md index e395a50..49b93c3 100644 --- a/gold-system/README.md +++ b/gold-system/README.md @@ -28,4 +28,10 @@ npm install xlsx 安装xlsx组件,解决excel文件读取问题 npm install vue-json-excel 安装导出 excel 组件 -npm install lodash 安装lodash组件,解决数据处理问题 \ No newline at end of file +npm install lodash 安装lodash组件,解决数据处理问题 + +npm install vite-plugin-lazy-import -D 安装按需加载组件 + +npm install vxe-pc-ui@4.3.66 vxe-table@4.10.2 vxe-utils@4.1.11 安装vxe组件 + +npm install --save-dev @types/node 安装typescript声明文件 \ No newline at end of file diff --git a/gold-system/package-lock.json b/gold-system/package-lock.json index 0eb47cc..55e4a82 100644 --- a/gold-system/package-lock.json +++ b/gold-system/package-lock.json @@ -19,12 +19,16 @@ "vue-icons-plus": "^0.1.7", "vue-json-excel": "^0.3.0", "vue-router": "^4.5.0", + "vxe-pc-ui": "^4.3.66", + "vxe-table": "^4.10.2", "xlsx": "^0.18.5" }, "devDependencies": { + "@types/node": "^22.10.5", "@vitejs/plugin-vue": "^5.1.4", "typescript": "~5.6.2", "vite": "^5.4.10", + "vite-plugin-lazy-import": "^1.0.7", "vue-tsc": "^2.1.8" } }, @@ -537,6 +541,29 @@ "url": "https://opencollective.com/popperjs" } }, + "node_modules/@rollup/pluginutils": { + "version": "5.1.4", + "resolved": "https://mirrors.huaweicloud.com/repository/npm/@rollup/pluginutils/-/pluginutils-5.1.4.tgz", + "integrity": "sha512-USm05zrsFxYLPdWWq+K3STlWiT/3ELn3RcV5hJMghpeAIhxfsUIg6mt12CBJBInWMV4VneoV7SfGv8xIwo2qNQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "^1.0.0", + "estree-walker": "^2.0.2", + "picomatch": "^4.0.2" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + } + } + }, "node_modules/@rollup/rollup-android-arm-eabi": { "version": "4.27.4", "resolved": "https://mirrors.huaweicloud.com/repository/npm/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.27.4.tgz", @@ -811,6 +838,16 @@ "@types/lodash": "*" } }, + "node_modules/@types/node": { + "version": "22.10.5", + "resolved": "https://mirrors.huaweicloud.com/repository/npm/@types/node/-/node-22.10.5.tgz", + "integrity": "sha512-F8Q+SeGimwOo86fiovQh8qiXfFEh2/ocYv7tU5pJ3EXMSSxk1Joj5wefpFK2fHTf/N6HKGSxIDBT9f3gCxXPkQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": "~6.20.0" + } + }, "node_modules/@types/web-bluetooth": { "version": "0.0.16", "resolved": "https://mirrors.huaweicloud.com/repository/npm/@types/web-bluetooth/-/web-bluetooth-0.0.16.tgz", @@ -1090,6 +1127,19 @@ } } }, + "node_modules/@vxe-ui/core": { + "version": "4.0.28", + "resolved": "https://mirrors.huaweicloud.com/repository/npm/@vxe-ui/core/-/core-4.0.28.tgz", + "integrity": "sha512-i0QefnZMqVqhTVRqXKcmusnLEi7R2xzbVtgZtm3X6oiwCDjg2HzNBSGcf11trN2SkSjincEVrj0qeYCib5PvTw==", + "license": "MIT", + "dependencies": { + "dom-zindex": "^1.0.6", + "xe-utils": "^3.7.0" + }, + "peerDependencies": { + "vue": "^3.2.0" + } + }, "node_modules/adler-32": { "version": "1.3.1", "resolved": "https://mirrors.huaweicloud.com/repository/npm/adler-32/-/adler-32-1.3.1.tgz", @@ -1239,6 +1289,12 @@ "node": ">=0.4.0" } }, + "node_modules/dom-zindex": { + "version": "1.0.6", + "resolved": "https://mirrors.huaweicloud.com/repository/npm/dom-zindex/-/dom-zindex-1.0.6.tgz", + "integrity": "sha512-FKWIhiU96bi3xpP9ewRMgANsoVmMUBnMnmpCT6dPMZOunVYJQmJhSRruoI0XSPoHeIif3kyEuiHbFrOJwEJaEA==", + "license": "MIT" + }, "node_modules/downloadjs": { "version": "1.4.7", "resolved": "https://mirrors.huaweicloud.com/repository/npm/downloadjs/-/downloadjs-1.4.7.tgz", @@ -1293,6 +1349,13 @@ "url": "https://github.com/fb55/entities?sponsor=1" } }, + "node_modules/es-module-lexer": { + "version": "1.6.0", + "resolved": "https://mirrors.huaweicloud.com/repository/npm/es-module-lexer/-/es-module-lexer-1.6.0.tgz", + "integrity": "sha512-qqnD1yMU6tk/jnaMosogGySTZP8YtUgAffA9nMN+E/rjxcfRQ6IEk7IiozUjgxKoFHBGjTLnrHB/YC45r/59EQ==", + "dev": true, + "license": "MIT" + }, "node_modules/esbuild": { "version": "0.21.5", "resolved": "https://mirrors.huaweicloud.com/repository/npm/esbuild/-/esbuild-0.21.5.tgz", @@ -1588,6 +1651,19 @@ "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", "license": "ISC" }, + "node_modules/picomatch": { + "version": "4.0.2", + "resolved": "https://mirrors.huaweicloud.com/repository/npm/picomatch/-/picomatch-4.0.2.tgz", + "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, "node_modules/postcss": { "version": "8.4.49", "resolved": "https://mirrors.huaweicloud.com/repository/npm/postcss/-/postcss-8.4.49.tgz", @@ -1741,6 +1817,13 @@ "node": ">=14.17" } }, + "node_modules/undici-types": { + "version": "6.20.0", + "resolved": "https://mirrors.huaweicloud.com/repository/npm/undici-types/-/undici-types-6.20.0.tgz", + "integrity": "sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==", + "dev": true, + "license": "MIT" + }, "node_modules/vite": { "version": "5.4.11", "resolved": "https://mirrors.huaweicloud.com/repository/npm/vite/-/vite-5.4.11.tgz", @@ -1801,6 +1884,19 @@ } } }, + "node_modules/vite-plugin-lazy-import": { + "version": "1.0.7", + "resolved": "https://mirrors.huaweicloud.com/repository/npm/vite-plugin-lazy-import/-/vite-plugin-lazy-import-1.0.7.tgz", + "integrity": "sha512-mE6oAObOb4wqso4AoUGi9cLjdR+4vay1RCaKJvziBuFPlziZl7J0aw2hsqRTokLVRx3bli0a0VyjMOwsNDv58A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@rollup/pluginutils": "^5.1.0", + "es-module-lexer": "^1.5.3", + "rollup": "^4.18.0", + "xe-utils": "^3.5.26" + } + }, "node_modules/vscode-uri": { "version": "3.0.8", "resolved": "https://mirrors.huaweicloud.com/repository/npm/vscode-uri/-/vscode-uri-3.0.8.tgz", @@ -1880,6 +1976,24 @@ "typescript": ">=5.0.0" } }, + "node_modules/vxe-pc-ui": { + "version": "4.3.66", + "resolved": "https://mirrors.huaweicloud.com/repository/npm/vxe-pc-ui/-/vxe-pc-ui-4.3.66.tgz", + "integrity": "sha512-6hTiiYb2us+OX9aGWovQjSo2XUE/Q7nnXHisdSNAn5QfI73VM/B/Td1xzPc5nCnP+Zxaoeb4IuTPMQ+xVUnzTQ==", + "license": "MIT", + "dependencies": { + "@vxe-ui/core": "^4.0.28" + } + }, + "node_modules/vxe-table": { + "version": "4.10.2", + "resolved": "https://mirrors.huaweicloud.com/repository/npm/vxe-table/-/vxe-table-4.10.2.tgz", + "integrity": "sha512-qwyDHFppqARa/EoOlm83+me0NntPM8G4+2Pw8gcaiGiA04VxMRUkK5ZLZOMWBlV1bIRftHjlI31MJ4G8WogADg==", + "license": "MIT", + "dependencies": { + "vxe-pc-ui": "^4.3.66" + } + }, "node_modules/wmf": { "version": "1.0.2", "resolved": "https://mirrors.huaweicloud.com/repository/npm/wmf/-/wmf-1.0.2.tgz", @@ -1898,6 +2012,12 @@ "node": ">=0.8" } }, + "node_modules/xe-utils": { + "version": "3.7.0", + "resolved": "https://mirrors.huaweicloud.com/repository/npm/xe-utils/-/xe-utils-3.7.0.tgz", + "integrity": "sha512-2pndXCEivB7+xWCdCDth/LJ5ngAAstUOoHTGBQauwTqc03M3Cl1tYbNhPUqi4Lcj+UNZnnc8fANbFWjb6TMx6A==", + "license": "MIT" + }, "node_modules/xlsx": { "version": "0.18.5", "resolved": "https://mirrors.huaweicloud.com/repository/npm/xlsx/-/xlsx-0.18.5.tgz", diff --git a/gold-system/package.json b/gold-system/package.json index 67ab713..717ffbd 100644 --- a/gold-system/package.json +++ b/gold-system/package.json @@ -21,12 +21,16 @@ "vue-icons-plus": "^0.1.7", "vue-json-excel": "^0.3.0", "vue-router": "^4.5.0", + "vxe-pc-ui": "^4.3.66", + "vxe-table": "^4.10.2", "xlsx": "^0.18.5" }, "devDependencies": { + "@types/node": "^22.10.5", "@vitejs/plugin-vue": "^5.1.4", "typescript": "~5.6.2", "vite": "^5.4.10", + "vite-plugin-lazy-import": "^1.0.7", "vue-tsc": "^2.1.8" } } diff --git a/gold-system/src/main.ts b/gold-system/src/main.ts index 0e243ac..5e18f92 100644 --- a/gold-system/src/main.ts +++ b/gold-system/src/main.ts @@ -8,17 +8,24 @@ import * as ElementPlusIconsVue from '@element-plus/icons-vue' import './assets/css/common.css'; // 引入公共CSS文件 import JsonExcel from 'vue-json-excel' -const app = createApp(App) +import VxeUI from 'vxe-pc-ui' +import 'vxe-pc-ui/lib/style.css' +import VxeUITable from 'vxe-table' +import 'vxe-table/lib/style.css' + +const a = createApp(App) + + // 全局注册 ElementPlus 图标 for (const [key, component] of Object.entries(ElementPlusIconsVue)) { - app.component(key, component) + a.component(key, component) } // 使用 ElementPlus 和路由器 -app.use(ElementPlus, { +a.use(ElementPlus, { locale: zhCn, -}).use(router).mount('#app'); +}).use(router).use(VxeUI).use(VxeUITable).mount('#app'); // 注册 JsonExcel 组件 -app.component('downloadExcel', JsonExcel) \ No newline at end of file +a.component('downloadExcel', JsonExcel) \ No newline at end of file diff --git a/gold-system/src/views/audit/rechargeAudit.vue b/gold-system/src/views/audit/rechargeAudit.vue index cfb52d1..3c629f4 100644 --- a/gold-system/src/views/audit/rechargeAudit.vue +++ b/gold-system/src/views/audit/rechargeAudit.vue @@ -19,7 +19,7 @@ const adminData = ref({}); const getAdminData = async function () { try { const result = await API.post( - "http://192.168.8.93:10010/admin/userinfo", + "/hwjb/admin/userinfo", {} ); adminData.value = result; @@ -120,7 +120,7 @@ const get = async function (val) { console.log("搜索参数", getObj.value); // 发送POST请求 const result = await API.post( - "http://192.168.8.93:10010/recharge/recharge", + "/hwjb/recharge/recharge", { ...getObj.value, rechargeVo: { ...rechargeVo.value } } ); @@ -250,7 +250,7 @@ const getActivity = async function () { try { // 发送POST请求 const result = await API.post( - "http://192.168.8.93:10010/recharge/activity/select", + "/hwjb/recharge/activity/select", {} ); @@ -269,7 +269,7 @@ const getArea = async function () { try { // 发送POST请求 const result = await API.post( - "http://192.168.8.93:10010/recharge/user/search", + "/hwjb/recharge/user/search", {} ); // 将响应结果存储到响应式数据中 @@ -334,7 +334,7 @@ const passConfirm = async function () { console.log("通过对象", passObj.value); // 发送POST请求 const result = await API.post( - "http://192.168.8.93:10010/audit/audit/goldedit", + "/hwjb/audit/audit/goldedit", passObj.value ); @@ -381,7 +381,7 @@ const rejectConfirm = async function () { console.log("驳回对象", rejectObj.value); // 发送POST请求 const result = await API.post( - "http://192.168.8.93:10010/audit/audit/goldedit", + "/hwjb/audit/audit/goldedit", rejectObj.value ); diff --git a/gold-system/src/views/audit/refundAudit.vue b/gold-system/src/views/audit/refundAudit.vue index ed29ab5..99d4172 100644 --- a/gold-system/src/views/audit/refundAudit.vue +++ b/gold-system/src/views/audit/refundAudit.vue @@ -88,7 +88,7 @@ const get = async function (val) { console.log("搜索参数", getObj.value); // 发送POST请求 const result = await API.post( - "http://192.168.8.93:10010/audit/audit/refund", + "/hwjb/audit/audit/refund", { ...getObj.value, detail: { ...detail.value } } ); @@ -216,7 +216,7 @@ const handleClick = function (tab, event) { const getProduct = async function () { try { // 发送POST请求 - const result = await API.post("http://192.168.8.93:10010/product", {}); + const result = await API.post("/hwjb/product", {}); // 将响应结果存储到响应式数据中 console.log("请求成功", result); @@ -234,7 +234,7 @@ const getArea = async function () { try { // 发送POST请求 const result = await API.post( - "http://192.168.8.93:10010/recharge/user/search", + "/hwjb/recharge/user/search", {} ); // 将响应结果存储到响应式数据中 @@ -296,7 +296,7 @@ const passConfirm = async function () { console.log("通过对象", passObj.value); // 发送POST请求 const result = await API.post( - "http://192.168.8.93:10010/audit/audit/edit", + "/hwjb/audit/audit/edit", passObj.value ); @@ -342,7 +342,7 @@ const rejectConfirm = async function () { console.log("驳回对象", rejectObj.value); // 发送POST请求 const result = await API.post( - "http://192.168.8.93:10010/audit/audit/edit", + "/hwjb/audit/audit/edit", rejectObj.value ); diff --git a/gold-system/src/views/consume/addConsume.vue b/gold-system/src/views/consume/addConsume.vue index 0581439..b6c99f1 100644 --- a/gold-system/src/views/consume/addConsume.vue +++ b/gold-system/src/views/consume/addConsume.vue @@ -14,7 +14,7 @@ const adminData = ref({}); const getAdminData = async function () { try { const result = await API.post( - "http://192.168.8.93:10010/admin/userinfo", + "/hwjb/admin/userinfo", {} ); adminData.value = result; @@ -40,7 +40,7 @@ const add = async function () { try { // 发送POST请求 const result = await API.post( - "http://192.168.8.93:10010/consume/add", + "/hwjb/consume/add", addConsume.value ); if (result.code === 0) { @@ -138,7 +138,7 @@ const user = ref({ const getUser = async function (jwcode) { try { // 发送POST请求 - const result = await API.post("http://192.168.8.93:10010/recharge/user", { + const result = await API.post("/hwjb/recharge/user", { jwcode: jwcode, }); @@ -168,7 +168,7 @@ const goods = ref([]); const getGoods = async function () { try { // 发送POST请求 - const result = await API.post("http://192.168.8.93:10010/product", {}); + const result = await API.post("/hwjb/product", {}); // 将响应结果存储到响应式数据中 console.log("请求成功", result); @@ -188,7 +188,7 @@ const userGold = ref({}); const getUserGold = async function (jwcode) { try { // 发送POST请求 - const result = await API.post("http://192.168.8.93:10010/recharge/user", { + const result = await API.post("/hwjb/recharge/user", { jwcode: jwcode, }); // 将响应结果存储到响应式数据中 diff --git a/gold-system/src/views/consume/allConsume.vue b/gold-system/src/views/consume/allConsume.vue index 01431ba..061fd99 100644 --- a/gold-system/src/views/consume/allConsume.vue +++ b/gold-system/src/views/consume/allConsume.vue @@ -81,7 +81,7 @@ const get = async function (val) { } console.log("搜索参数", getObj.value); // 发送POST请求 - const result = await API.post("http://192.168.8.93:10010/consume/select", { + const result = await API.post("/hwjb/consume/select", { ...getObj.value, consumeDetail: { ...detailVo.value }, }); @@ -218,7 +218,7 @@ const goods = ref([]); const getGoods = async function () { try { // 发送POST请求 - const result = await API.post("http://192.168.8.93:10010/product", {}); + const result = await API.post("/hwjb/product", {}); // 将响应结果存储到响应式数据中 console.log("请求成功", result); // 存储全部数据 diff --git a/gold-system/src/views/index.vue b/gold-system/src/views/index.vue index 6e2b4a9..d22b20f 100644 --- a/gold-system/src/views/index.vue +++ b/gold-system/src/views/index.vue @@ -19,7 +19,7 @@ const adminData = ref({ const getAdminData = async function () { try { const result = await API.post( - "http://192.168.8.93:10010/admin/userinfo", + "/hwjb/admin/userinfo", {} ); adminData.value = result; diff --git a/gold-system/src/views/login.vue b/gold-system/src/views/login.vue index 73cf936..962e344 100644 --- a/gold-system/src/views/login.vue +++ b/gold-system/src/views/login.vue @@ -16,7 +16,7 @@ const form = ref({ jwcode: "", password: "", token: "" }); const login = async function () { try { const result = await axios.post( - "http://192.168.8.93:10010/admin/login", + "/hwjb/admin/login", form.value ); if (result.data.code == 200) { diff --git a/gold-system/src/views/managerecharge/activity.vue b/gold-system/src/views/managerecharge/activity.vue index 9156d73..a231145 100644 --- a/gold-system/src/views/managerecharge/activity.vue +++ b/gold-system/src/views/managerecharge/activity.vue @@ -12,7 +12,7 @@ const adminData = ref({}); const getAdminData = async function () { try { const result = await API.post( - "http://192.168.8.93:10010/admin/userinfo", + "/hwjb/admin/userinfo", {} ); adminData.value = result; @@ -75,7 +75,7 @@ const get = async function (val) { console.log("搜索参数", getObj.value); // 发送POST请求 const result = await API.post( - "http://192.168.8.93:10010/recharge/activity/select", + "/hwjb/recharge/activity/select", { ...getObj.value, activity: { ...activity.value } } ); @@ -138,7 +138,7 @@ const add = async function () { console.log("添加对象", addObj.value); // 发送POST请求 const result = await API.post( - "http://192.168.8.93:10010/recharge/activity/add", + "/hwjb/recharge/activity/add", addObj.value ); @@ -193,7 +193,7 @@ const delConfirm = async function () { console.log("delObj", delObj.value); // 发送POST请求 const result = await API.post( - "http://192.168.8.93:10010/recharge/activity/edit", + "/hwjb/recharge/activity/edit", delObj.value ); // 将响应结果存储到响应式数据中 diff --git a/gold-system/src/views/managerecharge/rate.vue b/gold-system/src/views/managerecharge/rate.vue index fcbdd10..6e4b1d2 100644 --- a/gold-system/src/views/managerecharge/rate.vue +++ b/gold-system/src/views/managerecharge/rate.vue @@ -14,7 +14,7 @@ const adminData = ref({ const getAdminData = async function () { try { const result = await API.post( - "http://192.168.8.93:10010/admin/userinfo", + "/hwjb/admin/userinfo", {} ); adminData.value = result; @@ -74,7 +74,7 @@ const get = async function (val) { console.log("搜索参数", getObj.value); // 发送POST请求 - const result = await API.post("http://192.168.8.93:10010/rates/search", { + const result = await API.post("/hwjb/rates/search", { ...getObj.value, rate: { ...time.value }, }); @@ -120,7 +120,7 @@ const addRate = async function () { console.log("搜索参数", getObj.value); // 发送POST请求 const result = await API.post( - "http://192.168.8.93:10010/rates/add", + "/hwjb/rates/add", rateAdd.value ); if (result.code == 0) { @@ -170,7 +170,7 @@ const getEditData = async function (row) { console.log("搜索参数", getObj.value); // 发送POST请求 const result = await API.post( - "http://192.168.8.93:10010/rates/searchById?rateId=" + row.rateId, + "/hwjb/rates/searchById?rateId=" + row.rateId, {} ); @@ -205,7 +205,7 @@ const editRate = async function () { console.log("搜索参数", rateEdit.value); // 发送POST请求 const result = await API.post( - "http://192.168.8.93:10010/rates/update", + "/hwjb/rates/update", rateEdit.value ); // 将响应结果存储到响应式数据中 @@ -232,7 +232,7 @@ const deleteRate = async function (row) { try { // 发送POST请求 const result = await API.post( - "http://192.168.8.93:10010/rates/delete/ " + row.rateId, + "/hwjb/rates/delete/ " + row.rateId, {} ); // 将响应结果存储到响应式数据中 @@ -388,7 +388,7 @@ const delConfirm = async function (row) { try { // 发送POST请求 const result = await API.post( - "http://192.168.8.93:10010/rates/delete/ " + row.rateId, + "/hwjb/rates/delete/ " + row.rateId, {} ); // 将响应结果存储到响应式数据中 diff --git a/gold-system/src/views/recharge/addRecharge.vue b/gold-system/src/views/recharge/addRecharge.vue index e4ce0d8..5a4b58b 100644 --- a/gold-system/src/views/recharge/addRecharge.vue +++ b/gold-system/src/views/recharge/addRecharge.vue @@ -18,7 +18,7 @@ const adminData = ref({}); const getAdminData = async function () { try { const result = await API.post( - "http://192.168.8.93:10010/admin/userinfo", + "/hwjb/admin/userinfo", {} ); adminData.value = result; @@ -48,7 +48,7 @@ const add = async function () { console.log("开始添加充值信息", addRecharge.value); // 发送POST请求 const result = await API.post( - "http://192.168.8.93:10010/recharge/recharge/add", + "/hwjb/recharge/recharge/add", addRecharge.value ); if (result.code === 0) { @@ -130,7 +130,7 @@ const user = ref({ const getUser = async function (jwcode) { try { // 发送POST请求 - const result = await API.post("http://192.168.8.93:10010/recharge/user", { + const result = await API.post("/hwjb/recharge/user", { jwcode: jwcode, }); @@ -161,7 +161,7 @@ const getActivity = async function () { try { // 发送POST请求 const result = await API.post( - "http://192.168.8.93:10010/recharge/activity/select", + "/hwjb/recharge/activity/select", { activity: { status: 1 } } ); @@ -182,7 +182,7 @@ const currency = ref([]); const getCurrency = async function () { try { // 发送POST请求 - const result = await API.post("http://192.168.8.93:10010/rates/status", {}); + const result = await API.post("/hwjb/rates/status", {}); // 将响应结果存储到响应式数据中 console.log("货币请求成功", result); @@ -201,7 +201,7 @@ getCurrency(); const handleAvatarSuccess = (response, uploadFile) => { imageUrl.value = URL.createObjectURL(uploadFile.raw); console.log("图片上传成功", response, uploadFile); - addRecharge.value.rechargeVoucher = `http://192.168.8.93:10010/upload/${response.data}`; + addRecharge.value.rechargeVoucher = `/hwjb/upload/${response.data}`; console.log("图片名称", addRecharge.value.rechargeVoucher); }; @@ -238,7 +238,7 @@ const getActivityById = async function (row) { try { // 发送POST请求 const result = await API.post( - "http://192.168.8.93:10010/recharge/activity/select", + "/hwjb/recharge/activity/select", { activity: { activityId: row } } ); addRecharge.value.rechargeRatio = result.data[0].rechargeRatio; @@ -298,7 +298,7 @@ const getJwcodeList = async function () { try { // 发送POST请求 const result = await API.post( - "http://192.168.8.93:10010/recharge/user/jwcode", + "/hwjb/recharge/user/jwcode", {} ); @@ -336,7 +336,6 @@ const validateInput = function (row, index) { // 批量充值弹窗 const batchRechargeVisible = ref(false); -const jwcodeSelectRef = ref(null); const i = ref(1); const delObj = ref({}); const batchDelObj = ref([]); @@ -642,7 +641,7 @@ const changeVoucher = function (row) { const handleBatchAvatarSuccess = (response, uploadFile) => { imageUrl.value = URL.createObjectURL(uploadFile.raw); console.log("图片上传成功", response, uploadFile); - rechargeVoucher.value = `http://192.168.8.93:10010/upload/${response.data}`; + rechargeVoucher.value = `/hwjb/upload/${response.data}`; console.log("图片名称", rechargeVoucher.value); }; //批量充值确认按钮 @@ -718,7 +717,7 @@ const batchAdd = async function () { console.log("batchData===", batchData.value); const result = await API.post( - "http://192.168.8.93:10010/recharge/recharge/addmore", + "/hwjb/recharge/recharge/addmore", { ...batchData.value } ); @@ -765,7 +764,7 @@ const batchSettingInit = function () { const batchSettingHandleAvatarSuccess = (response, uploadFile) => { batchSettingObj.value.imageUrl = URL.createObjectURL(uploadFile.raw); console.log("图片上传成功", response, uploadFile); - batchSettingObj.value.rechargeVoucher = `http://192.168.8.93:10010/upload/${response.data}`; + batchSettingObj.value.rechargeVoucher = `/hwjb/upload/${response.data}`; console.log("图片名称", batchSettingObj.value.rechargeVoucher); }; // 批量设置取消按钮 @@ -950,7 +949,7 @@ onMounted(async function () { style="margin-bottom: 5px" > 新增一行 -->
添加 - + 添加
@@ -1128,7 +1127,7 @@ onMounted(async function () {