order-detail.js
588 Bytes
/**
* 订单详情页
* @author: xuqi<qi.xu@yoho.cn>
* @date: 2015/11/16
*/
var $ = require('jquery'),
lazyLoad = require('yoho.lazyload'),
Hammer = require('yoho.hammer');
var orderId = $('#order-detail').data('id');
var delHammer;
lazyLoad();
//订单删除
delHammer = new Hammer(document.getElementsByClassName('btn-del')[0]);
delHammer.on('tap', function() {
if (confirm('确定删除订单吗?')) {
$.ajax({
type: 'GET',
url: '/home/delOrder',
data: {
id: orderId
}
});
}
});