|
|
@@ -1,9 +1,9 @@
|
|
|
<template>
|
|
|
<div class="full-container-p24">
|
|
|
<div class="df jcfe pb20">
|
|
|
- <el-button size="medium" type="primary" @click="modalVisable = true"
|
|
|
- >新增项目</el-button
|
|
|
- >
|
|
|
+ <el-button size="medium" type="primary" @click="modalVisable = true">
|
|
|
+ 新增项目
|
|
|
+ </el-button>
|
|
|
</div>
|
|
|
<el-card>
|
|
|
<template #header>
|
|
|
@@ -26,8 +26,9 @@
|
|
|
@click="edit(item, index, item.type)"
|
|
|
size="small"
|
|
|
type="text"
|
|
|
- >修改</el-button
|
|
|
>
|
|
|
+ 修改
|
|
|
+ </el-button>
|
|
|
<el-popconfirm
|
|
|
title="确认删除项目?"
|
|
|
@confirm="deleteItem(item._id, index, item.type)"
|
|
|
@@ -41,24 +42,25 @@
|
|
|
</template>
|
|
|
<div class="mb10 df jscb card-line aic" v-if="item.master_url">
|
|
|
<div class="s-title">正式版:</div>
|
|
|
- <el-button size="medium" type="text" @click="goTo(item.master_url)"
|
|
|
- >去访问</el-button
|
|
|
- >
|
|
|
+ <el-button size="medium" type="text" @click="goTo(item.master_url)">
|
|
|
+ 去访问
|
|
|
+ </el-button>
|
|
|
<el-button
|
|
|
size="small"
|
|
|
type="primary"
|
|
|
@click="copy2(item.master_url)"
|
|
|
- >复制链接</el-button
|
|
|
>
|
|
|
+ 复制链接
|
|
|
+ </el-button>
|
|
|
</div>
|
|
|
<div class="mb10 df jscb card-line aic" v-if="item.dev_url">
|
|
|
<div class="s-title">测试版:</div>
|
|
|
- <el-button size="medium" type="text" @click="goTo(item.dev_url)"
|
|
|
- >去访问</el-button
|
|
|
- >
|
|
|
- <el-button size="small" type="primary" @click="copy2(item.dev_url)"
|
|
|
- >复制链接</el-button
|
|
|
- >
|
|
|
+ <el-button size="medium" type="text" @click="goTo(item.dev_url)">
|
|
|
+ 去访问
|
|
|
+ </el-button>
|
|
|
+ <el-button size="small" type="primary" @click="copy2(item.dev_url)">
|
|
|
+ 复制链接
|
|
|
+ </el-button>
|
|
|
</div>
|
|
|
<div class="mb10 df jscb card-line aic" v-if="item.master_api">
|
|
|
<div class="s-title">正式接口:</div>
|
|
|
@@ -66,14 +68,16 @@
|
|
|
size="medium"
|
|
|
type="text"
|
|
|
@click="goTo(item.master_api + 'swagger-ui.html#/')"
|
|
|
- >访问文档</el-button
|
|
|
>
|
|
|
+ 访问文档
|
|
|
+ </el-button>
|
|
|
<el-button
|
|
|
size="small"
|
|
|
type="primary"
|
|
|
@click="copy2(item.master_api + 'swagger-ui.html#/')"
|
|
|
- >复制接口</el-button
|
|
|
>
|
|
|
+ 复制接口
|
|
|
+ </el-button>
|
|
|
</div>
|
|
|
<div class="mb10 df jscb card-line aic" v-if="item.dev_api">
|
|
|
<div class="s-title">测试接口:</div>
|
|
|
@@ -81,20 +85,22 @@
|
|
|
size="medium"
|
|
|
type="text"
|
|
|
@click="goTo(item.dev_api + 'swagger-ui.html#/')"
|
|
|
- >访问文档</el-button
|
|
|
>
|
|
|
+ 访问文档
|
|
|
+ </el-button>
|
|
|
<el-button
|
|
|
size="small"
|
|
|
type="primary"
|
|
|
@click="copy2(item.dev_api + 'swagger-ui.html#/')"
|
|
|
- >复制接口</el-button
|
|
|
>
|
|
|
+ 复制接口
|
|
|
+ </el-button>
|
|
|
</div>
|
|
|
<div class="mb10 df jscb card-line aic" v-if="item.desc">
|
|
|
<div class="s-title">备注:</div>
|
|
|
<div>{{ item.desc }}</div>
|
|
|
- </div></el-card
|
|
|
- >
|
|
|
+ </div>
|
|
|
+ </el-card>
|
|
|
</div>
|
|
|
</el-card>
|
|
|
<el-card style="margin-top: 30px">
|
|
|
@@ -118,8 +124,9 @@
|
|
|
@click="edit(item, index, item.type)"
|
|
|
size="small"
|
|
|
type="text"
|
|
|
- >修改</el-button
|
|
|
>
|
|
|
+ 修改
|
|
|
+ </el-button>
|
|
|
<el-popconfirm
|
|
|
title="确认删除项目?"
|
|
|
@confirm="deleteItem(item._id, index, item.type)"
|
|
|
@@ -187,14 +194,16 @@
|
|
|
size="medium"
|
|
|
type="text"
|
|
|
@click="goTo(item.master_api + 'swagger-ui.html#/')"
|
|
|
- >访问文档</el-button
|
|
|
>
|
|
|
+ 访问文档
|
|
|
+ </el-button>
|
|
|
<el-button
|
|
|
size="small"
|
|
|
type="primary"
|
|
|
@click="copy2(item.master_api + 'swagger-ui.html#/')"
|
|
|
- >复制接口</el-button
|
|
|
>
|
|
|
+ 复制接口
|
|
|
+ </el-button>
|
|
|
</div>
|
|
|
<div class="mb10 df jscb card-line aic" v-if="item.dev_api">
|
|
|
<div class="s-title">测试接口:</div>
|
|
|
@@ -202,20 +211,22 @@
|
|
|
size="medium"
|
|
|
type="text"
|
|
|
@click="goTo(item.dev_api + 'swagger-ui.html#/')"
|
|
|
- >访问文档</el-button
|
|
|
>
|
|
|
+ 访问文档
|
|
|
+ </el-button>
|
|
|
<el-button
|
|
|
size="small"
|
|
|
type="primary"
|
|
|
@click="copy2(item.dev_api + 'swagger-ui.html#/')"
|
|
|
- >复制接口</el-button
|
|
|
>
|
|
|
+ 复制接口
|
|
|
+ </el-button>
|
|
|
</div>
|
|
|
<div class="mb10 df jscb card-line aic" v-if="item.desc">
|
|
|
<div class="s-title">备注:</div>
|
|
|
<div>{{ item.desc }}</div>
|
|
|
- </div></el-card
|
|
|
- >
|
|
|
+ </div>
|
|
|
+ </el-card>
|
|
|
</div>
|
|
|
</el-card>
|
|
|
<el-dialog
|
|
|
@@ -286,8 +297,9 @@
|
|
|
type="primary"
|
|
|
v-else
|
|
|
@click="upload('master_url')"
|
|
|
- >上传</el-button
|
|
|
>
|
|
|
+ 上传
|
|
|
+ </el-button>
|
|
|
</el-form-item>
|
|
|
<el-form-item
|
|
|
label="体验版二维码"
|
|
|
@@ -305,8 +317,9 @@
|
|
|
type="primary"
|
|
|
v-else
|
|
|
@click="upload('dev_url')"
|
|
|
- >上传</el-button
|
|
|
>
|
|
|
+ 上传
|
|
|
+ </el-button>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="正式接口地址" prop="master_api">
|
|
|
<el-input
|
|
|
@@ -336,29 +349,33 @@
|
|
|
type="primary"
|
|
|
@click="cancel()"
|
|
|
v-if="currentItemId"
|
|
|
- >取消</el-button
|
|
|
>
|
|
|
+ 取消
|
|
|
+ </el-button>
|
|
|
<el-button
|
|
|
size="medium"
|
|
|
type="primary"
|
|
|
@click="resetForm(ruleFormRef)"
|
|
|
v-else
|
|
|
- >重置</el-button
|
|
|
>
|
|
|
+ 重置
|
|
|
+ </el-button>
|
|
|
<el-button
|
|
|
size="medium"
|
|
|
type="primary"
|
|
|
@click="update(ruleFormRef)"
|
|
|
v-if="currentItemId"
|
|
|
- >提交修改</el-button
|
|
|
>
|
|
|
+ 提交修改
|
|
|
+ </el-button>
|
|
|
<el-button
|
|
|
size="medium"
|
|
|
type="primary"
|
|
|
@click="submitForm(ruleFormRef)"
|
|
|
v-else
|
|
|
- >创建项目</el-button
|
|
|
>
|
|
|
+ 创建项目
|
|
|
+ </el-button>
|
|
|
</div>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
@@ -368,16 +385,16 @@
|
|
|
|
|
|
<script setup>
|
|
|
import { reactive, ref, onMounted } from "vue";
|
|
|
-import { AnonymousLogin, tcb } from "apis/cloudLogin";
|
|
|
+// import { AnonymousLogin, tcb } from "apis/cloudLogin";
|
|
|
import _ from "lodash";
|
|
|
import { ElMessage, ElMessageBox } from "element-plus";
|
|
|
import store from "../../store";
|
|
|
import { chooseFile } from "../../utils/chooseFile";
|
|
|
import copy from "copy-to-clipboard";
|
|
|
|
|
|
-const db = tcb.database();
|
|
|
-const p = db.collection("huihenduo_projects");
|
|
|
-const __ = db.command;
|
|
|
+// const db = tcb.database();
|
|
|
+// const p = db.collection("huihenduo_projects");
|
|
|
+// const __ = db.command;
|
|
|
let pcData = ref([]);
|
|
|
let wxData = ref([]);
|
|
|
async function init() {
|
|
|
@@ -510,7 +527,7 @@ function copy2(url) {
|
|
|
}
|
|
|
|
|
|
onMounted(() => {
|
|
|
- init();
|
|
|
+ // init();
|
|
|
});
|
|
|
</script>
|
|
|
|
|
|
@@ -532,4 +549,4 @@ onMounted(() => {
|
|
|
color: #555;
|
|
|
font-size: 15px;
|
|
|
}
|
|
|
-</style>
|
|
|
+</style>
|