123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219 |
- {extend name="layout/layout" /}
- {block name="title"}个人中心{/block}
- {block name="css"}
- <!-- 这里引入css -->
- <link href="{:asset('/css/frontend/common.css')}" rel="stylesheet" type="text/css">
- <link href="{:asset('/css/frontend/classify.css')}" rel="stylesheet" type="text/css">
- <link href="{:asset('/css/frontend/common_tips.css')}" rel="stylesheet" type="text/css">
- <style type="text/css">
- .s_main{
- overflow: hidden;
- background-color: #fff;
- }
- .s_img{
- overflow: hidden;
- margin: .5rem auto .2rem;
- width: 1.43rem;
- height: 1.43rem;
- }
- .s_img img{
- display: block;
- width: 100%;
- height: 100%;
- }
- .s_main h1{
- height: .36rem;
- color: #0a347e;
- font-size: .21rem;
- text-align: center;
- line-height: .36rem;
- }
- .s_main strong{
- display: block;
- overflow: hidden;
- height: .36rem;
- font-size: .15rem;
- color: #5e6a94;
- text-align: center;
- line-height: .36rem;
- }
- .s_main strong span{
- display: inline;
- font-size: .15rem;
- color: #f63566;
- }
- .content_null_but_box a{
- height: .36rem;
- font-size: .16rem;
- line-height: .36rem;
- }
- .s_main .s_main_over{
- background-color: #f63566;
- }
- .s_fixed_box{
- display: none;
- padding-top: 2.6rem;
- position: fixed;
- left: 0;
- top: 0;
- right: 0;
- bottom: 0;
- z-index: 1000;
- background: rgba(0,0,0,.8) url({:asset('/img/frontend/icon/icon_28.png')}) no-repeat center 1.46rem;
- background-size: 1.87rem 1.17rem;
- }
- .s_fixed_box strong,
- .s_fixed_box em{
- display: block;
- text-align: center;
- font-weight: normal;
- }
- .s_fixed_box strong{
- font-size: .24rem;
- color: #ff4b4b;
- line-height: .32rem;
- }
- .s_fixed_box em{
- font-size: .15rem;
- color: #77a4ff;
- line-height: .24rem;
- }
- .s_fixed_box em span{
- display: inline;
- color: #ff4b4b;
- }
- .s_fixed_box a{
- margin: .4rem auto 0;
- display: block;
- width: 2.1rem;
- height: .36rem;
- border: 1px solid #fff;
- border-radius: .36rem;
- font-size: .16rem;
- color: #fff;
- text-align: center;
- line-height: .36rem;
- }
- .content_null_but_box a{
- width:2.58rem;
- height: .36rem;
- font-size: .16rem;
- line-height: .36rem;
- }
- .content_null_but_box a.sign_0 {display:block;}
- .content_null_but_box a.sign_1 {display:none;}
- .is_sign .content_null_but_box a.sign_0 {display:none;}
- .is_sign .content_null_but_box a.sign_1 {display:block;}
- </style>
- {/block}
- {block name="zepto"}
- <!-- 这是zepto插件 -->
- {/block}
- {block name="menu_title"}个人中心{/block}
- {block name="main"}
- <!-- 这是正文 -->
- <div class="body_sytle">
- <div class="s_main{if condition="$isSign"} is_sign {/if}">
- <div class="s_img"><img src="{:asset('/img/frontend/icon/icon_27.png')}" /></div>
- <h1 class="j_h1">签到送礼</h1>
- <!--<strong class="j_site">每日签到可获得<span>{$site.kandian_sign}书币</span>奖励</strong>-->
- <strong>连续签到<span>7</span>天合计得<span>350</span>个书币,本签到为累积签到</strong>
- <strong>用户若中途中断签到,签到记录自动从新开始</strong>
- <div class="content_null_but_box j_sign_btn">
- <a class="sign_1" id="toIndex" href="javascript:;">今日已签到,继续阅读</a>
- <a class="sign_0" id="sign" href="javascript:;">签到领书币</a>
- </div>
- </div>
- </div>
- <!--<div class="s_fixed_box">
- <strong>恭喜您</strong>
- <em>签到成功</em>
- <em>获得<span id="coinNum">{$site.kandian_sign}书币</span>奖励</em>
- <a href="javascript:;">去看书</a>
- </div>-->
- {/block}
- {block name="footer"}
- <!-- 这里引入底部footer -->
- {/block}
- {block name="js"}
- <!-- 这里引入js -->
- <script>
- var loadSuccess = false;
- var jumpUrl = '';
- $.ajax({
- type: "POST",
- url: "/api/index/checkTips",
- data: {'position_name': 'sign'},
- async: false, //顺序执行
- success: function (data) {
- if (data.err == 0){
- if (data.show_tips) {
- $(".common_tips_but img").attr("src", data.tips_img);
- loadSuccess = true;
- jumpUrl = data.jump_url;
- }
- }else{
- consoleMain(data.msg);
- }
- }
- });
- var isClick = false;
- $('#sign').click(function(){
- if(isClick){
- return false;
- }
- isClick = true;
- $.post('/api/user/signcontinuous',{},function(data){
- if (data.err == 0){
- $('.j_h1').text('签到成功');
- $('.j_site').html('恭喜您获得<span>'+data.kandian+'书币</span>奖励');
- $('.j_sign_btn').html('<a class="sign_0" href="/index/user/recent">去看书</a>');
- /*$('#coinNum').html(data.kandian+'书币');
- $('.s_fixed_box').show();
- $('#sign').hide();
- $('#toIndex').show();*/
- }else{
- isClick = false;
- consoleMain(data.msg);
- }
- })
- });
- $('#toIndex').click(function(){
- window.location.href = '/index/user/recent';
- });
- $(".s_fixed_box a").click(function () {
- $(".s_fixed_box").hide();
- if (loadSuccess) {
- //uv
- cpslog([701, {map:{pop_tips: 'sign'}}])
- $(".common_tips_box").show();
- } else {
- window.location.href = '/index/user/recent';
- }
- });
- //写cookie
- function apiSetCache(key)
- {
- $.ajax({
- type: "POST",
- url: "/api/index/setTipsCache",
- data: {'position_name': key},
- async: false, //顺序执行
- success: function (data) {
- if (data.err == 0){
- }else{
- consoleMain(data.msg);
- }
- }
- });
- }
- </script>
- {/block}
|