This commit is contained in:
SummerColdWind 2024-07-28 16:52:25 +08:00
parent 23f0b86a34
commit c751071b8a
5 changed files with 23 additions and 6 deletions

View File

@ -1,7 +1,7 @@
import request from '@/utils/request.js' import request from '@/utils/request.js'
export const sendByteInterface = (context) => { export const sendByteInterface = (context) => {
return request.get('', { return request.get('/api/test', {
params: { params: {
byte: context byte: context
} }

View File

@ -1,8 +1,8 @@
import axios from "axios"; import axios from "axios";
const instance = axios.create({ const instance = axios.create({
baseURL: '', baseURL: 'http://localhost:5000',
timeout: 1000, timeout: 10000,
// headers: {'X-Custom-Header': 'foobar'} // headers: {'X-Custom-Header': 'foobar'}
}); });

View File

@ -77,7 +77,15 @@
</el-menu> </el-menu>
</el-aside> </el-aside>
<el-container> <el-container>
<el-header>Header</el-header> <el-header>
<el-select
style="width: 150px"
placeholder="选择客户端"
>
<el-option v-for="item in 3" :key="item" :label="'客户端'"></el-option>
</el-select>
</el-header>
<el-main> <el-main>
<router-view></router-view> <router-view></router-view>
</el-main> </el-main>
@ -106,6 +114,12 @@
} }
.el-header {
border-bottom: 1px solid #777;
height: 50px;
line-height: 50px;
}
} }

View File

@ -14,7 +14,8 @@ const rules = {
const byteForm = ref(null) const byteForm = ref(null)
const sendByte = async () => { const sendByte = async () => {
await byteForm.value.validate() await byteForm.value.validate()
console.log(form.value) const res = await sendByteInterface(form.value.context)
console.log(res.data)
} }
</script> </script>

View File

@ -3,7 +3,9 @@
</script> </script>
<template> <template>
测试 <el-button>进阶1吧武器放进槽位</el-button>
<el-button>取一个在背包一号格子的进阶石进阶</el-button>
<el-button>进阶</el-button>
</template> </template>
<style scoped> <style scoped>