From 6c3f2225ce5cbe82af0c397a5d3ad043f8dc58ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B5=85=E5=BF=B5?= Date: Mon, 9 Jun 2025 11:00:46 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BC=A0=E5=8F=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/js/brand.js | 4 +--- assets/js/index.js | 4 +--- assets/js/main.js | 9 +-------- assets/js/newcar.js | 4 +--- assets/js/rental-sidebar.js | 4 +--- assets/js/vehicle-details.js | 1 - 6 files changed, 5 insertions(+), 21 deletions(-) diff --git a/assets/js/brand.js b/assets/js/brand.js index 67783a9..ec9d8ae 100755 --- a/assets/js/brand.js +++ b/assets/js/brand.js @@ -108,9 +108,7 @@ $(function() { this.currentPage = page; }, godetil(item) { - sessionStorage.setItem('newcardetailId', item.id); - // window.location.href = 'newcar-details.html?id=' + item.id - window.location.href = 'newcar-details.html' + window.location.href = 'newcar-details.html?id=' + item.id } }, }) diff --git a/assets/js/index.js b/assets/js/index.js index 0dc0121..7fe535b 100755 --- a/assets/js/index.js +++ b/assets/js/index.js @@ -65,9 +65,7 @@ $(function() { window.location.href = 'rental-sidebar.html?type=' + item.id }, godetil(item) { - sessionStorage.setItem('vehicledetailId', item.id); - // window.location.href = 'vehicle-details.html?id=' + item.id - window.location.href = 'vehicle-details.html' + window.location.href = 'vehicle-details.html?id=' + item.id }, getbrand(brand_id) { var that = this diff --git a/assets/js/main.js b/assets/js/main.js index e878eb9..689947c 100755 --- a/assets/js/main.js +++ b/assets/js/main.js @@ -38,16 +38,9 @@ $(function() { var brandList = data.data; var html='' $.each(brandList,function(){ - html+='' + html+='' }); $(".has_lv3 .flex-layout").html(html) - - $(".has_lv3 .flex-layout .menu-item a").click(function() { - var brandId = $(this).data('id'); - sessionStorage.setItem('brandsId', brandId); - // window.location.href = 'brand.html?id=' + brandId; - window.location.href = 'brand.html'; - }); }).fail(function(error) { // console.error(error); }); diff --git a/assets/js/newcar.js b/assets/js/newcar.js index 2379de1..e34e98b 100755 --- a/assets/js/newcar.js +++ b/assets/js/newcar.js @@ -180,9 +180,7 @@ $(function() { this.currentPage = page; }, godetil(item) { - sessionStorage.setItem('newcardetailId', item.id); - // window.location.href = 'newcar-details.html?id=' + item.id - window.location.href = 'newcar-details.html' + window.location.href = 'newcar-details.html?id=' + item.id }, }, }) diff --git a/assets/js/rental-sidebar.js b/assets/js/rental-sidebar.js index 2da6dbd..fc79081 100755 --- a/assets/js/rental-sidebar.js +++ b/assets/js/rental-sidebar.js @@ -273,9 +273,7 @@ $(function() { this.currentPage = page; }, godetil(item) { - sessionStorage.setItem('vehicledetailId', item.id); - // window.location.href = 'vehicle-details.html?id=' + item.id - window.location.href = 'vehicle-details.html' + window.location.href = 'vehicle-details.html?id=' + item.id }, clearfn() { for (const key in this.select) { diff --git a/assets/js/vehicle-details.js b/assets/js/vehicle-details.js index dcc625b..dcdb45c 100755 --- a/assets/js/vehicle-details.js +++ b/assets/js/vehicle-details.js @@ -1,7 +1,6 @@ $(function() { // 轮播图 // var id = getQueryString("id") - // const id = sessionStorage.getItem('vehicledetailId'); var id ='' if(getQueryString("id")){ id = getQueryString("id");