|
|
@@ -8,6 +8,8 @@ import type { FormInstance, FormRules } from 'element-plus'
|
|
|
import { ElMessage } from 'element-plus'
|
|
|
import { createApp } from '@/api/apps/appApi'
|
|
|
|
|
|
+const router = useRouter()
|
|
|
+
|
|
|
const formRef = ref<FormInstance>()
|
|
|
const formRules = ref<FormRules>({
|
|
|
appTitle: [{ required: true, message: '请输入appTitle', trigger: 'blur' }],
|
|
|
@@ -23,6 +25,7 @@ const state = reactive({
|
|
|
title: '',
|
|
|
dialogVisible: false,
|
|
|
loading: false,
|
|
|
+ status: 0,
|
|
|
formData: {
|
|
|
appId: 0,
|
|
|
appCode: '',
|
|
|
@@ -67,7 +70,7 @@ function onSubmit() {
|
|
|
if (state.actionType === 1) {
|
|
|
await createApp(state.formData)
|
|
|
}
|
|
|
-
|
|
|
+ state.status = 1
|
|
|
ElMessage.success({
|
|
|
message: '保存成功',
|
|
|
center: true,
|
|
|
@@ -75,13 +78,23 @@ function onSubmit() {
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
+function onCheck() {
|
|
|
+ router.push({
|
|
|
+ path: '/app-center/store',
|
|
|
+ })
|
|
|
+}
|
|
|
+function onGoOn() {
|
|
|
+ onCancel()
|
|
|
+ state.status = 0
|
|
|
+}
|
|
|
</script>
|
|
|
|
|
|
<template>
|
|
|
<div>
|
|
|
<page-header title="应用发布" content="上线发布应用软件或应用服务" />
|
|
|
<page-main>
|
|
|
- <el-row type="flex" justify="center">
|
|
|
+ {{ state.status }}
|
|
|
+ <el-row v-if="state.status === 0" type="flex" justify="center">
|
|
|
<el-col :md="12" :sm="18">
|
|
|
<el-form ref="formRef" :model="state.formData" :rules="formRules" label-width="120px" label-suffix=":">
|
|
|
<el-form-item label="标题" prop="appTitle">
|
|
|
@@ -135,6 +148,29 @@ function onSubmit() {
|
|
|
</el-form>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
+ <div v-else class="submit-end">
|
|
|
+ <h2>恭喜,应用已发布成功!</h2>
|
|
|
+ <p>
|
|
|
+ <span>请选择</span>
|
|
|
+ <span class="link" @click="onCheck">查看</span>
|
|
|
+ <span>或者</span>
|
|
|
+ <span class="link" @click="onGoOn">继续发布</span>
|
|
|
+ </p>
|
|
|
+ </div>
|
|
|
</page-main>
|
|
|
</div>
|
|
|
</template>
|
|
|
+
|
|
|
+<style lang="scss" scoped>
|
|
|
+.submit-end{
|
|
|
+ text-align: center;
|
|
|
+ .link{
|
|
|
+ color: #0070cc;
|
|
|
+ padding:0 5px;
|
|
|
+ cursor: pointer;
|
|
|
+ &:hover{
|
|
|
+ text-decoration: underline;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|