share
parent
195965a7dc
commit
dbb04ab288
|
|
@ -32,6 +32,11 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 微信环境中提示分享 -->
|
||||
<div id="plugins-share-weixin-layer">
|
||||
<img src="{{$attachment_host}}/static/plugins/images/share/weixin-layer.png" />
|
||||
</div>
|
||||
|
||||
<!-- url复制 -->
|
||||
<div class="am-modal am-modal-no-btn" tabindex="-1" id="plugins-share-url-modal">
|
||||
<div class="am-modal-dialog">
|
||||
|
|
|
|||
|
|
@ -1141,14 +1141,14 @@ function UrlFieldReplace(field, value, url)
|
|||
}
|
||||
|
||||
/**
|
||||
* 当前环境
|
||||
* 当前手机浏览器环境
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @datetime 2019-04-20T19:48:59+0800
|
||||
* @return {string} [weixin,weibo,qq]
|
||||
*/
|
||||
function IsEnvironment()
|
||||
function MobileBrowserEnvironment()
|
||||
{
|
||||
var ua = navigator.userAgent.toLowerCase();
|
||||
if(ua.match(/MicroMessenger/i) == 'micromessenger')
|
||||
|
|
@ -1168,13 +1168,6 @@ function IsEnvironment()
|
|||
return null;
|
||||
}
|
||||
|
||||
function IsWeixinss()
|
||||
{
|
||||
var ua = navigator.userAgent.toLowerCase();
|
||||
return (ua.match(/MicroMessenger/i) == "micromessenger");
|
||||
}
|
||||
|
||||
|
||||
// 公共数据操作
|
||||
$(function()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -49,6 +49,20 @@
|
|||
#plugins-share-weixin-modal .weixin-qrcode {
|
||||
margin-top: 10px;
|
||||
}
|
||||
#plugins-share-weixin-layer {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: rgba(0, 0, 0, 0.6);
|
||||
z-index: 10000;
|
||||
text-align: center;
|
||||
display: none;
|
||||
}
|
||||
#plugins-share-weixin-layer img {
|
||||
max-width: 90%;
|
||||
}
|
||||
|
||||
/**
|
||||
* url
|
||||
|
|
|
|||
Binary file not shown.
|
After Width: | Height: | Size: 24 KiB |
|
|
@ -47,11 +47,11 @@ $(function()
|
|||
// 微信
|
||||
case 'weixin' :
|
||||
// 是否微信环境中
|
||||
alert(IsEnvironment())
|
||||
if(IsEnvironment() == 'weixin')
|
||||
if(MobileBrowserEnvironment() == 'weixin')
|
||||
{
|
||||
|
||||
$('#plugins-share-weixin-layer').show();
|
||||
} else {
|
||||
$('#plugins-share-weixin-layer').hide();
|
||||
var $modal = $('#plugins-share-weixin-modal');
|
||||
$modal.find('.weixin-qrcode').empty().qrcode({
|
||||
text: decodeURIComponent(url),
|
||||
|
|
|
|||
Loading…
Reference in New Issue