1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192 |
- 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 ourLoading from '@/lib/our-loading/our-loading.vue'
- Vue.component('ourLoading', ourLoading)
- Vue.prototype.pageLoading = true;
- Vue.prototype.pageLoadingText = '加载中...';
- Vue.prototype.Dever = Dever;
- var defaultConfig = {
- 'system_name' : '云境',
- 'system_info' : '云境',
- 'system_logo' : '../../static/logo.png',
-
- 'set_update' : 86400,
-
- 'update_time' : false,
- };
- Vue.prototype.Dever.init('main/?l=api.config', Vue, defaultConfig);
- Vue.prototype.Dever.setGetLoading(function(self) {
- self.vue.prototype.pageLoading = true;
- }, function(self) {
- self.vue.prototype.pageLoading = false;
- self.btnFinish();
- });
- Vue.prototype.Dever.setPostLoading(function(self) {
- self.btnLoad();
- uni.showLoading({title: '加载中', mask: true});
- }, function(self) {
- self.btnFinish();
- uni.hideLoading();
- });
- Vue.prototype.Dever.switchTab = ['index/index'];
- 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()
|