diff --git a/feature/src/assets/request/index.ts b/feature/src/assets/request/index.ts
index 5701e76..304345c 100644
--- a/feature/src/assets/request/index.ts
+++ b/feature/src/assets/request/index.ts
@@ -21,4 +21,15 @@ export default {
);
return res.data;
},
+ async getWorkerDetail() {
+ const res = await axios.get(
+ "https://gitee.com/monkeyWang/rubick-database/raw/master/plugins/worker.json"
+ );
+ return res.data;
+ },
+
+ async getPluginDetail(url: string) {
+ const res = await axios.get(url);
+ return res.data;
+ },
};
diff --git a/feature/src/views/market/components/plugin-list.vue b/feature/src/views/market/components/plugin-list.vue
index 71e793f..305845e 100644
--- a/feature/src/views/market/components/plugin-list.vue
+++ b/feature/src/views/market/components/plugin-list.vue
@@ -4,7 +4,7 @@
-
+
- 备忘快贴
+ {{ detail.pluginName }}
- 适合每个人的专业图像编辑软件
+ {{ detail.description }}
@@ -67,6 +67,7 @@
+
@@ -79,6 +80,8 @@ import {
import { defineProps, ref } from "vue";
import { useStore } from "vuex";
import { message } from "ant-design-vue";
+import MarkdownIt from "markdown-it";
+import request from "../../../assets/request/index";
const store = useStore();
@@ -101,9 +104,25 @@ const downloadPlugin = async (plugin) => {
};
const visible = ref(false);
+const detail = ref({});
+const markdown = new MarkdownIt();
+const content = ref("");
+
+const showDetail = async (item) => {
+ visible.value = true;
+ detail.value = item;
+ let mdContent = "暂无内容";
+ if (item.homePage) {
+ mdContent = await request.getPluginDetail(item.homePage);
+ }
+ content.value = markdown.render(mdContent);
+};
diff --git a/feature/src/views/market/components/worker.vue b/feature/src/views/market/components/worker.vue
index 19b67e3..09d531c 100644
--- a/feature/src/views/market/components/worker.vue
+++ b/feature/src/views/market/components/worker.vue
@@ -1,13 +1,49 @@
-
+
-
-
diff --git a/feature/src/views/market/index.vue b/feature/src/views/market/index.vue
index 2e1f0a6..88282c1 100644
--- a/feature/src/views/market/index.vue
+++ b/feature/src/views/market/index.vue
@@ -68,10 +68,12 @@ import { reactive, toRefs, computed } from "vue";
import { useStore } from "vuex";
import Finder from "./components/finder.vue";
import System from "./components/system.vue";
+import Worker from "./components/worker.vue";
const Components = {
finder: Finder,
system: System,
+ worker: Worker,
};
const state = reactive({