| <!doctype html> |
| <html> |
| |
| <head> |
| <meta charset="utf-8"> |
| <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" /> |
| <meta name="format-detection" content="telephone=no,email=no,date=no,address=no"> |
| <link rel="stylesheet" type="text/css" href="css/aui.css" /> |
| <link rel="stylesheet" type="text/css" href="css/weui.min.css"> |
| <link rel="stylesheet" type="text/css" href="css/jquery-weui.min.css"> |
| <link rel="stylesheet" type="text/css" href="css/index.css" /> |
| <link rel="stylesheet" type="text/css" href="css/aui-slide.css"> |
| <style type="text/css"> |
| .aui-slide-node { |
| /*background: transparent!important;*/ |
| } |
| body{ |
| background-color: #FFFFFF; |
| } |
| .ul{ |
| list-style: none; |
| display: flex; |
| /* flex-direction: column; */ |
| justify-content: space-between; |
| text-align: center; |
| margin-top: 50%; |
| } |
| .li{ |
| width: 45%; |
| line-height: 50px; |
| background-color: #3599FB; |
| color: #FFFFFF; |
| } |
| .header{ |
| display: felx; |
| justify-content: center; |
| padding: 15px; |
| background-color:#3599FB ; |
| color: white; |
| text-align: center; |
| position: relative; |
| } |
| img{ |
| position: absolute; |
| left: 10px; |
| top: 50%; |
| width: 20px; |
| transform: translateY(-50%); |
| } |
| </style> |
| </head> |
| <body> |
| <div id="" class="header"> |
| <img src="img/back.png" id="img"> |
| <span>二维码分享</span> |
| </div> |
| <ul class="ul"> |
| <li class="li" id="shareqq">qq分享</li> |
| <li class="li" id="sharewx">微信分享</li> |
| </ul> |
| </body> |
| <script type="text/javascript" src="cordova.js"></script> |
| <script type="text/javascript" src="js/lib/jquery-2.1.4.js"></script> |
| <script type="text/javascript" src="js/lib/aui-tab.js"></script> |
| <script type="text/javascript" src="js/lib/aui-dialog.js"></script> |
| <script type="text/javascript" src="js/lib/aui-slide.js"></script> |
| <script type="text/javascript" src="js/server.js"></script> |
| <script type="text/javascript" src="js/mainmenu.js"></script> |
| <script type="text/javascript"> |
| var img = document.getElementById("img"); |
| var shareqq = document.getElementById("shareqq"); |
| var sharewx = document.getElementById("sharewx"); |
| img.onclick = function(){ |
| window.location = "main.html" |
| } |
| shareqq.onclick = function() { |
| var args = {}; |
| args.client = QQSDK.ClientType.QQ; //QQSDK.ClientType.QQ,QQSDK.ClientType.TIM; |
| args.scene = QQSDK.Scene.QQ; //QQSDK.Scene.QQZone,QQSDK.Scene.Favorite |
| args.url = 'https://cordova.apache.org/'; |
| args.title = '大理App分享'; |
| args.description = '访客二维码'; |
| args.image = 'https://cordova.apache.org/static/img/cordova_bot.png'; |
| QQSDK.shareNews(function() { |
| alert('分享成功'); |
| }, function(failReason) { |
| alert(failReason); |
| }, args); |
| } |
| sharewx.onclick = function() { |
| Wechat.share({ |
| message: { |
| title: "大理App分享", |
| description: "访客二维码", |
| thumb: "www/img/thumbnail.png", |
| media: { |
| type: Wechat.Type.LINK, |
| webpageUrl: "http://www.jason-z.com" |
| } |
| }, |
| scene: Wechat.Scene.SESSION // share to Timeline |
| }, function () { |
| alert("分享成功"); |
| }, function (reason) { |
| alert("Failed: " + reason); |
| }); |
| } |
| </script> |
| </html> |