From 4ba60763320bb626d5ef14962afaaee0005cd115 Mon Sep 17 00:00:00 2001 From: khalil Date: Thu, 27 Feb 2025 16:03:46 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E5=85=85=E8=BA=AB=E4=BB=BD-=E5=AD=90?= =?UTF-8?q?=E4=BB=A3=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 2 +- src/views/recharge/RechargeUserView.vue | 79 ++++++++++++++++++++++--- vue.config.js | 1 + 3 files changed, 74 insertions(+), 8 deletions(-) diff --git a/.env.development b/.env.development index 00c8f40..825eceb 100644 --- a/.env.development +++ b/.env.development @@ -1,2 +1,2 @@ -VUE_APP_API_BASE_URL='http://beta.admin.pekolive.com' +VUE_APP_API_BASE_URL='http://localhost:8080' VUE_APP_DEBUG_MODE=true \ No newline at end of file diff --git a/src/views/recharge/RechargeUserView.vue b/src/views/recharge/RechargeUserView.vue index 45673c5..81a5ef6 100644 --- a/src/views/recharge/RechargeUserView.vue +++ b/src/views/recharge/RechargeUserView.vue @@ -78,19 +78,15 @@
- +
- +
- @@ -100,6 +96,50 @@
+
+ +
+ +
+
+
+ +
+
+ + + + +
+
+ + + + +
+
+ + + + +
+
+ + + + +
+
+ + + + +
+
+
@@ -366,6 +406,7 @@ export default { $("#id").val(""); $("#erbanNo").val(""); $("#starLevel").val(""); + $("input[name='subErbanNo']").each(function() {$(this).val("");}); showRegion(); $("#editModal").modal("show"); }); @@ -423,6 +464,16 @@ export default { $("#tipModal").modal("show"); return; } + const subErbanNoValues = []; + const subErbanNoInputs = $("input[name='subErbanNo']"); + subErbanNoInputs.each(function() { + const subErbanNo = $(this).val(); + if (subErbanNo){ + subErbanNoValues.push(subErbanNo); + } + }); + console.info("sub", subErbanNoValues); + var userRegionArray = []; for (let i = 0; i < regionArray.length; i++) { var region = regionArray[i]; @@ -448,7 +499,9 @@ export default { var data = { erbanNo: $("#erbanNo").val(), starLevel: $("#starLevel").val(), + hasCharge: $("#hasCharge").val(), userRegions: JSON.stringify(userRegionArray), + subErbanNos: subErbanNoValues.join(","), }; if (id) { data.id = id; @@ -482,6 +535,18 @@ export default { var id = currentData.id; var erbanNo = currentData.erbanNo; var starLevel = currentData.starLevel; + + var subErbanNos = currentData.subErbanNos; + // 回显 subErbanNos 到 input[name='subErbanNo'] + const subErbanNoInputs = $("input[name='subErbanNo']"); + subErbanNoInputs.each(function(index) { + if (subErbanNos && subErbanNos[index]) { + $(this).val(subErbanNos[index]); + } else { + $(this).val(""); + } + }); + var userRegions = currentData.userRegions; $("#erbanNo").val(erbanNo); $("#starLevel").val(starLevel); diff --git a/vue.config.js b/vue.config.js index 99f16aa..c18161a 100644 --- a/vue.config.js +++ b/vue.config.js @@ -30,6 +30,7 @@ module.exports = defineConfig({ ], }, devServer: { + port: 8081, headers: { 'Access-Control-Allow-Origin': '*', },