接口变更

这个提交包含在:
徐勤民 2024-08-23 17:08:17 +08:00
父节点 9c95fe889e
当前提交 eaa3c7fd63
共有 2 个文件被更改,包括 30 次插入6 次删除

查看文件

@ -30,8 +30,8 @@ API.setErrorHandle(errorHandle)
export default { export default {
// 登录 // 登录
register: (params) => API.POSTJSON("/tenant/v1/tenant/create", params), register: (params) => API.POSTJSON("/tenant/v1/create", params),
login: (params) => API.POSTJSON("/user/v1/login", params), login: (params) => API.POSTJSON("/user/v1/login", params),
appList: (params) => API.POSTJSON("/tenant/v1/app/list", params), appList: (params) => API.POSTJSON("/manager/v1/list", params),
appCreate: (params) => API.POSTJSON("/tenant/v1/app/create", params) appCreate: (params) => API.POSTJSON("/manager/v1/create", params)
} }

查看文件

@ -8,23 +8,31 @@ import { ElMessage } from "element-plus"
const Api = API const Api = API
const appList = ref([]) const appList = ref([])
const init = () => { const init = () => {
Api.appList({ type: "APP" }).then((res) => { Api.appList({ pageNumber: 0, pageSize: 100 }).then((res) => {
appList.value = res appList.value = res.content
}) })
} }
const appCreate = () => { const appCreate = () => {
ElMessage.success("新建应用成功") ElMessage.success("新建应用成功")
Api.appCreate({ type: "APP", appName: name.value }).then(() => { Api.appCreate({
downloadUrl: downloadUrl.value,
packageName: packageName.value,
appName: name.value
}).then(() => {
init() init()
showDialog.value = false showDialog.value = false
}) })
} }
const name = ref(undefined) const name = ref(undefined)
const downloadUrl = ref(undefined)
const packageName = ref(undefined)
const showDialog = ref(false) const showDialog = ref(false)
const detail = ref(undefined) const detail = ref(undefined)
const showDetailsDialog = ref(false) const showDetailsDialog = ref(false)
const addApp = () => { const addApp = () => {
name.value = undefined name.value = undefined
downloadUrl.value = undefined
packageName.value = undefined
showDialog.value = true showDialog.value = true
} }
const showApp = (scope) => { const showApp = (scope) => {
@ -60,6 +68,22 @@ init()
:prefix-icon="PriceTag" :prefix-icon="PriceTag"
:clearable="true" :clearable="true"
/> />
<el-input
class="text item"
v-model="downloadUrl"
style="width: 440px; margin-top: 20px"
placeholder="请输入下载地址"
:prefix-icon="PriceTag"
:clearable="true"
/>
<el-input
class="text item"
v-model="packageName"
style="width: 440px; margin-top: 20px"
placeholder="请输入应用包名"
:prefix-icon="PriceTag"
:clearable="true"
/>
<template #footer> <template #footer>
<div class="dialog-footer"> <div class="dialog-footer">
<el-button @click="showDialog = false">Cancel</el-button> <el-button @click="showDialog = false">Cancel</el-button>