add qiniu upload example

This commit is contained in:
Pan
2017-06-02 18:14:19 +08:00
parent e8fb41d0ff
commit 46b6a6e19f
2 changed files with 51 additions and 27 deletions

View File

@@ -1,28 +1,8 @@
// import fetch, { tpFetch } from 'utils/fetch';
import fetch from 'utils/fetch';
// export function getToken() {
// return fetch({
// url: '/qiniu/upload/token',
// method: 'get'
// });
// }
// export function upload(data) {
// return tpFetch({
// url: 'https://upload.qbox.me',
// method: 'post',
// data
// });
// }
// /* 外部uri转七牛uri*/
// export function netUpload(token, net_url) {
// const imgData = {
// net_url
// };
// return fetch({
// url: '/qiniu/upload/net/async',
// method: 'post',
// data: imgData
// });
// }
export function getToken() {
return fetch({
url: '/qiniu/upload/token', // 假地址 自行替换
method: 'get'
});
}