Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
gitcode_dev
quicker
提交
efa0778d
quicker
项目概览
gitcode_dev
/
quicker
上一次同步 接近 2 年
通知
6
Star
2
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
quicker
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
efa0778d
编写于
12月 27, 2021
作者:
璃白.
🌻
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat:修改插件下载接口
上级
d024ae72
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
16 addition
and
100 deletion
+16
-100
src/renderer/assets/api/index.js
src/renderer/assets/api/index.js
+10
-7
src/renderer/assets/common/utils.js
src/renderer/assets/common/utils.js
+1
-1
src/renderer/pages/search/subpages/market.vue
src/renderer/pages/search/subpages/market.vue
+5
-92
未找到文件。
src/renderer/assets/api/index.js
浏览文件 @
efa0778d
...
...
@@ -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://git
code.net/api/v4/projects/weixin_43881430
%2Fquicker-market/repository/tree?path=plugins
"
"
https://git
lab.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`
// )
};
src/renderer/assets/common/utils.js
浏览文件 @
efa0778d
...
...
@@ -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
}
`
;
// 下载模板
...
...
src/renderer/pages/search/subpages/market.vue
浏览文件 @
efa0778d
...
...
@@ -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
"
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录