直接上效果
上代码
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>web调起客户端</title>
</head>
<style>
*{
margin: 0;
padding: 0;
}
body{
width: 100vw;
height: 100vh;
}
button{
width: 120px;
height: 45px;
margin: 300px 45%;
border: none;
border-radius: 6px;
transition: all 0.5s;
}
button:hover{
background-color: rgba(12, 135, 255, 1);
color: #fff;
}
</style>
<body>
<button onclick="fn()">调起客户端</button>
</body>
<script>
function fn() {
// const url = "WxRemoteMain://?ip=" + ip + "&" + getToken(); //可传参
// WxRemoteMain // 打开客户端名称
const url = "WxRemoteMain://";
self.location.href = url;
}
</script>
</html>