问题模块 操作时间 AppID
管理后台 01-15 4d91d29cbede39dbe1b0801f423c95c6
wx.getUserInfo({
success: function (res) {
// console.log("获取用户信息:" + res.userInfo.nickName)
app.data.thumb = res.userInfo.avatarUrl;
app.data.nickname = res.userInfo.nickName;
nickname = res.userInfo.nickName;
var url = app.url;
var Road_King = url + "/user/UserOrderController";
/* 获取code 以获取openid */
wx.login({
success: function (res) {
if (res.code) {
// console.log('发起网络请求:' + res.code)
wx.request({
url: 'https://test.com/onLogin',
data: {
code: res.code
}
})
console.log("获取用户唯一标识:" + res.code)
var temp = encrypting(res.code)
app.data.code = res.code;
console.log("nickname:" + nickname)
wx.request({
url: Road_King,
method: "GET",
data: {
code: temp,
nickname: nickname,
},
success: function () {
console.log("数据传送成功!");
}
})
} else {
console.log('获取用户登录态失败!' + res.errMsg)
}
}
});
}
})
代码如上
我想将用户名字传递到后台,后台显示的用户名字为乱码,具体中文乱码如下
本文网址:http://www.91bianli.com/weixinxiaochengxu/49232.html