更改了一个mock数据内容

This commit is contained in:
Xu Chang 2023-02-09 15:05:21 +08:00
parent b01a5da188
commit cce60a9211
2 changed files with 2 additions and 2 deletions

View File

@ -121,7 +121,7 @@ var WechatPublicInstance = /** @class */ (function () {
var result, nickname, sex, headimgurl;
return tslib_1.__generator(this, function (_a) {
switch (_a.label) {
case 0: return [4 /*yield*/, this.access("https://api.weixin.qq.com/sns/userinfo?access_token=".concat(accessToken, "&openid=").concat(openId, "&lang=zh_CN"), { nickname: '张三丰', sex: 1, headimgurl: 'https://www.ertongzy.com/uploads/allimg/161005/2021233Y7-0.jpg' })];
case 0: return [4 /*yield*/, this.access("https://api.weixin.qq.com/sns/userinfo?access_token=".concat(accessToken, "&openid=").concat(openId, "&lang=zh_CN"), { nickname: '码农哥', sex: 1, headimgurl: 'https://www.ertongzy.com/uploads/allimg/161005/2021233Y7-0.jpg' })];
case 1:
result = _a.sent();
nickname = result.nickname, sex = result.sex, headimgurl = result.headimgurl;

View File

@ -119,7 +119,7 @@ export class WechatPublicInstance {
async getUserInfo(accessToken: string, openId: string) {
const result = await this.access(
`https://api.weixin.qq.com/sns/userinfo?access_token=${accessToken}&openid=${openId}&lang=zh_CN`,
{ nickname: '张三丰', sex: 1, headimgurl: 'https://www.ertongzy.com/uploads/allimg/161005/2021233Y7-0.jpg' }
{ nickname: '码农哥', sex: 1, headimgurl: 'https://www.ertongzy.com/uploads/allimg/161005/2021233Y7-0.jpg' }
);
const { nickname, sex, headimgurl } = result;
return {