Authored by hf

code review by hf: do add newyear weixin share js

  1 +<?php return function ($in, $debugopt = 1) {
  2 + $cx = array(
  3 + 'flags' => array(
  4 + 'jstrue' => false,
  5 + 'jsobj' => false,
  6 + 'spvar' => true,
  7 + 'prop' => false,
  8 + 'method' => false,
  9 + 'mustlok' => true,
  10 + 'echo' => false,
  11 + 'debug' => $debugopt,
  12 + ),
  13 + 'constants' => array(),
  14 + 'helpers' => array(),
  15 + 'blockhelpers' => array(),
  16 + 'hbhelpers' => array(),
  17 + 'partials' => array(),
  18 + 'scopes' => array(),
  19 + 'sp_vars' => array('root' => $in),
  20 + 'lcrun' => 'Plugin\LCRun3',
  21 +
  22 + );
  23 +
  24 + return '<!DOCTYPE html>
  25 +<html>
  26 +<head>
  27 + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  28 + <meta charset="utf-8">
  29 + <title>'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('staticTitle')), ENT_QUOTES, 'UTF-8').'</title>
  30 + <meta name="apple-mobile-web-app-title" content="SUMMER SALE">
  31 + <meta name="format-detection" content="telephone=no">
  32 + <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=no,minimal-ui" media="(device-height: 568px)">
  33 + <meta name="apple-mobile-web-app-capable" content="yes">
  34 + <meta name="apple-mobile-web-app-status-bar-style" content="grey">
  35 + <link rel="stylesheet" href="'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('imgUrl')), ENT_QUOTES, 'UTF-8').'/cuxiao/css/christmas/index4.css">
  36 + <script>
  37 + (function(doc, win) {
  38 + var docEl = doc.documentElement;
  39 + (function() {
  40 + var clientWidth = docEl.clientWidth;
  41 + if (!clientWidth) {
  42 + return;
  43 + }
  44 + docEl.style.fontSize = 20 * (clientWidth / 320) + \'px\';
  45 + }());
  46 + })(document, window);
  47 + </script>
  48 +</head>
  49 +<body class="keBody">
  50 +<div class="coupon-christmas" show="'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('showPopupFlag')), ENT_QUOTES, 'UTF-8').'">
  51 + <div class="coupon-top">
  52 + <img src="'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('imgUrl')), ENT_QUOTES, 'UTF-8').'/cuxiao/img/newyear/top-bg.png" alt="">
  53 + <a class="go-check" href="'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('myCouponUrl')), ENT_QUOTES, 'UTF-8').'"></a>
  54 + <a class="share-btn" href="javascript:;"></a>
  55 + </div>
  56 + <div class="coupon-bottom">
  57 + <div class="coupon-banner">
  58 + <a href="'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('bannerUrl_1')), ENT_QUOTES, 'UTF-8').'">
  59 + <img src="'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('imgUrl')), ENT_QUOTES, 'UTF-8').'/cuxiao/img/newyear/banner01.png" alt="">
  60 + </a>
  61 + <a href="'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('bannerUrl_2')), ENT_QUOTES, 'UTF-8').'">
  62 + <img src="'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('imgUrl')), ENT_QUOTES, 'UTF-8').'/cuxiao/img/newyear/banner02.png" alt="">
  63 + </a>
  64 + <a href="'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('bannerUrl_3')), ENT_QUOTES, 'UTF-8').'">
  65 + <img src="'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('imgUrl')), ENT_QUOTES, 'UTF-8').'/cuxiao/img/newyear/banner03.png" alt="">
  66 + </a>
  67 + <a href="'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('bannerUrl_4')), ENT_QUOTES, 'UTF-8').'">
  68 + <img src="'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('imgUrl')), ENT_QUOTES, 'UTF-8').'/cuxiao/img/newyear/banner04.png" alt="">
  69 + </a>
  70 + </div>
  71 + <div class="bottom-btn">
  72 + <a class="follow-yoho" href="http://mp.weixin.qq.com/s?__biz=MjM5ODI5MDA4MA==&amp;mid=201849402&amp;idx=1&amp;sn=c0089812f9769d82e0075f69d771f6e1#rd"></a>
  73 + <a class="download-yoho" href="http://a.app.qq.com/o/simple.jsp?pkgname=com.yoho&amp;g_f=995445"></a>
  74 + </div>
  75 +
  76 + </div>
  77 + <div class="coupon-ft">
  78 + <img src="'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('imgUrl')), ENT_QUOTES, 'UTF-8').'/cuxiao/img/newyear/14.png">
  79 + </div>
  80 +</div>
  81 +<div class="modal"></div>
  82 +<div class="dialog-box geted">
  83 + <div class="dialog-inner">
  84 + <img src="'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('imgUrl')), ENT_QUOTES, 'UTF-8').'/cuxiao/img/newyear/geted.png" alt=""/>
  85 + <span class="dialog-close"></span>
  86 + </div>
  87 +</div>
  88 +
  89 +<div class="dialog-box fail">
  90 + <div class="dialog-inner">
  91 + <img src="'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('imgUrl')), ENT_QUOTES, 'UTF-8').'/cuxiao/img/newyear/fail.png" alt=""/>
  92 + <span class="refresh-btn"></span>
  93 + </div>
  94 +</div>
  95 +<input id="shareLink" type="hidden" value="'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('shareLink')), ENT_QUOTES, 'UTF-8').'">
  96 +<input id="shareImg" type="hidden" value="'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('shareImg')), ENT_QUOTES, 'UTF-8').'">
  97 +<input id="shareTitle" type="hidden" value="'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('shareTitle')), ENT_QUOTES, 'UTF-8').'">
  98 +<input id="shareDesc" type="hidden" value="'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('shareDesc')), ENT_QUOTES, 'UTF-8').'">
  99 +<script type="text/javascript" src="'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('imgUrl')), ENT_QUOTES, 'UTF-8').'/cuxiao/js/jquery.min.js"></script>
  100 +<script>
  101 + //提示分享
  102 + $(\'.share-btn\').click(function () {
  103 + $(\'.modal\').fadeIn();
  104 + });
  105 + //关闭提示分享
  106 + $(\'.modal\').click(function () {
  107 + $(this).fadeOut();
  108 + });
  109 +
  110 + //提示已领过券
  111 + if ($(\'.coupon-christmas\').attr(\'show\') === \'1\') {
  112 + $(\'.dialog-box.geted\').show();
  113 + }
  114 + //提示领券失败
  115 + else if ($(\'.coupon-christmas\').attr(\'show\') === \'2\') {
  116 + $(\'.dialog-box.fail\').show();
  117 + }
  118 +
  119 + //关闭提示
  120 + $(\'.dialog-close\').click(function(){
  121 + $(this).parents(\'.dialog-box\').fadeOut();
  122 + });
  123 + //刷新页面
  124 + $(\'.refresh-btn\').click(function() {
  125 + location.reload();
  126 + });
  127 +</script>
  128 +'.((Plugin\LCRun3::ifvar($cx, Plugin\LCRun3::v($cx, $in, array('weixinShare')))) ? '<script type="text/javascript" charset="utf-8" src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
  129 +<script type="text/javascript" charset="utf-8" src="'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('jsUrl')), ENT_QUOTES, 'UTF-8').'/cuxiao/js/share.weixin.js"></script>
  130 +' : '').''.'<!-- Google Tag Manager -->
  131 +<noscript><iframe src="//www.googletagmanager.com/ns.html?id=GTM-W958MG" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
  132 +<script>
  133 + (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({\'gtm.start\':
  134 + new Date().getTime(),event:\'gtm.js\'});var f=d.getElementsByTagName(s)[0],
  135 + j=d.createElement(s),dl=l!=\'dataLayer\'?\'&l=\'+l:\'\';j.async=true;j.src=
  136 + \'//www.googletagmanager.com/gtm.js?id=\'+i+dl;f.parentNode.insertBefore(j,f);
  137 + })(window,document,\'script\',\'dataLayer\',\'GTM-W958MG\');
  138 +</script>
  139 +<!-- End Google Tag Manager -->
  140 +<script type="text/javascript">
  141 + var _hmt = _hmt || [];
  142 + (function() {
  143 + var hm = document.createElement("script");
  144 + hm.src = "//hm.baidu.com/hm.js?c6ee7218b8321cb65fb2e98f284d8311";
  145 + var s = document.getElementsByTagName("script")[0];
  146 + s.parentNode.insertBefore(hm, s);
  147 + })();
  148 +</script>
  149 +<script>
  150 + var _hmt = _hmt || [];
  151 + (function() {
  152 + var hm = document.createElement("script");
  153 + hm.src = "//hm.baidu.com/hm.js?65dd99e0435a55177ffda862198ce841";
  154 + var s = document.getElementsByTagName("script")[0];
  155 + s.parentNode.insertBefore(hm, s);
  156 + })();
  157 +</script>
  158 +'.'</body>
  159 +</html>';
  160 +}
  161 +?>