refactor: 文章
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
{/notempty}
|
||||
{/block}
|
||||
{block name="style"}
|
||||
<link rel="stylesheet" href="__CSS__/articleDetail.css">
|
||||
<link rel="stylesheet" href="__CSS__/article_detail.css">
|
||||
{/block}
|
||||
{block name="main"}
|
||||
<div class="orico_Page_articleDetail">
|
||||
@@ -26,23 +26,23 @@
|
||||
<div class="blog_content">{$detail.content|raw}</div>
|
||||
</div>
|
||||
<div class="atmright">
|
||||
{notempty name="share_config"}
|
||||
<div class="blog_share">
|
||||
<h3>{:lang('article.detail_share')}</h3>
|
||||
<div class="share_list clearfix">
|
||||
<a class="atdit" target="_blank" href="https://weibo.com/">
|
||||
<img src="__IMAGES__/share1.png" />
|
||||
</a>
|
||||
<a class="atdit">
|
||||
<img src="__IMAGES__/share2.png" />
|
||||
</a>
|
||||
<a class="atdit" target="_blank" href="https://creator.xiaohongshu.com/login?redirectReason=401">
|
||||
<img src="__IMAGES__/share3.png" />
|
||||
</a>
|
||||
<a class="atdit" href="javascript:shareCustomers();">
|
||||
<img src="__IMAGES__/share4.png" />
|
||||
<div class="share_list">
|
||||
{volist name="share_config" id="sc"}
|
||||
<a class="atdit" {if condition="!empty($sc.is_blank) && $sc.is_blank.value == 1"}target="_blank"{/if} {notempty name="sc.url.value"}href="{$sc.url.value}"{/notempty}>
|
||||
<img src="{$sc.image.value}" />
|
||||
{eq name=":array_key_exists('triggered_qrcode', $sc)" value="true"}
|
||||
<div class="triggered_qrcode">
|
||||
<img src="{$sc.triggered_qrcode.value}" />
|
||||
</div>
|
||||
{/eq}
|
||||
</a>
|
||||
{/volist}
|
||||
</div>
|
||||
</div>
|
||||
{/notempty}
|
||||
<div class="repply">
|
||||
<h3>{:lang('article.detail_leave_reply')}</h3>
|
||||
<form action="{:url('article/comment', ['id' => $detail.id])}" method="POST" autocomplete="off">
|
||||
@@ -102,5 +102,19 @@
|
||||
})
|
||||
})
|
||||
})
|
||||
function shareCustomers(){
|
||||
// 复制到粘贴板
|
||||
const input = document.createElement('input')
|
||||
input.setAttribute('readonly', 'readonly')
|
||||
let url=window.location.href
|
||||
input.setAttribute('value', url)
|
||||
document.body.appendChild(input)
|
||||
input.select()
|
||||
if (document.execCommand('copy')) {
|
||||
document.execCommand('copy')
|
||||
alert('链接复制成功')
|
||||
}
|
||||
document.body.removeChild(input)
|
||||
}
|
||||
</script>
|
||||
{/block}
|
||||
Reference in New Issue
Block a user