Commit f0b54417 by 吴娟华

提交

1 parent 16976900
VUE_APP_BASE_API='https://e-shield.didihu.com.cn'
VUE_APP_ENV='production'
\ No newline at end of file \ No newline at end of file
VUE_APP_BASE_API='https://e-shield.glsx.net'
VUE_APP_ENV='test'
\ No newline at end of file \ No newline at end of file
module.exports = { module.exports = {
presets: [ presets: [
'@vue/cli-plugin-babel/preset' '@vue/cli-plugin-babel/preset'
],
"plugins": [
[
"component",
{
"libraryName": "element-ui",
"styleLibraryName": "theme-chalk"
}
]
] ]
} }
...@@ -2341,6 +2341,14 @@ ...@@ -2341,6 +2341,14 @@
"integrity": "sha1-3TeelPDbgxCwgpH51kwyCXZmF/0=", "integrity": "sha1-3TeelPDbgxCwgpH51kwyCXZmF/0=",
"dev": true "dev": true
}, },
"async-validator": {
"version": "1.8.5",
"resolved": "https://registry.npm.taobao.org/async-validator/download/async-validator-1.8.5.tgz?cache=0&sync_timestamp=1605749896979&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fasync-validator%2Fdownload%2Fasync-validator-1.8.5.tgz",
"integrity": "sha1-3D4I7B/Q3dtn5ghC8CwM0c7G1/A=",
"requires": {
"babel-runtime": "6.x"
}
},
"asynckit": { "asynckit": {
"version": "0.4.0", "version": "0.4.0",
"resolved": "https://registry.npm.taobao.org/asynckit/download/asynckit-0.4.0.tgz", "resolved": "https://registry.npm.taobao.org/asynckit/download/asynckit-0.4.0.tgz",
...@@ -2380,6 +2388,14 @@ ...@@ -2380,6 +2388,14 @@
"integrity": "sha1-1h9G2DslGSUOJ4Ta9bCUeai0HFk=", "integrity": "sha1-1h9G2DslGSUOJ4Ta9bCUeai0HFk=",
"dev": true "dev": true
}, },
"axios": {
"version": "0.21.1",
"resolved": "https://registry.npm.taobao.org/axios/download/axios-0.21.1.tgz?cache=0&sync_timestamp=1608609215811&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Faxios%2Fdownload%2Faxios-0.21.1.tgz",
"integrity": "sha1-IlY0gZYvTWvemnbVFu8OXTwJsrg=",
"requires": {
"follow-redirects": "^1.10.0"
}
},
"babel-eslint": { "babel-eslint": {
"version": "10.1.0", "version": "10.1.0",
"resolved": "https://registry.npm.taobao.org/babel-eslint/download/babel-eslint-10.1.0.tgz", "resolved": "https://registry.npm.taobao.org/babel-eslint/download/babel-eslint-10.1.0.tgz",
...@@ -2394,6 +2410,11 @@ ...@@ -2394,6 +2410,11 @@
"resolve": "^1.12.0" "resolve": "^1.12.0"
} }
}, },
"babel-helper-vue-jsx-merge-props": {
"version": "2.0.3",
"resolved": "https://registry.npm.taobao.org/babel-helper-vue-jsx-merge-props/download/babel-helper-vue-jsx-merge-props-2.0.3.tgz",
"integrity": "sha1-Iq69OzOQIyjlEyk6jkmSs4T58bY="
},
"babel-loader": { "babel-loader": {
"version": "8.2.2", "version": "8.2.2",
"resolved": "https://registry.npm.taobao.org/babel-loader/download/babel-loader-8.2.2.tgz?cache=0&sync_timestamp=1606424508891&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fbabel-loader%2Fdownload%2Fbabel-loader-8.2.2.tgz", "resolved": "https://registry.npm.taobao.org/babel-loader/download/babel-loader-8.2.2.tgz?cache=0&sync_timestamp=1606424508891&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fbabel-loader%2Fdownload%2Fbabel-loader-8.2.2.tgz",
...@@ -2406,6 +2427,38 @@ ...@@ -2406,6 +2427,38 @@
"schema-utils": "^2.6.5" "schema-utils": "^2.6.5"
} }
}, },
"babel-plugin-component": {
"version": "1.1.1",
"resolved": "https://registry.npm.taobao.org/babel-plugin-component/download/babel-plugin-component-1.1.1.tgz",
"integrity": "sha1-mwI6I/9cmq4P1WxaGLnKuMTUXuo=",
"dev": true,
"requires": {
"@babel/helper-module-imports": "7.0.0-beta.35"
},
"dependencies": {
"@babel/helper-module-imports": {
"version": "7.0.0-beta.35",
"resolved": "https://registry.npm.taobao.org/@babel/helper-module-imports/download/@babel/helper-module-imports-7.0.0-beta.35.tgz?cache=0&sync_timestamp=1604441076449&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fhelper-module-imports%2Fdownload%2F%40babel%2Fhelper-module-imports-7.0.0-beta.35.tgz",
"integrity": "sha1-MI41DnMXUs200PBY3x1wSSXGTgo=",
"dev": true,
"requires": {
"@babel/types": "7.0.0-beta.35",
"lodash": "^4.2.0"
}
},
"@babel/types": {
"version": "7.0.0-beta.35",
"resolved": "https://registry.npm.taobao.org/@babel/types/download/@babel/types-7.0.0-beta.35.tgz?cache=0&sync_timestamp=1608730470163&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Ftypes%2Fdownload%2F%40babel%2Ftypes-7.0.0-beta.35.tgz",
"integrity": "sha1-z5M6mpo4SEynJLM1uI2Dcm1auWA=",
"dev": true,
"requires": {
"esutils": "^2.0.2",
"lodash": "^4.2.0",
"to-fast-properties": "^2.0.0"
}
}
}
},
"babel-plugin-dynamic-import-node": { "babel-plugin-dynamic-import-node": {
"version": "2.3.3", "version": "2.3.3",
"resolved": "https://registry.npm.taobao.org/babel-plugin-dynamic-import-node/download/babel-plugin-dynamic-import-node-2.3.3.tgz", "resolved": "https://registry.npm.taobao.org/babel-plugin-dynamic-import-node/download/babel-plugin-dynamic-import-node-2.3.3.tgz",
...@@ -2415,6 +2468,27 @@ ...@@ -2415,6 +2468,27 @@
"object.assign": "^4.1.0" "object.assign": "^4.1.0"
} }
}, },
"babel-runtime": {
"version": "6.26.0",
"resolved": "https://registry.npm.taobao.org/babel-runtime/download/babel-runtime-6.26.0.tgz?cache=0&sync_timestamp=1589682807065&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fbabel-runtime%2Fdownload%2Fbabel-runtime-6.26.0.tgz",
"integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=",
"requires": {
"core-js": "^2.4.0",
"regenerator-runtime": "^0.11.0"
},
"dependencies": {
"core-js": {
"version": "2.6.12",
"resolved": "https://registry.npm.taobao.org/core-js/download/core-js-2.6.12.tgz",
"integrity": "sha1-2TM9+nsGXjR8xWgiGdb2kIWcwuw="
},
"regenerator-runtime": {
"version": "0.11.1",
"resolved": "https://registry.npm.taobao.org/regenerator-runtime/download/regenerator-runtime-0.11.1.tgz?cache=0&sync_timestamp=1595456311465&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fregenerator-runtime%2Fdownload%2Fregenerator-runtime-0.11.1.tgz",
"integrity": "sha1-vgWtf5v30i4Fb5cmzuUBf78Z4uk="
}
}
},
"balanced-match": { "balanced-match": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "https://registry.npm.taobao.org/balanced-match/download/balanced-match-1.0.0.tgz", "resolved": "https://registry.npm.taobao.org/balanced-match/download/balanced-match-1.0.0.tgz",
...@@ -4061,8 +4135,7 @@ ...@@ -4061,8 +4135,7 @@
"deepmerge": { "deepmerge": {
"version": "1.5.2", "version": "1.5.2",
"resolved": "https://registry.npm.taobao.org/deepmerge/download/deepmerge-1.5.2.tgz", "resolved": "https://registry.npm.taobao.org/deepmerge/download/deepmerge-1.5.2.tgz",
"integrity": "sha1-EEmdhohEza1P7ghC34x/bwyVp1M=", "integrity": "sha1-EEmdhohEza1P7ghC34x/bwyVp1M="
"dev": true
}, },
"default-gateway": { "default-gateway": {
"version": "5.0.5", "version": "5.0.5",
...@@ -4509,6 +4582,19 @@ ...@@ -4509,6 +4582,19 @@
"integrity": "sha1-aYC9kIE6n7dE5D9ehI8WzqSTAFg=", "integrity": "sha1-aYC9kIE6n7dE5D9ehI8WzqSTAFg=",
"dev": true "dev": true
}, },
"element-ui": {
"version": "2.14.1",
"resolved": "https://registry.npm.taobao.org/element-ui/download/element-ui-2.14.1.tgz",
"integrity": "sha1-i1dFxzZsHBpgO7bAIShupxh+KqI=",
"requires": {
"async-validator": "~1.8.1",
"babel-helper-vue-jsx-merge-props": "^2.0.0",
"deepmerge": "^1.2.0",
"normalize-wheel": "^1.0.1",
"resize-observer-polyfill": "^1.5.0",
"throttle-debounce": "^1.0.1"
}
},
"elliptic": { "elliptic": {
"version": "6.5.3", "version": "6.5.3",
"resolved": "https://registry.npm.taobao.org/elliptic/download/elliptic-6.5.3.tgz", "resolved": "https://registry.npm.taobao.org/elliptic/download/elliptic-6.5.3.tgz",
...@@ -5393,8 +5479,7 @@ ...@@ -5393,8 +5479,7 @@
"follow-redirects": { "follow-redirects": {
"version": "1.13.1", "version": "1.13.1",
"resolved": "https://registry.npm.taobao.org/follow-redirects/download/follow-redirects-1.13.1.tgz?cache=0&sync_timestamp=1607916886138&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ffollow-redirects%2Fdownload%2Ffollow-redirects-1.13.1.tgz", "resolved": "https://registry.npm.taobao.org/follow-redirects/download/follow-redirects-1.13.1.tgz?cache=0&sync_timestamp=1607916886138&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ffollow-redirects%2Fdownload%2Ffollow-redirects-1.13.1.tgz",
"integrity": "sha1-X2m4Ezds7k/QR0o6uoNd8Eq3Y7c=", "integrity": "sha1-X2m4Ezds7k/QR0o6uoNd8Eq3Y7c="
"dev": true
}, },
"for-in": { "for-in": {
"version": "1.0.2", "version": "1.0.2",
...@@ -7540,6 +7625,11 @@ ...@@ -7540,6 +7625,11 @@
"integrity": "sha1-suHE3E98bVd0PfczpPWXjRhlBVk=", "integrity": "sha1-suHE3E98bVd0PfczpPWXjRhlBVk=",
"dev": true "dev": true
}, },
"normalize-wheel": {
"version": "1.0.1",
"resolved": "https://registry.npm.taobao.org/normalize-wheel/download/normalize-wheel-1.0.1.tgz",
"integrity": "sha1-rsiGr/2wRQcNhWRH32Ls+GFG7EU="
},
"npm-run-path": { "npm-run-path": {
"version": "2.0.2", "version": "2.0.2",
"resolved": "https://registry.npm.taobao.org/npm-run-path/download/npm-run-path-2.0.2.tgz", "resolved": "https://registry.npm.taobao.org/npm-run-path/download/npm-run-path-2.0.2.tgz",
...@@ -8854,10 +8944,9 @@ ...@@ -8854,10 +8944,9 @@
"dev": true "dev": true
}, },
"qs": { "qs": {
"version": "6.5.2", "version": "6.9.4",
"resolved": "https://registry.npm.taobao.org/qs/download/qs-6.5.2.tgz", "resolved": "https://registry.npm.taobao.org/qs/download/qs-6.9.4.tgz",
"integrity": "sha1-yzroBuh0BERYTvFUzo7pjUA/PjY=", "integrity": "sha1-kJCykNH5FyjTwi5UhDykSupatoc="
"dev": true
}, },
"query-string": { "query-string": {
"version": "4.3.4", "version": "4.3.4",
...@@ -9155,6 +9244,14 @@ ...@@ -9155,6 +9244,14 @@
"tough-cookie": "~2.5.0", "tough-cookie": "~2.5.0",
"tunnel-agent": "^0.6.0", "tunnel-agent": "^0.6.0",
"uuid": "^3.3.2" "uuid": "^3.3.2"
},
"dependencies": {
"qs": {
"version": "6.5.2",
"resolved": "https://registry.npm.taobao.org/qs/download/qs-6.5.2.tgz",
"integrity": "sha1-yzroBuh0BERYTvFUzo7pjUA/PjY=",
"dev": true
}
} }
}, },
"require-directory": { "require-directory": {
...@@ -9175,6 +9272,11 @@ ...@@ -9175,6 +9272,11 @@
"integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=", "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=",
"dev": true "dev": true
}, },
"resize-observer-polyfill": {
"version": "1.5.1",
"resolved": "https://registry.npm.taobao.org/resize-observer-polyfill/download/resize-observer-polyfill-1.5.1.tgz",
"integrity": "sha1-DpAg3T0hAkRY1OvSfiPkAmmBBGQ="
},
"resolve": { "resolve": {
"version": "1.19.0", "version": "1.19.0",
"resolved": "https://registry.npm.taobao.org/resolve/download/resolve-1.19.0.tgz?cache=0&sync_timestamp=1605052120709&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fresolve%2Fdownload%2Fresolve-1.19.0.tgz", "resolved": "https://registry.npm.taobao.org/resolve/download/resolve-1.19.0.tgz?cache=0&sync_timestamp=1605052120709&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fresolve%2Fdownload%2Fresolve-1.19.0.tgz",
...@@ -10351,6 +10453,11 @@ ...@@ -10351,6 +10453,11 @@
"neo-async": "^2.6.0" "neo-async": "^2.6.0"
} }
}, },
"throttle-debounce": {
"version": "1.1.0",
"resolved": "https://registry.npm.taobao.org/throttle-debounce/download/throttle-debounce-1.1.0.tgz?cache=0&sync_timestamp=1604313832516&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fthrottle-debounce%2Fdownload%2Fthrottle-debounce-1.1.0.tgz",
"integrity": "sha1-UYU9o3vmihVctugns1FKPEIuic0="
},
"through": { "through": {
"version": "2.3.8", "version": "2.3.8",
"resolved": "https://registry.npm.taobao.org/through/download/through-2.3.8.tgz?cache=0&sync_timestamp=1589683627670&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fthrough%2Fdownload%2Fthrough-2.3.8.tgz", "resolved": "https://registry.npm.taobao.org/through/download/through-2.3.8.tgz?cache=0&sync_timestamp=1589683627670&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fthrough%2Fdownload%2Fthrough-2.3.8.tgz",
......
...@@ -3,12 +3,16 @@ ...@@ -3,12 +3,16 @@
"version": "0.1.0", "version": "0.1.0",
"private": true, "private": true,
"scripts": { "scripts": {
"serve": "vue-cli-service serve", "dev": "vue-cli-service serve",
"build": "vue-cli-service build", "build:test": "vue-cli-service build --mode test",
"build:prod": "vue-cli-service build --mode production",
"lint": "vue-cli-service lint" "lint": "vue-cli-service lint"
}, },
"dependencies": { "dependencies": {
"axios": "^0.21.1",
"core-js": "^3.6.5", "core-js": "^3.6.5",
"element-ui": "^2.14.1",
"qs": "^6.9.4",
"vue": "^2.6.11" "vue": "^2.6.11"
}, },
"devDependencies": { "devDependencies": {
...@@ -16,6 +20,7 @@ ...@@ -16,6 +20,7 @@
"@vue/cli-plugin-eslint": "~4.5.0", "@vue/cli-plugin-eslint": "~4.5.0",
"@vue/cli-service": "~4.5.0", "@vue/cli-service": "~4.5.0",
"babel-eslint": "^10.1.0", "babel-eslint": "^10.1.0",
"babel-plugin-component": "^1.1.1",
"eslint": "^6.7.2", "eslint": "^6.7.2",
"eslint-plugin-vue": "^6.2.2", "eslint-plugin-vue": "^6.2.2",
"vue-template-compiler": "^2.6.11" "vue-template-compiler": "^2.6.11"
......
No preview for this file type
<template> <template>
<div id="app"> <div id="app">
<img alt="Vue logo" src="./assets/logo.png"> <div class="wrap" v-show="mode==='default'">
<HelloWorld msg="Welcome to Your Vue.js App"/> <el-card class="box-card">
<div slot="header" class="clearfix box-card-title">
虎哥e盾保单下载系统
</div>
<div class="form_wrap">
<el-form ref="form" :rules="rules" :model="form" size="small" label-width="80px">
<el-form-item label="姓名" prop="name">
<el-input v-model="form.name"></el-input>
</el-form-item>
<el-form-item label="车架号" prop="standNo">
<el-input v-model="form.standNo"></el-input>
</el-form-item>
<el-form-item label="验证码" prop="code" style="width: 260px; float:left;">
<el-input v-model="form.code" ></el-input>
</el-form-item>
<div class="code_wrap">
<img :src="`${BASE_URL}ots/dync_captcha?${random}`" alt="" style="height: 33px;">
<el-link type="primary" @click.prevent="changeCodeImg">换一张</el-link>
</div>
<div style="clear:both;text-align: center">
<el-button type="primary" size="small" style="width:160px;" @click="submit" :loading="submitting">验证</el-button>
</div>
</el-form>
</div>
</el-card>
</div>
<div class="wrap" v-show="mode==='success'">
<el-card class="box-card">
<div slot="header" class="clearfix box-card-title">
验证通过
</div>
<div class="form_wrap">
<el-form size="small" label-width="90px" label-suffix=":">
<el-form-item label="姓名">
{{detail.name}}
</el-form-item>
<el-form-item label="车架号">
{{detail.standno}}
</el-form-item>
<el-form-item label="保险公司">
{{detail.insuranceCompany}}
</el-form-item>
<el-form-item label="出单时间">
{{detail.successTime}}
</el-form-item>
<el-form-item label="保险期限">
{{detail.insurancePeriodDesc}}
</el-form-item>
</el-form>
<div style="text-align:center">
<el-button type="primary" size="small" @click="print">打印</el-button>
<el-button size="small" @click="cancel">取消</el-button>
</div>
</div>
</el-card>
</div>
<div class="wrap" v-show="mode==='error'">
<el-card class="box-card">
<div slot="header" class="clearfix box-card-title">
验证不通过
</div>
<div class="form_wrap">
<p>无法查询到相关保单信息,请点击“关闭”后重新输入</p>
<div style="text-align:center">
<el-button type="primary" size="small" @click="close">关闭</el-button>
</div>
</div>
</el-card>
</div>
</div> </div>
</template> </template>
<script> <script>
import HelloWorld from './components/HelloWorld.vue' import {services} from './api';
import {BASE_URL} from './constant'
export default { export default {
name: 'App', name: 'App',
data(){
return {
BASE_URL,
mode: 'default',
random: Math.random(),
form: {
name: '',//'Maitest',
standNo: ''//'12MA0860511156335'
},
rules: {
name: [
{ required: true, message: '请输入姓名',},
],
standNo: [
{ required: true, message: '请输入车架号',},
],
code: [
{ required: true, message: '请输入验证码',},
],
},
detail: {
},
submitting: false
}
},
mounted() {
//services.common.checkInsurance()
},
methods: {
changeCodeImg(){
this.random = Math.random()
},
submit() {
this.$refs.form.validate(valid => {
if (valid) {
const form = this.form
this.submitting = true
services.common.checkInsurance({
name: form.name,
standno: form.standNo,
checkCode: form.code
}).then((res) => {
if(res.returnCode === '0') {
this.detail = res.data
this.mode = 'success'
this.resetForm()
}else if(res.returnCode === '1') {
this.mode = 'error'
this.resetForm()
}else if(res.returnCode === '-1004') {
this.changeCodeImg()
}
this.submitting = false
})
}
})
},
print() {
window.open(`${BASE_URL}ots/login/insurance/printInsurancePdf?insuranceNo=${this.detail.insuranceNo}`)
},
cancel() {
this.mode = 'default'
},
resetForm() {
this.$refs.form.resetFields()
this.changeCodeImg()
},
close() {
this.resetForm()
this.mode = 'default'
}
},
components: { components: {
HelloWorld
} }
} }
</script> </script>
<style> <style >
#app { #app {
font-family: Avenir, Helvetica, Arial, sans-serif; font-family: Avenir, Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale; -moz-osx-font-smoothing: grayscale;
text-align: center;
color: #2c3e50; color: #2c3e50;
margin-top: 60px; margin-top: 60px;
}
.wrap{
position: fixed;
height: 100%;
top: 0;
left: 0;
width: 100%;
display: flex;
justify-content: center;
align-items: center;
background: rgb(217, 236, 255);
}
.box-card{
width: 600px;
margin-top: -50px;
}
.box-card-title{
color: rgb(64, 158, 255);
font-size: 22px;
font-weight: bold;
}
.form_wrap{
padding: 0 50px;
}
.code_wrap{
display: flex;
}
.code_wrap img{
margin: 0 10px;
}
.box-card-title{
text-align: center;
} }
</style> </style>
import axios from "axios";
import qs from "qs";
import { Message } from "element-ui";
import {BASE_URL} from '../constant'
axios.interceptors.request.use(
(config) => {
//NProgress.start()
return config;
},
(error) => {
return Promise.reject(error);
}
);
axios.interceptors.response.use(
(response) => response,
(error) => Promise.resolve(error.response)
);
function checkStatus(response) {
if (response) {
if (response.status === 200 || response.status === 304) {
return response.data;
}
}
return {
returnCode: -404,
message: response.statusText,
data: response.statusText,
};
}
function checkCode(res) {
if (("returnCode" in res && res.returnCode != 0) || res.error) {
Message({
message: res.message,
type: "error",
});
}
return res;
}
export default {
post(url, data) {
return axios({
method: "post",
url: BASE_URL + url,
data: typeof data == "string" ? data : qs.stringify(data),
timeout: 30000,
headers: {
"X-Requested-With": "XMLHttpRequest",
"Content-Type":
typeof data == "string"
? "application/json"
: "application/x-www-form-urlencoded; charset=UTF-8",
},
})
.then(checkStatus)
.then(checkCode);
},
get(url, params) {
return axios({
method: "get",
url: BASE_URL + url,
params,
//timeout: 300000,
headers: {
"X-Requested-With": "XMLHttpRequest",
},
withCredentials: true,
})
.then(checkStatus)
.then(checkCode);
},
};
import SERVICES from './services'
import './config'
export const services = SERVICES
\ No newline at end of file \ No newline at end of file
import api from '../config.js'
export default {
checkInsurance (request = {}) {
return api.get('ots/login/insurance/checkInsurance', request)
},
printInsurancePdf (request = {}) {
return api.get('ots/login/insurance/printInsurancePdf', request)
},
}
\ No newline at end of file \ No newline at end of file
import common from './common'
export default {
common,
}
\ No newline at end of file \ No newline at end of file
let BASE_URL
console.log(process)
if(process.env.NODE_ENV === 'development') {
BASE_URL = '/'
}else {
BASE_URL = process.env.VUE_APP_BASE_API + '/'
}
export {BASE_URL}
\ No newline at end of file \ No newline at end of file
import Vue from 'vue' import Vue from 'vue'
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import App from './App.vue' import App from './App.vue'
Vue.config.productionTip = false Vue.config.productionTip = false
Vue.use(ElementUI);
new Vue({ new Vue({
render: h => h(App), render: h => h(App),
......
const path = require("path");
module.exports = {
devServer: {
historyApiFallback: true,
/*hot: true,*/
inline: true,
noInfo: true,
overlay: true,
port: 3000,
contentBase: "dist/",
proxy: {
"/ots": {
changeOrigin: true,
target: 'http://192.168.2.78:9999'//"http://e-shield.glsx.net", //'http://e-shield.didihu.com.cn'//'http://tnfk.branch.glsx.com.cn/'//'http://192.168.2.46:9999'//'http://192.168.2.57:9999/'//'http://192.168.1.158:8088'//'http://192.168.1.53:8088'//'http://localhost:8088'//'http://tiger-sso.didihu.com.cn'//
},
},
},
lintOnSave: false, // eslint-loader 是否在保存的时候检查
productionSourceMap: false, // 生产环境是否生成 sourceMap 文件
filenameHashing: true, //文件hash
configureWebpack: {
plugins: [
],
resolve: {
modules: ["node_modules",],
alias: {
vue$: "vue/dist/vue.esm.js",
components: path.resolve(__dirname, "./src/components"),
utils: path.resolve(__dirname, "./src/utils"),
pages: path.resolve(__dirname, "./src/pages"),
scss: path.resolve(__dirname, "./src/assets/SCSS"),
images: path.resolve(__dirname, "./src/assets/images"),
"./patterns": path.resolve(__dirname, "./src/assets/images"),
},
extensions: ["*", ".js", ".vue", ".json"],
},
},
chainWebpack: (config) => {
config.optimization.splitChunks({
chunks: "all",
maxInitialRequests: Infinity,
minSize: 300000, // 依赖包超过300000bit将被单独打包
automaticNameDelimiter: "-",
cacheGroups: {
vendor: {
test: /[\\/]node_modules[\\/]/,
name(module) {
const packageName = module.context.match(
/[\\/]node_modules[\\/](.*?)([\\/]|$)/
)[1];
return `chunk.${packageName.replace("@", "")}`;
},
priority: 10,
},
},
});
config
.plugin('html')
.tap(args => {
args[0].title= '虎哥e盾保单下载系统'
return args
})
},
};
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!