JAVA、PHP、前端、APP、网站开发 - 开发技术学习

文档标签: 小程序分享

小程序web-view分享停留当前页面.

web-view页面:/**   * 用户点击右上角分享   */onShareAppMessage: function (res) {var webViewUrl = res.webViewUrl;//这个是关键点,获取web-view当前页面的地址return {title: 'test',path: '/pages/webview/webview?url='+encodeURIComponent(webViewUrl),imageUrl: '',success: function(response) {console.log(response)},fail: function(error){console.log(error)}}}通过分享进入小程序页面的时候就会走到onLoad方法里面onLoad: function (options) {var url = app.globalData.baseUrl + '/index.html';if (typeof...
此文被围观1995次  分类: APP开发 标签:  ··

站点声明:部分内容源自互联网,为传播信息之用,如有侵权,请联系我们删除。

© Copyright 2011-2024 www.kfju.com. All Rights Reserved.
超级字帖 版权所有。蜀ICP备12031064号