mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-06 03:58:04 +08:00
[更新]修改微信手机预览
This commit is contained in:
parent
d764b093dd
commit
1d9e91067a
@ -140,13 +140,11 @@ define(['jquery', 'admin.plugs'], function () {
|
|||||||
|
|
||||||
/*! 注册 data-phone-view 事件行为 */
|
/*! 注册 data-phone-view 事件行为 */
|
||||||
this.$body.on('click', '[data-phone-view]', function () {
|
this.$body.on('click', '[data-phone-view]', function () {
|
||||||
var src = this.getAttribute('data-phone-view') || this.href;
|
|
||||||
var $container = $('<div class="mobile-preview pull-left"><div class="mobile-header">公众号</div><div class="mobile-body"><iframe id="phone-preview" frameborder="0" scrolling="no" marginheight="0" marginwidth="0"></iframe></div></div>').appendTo('body');
|
var $container = $('<div class="mobile-preview pull-left"><div class="mobile-header">公众号</div><div class="mobile-body"><iframe id="phone-preview" frameborder="0" scrolling="no" marginheight="0" marginwidth="0"></iframe></div></div>').appendTo('body');
|
||||||
var $iframe = $container.find('iframe').attr('src', src);
|
$container.find('iframe').attr('src', this.getAttribute('data-phone-view') || this.href);
|
||||||
$container.find('.mobile-header').on('click', function () {
|
layer.style(layer.open({type: 1, scrollbar: !1, area: ['330px', '600px'], title: !1, closeBtn: 1, skin: 'layui-layer-nobg', shadeClose: !!1,
|
||||||
$iframe.attr('src', src);
|
content: $container,
|
||||||
});
|
end: function () {
|
||||||
layer.style(layer.open({type: 1, scrollbar: !1, area: ['330px', '600px'], title: !1, closeBtn: 1, skin: 'layui-layer-nobg', shadeClose: !!1, content: $container, end: function () {
|
|
||||||
$container.remove();
|
$container.remove();
|
||||||
}
|
}
|
||||||
}), {boxShadow: 'none'});
|
}), {boxShadow: 'none'});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user