0694d334 by renchao@pashanhoo.com

style:cas配置

1 parent 1fc44ade
......@@ -18,6 +18,9 @@
</title>
</head>
<script>
window.baseUrl = location.origin || location.protocol + '//' + location.host
window.timeout = 5000
const authorization = "bearer AT-4-MxSrO29Coe7VTazx8uuixtqqgO-hvCB6"
fetch('<%= BASE_URL %>config.json')
.then(response => response.json())
.then(config => {
......@@ -30,8 +33,3 @@
</body>
</html>
\ No newline at end of file
<script>
window.baseUrl = location.origin || location.protocol + '//' + location.host
window.timeout = 5000
window.authorization = "bearer AT-4-MxSrO29Coe7VTazx8uuixtqqgO-hvCB6"
</script>
\ No newline at end of file
......
/*
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-04-11 14:48:18
* @LastEditTime: 2023-05-16 09:17:28
*/
/**
* 此文件主要创建 axios 实例,然后添加请求拦截器和响应拦截器
......@@ -12,11 +12,13 @@ import { endLoadingSubCount } from './requestLoading'
// create an axios instance
const service = axios.create({
baseURL: process.env.VUE_APP_BASE_API,
baseURL:
process.env.NODE_ENV == "development"
? process.env.VUE_APP_BASE_API
: window.baseUrl + "/",
withCredentials: true, //是否允许跨域
headers: {
'Content-Type': 'application/json; charset=utf-8',
'Authorization': 'bearer AT-4-MxSrO29Coe7VTazx8uuixtqqgO-hvCB6'
'Content-Type': 'application/json; charset=utf-8'
},
timeout: 15000
})
......@@ -24,14 +26,18 @@ const service = axios.create({
// request interceptor
service.interceptors.request.use(
config => {
config.headers.Authorization =
'bearer AT-4-MxSrO29Coe7VTazx8uuixtqqgO-hvCB6'
config.headers.Accept = 'application/json'
return config
// do something before request is sent
if (process.env.NODE_ENV === "production") {
return config;
} else {
config.headers.Authorization = authorization;
return config;
}
},
error => {
Message.error('请求超时!');
return Promise.reject(error)
// do something with request error
console.log(error); // for debug
return Promise.reject(error);
}
)
......@@ -44,13 +50,6 @@ service.interceptors.response.use(
* 如果请求不成功,就在拦截器这里统一处理(组件的代码就不用关注错误的情况了)
*/
if (response.status == 200) {
// if (response.data.code == 500) {
// Message({
// message: response.data.message,
// type: 'error',
// duration: 5 * 1000
// })
// }
return response.data;
} else {
handleErrorData(response.data);
......
......@@ -182,10 +182,10 @@
</div>
</template>
<script>
import { mapGetters } from "vuex";
import qlrCommonTable from "@/views/workflow/components/qlrCommonTable";
import { Init, saveData } from "@/api/workflow/jsydsyqFlow.js";
export default {
import { mapGetters } from "vuex";
import qlrCommonTable from "@/views/workflow/components/qlrCommonTable";
import { Init, saveData } from "@/api/workflow/jsydsyqFlow.js";
export default {
mounted () {
this.propsParam = this.$attrs;
var formdata = new FormData();
......@@ -207,7 +207,12 @@ export default {
return {
disabled: true,
czrOptions: [],
ruleForm: {},
ruleForm: {
slywxx: {},
qlxx: {},
zdjbxx: {},
jsydsyq: {}
},
//传递参数
propsParam: {},
rules: {},
......@@ -255,9 +260,9 @@ export default {
}
},
};
};
</script>
<style scoped lang='scss'>
@import "~@/styles/public.scss";
@import "~@/styles/slxx/slxx.scss";
@import "~@/styles/public.scss";
@import "~@/styles/slxx/slxx.scss";
</style>
......