uni app 调用接口方法与保存token

			xx:{"phone":111,"password":1234}
		
			uni.request({
				url: 'http://localhost:9091/staff/login', //仅为示例,并非真实接口地址。
				method:'POST',
				data: {
					  phone:this.xx.phone,
					  password:this.xx.password
				},
				success: (res) => {
				}
			})
	

uni.setStorage({
							key:'key',
							data:value
						})

uni.getStorage({
    key: 'key',
    success: function (res) {
        console.log(res);
    }
});

你可能感兴趣的:(uni app 调用接口方法与保存token)