【modify】使用ESLint格式化代码

This commit is contained in:
zer0Black
2023-03-01 09:33:58 +08:00
parent 694855ae8b
commit 63369b8b87
400 changed files with 42942 additions and 43132 deletions
+50 -51
View File
@@ -35,58 +35,57 @@
</a-card>
</template>
<script>
import { axios } from '@/utils/request'
import { ACCESS_TOKEN } from "@/store/mutation-types"
import Vue from 'vue'
export default {
name: 'FlowTest',
data(){
return {
url:"",
paramJson:"",
resultJson:{},
requestMethod:"POST"
import { axios } from '@/utils/request'
import { ACCESS_TOKEN } from '@/store/mutation-types'
import Vue from 'vue'
export default {
name: 'FlowTest',
data () {
return {
url: '',
paramJson: '',
resultJson: {},
requestMethod: 'POST'
}
},
methods: {
onSearch (value) {
const that = this
if (!value) {
that.$message.error('请填写路径')
return false
}
this.resultJson = {}
axios({
url: value,
method: this.requestMethod,
data: this.paramJson
}).then((res) => {
console.log(res)
this.resultJson = res
}).catch((err) => {
that.$message.error('请求异常' + err)
})
},
changeVal (e) {
try {
let json = e.target.value
if (json.indexOf(',}') > 0) {
json = json.replace(',}', '}')
}
this.paramJson = JSON.parse(json)
} catch (e) {
console.log(e)
this.$message.error('非法的JSON字符串')
}
},
methods: {
onSearch (value) {
let that = this
if(!value){
that.$message.error("请填写路径")
return false
}
this.resultJson = {};
axios({
url: value,
method: this.requestMethod,
data: this.paramJson
}).then((res) => {
console.log(res)
this.resultJson = res
}).catch((err) => {
that.$message.error("请求异常:"+err)
})
},
changeVal(e){
try {
let json = e.target.value;
if(json.indexOf(",}")>0){
json = json.replace(",}","}");
}
this.paramJson = JSON.parse(json);
}catch (e) {
console.log(e);
this.$message.error("非法的JSON字符串")
}
},
handleChange(value) {
this.requestMethod = value;
},
created () {
const token = Vue.ls.get(ACCESS_TOKEN);
this.headers = {"X-Access-Token":token}
}
handleChange (value) {
this.requestMethod = value
},
created () {
const token = Vue.ls.get(ACCESS_TOKEN)
this.headers = { 'X-Access-Token': token }
}
}
</script>
}
</script>