您的位置:首页 > 运维架构 > 网站架构

B2B商城网站前端开发

2016-10-27 22:57 134 查看
最近在时间很忙,在弄一个B2B商城,运用到的easyUI【后台系统】+javaWEB(maven)+JQuery【前台系统】+Scss+JavaScript+其他框架(sea.js模块化等),我负责前端这块:后期的重要的前端代码,都会发布出来

1、60s短信验证码发送code:

//提交支付回退至购物车  另外jQ中$(function(){})|$(document).ready(function($){}):载入   (function($){})(jQuery):匿名写法 自执行
//history.pushState|replaceState(state, title, url)
//state:与要跳转到的URL对应的状态信息。title:标题(现在是被忽略,未作处理)。url:要跳转到的URL地址,不能跨域。
if (window.history && window.history.pushState) {  //这里做下兼容处理,因为jq不存在history封装,只能通过原生
$(window).on('popstate', function () {   //点击回退,就会触发这个操作
var hashLocation = location.hash;
var hashSplit = hashLocation.split("#!/");
var hashName = hashSplit[1];
if (hashName !== '') {
var hash = window.location.hash;
if (hash === '') {
window.location.reload();
}
}
});
window.history.pushState('forward', null, 'stc/customer/ahtmls/order/back_fullOrderCart.html');
}

function goHisCart(){
var his=$.getCookie('uHis');//主要为了给回退购物车历史做辅助
var hef=Request('hef');   //截取地址栏的参数
if(his||hef){
$('.asideItem li').each(function(inx,ele){
if($(ele).data('his')==his||$(ele).data('his')==hef) {
$(".asideItem li").removeClass('as-on');
$(ele).addClass("as-on").trigger('click');
}
});
}else{
return;
}
}


Ajax回退历史记录
8、
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: