1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192 |
- import Vue from 'vue'
- import App from './App'
- import { config } from './config/config'
- import store from './store'
- import Request from '@/js_sdk/luch-request/luch-request/index.js';
- const http = new Request();
- http.interceptors.response.use((response) => {
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- if (response.config.custom.verification) {
- return response.data
- }
-
- return response
- }, (response) => {
- console.log(response);
- return Promise.reject(response)
- });
- const msg = (title, duration=1500, mask=false, icon='none')=>{
- if(Boolean(title) === false){
- return;
- }
- uni.showToast({
- title,
- duration,
- mask,
- icon
- });
- };
- const href = (data,type = 1) =>{
- uni.navigateTo({
- url:data,
- fail:function(err){
- console.log('navigateTo fail',err)
- }
- })
- };
- Vue.config.productionTip = false;
- Vue.prototype.$api = {msg,http,href};
- Vue.prototype.$getimg = config.imgUrl;
- Vue.prototype.$getInnerImg = config.innerImgUrl;
- Vue.prototype.$placeImg = config.placeImg;
- Vue.prototype.$store = store;
- Vue.prototype.config = config;
- App.mpType = 'app'
- const app = new Vue({
- ...App
- })
- app.$mount()
|