Browse Source

Update upload.js

master
刘伟坤 7 years ago
committed by GitHub
parent
commit
77cd01a6ad
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      src/utils/upload.js

4
src/utils/upload.js

@ -3,7 +3,7 @@ var qiniu = require('qiniu-js')
import { getTimeForQiniu } from './date' import { getTimeForQiniu } from './date'
export function getQiniuToken() { export function getQiniuToken() {
return request({ return request({
url: 'https://quxiaapi.renqilai.com/api/qiniu/upToken', url: '',
method: 'post', method: 'post',
// params // params
}).then(res => res.data.data).catch(e => { }).then(res => res.data.data).catch(e => {
@ -33,7 +33,7 @@ export async function uploadQinuImage(file) {
reject(data) reject(data)
}, },
complete(data) { complete(data) {
data.path = `https://cdn.renqilai.com/${data.key}` data.path = ``
resolve(data) resolve(data)
} }
}) // 上传开始 }) // 上传开始

Loading…
Cancel
Save