From 038c6432816cacde789c8eeebe1b9194519b8396 Mon Sep 17 00:00:00 2001 From: Zhao Qiqi <1287235164@qq.com> Date: Fri, 27 May 2022 18:40:17 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BE=9B=E5=BA=94=E9=93=BE=E7=AE=A1=E7=90=86-?= =?UTF-8?q?=E8=BD=A6=E5=9E=8B=E7=AE=A1=E7=90=86=E3=80=81=E5=90=88=E6=A0=BC?= =?UTF-8?q?=E8=AF=81=E5=8F=B0=E8=B4=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../anrui-buscenter-ui/.env.development | 7 +- .../src/components/uploadFile/upload.vue | 1 + .../anrui-buscenter-ui/src/utils/auth.js | 4 +- .../src/utils/requestmock.js | 67 ++ .../xiaoshoudingdanFlow/xiaoshoudingdan.vue | 2 +- .../xiaoshoudingdan/confirmLender.vue | 13 + .../xiaoshoudingdan/printContract.vue | 129 ++++ .../xiaoshoudingdan/xiaoshoudingdan.vue | 31 +- .../anrui-buscenter-ui/vue.config.js | 12 + .../api/cheliang/basevehiclecertificate.js | 5 +- .../components/uploadFile/ManyImageUpload.vue | 9 +- .../src/router/modules/codemenu.js | 33 +- .../anruiscm/scmwarehouse/scmwarehouse.vue | 4 +- .../anruiscm/scmwarehouse/scmwarehouseAdd.vue | 71 +- .../scmwarehouse/scmwarehouseInfo.vue | 37 +- .../cheliangtaizhang/cheliangtaizhangInfo.vue | 1 + .../chexing/relation/changyongpeizhi.vue | 14 +- .../relation/chexingguanlianchangyong.vue | 10 +- .../hegezhengtaizhang/hegezhengtaizhang.vue | 19 +- .../hegezhengtaizhangAdd.vue | 17 +- .../hegezhengguanli/hegezhengAdd.vue | 643 ------------------ .../hegezhengguanli/hegezhengInfo.vue | 178 ----- .../hegezhengguanli/hegezhengguanli.vue | 364 ---------- .../ruzhang/ruzhangguanli/ruzhangAdd.vue | 2 +- .../ruzhang/ruzhangguanli/ruzhangInfo.vue | 2 +- .../cheliangpaichan/cheliangpaichanAdd.vue | 2 +- .../cheliangpaichan/cheliangpaichanInfo.vue | 2 +- .../workFlow/caigoutuikuFlow/caigoutuiku.vue | 2 +- .../paichanguanli/cheliangpaichanEdit.vue | 2 +- .../paichanguanli/cheliangpaichanInfo.vue | 2 +- .../ruzhangguanli/ruzhangEdit.vue | 2 +- .../ruzhangguanli/ruzhangInfo.vue | 2 +- 32 files changed, 358 insertions(+), 1331 deletions(-) create mode 100644 anrui-buscenter/anrui-buscenter-ui/src/utils/requestmock.js create mode 100644 anrui-buscenter/anrui-buscenter-ui/src/views/xiaoshouguanli/xiaoshoudingdan/confirmLender.vue create mode 100644 anrui-buscenter/anrui-buscenter-ui/src/views/xiaoshouguanli/xiaoshoudingdan/printContract.vue delete mode 100644 anrui-scm/anrui-scm-ui/src/views/hegezheng/hegezhengguanli/hegezhengAdd.vue delete mode 100644 anrui-scm/anrui-scm-ui/src/views/hegezheng/hegezhengguanli/hegezhengInfo.vue delete mode 100644 anrui-scm/anrui-scm-ui/src/views/hegezheng/hegezhengguanli/hegezhengguanli.vue diff --git a/anrui-buscenter/anrui-buscenter-ui/.env.development b/anrui-buscenter/anrui-buscenter-ui/.env.development index f4212779c3..0c8e9236c7 100644 --- a/anrui-buscenter/anrui-buscenter-ui/.env.development +++ b/anrui-buscenter/anrui-buscenter-ui/.env.development @@ -5,7 +5,8 @@ ENV = 'development' VUE_APP_BASE_API = '/api' ## 配置测试和本地开发时的 接口地址 -##VUE_APP_URL = "http://26077a35f5.wicp.vip" -VUE_APP_URL = "http://192.168.2.101:8111" -##VUE_APP_URL = "http://127.0.0.1:8111" +####VUE_APP_URL = "http://26077a35f5.wicp.vip" +VUE_APP_URL = "http://26077a35f5.wicp.vip:25879" +##VUE_APP_URL = "http://192.168.2.44:8111" +VUE_APP_URL = "http://120.46.131.15:8111" ##VUE_APP_URL = "http://1mn7264414.qicp.vip" diff --git a/anrui-buscenter/anrui-buscenter-ui/src/components/uploadFile/upload.vue b/anrui-buscenter/anrui-buscenter-ui/src/components/uploadFile/upload.vue index 51900a1974..3a8363541e 100644 --- a/anrui-buscenter/anrui-buscenter-ui/src/components/uploadFile/upload.vue +++ b/anrui-buscenter/anrui-buscenter-ui/src/components/uploadFile/upload.vue @@ -104,6 +104,7 @@ immediate: true, handler(newVal, oldVal) { console.log('aaaa1', newVal) + console.log('aaaa2', oldVal) this.files = newVal if (this.stateName = 'xunidingjinAdd') { if (this.files.length > 1) { diff --git a/anrui-buscenter/anrui-buscenter-ui/src/utils/auth.js b/anrui-buscenter/anrui-buscenter-ui/src/utils/auth.js index aeb3cafab7..34b5a8fc8e 100644 --- a/anrui-buscenter/anrui-buscenter-ui/src/utils/auth.js +++ b/anrui-buscenter/anrui-buscenter-ui/src/utils/auth.js @@ -16,8 +16,8 @@ export function removeToken() { } export function getStorage() { - // return sessionStorage.getItem('token') - return 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyTm8iOiI0MjdhMmZiMC02MGM1LTQwOWYtYmVhNC00ZWI0NDEwNDFhZTYiLCJpc3MiOiJXQksiLCJleHAiOjE2NDgxMDg3MzB9.1dMDYO58kmX3uVRXqAoaf1i5eQlifqjuQBmg2nNVOkU' + return sessionStorage.getItem('token') + // return 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyTm8iOiI0MjdhMmZiMC02MGM1LTQwOWYtYmVhNC00ZWI0NDEwNDFhZTYiLCJpc3MiOiJXQksiLCJleHAiOjE2NTM2MTQwMjJ9.CAT-RYSdYeSIL_rDVNQsRJX4beAjU0YpKCd9uMkAL4A' } export function setStorage(session) { diff --git a/anrui-buscenter/anrui-buscenter-ui/src/utils/requestmock.js b/anrui-buscenter/anrui-buscenter-ui/src/utils/requestmock.js new file mode 100644 index 0000000000..8eb73badf7 --- /dev/null +++ b/anrui-buscenter/anrui-buscenter-ui/src/utils/requestmock.js @@ -0,0 +1,67 @@ +import axios from 'axios' +import { MessageBox, Message } from 'element-ui' +import store from '@/store' +import { getToken, getStorage } from '@/utils/auth' + +// create an axios instance +console.log(process.env.VUE_APP_URL) +const service = axios.create({ + baseURL: '/mockapi', // url = base url + request url + // timeout: 5000 // request timeout + headers:{'Content-Type':'application/x-www-form-urlencoded;'} +}) + +// request interceptor +service.interceptors.request.use( + config => { + config.params = { + ...config.params, + _t: Date.parse(new Date()) / 1000 + } + if (getStorage()) { + + config.headers['token'] = getStorage() + } + return config + }, + error => { + console.log(error) // for debug + return Promise.reject(error) + } +) + +// response interceptor +service.interceptors.response.use( + + response => { + const res = response.data + if(res.type !=undefined){ + return res + } + + if(res.contractNo !=undefined){ + return res + } + // if the custom code is not 20000, it is judged as an error. + if (res.code != 200) { + if (res.msg == "请重新登录") { + // window.location.href = 'http://39.104.100.138:8082/' + } else { + alert(res.msg); + } + } + return res + }, + error => { + console.log('err' + error) // for debug + Message({ + message: error.message, + type: 'error', + duration: 5 * 1000 + }) + + return Promise.reject(error) + } +) + +export default service diff --git a/anrui-buscenter/anrui-buscenter-ui/src/views/workflow/xiaoshouguanliFlow/xiaoshoudingdanFlow/xiaoshoudingdan.vue b/anrui-buscenter/anrui-buscenter-ui/src/views/workflow/xiaoshouguanliFlow/xiaoshoudingdanFlow/xiaoshoudingdan.vue index eac4d43bda..05a8aec9e9 100644 --- a/anrui-buscenter/anrui-buscenter-ui/src/views/workflow/xiaoshouguanliFlow/xiaoshoudingdanFlow/xiaoshoudingdan.vue +++ b/anrui-buscenter/anrui-buscenter-ui/src/views/workflow/xiaoshouguanliFlow/xiaoshoudingdanFlow/xiaoshoudingdan.vue @@ -11,7 +11,7 @@