From efa0778d9b91b62e1824568e747a1e0742a89182 Mon Sep 17 00:00:00 2001 From: layyback <18511759309@163.com> Date: Mon, 27 Dec 2021 18:27:18 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E4=BF=AE=E6=94=B9=E6=8F=92=E4=BB=B6?= =?UTF-8?q?=E4=B8=8B=E8=BD=BD=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/renderer/assets/api/index.js | 17 ++-- src/renderer/assets/common/utils.js | 2 +- src/renderer/pages/search/subpages/market.vue | 97 +------------------ 3 files changed, 16 insertions(+), 100 deletions(-) diff --git a/src/renderer/assets/api/index.js b/src/renderer/assets/api/index.js index 0e948e2..fc9c305 100755 --- a/src/renderer/assets/api/index.js +++ b/src/renderer/assets/api/index.js @@ -5,17 +5,20 @@ export default { axios.get( "https://gitcode.net/api/v4/projects/weixin_43881430%2Fquicker/releases" ), - // getPlugins: () => axios.get("/") getPlugins: () => axios.get( - "https://gitcode.net/api/v4/projects/weixin_43881430%2Fquicker-market/repository/tree?path=plugins" + "https://gitlab.com/api/v4/projects/layyback%2Fquicker-market/repository/tree?path=plugins" ), getPluginDetail: pluginName => axios.get( - `https://gitcode.net/api/v4/projects/weixin_43881430%2Fquicker-market/repository/files/plugins%2F${pluginName}%2Fplugin.json/raw?ref=master` - ), - getZipPathOfPlugin: () => - axios.get( - `https://gitcode.net/api/v4/projects/weixin_43881430%2Fquicker-market/repository/archive.zip` + `https://gitlab.com/api/v4/projects/layyback%2Fquicker-market/repository/files/plugins%2F${pluginName}%2Fplugin.json/raw?ref=master` ) + // getPlugins: () => + // axios.get( + // "https://gitcode.net/api/v4/projects/weixin_43881430%2Fquicker-market/repository/tree?path=plugins" + // ), + // getPluginDetail: pluginName => + // axios.get( + // `https://gitcode.net/api/v4/projects/weixin_43881430%2Fquicker-market/repository/files/plugins%2F${pluginName}%2Fplugin.json/raw?ref=master` + // ) }; diff --git a/src/renderer/assets/common/utils.js b/src/renderer/assets/common/utils.js index 96e7da6..1202879 100755 --- a/src/renderer/assets/common/utils.js +++ b/src/renderer/assets/common/utils.js @@ -72,7 +72,7 @@ async function downloadZip(downloadRepoUrl, name) { } async function downloadZipFromGitCode(downloadRepoUrl, name) { try { - const plugin_path = appPath; + const plugin_path = `${appPath}/quicker-plugins`; // 基础模版所在目录,如果是初始化,则是模板名称,否则是项目名称 const temp_dest = `${plugin_path}/${name}`; // 下载模板 diff --git a/src/renderer/pages/search/subpages/market.vue b/src/renderer/pages/search/subpages/market.vue index b3947a8..7e8b18f 100755 --- a/src/renderer/pages/search/subpages/market.vue +++ b/src/renderer/pages/search/subpages/market.vue @@ -99,97 +99,11 @@ export default { pluginList: [], loading: {}, bannerList: [], - downloadPath: "", show: false, currentSelect: {} }; }, async created() { - // const [result, bannerRes] = await Promise.all([ - // api.plugin.query(), - // api.banner.query(), - // ]); - // this.pluginList = result.result; - // this.pluginList = [ - // { - // pluginName: "日报", - // name: "日报", - // author: "璃白", - // detail: "# md", - // description: "gitcode团队日报", - // logo: "https://infinityicon.infinitynewtab.com/user-share-icon/6e49210c084629259f22609980c48ecf.png?imageMogr2/thumbnail/240x/format/webp/blur/1x0/quality/100|imageslim", - // downloadUrl: - // "https://quicker-1253693946.cos.ap-beijing.myqcloud.com/plugins/report.zip" - // }, - // { - // pluginName: "微信", - // name: "微信", - // author: "璃白", - // detail: "# weixin", - // description: "微信网页版", - // logo: "https://infinityicon.infinitynewtab.com/user-share-icon/2fc65bd66987ba1596324d55c01bddd7.png?imageMogr2/thumbnail/240x/format/webp/blur/1x0/quality/100|imageslim", - // downloadUrl: - // "https://quicker-1253693946.cos.ap-beijing.myqcloud.com/plugins/weixin.zip" - // }, - // { - // pluginName: "博客", - // name: "博客", - // author: "璃白", - // detail: "# blog", - // description: "CSDN博客离线版", - // logo: "https://gitcode.net/codechina/operation-work/uploads/48886bea190eb24ef4cf0499e589554c/1_cpongo9_1634797583.gif", - // downloadUrl: - // "https://quicker-1253693946.cos.ap-beijing.myqcloud.com/plugins/blog.zip" - // }, - // { - // pluginName: "提问", - // name: "提问", - // author: "璃白", - // detail: "# ask", - // description: "CSDN问答", - // logo: "https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fpic.51yuansu.com%2Fpic2%2Fcover%2F00%2F40%2F87%2F581336a807c58_610.jpg&refer=http%3A%2F%2Fpic.51yuansu.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1642296911&t=4197c2560e18ac6b625d5d4b4cc3ece8", - // downloadUrl: - // "https://quicker-1253693946.cos.ap-beijing.myqcloud.com/plugins/ask.zip" - // }, - // { - // pluginName: "计算器", - // name: "计算器", - // author: "璃白", - // detail: "# 计算器", - // description: "计算器网页版", - // logo: "http://mms1.baidu.com/it/u=1258866987,457977032&fm=253&app=138&f=JPEG&fmt=auto&q=75?w=500&h=500", - // downloadUrl: - // "https://quicker-1253693946.cos.ap-beijing.myqcloud.com/plugins/calc.zip" - // }, - // { - // pluginName: "md编辑器", - // name: "md编辑器", - // author: "璃白", - // detail: "# md", - // description: - // "由 gitcode 技术团队开发的一款Markdown编辑器,支持使用markodwn语法来编写文档,同时支持图片上传等功能。", - // logo: "https://gitcode.net/uploads/-/system/project/avatar/43664/2111050605131483.png", - // downloadUrl: - // "https://quicker-1253693946.cos.ap-beijing.myqcloud.com/plugins/md.zip" - // }, - // { - // pluginName: "qrcode", - // name: "qrcode", - // description: "二维码识别", - // logo: "https://gitcode.net/codechina/operation-work/uploads/03cd9d3883254d315ba0aeca5643c65c/logo.png", - // downloadUrl: - // "https://quicker-1253693946.cos.ap-beijing.myqcloud.com/plugins/qrcode.zip" - // }, - // { - // pluginName: "toolsfun", - // name: "toolsfun", - // description: "toolfun工具箱", - // logo: "http://mms1.baidu.com/it/u=4045568405,1871612257&fm=253&app=138&f=JPG&fmt=auto&q=75?w=500&h=500", - // downloadUrl: - // "https://quicker-1253693946.cos.ap-beijing.myqcloud.com/plugins/toolsfun.zip" - // } - // ]; - this.getPlugins(); // this.bannerList = bannerRes.result; }, @@ -209,9 +123,11 @@ export default { } = await api.getPluginDetail(plugin.name); plugin.pluginName = pluginName; plugin.description = description; - plugin.logo = `https://gitcode.net/weixin_43881430/quicker-market/-/raw/master/plugins/${plugin.name}/${logo}`; - plugin.downloadUrl = - "https://gitcode.net/api/v4/projects/weixin_43881430%2Fquicker-market/repository/archive.zip"; + plugin.logo = `https://gitlab.com/layyback/quicker-market/-/raw/master/plugins/${plugin.name}/${logo}`; + // plugin.logo = `https://gitcode.net/weixin_43881430/quicker-market/-/raw/master/plugins/${plugin.name}/${logo}`; + plugin.downloadUrl = `https://gitlab.com/api/v4/projects/layyback%2Fquicker-market/repository/archive.zip?path=plugins%2F${plugin.name}`; + // plugin.downloadUrl = + // "https://gitcode.net/api/v4/projects/weixin_43881430%2Fquicker-market/repository/archive.zip"; console.log(plugin); return plugin; @@ -226,9 +142,6 @@ export default { } this.$set(this.loading, index, false); }, - async getZipPathOfPlugin() { - this.downloadPath = await api.getZipPathOfPlugin(); - }, showButton(item) { return !this.devPlugins.filter( plugin => plugin.name === item.name && plugin.type === "prod" -- GitLab