Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
car-database-web
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
中汽研标准应用数据库
car-database-web
Commits
5006f9ef
Commit
5006f9ef
authored
Oct 18, 2024
by
jiaxu.yan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat 提交
parent
3604e1ee
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
20 deletions
+4
-20
main.js
src/main.js
+0
-18
vue.config.js
vue.config.js
+4
-2
No files found.
src/main.js
View file @
5006f9ef
...
...
@@ -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
)
})
vue.config.js
View file @
5006f9ef
...
...
@@ -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
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment