forked from chenpp001/wallpaper
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.js
52 lines (42 loc) · 1.27 KB
/
main.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
import Vue from 'vue'
import App from './App'
import store from './static/js/store/store.js';
import config from './static/js/config.js';
Vue.prototype.$config = config;
import * as http from './static/js/request.js';
Vue.prototype.$http = http;
import md5 from './static/js/md5.js';
Vue.prototype.$Md5 = md5;
//权限相关的判断
import {common} from './static/js/mixin/common.js';
Vue.mixin(common);
// 挂载全局方法
import configs from "./common/config.js"
Vue.prototype.configs=configs
// import lib from "./common/lib.js"
// Vue.prototype.lib=lib
import request from "./common/request.js";
Vue.prototype.$httpas = request;
import ZAudio from '@/components/uniapp-zaudio/index.js'
// import ZAudio from 'uniapp-zaudio' // npm引用方式
console.log(`ZAudio当前版本`,ZAudio.version)
let zaudio = new ZAudio({
continuePlay: true, //续播
autoPlay: false, //自动播放 部分浏览器不支持
})
Vue.prototype.$zaudio = zaudio
Vue.prototype.$mbgColor='#ffffff'
//this.$mbgColor
//模拟初始数据
var data = [];
// 设置音频数据
//zaudio.setAudio(data)
//渲染第一首音频
zaudio.setRender(0)
Vue.config.productionTip = false
App.mpType = 'app'
const app = new Vue({
...App,
store
})
app.$mount()