Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
纵之格
ShopXO
提交
523e53ff
ShopXO
项目概览
纵之格
/
ShopXO
通知
394
Star
16
Fork
11
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
ShopXO
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
523e53ff
编写于
4月 21, 2019
作者:
G
gongfuxiang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
share
上级
fc0e61ed
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
125 addition
and
55 deletion
+125
-55
application/plugins/view/petscms/pets/detail.html
application/plugins/view/petscms/pets/detail.html
+3
-4
application/plugins/view/share/index/content.html
application/plugins/view/share/index/content.html
+27
-24
application/plugins/view/share/index/share.html
application/plugins/view/share/index/share.html
+20
-0
public/static/common/js/common.js
public/static/common/js/common.js
+11
-0
public/static/plugins/css/petscms/pets.detail.css
public/static/plugins/css/petscms/pets.detail.css
+12
-4
public/static/plugins/css/share/style.css
public/static/plugins/css/share/style.css
+11
-10
public/static/plugins/images/share/share-layer.png
public/static/plugins/images/share/share-layer.png
+0
-0
public/static/plugins/js/share/style.js
public/static/plugins/js/share/style.js
+41
-13
未找到文件。
application/plugins/view/petscms/pets/detail.html
浏览文件 @
523e53ff
...
...
@@ -146,8 +146,7 @@
<!-- 分享 -->
<div
class=
"base-share {{if !isset($data['status']) or $data['status'] neq 1}}base-share-mobile{{/if}}"
>
<div
class=
"bdsharebuttonbox"
><a
href=
"#"
class=
"bds_more"
data-cmd=
"more"
></a><a
href=
"#"
class=
"bds_qzone"
data-cmd=
"qzone"
title=
"分享到QQ空间"
></a><a
href=
"#"
class=
"bds_tsina"
data-cmd=
"tsina"
title=
"分享到新浪微博"
></a><a
href=
"#"
class=
"bds_weixin"
data-cmd=
"weixin"
title=
"分享到微信"
></a><a
href=
"#"
class=
"bds_sqq"
data-cmd=
"sqq"
title=
"分享到QQ好友"
></a><a
href=
"#"
class=
"bds_renren"
data-cmd=
"renren"
title=
"分享到人人网"
></a><a
href=
"#"
class=
"bds_tieba"
data-cmd=
"tieba"
title=
"分享到百度贴吧"
></a><a
href=
"#"
class=
"bds_linkedin"
data-cmd=
"linkedin"
title=
"分享到linkedin"
></a></div>
<script>
window
.
_bd_share_config
=
{
"
common
"
:{
"
bdSnsKey
"
:{},
"
bdText
"
:
""
,
"
bdMini
"
:
"
2
"
,
"
bdMiniList
"
:
false
,
"
bdPic
"
:
""
,
"
bdStyle
"
:
"
0
"
,
"
bdSize
"
:
"
24
"
},
"
share
"
:{}};
with
(
document
)
0
[(
getElementsByTagName
(
'
head
'
)[
0
]
||
body
).
appendChild
(
createElement
(
'
script
'
)).
src
=
'
http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion=
'
+~
(
-
new
Date
()
/
36
e5
)];
</script>
<div
class=
"plugins-share-view"
></div>
</div>
</div>
</div>
...
...
@@ -254,7 +253,7 @@
{{include file="public/footer" /}}
{{if
isset($data['user_id']) and $data['user_id'] gt 0
}}
{{if
!empty($data['lose_lng']) and !empty($data['lose_lat']) and $data['lose_lng'] gt 0 and $data['lose_lat'] gt 0 and isset($data['status']) and $data['status'] eq 1
}}
<!-- map -->
<script
type=
"text/javascript"
src=
"{{$Think.__MY_HTTP__}}://api.map.baidu.com/api?v=2.0&ak={{:MyC('common_baidu_map_ak')}}"
></script>
...
...
@@ -262,7 +261,7 @@
$
(
function
()
{
// 丢失地址-地图展示
{{
if
!
empty
(
$data
[
'
lose_lng
'
])
and
!
empty
(
$data
[
'
lose_lat
'
])
}}
{{
if
$data
[
'
lose_lng
'
]
gt
0
and
$data
[
'
lose_lat
'
]
gt
0
}}
var
map
=
new
BMap
.
Map
(
"
map-view
"
,
{
enableMapClick
:
false
});
var
level
=
$
(
'
#map-view
'
).
data
(
'
level
'
)
||
16
;
var
point
=
new
BMap
.
Point
({{
$data
[
'
lose_lng
'
]}},{{
$data
[
'
lose_lat
'
]}});
...
...
application/plugins/view/share/index/content.html
浏览文件 @
523e53ff
<div
class=
"plugins-share"
>
<ul>
<li
class=
"share-qq"
data-type=
"qq"
>
<span
class=
"icon iconfont icon-qq"
></span>
</li>
<li
class=
"share-qq-space"
data-type=
"qq-space"
>
<span
class=
"icon iconfont icon-qq-space"
></span>
</li>
<li
class=
"share-weixin"
data-type=
"weixin"
>
<span
class=
"icon iconfont icon-weixin"
></span>
</li>
<li
class=
"share-sian"
data-type=
"sian"
>
<span
class=
"icon iconfont icon-sina"
></span>
</li>
<li
class=
"share-url"
data-type=
"url"
>
<span
class=
"icon iconfont icon-url"
></span>
</li>
</ul>
<!-- 分享组建 -->
<div
class=
"plugins-share-container"
>
<div
class=
"plugins-share"
>
<ul>
<li
class=
"share-qq"
data-type=
"qq"
>
<span
class=
"icon iconfont icon-qq"
></span>
</li>
<li
class=
"share-qq-space"
data-type=
"qq-space"
>
<span
class=
"icon iconfont icon-qq-space"
></span>
</li>
<li
class=
"share-weixin"
data-type=
"weixin"
>
<span
class=
"icon iconfont icon-weixin"
></span>
</li>
<li
class=
"share-sian"
data-type=
"sian"
>
<span
class=
"icon iconfont icon-sina"
></span>
</li>
<li
class=
"share-url"
data-type=
"url"
>
<span
class=
"icon iconfont icon-url"
></span>
</li>
</ul>
</div>
</div>
<!-- 微信弹出框 -->
<!-- 微信
二维码
弹出框 -->
<div
class=
"am-modal am-modal-no-btn"
tabindex=
"-1"
id=
"plugins-share-weixin-modal"
>
<div
class=
"am-modal-dialog"
>
<div
class=
"am-modal-hd"
>
...
...
@@ -32,13 +35,13 @@
</div>
</div>
<!--
微信环境中
提示分享 -->
<div
id=
"plugins-share-
weixin-
layer"
>
<img
src=
"{{$attachment_host}}/static/plugins/images/share/
weixin
-layer.png"
/>
<!--
弹层
提示分享 -->
<div
id=
"plugins-share-layer"
>
<img
src=
"{{$attachment_host}}/static/plugins/images/share/
share
-layer.png"
/>
</div>
<!--
url
复制 -->
<div
class=
"am-modal am-modal-no-btn"
tabindex=
"-1"
id=
"plugins-share-
url
-modal"
>
<!-- 复制 -->
<div
class=
"am-modal am-modal-no-btn"
tabindex=
"-1"
id=
"plugins-share-
copy
-modal"
>
<div
class=
"am-modal-dialog"
>
<div
class=
"am-modal-hd"
>
<a
href=
"javascript: void(0)"
class=
"am-close am-close-spin"
data-am-modal-close
>
×
</a>
...
...
application/plugins/view/share/index/share.html
0 → 100644
浏览文件 @
523e53ff
<!-- 分享组建 -->
<div
class=
"plugins-share"
>
<ul>
<li
class=
"share-qq"
data-type=
"qq"
>
<span
class=
"icon iconfont icon-qq"
></span>
</li>
<li
class=
"share-qq-space"
data-type=
"qq-space"
>
<span
class=
"icon iconfont icon-qq-space"
></span>
</li>
<li
class=
"share-weixin"
data-type=
"weixin"
>
<span
class=
"icon iconfont icon-weixin"
></span>
</li>
<li
class=
"share-sian"
data-type=
"sian"
>
<span
class=
"icon iconfont icon-sina"
></span>
</li>
<li
class=
"share-url"
data-type=
"url"
>
<span
class=
"icon iconfont icon-url"
></span>
</li>
</ul>
</div>
\ No newline at end of file
public/static/common/js/common.js
浏览文件 @
523e53ff
...
...
@@ -1150,17 +1150,28 @@ function UrlFieldReplace(field, value, url)
*/
function
MobileBrowserEnvironment
()
{
// 浏览器标识
var
ua
=
navigator
.
userAgent
.
toLowerCase
();
// 微信
if
(
ua
.
match
(
/MicroMessenger/i
)
==
'
micromessenger
'
)
{
return
'
weixin
'
;
}
// 新浪微博
if
(
ua
.
match
(
/WeiBo/i
)
==
'
weibo
'
)
{
return
'
weibo
'
;
}
// QQ空间
if
(
ua
.
match
(
/qzone/i
)
==
'
qzone
'
)
{
return
'
qzone
'
;
}
// QQ
if
(
ua
.
match
(
/QQ/i
)
==
'
qq
'
)
{
return
'
qq
'
;
...
...
public/static/plugins/css/petscms/pets.detail.css
浏览文件 @
523e53ff
...
...
@@ -270,10 +270,18 @@ form.form-validation #map {
.base-share-mobile
{
background
:
#9bddff
;
}
.base-share-mobile
a
{
padding-left
:
0
!important
;
width
:
24px
!important
;
margin
:
6px
calc
(
12.5%
-
32px
)
!important
;
.base-share-mobile
.plugins-share
ul
{
padding
:
5px
;
}
.base-share-mobile
.plugins-share
ul
li
{
width
:
25px
;
height
:
25px
;
line-height
:
25px
;
margin-right
:
calc
(
10%
-
12.5px
);
margin-left
:
calc
(
10%
-
12.5px
);
}
.base-share-mobile
.plugins-share
ul
li
.iconfont
{
font-size
:
16px
;
}
.am-footer
{
padding-bottom
:
35px
;
...
...
public/static/plugins/css/share/style.css
浏览文件 @
523e53ff
/**
* 分享
*/
.plugins-share
{
.plugins-share
-container
,
#plugins-share-layer
{
display
:
none
;
}
.plugins-share
ul
{
padding
:
10px
;
background
:
#333
;
overflow
:
hidden
;
}
.plugins-share
ul
li
{
...
...
@@ -44,12 +42,16 @@
/**
* 微信
* 微信
二维码
*/
#plugins-share-weixin-modal
.weixin-qrcode
{
margin-top
:
10px
;
}
#plugins-share-weixin-layer
{
/**
* 弹层
*/
#plugins-share-layer
{
position
:
fixed
;
top
:
0
;
left
:
0
;
...
...
@@ -58,15 +60,14 @@
background
:
rgba
(
0
,
0
,
0
,
0.6
);
z-index
:
10000
;
text-align
:
center
;
display
:
none
;
}
#plugins-share-
weixin-
layer
img
{
#plugins-share-layer
img
{
max-width
:
90%
;
}
/**
*
url
*
复制
*/
#plugins-share-
url
-modal
.am-input-group
{
#plugins-share-
copy
-modal
.am-input-group
{
margin-top
:
10px
;
}
\ No newline at end of file
public/static/plugins/images/share/
weixin
-layer.png
→
public/static/plugins/images/share/
share
-layer.png
浏览文件 @
523e53ff
文件已移动
public/static/plugins/js/share/style.js
浏览文件 @
523e53ff
...
...
@@ -27,31 +27,47 @@ $(function()
// 平台地址
var
platform_url
=
null
;
// 当前环境
var
env
=
MobileBrowserEnvironment
();
// 关闭弹层
$
(
'
#plugins-share-layer
'
).
hide
();
// 根据分享类型处理
switch
(
type
)
{
// QQ
case
'
qq
'
:
platform_url
=
'
https://connect.qq.com/widget/shareqq/index.html?url=
'
+
url
+
'
&utm_medium=qqim&title=
'
+
title
+
'
&desc=
'
+
desc
+
'
&pics=
'
+
pic
+
'
&site=
'
+
site
if
(
env
==
'
qq
'
||
env
==
'
weixin
'
||
env
==
'
qzone
'
||
env
==
'
weibo
'
)
{
$
(
'
#plugins-share-layer
'
).
show
();
}
else
{
platform_url
=
'
https://connect.qq.com/widget/shareqq/index.html?url=
'
+
url
+
'
&utm_medium=qqim&title=
'
+
title
+
'
&desc=
'
+
desc
+
'
&pics=
'
+
pic
+
'
&site=
'
+
site
}
break
;
// QQ空间
case
'
qq-space
'
:
platform_url
=
'
http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url=
'
+
url
+
'
&utm_medium=qzone&title=
'
+
title
+
'
&desc=
'
+
desc
+
'
&pics=
'
+
pic
+
'
&summary=
'
+
desc
+
'
&site=
'
+
site
;
if
(
env
==
'
qq
'
||
env
==
'
weibo
'
)
{
$
(
'
#plugins-share-layer
'
).
show
();
}
else
{
platform_url
=
'
http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url=
'
+
url
+
'
&utm_medium=qzone&title=
'
+
title
+
'
&desc=
'
+
desc
+
'
&pics=
'
+
pic
+
'
&summary=
'
+
desc
+
'
&site=
'
+
site
;
}
break
;
// 新浪
// 新浪
微博
case
'
sian
'
:
platform_url
=
'
http://service.weibo.com/share/share.php?url=
'
+
url
+
'
&utm_medium=sian&title=
'
+
title
+
'
&desc=
'
+
desc
+
'
&pics=
'
+
pic
+
'
&site=
'
+
site
;
break
;
// 微信
case
'
weixin
'
:
// 是否微信环境中
if
(
MobileBrowserEnvironment
()
==
'
weixin
'
)
if
(
env
==
'
qq
'
||
env
==
'
weixin
'
||
env
==
'
qzone
'
||
env
==
'
weibo
'
)
{
$
(
'
#plugins-share-
weixin-
layer
'
).
show
();
$
(
'
#plugins-share-layer
'
).
show
();
}
else
{
$
(
'
#plugins-share-weixin-layer
'
).
hide
();
var
$modal
=
$
(
'
#plugins-share-weixin-modal
'
);
$modal
.
find
(
'
.weixin-qrcode
'
).
empty
().
qrcode
({
text
:
decodeURIComponent
(
url
),
...
...
@@ -65,7 +81,7 @@ $(function()
// url
case
'
url
'
:
var
$modal
=
$
(
'
#plugins-share-
url
-modal
'
);
var
$modal
=
$
(
'
#plugins-share-
copy
-modal
'
);
$modal
.
find
(
'
.am-input-group input
'
).
val
(
decodeURIComponent
(
url
));
$modal
.
modal
({
width
:
300
});
$modal
.
modal
(
'
open
'
);
...
...
@@ -80,11 +96,11 @@ $(function()
});
// url复制
var
clipboard
=
new
ClipboardJS
(
'
#plugins-share-
url
-modal .am-input-group button.am-btn
'
,
var
clipboard
=
new
ClipboardJS
(
'
#plugins-share-
copy
-modal .am-input-group button.am-btn
'
,
{
text
:
function
()
{
return
$
(
'
#plugins-share-
url
-modal .am-input-group input
'
).
val
();
return
$
(
'
#plugins-share-
copy
-modal .am-input-group input
'
).
val
();
}
});
clipboard
.
on
(
'
success
'
,
function
(
e
)
...
...
@@ -96,9 +112,21 @@ $(function()
Prompt
(
'
复制失败,请手动复制!
'
);
});
//
微信
分享提示弹层关闭
$
(
'
#plugins-share-
weixin-
layer
'
).
on
(
'
click
'
,
function
()
// 分享提示弹层关闭
$
(
'
#plugins-share-layer
'
).
on
(
'
click
'
,
function
()
{
$
(
'
#plugins-share-
weixin-
layer
'
).
hide
();
$
(
'
#plugins-share-layer
'
).
hide
();
});
// 初始化
if
(
$
(
'
.plugins-share-container
'
).
length
>
0
)
{
// 标签初始化
if
(
$
(
'
.plugins-share-view
'
).
length
>
0
)
{
$
(
'
.plugins-share-view
'
).
html
(
$
(
'
.plugins-share-container
'
).
html
());
}
}
});
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录