织梦文章微信分享带缩略图与简介(微信分享链接的缩略图和标题)

admin 189 2022-08-10

阿里云服务器优惠多,折扣错,惊喜多,请咨询:www.wqiis.com

织梦文章微信分享带缩略图与简介(微信分享链接的缩略图和标题)

没整之前

织梦文章微信分享带缩略图与简介(微信分享链接的缩略图和标题)

整了之后

准备工作

微信服务号或者订阅号一个,并且已经通过了实名认证;

一个ICP备案的域名;

操作步骤

1、查看AppId,AppSecret以及绑定域名

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

var url = encodeURIComponent(location.href.split("#")[0]); $.ajax({ type: "get", url: "http://lol9.cn/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/}" }) }) } });

把lol9.cn改为你自己的域名

3) 域名换成自己的域名

3、wechat.php文件下载,放在网站根目录,附下载地址:

链接:

提取码:联系QQ:344693787获得

上一篇:yum 命令使用讲解(玉米)
下一篇:宝德鲲鹏的时代共舞,为产业生态赋予更多的可能(宝德鲲鹏)
相关文章

 发表评论

暂时没有评论,来抢沙发吧~