123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108 |
- import Vue from 'vue'
- import store from './store'
- import App from './App'
- import request from './utils/request'
- import {
- checkPaginationHasMore,
- checkSpace,
- replaceConByPosition,
- getPartNumber,
- checkMobile,
- checkPwd,
- loginGoPage,
- formatW,
- checkEmail,
- diyNavTo,
- setCookie,
- setStoreIsCookie,
- isWeiXinBrower,
- weiXinBrowerShare,
- weiXinAppShare,
- getQueryVariable,
- weiXinBrowerPay,
- sldCommonTip,
- getLoginClient,
- formatPercent,
- setPointIsCookie,
- frequentyleClick,
- back,
- getCurLanguage,
- isShowTime,
- formatChatTime,
- } from './utils/common.js'
- const msg = (title, duration = 1500, mask = false, icon = 'none') => {
- //统一提示方便全局修改
- if (Boolean(title) === false) {
- return;
- }
- uni.showToast({
- title,
- duration,
- mask,
- icon
- });
- }
- const prePage = () => {
- let pages = getCurrentPages();
- let prePage = pages[pages.length - 2];
- // // #ifdef H5
- return prePage;
- // // #endif
- return prePage.$vm;
- }
- const updateToken = () => {
- App.methods.updateAccessToken();
- }
- Vue.config.productionTip = false
- Vue.prototype.$fire = new Vue();
- Vue.prototype.$store = store;
- Vue.prototype.$request = request;
- Vue.prototype.$checkPaginationHasMore = checkPaginationHasMore;
- Vue.prototype.$checkSpace = checkSpace;
- Vue.prototype.$replaceConByPosition = replaceConByPosition;
- Vue.prototype.$getPartNumber = getPartNumber;
- Vue.prototype.$checkMobile = checkMobile;
- Vue.prototype.$checkPwd = checkPwd;
- Vue.prototype.$loginGoPage = loginGoPage;
- Vue.prototype.$formatW = formatW;
- Vue.prototype.$checkEmail = checkEmail;
- Vue.prototype.$diyNavTo = diyNavTo;
- Vue.prototype.$setCookie = setCookie;
- Vue.prototype.$formatPercent = formatPercent;
- Vue.prototype.$setStoreIsCookie = setStoreIsCookie;
- Vue.prototype.$setPointIsCookie = setPointIsCookie;
- Vue.prototype.$frequentyleClick = frequentyleClick;
- Vue.prototype.$L = getCurLanguage;
- Vue.prototype.$api = {
- msg,
- prePage
- };
- Vue.prototype.$isWeiXinBrower = isWeiXinBrower;
- Vue.prototype.$weiXinBrowerShare = weiXinBrowerShare;
- Vue.prototype.$weiXinAppShare = weiXinAppShare;
- Vue.prototype.$getQueryVariable = getQueryVariable;
- Vue.prototype.$weiXinBrowerPay = weiXinBrowerPay;
- Vue.prototype.$sldCommonTip = sldCommonTip;
- Vue.prototype.$getLoginClient = getLoginClient;
- Vue.prototype.$back= back;
- Vue.prototype.$isShowTime = isShowTime;
- Vue.prototype.$formatChatTime = formatChatTime;
- App.mpType = 'app'
- //全局注册组件
- import loadingState from '@/components/loading-state'
- Vue.component('loadingState',loadingState)
- // import DiyTabBar from './extra/tshou/component/DiyTabBar'
- // Vue.component('DiyTabBar',DiyTabBar)
- const app = new Vue({
- ...App
- })
- app.$mount()
|