homeerwema.html
1.79 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
{template 'headertoo'}
<link rel="stylesheet" type="text/css" href="{WWX_FXXT_ROOT}/style/new/foundation.css">
<link rel="stylesheet" type="text/css" href="{WWX_FXXT_ROOT}/style/new/common-v4.0.css">
<link href="{WWX_FXXT_ROOT}/recouse/css/bottom.css?x={WWX_FXXT_VERSION}" rel="stylesheet" type="text/css" />
<div class="qrcode" style="margin:10px 30px 0px 30px;">
<a class="qrcode-a" style="line-height:40px;margin:0px 0px 20px 0px;">长按链接或二维码复制转发</a>
<a>有时生成二维码较慢,请等待或刷新此页面</a>
<a id="shorturl" class="qrcode-a" style="background-color:#999999;line-height:normal;font-size:16px;margin:0px 0px 20px 0px;;height:auto;white-space:normal;word-break:break-all;text-align:center;">{$value}</a>
<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}" />
</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').html(data.short_url);
$('#qrsrc').attr('src', img_url + '&url=' + data.short_url);
return;
}
});
});
</script>
<div style="height:20px;"></div>
</body>
</html>