easypay.js
967 Bytes
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
/**
* 简易结算页特殊数据
* @author: yyq<yanqing.yang@yoho.cn>
* @date: 2017/3/2
*/
var $ = require('yoho-jquery');
var queryInfo = {},
qs;
require('../../common');
if ($('.order-easypay-page').length) {
qs = window.queryString();
if (qs.sku && qs.skn && qs.limitcode) { // sku,skn,limitcode 同时存在时为限定商品
queryInfo = {
sku: qs.sku,
skn: qs.skn,
limitcode: qs.limitcode
};
} else if (qs.sku && qs.bundle) { // sku,bundle 同时存在时为套餐商品
queryInfo = {
sku: qs.sku,
bundle: qs.bundle
};
}
// 移除返回购物车
$('#go-cart-btn').click(function(e) {
// 阻止事件冒泡
if (e && e.stopPropagation) {
e.stopPropagation();
} else {
window.event.cancelBubble = true;
}
window.history.go(-1);
});
}
module.exports = queryInfo;