From 7d47e9d021938dba5a203bb93dde424255030de4 Mon Sep 17 00:00:00 2001
From: Administrator <15274802129@163.com>
Date: Tue, 23 Jun 2026 11:06:38 +0800
Subject: [PATCH] fix(config): 更新测试环境数据库配置并优化国家配送列表界面

---
 src/main/resources/templates/febs/views/modules/system/countryDeliveryList.html |   32 +++++++++++---------------------
 src/main/resources/application-test.yml                                         |   10 +++++++---
 2 files changed, 18 insertions(+), 24 deletions(-)

diff --git a/src/main/resources/application-test.yml b/src/main/resources/application-test.yml
index d46a052..44f5101 100644
--- a/src/main/resources/application-test.yml
+++ b/src/main/resources/application-test.yml
@@ -17,10 +17,14 @@
       datasource:
         # 数据源-1,名称为 base
         base:
-          username: db_e2
-          password: db_e20806123!@#
+#          username: db_e2
+#          password: db_e20806123!@#
+#          driver-class-name: com.mysql.cj.jdbc.Driver
+#          url: jdbc:mysql://120.27.238.55:3406/db_e2?useUnicode=true&characterEncoding=UTF-8&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2b8
+          username: root
+          password: 1!qaz2@WSX
           driver-class-name: com.mysql.cj.jdbc.Driver
-          url: jdbc:mysql://120.27.238.55:3406/db_e2?useUnicode=true&characterEncoding=UTF-8&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2b8
+          url: jdbc:mysql://159.198.39.140:3306/db_e2?useUnicode=true&characterEncoding=UTF-8&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2b8
 
   redis:
     # Redis数据库索引(默认为 0)
diff --git a/src/main/resources/templates/febs/views/modules/system/countryDeliveryList.html b/src/main/resources/templates/febs/views/modules/system/countryDeliveryList.html
index 1464fee..cd32c0c 100644
--- a/src/main/resources/templates/febs/views/modules/system/countryDeliveryList.html
+++ b/src/main/resources/templates/febs/views/modules/system/countryDeliveryList.html
@@ -86,14 +86,15 @@
                     {field: 'countryCode', title: '国家编码', width: 120, align: 'center'},
                     {field: 'countryName', title: '国家名称', width: 150, align: 'center'},
                     {field: 'shippingFee', title: '运费(元)', width: 120, align: 'center'},
-                    {field: 'status', title: '状态', width: 80, align: 'center',
+                    {field: 'status', title: '状态', width: 100, align: 'center',
                         templet: function (d) {
-                            return d.status === 1 ? '<span class="layui-badge layui-bg-green">启用</span>'
-                                : '<span class="layui-badge">禁用</span>';
+                            return d.status === 1
+                                ? '<span style="color:#5FB878;">● 启用</span>'
+                                : '<span style="color:#999;">● 禁用</span>';
                         }
                     },
-                    {field: 'remark', title: '备注', minWidth: 150, align: 'left'},
-                    {title: '操作', templet: '#country-delivery-option', width: 120, align: 'center'}
+                    {title: '操作', templet: '#country-delivery-option', width: 120, align: 'center'},
+                    {field: 'remark', title: '备注', minWidth: 100, align: 'center'},
                 ]]
             });
         }
@@ -143,25 +144,14 @@
                 title: title,
                 area: ['500px', '420px'],
                 content: html,
+                success: function (layero) {
+                    form.render('radio', 'country-delivery-form');
+                },
                 btn: ['保存', '取消'],
                 yes: function (index, layero) {
                     var formObj = $(layero).find('form');
-                    var fieldData = {};
-                    formObj.find('input[name]').each(function () {
-                        var name = $(this).attr('name');
-                        var type = $(this).attr('type');
-                        if (type === 'radio' && !$(this).prop('checked')) return;
-                        if (type !== 'radio') {
-                            fieldData[name] = $(this).val();
-                        } else {
-                            fieldData[name] = $(this).val();
-                        }
-                    });
-                    // radio
-                    var statusVal = formObj.find('input[name="status"]:checked').val();
-                    fieldData.status = statusVal;
-
-                    febs.post(ctx + 'admin/system/countryDeliverySave', fieldData, function (res) {
+                    var data = form.val("country-delivery-form");
+                    febs.post(ctx + 'admin/system/countryDeliverySave', data, function (res) {
                         layer.close(index);
                         febs.alert.success('保存成功');
                         tableIns.reload();

--
Gitblit v1.9.1