123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132 |
- <?php if(!defined('PHPOK_SET')){die('<h3>Error...</h3>');}?><footer class="foot"><a href="<?php echo $_sys[siteurl];?>">© Powered by <?php echo $_sys[copyright];?></a></footer>
- <script src="http://g.tbcdn.cn/kissy/k/1.4.0/seed.js"></script>
- <script src="js/mod.jjr.js"></script>
- <script src="js/jquery-1.8.2.min.js" type="text/javascript"></script>
- <script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
- <script type="text/javascript">
- $(document).ready(function(){
- var urlGetQuery=GetQueryString("c");
- //alert(urlGetQuery);//tpl/www//images/home.png
- if(urlGetQuery !=null && urlGetQuery.toString().length>1){
- $("#"+urlGetQuery+" img").attr("src","tpl/www//images/"+urlGetQuery+"1.png");
- }
- });
- var _Conf = {
- img: "<?php echo $_sys[siteurl];?><?php echo $_sys[wx_logo];?>",
- w: 100,
- h: 100,
- url: '<?php if($_SESSION["user_id"]){?><?php echo $_sys[siteurl];?><?php echo HOME_PAGE;?>?c=home&ruid=<?php echo $_SESSION["user_id"];?><?php }else{ ?><?php echo $_sys[wx_link];?><?php } ?>',
- title: "<?php echo $_sys[wx_title];?>",
- desc: "<?php echo $_sys[wx_description];?>",
- appid: '<?php if($_SESSION["appid"]){?><?php echo $_SESSION["appid"];?><?php }else{ ?><?php echo $_sys[Appid];?><?php } ?>' };
- function _ShareFriend() {
- WeixinJSBridge.invoke('sendAppMessage',{
- 'appid': _Conf.appid,
- 'img_url': _Conf.img,
- 'img_width': _Conf.w,
- 'img_height': _Conf.h,
- 'link': _Conf.url,
- 'desc': _Conf.desc,
- 'title': _Conf.title
- }, function(res){
- if(res.err_msg=="send_app_msg:ok"){
- var pars = "";
- var parsprams = "";
- var randomcode = Math.random() * 100000;
- parsprams = pars + "&code=" + randomcode + "&f=updategroup";
- $.ajax({
- url: 'index.php?c=home',
- type: "Get",
- data: parsprams,
- beforeSend: function () { },
- success: function (state) {
- alert(state);
- }
- });
- }
- _report('send_msg', res.err_msg);
- })
- }
- function _ShareTL() {
- WeixinJSBridge.invoke('shareTimeline',{
- 'img_url': _Conf.img,
- 'img_width': _Conf.w,
- 'img_height': _Conf.h,
- 'link': _Conf.url,
- 'desc': _Conf.desc,
- 'title': _Conf.title
- }, function(res) {
- if(res.err_msg=="share_timeline:ok"){
- var pars = "";
- var parsprams = "";
- var randomcode = Math.random() * 100000;
- parsprams = pars + "&code=" + randomcode + "&f=updategroup";
- $.ajax({
- url: 'index.php?c=home',
- type: "Get",
- data: parsprams,
- beforeSend: function () { },
- success: function (state) {
- alert(state);
- }
- });
- }
- _report('timeline', res.err_msg);
- });
- }
- function _ShareWB() {
- WeixinJSBridge.invoke('shareWeibo',{
- 'content': _Conf.desc,
- 'url': _Conf.url,
- }, function(res) {
-
- if(res.err_msg=="share_weibo:ok"){
- var pars = "";
- var parsprams = "";
- var randomcode = Math.random() * 100000;
- parsprams = pars + "&code=" + randomcode + "&f=updategroup";
- $.ajax({
- url: 'index.php?c=home',
- type: "Get",
- data: parsprams,
- beforeSend: function () { },
- success: function (state) {
- alert(state);
- }
- });
- }
- _report('weibo', res.err_msg);
- });
- }
- // 当微信内置浏览器初始化后会触发WeixinJSBridgeReady事件。
- document.addEventListener('WeixinJSBridgeReady', function onBridgeReady() {
- //隐藏下方工具栏,需要显示顶部导航栏,请把hideToolbar换成showToolbar
- WeixinJSBridge.call('showToolbar');
- //隐藏右上角菜单,需要显示请把hideOptionMenu换成showOptionMenu
- WeixinJSBridge.call('showOptionMenu');
- // 发送给好友
- WeixinJSBridge.on('menu:share:appmessage', function(argv){
- _ShareFriend();
- });
- // 分享到朋友圈
- WeixinJSBridge.on('menu:share:timeline', function(argv){
- _ShareTL();
- });
- // 分享到微博
- WeixinJSBridge.on('menu:share:weibo', function(argv){
- _ShareWB();
- });
- }, false);
- </script>
- <div id="fixed">
- <ul id="fixed-foot">
- <li id="index" class="border-right-none"><a href="<?php echo site_url('index');?>"><img src="tpl/www//images/home.png" width="60px" height="60px" style=" padding-bottom:0px; margin-left:30px;"/></a></li>
- <li id="customer" class="border-right-none"><a href="<?php echo site_url('customer');?>"><img src="tpl/www//images/customer.png" width="60px" height="60px" style=" padding-bottom:0px; margin-left:30px;"/></a></li>
- <li id="personal" class="border-right-none"><a href="<?php echo site_url('personal');?>"><img src="tpl/www//images/Personal.png" width="60px" height="60px" style=" padding-bottom:0px; margin-left:30px;"/></a></li>
- </ul>
- </div>
- </body>
- </html>
|