From 90c3c4ba2593a74c8b7f7a863991ff6ed705712a Mon Sep 17 00:00:00 2001 From: todaywindy Date: Wed, 11 Jun 2025 17:14:31 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A2=E5=8D=95=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- addons/address/config.php | 4 +- application/admin/controller/AmapTrait.php | 3 +- application/admin/view/order/add.html | 52 ++++++- application/admin/view/order/copy.html | 54 +++++-- application/admin/view/order/edit.html | 54 +++++-- public/assets/js/backend/order.js | 159 ++++++++++++++++++--- 6 files changed, 283 insertions(+), 43 deletions(-) diff --git a/addons/address/config.php b/addons/address/config.php index 96ab16a..6bf5e5e 100644 --- a/addons/address/config.php +++ b/addons/address/config.php @@ -70,7 +70,7 @@ return [ 'title' => '高德地图KEY', 'type' => 'string', 'content' => [], - 'value' => 'dd4e8434697466586aaac37167abfb52', + 'value' => 'cc6b0958c512ac08b0aa884f9b64d553', 'rule' => '', 'msg' => '', 'tip' => '', @@ -82,7 +82,7 @@ return [ 'title' => '高德地图安全密钥', 'type' => 'string', 'content' => [], - 'value' => '38b7b7a5e4b90dcb1aa4999826d4e9d1', + 'value' => 'a2ac54e925b448f8884e35ead370c12d', 'rule' => '', 'msg' => '', 'tip' => '', diff --git a/application/admin/controller/AmapTrait.php b/application/admin/controller/AmapTrait.php index 5fa3e51..41cfa89 100644 --- a/application/admin/controller/AmapTrait.php +++ b/application/admin/controller/AmapTrait.php @@ -32,11 +32,12 @@ trait AmapTrait try { $response = Http::get($url, $params); $data = json_decode($response, true); - +// dd($data); if (isset($data['status']) && $data['status'] == '1') { return $data['pois']['0'] ?? false; } } catch (\Exception $e) { + throw $e; // 这里可以做日志记录 } return false; diff --git a/application/admin/view/order/add.html b/application/admin/view/order/add.html index d811cc4..ad8cb8d 100644 --- a/application/admin/view/order/add.html +++ b/application/admin/view/order/add.html @@ -53,13 +53,14 @@ data-lat-id="lat">地图查找 -
+
+
    *设置时间:
    - +
    @@ -194,6 +202,44 @@ width: 386px; height: 768px; } + + #suggestionList { + position: absolute; + top: 100%; + left: 0; + width: 100%; + max-height: 240px; + overflow-y: auto; + margin-top: 4px; + padding: 0; + list-style: none; + background-color: #fff; + border-radius: 8px; + box-shadow: 0 4px 12px rgba(0,0,0,0.1); + z-index: 9999; + font-size: 14px; + } + + #suggestionList li { + padding: 10px 14px; + cursor: pointer; + transition: background-color 0.2s; + border-bottom: 1px solid #f1f1f1; + } + + #suggestionList li:last-child { + border-bottom: none; + } + + #suggestionList li:hover { + background-color: #f5f8fa; + color: #007aff; + } + #suggestionList li.active { + background-color: #82b0e1; + color: white; + } +