织梦模板文章微信分享朋友圈和好友带缩略图与简介

2026-06-12 0 6

特别提醒:此功能非办款插件需要手动修改代码,购买修改时请备份修改文件避免发生不必要的麻烦。

准备条件
微信服务号一个,并且已经通过了实名认证。
一个ICP备案的域名。
操作步骤
1、查看AppId,AppSecret以及绑定域名

2、文章内容页模板微信分享代码

<script src=”https://res.wx.qq.com/open/js/jweixin-1.4.0.js”></script>
<script type=”text/javascript”>
var url = encodeURIComponent(location.href.split(“#”)[0]);
$.ajax({
type: “get”,
url: “https://www.91084.com/wechat.php?link=” + url,
dataType: “json”,
contentType: “application/json; charset=utf-8”,
success: function(e) {
var d = e.appid,
i = e.timestamp,
t = e.noncestr,
n = e.signature;
wx.config({
debug: 0,
appId: d,
timestamp: i,
nonceStr: t,
signature: n,
jsApiList: [“onMenuShareTimeline”, “onMenuShareAppMessage”]
}),
wx.ready(function() {
wx.onMenuShareTimeline({
title: “{dede:field.title/}”,
desc: “{dede:field.description/}”,
link: “{dede:global.cfg_basehost/}{dede:field.id runphp=’yes’}$result=GetOneArchive(@me);@me=$result[‘arcurl’];{/dede:field.id}”,
imgUrl: “{dede:global.cfg_basehost/}{dede:field.litpic/}”
}),
wx.onMenuShareAppMessage({
title: “{dede:field.title/}”,
desc: “{dede:field.description/}”,
link: “{dede:global.cfg_basehost/}{dede:field.id runphp=’yes’}$result=GetOneArchive(@me);@me=$result[‘arcurl’];{/dede:field.id}”,
imgUrl: “{dede:global.cfg_basehost/}{dede:field.litpic/}”
})
})
}
});
</script>

网站不是https的要把它改成http
域名换成自己的域名
3、wechat.php文件下载,放在网站根目录,就可以分享了

文件下载地址:

评论解锁
当前隐藏内容需要评论才能查看
已有0人评论查看此内容
收藏 (0) 打赏

感谢您的支持,我会继续努力的!

打开微信/支付宝扫一扫,即可进行扫码打赏哦,分享从这里开始,精彩与您同在
点赞 (0)

版权声明:所有的源码、软件和资料,不得使用于非法商业用途,不得违反国家法律,一切关于该资源商业行为与本站无关。

免费cms模板 dedecms教程 织梦模板文章微信分享朋友圈和好友带缩略图与简介 https://www.mianfeicms.com/10540.html

相关文章

猜你喜欢
发表评论
暂无评论