1 路由的跳转

  

SRE实战 互联网时代守护先锋,助力企业售后服务体系运筹帷幄!一键直达领取阿里云限量特价优惠。
uni.navigateTo({
		url:'/pages/home/search'
});
//非tabBar页面跳转

 

uni.switchTab({
	 url:"/pages/index/index"
})

//非tabBar跳转到tabBar页面

2 请求

uni.request({
				url: 'https://www.easy-mock.com/mock/5cb6c0b0af031b75d25dc1f5/element/historyComtent', //接口地址
				data: {
					type: 1,
					userId:2
				},
				header: {
					'custom-header': 'hello' //自定义请求头信息
				},
				success: (res) => {
					console.log(res.data);
				}
			});

  

 

 

扫码关注我们
微信号:SRE实战
拒绝背锅 运筹帷幄