在日常做微信推文的时候,我们经常会遇到这样一个需求:在页面插入一个小程序或者小程序的某个页面,这就需要我们「获取小程序路径」,一般两步即可获取:
第一步
在公众号后台编辑器搜索并插入“小程序”,点击下一步进行详细信息天下,点击小程序路径输入框下方的提示文字“获取更多页面路径”,在右边输入你自己的微信号并点击开启。

第二步
用开启路径的微信账号,在手机端打开插入的小程序并进入到指定页面(即想插入的页面)后,点击右上角“…”分享按钮,打开二级菜单,右下角会多出一个“复制小程序”路径的按钮,点击复制后,返回微信公众号后台,在小程序路径里替换复制的内容即可。

可实现操作
- 在微信菜单栏跳转京东店铺首页/产品页等。
- 在推文内插入商品页进行引流。
- 其他。
写在最后
一般情况下,除了直接插入之外,还可以选择点击图片跳转(即小程序展现方式),正常会有一个小程序图标,通过下方代码可以去除角标展示。
<section class="_135editor" style="height: 0; opacity: 0;">·</section>
<section style="background-repeat: repeat; background-position: left top; background-size: 100% auto;" data-copyright="">
<section class="_135editor">
<section class="block" data-id="39" data-plugin="minaimg" style="margin: 0; padding: 0; transform: rotateZ(0deg) scale(1); -webkit-transform: rotateZ(0deg) scale(1); -moz-transform: rotateZ(0deg) scale(1); -ms-transform: rotateZ(0deg) scale(1); -o-transform: rotateZ(0deg) scale(1);"
data-template="%7B%22block_id%22%3A1649660157988%2C%22padding%22%3A%7B%22top%22%3A0%2C%22bottom%22%3A0%2C%22left%22%3A0%2C%22right%22%3A0%7D%2C%22margin%22%3A%7B%22top%22%3A0%2C%22bottom%22%3A0%2C%22left%22%3A0%2C%22right%22%3A0%7D%2C%22plugin%22%3A%22minaimg%22%2C%22template%22%3A%7B%22id%22%3A%2239%22%2C%22name%22%3A%22%E6%97%A0%E8%A7%92%E6%A0%87%E5%B0%8F%E7%A8%8B%E5%BA%8F%22%2C%22cate_id%22%3A%221%22%2C%22sub_cate_id%22%3A%22%2C7%2C%22%7D%2C%22custom%22%3A%7B%22imgs%22%3A%5B%7B%22u%22%3A%22%E5%9B%BE%E7%89%87%E9%93%BE%E6%8E%A5%22%2C%22w%22%3A0%2C%22h%22%3A0%2C%22link%22%3A%7B%22aid%22%3A%22%E5%B0%8F%E7%A8%8B%E5%BA%8Fappid%22%2C%22apath%22%3A%22%E5%B0%8F%E7%A8%8B%E5%BA%8F%E8%B7%AF%E5%BE%84%22%2C%22format%22%3Atrue%2C%22mark%22%3Afalse%7D%7D%5D%7D%7D"
data-copyright="">
<section class="block-inner" data-inner-id="39" data-inner-name="135editor-minaimg">
<section class="_135editor" style="font-size: 0; line-height: 0; margin: 0; padding: 0; transform: scale(1);"><svg xml:vsersion="1N1VW5OPQ0896" xml:vsersion="1K1GH5BCD0896" viewBox="0 0 0 0" powered-by="135editor" style="display: inline-block; svg: 135; width: 100%; user-select: none; vertical-align: top; pointer-events: none; outline: none; background-image: url(图片链接); background-attachment: scroll; background-position: center; background-size: 100% 100%; -webkit-tap-highlight-color: transparent; "><a
class="weapp_text_link" data-miniprogram-appid="小程序appid" data-miniprogram-path="小程序路径">
<rect x="0" y="0" width="0" height="0" opacity="0" fill="transparent"
style="pointer-events: painted;"></rect>
</a></svg></section>
</section>
</section>
</section>
</section>
<!-- 使用说明:修改图片链接、小程序appid和小程序路径即可。 -->
注:通过手机打开小程序,进入小程序主页点击查看「更多资料」即可获取当前小程序appid。