@@ -15,6 +15,7 @@ | |||||
"@liripeng/vue-audio-player": "^1.2.11", | "@liripeng/vue-audio-player": "^1.2.11", | ||||
"@riophae/vue-treeselect": "0.4.0", | "@riophae/vue-treeselect": "0.4.0", | ||||
"@sscfaith/avue-form-design": "1.3.12", | "@sscfaith/avue-form-design": "1.3.12", | ||||
"aplayer": "^1.10.1", | |||||
"avue-plugin-ueditor": "^0.1.4", | "avue-plugin-ueditor": "^0.1.4", | ||||
"axios": "^0.18.0", | "axios": "^0.18.0", | ||||
"babel-polyfill": "^6.26.0", | "babel-polyfill": "^6.26.0", | ||||
@@ -19,14 +19,19 @@ import './styles/common.scss' | |||||
import AvueFormDesign from '@sscfaith/avue-form-design' | import AvueFormDesign from '@sscfaith/avue-form-design' | ||||
import basicContainer from './components/basic-container/main' | import basicContainer from './components/basic-container/main' | ||||
import api from './api' | import api from './api' | ||||
import AudioPlayer from '@liripeng/vue-audio-player' | import AudioPlayer from '@liripeng/vue-audio-player' | ||||
import '@liripeng/vue-audio-player/lib/vue-audio-player.css' | import '@liripeng/vue-audio-player/lib/vue-audio-player.css' | ||||
// 插件 json 展示 | // 插件 json 展示 | ||||
Vue.use(router) | Vue.use(router) | ||||
Vue.use(AvueFormDesign); | Vue.use(AvueFormDesign); | ||||
Vue.use(AudioPlayer) | Vue.use(AudioPlayer) | ||||
window.axios = axios | window.axios = axios | ||||
Vue.use(VueAxios, axios) | Vue.use(VueAxios, axios) | ||||
Vue.use(api) // 注册使用API模块 | Vue.use(api) // 注册使用API模块 | ||||
@@ -1,6 +1,6 @@ | |||||
<template> | <template> | ||||
<div class="hello"> | <div class="hello"> | ||||
<div class="player"> | |||||
<!-- <div class="player"> | |||||
{{ currentAudioName || audioList[0].name }} | {{ currentAudioName || audioList[0].name }} | ||||
<audio-player | <audio-player | ||||
ref="audioPlayer" | ref="audioPlayer" | ||||
@@ -11,11 +11,13 @@ | |||||
theme-color="#ff2929" | theme-color="#ff2929" | ||||
@playing="playing" | @playing="playing" | ||||
/> | /> | ||||
</div> | |||||
</div> --> | |||||
</div> | </div> | ||||
</template> | </template> | ||||
<script> | <script> | ||||
import 'APlayer/dist/APlayer.min.css'; | |||||
import APlayer from 'APlayer'; | |||||
export default { | export default { | ||||
data() { | data() { | ||||
return { | return { | ||||
@@ -34,17 +36,17 @@ export default { | |||||
}; | }; | ||||
}, | }, | ||||
methods: { | methods: { | ||||
handleBeforePlay(next) { | |||||
// 这里可以做一些事情... | |||||
this.currentAudioName = | |||||
this.audioList[this.$refs.audioPlayer.currentPlayIndex].name; | |||||
console.log("我要开始播放了"); | |||||
// handleBeforePlay(next) { | |||||
// // 这里可以做一些事情... | |||||
// this.currentAudioName = | |||||
// this.audioList[this.$refs.audioPlayer.currentPlayIndex].name; | |||||
// console.log("我要开始播放了"); | |||||
next(); // 开始播放 | |||||
}, | |||||
playing(e) { | |||||
console.log("我播放中", this.$refs.audioPlayer.currentTime); | |||||
}, | |||||
// next(); // 开始播放 | |||||
// }, | |||||
// playing(e) { | |||||
// console.log("我播放中", this.$refs.audioPlayer.currentTime); | |||||
// }, | |||||
}, | }, | ||||
mounted() {}, | mounted() {}, | ||||
}; | }; | ||||
@@ -3,9 +3,9 @@ | |||||
* https://cli.vuejs.org/zh/config/ | * https://cli.vuejs.org/zh/config/ | ||||
*/ | */ | ||||
// const url = 'http://pigx-gateway' | // const url = 'http://pigx-gateway' | ||||
// const url = 'http://39.97.167.65:9999' //测试 | |||||
const url = 'http://39.97.167.65:9999' //测试 | |||||
// const url = 'http://192.168.31.160:9999' //长龙 | // const url = 'http://192.168.31.160:9999' //长龙 | ||||
const url = 'http://192.168.31.133:9999' //嘉豪 | |||||
// const url = 'http://192.168.31.133:9999' //嘉豪 | |||||
// const url = 'http://192.168.31.100:9999' //王笑 | // const url = 'http://192.168.31.100:9999' //王笑 | ||||
const CompressionWebpackPlugin = require('compression-webpack-plugin') | const CompressionWebpackPlugin = require('compression-webpack-plugin') | ||||