luyanan 6 years ago
parent
commit
bd14c88b1c

+ 1 - 1
build/webpack.base.conf.js

@ -22,7 +22,7 @@ const createLintingRule = () => ({
22 22
module.exports = {
23 23
  context: path.resolve(__dirname, '../'),
24 24
  entry: {
25
    app: './src/main.js'
25
    app: ['babel-polyfill', './src/main.js']
26 26
  },
27 27
  output: {
28 28
    path: config.build.assetsRoot,

+ 1 - 1
config/dev.env.js

@ -4,5 +4,5 @@ const prodEnv = require('./prod.env')
4 4
5 5
module.exports = merge(prodEnv, {
6 6
  NODE_ENV: '"development"',
7
  BASE_API: '"https://easy-mock.com/mock/5950a2419adc231f356a6636/vue-admin"',
7
  BASE_API: '"http://localhost:90"'
8 8
})

+ 2 - 1
config/prod.env.js

@ -1,4 +1,5 @@
1 1
'use strict'
2 2
module.exports = {
3
  NODE_ENV: '"production"'
3
  NODE_ENV: '"production"',
4
  BASE_API: '"http://47.100.53.9"'
4 5
}

+ 1 - 0
index.html

@ -3,6 +3,7 @@
3 3
  <head>
4 4
    <meta charset="utf-8">
5 5
    <meta name="viewport" content="width=device-width,initial-scale=1.0">
6
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
6 7
    <title>声脉桥梁云监控平台</title>
7 8
  </head>
8 9
  <body>

+ 1 - 1
package.json

@ -1,5 +1,5 @@
1 1
{
2
  "name": "vueAdmin-touchwave",
2
  "name": "medicalTreatment",
3 3
  "version": "1.0.0",
4 4
  "description": "A vue admin template with Element UI & axios & iconfont & permission control & lint",
5 5
  "author": "luyanan <1271778060@qq.com>",

+ 2 - 1
src/main.js

@ -1,3 +1,5 @@
1
import 'babel-polyfill'
2
1 3
import Vue from 'vue'
2 4
3 5
import 'normalize.css/normalize.css'// A modern alternative to CSS resets
@ -6,7 +8,6 @@ import ElementUI from 'element-ui'
6 8
import 'element-ui/lib/theme-chalk/index.css'
7 9
8 10
import '@/styles/index.scss' // global css
9
import 'babel-polyfill'
10 11
11 12
import App from './App'
12 13
import router from './router'

+ 1 - 1
src/store/modules/permission.js

@ -46,7 +46,7 @@ const permission = {
46 46
  actions: {
47 47
    GenerateRoutes({ commit }, data) {
48 48
      return new Promise(resolve => {
49
        //  const { roles } = data
49
        // const { roles } = data
50 50
        const roles = ['2']
51 51
        const accessedRouters = filterAsyncRouter(asyncRouterMap, roles)
52 52
        console.log(accessedRouters)

+ 1 - 1
src/store/modules/user.js

@ -68,7 +68,7 @@ const user = {
68 68
                commit('SET_ACCOUNT', dataS.account)
69 69
                commit('SET_USERID', dataS.id)
70 70
                commit('SET_ROLES', ['2'])
71
                //  commit('SET_ROLES', [dataS.type.toString()])
71
                // commit('SET_ROLES', [dataS.type.toString()])
72 72
                commit('SET_NAME', dataS.name)
73 73
              }
74 74
            }

+ 1 - 1
src/utils/index.js

@ -1,7 +1,7 @@
1 1
/**
2 2
 * Created by luyanan on 18/8/13.
3 3
 */
4
export const comUrl = 'http://localhost:90'
4
export const comUrl = process.env.BASE_API
5 5
6 6
/**
7 7
 * 解析url参数