<?php namespace core_next;
global $core_next_set;
?>
<div class="post-btns-warp">
    <?php
    if ($core_next_set['single_end_btn_like']) {
        ?>
        <div @click="addLike">
            <img class="post-btns" src="<?php echo Config::$img_url . "/icon/like.png" ?>" alt="icon">
            <div>{{post_like}}</div>
        </div>
        <?php
    }
    if ($core_next_set['single_end_btn_share']) {
        ?>
        <div @click="dialog.share=true">
            <img class="post-btns" src="<?php echo Config::$img_url . "/icon/share2.png" ?>" alt="icon">
            <div>分享</div>
        </div>
        <?php
    }
    if ($core_next_set['single_end_btn_qrcode']) {
        ?>
        <div @click="openQrcodeDialog">
            <img class="post-btns" src="<?php echo Config::$img_url . "/icon/qrcode.png" ?>" alt="icon">
            <div>二维码</div>
        </div>
        <?php
    }
    if ($core_next_set['single_end_btn_poster']) {
        ?>
        <div @click="openPosterDialog">
            <img class="post-btns" src="<?php echo Config::$img_url . "/icon/poster2.png" ?>" alt="icon">
            <div>海报</div>
        </div>
        <?php
    } ?>
</div>
<?php

if ($core_next_set['single_end_btn_share']) {
    $share_data['img_url'] = Config::$img_url;
    $excerpt = WordPress::getPostExcerpt(get_post());
    $share_data['qq_url'] = Tools::getShareUrl('qq', get_the_title(), $excerpt);
    $share_data['weibo_url'] = Tools::getShareUrl('weibo', get_the_title(), $excerpt);
    $share_data['qzone_url'] = Tools::getShareUrl('qzone', get_the_title(), $excerpt);
    echo Template::getTemplateHtml('share-dialog', $share_data);
}
if ($core_next_set['single_end_btn_poster']) {
    ?>
    <el-dialog
        title="分享海报"
        :visible.sync="dialog.poster"
        :width="getDialogWidth()"
        :close-on-click-modal="false"
        :append-to-body="true"
    >
        <div class="dialog-poster-warp">
            <div ref="poster_warp" v-show="show_poster_warp" v-html="poster_html" class="dialog-poster-main">
            </div>
            <div v-if="!show_poster_warp" class="poster-img-warp">
                <img :src="poster_data" alt="poster" class="poster-img">
            </div>
            <div v-if="!show_poster_warp">
                右键另存为或者长按保存图片
            </div>
        </div>
        <div slot="footer" class="dialog-footer">
            <el-button @click="dialog.poster = false">关 闭</el-button>
        </div>
    </el-dialog>
    <?php
}

if ($core_next_set['single_end_btn_qrcode']) {
    ?>
    <el-dialog
        title="二维码"
        :visible.sync="dialog.qrcode"
        :width="getDialogWidth()"
        :append-to-body="true"
    >
        <div class="dialog-qrcode-warp">
            <img :src="qrcode_data" alt="qrcode">
        </div>
        <div slot="footer" class="dialog-footer">
            <el-button @click="dialog.qrcode = false">关 闭</el-button>
        </div>
    </el-dialog>
    <?php
}
?>



