微信小程序之短连接 分享转发 点击短连接就可以直接打开小程序某个页面
官网有个错误:
我就随便试了试 pages前面不加 / 居然成功了!!!
这个官网示例竟然有/ 害我一上午!!!
话不多说,上代码:
实现效果图:需要分享的页面,复制链接功能
html:我这里是个弹层
<view class="infoboxtan sharetanbox" wx:if="{
{issharetan}}">
<view class="tanmain">
<view class="sharetopbox">
<view class="sharetxt">分享到</view>
<view class="shareicobox">
<view class="wximgbox">
<image mode="aspectFill" src="http://www.meitang.cn/static/img/images/share_weixin.png" class="wximg" alt="" />
<view class="wximgtxt">微信好友</view>
<button open-type="share" class="sharetap" />
</view>
<view class="wximgbox" bindtap="getaccess_token">
<image mode="aspectFill" src="http://www.meitang.cn/static/img/images/share_fuzhi.png" class="wximg" alt="" />
<view class="wximgtxt">复制链接</view>
<!-- <button open-type="share" class="sharetap" /> -->
</view>
</view>
</view>
<view class="sharequxiao" bindtap="sharequxiaotap">取消</view>
</view>
</view>
css: less格式
.infoboxtan {
position: fixed;
top: 0;
left: 0;
width: 100%