uniapp接口请求方法封装
uniapp接口请求方法封装
1、具体页面代码 (main.js)
const that = Vue.prototype; //实例Vue.prototype
//get请求方法
//url 路径
//params 入参
//isLoading 是否显示加载中的动画
//loadText加载中… 动画提示语
that.get = function(url, params = {}, isLoading = false, loadText) {
return requestPromise(url, ‘GET
原创
2021-04-06 10:13:10 ·
500 阅读 ·
0 评论