hyapp-template
Advanced tools
Comparing version 1.0.3 to 1.0.4
@@ -59,3 +59,3 @@ 'use strict' | ||
limit: 10000, | ||
name: utils.assetsPath('img/[name].[hash:7].[ext]') | ||
name: utils.assetsPath('images/[name].[hash:7].[ext]') | ||
} | ||
@@ -62,0 +62,0 @@ }, |
{ | ||
"name": "hyapp-template", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "mvvm", | ||
@@ -5,0 +5,0 @@ "author": "yangbin <yangb@2345.com>", |
let env = { | ||
dev: 'http://127.0.0.1:9093', | ||
dev: 'http://localhost:8080', | ||
build: 'http://192.168.184.25:9093' | ||
} | ||
const getBaseUrl = () => { | ||
return process.env.NODE_ENV === 'development' ? env.dev : env.build | ||
export const getUrl = url => { | ||
return process.env.NODE_ENV === 'development' ? (env.dev + url) : (env.build + url) | ||
} | ||
export default getBaseUrl |
@@ -8,12 +8,15 @@ // The Vue build version to load with the `import` command | ||
import './errorLog' | ||
import * as filters from './filters' | ||
import hyappUI from 'hyapp-ui' | ||
import hyapp from 'hyapp-utils' | ||
import getBaseUrl from './api/env' | ||
// 工具类方法 | ||
Vue.use(hyapp.Tools) | ||
let Http = new hyapp.Utils({baseurl: getBaseUrl()}) | ||
Vue.use(Http) | ||
Vue.use(hyappUI) | ||
// 过滤器 | ||
Object.keys(filters).forEach(key => { | ||
Vue.filter(key, filters[key]) | ||
}) | ||
Vue.config.productionTip = false | ||
@@ -20,0 +23,0 @@ |
import Vue from 'vue' | ||
import Router from 'vue-router' | ||
import HelloWorld from '@/pages/HelloWorld' | ||
import HomeIndex from '@/pages/home/index' | ||
@@ -11,6 +11,6 @@ Vue.use(Router) | ||
path: '/', | ||
name: 'HelloWorld', | ||
component: HelloWorld | ||
name: 'home-page', | ||
component: HomeIndex | ||
} | ||
] | ||
}) |
@@ -6,3 +6,3 @@ /** | ||
*/ | ||
import {loginHandle} from '../../api/controller/HelloWorld/index' | ||
import {loginHandle} from '../../api/controller/home/index' | ||
@@ -9,0 +9,0 @@ // mutationsType |
import Vue from 'vue' | ||
import HelloWorld from '@/components/HelloWorld' | ||
import HelloWorld from '@/components/home' | ||
@@ -4,0 +4,0 @@ describe('HelloWorld.vue', () => { |
Sorry, the diff of this file is not supported yet
60299
43
1020