切换导航条
此项目
正在载入...
登录
景龙
/
xingqiu
·
提交
转到一个项目
GitLab
转到仪表盘
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
邮件补丁
差异文件
浏览文件
作者
jinglong
6 years ago
提交
8206748845a85df6271cfeafc701792d75f8cce3
1 个父辈
4aa5530a
master
1 个管道 的构建
通过
耗费 0 秒
调试微信分享
变更
1
构建
1
隐藏空白字符变更
内嵌
并排对比
正在显示
1 个修改的文件
包含
47 行增加
和
45 行删除
public/themes/simpleboot3_mobile/public/slide.html
public/themes/simpleboot3_mobile/public/slide.html
查看文件 @
8206748
<div
class=
"share"
>
<ul>
<li
class=
"share1"
>
<div
class=
"share1_Img weixin"
>
<div
class=
"share1_Img weixin"
onclick=
"wx_share()"
>
<img
src=
"__TMPL__/public/assets/images/bicon_04.png"
alt=
""
/>
</div>
<p
class=
"share1_Txt"
>
{$share.post_share_wx}
</p>
...
...
@@ -38,52 +38,54 @@
<script
src=
"http://res2.wx.qq.com/open/js/jweixin-1.4.0.js"
></script>
<script>
$
(
function
()
{
var
appid
=
''
;
var
timestamp
=
''
;
var
nonceStr
=
''
;
var
signature
=
''
;
$
.
ajax
({
type
:
'POST'
,
url
:
'/portal/login/configShareWx'
,
data
:
{
},
dataType
:
'json'
,
async
:
false
,
success
:
function
(
data
)
{
console
.
log
(
data
);
if
(
data
.
code
==
1
)
{
appid
=
data
.
appid
;
timestamp
=
data
.
timestamp
;
nonceStr
=
data
.
nonceStr
;
signature
=
data
.
signature
;
}
else
{
function
wx_share
(){
var
appid
=
''
;
var
timestamp
=
''
;
var
nonceStr
=
''
;
var
signature
=
''
;
$
.
ajax
({
type
:
'POST'
,
url
:
'/portal/login/configShareWx'
,
data
:
{
},
dataType
:
'json'
,
async
:
false
,
success
:
function
(
data
)
{
console
.
log
(
data
);
if
(
data
.
code
==
1
)
{
appid
=
data
.
appid
;
timestamp
=
data
.
timestamp
;
nonceStr
=
data
.
nonceStr
;
signature
=
data
.
signature
;
}
else
{
console
.
log
(
data
);
}
}
}
});
wx
.
config
({
debug
:
false
,
appId
:
appid
,
timestamp
:
timestamp
,
nonceStr
:
nonceStr
,
signature
:
signature
,
jsApiList
:
[
'checkJsApi'
,
'onMenuShareTimeline'
,
'onMenuShareAppMessage'
]
});
wx
.
ready
(
function
()
{
//需在用户可能点击分享按钮前就先调用
wx
.
updateAppMessageShareData
({
title
:
'分享标题'
,
// 分享标题
desc
:
'分享描述'
,
// 分享描述
link
:
'http://www.starplanet.cn/portal/enjoy/getEnjoyDetail?id=81'
,
// 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
imgUrl
:
''
,
// 分享图标
success
:
function
()
{
// 设置成功
}
})
});
});
wx
.
config
({
debug
:
false
,
appId
:
appid
,
timestamp
:
timestamp
,
nonceStr
:
nonceStr
,
signature
:
signature
,
jsApiList
:
[
'checkJsApi'
,
'updateAppMessageShareData'
,
]
});
wx
.
ready
(
function
()
{
//需在用户可能点击分享按钮前就先调用
wx
.
updateAppMessageShareData
({
title
:
'分享标题'
,
// 分享标题
desc
:
'分享描述'
,
// 分享描述
link
:
'http://www.starplanet.cn/portal/enjoy/getEnjoyDetail?id=81'
,
// 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
imgUrl
:
''
,
// 分享图标
success
:
function
()
{
// 设置成功
}
})
});
}
});
</script>
...
...
请
注册
或
登录
后发表评论