Skip to content

Commit

Permalink
主页二维码不显示
Browse files Browse the repository at this point in the history
当二维码链接不存在时,替换为文章链接
  • Loading branch information
jeeinn authored Dec 14, 2019
1 parent 20fd6a8 commit 72d05b9
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions templates/site-card.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@
$qrurl="<img src='" . get_post_meta(get_the_ID(), '_wechat_qr', true) . "' width='128'>";
$is_html = 'true';
} else if($link_url=="") {
$qrurl = '地址错误!';
// $qrurl = '无二维码!';
$link_url = get_permalink($post->ID);
$qrurl = "<img src='https://my.tv.sohu.com/user/a/wvideo/getQRCode.do?width=128&height=128&text=" . $link_url . "' width='128'>";
$is_html = 'true';
} else if(io_get_option('is_qr')) {
$qrurl = "<img src='https://my.tv.sohu.com/user/a/wvideo/getQRCode.do?width=128&height=128&text=" . $link_url . "' width='128'>";
$is_html = 'true';
Expand Down Expand Up @@ -45,4 +48,4 @@
<p class="overflowClip_2"><?php echo get_post_meta($post->ID, '_sites_sescribe', true) ?></p>
</div>
</div>
</a>
</a>

0 comments on commit 72d05b9

Please sign in to comment.