123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500 |
- <style>
- .button {
- cursor: pointer;
- }
- </style>
- <{if $type == 'share'}>
- <link rel="stylesheet" type="text/css" href="<{$web_cfg.cdn}>/haili/css/detail.css" />
- <section class="profile">
- <section class="avatar">
- <img src="<{$userSourceInfo.headimgurl}>">
- <span><{$userSourceInfo.nickname}></span>
- </section>
- <dl class="card">
- <dd>参与活动 <{$info.events_name}>,邀请您来加油!</dd>
- <dt><img src="<{$info.img_url}>"></dt>
- </dl>
- <section class="button-wrapper">
- <{if $uid == $source_user}>
- <a class="button yaoqing" node-type="share">邀请好友助力!</a>
- <{else}>
- <a class="button" href="javascript:;" onclick="help();">为好友助力!</a>
- <a class="button" href="<{$thisUrl}>">我也要参加!</a>
- <{/if}>
- </section>
- <section class="friends">
- <p>已助力好友<span><{$helpDataTotal}></span>人</p>
- <{if $helpData}>
- <ul>
- <{foreach from=$helpData item=v}>
- <li><img src="<{$v.headimgurl}>"></li>
- <{/foreach}>
- </ul>
- <{/if}>
- </section>
- </section>
- <section class="applycont">
- <{if $info.operationt_tips}>
- <h2><{$info.operationt_tips}></h2>
- <{/if}>
- <section class="summary">
- <{$info.events_rules}>
- </section>
- </section>
- <{if $focusData}>
- <section class="recommend">
- <ul>
- <{foreach from=$focusData item=v}>
- <li><a href="<{$v.link}>"><img src="<{$v.pic}>"></a></li>
- <{/foreach}>
- </ul>
- </section>
- <{/if}>
- <{if $ad}>
- <section class="ad">
- <h2><span>广告</span></h2>
- <{$ad}>
- </section>
- <{/if}>
- <script>
- share_url = '<{$info.thisUrl}>/share?events_id=<{$info.id}>&help_id=<{$help_id}>&help_session=<{$help_session}>&source_user=<{$source_user}>';
- function help()
- {
- var url = '<{$web_cfg.domain}>/?c=UserHelp&a=apply';
- $.getJSON(url, {events_id:'<{$info.id}>', help_id:'<{$help_id}>', help_session:'<{$help_session}>', source_user:'<{$source_user}>'}, function(t)
- {
- if (t.ok) {
- toast('助力成功!', false);
- } else {
- toast(t.msg, 1);
- }
- });
- }
- ;(function($){
- $('body').on('click','[node-type="share"]',function(){
- if(navigator.userAgent.toLocaleLowerCase().indexOf('micromessenger') >-1){
- $('body').append(`<section class="layer" id="sharelayer" style="display:block;">
- <section class="shareguide">
- <img src="http://circlecdn.mrhi.cn/haili/images/8eaa4804.shareguide.png">
- </section>
- </section>`)
- $('#sharelayer').on('click',function(){
- $(this).remove();
- })
- }
- })
- })(Zepto)
- </script>
- <script type="text/javascript" src="<{$web_cfg.cdn}>/haili/js/detail.js"></script>
- <{elseif $type == 'prize'}>
- <{if $userEventsData}>
- <section id="tab2" class="tabcont" style="display:block;">
- <section class="userlist">
- <ul id="lazyLoad">
- <{foreach from=$userEventsData item=v}>
- <li><img src="<{$web_cfg.cdn}>/public/static/img/bg_alpha.png" data-ks-lazyload="<{$v.user.headimgurl}>" width="80" height="80"><span>用户 <{$v.user.mobile}> 在 <{$v.user.cdate}> 获得 <{$v.user.events}> <{$v.user.ext}>。</span></li>
- <{/foreach}>
- </ul>
- </section>
- </section>
- <div class="clear"></div>
- <div class="loading">
- <img
- id="loadPage"
- src="<{$web_cfg.cdn}>/public/static/img/loading.gif"
- data-ks-lazyload="<{$web_cfg.cdn}>/public/static/img/loading.gif"
- data-request-url="<{$info.thisUrl}>/prize?ajax=ajax"
- data-page="2"
- data-totals="<{$userEventsDataTotals}>"
- style="width:0px;"
- />
-
- <div class="loader-inner ball-pulse">
- <div></div><div></div><div></div><div></div><div></div><div></div>
- </div>
-
- </div>
- <script>
- KISSY.use('node, io, gallery/datalazyload/2.0/index', function (S, Node, IO, Datalazyload) {
- var lock = false;
- new Datalazyload({
- load: function(el){
- el = '#loadPage';
- if (lock) return false;
- lock = true;
-
- var requesrUrl = $(el).data('request-url');
- var page = Number($(el).data('page'));
- var totals = Number($(el).data('totals'));
- if (!requesrUrl) {
- return false;
- }
- if (page > totals) {
- $('.loading').hide();
- return false;
- }
-
- IO.get(
- requesrUrl
- , {page: page}
- , function (data) {
- if (data.ok) {
- var next_page = page + 1;
- $('#loadPage').data('page', next_page);
- $("#lazyLoad").append(data.msg);
- lock = false;
- $('.loading').hide();
- new Datalazyload();
- if (next_page > totals) {
- $('.up_icon').hide();
- }
- }
- }
- , 'json'
- );
- }
- });
- });
- //有产品列表时添加整体body背景色
- $(body).addClass("bg_white");
- </script>
- <{/if}>
- <{elseif $type == 'help'}>
- <{if $helpData}>
- <section id="tab4" class="tabcont" style="display:block;">
- <section class="zhulilist">
- <ul id="lazyLoad">
- <{foreach from=$helpData item=v}>
- <li>
- <div>
- <{if $userDatas[$v.uid].headimgurl}>
- <img src="<{$web_cfg.cdn}>/public/static/img/bg_alpha.png" data-ks-lazyload="<{$userDatas[$v.uid].headimgurl}>" />
- <{else}>
- <img src="<{$web_cfg.cdn}>/public/static/img/bg_alpha.png" data-ks-lazyload="http://news.mydrivers.com/Img/20110518/04481549.png" />
- <{/if}><span><{if $userDatas[$v.uid].nickname}><{$userDatas[$v.uid].nickname}><{else}>游客<{/if}></span>
- </div>
- <div><span>助力值<{$v.num}></span></div>
- </li>
- <{/foreach}>
- </ul>
- </section>
- </section>
- <div class="clear"></div>
- <div class="loading">
- <img
- id="loadPage"
- src="<{$web_cfg.cdn}>/public/static/img/loading.gif"
- data-ks-lazyload="<{$web_cfg.cdn}>/public/static/img/loading.gif"
- data-request-url="<{$info.thisUrl}>/help?ajax=ajax"
- data-page="2"
- data-totals="<{$helpDataTotals}>"
- style="width:0px;"
- />
-
- <div class="loader-inner ball-pulse">
- <div></div><div></div><div></div><div></div><div></div><div></div>
- </div>
-
- </div>
- <script>
- KISSY.use('node, io, gallery/datalazyload/2.0/index', function (S, Node, IO, Datalazyload) {
- var lock = false;
- new Datalazyload({
- load: function(el){
- el = '#loadPage';
- if (lock) return false;
- lock = true;
-
- var requesrUrl = $(el).data('request-url');
- var page = Number($(el).data('page'));
- var totals = Number($(el).data('totals'));
- if (!requesrUrl) {
- return false;
- }
-
- if (page > totals) {
- $('.loading').hide();
- return false;
- }
-
- IO.get(
- requesrUrl
- , {page: page}
- , function (data) {
- if (data.ok) {
- var next_page = page + 1;
- $('#loadPage').data('page', next_page);
- $("#lazyLoad").append(data.msg);
- lock = false;
- $('.loading').hide();
- new Datalazyload();
- if (next_page > totals) {
- $('.up_icon').hide();
- }
- }
- }
- , 'json'
- );
- }
- });
- });
- //有产品列表时添加整体body背景色
- $(body).addClass("bg_white");
- </script>
- <{/if}>
- <{elseif $type == 'feedback'}>
- <{if $fdData}>
- <section id="tab3" class="tabcont" style="display:block;">
- <section class="commentlist">
- <ul id="lazyLoad">
- <{foreach from=$fdData item=v}>
- <li>
- <img src="<{$v.user.headimgurl}>">
- <div class="dt">
- <span><{$v.user.mobile}> 的用户 <{$v.user.cdate}> 评价了 <{$v.user.events}>活动:</span>
- <{if $v.pic[0]}>
- <div class="imgs">
- <{foreach from=$v.pic item=v1}>
- <img src="<{$v1}>">
- <{/foreach}>
- </div>
- <{/if}>
- <p><{$v.content}></p>
- </div>
- </li>
- <{/foreach}>
- </ul>
- </section>
- </section>
- <div class="clear"></div>
- <div class="loading">
- <img
- id="loadPage"
- src="<{$web_cfg.cdn}>/public/static/img/loading.gif"
- data-ks-lazyload="<{$web_cfg.cdn}>/public/static/img/loading.gif"
- data-request-url="<{$info.thisUrl}>/feedback?ajax=ajax"
- data-page="2"
- data-totals="<{$fdDataTotals}>"
- style="width:0px;"
- />
-
- <div class="loader-inner ball-pulse">
- <div></div><div></div><div></div><div></div><div></div><div></div>
- </div>
-
- </div>
- <script>
- KISSY.use('node, io, gallery/datalazyload/2.0/index', function (S, Node, IO, Datalazyload) {
- var lock = false;
- new Datalazyload({
- load: function(el){
- el = '#loadPage';
- if (lock) return false;
- lock = true;
-
- var requesrUrl = $(el).data('request-url');
- var page = Number($(el).data('page'));
- var totals = Number($(el).data('totals'));
- if (!requesrUrl) {
- return false;
- }
-
- if (page > totals) {
- $('.loading').hide();
- return false;
- }
-
- IO.get(
- requesrUrl
- , {page: page}
- , function (data) {
- if (data.ok) {
- var next_page = page + 1;
- $('#loadPage').data('page', next_page);
- $("#lazyLoad").append(data.msg);
- lock = false;
- //new Datalazyload();
- if (next_page > totals) {
- $('.up_icon').hide();
- }
- }
- }
- , 'json'
- );
- }
- });
- });
- //有产品列表时添加整体body背景色
- $(body).addClass("bg_white");
- </script>
- <{/if}>
- <{else}>
- <section id="tab1" class="tabcont" style="display:block;">
- <section class="cardcont">
- <dl class="card">
- <dd><span class="time"><em class="icon-time"></em>剩余<{$info.rday}>天</span><span>参与<{$info.user_total}>人</span></dd>
- </dl>
- <section class="article">
- <{$info.events_tips}>
- </section>
- <{if $info.type == 1}>
- <!--抽奖loading begin-->
- <div class="luck_loading" id="luck_loading">
- <div class="luck_load_icon">
- <div class="loading_img"></div>
- </div>
- </div>
- <!--抽奖loading end-->
- <!--抽奖结果 begin-->
- <div class="luck_result" id="luck_result">
- <div><img src="<{$web_cfg.cdn}>/public/static/img/error_icon.png"></div>
- <div>未中奖,感谢参与</div>
- </div>
- <!--抽奖结果 end-->
- <section class="button-wrapper luck_show" id="luck_show">
- <a class="button" id="award_btn">开始抽奖</a>
- </section>
- <{/if}>
- <{if $info.type != 1}>
- <{if $info.share_button == 2 || $info.buy_button == 2}>
- <section class="button-wrapper">
- <{if $info.share_button == 2 && $info.type == 4}>
- <a class="button share_buttons" node-type="share" href="<{$info.thisUrl}>/share"><{$info.share_button_tips}></a>
- <{elseif $info.share_button == 2}>
- <a class="button share_button" node-type="share"><{$info.share_button_tips}></a>
- <{/if}>
- <{if $info.buy_button == 2}>
- <a class="button buy_button" data-weixin="<{$info.buy_button_link}>" data-app="<{$info.buy_button_app}>" href="<{$info.buy_button_link}>"><{$info.buy_button_tips}></a>
- <{/if}>
- </section>
- <{/if}>
- <{/if}>
- </section>
- <section class="applycont">
- <{if $info.type == 4 || $info.type == 6 || $info.type == 7}>
- <{if $info.events_hd_tips}>
- <h2><{$info.events_hd_tips}></h2>
- <{/if}>
- <{include file="events_forms_template_new.html"}>
- <{elseif $info.type == 1}>
- <{include file="events_turntable_content.html"}>
- <{elseif $info.type == 11}>
- <{include file="events_survey_content.html"}>
- <{elseif $info.type == 5}>
- <{include file="events_vote_content.html"}>
- <{/if}>
- </section>
- <section class="applycont">
- <{if $info.operationt_tips}>
- <h2><{$info.operationt_tips}></h2>
- <{/if}>
- <section class="summary">
- <{$info.events_rules}>
- </section>
- </section>
- <{if $focusData}>
- <section class="recommend">
- <ul>
- <{foreach from=$focusData item=v}>
- <li><a href="<{$v.link}>"><img src="<{$v.pic}>"></a></li>
- <{/foreach}>
- </ul>
- </section>
- <{/if}>
- <{if $ad}>
- <section class="ad">
- <h2><span>广告</span></h2>
- <{$ad}>
- </section>
- <{/if}>
- </section>
- <{/if}>
- <{if $info.type == 4 && $info.yaoqing}>
- <section class="layer" id="layerbox" style="display:none;">
- <section class="loginbox">
- <h3>申请成功!</h3>
- <p><{$info.yaoqing}></p>
- <section class="button-wrapper">
- <a class="button" href="<{$info.thisUrl}>/share"><{$info.share_button_tips}></a>
- </section>
- </section>
- </section>
- <{/if}>
- <section class="layer" <{if $info.end == 2 && $info.login != 2 && !$userData && $info.type != 4}>style="display:block"<{/if}>>
- <section class="loginbox">
- <h3>活动已结束!</h3>
- <p>感谢您的关注,期待您参与我们的其他活动</p>
- <section class="button-wrapper">
- <a class="button border" href="<{$listUrl}>">找找其他福利</a>
- <a class="button" href="<{$giftsUrl}>">查看我的奖品</a>
- </section>
- </section>
- </section>
- <section class="layer" id="loginbox" style="display:none;">
- <section class="loginbox">
- <h3>您还没有登录</h3>
- <p>请登录后再参与福利活动</p>
- <section class="button-wrapper">
- <a class="button border" href="<{$listUrl}>">找找其他福利</a>
- <{if $applogin && $applogin == 1}>
- <a class="button" href="javascript:;" onclick="istoken('<{$loginUrl}>', 1);" style="cursor:pointer;">马上登录</a>
- <{else}>
- <a class="button" id="loginyes" href="<{$loginUrl}>">马上登录</a>
- <{/if}>
- </section>
- </section>
- </section>
- <{if $info.login == 2}>
- <script>
- $(function()
- {
- loadLogin();
- })
- </script>
- <{/if}>
|