-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpay.html
82 lines (76 loc) · 1.88 KB
/
pay.html
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<!DOCTYPE html>
<html>
<head>
<title>pay</title>
<meta charset="UTF-8">
</head>
<body>
<script>
var r = {
"ret": 1,
"msg": "操作成功",
"content": {
"open": 1,
"thirdLibs": [],
"info": [{
"id": 43,
"pay_name": "支付宝官方v2",
"status": "0",
"pay_type": "57",
"pay_en": "AliPayV2",
"unite_name": "支付宝(海外可用)",
"img_class_name": "alipay",
"config": ""
}, {
"id": 12,
"pay_name": "微信官方支付",
"status": "0",
"pay_type": "26",
"pay_en": "WechatPay",
"unite_name": "微信",
"img_class_name": "wechat",
"config": ""
}, {
"id": 4,
"pay_name": "连连网银支付",
"status": "0",
"pay_type": "21",
"pay_en": "Llpay",
"unite_name": "网银",
"img_class_name": "e_pay",
"config": ""
}]
}
}
let listCharge = [];
let thirdLibs = JSON.stringify(r.content.thirdLibs);
let data = r.content.info;
for (let i of data) {
var checkedImg = _this.imgChecked[0];
if (i == data[0]) {
checkedImg = _this.imgChecked[1];
_this.pay_type = i.pay_type;
localStorage.pay_types = i.pay_type
}
var imgUrl = "";
if (i.pay_type == 10) {
imgUrl = _this.typeImg[0];
} else if (i.pay_type == 6 || i.pay_type == 11) {
imgUrl = _this.typeImg[1];
} else if (i.pay_type == 21) {
imgUrl = _this.typeImg[2];
} else {
imgUrl = _this.typeImg[2];
}
var lists = {
imgUrl: imgUrl,
textcon: i.unite_name,
pay_type: i.pay_type,
falg: false,
checked: checkedImg
}
_this.listCharge.push(lists)
}
</script>
</body>
</html>