Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
data-table
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Authored by
hookehuyr
2023-02-10 15:16:23 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
bf23dfe91ad4b423d99c643f4a40919b18ab6ca1
bf23dfe9
1 parent
0b3b06fc
✨ feat(上传相关模块): 七牛新增HTTPS地址
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
7 deletions
src/api/fn.js
src/components/FileUploaderField/index.vue
src/components/ImageUploaderField/index.vue
src/components/SignField/index.vue
src/api/fn.js
View file @
bf23dfe
/*
* @Date: 2022-05-18 22:56:08
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 202
2-11-21 17:12:28
* @LastEditTime: 202
3-02-10 15:13:01
* @FilePath: /data-table/src/api/fn.js
* @Description: 文件描述
*/
...
...
@@ -43,7 +43,7 @@ export const fn = (api) => {
export
const
uploadFn
=
(
api
)
=>
{
return
api
.
then
(
res
=>
{
if
(
res
.
status
Text
===
'OK'
)
{
if
(
res
.
status
===
200
)
{
return
res
.
data
||
true
;
}
else
{
// tslint:disable-next-line: no-console
...
...
@@ -51,7 +51,7 @@ export const uploadFn = (api) => {
if
(
!
res
.
data
.
show
)
return
false
;
Toast
({
icon
:
'close'
,
message
:
res
.
data
.
msg
message
:
res
.
data
.
msg
,
});
return
false
;
}
...
...
src/components/FileUploaderField/index.vue
View file @
bf23dfe
...
...
@@ -280,8 +280,14 @@ const uploadQiniu = async (file, token, name, md5) => {
headers: { "Content-Type": "multipart/form-data" },
};
// 自拍文件上传七牛服务器
let qiniuUploadUrl;
if (window.location.protocol === 'https:') {
qiniuUploadUrl = 'https://up.qbox.me';
} else {
qiniuUploadUrl = 'http://upload.qiniu.com';
}
const { filekey, hash, image_info } = await qiniuUploadAPI(
"http://upload.qiniu.com/"
,
qiniuUploadUrl
,
formData,
config
);
...
...
src/components/ImageUploaderField/index.vue
View file @
bf23dfe
...
...
@@ -290,8 +290,14 @@ const uploadQiniu = async (file, token, name, md5) => {
headers: { "Content-Type": "multipart/form-data" },
};
// 自拍图片上传七牛服务器
let qiniuUploadUrl;
if (window.location.protocol === 'https:') {
qiniuUploadUrl = 'https://up.qbox.me';
} else {
qiniuUploadUrl = 'http://upload.qiniu.com';
}
const { filekey, hash, image_info } = await qiniuUploadAPI(
"http://upload.qiniu.com/"
,
qiniuUploadUrl
,
formData,
config
);
...
...
src/components/SignField/index.vue
View file @
bf23dfe
<!--
* @Date: 2022-09-06 16:29:31
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2023-02-10 1
1:28:50
* @LastEditTime: 2023-02-10 1
5:15:05
* @FilePath: /data-table/src/components/SignField/index.vue
* @Description: 电子签名控件
-->
...
...
@@ -129,8 +129,14 @@ const uploadQiniu = async (file, token, filename) => {
headers: { "Content-Type": "multipart/form-data" },
};
// 自拍图片上传七牛服务器
let qiniuUploadUrl;
if (window.location.protocol === 'https:') {
qiniuUploadUrl = 'https://up.qbox.me';
} else {
qiniuUploadUrl = 'http://upload.qiniu.com';
}
const { filekey, hash, image_info } = await qiniuUploadAPI(
"http://upload.qiniu.com/"
,
qiniuUploadUrl
,
formData,
config
);
...
...
Please
register
or
login
to post a comment