Commit 5006f9ef authored by jiaxu.yan's avatar jiaxu.yan

feat 提交

parent 3604e1ee
......@@ -130,9 +130,6 @@ Vue.use(Element, {
Vue.config.productionTip = false
// 导入apollo-boost模块实例化ApolloClient
import ApolloClient from 'apollo-boost'
import VueApollo from 'vue-apollo'
// 全局使用
Vue.use(VueApollo)
......@@ -140,25 +137,10 @@ Vue.use(VueApollo)
// 全局导入Echarts
import * as echarts from 'echarts'
Vue.prototype.$echarts = echarts
import { Message } from 'element-ui'
// 请求graphql使用的apollo API
const apolloClient = new ApolloClient({
// 服务端Url
uri: process.env.VUE_APP_CLIENT_API + '/query', //
onError(error) {
Message({ message: '车联网接口异常', type: 'error' })
// 处理错误
}
})
//创建apollo实例对象
const apolloProvider = new VueApollo({
defaultClient: apolloClient //默认查询
})
new Vue({
el: '#app',
router,
store,
apolloProvider,
render: h => h(App)
})
......@@ -18,7 +18,7 @@ module.exports = {
// 部署生产环境和开发环境下的URL。
// 默认情况下,Vue CLI 会假设你的应用是被部署在一个域名的根路径上
// 例如 https://www.ruoyi.vip/。如果应用被部署在一个子路径上,你就需要用这个选项指定这个子路径。例如,如果你的应用被部署在 https://www.ruoyi.vip/admin/,则设置 baseUrl 为 /admin/。
publicPath: process.env.NODE_ENV === 'production' ? './' : '/',
publicPath: process.env.NODE_ENV === 'production' ? '/' : '/',
// 在npm run build 或 yarn build 时 ,生成文件的目录名称(要和baseUrl的生产环境路径一致)(默认dist)
outputDir: 'dist',
// 用于放置生成的静态资源 (js、css、img、fonts) 的;(项目打包之后,静态资源会放在这个文件夹下)
......@@ -39,7 +39,9 @@ module.exports = {
// target: `http://192.168.10.171:22032`,
// target: `https://10.12.48.78/prod-api-2`,
target: `http://10.11.79.113:22033`,
// target: `http://10.11.79.113:22033`,
// target: `http://10.12.48.78:22033`,
target: `http://10.11.77.21:22018/`,
// target: `http://10.11.77.182:22016`,
changeOrigin: true,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment