|
|
exports.ids = [22]; |
|
|
exports.modules = { |
|
|
|
|
|
/***/ 171: |
|
|
/***/ (function(module, exports, __webpack_require__) { |
|
|
|
|
|
// style-loader: Adds some css to the DOM by adding a <style> tag |
|
|
|
|
|
// load the styles |
|
|
var content = __webpack_require__(205); |
|
|
if(content.__esModule) content = content.default; |
|
|
if(typeof content === 'string') content = [[module.i, content, '']]; |
|
|
if(content.locals) module.exports = content.locals; |
|
|
// add CSS to SSR context |
|
|
var add = __webpack_require__(5).default |
|
|
module.exports.__inject__ = function (context) { |
|
|
add("7415669d", content, true, context) |
|
|
}; |
|
|
|
|
|
/***/ }), |
|
|
|
|
|
/***/ 204: |
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) { |
|
|
|
|
|
"use strict"; |
|
|
__webpack_require__.r(__webpack_exports__); |
|
|
/* harmony import */ var _node_modules_vue_style_loader_index_js_ref_7_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_7_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_3_node_modules_sass_resources_loader_lib_loader_js_ref_7_oneOf_1_4_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_id_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(171); |
|
|
/* harmony import */ var _node_modules_vue_style_loader_index_js_ref_7_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_7_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_3_node_modules_sass_resources_loader_lib_loader_js_ref_7_oneOf_1_4_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_id_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_vue_style_loader_index_js_ref_7_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_7_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_3_node_modules_sass_resources_loader_lib_loader_js_ref_7_oneOf_1_4_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_id_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_0__); |
|
|
/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _node_modules_vue_style_loader_index_js_ref_7_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_7_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_3_node_modules_sass_resources_loader_lib_loader_js_ref_7_oneOf_1_4_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_id_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_0__) if(["default"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _node_modules_vue_style_loader_index_js_ref_7_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_7_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_3_node_modules_sass_resources_loader_lib_loader_js_ref_7_oneOf_1_4_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_id_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__)); |
|
|
|
|
|
|
|
|
/***/ }), |
|
|
|
|
|
/***/ 205: |
|
|
/***/ (function(module, exports, __webpack_require__) { |
|
|
|
|
|
// Imports |
|
|
var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(4); |
|
|
var ___CSS_LOADER_GET_URL_IMPORT___ = __webpack_require__(6); |
|
|
var ___CSS_LOADER_URL_IMPORT_0___ = __webpack_require__(8); |
|
|
var ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(false); |
|
|
var ___CSS_LOADER_URL_REPLACEMENT_0___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_0___); |
|
|
// Module |
|
|
___CSS_LOADER_EXPORT___.push([module.i, "*{margin:0;border:none;padding:0}html{height:100%}body{position:relative;min-width:320px;min-height:100%;background:#fff;font-family:MicrosoftYaHei;font-size:0}body .outer-container{min-width:1258px}body .outer-container.isMobile{min-width:auto}body .outer-container.isMobile .content-container{padding:60px 0 62px;width:100%}body .outer-container.isMobile .content-container .left-content{display:block!important;margin-right:0!important;width:100%!important}body .outer-container.isMobile .content-container .footer-outer{position:absolute!important;min-width:auto!important}body .outer-container.isMobile .content-container .load-more{width:100%!important}body .outer-container.isMobile .content-container .common-flex{display:block!important}body .outer-container.isMobile .content-container .common-other-content{margin:0!important}body .outer-container.isMobile .content-container .common-other-content h6{margin-bottom:10px!important;font-size:20px!important;line-height:28px!important}body .outer-container.isMobile .content-container .common-other-content .font-content b,body .outer-container.isMobile .content-container .common-other-content .font-content h5,body .outer-container.isMobile .content-container .common-other-content .font-content h6,body .outer-container.isMobile .content-container .common-other-content .font-content p{margin-bottom:8px!important;font-size:16px!important;line-height:24px!important;word-break:break-all}body .outer-container.isMobile .content-container .common-other-content .font-content h5{font-size:18px!important}body .outer-container.isMobile.hasLoginBottom{padding-bottom:calc(env(safe-area-inset-bottom) + 55px)}body .outer-container.isMobile.hasLoginBottom .bottom-outer,body .outer-container.isMobile.hasLoginBottom .footer-outer{bottom:calc(constant(safe-area-inset-bottom) + 55px);bottom:calc(env(safe-area-inset-bottom) + 55px)}body .outer-container.isMobile.hasLoginBottom .fixed-box{bottom:calc(constant(safe-area-inset-bottom) + 65px)!important;bottom:calc(env(safe-area-inset-bottom) + 65px)!important}body .content-container{margin:0 auto;width:1080px}body img{vertical-align:top;-o-object-fit:cover;object-fit:cover}body a{text-decoration:none}body .text-ellipsis{display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}body .left-content{display:inline-block;margin-right:32px;width:723px}body .right-content{float:right;display:inline-block;width:325px}body .common-flex{display:grid;grid-template-columns:repeat(4,25%)}body .load-more{margin:0 auto;width:357px;height:50px;background:#f5f5f8;border-radius:4px;font-size:18px;font-family:PingFangSC-Regular,PingFang SC;font-weight:400;color:#939aa7;line-height:50px;text-align:center}body .footer-outer{position:fixed;bottom:0;left:0;width:100%;min-width:1258px;background:#f5f5f8;z-index:9}body .common-title{padding:20px 0 10px;text-align:left;font-size:24px;font-family:PingFangSC-Medium,PingFang SC;font-weight:500;color:#001965;line-height:33px}body .common-title a{float:right;font-size:16px;font-family:PingFangSC-Regular,PingFang SC;font-weight:400;color:#5d6269}body .common-title a i{color:#001965}body p.go-follow{margin-bottom:23px;height:50px;background:#e6553f;border-radius:4px;text-align:center;cursor:pointer;font-size:18px;font-family:PingFangSC-Medium,PingFang SC;font-weight:500;color:#fff;line-height:50px}body .common-other-content{margin:44px 0;padding:30px;box-sizing:border-box}body .common-other-content h6{margin-bottom:20px;font-size:24px;font-family:PingFangSC-Medium,PingFang SC;font-weight:500;color:#001965;line-height:33px}body .common-other-content .font-content b,body .common-other-content .font-content h5,body .common-other-content .font-content h6,body .common-other-content .font-content p{margin-bottom:12px;font-size:18px;color:#5d6269;line-height:30px}body .common-other-content .font-content h5{font-size:20px}body .el-message{top:50%!important}body .el-message i{font-size:16px}@media screen and (max-width:500px){body .el-message{min-width:200px;max-width:80%}}body .video-player-box .vjs-big-play-button{top:50%;left:50%;border:none;outline:none;width:68px;height:67px;transform:translate(-50%,-50%);background:url(" + ___CSS_LOADER_URL_REPLACEMENT_0___ + ") 50% no-repeat;background-color:transparent!important;background-size:68px 67px}body .video-player-box .vjs-big-play-button .vjs-icon-placeholder:before{display:none}body .video-player-box .vjs-control-bar button{outline:none}body .el-avatar>img{width:100%}.video-detail-page{position:relative}.video-detail-page>h4{margin-bottom:10px;border-bottom:1px solid #f5f5f8;padding-bottom:10px;font-size:32px;font-family:MicrosoftYaHei-Bold,MicrosoftYaHei;font-weight:700;color:#292b2c;line-height:44px}.video-detail-page>p:nth-child(2),.video-detail-page>p:nth-child(3){margin-bottom:10px;font-size:16px;font-family:Apis-Regular,Apis;font-weight:400;color:#bac0c2;line-height:28px}.video-detail-page .video-box{text-align:center}.video-detail-page .video-box .video-player-box{margin:0 auto;width:648px;height:360px}.video-detail-page .video-box .video-player-box>div{padding-top:360px}.video-detail-page .go-wechat{display:flex;margin:100px auto 30px;padding:51px 106px 33px 309px;width:648px;height:150px;background:#f5f5f8;border-radius:4px;box-sizing:border-box;align-items:center;justify-content:space-between;border-radius:12px;box-shadow:10px 10px 10px #f2f2f2;position:relative}.video-detail-page .go-wechat .content{margin-left:15px;flex:1;font-size:16px;color:#001965;line-height:31px;white-space:nowrap}.video-detail-page .go-wechat .content .bold{font-size:20px;font-weight:700}.video-detail-page .go-wechat .code{position:absolute;left:106px;top:-48px;flex-shrink:0;width:152px;height:152px;padding:10px;border-radius:8px;box-shadow:0 4px 18px 0 rgba(0,0,0,.13);background:#fff}.video-detail-page .go-follow{margin:40px 0 10px}.isMobile .video-detail-page{padding:0!important;background:#fff}.isMobile .video-detail-page .video-box{padding:0;height:auto;box-shadow:none}.isMobile .video-detail-page .video-box:after{display:none}.isMobile .video-detail-page .video-box .video-player-box{width:100%;height:auto}.isMobile .video-detail-page .video-box .video-player-box>div{padding-top:56.25%}.isMobile .video-detail-page>h4{margin:0 15px 4px;padding:20px 5px 16px;font-size:18px;line-height:24px}.isMobile .video-detail-page>p:nth-child(3){margin-bottom:25px;padding:0 22px;font-size:12px;line-height:17px}.isMobile .video-detail-page .mobile-recomment-video{margin:0 15px}.isMobile .video-detail-page .mobile-recomment-video a{overflow:hidden;display:inline-block;margin:0 15px 16px 0;width:calc(50% - 7.5px);background:#f5f5f8;border-radius:4px}.isMobile .video-detail-page .mobile-recomment-video a .video-img{position:relative}.isMobile .video-detail-page .mobile-recomment-video a .video-img span{position:absolute;top:6px;right:6px;padding:0 9px;height:24px;background:rgba(0,0,0,.4);border-radius:4px;font-size:14px;font-family:PingFangSC-Regular,PingFang SC;font-weight:400;color:#fff;line-height:24px}.isMobile .video-detail-page .mobile-recomment-video a .video-img>img:last-child{position:absolute;top:50%;left:50%;width:68px;transform:translate(-50%,-50%)}.isMobile .video-detail-page .mobile-recomment-video a p{margin:10px 0;padding:0 10px;min-height:66px;font-size:16px;color:#292b2c;line-height:22px;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden}.isMobile .video-detail-page .mobile-recomment-video a:nth-child(2n){margin-right:0}", ""]); |
|
|
// Exports |
|
|
module.exports = ___CSS_LOADER_EXPORT___; |
|
|
|
|
|
|
|
|
/***/ }), |
|
|
|
|
|
/***/ 225: |
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) { |
|
|
|
|
|
"use strict"; |
|
|
// ESM COMPAT FLAG |
|
|
__webpack_require__.r(__webpack_exports__); |
|
|
|
|
|
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/pages/video/_id.vue?vue&type=template&id=dbc44562& |
|
|
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"video-detail-page",staticStyle:{"padding":"30px 0 40px"}},[(_vm.deviceType === 'pc')?[_vm._ssrNode("<h4>"+_vm._ssrEscape(_vm._s(_vm.videoDetail.title))+"</h4> <p>"+_vm._ssrEscape("\n "+_vm._s(_vm.videoDetail.playNum)+" ")+"<i class=\"el-icon-view\"></i>"+_vm._ssrEscape(" "+_vm._s(_vm.videoDetail.publish_at)+"\n ")+"</p> "),_vm._ssrNode("<div class=\"video-box\">","</div>",[_c('video-player',{staticClass:"video-player-box",attrs:{"playsinline":true,"options":_vm.playerOptions},on:{"play":_vm.videoPlay}})],1),_vm._ssrNode(" <div class=\"go-wechat\"><img"+(_vm._ssrAttr("src",_vm.isPro ? _vm.qrcodeUrl : _vm.qrcodeUrlTest))+" alt class=\"code\"> <div class=\"content\">\n 微信扫码关注<span class=\"bold\">糖尿病网</span>公众号\n <br>\n 专业资讯随时看\n </div></div>")]:[_vm._ssrNode("<div class=\"video-box\">","</div>",[_c('video-player',{staticClass:"video-player-box",attrs:{"playsinline":true,"options":_vm.playerOptions},on:{"play":_vm.videoPlay}})],1),_vm._ssrNode(" <h4>"+_vm._ssrEscape(_vm._s(_vm.videoDetail.title))+"</h4> <p>"+_vm._ssrEscape("\n "+_vm._s(_vm.videoDetail.playNum)+" ")+"<i class=\"el-icon-view\"></i>"+_vm._ssrEscape(" "+_vm._s(_vm.videoDetail.publish_at)+"\n ")+"</p> "+((_vm.videoDetail.recommendList.length > 0)?("<div class=\"mobile-recomment-video\">"+(_vm._ssrList((_vm.videoDetail.recommendList),function(video){return ("<a"+(_vm._ssrAttr("href",'/video/' + video.id))+"><div class=\"video-img\"><img"+(_vm._ssrAttr("src",video.video_cover_url))+" alt"+(_vm._ssrStyle(null,{ height: _vm.mobileVideoImgHeight + 'px' }, null))+"> <span>"+_vm._ssrEscape(_vm._s(parseInt(video.video_time / 60) > 9 |
|
|
? parseInt(video.video_time / 60) |
|
|
: '0' + parseInt(video.video_time / 60))+":"+_vm._s(parseInt(video.video_time % 60) > 9 |
|
|
? parseInt(video.video_time % 60) |
|
|
: '0' + parseInt(video.video_time % 60)))+"</span> <img"+(_vm._ssrAttr("src",__webpack_require__(8)))+" alt class=\"play\"></div> <p>"+_vm._ssrEscape(_vm._s(video.title))+"</p></a>")}))+"</div>"):"<!---->"))],_vm._ssrNode(" "),_c('BottomRightFixed',{attrs:{"show-share":true,"show-like":true,"is-login":_vm.isLogin,"is-like":_vm.videoDetail.selfLike,"like-num":_vm.videoDetail.likeNum},on:{"likeClick":_vm.likeClick}})],2)} |
|
|
var staticRenderFns = [] |
|
|
|
|
|
|
|
|
// CONCATENATED MODULE: ./src/pages/video/_id.vue?vue&type=template&id=dbc44562& |
|
|
|
|
|
// EXTERNAL MODULE: external "vuex" |
|
|
var external_vuex_ = __webpack_require__(3); |
|
|
|
|
|
// CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--2-0!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/pages/video/_id.vue?vue&type=script&lang=js& |
|
|
// |
|
|
// |
|
|
// |
|
|
// |
|
|
// |
|
|
// |
|
|
// |
|
|
// |
|
|
// |
|
|
// |
|
|
// |
|
|
// |
|
|
// |
|
|
// |
|
|
// |
|
|
// |
|
|
// |
|
|
// |
|
|
// |
|
|
// |
|
|
// |
|
|
// |
|
|
// |
|
|
// |
|
|
// |
|
|
// |
|
|
// |
|
|
// |
|
|
// |
|
|
// |
|
|
// |
|
|
// |
|
|
// |
|
|
// |
|
|
// |
|
|
// |
|
|
// |
|
|
// |
|
|
// |
|
|
// |
|
|
// |
|
|
// |
|
|
// |
|
|
// |
|
|
// |
|
|
// |
|
|
// |
|
|
// |
|
|
// |
|
|
// |
|
|
// |
|
|
// |
|
|
// |
|
|
// |
|
|
// |
|
|
// |
|
|
// |
|
|
// |
|
|
// |
|
|
// |
|
|
// |
|
|
// |
|
|
// |
|
|
// |
|
|
// |
|
|
// |
|
|
// |
|
|
// |
|
|
// |
|
|
// |
|
|
// |
|
|
// |
|
|
// |
|
|
// |
|
|
// |
|
|
// |
|
|
// |
|
|
// |
|
|
// |
|
|
// |
|
|
// |
|
|
// |
|
|
// |
|
|
// |
|
|
// |
|
|
// |
|
|
// |
|
|
// |
|
|
// |
|
|
// |
|
|
// |
|
|
// |
|
|
// |
|
|
// |
|
|
// |
|
|
|
|
|
const { |
|
|
mapActions, |
|
|
mapGetters |
|
|
} = Object(external_vuex_["createNamespacedHelpers"])('user'); |
|
|
/* harmony default export */ var _idvue_type_script_lang_js_ = ({ |
|
|
name: 'VideoDetailPage', |
|
|
layout: 'detail', |
|
|
|
|
|
validate({ |
|
|
params |
|
|
}) { |
|
|
return /^\d+$/.test(params.id); |
|
|
}, |
|
|
|
|
|
async asyncData({ |
|
|
$axios, |
|
|
params, |
|
|
req, |
|
|
store, |
|
|
redirect |
|
|
}) { |
|
|
if (false) {} |
|
|
const data = await $axios.$get('/video/detail?vid=' + params.id, $axios.genSSROptions(req)); |
|
|
|
|
|
if (data.success === false) { |
|
|
redirect('/error?code=' + 404); |
|
|
} |
|
|
|
|
|
return { |
|
|
videoDetail: data.detail, |
|
|
playerOptions: { |
|
|
playbackRates: [0.7, 1.0, 1.5, 2.0], |
|
|
// 播放速度 |
|
|
autoplay: false, |
|
|
// 如果true,浏览器准备好时开始回放。 |
|
|
muted: false, |
|
|
// 默认情况下将会消除任何音频。 |
|
|
loop: false, |
|
|
// 导致视频一结束就重新开始。 |
|
|
preload: 'auto', |
|
|
// 建议浏览器在<video>加载元素后是否应该开始下载视频数据。auto浏览器选择最佳行为,立即开始加载视频(如果浏览器支持) |
|
|
language: 'en', |
|
|
fluid: true, |
|
|
// 当true时,Video.js player将拥有流体大小。换句话说,它将按比例缩放以适应其容器。 |
|
|
sources: [{ |
|
|
type: '', |
|
|
// 这里的种类支持很多种:基本视频格式、直播、流媒体等,具体可以参看git网址项目 |
|
|
src: data.detail.video_url // url地址 |
|
|
|
|
|
}], |
|
|
poster: data.detail.video_cover_url, |
|
|
// 你的封面地址 |
|
|
width: store.state.device.deviceType === 'pc' ? 648 : '', |
|
|
// 播放器宽度 |
|
|
height: store.state.device.deviceType === 'pc' ? 360 : '', |
|
|
aspectRatio: '16:9', |
|
|
notSupportedMessage: '此视频暂无法播放,请稍后再试', |
|
|
// 允许覆盖Video.js无法播放媒体源时显示的默认信息。 |
|
|
controlBar: { |
|
|
timeDivider: true, |
|
|
durationDisplay: true, |
|
|
remainingTimeDisplay: false, |
|
|
fullscreenToggle: true // 全屏按钮 |
|
|
|
|
|
} |
|
|
} |
|
|
}; |
|
|
}, |
|
|
|
|
|
data() { |
|
|
return { |
|
|
inLike: false, |
|
|
playerOptions: {}, |
|
|
mobileVideoHeight: 180, |
|
|
mobileVideoImgHeight: 77.3, |
|
|
isPro: false, |
|
|
qrcodeUrl: __webpack_require__(64), |
|
|
qrcodeUrlTest: __webpack_require__(65) |
|
|
}; |
|
|
}, |
|
|
|
|
|
head() { |
|
|
return { |
|
|
title: this.videoDetail.title, |
|
|
meta: [{ |
|
|
hid: 'description', |
|
|
name: 'description', |
|
|
content: 'Home page description' |
|
|
}] |
|
|
}; |
|
|
}, |
|
|
|
|
|
computed: { ...mapGetters({ |
|
|
isLogin: 'isLogin' |
|
|
}), |
|
|
|
|
|
deviceType() { |
|
|
return this.$store.state.device.deviceType; |
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
mounted() { |
|
|
this.isPro = "production" === 'production'; |
|
|
this.mobileVideoHeight = (document.documentElement.offsetWidth || document.body.offsetWidth) * 9 / 16; |
|
|
this.mobileVideoImgHeight = ((document.documentElement.offsetWidth || document.body.offsetWidth) - 45) / 2 * 9 / 16; |
|
|
}, |
|
|
|
|
|
methods: { ...mapActions({ |
|
|
showLoginDialog: 'showLoginDialog' |
|
|
}), |
|
|
|
|
|
async likeClick() { |
|
|
if (!this.isLogin) { |
|
|
this.showLoginDialog(true); |
|
|
} else if (this.inLike) { |
|
|
this.$message({ |
|
|
message: '您的操作太快了', |
|
|
type: 'warning' |
|
|
}); |
|
|
} else { |
|
|
this.baiduStat('视频详情页', 'click', '视频详情页点赞'); |
|
|
this.inLike = true; |
|
|
const data = await this.$axios.$post('/video/user-like', { |
|
|
vid: this.$route.params.id |
|
|
}); |
|
|
this.videoDetail.selfLike = data.detail.curState; |
|
|
|
|
|
if (data.detail.curState) { |
|
|
this.videoDetail.likeNum = Number(this.videoDetail.likeNum) + 1; |
|
|
} else { |
|
|
this.videoDetail.likeNum = Number(this.videoDetail.likeNum) - 1; |
|
|
} |
|
|
|
|
|
this.inLike = false; |
|
|
} |
|
|
}, |
|
|
|
|
|
async videoPlay(e) { |
|
|
if (e.cache_.currentTime === 0 || e.cache_.currentTime === undefined) { |
|
|
this.baiduStat('视频详情页', 'click', '视频详情页-播放视频'); |
|
|
await this.$axios.$post('/video/user-play', { |
|
|
vid: this.$route.params.id |
|
|
}); |
|
|
} |
|
|
} |
|
|
|
|
|
} |
|
|
}); |
|
|
// CONCATENATED MODULE: ./src/pages/video/_id.vue?vue&type=script&lang=js& |
|
|
/* harmony default export */ var video_idvue_type_script_lang_js_ = (_idvue_type_script_lang_js_); |
|
|
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js |
|
|
var componentNormalizer = __webpack_require__(1); |
|
|
|
|
|
// CONCATENATED MODULE: ./src/pages/video/_id.vue |
|
|
|
|
|
|
|
|
|
|
|
function injectStyles (context) { |
|
|
|
|
|
var style0 = __webpack_require__(204) |
|
|
if (style0.__inject__) style0.__inject__(context) |
|
|
|
|
|
} |
|
|
|
|
|
/* normalize component */ |
|
|
|
|
|
var component = Object(componentNormalizer["a" /* default */])( |
|
|
video_idvue_type_script_lang_js_, |
|
|
render, |
|
|
staticRenderFns, |
|
|
false, |
|
|
injectStyles, |
|
|
null, |
|
|
"2fc66f5a" |
|
|
|
|
|
) |
|
|
|
|
|
/* harmony default export */ var _id = __webpack_exports__["default"] = (component.exports); |
|
|
|
|
|
/* nuxt-component-imports */ |
|
|
installComponents(component, {BottomRightFixed: __webpack_require__(66).default}) |
|
|
|
|
|
|
|
|
/***/ }) |
|
|
|
|
|
};; |
|
|
//# sourceMappingURL=_id.js.map
|