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 => {
......@@ -29,9 +32,4 @@
<div id="app"></div>
</body>
</html>
<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
</html>
\ 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,82 +182,87 @@
</div>
</template>
<script>
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();
this.$startLoading();
formdata.append("bsmSldy", this.propsParam.bsmSldy);
formdata.append("djlx", this.propsParam.djlx);
Init(formdata).then((res) => {
if (res.code === 200 && res.result) {
this.ruleForm = res.result;
this.$endLoading();
}
});
},
components: { qlrCommonTable },
computed: {
...mapGetters(["dictData", "flag"])
},
data () {
return {
disabled: true,
czrOptions: [],
ruleForm: {},
//传递参数
propsParam: {},
rules: {},
};
},
methods: {
// 更新权利人信息
upDateQlrxxList (val) {
this.ruleForm.qlrList = _.cloneDeep(val);
},
onSubmit () {
saveData(this.ruleForm).then((res) => {
if (res.code === 200) {
this.$message({
showClose: true,
message: "保存成功!",
type: "success",
});
} else {
this.$message({
showClose: true,
message: res.message,
type: "error",
});
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();
this.$startLoading();
formdata.append("bsmSldy", this.propsParam.bsmSldy);
formdata.append("djlx", this.propsParam.djlx);
Init(formdata).then((res) => {
if (res.code === 200 && res.result) {
this.ruleForm = res.result;
this.$endLoading();
}
});
},
compare () {
this.$popup({
titleStyle: "left",
title: "土地变化情况比对", // 弹窗标题
editItem: "registerBook/jsydsyq", // 弹窗内容
formData: this.propsParam,
width: "1220px",
height: "790px",
// cancelText: '取消摆烂', // 右边按钮文本
// confirmText: '确定点击', //左边按钮文本
cancel: () => {
console.log("取消回调");
},
confirm: () => {
console.log("确认回调");
components: { qlrCommonTable },
computed: {
...mapGetters(["dictData", "flag"])
},
data () {
return {
disabled: true,
czrOptions: [],
ruleForm: {
slywxx: {},
qlxx: {},
zdjbxx: {},
jsydsyq: {}
},
});
}
},
//传递参数
propsParam: {},
rules: {},
};
},
methods: {
// 更新权利人信息
upDateQlrxxList (val) {
this.ruleForm.qlrList = _.cloneDeep(val);
},
onSubmit () {
saveData(this.ruleForm).then((res) => {
if (res.code === 200) {
this.$message({
showClose: true,
message: "保存成功!",
type: "success",
});
} else {
this.$message({
showClose: true,
message: res.message,
type: "error",
});
}
});
},
compare () {
this.$popup({
titleStyle: "left",
title: "土地变化情况比对", // 弹窗标题
editItem: "registerBook/jsydsyq", // 弹窗内容
formData: this.propsParam,
width: "1220px",
height: "790px",
// cancelText: '取消摆烂', // 右边按钮文本
// confirmText: '确定点击', //左边按钮文本
cancel: () => {
console.log("取消回调");
},
confirm: () => {
console.log("确认回调");
},
});
}
},
};
};
</script>
<style scoped lang='scss'>
@import "~@/styles/public.scss";
@import "~@/styles/slxx/slxx.scss";
@import "~@/styles/public.scss";
@import "~@/styles/slxx/slxx.scss";
</style>
......