微信公众号菜单添加医保电子凭证,直接使用链接
https://mp.weixin.qq.com/insurance/card/creditjump?cityid=431099#wechat_redirect
也许cityid=431099 可以修改不同的编码,具体这个需要测试
我修改为423000 看看效果.感觉也没有什么区别。反正都是打开一个链接。
然后微信小程序 添加医保电子凭证链接 。
这个首先得去获取 微信里面 官方 【我的医保凭证】的appid,
步骤,点击右上角... 弹出菜单 ,点击绿色图标 4.7分 ---点击更多资料
查看到 appid为 【wx7ec43a6a6c80544d】
在自己的公众号---发表新的图文消息--点击导航栏的小程序
输入查到的appid
【wx7ec43a6a6c80544d】
我直接复制了
pages/new_index/index/index.html
默认首页
pages/nhsa-code/index/index.html?channel=AAGYCx9OVG4gOuJJPPaZmysv
直接出示二维码
然后根据微信文档去做小程序内的跳转
可以跳转到"我的医保凭证"小程序,无需开通任何东西,
使用wx.navigateToMiniProgram即可,
https://developers.weixin.qq.com/miniprogram/dev/api/navigate/wx.navigateToMiniProgram.html
或者使用navigator配置成跳转到小程序,
https://developers.weixin.qq.com/miniprogram/dev/component/navigator.html
具体:
首先需要复制代码到app.js
然后。在使用
.navigator-hover { color:blue; } .other-navigator-hover { color:red; }
<!-- sample.wxml --> <view class="btn-area"> <navigator url="/page/navigate/navigate?title=navigate" hover-class="navigator-hover">跳转到新页面</navigator> <navigator url="../../redirect/redirect/redirect?title=redirect" open-type="redirect" hover-class="other-navigator-hover">在当前页打开</navigator> <navigator url="/page/index/index" open-type="switchTab" hover-class="other-navigator-hover">切换 Tab</navigator> <navigator target="miniProgram" open-type="navigate" app-id="" path="" extra-data="" version="release">打开绑定的小程序</navigator> </view>
<!-- navigator.wxml --> <view style="text-align:center"> {{title}} </view> <view> 点击左上角返回回到之前页面 </view>
<!-- redirect.wxml --> <view style="text-align:center"> {{title}} </view> <view> 点击左上角返回回到上级页面 </view>
Page({ onLoad: function(options) { this.setData({ title: options.title }) } })
主要是
<navigator target="miniProgram" open-type="navigate" app-id="wx7ec43a6a6c80544d" path="pages/nhsa-code/index/index.html?channel=AAGYCx9OVG4gOuJJPPaZmysv" extra-data="" version="release" class="widget_more">
这一段了,需要指定好id和路径
最终
最后我测试,如果设置跳转到指定页面,会一直空白
就是
<navigator target="miniProgram" open-type="navigate" app-id="wx7ec43a6a6c80544d" path="pages/nhsa-code/index/index.html?channel=AAGYCx9OVG4gOuJJPPaZmysv" extra-data="" version="release" class="widget_more">
这一段了,需要指定好id和路径
这里面的path=
我不知道为什么呢!!!
最终只有设置为空,那么默认就是跳转到首页了
但是至少是可以工作了
2022年0618
app.js
电脑维护,系统安装,软 、硬件维修,电脑配件,零售业务,网站建设,路由器安装设置、 服务器维护,电脑、网络维护,智能手机刷机,安装WIFI 调试!郴州网站建设 小程序搭建 郴州电脑维修
咨询电话:18175576644 扫描二维码。关注公众号,小程序 享受星级服务 |
手机点击二维码关注 |
手机点击打开小程序 |