payweixin.html
2.13 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
{template 'headertoo'}
<link href="{WWX_FXXT_ROOT}/recouse/css/bottom.css?x={WWX_FXXT_VERSION}" rel="stylesheet" type="text/css" />
<style>
img{max-width:300px!important;}
.content-black{width:100%;height:100%;position:fixed;z-index:5;background:rgba(0,0,0,0.8);}
.content-black p{ color:#fff1cb; line-height:35px;}
.btns{width:300px; height:40px; line-height:40px;background:#FFF; color:#000; border:0; border-radius:5px;MARGIN-RIGHT: auto;MARGIN-LEFT: auto;}
</style>
<div class="bg-content" id="shareBox" style="background:rgba(0,0,0,0.8);height:100%">
<div class="content-black word-4" style="padding-top:40px;">
<div style="text-align:center; font-size:16px; color:#fff;">
<img src="" id="qrsrc" style="border:2px solid #CCC;padding:0px;border-radius:4px;">
<input type="hidden" name="longurl" class="form-control" id="longurl" value="{$value}" />
<input type="hidden" name="shorturl" id="shorturl" value="" class="form-control" readonly>
<p>
用手机微信扫描支付二维码支付款项
</p>
<p>
发送此图片即可找人代付
</p>
<p>
或返回选择其他支付方式
</p>
<p>
<div class="btns"><a href="javascript:history.back();">返回订单页面</a></div>
</p>
</div>
</div>
</div>
{template 'wx_nav'}
<script>
require(['util'], function(util){
var longurl = $('#longurl').val().trim();
if (longurl.indexOf("http://") == -1 && longurl.indexOf("https://") == -1 && longurl.indexOf("weixin://") == -1) {
util.message('订单地址错误,请联系管理员!');
return;
}
var change = $(this);
var img_url = "{php echo $this->createMobileUrl('payweixin',array('op'=>'qr'))}";
$.post("{php echo url('entry', array('m' => 'wwx_fxxt', 'do' => 'payweixin', 'op' => 'change'));}", {'longurl' : longurl}, function(data){
if(data != 'err') {
data = $.parseJSON(data);
}
if(data.errcode == '-1') {
util.message(data.errmsg);
return;
} else {
$('#shorturl').val(data.short_url);
$('#qrsrc').attr('src', img_url + '&url=' + data.short_url);
return;
}
});
});
</script>
</body>
</html>