- 小程序里如何手动文字换行(换行符是什么)
比如活动介绍,是一段文字。第二段需要另起一行,但是\n无效, 也无效,难道要用块级标签来实现吗
2017-09-28 - getUserInfo如果在onload之后返回的问题
[图片] 这里加入这个callback可以理解,但条件为什么要canIUse('button.open-type.getUserInfo')呢?app.js里的userInfo不是通过按钮获得的吧
2017-09-27 - 关于原始demo里index.js里的getUserInfo函数
[图片] 这个函数定义了但没有调用,是测试用的吗?e来自哪里?
2017-09-27 - app.json的window的backgroundColor设置无效
[图片] 是我写错了吗?
2017-09-25 - getShareInfo: fail 3200
想拿到群信息,按照文档的2种方法是调用getShareInfo,参数是shareTicket; 1: 从1044场景进入: 代码: [代码]onLaunch: [代码][代码]function[代码] [代码](e) {[代码][代码] [代码][代码]console.log([代码][代码]"================onLaunch================\n"[代码][代码],e)[代码][代码] [代码][代码]shareTicket = e.shareTicket;[代码][代码] [代码][代码]wx.getShareInfo({[代码][代码]"shareTicket"[代码][代码]: shareTicket,complete: [代码][代码]function[代码] [代码](res){[代码][代码] [代码][代码]console.log([代码][代码]"================getShareInfo complete================\n"[代码][代码],res) [代码]结果: [图片] 2: 点击分享后回调: 代码: [代码]onShareAppMessage: [代码][代码]function[代码] [代码]() {[代码][代码] [代码][代码]return[代码] [代码]{[代码] [代码] [代码][代码]title: [代码][代码]'分享!'[代码][代码],[代码][代码] [代码][代码]path: [代码][代码]'/pages/duel/duel?share_id='[代码] [代码]+ userId,[代码] [代码] [代码][代码]success: [代码][代码]function[代码] [代码](res) {[代码][代码] [代码][代码] [代码][代码]console.log([代码][代码]"================share success================\n"[代码] [代码], res) ; [代码][代码] [代码][代码]// wx.getShareInfo(); [代码][代码] [代码][代码]var[代码] [代码]shareTickets = res.shareTickets;[代码][代码] [代码][代码]wx.getShareInfo({[代码][代码] [代码][代码]shareTicket: shareTickets[0], [代码][代码] [代码][代码]complete: [代码][代码]function[代码] [代码](res) {[代码][代码] [代码][代码]console.log([代码][代码]"================getShareInfo callback================\n"[代码] [代码],res); [代码][代码] [代码][代码]}[代码][代码] [代码][代码]});[代码][代码] [代码][代码]},[代码][代码] [代码] [代码] [代码][代码]fail: [代码][代码]function[代码] [代码](res) {[代码][代码] [代码][代码]console.log([代码][代码]"share fail"[代码][代码])[代码][代码] [代码][代码]}[代码][代码] [代码][代码]}[代码]结果: [图片]
2017-06-06