123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169 |
- <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
- <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
- <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
- <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
- <%
- String path = request.getContextPath();
- String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort() + path+"/";
- request.setAttribute("contextPath", basePath);
-
- String redirectUrl= request.getParameter("redirectUrl");
- request.setAttribute("redirectUrl", redirectUrl);
- %>
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
- <meta name="apple-mobile-web-app-capable" content="yes">
- <meta name="apple-mobile-web-app-status-bar-style" content="black">
- <meta name="format-detection" content="telephone=no">
- <title>邀请好友</title>
- <%-- <script type="text/javascript" src="${contextPath }res/js/jquery.min.js"></script> --%>
- <script src="${contextPath }app/lib/flexible.js"></script>
- <link rel="stylesheet" href="${contextPath }app/lib/flexible.css">
- <link rel="stylesheet" href="${contextPath }app/css/basem.css">
- <link rel="stylesheet" href="${contextPath }app/css/logome.css">
- <link rel="stylesheet" href="${contextPath }app/css/share.min.css">
- <style type="text/css">
- .social-share .social-share-icon {
- width:1.2rem;
- height:1.2rem;
- font-size:0.8rem;
- line-height:1.2rem;
- }
-
- </style>
- </head>
- <body>
- <input type="hidden" id="invitecode" name="invitecode" style="visibility:hidden">${USER.invitecode}</input>
- <div class="titbox blubg">
- <a class="titreturn left" href="${contextPath }web/meWebCtl/me.cs"><img src="${contextPath }app/img/fanhui16@2x.png" alt=""></a>
- <h1>邀请好友</h1>
- </div>
- <div class="meinvibox top50">
- <div class="meinvitit">
- <h2 class="whtxt">我的二维码</h2>
- <img src="${contextPath }app/img/xianm@2x.png" alt="">
- </div>
- <div class="merweima">
- <img src="${IMG_URL}" alt="">
- </div>
- <h2 class="whtxt">分享二维码</h2>
- <ul class="meinviul">
- <li class="row">
- <div id="share-2"></div>
- </li>
- </ul>
- </div>
-
- <div id="weixin-tip" style="display:none;position:fixed;left:0;top:0;background: rgba(0,0,0,0.8);filter: alpha(opacity=80);width: 100%;height: 100%;z-index: 100;">
- <p style="text-align: center;margin-top: 10%;padding: 0 5%;position: relative;">
- <img src="${contextPath }app/img/live_weixin.png" width="100%" alt="微信打开" style=" vertical-align: middle;">
- <span id="close" style="opacity: .2;float: right;color: #FFFFFF;font-size: 40px; padding: 5px;font: bold 20px/24px simsun;text-shadow: 0 1px 0 #ddd;position: absolute;top: 0;left: 5%;" class="close"> ×</span>
- </p>
- </div>
- <script src="http://apps.bdimg.com/libs/jquery/1.8.2/jquery.js"></script>
- <script src="${contextPath }app/js/jquery.share.js"></script>
- <script src="http://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
- <script type="text/javascript">
- //一键分享相关配置
- var $config = {
- url :'<%=basePath%>app/login/register.jsp?code=${USER.invitecode}',// 网址,默认使用 window.location.href
- source : '<%=basePath%>app/login/register.jsp?code=${USER.invitecode}', // 来源(QQ空间会用到), 默认读取head标签:<meta name="site" content="http://overtrue" />
- title : '我在东旭通,喊您来加入!', // 标题,默认读取 document.title 或者 <meta name="title" content="share.js" />
- description : '下载东旭通,共享179.5亿品牌价值,成交赚取高额佣金,尊享超级VIP服务。', // 描述, 默认读取head标签:<meta name="description" content="PHP弱类型的实现原理分析" />
- image : '', // 图片, 默认取网页中第一个img标签
- sites : ['qzone', 'qq', 'weibo','wechat'], // 启用的站点
- disabled : ['google', 'facebook', 'twitter'], // 禁用的站点
- wechatQrcodeTitle : '微信扫一扫:分享', // 微信二维码提示文字
- wechatQrcodeHelper : '<p>微信里点“发现”,扫一下</p><p>二维码便可将本文分享至朋友圈。</p>',
- target : '_blank' //打开方式
- };
- $('#share-2').share($config);//{sites: ['qzone', 'qq', 'weibo','wechat']}
- </script>
- <script type="text/javascript">
- $(function() {
- //判断是否是外部浏览器还是内部浏览器
- //如果是外部浏览器支付宝支付如果是内部浏览器支付宝确认支付按钮跳出
- var wechatInfo = navigator.userAgent.match(/MicroMessenger\/([\d\.]+)/i) ;
- //外部浏览器
- if(wechatInfo ) {
- if ( wechatInfo[1] < "5.0" ) {
- alert("仅支持微信5.0以上版本") ;
- }else{
- //微信浏览器提示tip
- $(".wechat-qrcode").remove();
- }
- }
-
- $('#close').click(function() {
- $("#weixin-tip").hide();
- });
- $('.icon-wechat').click(function() {
- //判断是否是外部浏览器还是内部浏览器
- //如果是外部浏览器支付宝支付如果是内部浏览器支付宝确认支付按钮跳出
- var wechatInfo = navigator.userAgent.match(/MicroMessenger\/([\d\.]+)/i) ;
- //外部浏览器
- if(wechatInfo) {
- if ( wechatInfo[1] < "5.0" ) {
- alert("仅支持微信5.0以上版本") ;
- }else{
- //微信浏览器提示tip
- $("#weixin-tip").show();
- }
- }
- });
-
- // 微信分享函数
- $.ajax({ url:"<%=basePath%>web/wx_share/getwxconfig.cs",
- data:{signaurl:location.href},
- dataType:'json',
- type:'post',
- success:function(data){
- wx.config({
- debug: false,
- appId:data.appid,
- timestamp:data.timestamp,
- nonceStr:data.noncestr,
- signature:data.signature,
- jsApiList:['checkJsApi','onMenuShareTimeline','onMenuShareAppMessage']
- });
- wx.ready(function(){
- //获取“分享到朋友圈”按钮点击状态及自定义分享内容接口
- wx.onMenuShareTimeline({
- title: "我在东旭通,喊您来加入!", // 分享标题
- link:"<%=basePath%>app/login/register.jsp?code=${USER.invitecode}", // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
- imgUrl:"${contextPath }app/img/logo@2x.png", // 分享图标
- success: function () {
- window.location.href=window.location.href;
- },
- cancel: function () {
- // 用户取消分享后执行的回调函数
- }
- });
- //获取“分享给朋友”按钮点击状态及自定义分享内容接口
- wx.onMenuShareAppMessage({
- title: "我在东旭通,喊您来加入!", // 分享标题
- desc: "下载东旭通,共享179.5亿品牌价值,成交赚取高额佣金,尊享超级VIP服务。", // 分享描述
- link:"<%=basePath%>app/login/register.jsp?code=${USER.invitecode}", // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
- imgUrl: "${contextPath }app/img/logo@2x.png", // 分享图标
- type: '', // 分享类型,music、video或link,不填默认为link
- dataUrl: '', // 如果type是music或video,则要提供数据链接,默认为空
- success: function () {
- // 用户确认分享后执行的回调函数
- window.location.href=window.location.href;
- },
- cancel: function () {
- // 用户取消分享后执行的回调函数
- }
- });
-
- });
- }
- });
- })
-
- </script>
- </body>
- </html>
|