test
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

112 lines
2.9 KiB

<div class="modal-dialog">
<style>
#previewContent{
background: #FFF;
margin: 0 auto;
}
#previewContent .title h4 {
color: #595961;
font-size: 16px;
text-align: center;
font-weight: 600;
}
#previewContent .qrcode{
width: 100%;
height: 180px;
text-align: center;
}
#previewContent .link {
position: relative;
text-align: center;
padding: 15px;
}
#previewContent img{
width: 180px;
height: 180px;
}
#previewContent .del_modal{
width: 25px;
height: 25px;
cursor: pointer;
float: right;
text-align: center;
line-height: 25px;
background: #f27272;
font-size: 18px;
}
.we7-modal-dialog, .modal-dialog {
min-width: 340px!important;
}
#preview .modal-dialog, #ajaxModal .modal-dialog {
width: 340px;
overflow: hidden;
}
#preview .modal-header, #ajaxModal .modal-header {
background-color: #fff;
border-bottom: 0.5px solid #e5e5e5;
}
#preview .modal-title, #ajaxModal .modal-title {
color: #595961;
font-weight: 600;
}
#preview .modal-body, #ajaxModal .modal-body {
overflow-y: hidden;
}
#preview .modal-footer, #ajaxModal .modal-footer {
text-align: right;
background-color: #fff;
border-top: 0.5px solid #e5e5e5;
}
#preview .modal-footer .btn, #ajaxModal .modal-footer .btn {
min-width: auto;
}
</style>
<div class="modal-content">
<div class="modal-header">
<button data-dismiss="modal" class="close" type="button">×</button>
<h4 class="modal-title">预览页面</h4>
</div>
<div class="modal-body">
{if p('wxplatform')}
<div id="previewContent">
<div class="title"><h4>扫描二维码预览页面</h4></div>
<div class="qrcode">
<img src="{php echo web_url('utility/qrcode/getQrCode',array('url' => urlencode($url)))}"/>
</div>
{if empty($_GPC['type'])}
<div class="link"><button data-url="{$url}" class="btn btn-primary js-clip">复制链接</button></div>
{/if}
</div>
{else}
<div id="previewContent">
<div class="title"><h4>扫描二维码预览页面</h4></div>
<div class="qrcode">
<img src="{$imageUrl}"/>
</div>
</div>
{/if}
</div>
<div class="modal-footer">
<button data-dismiss="modal" class="btn btn-default" type="button">关闭</button>
</div>
</div>
</div>
<script>
myrequire(['clipboard'], function (Clipboard) {
$('.js-clip').each(function () {
var text = $(this).data('text') || $(this).data('href') || $(this).data('url');
const cb = new Clipboard(this, {
text: () => text
})
cb.on('success', (e) => {
console.log(e)
tip.msgbox.suc('复制成功')
e.clearSelection();
})
cb.on('error', (e) => {
console.log(e)
tip.msgbox.err('复制失败')
})
})
})
</script>