当前位置:网站首页>Small program wx.request simple Promise package
Small program wx.request simple Promise package
2022-08-10 05:48:00 【Brahma pigeon】
//public request jsimport {baseURL} from "./config.js"export default function request(option){return new Promise((resolve,reject)=>{wx.request({url: baseURL + option.url,method: option.method || 'get',data: option.data,success: resolve,fail:function(err){reject(err)}})})}// specific page data requestimport request from "./network.js"export function getMultiData(){return request({url: '/home/multidata'})}export function getHomeGoods(type,page){return request({url:'/home/data',data:{type,page}})}
边栏推荐
- Linux database Oracle client installation, used for shell scripts to connect to the database with sqlplus
- 文章复现:超分辨率网络FSRCNN
- 深度学习中数据到底要不要归一化?实测数据来说明!
- wiki confluence 安装
- el-cascader级联选择器的子菜单双击两次才显示被选中的内容
- 操作表 函数的使用
- win12 修改dns脚本
- Canal 报错 Could not find first log file name in binary log index file
- .las转.txt 再转.pcd,编译运行中出现的错误
- 文章复现:SRCNN
猜你喜欢
随机推荐
泛型笔记()()()
最新最全的数字藏品发售日历-07.27
Pony语言学习(九)——泛型与模式匹配(终章)
非会员更改有道云笔记背景
小程序学习笔记:小程序组件间通信方式
【el和template区别】
R中设置图形参数--函数par()详解
Qiskit 学习笔记1
Using sqlplus to operate database in shell script
链读推荐:从瓷砖到生成式 NFT
Chain Reading | The latest and most complete digital collection calendar-07.28
R绘制图像,图像特征提取
.las转.txt 再转.pcd,编译运行中出现的错误
使用Tenserboard可视化深度学习训练过程
第二次实验
图纸怎么折?(A0,A1,A2,A3の图纸如何折成A4大小)
利用 crontab 拷贝大文件
Batch add watermark to pictures batch add background zoom batch merge tool picUnionV4.0
Count down the six weapons of the domestic interface collaboration platform!
网络安全5