[{"data":1,"prerenderedAt":165},["ShallowReactive",2],{"content:\u002Fposts\u002F2022\u002Fminiprogram-short-link":3,"surround:\u002Fposts\u002F2022\u002Fminiprogram-short-link":154},{"id":4,"title":5,"body":6,"canonical":133,"categories":134,"date":136,"description":133,"draft":137,"extension":138,"image":139,"meta":140,"navigation":141,"path":142,"permalink":133,"readingTime":143,"recommend":133,"references":133,"seo":148,"sitemap":149,"stem":150,"tags":151,"type":133,"updated":136,"__hash__":153},"content\u002Fposts\u002F2022\u002Fminiprogram-short-link.md","微信短链 URL Link",{"type":7,"value":8,"toc":130},"minimark",[9,13,20,26,62,68,73,99,105,108,118,121],[10,11,12],"p",{},"我们可以使用微信提供的接口来生成一个短链，可以在微信外直接跳转至指定小程序界面",[14,15,16],"ol",{},[17,18,19],"li",{},"获取 token",[21,22,23],"blockquote",{},[10,24,25],{},"这个接口会返回一个 token",[27,28,29,45],"table",{},[30,31,32],"thead",{},[33,34,35,39,42],"tr",{},[36,37,38],"th",{},"接口",[36,40,41],{},"请求方式",[36,43,44],{},"接口地址",[46,47,48],"tbody",{},[33,49,50,53,56],{},[51,52,19],"td",{},[51,54,55],{},"GET",[51,57,58],{},[59,60,61],"code",{"code":61},"https:\u002F\u002Fapi.weixin.qq.com\u002Fcgi-bin\u002Ftoken?grant_type=client_credential&appid=appid&secret=secret",[14,63,65],{"start":64},2,[17,66,67],{},"生成短链",[21,69,70],{},[10,71,72],{},"此接口返回一个微信的短链",[27,74,75,85],{},[30,76,77],{},[33,78,79,81,83],{},[36,80,38],{},[36,82,41],{},[36,84,44],{},[46,86,87],{},[33,88,89,91,94],{},[51,90,19],{},[51,92,93],{},"POST",[51,95,96],{},[59,97,98],{"code":98},"https:\u002F\u002Fapi.weixin.qq.com\u002Fwxa\u002Fgenerate_urllink?access_token=token",[100,101,102],"alert",{},[10,103,104],{},"此处的 token 必须在拼接至路径中",[10,106,107],{},"传参须使用 json 格式，在 body 中传参",[109,110,116],"pre",{"className":111,"code":113,"language":114,"meta":115},[112],"language-json","{\n  \"path\": \"\u002Fpages\u002Findex\u002Findex\",\n  \"query\": \"name=wxw\",\n  \"expire_type\": 1,\n  \"expire_interval\": 1,\n  \"env_version\": \"trial\",\n}\n","json","",[59,117,113],{"__ignoreMap":115},[119,120],"hr",{},[10,122,123],{},[124,125,129],"a",{"href":126,"rel":127},"https:\u002F\u002Fdevelopers.weixin.qq.com\u002Fminiprogram\u002Fdev\u002FOpenApiDoc\u002Fqrcode-link\u002Furl-link\u002FgenerateUrlLink.html",[128],"nofollow","官方文档",{"title":115,"searchDepth":131,"depth":131,"links":132},4,[],null,[135],"代码","2022-12-04 15:35:50",false,"md","https:\u002F\u002Fbitmc.uno\u002Fpicgo\u002Fminiprogram-short-link.jpg",{},true,"\u002Fposts\u002F2022\u002Fminiprogram-short-link",{"text":144,"minutes":145,"time":146,"words":147},"1 min read",0.67,40200,134,{"title":5,"description":133},{"loc":142},"posts\u002F2022\u002Fminiprogram-short-link",[152],"微信接口","U3mc-xX1sfe9G6E9mYFXtznOdTRTThzrR6Ii66lXy_s",[155,160],{"title":156,"path":157,"stem":158,"date":159,"type":133,"children":-1},"小程序分包及uniapp分包","\u002Fposts\u002F2022\u002Fminiprogram-subpackages","posts\u002F2022\u002Fminiprogram-subPackages","2022-12-04 15:35:30",{"title":161,"path":162,"stem":163,"date":164,"type":133,"children":-1},"gulp压缩js文件","\u002Fposts\u002F2022\u002Fgulp-uflify-js","posts\u002F2022\u002Fgulp-uflify-js","2022-12-04 15:40:12",1789642596889]