| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091 | 
							- import Vue from 'vue'
 
- import App from './App'
 
- Vue.config.productionTip = false
 
- App.mpType = 'app'
 
- const app = new Vue({
 
-     ...App
 
- })
 
- // 引入文件
 
- import Dever from './lib/dever'
 
- // 绑定全局的组件
 
- import pageLoading from "./lib/pageLoading.vue";
 
- Vue.component('pageLoading', pageLoading);
 
- Vue.prototype.pageLoading = true;
 
- // 绑定到 Vue 的实例上
 
- Vue.prototype.Dever = Dever;
 
- // 载入全局配置 默认配置,防止第一次载入报错的,系统会自动从后台更新最新的配置
 
- var defaultConfig = {
 
- 	'system_name' : '幻境合集',
 
- 	'system_info' : '互联网赚钱创新模式',
 
- 	'system_phone' : '18611795659',
 
- 	//自动更新时间间隔
 
- 	'set_update' : 86400,
 
- 	//本次更新时间
 
- 	'update_time' : false,
 
- };
 
- Vue.prototype.Dever.init('', Vue, defaultConfig);
 
- //自定义get的loading效果,设置全屏loading
 
- Vue.prototype.Dever.setGetLoading(function(self) {
 
- 	self.vue.prototype.pageLoading = true;
 
- }, function(self) {
 
- 	self.vue.prototype.pageLoading = false;
 
- 	self.btnFinish();
 
- });
 
- //自定义post的loading
 
- Vue.prototype.Dever.setPostLoading(function(self) {
 
- 	self.btnLoad();
 
- 	uni.showLoading({title: '加载中', mask: true});
 
- }, function(self) {
 
- 	self.btnFinish();
 
- 	uni.hideLoading();
 
- });
 
- //设置switchTab
 
- Vue.prototype.Dever.switchTab = ['index/index'];
 
- //自定义switchTab页面回调,因为switchTab执行后不会自动刷新页面,这里需要做个回调
 
- Vue.prototype.Dever.switchTabCall = {
 
- 	'index/index' : function(self, e) {
 
- 		var page = self.getPage();
 
- 		if (!page) return;
 
- 		if ('getInfo' in page) {
 
- 			page.getInfo();
 
- 		}
 
- 	}
 
- };
 
- //载入一些通用的方法
 
- Vue.prototype.Dever.common({
 
- 	
 
- // 载入人工客服
 
- 'callPhone' : function() {
 
- 	uni.makePhoneCall({
 
- 		phoneNumber: Vue.prototype.$config.system_phone
 
- 	});
 
- },
 
- // 跳转到页面
 
- 'location' : function(e) {
 
- 	Vue.prototype.Dever.viewLocation(e);
 
- },
 
- // 提示
 
- 'alert' : function(e) {
 
- 	Vue.prototype.Dever.viewAlert(e);
 
- },
 
- })
 
- app.$mount()
 
 
  |