// 公共支付方法
export function pay(params) {
	uni.requestPayment({
		...params,
		success(res) {
			setTimeout(() => {
				uni.reLaunch({
					url: '/pages/pay/index'
				});
			}, 1500);
		},
		fail(e) {
			uni.showToast({
				title: '支付失败',
				icon: 'none'
			});
			setTimeout(() => {
				uni.redirectTo({
					url: '/pages/pay/index'
				});
			}, 1000);
		}
	});
}
