![](https://img-blog.csdnimg.cn/20201014180756913.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
小程序
Liuboxx1
这个作者很懒,什么都没留下…
展开
-
微信小程序调用腾讯地图获取jsonp数据 解析详细地址信息
用微信小程序内置js调用腾讯地图api获取位置信息,返回的是jsonp数据 解析方式如下: //根据经纬度对象获取位置详细信息 getLocationInfo: function (location){ let _this = this; var data = { location: location.latitude + "," + location.lo...原创 2018-08-03 18:15:35 · 3537 阅读 · 0 评论 -
微信小程序授权回调
因为微信小程序升级,获得用户授权的方式有所改变。那么在用户 授权/取消 回调那儿也需要做改变注意:wx.authorize({scope: "scope.userInfo"}),无法弹出授权窗口,请使用 <button open-type="getUserInfo"></button>获得用户授权用下面这种方式wxml<button wx:if="...原创 2018-07-31 10:52:07 · 5304 阅读 · 2 评论 -
小程序 `navigateBack` 反向传值给上一页
//点击地址反向传值 sendAddress: function(e) { let _this = this; var index = e.currentTarget.dataset.index; var address = _this.data.addressList[index]; var pagesArr = getCurrentPages(); ...原创 2018-08-06 11:44:25 · 2938 阅读 · 0 评论 -
关于Yii2 微信支付回调地址处理
今天碰到微信支付回调地址 的问题,因为公司路由是 r=A/B/C 的方式,作为微信回调的话是有参数的,会被微信过滤掉。 解决办法: nginx设置:location ~ ^/callback\d*\.php { rewrite /(.*)\.php /index.php?r=aff/callback/$1 last;}...原创 2018-08-14 19:31:25 · 1497 阅读 · 0 评论 -
js判断对象里面是否有某个属性
if(obj.hasOwnProperty('property')) { console.log('属性存在');}else { console.log('属性不存在');}原创 2018-08-17 11:17:36 · 942 阅读 · 0 评论 -
小程序客服消息
/** * 发送客服消息接口 */ public function actionCustomService() { $data = file_get_contents('php://input'); $data = json_decode($data,true); $qrcode_url = Yii::$ap...原创 2018-08-20 17:35:17 · 922 阅读 · 0 评论