homeerwema.html 1.79 KB
{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>