Authored by whb

修改bug

@@ -732,6 +732,7 @@ class Lib_Utils_StringHelper @@ -732,6 +732,7 @@ class Lib_Utils_StringHelper
732 { 732 {
733 $chars = $string; 733 $chars = $string;
734 $tmp = $i = $n = $m = $l = 0; 734 $tmp = $i = $n = $m = $l = 0;
  735 + $length /= 2;
735 if (mb_strwidth ( $string , 'UTF-8' ) <= $length) 736 if (mb_strwidth ( $string , 'UTF-8' ) <= $length)
736 return $string; 737 return $string;
737 do 738 do
@@ -19,7 +19,7 @@ @@ -19,7 +19,7 @@
19 <div class="post-list main-layout"> 19 <div class="post-list main-layout">
20 <div class="layout-item tiled"> 20 <div class="layout-item tiled">
21 <div class="image-box"> 21 <div class="image-box">
22 - <a href="<?php echo url('news/detail',array('id' => $val['id']))?>" title="<?php echo $val['title']?>"> 22 + <a href="<?php echo url('news/detail',array('id' => $val['id']))?>" title="<?php echo $val['title']?>" target="_blank">
23 <img src="<?php echo Lib_Images::getImageUrl($val['thumb'],'0230x0230','fragmentimg');?>" alt="" style="height:230px;width:230px;"> 23 <img src="<?php echo Lib_Images::getImageUrl($val['thumb'],'0230x0230','fragmentimg');?>" alt="" style="height:230px;width:230px;">
24 <?php if(trim($val['tag']) == '视频'):?> 24 <?php if(trim($val['tag']) == '视频'):?>
25 <i class="play-icon"></i> 25 <i class="play-icon"></i>
@@ -28,7 +28,7 @@ @@ -28,7 +28,7 @@
28 </div> 28 </div>
29 <div class="content"> 29 <div class="content">
30 <h2 <?php echo $val['main_title_type'] == 1 ? 'class="volupia"':'';?>> 30 <h2 <?php echo $val['main_title_type'] == 1 ? 'class="volupia"':'';?>>
31 - <a href="<?php echo url('news/detail',array('id' => $val['id']))?>"> 31 + <a href="<?php echo url('news/detail',array('id' => $val['id']))?>" target="_blank">
32 <?php echo Util_StringHelper::substr_cn($val['title'], 46);?> 32 <?php echo Util_StringHelper::substr_cn($val['title'], 46);?>
33 </a> 33 </a>
34 </h2> 34 </h2>
1 <?php foreach($list as $news): 1 <?php foreach($list as $news):
2 $title = Util_StringHelper::substr_cn($news['title'], 90); 2 $title = Util_StringHelper::substr_cn($news['title'], 90);
3 -$description = Lib_Utils_StringHelper::substr_full_en(Lib_Utils_StringHelper::stripTags($news['content']), 40); 3 +$description = Lib_Utils_StringHelper::substr_full_en(Lib_Utils_StringHelper::stripTags($news['content']), 80);
4 $height = $width = 0; 4 $height = $width = 0;
5 $thumb_size = json_decode($news['thumb_size'], true); 5 $thumb_size = json_decode($news['thumb_size'], true);
6 if ($news['thumb']) 6 if ($news['thumb'])
1 <?php foreach($list as $news): 1 <?php foreach($list as $news):
2 $title = Util_StringHelper::substr_cn($news['title'], 90); 2 $title = Util_StringHelper::substr_cn($news['title'], 90);
3 -$description = Lib_Utils_StringHelper::substr_full_en(Lib_Utils_StringHelper::stripTags($news['content']), 36); 3 +$description = Lib_Utils_StringHelper::substr_full_en(Lib_Utils_StringHelper::stripTags($news['content']), 72);
4 $thumb_size = json_decode($news['thumb_size'], true); 4 $thumb_size = json_decode($news['thumb_size'], true);
5 if(empty($news['client_thumb'])) 5 if(empty($news['client_thumb']))
6 { 6 {