uni-im登录代码如下
uni.request({
url:'http://localhost:9999/api/imLogin',
method: 'POST',
data: {
uniPlatform: 'web',
externalUid: '6666666666666666666666666666',
username:'18606336666',
password:'121123'
},
success:async (res) => {
let tempData = JSON.parse(res.data.data.response);
console.log('tempData: ',tempData);
uni.setStorageSync('token',res.data.data.token)
await uniImUtils.login(tempData.newToken).then(()=>{
// this.loginSuccess(tempData)
})
}
});