-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcontent.json
1 lines (1 loc) · 7.52 KB
/
content.json
1
{"meta":{"title":"blog-xmy","subtitle":"blog","description":"blog","author":"xmy","url":"https://280564871.github.io","root":"/"},"pages":[{"title":"categories","date":"2019-10-08T09:09:35.000Z","updated":"2019-10-08T09:09:58.253Z","comments":true,"path":"categories/index.html","permalink":"https://280564871.github.io/categories/index.html","excerpt":"","text":""}],"posts":[{"title":"微信物流助手测试","slug":"微信物流助手测试","date":"2019-11-18T02:52:23.000Z","updated":"2019-11-18T03:58:34.957Z","comments":true,"path":"cl0jcwr2g00055d0m2pngsyic.html","link":"","permalink":"https://280564871.github.io/cl0jcwr2g00055d0m2pngsyic.html","excerpt":"","text":"注意事项服务器进行接口调用的时候要设置好超时时间,防止微信接口返回超时导致请求失败,很多错误都是超时之后再次请求,所以返回信息会报错 测试发货 delivery_id =TEST biz_id = test_biz_id 其他按照文档上的参数填写就可以测试发货 测试物流状态 登录小程序后台后,在「开发」-「开发设置」-「消息推送」中,管理员扫码启用消息服务,填写服务器地址(URL)、令牌(Token) 和 消息加密密钥(EncodingAESKey)等信息。 配置完毕后: 请求地址 POST https://api.weixin.qq.com/cgi-bin/express/business/test_update_order?access_token=ACCESS_TOKEN 属性 类型 默认值 必填 说明 access_token string 是 接口调用凭证 biz_id string 是 商户id,需填test_biz_id order_id string 是 订单号 delivery_id string 是 快递公司id,需填TEST waybill_id string 是 运单号 action_time number 是 轨迹变化 Unix 时间戳 action_type number 是 轨迹变化类型 action_msg string 是 轨迹变化具体信息说明,使用UTF-8编码 composer 引入 EasyWechat composer require overtrue/wechat:~4.0 -vvv 1234$encryptor = new Encryptor($cfg['app_id'], $cfg['token'], $cfg['aes_key']);//解密通知消息//$msgSignature, $nonce, $timestamp 这三个参数是通过url传入return $encryptor->decrypt($content, $msgSignature, $nonce, $timestamp);","categories":[],"tags":[{"name":"微信","slug":"微信","permalink":"https://280564871.github.io/tags/微信/"}]},{"title":"关于微信开发定位问题","slug":"关于微信开发定位问题","date":"2019-11-07T14:58:41.000Z","updated":"2019-11-18T05:00:32.347Z","comments":true,"path":"cl0jcwr2i00065d0mtqmcg7e4.html","link":"","permalink":"https://280564871.github.io/cl0jcwr2i00065d0mtqmcg7e4.html","excerpt":"","text":"腾讯地图的坑 在使用腾讯地图获取当前位置,在浏览器中是没问题的,但是在微信中却无法定位。 当切到微信开发者工具的公众号调试中,发现腾讯地图会使用微信自带的定位接口,并且会调用wx.config,所以控制台会打印wx.config的信息。 更有意思的是他的签名还无效,所以会导致定位无法使用,所以我准备自己使用jssdk的定位接口来获取当前位置 微信config的坑 一开始在开发者工具上调用wx.config的时候没有问题,可以授权获取当前位置,但是当我用ios手机的时候,点击定位却无效,自己一步步打印调试发现没有问题,搜索了一下: Vue应用(vue-router)上使用history模式,在某个页面内调用微信JSSDK相关API,如扫码、分享等,使用当前页面URL总会出现签名错误(invalid signature),导致API调用失败。 Vue-Router进行路由切换的时候,总是会操作浏览器的历史记录,从而响应页面URL变化。 也就是说在ios上无论怎么更换页面始终都是第一次进入的url,但是我打印 windows.local.herf的时候就是当前页面的url 这点没太明白是为什么。 于是我尝试使用网上的解决方法,发现是可以解决这个问题的 分享部分代码 因为程序规模不大,所以也没有使用vuex 12345678910111213function isIos() {//判断是否为ios const u = navigator.userAgent; return u.indexOf("iPhone") > -1 || u.indexOf("Mac OS") > -1;}//路由拦截首次进入的url保存 这样在调用微信签名的时候就可以获取到首次进入的路径了router.beforeEach((to, from, next) => { if (isIos && sessionStorage.getItem("url") === null) { sessionStorage.setItem("url", window.location.href) } next()}) 这两个坑调试了好久,记录一下!","categories":[],"tags":[{"name":"微信","slug":"微信","permalink":"https://280564871.github.io/tags/微信/"},{"name":"vue","slug":"vue","permalink":"https://280564871.github.io/tags/vue/"},{"name":"地图","slug":"地图","permalink":"https://280564871.github.io/tags/地图/"}]},{"title":"Go交叉编译","slug":"Go交叉编译","date":"2019-10-10T03:59:49.000Z","updated":"2019-10-10T13:40:25.646Z","comments":true,"path":"cl0jcwr2900005d0mmsizz8tj.html","link":"","permalink":"https://280564871.github.io/cl0jcwr2900005d0mmsizz8tj.html","excerpt":"","text":"Mac 下编译 Linux 和 Windows 64位可执行程序12CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build main.goCGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build main.go Linux 下编译 Mac 和 Windows 64位可执行程序12CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build main.goCGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build main.go Windows 下编译 Mac 和 Linux 64位可执行程序123456789SET CGO_ENABLED=0SET GOOS=darwinSET GOARCH=amd64go build main.goSET CGO_ENABLED=0SET GOOS=linuxSET GOARCH=amd64go build main.go","categories":[{"name":"tools","slug":"tools","permalink":"https://280564871.github.io/categories/tools/"}],"tags":[{"name":"Linux","slug":"Linux","permalink":"https://280564871.github.io/tags/Linux/"},{"name":"Windows64","slug":"Windows64","permalink":"https://280564871.github.io/tags/Windows64/"},{"name":"Mac","slug":"Mac","permalink":"https://280564871.github.io/tags/Mac/"},{"name":"Go","slug":"Go","permalink":"https://280564871.github.io/tags/Go/"}]},{"title":"MAMP安装redis扩展","slug":"MAMP安装redis扩展","date":"2019-10-09T02:30:35.000Z","updated":"2019-10-10T05:02:12.068Z","comments":true,"path":"cl0jcwr2d00025d0m92xj0dh5.html","link":"","permalink":"https://280564871.github.io/cl0jcwr2d00025d0m92xj0dh5.html","excerpt":"","text":"使用pecl安装redis扩展123#bin/bashcd /Applications/MAMP/bin/php/php7.1.31/bin./pecl install redis 找到php.ini文件加入 extension=redis.so phpinfo();查看是否添加成功","categories":[{"name":"tools","slug":"tools","permalink":"https://280564871.github.io/categories/tools/"}],"tags":[{"name":"Mac","slug":"Mac","permalink":"https://280564871.github.io/tags/Mac/"},{"name":"Redis","slug":"Redis","permalink":"https://280564871.github.io/tags/Redis/"},{"name":"PHP","slug":"PHP","permalink":"https://280564871.github.io/tags/PHP/"}]}],"categories":[{"name":"tools","slug":"tools","permalink":"https://280564871.github.io/categories/tools/"}],"tags":[{"name":"微信","slug":"微信","permalink":"https://280564871.github.io/tags/微信/"},{"name":"vue","slug":"vue","permalink":"https://280564871.github.io/tags/vue/"},{"name":"地图","slug":"地图","permalink":"https://280564871.github.io/tags/地图/"},{"name":"Linux","slug":"Linux","permalink":"https://280564871.github.io/tags/Linux/"},{"name":"Windows64","slug":"Windows64","permalink":"https://280564871.github.io/tags/Windows64/"},{"name":"Mac","slug":"Mac","permalink":"https://280564871.github.io/tags/Mac/"},{"name":"Go","slug":"Go","permalink":"https://280564871.github.io/tags/Go/"},{"name":"Redis","slug":"Redis","permalink":"https://280564871.github.io/tags/Redis/"},{"name":"PHP","slug":"PHP","permalink":"https://280564871.github.io/tags/PHP/"}]}