addressesList.js
1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
define(function(require, exports, module) {
require('fancybox');
require('region');
var Alert = require('alert');
$(function() {
$(".btn-add,.btn-alter").fancybox({
width: 684,
padding: 0,
});
$(".cancel").live("click", function() {
$.fancybox.close();
});
//地址选择
region.start();
$(".btn-del").live("click", function() {
console.log($(this).attr("default"));
if ($(this).attr("default") !== undefined) {
Alert({
"tipText": "默认发货地址不能删除,请修改默认发货地址后再删除!",
title:"提示",
"type": "warning",
width:443
});
} else {
Alert({
"tipText": "你确定要删除发货地址吗?",
title:"提示",
"type" : "warning",
"btnsType" : 1,
"btns":["确定删除","取消"],
succeedFun:function(){
// 成功回调
},
cancelFun:function(){
// 取消回调
}
});
}
});
});
});