浏览代码

Merge remote-tracking branch 'origin/stabble' into stabble

tusx 5 年之前
父节点
当前提交
7874ca2da2

+ 28 - 1
app/Console/Commands/BookUpdate.php

@@ -8,6 +8,7 @@ use App\Modules\Book\Models\Book;
 use App\Modules\Book\Models\Chapter;
 use Log;
 use App\Modules\Book\Services\BookConfigService;
+use DB;
 
 class BookUpdate extends Command
 {
@@ -86,6 +87,7 @@ class BookUpdate extends Command
             ->first();
         $max_sequence_chapter_id = isset($last_chapter->id) ? $last_chapter->id : 0;
         $max_sequence = isset($last_chapter->sequence) ? $last_chapter->sequence : 0;
+        $book_config_info = DB::table('book_configs')->where('bid',$bid)->first();
 
         try {
             $chapter_list_fromat = "http://www.leyuee.com/services/zwfx.aspx?method=chapterlist&bid=%s&token=sefaf23h7face";
@@ -127,7 +129,7 @@ class BookUpdate extends Command
         if ($last_chapter_from_third && isset($last_chapter_from_third->ly_chapter_id)) {
             $ly_last_chapter_id = $last_chapter_from_third->ly_chapter_id;
         }
-
+        $size = 0;
         foreach ($res['data'] as $v1) {
             foreach ($v1['chapters'] as $v) {
 
@@ -167,6 +169,7 @@ class BookUpdate extends Command
                     $cahpter_content = json_decode($cahpter_content, true);
                     $temp['size'] = ceil(strlen($cahpter_content['data']['chapter_content']) / 3);
                     $temp['content'] = $cahpter_content['data']['chapter_content'];
+                    $size += $temp['size'];
                 }
                 $insert_res = Chapter::create($temp);
                 Chapter::where('id', $max_sequence_chapter_id)->update(['next_cid' => $insert_res->id]);
@@ -180,6 +183,14 @@ class BookUpdate extends Command
         $chapter_size = Chapter::where('bid', $bid)->sum('size');
         if ($j > 0) {
             Book::where('id', $bid)->update(['chapter_count' => $chapter_count, 'last_cid' => $max_sequence_chapter_id, 'size' => $chapter_size, 'last_chapter' => $v['chapter_name']]);
+            $book_info = Book::find($bid);
+            $this->recordUpdateInfo($bid,[
+                'book_name'=>$book_config_info->book_name,
+                'update_chapter_count'=>$j,
+                'update_words'=>$size,
+                'update_type'=>'add_chapter',
+                'channel_name'=>$book_info->category_id >=13 ? '女频':'男频'
+            ]);
         }
         return $j;
     }
@@ -205,4 +216,20 @@ class BookUpdate extends Command
             Book::where('id', $bid)->update(['status' => $status]);
         }
     }
+
+    private function recordUpdateInfo($bid, $data)
+    {
+        // 2 book_updates 的更新记录
+        DB::table('book_updates')->insert([
+            'bid' => $bid,
+            'book_name' => $data['book_name'],
+            'channel_name' => $data['channel_name'],
+            'update_date' => date('Y-m-d'),
+            'update_chapter_count' => $data['update_chapter_count'],
+            'update_words' => $data['update_words'],
+            'update_type' => $data['update_type'],
+            'created_at' => date('Y-m-d H:i:s'),
+            'updated_at' => date('Y-m-d H:i:s')
+        ]);
+    }
 }

+ 1 - 1
app/Http/Controllers/Wap/Book/ChapterController.php

@@ -1331,7 +1331,7 @@ class ChapterController extends BaseController
             if($fee >45) $fee = 45;
         }*/
         if($fee <37) $fee = 37;
-        if($fee >50) $fee = 50;
+        if($fee >60) $fee = 60;
         return $fee;
     }
 

+ 7 - 6
app/Http/Controllers/Wap/User/CoflController.php

@@ -200,7 +200,7 @@ class CoflController extends Controller
         $this->stats('activity',$crm);
         $activity = ActivityService::getByToken($token);
         if($activity){
-            $user = $this->getUsers($openid);
+            $user = $this->getUsersV2($openid);
             $distribution_channel_id = (isset($user[1]) && !empty($user[1]))?$user[1]:123;
             $url_format = '%s://site%s.%s.com%s';
             $activity_page = $activity->activity_page ;
@@ -247,7 +247,7 @@ class CoflController extends Controller
             $app = new Application($this->auth($params));
             return $app->oauth->redirect();
         }
-        $user = $this->getUsers($openid);
+        $user = $this->getUsersV2($openid);
         if(!$user[0]){
             $distribution_channel_id = 123;
         }else{
@@ -270,7 +270,7 @@ class CoflController extends Controller
             $app = new Application($this->auth($params));
             return $app->oauth->redirect();
         }
-        $user = $this->getUsers($openid);
+        $user = $this->getUsersV2($openid);
         if(!$user[0]){
             $distribution_channel_id = 123;
         }else{
@@ -293,7 +293,7 @@ class CoflController extends Controller
             $app = new Application($this->auth($params));
             return $app->oauth->redirect();
         }
-        $user = $this->getUsers($openid);
+        $user = $this->getUsersV2($openid);
         if(!$user[0]){
             $distribution_channel_id = 123;
         }else{
@@ -549,7 +549,7 @@ class CoflController extends Controller
             $app = new Application($this->auth($params));
             return $app->oauth->redirect();
         }
-        $user = $this->getUsers($openid);
+        $user = $this->getUsersV2($openid);
         if(!$user[0]){
             $distribution_channel_id = 123;
         }else{
@@ -625,11 +625,12 @@ class CoflController extends Controller
             'ACTIVE_GUIDE_PERSONAL_ACCOUNT_MAX_EVERY_UV');
         $img = empty($env_config[0])?'https://cdn-novel.iycdm.com/h5/personal_account/chenchen.jpg':$env_config[0];
         $max = empty($env_config[1])?100:$env_config[1];
+        $max = (int)$max;
         $one_loop_max = empty($env_config[3])?10:$env_config[3];
         $now_id = (int)$env_config[2];
         $uv = Redis::scard('active_guide_personal_uv');
         $personal_info = DB::table('personal_account_list')->where('id',$now_id)->select('count')->first();
-        $total_max = $personal_info->count+$uv;
+        $total_max = (int)($personal_info->count+$uv);
         //Log::info('$total_max is: '.);
         if($uv >= $one_loop_max || $total_max>=$max){
             if($total_max>=$max){

+ 149 - 0
app/Http/Controllers/Wap/User/UserController.php

@@ -292,6 +292,155 @@ class UserController extends BaseController
         $data = ['sign_count'=>$sign_count,'fee'=>$fee,'fee_pool'=>$fee_pool,'day'=>$day,'book1'=>$book1,'book2'=>$book2,'tomorrow_fee'=>$tomorrow_pool[$tomorrow]];
         return view($page,$data);
     }
+    public function signV3(){
+        //修改签到页面,version=v2
+        $fee_pool = [0,30,50,120,50,50,50,150];
+        list($sign,$sign_count) = ReadRecordService::getByMultiField($this->uid,'sign_day','sign_counts');
+        $read_record = $this->getSignPageReadRecord($all_bid);
+        if(!$all_bid)$all_bid = [];
+        $user = $this->_user_info;
+        $recommend_book = $this->getSignRecomandBook($user->sex,$all_bid);
+        if ($sign && $sign == date('Y-m-d')) {
+            if ($sign_count % 7 == 1 && $sign_count<=7) {
+                $fee = 30;
+            } elseif ($sign_count % 7 == 3) {
+                $fee = 120;
+            } elseif ($sign_count % 7 == 0) {
+                $fee = 150;
+            } else {
+                $fee = 50;
+            }
+            if($sign_count >=8){
+                $fee_pool[1] = 50;
+            }
+            $day = $sign_count%7;
+            if($day == 0){
+                $day = 7;
+            }
+
+            //签过到了
+            $name = $user->nickname;
+            $head_img = $user->head_img;
+            $balance = $user->balance;
+            $data = ['sign_count'=>$sign_count,'fee'=>$fee,'fee_pool'=>$fee_pool,
+                'day'=>$day,'is_alert'=>0,'read_record'=>$read_record,'name'=>$name,
+                'head_img'=>$head_img,
+                'balance'=>$balance,
+                'recommend_book'=>$recommend_book
+            ];
+            return view('wap.signV3',$data);
+        }
+        $fee = UserSignService::signToday($this->uid,'v2');
+        if(!$fee){
+            return response()->error('WAP_SYS_ERROR');
+        }
+        $sign_count = ReadRecordService::getSignCount($this->uid);
+        //$sign_count++;
+        if($sign_count >=8){
+            $fee_pool[1] = 50;
+        }
+        $day = $sign_count%7;
+        if($day == 0){
+            $day = 7;
+        }
+        //签过到了
+        $name = $user->nickname;
+        $head_img = $user->head_img;
+        $balance = $user->balance;
+        $data = ['sign_count'=>$sign_count,'fee'=>$fee,'fee_pool'=>$fee_pool,
+            'day'=>$day,'is_alert'=>1,'read_record'=>$read_record,
+            'name'=>$name,
+            'head_img'=>$head_img,
+            'balance'=>$balance,
+            'recommend_book'=>$recommend_book
+        ];
+        return view('wap.signV3',$data);
+    }
+
+    private function getSignPageReadRecord(&$all_id){
+        $res = ReadRecordService::getReadRecord($this->uid);
+        if($res){
+            $id_arr = [];
+            foreach ($res as $key => $value) {
+                if($key < 2){
+                    $id_arr[] = $value['bid'];
+                }
+                $all_id[] = $value['bid'];
+            }
+
+            $book = BookConfigService::getBooksByIds($id_arr);
+            foreach ($res as $key => &$value) {
+                $value['cover'] = '';
+                $value['url'] = sprintf('/reader?bid=%s&cid=%s',Hashids::encode($value['bid']),$value['cid']);
+                $value['last_chapter'] = 0;
+                $value['update_count'] = 0;
+                foreach ($book as  $val) {
+                    if($value['bid'] == $val->bid){
+                        $value['cover'] = $val->cover;
+                        $value['last_chapter'] = $val->last_chapter;
+                        if($val->status == 0){
+                            $value['update_count'] = DB::table('book_updates')
+                                ->where('bid',$val->bid)->where('update_type','add_chapter')
+                                ->where('created_at','>=',date('Y-m-d H:i:s',$value['time']))
+                                ->sum('update_chapter_count');
+                        }
+                        break;
+                    }
+
+
+                }
+            }
+        }
+        return $res;
+    }
+    private function getSignRecomandBook(int $sex,array $all_bid):array
+    {
+        if($sex == 1){
+            $set_key = 'male_high_reco_bids';
+        }else{
+            $set_key = 'female_high_reco_bids';
+        }
+        $bids = Cookie::get('sign_recomand_bids');
+        if(!$bids){
+            $bid_array = Redis::Srandmember($set_key,16);
+            //Log::info($bid_array);
+            $time = strtotime(date('Y-m-d',time()+86400))-time();
+            $new_bid_array = [];
+            foreach ($bid_array as $item){
+                if(in_array($item,$all_bid)){
+                    array_unshift($new_bid_array,$item);
+                }else{
+                    array_push($new_bid_array,$item);
+                }
+            }
+            $bids = implode(',',$new_bid_array);
+            Cookie::queue('sign_recomand_bids',$bids,$time);
+        }
+        //Log::info($bids);
+        $result =  DB::select(sprintf('select book_configs.book_name,intro,bid,books.category_name,book_configs.cover,first_cid,
+(select GROUP_CONCAT(tags) from book_tags where bid = book_configs.bid and `status` = 1) as tag from book_configs 
+left join books on books.id = book_configs.bid left join book_categories on book_categories.id = books.category_id 
+where bid in (%s) and is_on_shelf =2 ORDER  by field(book_configs.bid,%s)',$bids,$bids));
+        $data = [];
+        foreach ($result as $item){
+            $tag_list = [];
+            if($item->tag){
+                $tag_list = explode(',',$item->tag);
+            }
+            $data[] = [
+                'book_name'=>$item->book_name,
+                'intro'=>$item->intro,
+                'bid'=>$item->bid,
+                'category_name'=>$item->category_name,
+                'cover'=>$item->cover,
+                'tag'=>$item->tag,
+                'tag_list'=>$tag_list,
+                'url'=>sprintf('/reader?bid=%s&cid=%s&source=wechatmsg&fromtype=sign_recommend',Hashids::encode($item->bid),$item->first_cid),
+            ];
+        }
+        return $data;
+
+    }
 
     public function recordShare(Request $request){
         if(!$this->checkUid()){

+ 1 - 1
app/Http/Controllers/Wap/Web/WelcomeController.php

@@ -148,7 +148,7 @@ class WelcomeController extends BaseController
         $yctj_url = '';
         if(in_array($this->distribution_channel_id,[2,146,155,255,691,722,4053,4174,4364,4426])){
             $yctj = true;
-            $yctj_url = 'https://m.ycsd.cn/continue';
+            $yctj_url = 'https://m.ycsd.cn/continueRead';
         }
         //app广告
         $add_ad_status=[

+ 2 - 1
app/Http/Middleware/EncryptCookies.php

@@ -27,6 +27,7 @@ class EncryptCookies extends BaseEncrypter
         'crm_flag',
         'is_paid',
         'crm_person_img',
-        'crm_person_name'
+        'crm_person_name',
+        'sign_recomand_bids'
     ];
 }

+ 2 - 1
app/Http/Routes/Wap/WapRoutes.php

@@ -286,7 +286,8 @@ Route::group(['domain'=>env('WAP_DOMAIN'),'namespace'=>'App\Http\Controllers\Wap
         //用户强关信息页
         Route::any('subscribe/getFromUser','Subscribe\SubscribeController@getFromUser');
 
-        Route::get('sign','User\UserController@signi');
+        Route::get('sign','User\UserController@signV3');
+        Route::get('signV3','User\UserController@signV3');
 
         Route::get('force/guide','User\UserController@guidePersonalAccount');
 

+ 19 - 3
app/Modules/User/Services/CrmUserService.php

@@ -11,6 +11,7 @@ namespace App\Modules\User\Services;
 use App\Modules\Subscribe\Services\BookOrderService;
 use App\Modules\Subscribe\Services\ChapterOrderService;
 use App\Modules\User\Models\CrmUser;
+use DB;
 
 class CrmUserService
 {
@@ -18,12 +19,27 @@ class CrmUserService
         $model = new CrmUser();
         $crmuser = $model->where('uid',$uid)->where('is_enable',1)->select('id')->first();
         if($crmuser) return true;
+
+        $bind_info = DB::table('friend_link_uid_bind')->join('users','friend_link_uid_bind.openid','users.openid')
+            ->select('friend_link_uid_bind.created_at')->where('users.id',$uid)->first();
+
+        //2019-07-22 20:00 之前有领过书币或者有绑定过的都可以符合
+        if($bind_info && $bind_info->created_at <= '2019-07-22 20:00:00'){
+            self::create($uid);
+            return true;
+        }
+
+        $get_price = UserBindHkWelfareService::isHasGetCrm($uid);
+        if($get_price &&  $get_price->created_at <= '2019-07-22 20:00:00'){
+            self::create($uid);
+            return true;
+        }
+
         //是否充值过
         if(!$is_paid) return false;
         //是否领过书币
-        if(!UserBindHkWelfareService::isHasGetCrm($uid)){
-            return false;
-        }
+        if(!$get_price) return false;
+
         //3日内有订阅
         //本订
         if(BookOrderService::isHasBookOrderInThreeDay($uid)){

+ 1 - 1
app/Modules/User/Services/UserBindHkWelfareService.php

@@ -24,7 +24,7 @@ class UserBindHkWelfareService
         $result = UserBindHkWelfare::join('users','users.openid','=','user_bind_hk_welfare.openid')
             ->where('users.id',$uid)
             ->where('user_bind_hk_welfare.type','CRM')
-            ->select('user_bind_hk_welfare.id','user_bind_hk_welfare.fee','users.distribution_channel_id','users.id as uid')
+            ->select('user_bind_hk_welfare.id','user_bind_hk_welfare.created_at','user_bind_hk_welfare.fee','users.distribution_channel_id','users.id as uid')
             ->first();
         return   $result;
     }

+ 6 - 4
app/Modules/User/Services/UserSignService.php

@@ -167,7 +167,8 @@ class UserSignService
 
     public static function getUserSignVersion($uid)
     {
-        list($version, $sign_day, $count) = ReadRecordService::getByMultiField($uid, 'sign_version', 'sign_day', 'sign_counts');
+        return 'v2';
+        /*list($version, $sign_day, $count) = ReadRecordService::getByMultiField($uid, 'sign_version', 'sign_day', 'sign_counts');
         if ($version == 'v2') {
             return 'v2';
         }
@@ -207,7 +208,7 @@ class UserSignService
         }
 
         self::setUserSignVersion($uid, 'v2');
-        return 'v2';
+        return 'v2';*/
     }
 
     public static function setUserSignVersion($uid, $version)
@@ -217,7 +218,8 @@ class UserSignService
 
     public static function signToday($uid,$version='')
     {
-        if(!$version){
+        return self::signV2($uid, date('Y-m-d'));
+        /*if(!$version){
             $version = self::getUserSignVersion($uid);
         }
          if($version == 'v1'){
@@ -227,7 +229,7 @@ class UserSignService
         if($version == 'v2'){
             return self::signV2($uid, date('Y-m-d'));
         }
-        return 0;
+        return 0;*/
     }
 
 

+ 1 - 1
resources/views/pay/activity/summerHoliday.blade.php

@@ -104,7 +104,7 @@
     </div>
 </main>
 </body>
-<script src="https://cdn.bootcss.com/jquery/3.4.1/jquery.min.js"></script>
+<script src="//cdn-novel.iycdm.com/static/jquery-3.4.1.min.js"></script>
 <script>
     // 按钮点击
     $(".recharge-wrap").delegate("img", "click", function() {

+ 398 - 0
resources/views/wap/signV3.blade.php

@@ -0,0 +1,398 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="UTF-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <link rel=icon type=image/png href="data:image/png;base64,iVBORw0KGgo=">
+    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
+    <title>签到</title>
+    <style>
+        html,
+        body {
+            margin: 0 auto;
+            padding: 0;
+            max-width: 450px;
+            font-size: 100px;
+            -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
+        }
+
+        body {
+            background: white;
+        }
+
+        .main_box {
+            font-size: 0.15rem;
+            position: relative;
+            text-align: center;
+            height: 100%;
+        }
+
+        .main_box img {
+            width: 100%;
+        }
+
+        .top_info {
+            position: absolute;
+            top: 0;
+            width: 100%;
+            height: 310px;
+        }
+
+        .user_info {
+            position: absolute;
+            left: 5px;
+            top: 5%;
+            display: flex;
+            text-align: left;
+            color: white;
+        }
+
+        .user_info img {
+            width: 50px;
+            height: 50px;
+            border-radius: 50px;
+            border: 1.5px solid white;
+        }
+
+        .user_info .user_name {
+            margin-left: 10px;
+            line-height: 30px;
+        }
+
+        .user_info .user_name div:nth-child(1) {
+            font-weight: bold;
+        }
+
+        .sign_info {
+            width: 85%;
+            position: absolute;
+            left: 25px;
+            top: 40%;
+            text-align: left;
+            color: white;
+        }
+
+        .sign_record {
+            width: 100%;
+            display: flex;
+            justify-content: space-between;
+        }
+
+        .sign_list {
+            position: absolute;
+            top: 60px;
+            width: 100%;
+            color: #333;
+            line-height: 25px;
+            display: flex;
+            justify-content: space-between;
+            font-size: 13px;
+            margin-top: 15px;
+        }
+
+        .sign_day {
+            text-align: center;
+            position: relative;
+        }
+
+        .sign_day-wei {
+            color: #999;
+        }
+
+        .sign_day div:nth-child(1) {
+            margin-bottom: 5px;
+        }
+
+        .sign_day img {
+            width: 20px;
+            position: relative;
+            z-index: 1000;
+        }
+
+        .sign_line {
+            border-bottom: 4px #318cf5 solid;
+            position: absolute;
+            width: 35px;
+            top: 47%;
+            right: -20px;
+            z-index: 10;
+        }
+
+        .sign_line-wei {
+            border-bottom: 4px #e5e5e5 solid;
+        }
+
+        .read_record {
+            position: relative;
+            margin-bottom: 0.15rem;
+        }
+
+        .read_record .title {
+            text-align: left;
+            font-weight: bold;
+            margin-bottom: 10px;
+        }
+
+        .read_record .title span {
+            border-left: 4px solid #318cf5;
+            border-radius: 3px;
+            margin-right: 10px;
+        }
+
+        .book_list {
+            display: flex;
+            justify-content: space-between;
+            padding: 0 20px;
+        }
+
+        .book_box {
+            line-height: 20px;
+        }
+
+        .book_box {
+            font-size: 0.13rem;
+        }
+
+        .book_box div:nth-child(3) {
+            color: #318cf5;
+        }
+
+        .book_box img {
+            height: 130px;
+            width: 100px;
+            min-width: 100px;
+            box-shadow: 0 0 0.16rem rgba(0, 0, 0, 0.1);
+            border-radius: 2px;
+        }
+
+        .book_box-featured {
+            padding: 0 20px;
+            display: flex;
+            text-decoration: none;
+            margin-bottom: 15px;
+            color: #333;
+        }
+
+        .book_info {
+            margin-left: 10px;
+            width: 100%;
+        }
+
+        .book_name {
+            display: flex;
+            justify-content: space-between;
+            line-height: 25px;
+            font-size: 16px;
+        }
+
+        .book_name span:nth-child(1) {
+            overflow: hidden;
+            text-overflow: ellipsis;
+            white-space: nowrap;
+            width: 150px;
+        }
+
+        .book_name span:nth-child(2) {
+            font-size: 14px;
+        }
+
+        .book_details {
+            display: -webkit-box;
+            -webkit-box-orient: vertical;
+            -webkit-line-clamp: 3;
+            overflow: hidden;
+            width: 100%;
+            line-height: 22px;
+            color: #999;
+            margin-top: 15px;
+            text-align: left;
+        }
+
+        .book_category {
+            margin-top: 15px;
+            text-align: left;
+        }
+
+        .book_category span {
+            white-space: nowrap;
+            padding: 2px 5px;
+            background-color: #fff0d5;
+            color: #b3883d;
+            border-radius: 50px;
+            margin: 5px 0;
+        }
+
+        .dialog {
+            position: fixed;
+            top: 0;
+            bottom: 0;
+            left: 0;
+            right: 0;
+            background: rgba(0, 0, 0, 0.6);
+            z-index: 9999;
+        }
+
+        .dialog .dialog_content {
+            position: absolute;
+            top: 25%;
+            left: 50%;
+            transform: translate(-50%);
+            width: 80%;
+        }
+
+        .dialog .dialog_close {
+            position: absolute;
+            top: 60%;
+            left: 50%;
+            transform: translate(-50%);
+            width: 30px;
+        }
+        .hide {
+            display: none;
+        }
+        .sign_record {
+            color: white;
+            text-decoration: none;
+        }
+        .dialog div {
+            position: absolute;
+            top: 45%;
+            left: 50%;
+            transform: translate(-50%);
+            color: white;
+            font-weight: bold;
+            font-size: 0.2rem;
+        }
+
+        .dialog div span {
+            color: #ffc018;
+        }
+    </style>
+</head>
+
+<body>
+<main class="main_box">
+    <img src="https://cdn-novel.iycdm.com/h5/sign/sign_v3_top_banner.jpg" alt="" />
+    <div class="top_info">
+        <div class="user_info">
+            @if($head_img)
+                <img src="{{$head_img}}" alt=""/>
+            @endif
+            <div class="user_name">
+                <div>{{$name}}</div>
+                <div>持有书币:{{$balance}}</div>
+            </div>
+        </div>
+        <div class="sign_info">
+            <div class="sign_record">
+            <span>已经连续签到 <span style="font-weight: bold;">{{$sign_count}}</span> 天</span>
+                <span><a href="/record/sign" class="sign_record">签到记录></a></span>
+            </div>
+            <div class="sign_list">
+                @foreach($fee_pool as $k=>$value)
+                    @if($k > 0)
+                        <div class="sign_day">
+                            <div>{{$k}}天</div>
+                            @if($day > $k)
+                                <img src="https://cdn-novel.iycdm.com/h5/sign/sign_v3_over.png" alt="" />
+                            @elseif($day == $k)
+                                <img src="https://cdn-novel.iycdm.com/h5/sign/sign_v3_doing.png" alt="" />
+                            @else
+                                <img src="https://cdn-novel.iycdm.com/h5/sign/sign_v3_undone.png" alt="" />
+                            @endif
+                            <div>{{$value}}书币</div>
+                            <!-- 连接线 -->
+                            @if($k != 7)
+                                @if($k >= $day)
+                                    <div class="sign_line sign_line-wei"></div>
+                                @else
+                                    <div class="sign_line"></div>
+                                @endif
+                            @endif
+                        </div>
+                    @endif
+                @endforeach
+            </div>
+        </div>
+    </div>
+    <div class="read_record">
+        <div class="title"><span></span>最近阅读</div>
+        <div class="book_list">
+            @foreach($read_record as $ks=>$item)
+                @if($ks <2)
+                <div class="book_box">
+                    <a href="{{$item['url']}}">
+                        <img src="{{$item['cover']}}" alt="" />
+                    </a>
+
+                    <div>{{$item['book_name']}}</div>
+                    @if($item['update_count'])
+                        <div>·更新{{$item['update_count']}}章</div>
+                    @endif
+                </div>
+                @endif
+            @endforeach
+            <div class="book_box">
+                <a href="/recent"><img src="https://cdn-novel.iycdm.com/h5/sign/sign_v3_more.png" alt="" /></a>
+            </div>
+        </div>
+    </div>
+    <div class="read_record">
+        <div class="title"><span></span>精选推荐</div>
+        @foreach($recommend_book as $item_book)
+            <a class="book_box book_box-featured" href="{{$item_book['url']}}">
+                <img src="{{$item_book['cover']}}" alt=""/>
+                <div class="book_info">
+                    <div class="book_name">
+                        <span>{{$item_book['book_name']}}</span><span>{{$item_book['category_name']}}</span>
+                    </div>
+                    <div class="book_details">
+                        {{$item_book['intro']}}
+                    </div>
+                    <div class="book_category">
+                        @if($item_book['tag_list'])
+                            @foreach($item_book['tag_list'] as $tag)
+                                <span>{{$tag}}</span>
+                            @endforeach
+                        @endif
+                    </div>
+                </div>
+            </a>
+        @endforeach
+
+    </div>
+    <div class="dialog {{$is_alert? '':'hide'}}" >
+        <img src="https://cdn-novel.iycdm.com/h5/sign/sign_v3_alert.png" class="dialog_content" />
+        <div>获得 <span>{{$fee}}</span> 书币</div>
+        <img src="https://cdn-novel.iycdm.com/h5/sign/sing_v3_close.png" class="dialog_close" />
+    </div>
+</main>
+</body>
+<script>
+    var _hmt = _hmt || [];
+    (function() {
+        var hm = document.createElement("script");
+        hm.src = "https://hm.baidu.com/hm.js?a027c0fdf2b6e70f1892dbd8227cbb2b";
+        var s = document.getElementsByTagName("script")[0];
+        s.parentNode.insertBefore(hm, s);
+    })();
+</script>
+<script>
+    var dialogClose = document.querySelector(".dialog_close");
+    var dialog = document.querySelector(".dialog");
+    function dialogBehavior() {
+        dialogClose.addEventListener(
+            "click",
+            function() {
+                dialog.style.display = "none";
+            },
+            false
+        );
+    }
+
+    function init() {
+        dialogBehavior();
+    }
+    init();
+</script>
+</html>