- 仅支持打开该小程序挂链的公众号的图文消息?
[图片] 小程序ID: wx21d6c93855bae518 公众号与小程序的关联关系已经小程序与公众号的关联关系都已经建立。
2021-01-08 - encryptedData中无unionID?
[代码]{[代码][代码] [代码][代码]"openId"[代码][代码]: [代码][代码]"OPENID"[代码][代码],[代码][代码] [代码][代码]"nickName"[代码][代码]: [代码][代码]"NICKNAME"[代码][代码],[代码][代码] [代码][代码]"gender"[代码][代码]: GENDER,[代码][代码] [代码][代码]"city"[代码][代码]: [代码][代码]"CITY"[代码][代码],[代码][代码] [代码][代码]"province"[代码][代码]: [代码][代码]"PROVINCE"[代码][代码],[代码][代码] [代码][代码]"country"[代码][代码]: [代码][代码]"COUNTRY"[代码][代码],[代码][代码] [代码][代码]"avatarUrl"[代码][代码]: [代码][代码]"AVATARURL"[代码][代码],[代码][代码] [代码][代码]"unionId"[代码][代码]: [代码][代码]"UNIONID"[代码][代码],[代码][代码] [代码][代码]"watermark"[代码][代码]:[代码][代码] [代码][代码]{[代码][代码] [代码][代码]"appid"[代码][代码]:[代码][代码]"APPID"[代码][代码],[代码][代码] [代码][代码]"timestamp"[代码][代码]:TIMESTAMP[代码][代码] [代码][代码]}[代码][代码]}[代码]官方文档中对encryptedData解密后的数据结构如上,但是我在dev环境中解密的结果,并没有拿到unionId. 此处获取到的user包含encryptedData信息。然后this.getAccount的方法是将iv跟encryptedData上传至服务器解密。 [代码]wx.getUserInfo({[代码][代码] [代码][代码]withCredentials: [代码][代码]true[代码][代码],[代码][代码] [代码][代码]success: (user) => {[代码][代码] [代码][代码]this[代码][代码].getAccount(user.encryptedData, user.iv)[代码][代码] [代码][代码].then((account) => {[代码][代码] [代码][代码]this[代码][代码]._user = <User> user.userInfo;[代码][代码] [代码][代码]this[代码][代码]._user.account = account;[代码][代码] [代码][代码]this[代码][代码].store();[代码][代码] [代码][代码]resolve([代码][代码]this[代码][代码]._user);[代码][代码] [代码][代码]})[代码][代码] [代码][代码].[代码][代码]catch[代码][代码](() => {[代码][代码] [代码][代码]reject();[代码][代码] [代码][代码]});[代码][代码] [代码][代码]},[代码][代码] [代码][代码]fail: () => {[代码][代码] [代码][代码]console.log([代码][代码]'failed'[代码][代码]);[代码][代码] [代码][代码]reject();[代码][代码] [代码][代码]},[代码][代码] [代码][代码]complete: () => {[代码][代码] [代码][代码]wx.hideLoading();[代码][代码] [代码][代码]}[代码][代码] [代码][代码]});[代码]解密结果: [代码]{ openId: [代码][代码]'obIwK0d6tIohLqXnvU9J2km1_XR4'[代码][代码],[代码][代码] [代码][代码]nickName: [代码][代码]'乔治林'[代码][代码],[代码][代码] [代码][代码]gender: 1,[代码][代码] [代码][代码]language: [代码][代码]'zh_CN'[代码][代码],[代码][代码] [代码][代码]city: [代码][代码]''[代码][代码],[代码][代码] [代码][代码]province: [代码][代码]''[代码][代码],[代码][代码] [代码][代码]country: [代码][代码]'CN'[代码][代码],[代码][代码] [代码][代码]avatarUrl: [代码][代码]'xxxx'[代码][代码],[代码][代码] [代码][代码]watermark: { timestamp: 1491535474, appid: [代码][代码]'xxxxxxx'[代码] [代码]} }[代码]
2017-04-07 - MAC版IDE下载链接无响应。
RT,管理员看看你们家服务器怎么了!!!
2017-02-14