$(function() { $("#subbtn").click(function() { var name = $("#name").val() var phone = $("#phone").val() var content = $("#content").val() var Email = $("#Email").val() AjaxUtils.post('apis/contact/add', { name: name, phone: phone, content: content, email: Email, vehicle_id: 0 }).done(function(result) { alert(result.data.message) // console.log(result); }).fail(function(error) { // console.error(error); }); }) $("#subscribeFn").click(function() { var email = $("#emailinput").val() // if (email == '') { // return false // } AjaxUtils.post('apis/email/subscribe', { email: email, }).done(function(result) { alert(result.message) // console.log(result); }).fail(function(error) { // console.error(error); }); }) AjaxUtils.get('apis/brand/letterAll', { is_hot:'1', }).done(function(data) { var brandList = data.data; var html='' $.each(brandList,function(){ 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); }); })