Commit 1b0cd735 authored by xiabin's avatar xiabin

添加分享功能

parent 043f4528
......@@ -12,7 +12,6 @@ class AppAsset extends AssetBundle
public $basePath = '@webroot';
public $baseUrl = '@web';
public $css = [
'css/site.css',
];
public $js = [
];
......
......@@ -6,6 +6,24 @@
* Time: 下午5:39
*/
$this->title = "视频播放";
\backend\assets\AppAsset::register($this);
$js = <<<JS
window._bd_share_config = {
"common": {
"bdSnsKey": {},
"bdText": "",
"bdMini": "1",
"bdMiniList": ["qzone", "tsina", "weixin"],
"bdPic": "",
"bdStyle": "2",
"bdSize": "24"
}, "share": {}
};
with (document)0[(getElementsByTagName('head')[0] || body).appendChild(createElement('script')).src = 'http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion=' + ~(-new Date() / 36e5)];
JS;
$this->registerJs($js);
\frontend\assets\AppAsset::addCss($this, '@web/assets/css/main.css');
\frontend\assets\AppAsset::addScript($this, '@web/assets/home_video.js');
\frontend\assets\AppAsset::addCss($this, '@web/assets/css/home_video.css');
......
......@@ -2,10 +2,10 @@
<div class="container">
<div class="cnt-tit">
<h3>{{coursewareInfo.courseName}}</h3>
<div class="tit-share hidden-xs">
<a href="javascript:;" class="wechat post-icons"></a>
<a href="javascript:;" class="weibo post-icons"></a>
<a href="javascript:;" class="qzone post-icons"></a>
<div class="tit-share hidden-xs bdsharebuttonbox">
<a href="javascript:;" class="wechat post-icons bds_weixin" data-cmd="weixin" title="分享到微信"></a>
<a href="javascript:;" class="weibo post-icons bds_tsina" data-cmd="tsina" title="分享到新浪微博"></a>
<a href="javascript:;" class="qzone post-icons bds_qzone" data-cmd="qzone" title="分享到QQ空间"></a>
</div>
</div>
......@@ -109,3 +109,4 @@
}
}
</script>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment