封装公共方法,并存在异步请求接口情况 封装及调用-引用代码如下:

时间:2025-04-12 16:33:50
	import { sweep, } from '@/utilsTwo/login.js'
	sweep({
								phone: obj.phone,//给封装的方法传参
								worker_id: than.worker_id,
								tit: '注册成功'
							}).then((ref) => {
								console.log("返回页面的内容", ref)
								if (ref.result == '失败') {
									uni.showToast({
										title: "绑定班组失败!!!",
										duration: 2000,
										icon: 'none'
									});
								}
							}).catch((error) => {});