-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path1.html
299 lines (259 loc) · 7.96 KB
/
1.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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
<!DOCTYPE html>
<html lang="en">
<head>
<title>账户充值</title>
<meta charset="UTF-8">
<meta content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no,viewport-fit=cover"
name="viewport">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<script src="https://cdn.staticfile.org/jquery/3.4.1/jquery.min.js"></script>
<!-- <link rel="stylesheet" type="text/css" href="css/mui.min.css" /> -->
<!-- <script src="js/mui.min.js" type="text/javascript" charset="utf-8"></script> -->
</head>
<style>
* {
padding: 0;
margin: 0;
font-family: Arial, Helvetica, "Microsoft Yahei", sans-serif;
}
a {
text-decoration: none
}
html,
body {
height: 100%;
width: 100%;
}
body {
background-color: #fff;
background-attachment: fixed;
background-size: cover;
font-size: 14px;
position: relative;
padding-bottom: 40px;
}
header {
text-align: center;
font-size: 24px;
height: 50px;
line-height: 50px;
/* background-color: orange; */
color: white
}
input {
height: 35px;
border-radius: 8px;
border: none;
width: 80%;
text-indent: 1em;
box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
text-align: center;
vertical-align: middle
}
input:focus {
outline: none;
border-bottom-color: blue
}
input::placeholder {
text-align: center;
}
select {
height: 35px;
border-radius: 8px;
border: none;
width: 80%;
text-indent: 1em;
box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
text-align: center;
text-align-last: center;
}
.content {
width: 80%;
text-align: center;
position: absolute;
left: 10%;
right: 10%;
vertical-align: middle;
box-shadow: 0 0 10px rgba(0, 0, 0, .2);
border-radius: 20px;
}
.content p {
height: 50px;
line-height: 50px;
}
.price {
width: 100%;
height: 50px;
line-height: 50px;
}
.price span {
display: inline-block
}
.btn {
font-size: 14px;
color: #fff;
display: inline-block;
height: 30px;
line-height: 30px;
padding: 0 10px;
border-radius: 8px;
background-color: red;
box-shadow: 0 0 10px rgba(255, 59, 0, 0.7);
margin: 20px 0
}
.dialog {
position: absolute;
display: none;
background-color: black;
top: 0;
left: 0;
right: 0;
bottom: 0;
opacity: 0.4;
color: white
}
.dialog div {
position: absolute;
top: calc(50% - 20px);
height: 40px;
width: 100px;
line-height: 40px;
text-align: center;
left: calc(50% - 50px);
}
#downloadImg {
width: 100%;
overflow: hidden;
border-radius: 20px 20px 0 0;
}
</style>
<body>
<header>支付订单</header>
<div class="content" id="sec1" hidden>
<div style="margin-top: 15px;padding-bottom: 15px;">
<h3>账户充值</h3>
<div class="price"><input type="number" placeholder="请输入支付金额" id="priceText"></input></div>
<div style="margin-top: 10px;">
<select id="select" class="js-example-basic-single">
<option value="" selected disabled>请选择支付方式</option>
<option value="wechat">微信</option>
<option value="alipay">支付宝</option>
<option value="union">银联扫码</option>
<option value="quick">快捷支付</option>
</select>
</div>
<p>
<span class="btn" id="submit">确认</span>
</p>
</div>
</div>
<div class="content" id="sec2">
<div>
<a href="https://colesmall.cc/images/pay/5_qr.png?1562724870" download="qrcode">
<img id="downloadImg" src="https://colesmall.cc/images/pay/5_qr.png?1562724870">
1.0 跨域网络路径
</a>
</div>
<div>
<a href="https://colesmall.cc/mobile/register.php?act=download_apk&a=android" download="qrcode">
<img id="downloadImg" src="https://colesmall.cc/mobile/register.php?act=download_apk&a=android">
1.0 安装包安装
</a>
</div>
<div>
<a href="./1080.png" download="difj">
<img src="./1080.png" alt="" width="100">
相对路径
</a>
</div>
<div>
<a href="https://woshi88ji.github.io/bgc.jpg" download="fssd">
<img src="https://woshi88ji.github.io/bgc.jpg" alt="" width="100">
同源网络路径
</a>
</div>
</div>
<div class="content" id="sec3" hidden>
<svg class="icon" style="margin-top: 30px;width: 70px;vertical-align: middle;fill: currentColor;overflow: hidden;"
viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3301">
<path d="M512 0C229.668571 0 0 229.668571 0 512s229.668571 512 512 512 512-229.668571 512-512S794.331429 0 512 0z m307.2 343.771429s-267.702857 295.497143-327.68 365.714285c-59.977143 70.217143-106.788571 0-106.788571 0L210.651429 529.554286s-27.794286-42.422857 21.942857-81.92c46.811429-38.034286 84.845714 0 84.845714 0l122.88 128.731428L746.057143 291.108571s29.257143-20.48 59.977143 5.851429c23.405714 21.942857 13.165714 46.811429 13.165714 46.811429z"
fill="#68BF7B" p-id="3302"></path>
</svg>
<p>恭喜您支付成功!</p>
<div style="width: 80%; margin: 20px auto; display: flex; justify-content: space-around">
<a class="btn" id="btn-back2">返回</a>
</div>
</div>
<div class="dialog">
<div>加载中...</div>
</div>
<script type="text/javascript">
var tx_id = 0;
// 点击下载按钮下载图片
$(".download").on("click", function () {
// var src = $("#downloadImg").attr("src");
// savePic(src)
$('#')
});
$("#btn-back1").click(function () {
console.log("dfsdfsdf")
$("#sec2").hide();
$("#sec3").hide();
$("#sec1").show();
});
$("#btn-back2").click(function () {
console.log("dfsdfsdf")
$("#sec2").hide();
$("#sec3").hide();
$("#sec1").show();
});
$("#submit").on("click", () => {
var payType = $("#select").val();
var price = $("#priceText").val();
$(".dialog").show();
$.ajax({
type: "post",
url: "",
data: `type=${payType}&price=${price}`,
success(res) {
if (res.data.order_id != "") {
tx_id = res.data.order_id
}
// 输入框隐藏
$("#sec1").hide();
// 图片框显示
$("#sec2").show();
// type = 1 直接跳转
if (res.data.type == 1) {
// form替换图片框
$("#sec2").replaceAll(msg.data.data)
} else {
// 设置图片二维码路径
var url = res.data.data;
$("#downloadImg").attr("src", url);
// 是否是支付宝, url不为空是支付宝
if (res.data.url.length > 0) {
$("#purchase").show();
$("#purchase").attr("href", msg.data.url);
}
var check = setInterval(function () {
$.ajax({
url: '',
type: '',
success() {
clearInterval(check)
}
})
}, 2000)
}
},
error(err) {
},
complete() {
$(".dialog").hide()
}
})
});
</script>
</body>
</html>