存:
uni.setStorage({
key: 'cid', //属性名
data: plus.push.getClientInfo().clientid //值
})
取:
uni.getStorage({
key: 'cid', //属性名
success: (e)=> {
e.data, //这就是你想要取的token
// 给后台传clientid
this.$ajax({
url: this.$url.clientInfo,
data: {
clientid: e.data
},
method: 'POST'
}).then(res=>{}).catch(err=>{});
}
})
网友评论