wevue-tools
登录
wx.siginin(options)
-
options.url 非必须,default :/api/login
-
options.username 必须
-
options.password 必须
-
options.remember 非必须,default:false
-
例子
wx.siginin({
username:"",
password:"",
remember:false,
success:function(res){
console.log(res.data);
},
fail:function(err){
console.log(err);
}
})
-
res
{ "errcode":0, "errmsg":"ok", "token":"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJlbWFpbCI6InJvb3RAcXlodWIubmV0IiwidHMiOjE0OTAwMDkxMjY4MDZ9.2vTqogrQv-_KQFTNgwRC2aL-sxq8xi41JhhcyjsiXtQ", "expires":31200, "refresh_token":"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJlbWFpbCI6InJvb3RAcXlodWIubmV0IiwidHMiOjE0OTAwMDkxMjY4MDYsInR5cGUiOjF9.XMlQ-65PvjfUDgUTuiyyVqwjs8Y69Wgmg0eDcrwHWso" }
检查会话是否过期
wx.checkUserSession(); 返回:true || false
获取当前user信息
wx.getUser(options)
-
options.url 非必须,default :/api/get_user
-
options.token 非必须,default:当前登录的token
-
例子
wx.getUser({
success:function(res){
console.log(res.data);
//{email: "root@qyhub.net", ts: 1490009126806}
},
fail:function(err){
console.log(err);
}
})
Version History
| Version | Released | Vue | License |
|---|---|---|---|
| 1.5.6 | ^2.2.2 | GPL | |
| 1.5.5 | ^2.2.2 | GPL | |
| 1.5.4 | ^2.2.2 | GPL | |
| 1.5.3 | ^2.2.2 | GPL | |
| 1.5.2 | ^2.2.2 | GPL | |
| 1.5.1 | ^2.2.2 | GPL | |
| 1.5.0 | ^2.2.2 | GPL | |
| 1.4.9 | ^2.2.2 | GPL | |
| 1.4.8 | ^2.2.2 | GPL | |
| 1.4.7 | ^2.2.2 | GPL | |
| 1.4.6 | ^2.2.2 | GPL | |
| 1.4.5 | ^2.2.2 | GPL | |
| 1.4.4 | ^2.2.2 | GPL | |
| 1.4.3 | ^2.2.2 | GPL | |
| 1.4.2 | ^2.2.2 | GPL | |
| 1.4.1 | ^2.2.2 | GPL | |
| 1.4.0 | ^2.2.2 | GPL | |
| 1.3.9 | ^2.2.2 | GPL | |
| 1.3.8 | ^2.2.2 | GPL | |
| 1.3.7 | ^2.2.2 | GPL | |
| 1.3.6 | ^2.2.2 | GPL | |
| 1.3.5 | ^2.2.2 | GPL | |
| 1.3.4 | ^2.2.2 | GPL | |
| 1.3.3 | ^2.2.2 | GPL | |
| 1.3.2 | ^2.2.2 | GPL | |
| 1.3.1 | ^2.2.2 | GPL | |
| 1.3.0 | ^2.2.2 | GPL | |
| 1.2.9 | ^2.2.2 | GPL | |
| 1.2.8 | ^2.2.2 | GPL | |
| 1.2.7 | ^2.2.2 | GPL |
Showing the latest 30 of 57. See every release on npm