Commit c8ba2f4d authored by Damon's avatar Damon

七牛云-返回绝对路径

parent 218373fd
...@@ -58,7 +58,7 @@ export default { ...@@ -58,7 +58,7 @@ export default {
imgList[res.fileIndex] imgList[res.fileIndex]
self.imgList = imgList self.imgList = imgList
// 多文件上传每个文件进度条 // 多文件上传每个文件进度条
console.log(res,'res---onProgressUpdate') //console.log(res,'res---onProgressUpdate')
}, },
onEachUpdate(res){ onEachUpdate(res){
// 多文件上传每个文件上传成功触发 // 多文件上传每个文件上传成功触发
...@@ -67,7 +67,7 @@ export default { ...@@ -67,7 +67,7 @@ export default {
imgList[res.fileIndex].src = uploader.qiniuTokenObj.visitPrefix + res.url imgList[res.fileIndex].src = uploader.qiniuTokenObj.visitPrefix + res.url
} }
self.imgList = imgList self.imgList = imgList
console.log(res,'res---onEachUpdate') //console.log(res,'res---onEachUpdate')
}, },
cardType: category, cardType: category,
...config ...config
...@@ -75,8 +75,8 @@ export default { ...@@ -75,8 +75,8 @@ export default {
// 不需要进度条等可直接获取 // 不需要进度条等可直接获取
let res = await uploader.qnImgUpload(options) let res = await uploader.qnImgUpload(options)
console.log(self.imgList,'self.imgList') // console.log(self.imgList,'self.imgList')
console.log(uploader,uploader.qiniuTokenObj,'qiniuTokenObj') // console.log(uploader,uploader.qiniuTokenObj,'qiniuTokenObj')
// let imgList = res.map(item=>{ // let imgList = res.map(item=>{
// return { // return {
// key:item, // key:item,
......
...@@ -91,11 +91,11 @@ export default { ...@@ -91,11 +91,11 @@ export default {
} }
qiniuUploader.upload(params, (res) => { qiniuUploader.upload(params, (res) => {
console.log(res,'res') console.log(res,'res111')
let inLen = self.maximum - fileList.length let inLen = self.maximum - fileList.length
if (inLen > 0) { if (inLen > 0) {
item.src = file item.src = file
item.key = res.key || res.src item.key = res.url
self.fileMaps.push(item); self.fileMaps.push(item);
self.keys.push(item.key) self.keys.push(item.key)
if(submit) { if(submit) {
......
...@@ -39,7 +39,7 @@ uploader.getQnToken = function(params) { ...@@ -39,7 +39,7 @@ uploader.getQnToken = function(params) {
*region: 地区 默认为:ECN *region: 地区 默认为:ECN
*/ */
resolve({ resolve({
visitPrefix: data.host || globalUrl.qn_asset_url, visitPrefix: data.host,
token: data.token || '', token: data.token || '',
folderPath: data.folderPath || '', folderPath: data.folderPath || '',
region: "ECN" region: "ECN"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment