全球主机交流论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

CeraNetworks网络延迟测速工具IP归属甄别会员请立即修改密码
查看: 10541|回复: 15
打印 上一主题 下一主题

哪位大佬给一份从微信引导跳转到外部浏览器的html

[复制链接]
跳转到指定楼层
1#
发表于 2018-5-1 18:25:50 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
200金钱
百度找了找没有发现完整的,谁有完整的,给一份,谢谢。有200金送上。

重新描述一下

微信打开网站,点击按钮或不点击都行,指引到右上角,跳转到外部浏览器打开下载。

最佳答案

查看完整内容

要删除或者注释这段. 这个是为了让你在浏览器上测试, 删除之后只会在微信中提示了.
2#
发表于 2018-5-1 18:25:51 | 只看该作者
baidu 发表于 2018-5-1 19:02
按钮有点小,遮罩字也有点小,跳到浏览器,再按一下按钮,还提示遮罩
  1.                 // 下面这段实际环境中注释
  2.                 isWeixin = 1;
复制代码

要删除或者注释这段. 这个是为了让你在浏览器上测试, 删除之后只会在微信中提示了.
3#
发表于 2018-5-1 18:27:17 | 只看该作者
看到过你说的那种   微信里打开有一个提示 叫你点右上角在浏览器里打开 。。。好像都是iphone吧
4#
发表于 2018-5-1 18:28:39 来自手机 | 只看该作者
安卓都有
5#
 楼主| 发表于 2018-5-1 18:28:48 | 只看该作者
leaveoff 发表于 2018-5-1 18:27
看到过你说的那种   微信里打开有一个提示 叫你点右上角在浏览器里打开 。。。好像都是iphone吧 ...

这个很普遍呀,安卓很多。
6#
发表于 2018-5-1 18:30:22 | 只看该作者
额, 两个优惠券站都做了这个判断. 用js判断ua然后个给提示.
  1. http://m.soquanme.com/quan/7964975.html
复制代码

是这种功能么?
7#
 楼主| 发表于 2018-5-1 18:32:22 | 只看该作者
sora 发表于 2018-5-1 18:30
额, 两个优惠券站都做了这个判断. 用js判断ua然后个给提示.

是这种功能么? ...

对,就是这种。简单点的。
8#
发表于 2018-5-1 18:34:00 | 只看该作者
baidu 发表于 2018-5-1 18:32
对,就是这种。简单点的。

嗯. 那等等, 好久以前搞的. 都忘了. 提取出来发给你.
9#
发表于 2018-5-1 18:43:22 | 只看该作者
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4.         <meta charset="UTF-8">
  5.         <title>微信</title>
  6.         <style type="text/css">
  7.                 #c {
  8.                         width: 100px;
  9.                         height: 60px;
  10.                         line-height: 60px;
  11.                         text-align: center;
  12.                         background-color: #19b955;
  13.                         color: #fff;
  14.                         cursor: pointer;
  15.                 }
  16.                 #weixinbuy {
  17.                         display: none;
  18.                         background-color: rgba(0,0,0,0.9);
  19.                         width: 100%;
  20.                         height: 100%;
  21.                         z-index: 99999;
  22.                         position: fixed;
  23.                         left: 0;
  24.                         bottom: 0;
  25.                         overflow: hidden;
  26.                         text-align: left;
  27.                 }
  28.                 #weixinbuy #weixinbuy_d {
  29.                         margin: 10% auto 0;
  30.                         z-index: 999999;
  31.                 }
  32.                 #weixinbuy_d div {
  33.                         line-height: 50px;
  34.                         color: #fff;
  35.                         font-size: 20px;
  36.                         text-align: center;
  37.                 }
  38.                 #weixinbuy_d .weixinbuy_d_msg {
  39.                         width: 69px;
  40.                         height: 50px;
  41.                         position: fixed;
  42.                         top: 5px;
  43.                         right: 15px;
  44.                         background: url("http://m.soquanme.com/style/images/wx_t.png") no-repeat center center;
  45.                 }
  46.                 #weixinbuy_d .weixinbuy_d_msg1 {
  47.                         margin-top: 15%;
  48.                         font-size: 16px;
  49.                 }
  50.                 #weixinbuy_d .weixinbuy_d_msg2 {
  51.                         margin-top: 2%;
  52.                 }
  53.                 #weixinbuy_d .weixinbuy_d_img2 {
  54.                         height: 80px;
  55.                         background: url("http://m.soquanme.com/style/images/wx_d.png") no-repeat center center;
  56.                 }
  57.                 #weixinbuy_d .weixinbuy_d_msg3 {
  58.                         margin-top: 2%;
  59.                 }
  60.                 #weixinbuy_d .weixinbuy_d_img3 {
  61.                         height: 76px;
  62.                         background: url("http://m.soquanme.com/style/images/wx_b.png") no-repeat center center;
  63.                 }
  64.         </style>
  65.         <script type="text/javascript" src="http://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
  66.         <script type="text/javascript">
  67.                 var userAgentInfo = navigator.userAgent;
  68.                 var isWeixin =  !!/MicroMessenger/i.test(userAgentInfo);
  69.                 // 下面这段实际环境中注释
  70.                 isWeixin = 1;
  71.                 $(function(){
  72.                         if(isWeixin){
  73.                                 $('<div id="weixinbuy"><div id="weixinbuy_d"><div class="weixinbuy_d_msg"></div><div class="weixinbuy_d_msg1">亲,淘宝、天猫的页面无法在微信中打开</div><div class="weixinbuy_d_msg2">请复制淘口令在手机淘宝中购买</div><div class="weixinbuy_d_msg2">或在右上角点击 “┇” 按钮</div><div class="weixinbuy_d_img2"></div><div class="weixinbuy_d_msg3">选择 “在浏览器中打开”</div><div class="weixinbuy_d_img3"></div></div></div>').click(function(){
  74.                                         $(this).removeAttr("style");
  75.                                 }).appendTo("body");
  76.                                
  77.                                 $("#c").click(function(){
  78.                                         $("#weixinbuy").show();
  79.                                 });
  80.                         }
  81.                 });
  82.         </script>
  83. </head>
  84. <body>
  85.         <div id="c">点击提示</div>
  86. </body>
  87. </html>
复制代码


看看能不能用.
10#
 楼主| 发表于 2018-5-1 19:02:54 | 只看该作者
sora 发表于 2018-5-1 18:43
看看能不能用.

按钮有点小,遮罩字也有点小,跳到浏览器,再按一下按钮,还提示遮罩
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|全球主机交流论坛

GMT+8, 2024-5-18 22:31 , Processed in 0.064796 second(s), 7 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表