当前位置:网站首页>Onmenusharetimeline custom shared content is invalid, and the title and icon are not displayed
Onmenusharetimeline custom shared content is invalid, and the title and icon are not displayed
2022-07-03 14:07:00 【Cupid510】
matters needing attention :
1、 The image size should be larger than 300 To display ;
2、 This method must first config success , And then again wx.ready In order to call .
3、 Scan the code to enter , spot URL The link will only be displayed in the sharing place url, Don't show icons 、 title
wx.config({
debug: true, // Turn on debugging mode , Call all api The return value of will be on the client side alert come out , To see the parameters passed in , Can be in pc End open , The parameter information will go through log play , Only in pc Only when the end is printed .
appId: '{$appid}', // Required , The only sign of official account number
timestamp: "{$signPackage.timestamp}", // Required , Generate signature timestamp
nonceStr: '{$signPackage.nonceStr}', // Required , Generate a random string of signatures
signature: '{$signPackage.signature}',// Required , Signature , See appendix 1
jsApiList: [
'checkJsApi',
'onMenuShareTimeline',
'onMenuShareAppMessage',
'onMenuShareQQ',
'onMenuShareWeibo',
'chooseWXPay'
] // Required , Required JS Interface list , all JS See Appendix... For the list of interfaces 2
});
wx.ready(function () {
wx.onMenuShareTimeline({
title: option.title, // Share the title
desc: option.desc, // Share description
link: option.link, // Share links
imgUrl: option.imgUrl, // Share icon
success: function () {
// Callback function executed after user confirms sharing
alert(' Share success ');
},
cancel: function () {
// Callback function executed after user cancels sharing
}
});
wx.error(function(res){
// config Information validation failure will be executed error function , If the signature expires and the verification fails , Specific error messages can be opened config Of debug Mode view , You can also go back to res View in parameters , about SPA You can update your signature here .
alert("errorMSG:"+res);
});
});
边栏推荐
- Qt学习20 Qt 中的标准对话框(中)
- How to promote the progress of project collaboration | community essay solicitation
- [combinatorics] permutation and combination (two counting principles, examples of set permutation | examples of set permutation and circle permutation)
- Redis:字符串類型數據的操作命令
- Go language web development series 29: Gin framework uses gin contrib / sessions library to manage sessions (based on cookies)
- 金属有机骨架MOFs装载非甾体类抗炎药物|ZIF-8包裹普鲁士蓝负载槲皮素(制备方法)
- PhpMyAdmin stage file contains analysis traceability
- Invalid Z-index problem
- Go language unit test 3: go language uses gocovey library to do unit test
- GoLand 2021.1.1: configure the multi line display of the tab of the open file
猜你喜欢

Golang - command line tool Cobra

3D视觉——2.人体姿态估计(Pose Estimation)入门——OpenPose含安装、编译、使用(单帧、实时视频)
[email"/>Folic acid modified metal organic framework (zif-8) baicalin loaded metal organic framework composite magnetic material (AU- [email

Go language unit test 5: go language uses go sqlmock and Gorm to do database query mock

QT learning 24 layout manager (III)

Go: send the get request and parse the return JSON (go1.16.4)

Redis:字符串類型數據的操作命令

Go language web development series 30: gin: grouping by version for routing

28:第三章:开发通行证服务:11:在配置文件中定义属性,然后在代码中去获取;

UiO-66-COOH装载苯达莫司汀|羟基磷灰石( HA) 包裹MIL-53(Fe)纳米粒子|装载黄芩苷锰基金属有机骨架材料
随机推荐
Go language web development series 30: gin: grouping by version for routing
SQL Injection (AJAX/JSON/jQuery)
Uniapp skills - dom display and hiding
Go 1.16.4: purpose of go mod tidy
Use and design of Muduo buffer class
UiO-66-COOH装载苯达莫司汀|羟基磷灰石( HA) 包裹MIL-53(Fe)纳米粒子|装载黄芩苷锰基金属有机骨架材料
全局事件总线
“又土又穷”的草根高校,凭什么被称为“东北小清华”?
Qt学习21 Qt 中的标准对话框(下)
金属有机骨架MIL-88负载阿霉素DOX|叶酸修饰UiO-66-NH2负载阿霉素[email protected]纳米粒子
Rasp implementation of PHP
Comprehensively develop the main channel of digital economy and digital group, and actively promote the utonmos digital Tibet market
Summary of common error reporting problems and positioning methods of thrift
28:第三章:开发通行证服务:11:在配置文件中定义属性,然后在代码中去获取;
Field problems in MySQL
怎样删除对象的某个属性或⽅法
Solve MySQL 1045 access denied for user 'root' @ 'localhost' (using password: yes)
JS new challenges
Go 1.16.4: manage third-party libraries with Mod
JVM object lifecycle