wx.request 如何post 后传参变成[object Object]
摘要:1、默认是GET请求,参数少没关系,参数多了就传不了 wx.request({ url: t.data.baseurl + "xxxxx", data: data, cachetime: "30", success: function (a) {} 2、改造 增加红色部分即可 wx.request(
阅读全文
posted @
2020-06-11 10:13
dm3344
阅读(2185)
推荐(0) 编辑
微信小程序app.js 内容加载速度比 index.js 慢导致无法获取到全局用户对象
摘要:一、场景 我在app.js 的onload 进行wx.login 取到code,用code 去调用api服务器换取openid并且获取用户信息回来缓存到 globalData.userinfo 缓存起来 在首页的index.js 的onload 获取 getApp().globalData.user
阅读全文
posted @
2020-06-09 10:32
dm3344
阅读(1584)
推荐(0) 编辑
微信小程序promise async出现regeneratorRuntime is not defined错误
摘要:一、问题 二、解决 1 详情,ES6 转ES5 勾上 2 缺少了regeneratorRuntime这个模块,需要从外部引入 2.1.在新建的文件夹中执行 npm init ,生成package.json文件(一路回车就好) 2.2.执行 npm install regenerator@0.13.1
阅读全文
posted @
2020-06-02 09:56
dm3344
阅读(1177)
推荐(0) 编辑