This commit is contained in:
pushuo 2022-08-12 12:03:15 +08:00
parent 607e48b8dc
commit 262031236f
1 changed files with 16 additions and 0 deletions

View File

@ -3,8 +3,24 @@ import common from "./common";
window.bk = common;
window.$http = http;
const token = document.querySelector('meta[name="csrf-token"]').content;
const base = document.querySelector('base').href;
import './product';
import './header'
$(document).ready(function ($) {
$.ajaxSetup({
headers: {'X-CSRF-TOKEN': token},
// beforeSend: function() { layer.load(2, {shade: [0.3,'#fff'] }); },
// complete: function() { layer.closeAll('loading'); },
error: function(xhr, ajaxOptions, thrownError) {
if (xhr.responseJSON.message) {
layer.msg(xhr.responseJSON.message,() => {})
}
},
});
});
bk.getCarts(); // 页面初始加载购物车数据
bk.slidingFixed();