payweixin.html 2.13 KB
{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>