react native webview 分享H5到微信打开没内容

news/2024/7/10 2:18:51 标签: react native, vue

原因是分享到微信后,链接包含?from=singlemessage

解决:在h5里面拿到链接处理后重定向即可

var url = window.location.href
if(url.indexOf('?from=singlemessage')){
    console.log('链接包含from=singlemessage')
    var newUrl = window.location.href.split('?')[0] + window.location.hash
    window.location.href = newUrl
}

 


http://www.niftyadmin.cn/n/1319211.html

相关文章

Spring注入有继承关系的类(1)

一个类一个类的注入1.AClass类package com.bijian.spring.test2;public class AClass {String a;String b;public String getA() {return a;}public void setA(String a) {this.a a;}public String getB() {return b;}public void setB(String b) {this.b b;} }2.BClass类pac…

CSS background-postion定位是个细活,要像做精密仪器一样小心翼翼

1. css背景属性background-postion,可以取值:left | center | right | top | bottom 例如: background-postion:left; background-postion:center ; background-postion:right ; background-postion&#…

配置flutter遇到的android studio问题

问题1 解决: 1.在android studio里面打开SDK Manager 选择Api Level 29或者以上版本的SDK Platforms 2.执行命令:flutter doctor --android-licenses 问题2 解决 1.点击配置 Configure 选项,选择 Plugins 子选项,搜索Dart 和 Flutter安装…

Libevent笔记

Libevent简介 libevent是一个基于事件触发的网络库,适用于windows、linux、bsd等多种平台,内部使用select、epoll、kqueue等系统调用管理事件机制。 官网:http://libevent.org/ 特点: 事件驱动,高性能; 轻量级&#x…

flutter环境配置mac

1.官网下载sdk,解压后到你想要放的文件目录下,后解压 注意:下载的sdk解压后是flutter文件夹并且里面有.git文件,不然会报下面的错误 Error: The Flutter directory is not a clone of the GitHub project. The flutter tool req…

Spring注入有继承关系的类(2)

被注入类的父类有相应的属性,Spring可以直接注入相应的属性,如下所例:1.AClass类 package com.bijian.spring.test4;public class AClass {private String a;private String b;public String getA() {return a;}public void setA(String a) {…

jsp页面中空格字符的表示

空格字符-->不写为“&nbsp”,而写为“ ”。前者ie可以识别,但chrome不识别。转载于:https://www.cnblogs.com/chickenrun/archive/2012/10/23/2735765.html

react虚拟DOM,JSX和React.creatElement

虚拟DOM 1.什么是虚拟DOM? 虚拟dom是一个js对象,来表示真实的DOM节点,最终是根据这个js对象来渲染到真实的DOM上。 当状态改变时,首先先更新js对象,然后通过diff算法对比新旧虚拟DOM节点,然后更新到真实的…