0694d334 by renchao@pashanhoo.com

style:cas配置

1 parent 1fc44ade
...@@ -18,6 +18,9 @@ ...@@ -18,6 +18,9 @@
18 </title> 18 </title>
19 </head> 19 </head>
20 <script> 20 <script>
21 window.baseUrl = location.origin || location.protocol + '//' + location.host
22 window.timeout = 5000
23 const authorization = "bearer AT-4-MxSrO29Coe7VTazx8uuixtqqgO-hvCB6"
21 fetch('<%= BASE_URL %>config.json') 24 fetch('<%= BASE_URL %>config.json')
22 .then(response => response.json()) 25 .then(response => response.json())
23 .then(config => { 26 .then(config => {
...@@ -29,9 +32,4 @@ ...@@ -29,9 +32,4 @@
29 <div id="app"></div> 32 <div id="app"></div>
30 </body> 33 </body>
31 34
32 </html>
33 <script>
34 window.baseUrl = location.origin || location.protocol + '//' + location.host
35 window.timeout = 5000
36 window.authorization = "bearer AT-4-MxSrO29Coe7VTazx8uuixtqqgO-hvCB6"
37 </script>
...\ No newline at end of file ...\ No newline at end of file
35 </html>
...\ No newline at end of file ...\ No newline at end of file
......
1 /* 1 /*
2 * @Description: 2 * @Description:
3 * @Autor: renchao 3 * @Autor: renchao
4 * @LastEditTime: 2023-04-11 14:48:18 4 * @LastEditTime: 2023-05-16 09:17:28
5 */ 5 */
6 /** 6 /**
7 * 此文件主要创建 axios 实例,然后添加请求拦截器和响应拦截器 7 * 此文件主要创建 axios 实例,然后添加请求拦截器和响应拦截器
...@@ -12,11 +12,13 @@ import { endLoadingSubCount } from './requestLoading' ...@@ -12,11 +12,13 @@ import { endLoadingSubCount } from './requestLoading'
12 12
13 // create an axios instance 13 // create an axios instance
14 const service = axios.create({ 14 const service = axios.create({
15 baseURL: process.env.VUE_APP_BASE_API, 15 baseURL:
16 process.env.NODE_ENV == "development"
17 ? process.env.VUE_APP_BASE_API
18 : window.baseUrl + "/",
16 withCredentials: true, //是否允许跨域 19 withCredentials: true, //是否允许跨域
17 headers: { 20 headers: {
18 'Content-Type': 'application/json; charset=utf-8', 21 'Content-Type': 'application/json; charset=utf-8'
19 'Authorization': 'bearer AT-4-MxSrO29Coe7VTazx8uuixtqqgO-hvCB6'
20 }, 22 },
21 timeout: 15000 23 timeout: 15000
22 }) 24 })
...@@ -24,14 +26,18 @@ const service = axios.create({ ...@@ -24,14 +26,18 @@ const service = axios.create({
24 // request interceptor 26 // request interceptor
25 service.interceptors.request.use( 27 service.interceptors.request.use(
26 config => { 28 config => {
27 config.headers.Authorization = 29 // do something before request is sent
28 'bearer AT-4-MxSrO29Coe7VTazx8uuixtqqgO-hvCB6' 30 if (process.env.NODE_ENV === "production") {
29 config.headers.Accept = 'application/json' 31 return config;
30 return config 32 } else {
33 config.headers.Authorization = authorization;
34 return config;
35 }
31 }, 36 },
32 error => { 37 error => {
33 Message.error('请求超时!'); 38 // do something with request error
34 return Promise.reject(error) 39 console.log(error); // for debug
40 return Promise.reject(error);
35 } 41 }
36 ) 42 )
37 43
...@@ -44,13 +50,6 @@ service.interceptors.response.use( ...@@ -44,13 +50,6 @@ service.interceptors.response.use(
44 * 如果请求不成功,就在拦截器这里统一处理(组件的代码就不用关注错误的情况了) 50 * 如果请求不成功,就在拦截器这里统一处理(组件的代码就不用关注错误的情况了)
45 */ 51 */
46 if (response.status == 200) { 52 if (response.status == 200) {
47 // if (response.data.code == 500) {
48 // Message({
49 // message: response.data.message,
50 // type: 'error',
51 // duration: 5 * 1000
52 // })
53 // }
54 return response.data; 53 return response.data;
55 } else { 54 } else {
56 handleErrorData(response.data); 55 handleErrorData(response.data);
......
...@@ -182,82 +182,87 @@ ...@@ -182,82 +182,87 @@
182 </div> 182 </div>
183 </template> 183 </template>
184 <script> 184 <script>
185 import { mapGetters } from "vuex"; 185 import { mapGetters } from "vuex";
186 import qlrCommonTable from "@/views/workflow/components/qlrCommonTable"; 186 import qlrCommonTable from "@/views/workflow/components/qlrCommonTable";
187 import { Init, saveData } from "@/api/workflow/jsydsyqFlow.js"; 187 import { Init, saveData } from "@/api/workflow/jsydsyqFlow.js";
188 export default { 188 export default {
189 mounted () { 189 mounted () {
190 this.propsParam = this.$attrs; 190 this.propsParam = this.$attrs;
191 var formdata = new FormData(); 191 var formdata = new FormData();
192 this.$startLoading(); 192 this.$startLoading();
193 formdata.append("bsmSldy", this.propsParam.bsmSldy); 193 formdata.append("bsmSldy", this.propsParam.bsmSldy);
194 formdata.append("djlx", this.propsParam.djlx); 194 formdata.append("djlx", this.propsParam.djlx);
195 Init(formdata).then((res) => { 195 Init(formdata).then((res) => {
196 if (res.code === 200 && res.result) { 196 if (res.code === 200 && res.result) {
197 this.ruleForm = res.result; 197 this.ruleForm = res.result;
198 this.$endLoading(); 198 this.$endLoading();
199 }
200 });
201 },
202 components: { qlrCommonTable },
203 computed: {
204 ...mapGetters(["dictData", "flag"])
205 },
206 data () {
207 return {
208 disabled: true,
209 czrOptions: [],
210 ruleForm: {},
211 //传递参数
212 propsParam: {},
213 rules: {},
214 };
215 },
216 methods: {
217 // 更新权利人信息
218 upDateQlrxxList (val) {
219 this.ruleForm.qlrList = _.cloneDeep(val);
220 },
221 onSubmit () {
222 saveData(this.ruleForm).then((res) => {
223 if (res.code === 200) {
224 this.$message({
225 showClose: true,
226 message: "保存成功!",
227 type: "success",
228 });
229 } else {
230 this.$message({
231 showClose: true,
232 message: res.message,
233 type: "error",
234 });
235 } 199 }
236 }); 200 });
237 }, 201 },
238 compare () { 202 components: { qlrCommonTable },
239 this.$popup({ 203 computed: {
240 titleStyle: "left", 204 ...mapGetters(["dictData", "flag"])
241 title: "土地变化情况比对", // 弹窗标题 205 },
242 editItem: "registerBook/jsydsyq", // 弹窗内容 206 data () {
243 formData: this.propsParam, 207 return {
244 width: "1220px", 208 disabled: true,
245 height: "790px", 209 czrOptions: [],
246 // cancelText: '取消摆烂', // 右边按钮文本 210 ruleForm: {
247 // confirmText: '确定点击', //左边按钮文本 211 slywxx: {},
248 cancel: () => { 212 qlxx: {},
249 console.log("取消回调"); 213 zdjbxx: {},
250 }, 214 jsydsyq: {}
251 confirm: () => {
252 console.log("确认回调");
253 }, 215 },
254 }); 216 //传递参数
255 } 217 propsParam: {},
256 }, 218 rules: {},
219 };
220 },
221 methods: {
222 // 更新权利人信息
223 upDateQlrxxList (val) {
224 this.ruleForm.qlrList = _.cloneDeep(val);
225 },
226 onSubmit () {
227 saveData(this.ruleForm).then((res) => {
228 if (res.code === 200) {
229 this.$message({
230 showClose: true,
231 message: "保存成功!",
232 type: "success",
233 });
234 } else {
235 this.$message({
236 showClose: true,
237 message: res.message,
238 type: "error",
239 });
240 }
241 });
242 },
243 compare () {
244 this.$popup({
245 titleStyle: "left",
246 title: "土地变化情况比对", // 弹窗标题
247 editItem: "registerBook/jsydsyq", // 弹窗内容
248 formData: this.propsParam,
249 width: "1220px",
250 height: "790px",
251 // cancelText: '取消摆烂', // 右边按钮文本
252 // confirmText: '确定点击', //左边按钮文本
253 cancel: () => {
254 console.log("取消回调");
255 },
256 confirm: () => {
257 console.log("确认回调");
258 },
259 });
260 }
261 },
257 262
258 }; 263 };
259 </script> 264 </script>
260 <style scoped lang='scss'> 265 <style scoped lang='scss'>
261 @import "~@/styles/public.scss"; 266 @import "~@/styles/public.scss";
262 @import "~@/styles/slxx/slxx.scss"; 267 @import "~@/styles/slxx/slxx.scss";
263 </style> 268 </style>
......