Merge remote-tracking branch 'origin/dev' into dev
| | |
| | | </div> |
| | | </div> |
| | | </Form-item> |
| | | <Form-item label="视频时长:" :label-width="72"> |
| | | <div>{{formatSeconds(detail.videoDuration)}}</div> |
| | | </Form-item> |
| | | <Form-item class="video-warp" :label-width="0"> |
| | | <video :src="detail.videoUrl" autoplay controls style="width: 768px;height: 432px"/> |
| | | </Form-item> |
| | |
| | | </template> |
| | | <template slot-scope="{ row, index }" slot="videoFileKey"> |
| | | <div class="play-text" @click="playVideo(row.videoFileKey, row.title)">点击播放</div> |
| | | </template> |
| | | <template slot-scope="{ row, index }" slot="videoDuration"> |
| | | <div>{{formatSeconds(row.videoDuration)}}</div> |
| | | </template> |
| | | <template slot-scope="{ row, index }" slot="recommend"> |
| | | <i-switch v-model="row.recommend" :before-change="() => handleBeforeChange(row)" true-color="#13ce66"/> |
| | |
| | | slot: "videoFileKey" |
| | | }, |
| | | { |
| | | title: "时长", |
| | | key: "videoDuration", |
| | | width: 80, |
| | | align: 'center', |
| | | slot: "videoDuration", |
| | | }, |
| | | { |
| | | title: "播放量", |
| | | key: "playNum", |
| | | width: 80, |
| | |
| | | this.getTags('') |
| | | }, |
| | | methods: { |
| | | // 秒转x分x秒 |
| | | formatSeconds(seconds) { |
| | | if (isNaN(seconds) || seconds < 0) return '0秒'; |
| | | |
| | | const mins = Math.floor(seconds / 60); |
| | | const secs = seconds % 60; |
| | | |
| | | if (mins === 0) return `${secs}秒`; |
| | | if (secs === 0) return `${mins}分`; |
| | | |
| | | return `${mins}分${secs}秒`; |
| | | }, |
| | | // 获取标签列表 |
| | | getTags(tagName) { |
| | | let params = { |