微信小程序POST请求后台获取不到请求的参数
微信小程序默认值是'content-type': 'application/json' 需要改成'content-type': 'application/x-www-form-urlencoded'
微信小程序默认值是'content-type': 'application/json' 需要改成'content-type': 'application/x-www-form-urlencoded'
在微信开发者工具中运行获取的 formId 为 the formId is a mock one ,要获得真实有效的 formId 需要在真机上运行。
1.拨打电话 wxml: call: function (e) { var phone = e.currentTarget.dataset.phone; if (!phone) return false; wx.makePhoneCall({ phoneNumber: phone }); }, 2.打开地图 openMap: function (e) { v
靠最顶部 "navigationStyle": "custom"
wxml 点击复制 js copyText:function(e){ console.log(e) wx.setClipboardData({ data: e.currentTarget.dataset.text, success: function (res) { wx.getClipboardData({ success: function (res)
使用到了百度小程序sdk 1.先到百度开发者平台申请 2.小程序后台把百度请求域名加上 3.下载百度小程序sdk 下载地址:http://lbsyun.baidu.com/index.php?title=wxjsapi/wxjs-download 4.放入相应的位置 5.请求
解决方案: 使用var that = this
加载loading wx.showLoading({ title: '加载中', }) 关闭 loadingwx.hideLoading() 并行发送多个请求,使用promise.all /** * 生命周期函数--监听页面加载 */ onLoad: function (options) { wx.showLoading({ title: '加载中', })
定义组件 wxml: wxss .container{ background-color: #000; position: fixed; top: 0; opacity: 0.6; width: 100%; height: 100%; z-index: 99 } 无js设置 组件使用 在json中引入: { "usingComponents":{ "v-ma