提示拦截特殊函数

master
yujialong 3 years ago
parent da09883765
commit fdcf5414ec
  1. BIN
      public/favicon.ico
  2. 9
      src/components/codemirror.vue
  3. 4
      src/utils/http.js

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

@ -1,6 +1,6 @@
<template> <template>
<div style="display:flex;"> <div style="display:flex;">
<div style="position:relative;width: 100%;" class="button"> <div class="left">
<codemirror <codemirror
v-model="exampleData" v-model="exampleData"
:value="codeid" :value="codeid"
@ -324,7 +324,8 @@ export default {
} }
} }
}) })
.catch(err => { .catch(res => {
res.status == 500 && this.$message.error('检测到代码里有非法代码,请检查是否有调用系统命令。')
this.loadIns.close() this.loadIns.close()
}); });
clearTimeout(this.timer); clearTimeout(this.timer);
@ -366,6 +367,10 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.left{
position: relative;
width: calc(100% - 400px);
}
.text-wrapper { .text-wrapper {
white-space: pre-wrap; white-space: pre-wrap;
} }

@ -185,9 +185,7 @@ export function post(url, params) {
); );
break; break;
case 500: case 500:
this.$message.error( reject(res.data)
res.data.errmessage
);
break; break;
case 404: case 404:
this.$message.error( this.$message.error(

Loading…
Cancel
Save