初始化(包含登录模块)
This commit is contained in:
100
main.js
Normal file
100
main.js
Normal file
@@ -0,0 +1,100 @@
|
||||
import Vue from 'vue'
|
||||
import App from './App'
|
||||
import qs from 'qs'
|
||||
|
||||
// import {
|
||||
// music,
|
||||
// bgm
|
||||
// } from '@/utils/music.js'
|
||||
// Vue.prototype.$music = music
|
||||
// Vue.prototype.$bgm = bgm
|
||||
|
||||
|
||||
import {
|
||||
nowHour
|
||||
} from '@/utils/getHours.js'
|
||||
Vue.prototype.$getHours = nowHour
|
||||
import commonJS from '@/common/commonJS.js'
|
||||
Vue.prototype.$commonJS = commonJS
|
||||
import http from '@/config/requestConfig.js';
|
||||
Vue.prototype.$http = http
|
||||
// 地址
|
||||
// Vue.prototype.$baseUrl = "http://192.168.110.100:9100/pb/"
|
||||
// Vue.prototype.$baseUrl = "http://59.110.212.44:9100/pb/"
|
||||
Vue.prototype.$baseUrl = "https://api.nuttyreading.com/"
|
||||
// 安卓安卓包下载地址
|
||||
// Vue.prototype.$apkUrl = "https://www.nuttyreading.com/nuttyreading.apk" // 本地地址
|
||||
Vue.prototype.$apkUrl = "https://a.app.qq.com/o/simple.jsp?pkgname=com.cn.nuttyreading" // 应用宝
|
||||
|
||||
// 判断手机型号
|
||||
|
||||
uni.getSystemInfo({
|
||||
success: function (res) {
|
||||
|
||||
Vue.prototype.iosHidden = true;
|
||||
if (res.platform == 'ios') {
|
||||
|
||||
Vue.prototype.iosHidden = false;//ios临时隐藏听书
|
||||
Vue.prototype.iosHide = true;
|
||||
|
||||
} else {
|
||||
Vue.prototype.iosHide = true;
|
||||
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
|
||||
// uView组件库
|
||||
import uView from '@/uni_modules/uview-ui'
|
||||
Vue.use(uView)
|
||||
// 传参格式
|
||||
Vue.prototype.$qs = qs
|
||||
//数据管理中心
|
||||
import store from '@/store'
|
||||
Vue.prototype.$store = store;
|
||||
// 工具
|
||||
import '@/plugins/utils.js';
|
||||
//权限配置中心
|
||||
import base from '@/config/baseUrl'
|
||||
Vue.prototype.$base = base;
|
||||
//挂载全局http请求
|
||||
import $http from '@/config/requestConfig'
|
||||
Vue.prototype.$http = $http;
|
||||
// #ifdef MP-WEIXIN
|
||||
//挂载全局微信分享
|
||||
import {
|
||||
wxShare
|
||||
} from '@/config/utils'
|
||||
Vue.prototype.wxShare = wxShare;
|
||||
// #endif
|
||||
//判断是否登录
|
||||
import {
|
||||
judgeLogin
|
||||
} from '@/config/login';
|
||||
Vue.prototype.judgeLogin = judgeLogin;
|
||||
Vue.config.productionTip = false;
|
||||
// #ifdef H5
|
||||
//微信SDK
|
||||
import '@/plugins/wxJsSDK.js';
|
||||
|
||||
// #endif
|
||||
//全局组件
|
||||
// import jquery from "jquery";
|
||||
// Vue.prototype.$ = jquery;
|
||||
import MescrollBody from "@/components/mescroll-uni/mescroll-body.vue";
|
||||
// import config from 'uview-ui/libs/config/config'
|
||||
Vue.component("mescroll-body", MescrollBody);
|
||||
|
||||
// import musicPlay from '@/components/music.vue'
|
||||
// Vue.component('music-play', musicPlay);
|
||||
|
||||
|
||||
App.mpType = 'app'
|
||||
|
||||
const app = new Vue({
|
||||
store,
|
||||
...App
|
||||
})
|
||||
app.$mount();
|
||||
Reference in New Issue
Block a user