mirror of
https://github.com/wmn1525/grasscutterTools.git
synced 2024-11-22 07:08:15 +00:00
:add GCAuth
This commit is contained in:
parent
a543f53122
commit
5e06dea4a3
5
src/components.d.ts
vendored
5
src/components.d.ts
vendored
@ -9,12 +9,15 @@ declare module '@vue/runtime-core' {
|
|||||||
ACascader: typeof import('@arco-design/web-vue')['Cascader']
|
ACascader: typeof import('@arco-design/web-vue')['Cascader']
|
||||||
ADescriptions: typeof import('@arco-design/web-vue')['Descriptions']
|
ADescriptions: typeof import('@arco-design/web-vue')['Descriptions']
|
||||||
ADrawer: typeof import('@arco-design/web-vue')['Drawer']
|
ADrawer: typeof import('@arco-design/web-vue')['Drawer']
|
||||||
|
AForm: typeof import('@arco-design/web-vue')['Form']
|
||||||
|
AFormItem: typeof import('@arco-design/web-vue')['FormItem']
|
||||||
AInput: typeof import('@arco-design/web-vue')['Input']
|
AInput: typeof import('@arco-design/web-vue')['Input']
|
||||||
|
AInputGroup: typeof import('@arco-design/web-vue')['InputGroup']
|
||||||
AInputNumber: typeof import('@arco-design/web-vue')['InputNumber']
|
AInputNumber: typeof import('@arco-design/web-vue')['InputNumber']
|
||||||
|
AInputPassword: typeof import('@arco-design/web-vue')['InputPassword']
|
||||||
ALink: typeof import('@arco-design/web-vue')['Link']
|
ALink: typeof import('@arco-design/web-vue')['Link']
|
||||||
AMenu: typeof import('@arco-design/web-vue')['Menu']
|
AMenu: typeof import('@arco-design/web-vue')['Menu']
|
||||||
AMenuItem: typeof import('@arco-design/web-vue')['MenuItem']
|
AMenuItem: typeof import('@arco-design/web-vue')['MenuItem']
|
||||||
ASelect: typeof import('@arco-design/web-vue')['Select']
|
|
||||||
ASpace: typeof import('@arco-design/web-vue')['Space']
|
ASpace: typeof import('@arco-design/web-vue')['Space']
|
||||||
ASubMenu: typeof import('@arco-design/web-vue')['SubMenu']
|
ASubMenu: typeof import('@arco-design/web-vue')['SubMenu']
|
||||||
ATable: typeof import('@arco-design/web-vue')['Table']
|
ATable: typeof import('@arco-design/web-vue')['Table']
|
||||||
|
0
src/pages/start/GCAuth/changepassword.vue
Normal file
0
src/pages/start/GCAuth/changepassword.vue
Normal file
61
src/pages/start/GCAuth/login.vue
Normal file
61
src/pages/start/GCAuth/login.vue
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
<template>
|
||||||
|
<div :style="{ height: '20px' }"></div>
|
||||||
|
<a-form :model="form" :style="{ width: '600px' }" @submit="handleSubmit">
|
||||||
|
<a-form-item field="ip" label="地址">
|
||||||
|
<a-input-group>
|
||||||
|
<a-input :style="{ width: '80px' }" placeholder="" v-model="form.ssl" />
|
||||||
|
<a-input :style="{ width: '160px' }" placeholder="" v-model="form.ip" />
|
||||||
|
<a-input :style="{ width: '160px' }" placeholder="" v-model="form.path" />
|
||||||
|
</a-input-group>
|
||||||
|
</a-form-item>
|
||||||
|
<a-form-item field="username" label="用户名">
|
||||||
|
<a-input v-model="form.username" placeholder="please enter your username..." />
|
||||||
|
</a-form-item>
|
||||||
|
<a-form-item field="password" label="密码">
|
||||||
|
<a-input-password v-model="form.password" placeholder="Please enter something" allow-clear />
|
||||||
|
</a-form-item>
|
||||||
|
<a-form-item>
|
||||||
|
<a-space>
|
||||||
|
<a-button html-type="submit">提交</a-button>
|
||||||
|
<a-button @copyTocken="copyTocken">复制Tocken</a-button>
|
||||||
|
</a-space>
|
||||||
|
</a-form-item>
|
||||||
|
|
||||||
|
</a-form>
|
||||||
|
<!-- {{ form }} -->
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { reactive, ref, computed } from 'vue'
|
||||||
|
import { Message } from '@arco-design/web-vue'
|
||||||
|
import axios from 'axios';
|
||||||
|
const form = reactive({
|
||||||
|
ssl: "https://",
|
||||||
|
ip: '',
|
||||||
|
path: "/authentication/login",
|
||||||
|
username: '',
|
||||||
|
password: '',
|
||||||
|
})
|
||||||
|
const handleSubmit = () => {
|
||||||
|
console.log(form)
|
||||||
|
|
||||||
|
var Url = `${form.ssl}${form.ip}${form.path}`
|
||||||
|
var data = {
|
||||||
|
username: form.username,
|
||||||
|
password: form.password,
|
||||||
|
}
|
||||||
|
axios.post(Url, data).then(res => {
|
||||||
|
console.log(res);
|
||||||
|
|
||||||
|
},
|
||||||
|
err => {
|
||||||
|
Message.error(err.message)
|
||||||
|
console.log(err);
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
const copyTocken = () => {
|
||||||
|
console.log(1);
|
||||||
|
}
|
||||||
|
</script>
|
0
src/pages/start/GCAuth/register.vue
Normal file
0
src/pages/start/GCAuth/register.vue
Normal file
@ -22,11 +22,17 @@ const datav = reactive([
|
|||||||
])
|
])
|
||||||
|
|
||||||
const datav2 = reactive([
|
const datav2 = reactive([
|
||||||
{ name: 'WSS连接', path: "/start/login" },
|
{ name: 'WSS连接', path: "/start/wss" },
|
||||||
{ name: '控制台', path: "/start/consoled" },
|
{ name: '控制台', path: "/start/consoled" },
|
||||||
{ name: '在线人员', path: "/start/personnel" },
|
{ name: '在线人员', path: "/start/personnel" },
|
||||||
])
|
])
|
||||||
|
|
||||||
|
const datav3 = reactive([
|
||||||
|
{ name: '登录获取Tocken', path: "/start/login" },
|
||||||
|
{ name: '注册', path: "/start/register" },
|
||||||
|
{ name: '修改密码', path: "/start/changepassword" },
|
||||||
|
])
|
||||||
|
|
||||||
const GMTitle = ref("GM控制面板")
|
const GMTitle = ref("GM控制面板")
|
||||||
|
|
||||||
|
|
||||||
@ -64,7 +70,7 @@ watch(
|
|||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<div class="nav ">
|
<div class="nav ">
|
||||||
<a-menu showCollapseButton :default-open-keys="['0', '1']" :selected-keys="selectedKey">
|
<a-menu showCollapseButton :default-open-keys="['0', '1', '2']" :selected-keys="selectedKey">
|
||||||
<a-sub-menu key="0">
|
<a-sub-menu key="0">
|
||||||
<template #icon>
|
<template #icon>
|
||||||
<IconApps></IconApps>
|
<IconApps></IconApps>
|
||||||
@ -83,6 +89,15 @@ watch(
|
|||||||
{{ item.name }}
|
{{ item.name }}
|
||||||
</a-menu-item>
|
</a-menu-item>
|
||||||
</a-sub-menu>
|
</a-sub-menu>
|
||||||
|
<a-sub-menu key="2">
|
||||||
|
<template #icon>
|
||||||
|
<IconApps></IconApps>
|
||||||
|
</template>
|
||||||
|
<template #title>GCAuth</template>
|
||||||
|
<a-menu-item v-for="(item, index) in datav3" :key="item.path" @click="topath(item.path)">
|
||||||
|
{{ item.name }}
|
||||||
|
</a-menu-item>
|
||||||
|
</a-sub-menu>
|
||||||
</a-menu>
|
</a-menu>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -40,7 +40,7 @@ let constantRoutes = [
|
|||||||
component: () => import('@/pages/start/components/weapon.vue'),
|
component: () => import('@/pages/start/components/weapon.vue'),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/start/login",
|
path: "/start/wss",
|
||||||
component: () => import('@/pages/login/index.vue'),
|
component: () => import('@/pages/login/index.vue'),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -50,6 +50,18 @@ let constantRoutes = [
|
|||||||
{
|
{
|
||||||
path: "/start/personnel",
|
path: "/start/personnel",
|
||||||
component: () => import('@/pages/start/components/personnel.vue'),
|
component: () => import('@/pages/start/components/personnel.vue'),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: "/start/login",
|
||||||
|
component: () => import('@/pages/start/GCAuth/login.vue'),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: "/start/register",
|
||||||
|
component: () => import('@/pages/start/GCAuth/register.vue'),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: "/start/changepassword",
|
||||||
|
component: () => import('@/pages/start/GCAuth/changepassword.vue'),
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user